Follow upstream changes -- rest
[git-darcs-import.git] / tests / unpull-formerly-pl.sh
blob1d13b616aee2c87669391de3304c886ae8b196f9
1 #!/usr/bin/env bash
2 set -ev
4 rm -rf tempA
5 mkdir tempA
6 cd tempA
7 darcs initialize
8 echo hello world > foo
9 darcs add foo
10 darcs record -a -m hellofoo
12 echo goodbye world >> foo
13 darcs record -a -m goodbyefoo
15 darcs replace world bar foo
16 echo Hi there foo > bar
17 darcs add bar
18 darcs record -a -m addbar
20 darcs mv bar baz
21 darcs replace bar baz foo
22 darcs record -a -m bar2baz
24 echo Do not love the baz, or anything in the baz. >> foo
25 darcs record -a -m nolove
27 darcs mv baz world
28 darcs replace baz world foo
29 darcs record -a -m baz2world
31 darcs whatsnew | grep 'No changes'
33 grep 'love the world' foo
35 echo y | darcs unpull -p baz2world
37 darcs whatsnew | grep 'No changes'
39 grep 'love the baz' foo
41 echo y | darcs unpull -p bar2baz
43 grep 'love the bar' foo
45 echo y | darcs unpull -p nolove
47 grep 'love' foo && exit 1 || true
49 cd ..
50 rm -rf tempA