Find git executable at run time
[git-darcs-import.git] / tests / unrevert-replace-moved.sh
blob1bc99e09cabaaf4548f092043de9d8f44b4c5a1f
1 #!/usr/bin/env bash
2 set -ev
4 ## The builtin ! has the wrong semantics for not.
5 not () { "$@" && exit 1 || :; }
7 rm -rf temp1
8 mkdir temp1
9 cd temp1
10 darcs init
11 echo hello world > foo
12 darcs add foo
14 darcs record -a -m 'addfoo'
16 darcs replace hello goodbye foo
18 darcs revert -a
20 not darcs whatsnew
22 darcs mv foo bar
24 echo hello my good friends >> bar
26 darcs unrevert -a
28 darcs whatsnew > unrecorded
29 cat unrecorded
31 grep 'bar .* hello goodbye' unrecorded
33 cat bar
34 grep 'goodbye world' bar
35 grep 'goodbye my good friends' bar
37 cd ..
38 rm -rf temp1