Follow upstream changes -- rest
[git-darcs-import.git] / tests / checkpoint.sh
blob8c144f0c4a544ed6553799a89bce9c279694fa4a
1 #!/usr/bin/env bash
3 # A test for unrecording checkpoint tags, inspired by issue517
5 set -ev
7 darcs --version
9 rm -rf temp temp1 temp2
10 mkdir temp
12 # This the last commands would blow up if the "--darcs-2" format wasn't used.
13 darcs init --darcs-2 --repodir temp
14 touch temp/x
15 darcs rec -lam xx --repodir temp
16 darcs tag -m yy --repodir temp
17 touch temp/z
18 darcs rec -lam zz --repodir temp
19 darcs optimize --checkpoint --repodir temp
20 darcs get --partial temp temp1
21 echo 'y' | darcs unrec -p TAG --repodir temp1
23 # Now, the real tests. Do they return sensible results?
24 darcs get --partial temp1 temp2;
25 echo 'n' | darcs unrec --repodir temp1 -p 'zz'
27 rm -rf temp temp1 temp2;
28 darcs init --darcs-2 --repodir temp
29 touch temp/x
30 darcs rec -lam xx --repodir temp
31 darcs tag -m yy --repodir temp
32 touch temp/z
33 darcs rec -lam zz --repodir temp
34 darcs optimize --checkpoint --repodir temp
35 darcs get --partial temp temp1
36 echo 'y' | darcs unrec -p TAG --repodir temp1
38 # Now, the real tests. Do they return sensible results?
39 darcs get --partial temp1 temp2;
40 echo 'n' | darcs unrec --repodir temp1 -p 'zz'
42 rm -rf temp temp1 temp2;