Follow upstream changes -- rest
[git-darcs-import.git] / tests / directory_confusion.sh
blob99499afeac8b59bcfb9158e93c812d8d8174b49b
1 #!/usr/bin/env bash
2 set -ev
4 T=temp
5 rm -rf "$T"
6 mkdir "$T"
7 echo "$T"
8 cd "$T"
9 set -e
10 darcs initialize
11 echo text > afile.txt
12 darcs add afile.txt
13 darcs record --author me --all --no-test --patch-name init
14 mkdir d
15 darcs add d
16 mkdir d/e
17 darcs add d/e
18 darcs mv afile.txt d/e/afile.txt
19 echo altered_text > d/e/afile.txt
20 darcs record --author me --all --no-test --patch-name confusion
21 test ! -f _darcs/pristine/afile.txt
22 echo y/d/y | tr / \\012 | darcs unrecord
23 rm -rf "$T"