File: empty_inventory.sh

package info (click to toggle)
darcs 2.18.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,960 kB
  • sloc: haskell: 47,748; sh: 13,466; ansic: 447; perl: 134; makefile: 8
file content (30 lines) | stat: -rw-r--r-- 736 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash

# This tests that a minor change to the format of inventory files introduced
# in darcs-2.17.2 is compatible with previous releases. The situation is when
# a tag is recorded in an empty repository. This now creates and refers to an
# empty inventory, whereas previously it did not.

. lib

# forward compatibility

rm -rf empty-old empty-new
darcs init empty-new
cd empty-new
darcs tag XX
# we have not (semantically) changed the functions that read
# inventories so this suffices for testing forward compatibility
test $(darcs log --count) = "1"
cd ..

# backward compatibility

unpack_testdata empty-old
cd empty-old
# read
test $(darcs log --count) = "1"
# write
darcs tag YY
echo y | darcs obliterate -a
cd ..