Find git executable at run time
[git-darcs-import.git] / tests / rollback.sh
blob89615d22f48166d0dbb529d0ae6678aa36a38a49
1 #!/bin/bash
3 set -ev
5 range="0 1 2"
7 mkdir temp1 && cd temp1 && darcs init
8 touch f && darcs add f
9 for i in $range
11 echo $i > f && darcs record -A me --ignore-time -m p$i --all f
12 done
14 cd .. && mkdir temp2 && cd temp2 && darcs init
16 set -x
18 : Demonstrate problem with regrem
19 for i in $range
21 darcs pull --patch p$i ../temp1 --all
22 if darcs whatsnew ; then
23 : Resolve conflict - rollback our patch
24 darcs revert --all
25 darcs rollback -a --patch-name x0
26 darcs revert --all
28 : Create local change and record it
29 echo X$i > f && darcs record -A me --ignore-time -m x$i --all f
30 done
32 cd ..
33 rm -rf temp1 temp2