Merge branch 'darcs' into master
[git-darcs-import.git] / tests / double-unrevert.sh
blob00365b174fea2d65c908593ba696a120a00f2865
1 #!/usr/bin/env bash
2 set -ev
4 # This demonstrates a bug that happens if you revert followed by
5 # a partial unrevert and a full unrevert. It requires that
6 # the second unrevert is working with patches who's contents need
7 # to be modified by the commute in the first unrevert.
9 rm -rf temp1
10 mkdir temp1
11 cd temp1
12 darcs init
13 echo line1 >> A
14 echo line2 >> A
15 echo line3 >> A
16 echo line4 >> A
17 echo line5 >> A
18 echo line6 >> A
19 darcs add A
20 darcs record -am A
21 sed 's/line2/Line2/' A > A1; rm A; mv A1 A
22 sed '4d' A > A1; rm A; mv A1 A
23 sed 's/line6/Line6/' A > A1; rm A; mv A1 A
24 darcs revert -a
25 echo nyn | darcs unrev
26 darcs unrev -a
28 cd ..
29 rm -rf temp1