4 # issue157: A test for how rollback handles dependencies and conflicts.
6 not
() { "$@" && exit 1 ||
:; }
10 # set up the repository
19 # Create three patches
25 # Rollback the last one
26 darcs rollback
-a -p CC
-m 'rollback CC'
27 grep b foo
# reality check
30 # Now get just the first two patches into a new repo...ignoring the third patch and the rollback.
31 darcs get
--to-patch BB temp1 temp2
33 # Now in the second repo, rollback the second patch.
34 darcs rollback
-a -p BB
-m 'rollback BB'
35 grep a foo
# reality check
36 # Finally, pull the third patch and the rollback of it.
37 # Because the two patches should cancel each other other, there should be no change here.
38 darcs pull
-a ..
/temp1
39 # expect a conflict between the contents being 'a' or 'b'