Follow upstream changes -- rest
[git-darcs-import.git] / tests / mv.sh
blob0ee9223c6ffe8af1cb710d83fd56b1b1f398aaf2
1 #!/usr/bin/env bash
2 set -ev
4 rm -rf temp
5 mkdir temp
6 cd temp
7 darcs init
8 echo hi world > temp.c
9 darcs add temp.c
10 darcs record --all -A test --patch-name=hi
11 echo goodbye >> temp.c
12 darcs whatsnew
13 darcs record -a -A au -m bye
14 echo bar > bar.c
15 darcs add bar.c
16 darcs record -a -m one -A ex
17 darcs mv bar.c zig.c
18 darcs whatsnew
19 darcs record -a -m two -A ex
20 mkdir baz
21 darcs add baz
22 darcs whatsnew
23 darcs record -a -m three -A ex
24 darcs mv zig.c baz/bar.c
25 darcs whatsnew
26 darcs record -a -m four -A ex
27 darcs mv baz temp
28 darcs whatsnew
29 darcs record -a -m five -A ex
31 darcs mv temp temp 1> stdout 2> stderr || true
32 grep 'Cannot rename a file or directory onto itself' stderr
34 cd ..
36 rm -rf temp
37 mkdir temp
38 cd temp
39 darcs init
40 echo hi world > a
41 darcs add a
42 darcs record --all -m lower
43 cd ..
44 darcs get temp temp1
45 cd temp
46 darcs mv a A
47 echo goodbye > A
48 darcs record --all -m 'to upper'
49 cd ../temp1
50 darcs pull -a
52 cd ..
53 rm -rf temp temp1