Follow upstream changes -- Bytestring updates
[git-darcs-import.git] / bugs / issue944_partial_inventory.sh
blobeb7a124291aad6807c7a13f07c6be1578c12abcf
1 #!/usr/bin/env bash
3 set -ev
5 test $DARCS || DARCS=$PWD/../darcs
6 ACTUAL_DARCS=`which $DARCS`
7 DARCSPATH=`dirname $ACTUAL_DARCS`
8 PATH="$DARCSPATH:$PATH"
9 export PATH
11 # create base repository
12 rm -rf temp1
13 mkdir temp1
14 cd temp1
15 darcs init
17 echo first > a
18 darcs add a
19 darcs record -am first
20 darcs tag --checkpoint 'Tag 1'
22 echo second > b
23 darcs add b
24 darcs record -am second
25 darcs tag --checkpoint 'Tag 2'
27 echo third > c
28 darcs add c
29 darcs record -am third
30 darcs tag --checkpoint 'Tag 3'
32 # create a partial copy of the base repository and modify it
33 cd ..
34 rm -rf temp2
35 darcs get --partial temp1 temp2
36 cd temp2
38 # instead of the following three commands one could also use darcs optimize
39 echo mistake > a
40 darcs record -am mistake
41 darcs unrecord -ap mistake
43 # now check the repository
44 darcs check
45 # => darcs: failed to read patch: ...