author | Matt Mackall <mpm@selenic.com> |
Sun, 26 Apr 2009 16:50:44 -0500 | |
changeset 8200 | 865d2c646f29 |
parent 8165 | 78658990c725 |
child 8305 | 7a0fcdd3828f |
child 8423 | eb7be0e752d9 |
permissions | -rwxr-xr-x |
7053 | 1 |
#!/bin/sh |
2 |
||
7058
9e6d6568bf7a
`source` doesn't work for some /bin/sh, use `.` instead
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
7053
diff
changeset
|
3 |
. "$TESTDIR/bzr-definitions" |
7053 | 4 |
|
5 |
echo % create and rename on the same file in the same step |
|
6 |
mkdir test-createandrename |
|
7 |
cd test-createandrename |
|
8 |
bzr init -q source |
|
9 |
cd source |
|
10 |
echo a > a |
|
8036
dbcf5d52fcf5
test-convert-bzr: check renamed files are removed (issue1505)
Patrick Mezard <pmezard@gmail.com>
parents:
7058
diff
changeset
|
11 |
echo c > c |
8045
e09a2f2ef85d
convert/bzr: fix file rename replaced by a dir case (issue1583)
Patrick Mezard <pmezard@gmail.com>
parents:
8036
diff
changeset
|
12 |
echo e > e |
e09a2f2ef85d
convert/bzr: fix file rename replaced by a dir case (issue1583)
Patrick Mezard <pmezard@gmail.com>
parents:
8036
diff
changeset
|
13 |
bzr add -q a c e |
e09a2f2ef85d
convert/bzr: fix file rename replaced by a dir case (issue1583)
Patrick Mezard <pmezard@gmail.com>
parents:
8036
diff
changeset
|
14 |
bzr commit -q -m 'Initial add: a, c, e' |
7053 | 15 |
bzr mv a b |
8036
dbcf5d52fcf5
test-convert-bzr: check renamed files are removed (issue1505)
Patrick Mezard <pmezard@gmail.com>
parents:
7058
diff
changeset
|
16 |
bzr mv c d |
8045
e09a2f2ef85d
convert/bzr: fix file rename replaced by a dir case (issue1583)
Patrick Mezard <pmezard@gmail.com>
parents:
8036
diff
changeset
|
17 |
bzr mv e f |
7053 | 18 |
echo a2 >> a |
8045
e09a2f2ef85d
convert/bzr: fix file rename replaced by a dir case (issue1583)
Patrick Mezard <pmezard@gmail.com>
parents:
8036
diff
changeset
|
19 |
mkdir e |
e09a2f2ef85d
convert/bzr: fix file rename replaced by a dir case (issue1583)
Patrick Mezard <pmezard@gmail.com>
parents:
8036
diff
changeset
|
20 |
bzr add -q a e |
8036
dbcf5d52fcf5
test-convert-bzr: check renamed files are removed (issue1505)
Patrick Mezard <pmezard@gmail.com>
parents:
7058
diff
changeset
|
21 |
bzr commit -q -m 'rename a into b, create a, rename c into d' |
7053 | 22 |
cd .. |
23 |
hg convert source source-hg |
|
24 |
glog -R source-hg |
|
8036
dbcf5d52fcf5
test-convert-bzr: check renamed files are removed (issue1505)
Patrick Mezard <pmezard@gmail.com>
parents:
7058
diff
changeset
|
25 |
echo "% manifest" |
dbcf5d52fcf5
test-convert-bzr: check renamed files are removed (issue1505)
Patrick Mezard <pmezard@gmail.com>
parents:
7058
diff
changeset
|
26 |
hg manifest -R source-hg -r tip |
7053 | 27 |
echo "% test --rev option" |
28 |
hg convert -r 1 source source-1-hg |
|
29 |
glog -R source-1-hg |
|
8165
78658990c725
convert/bzr: make it work with filemaps (issue1631)
Patrick Mezard <pmezard@gmail.com>
parents:
8148
diff
changeset
|
30 |
echo "% test with filemap" |
78658990c725
convert/bzr: make it work with filemaps (issue1631)
Patrick Mezard <pmezard@gmail.com>
parents:
8148
diff
changeset
|
31 |
cat > filemap <<EOF |
78658990c725
convert/bzr: make it work with filemaps (issue1631)
Patrick Mezard <pmezard@gmail.com>
parents:
8148
diff
changeset
|
32 |
exclude a |
78658990c725
convert/bzr: make it work with filemaps (issue1631)
Patrick Mezard <pmezard@gmail.com>
parents:
8148
diff
changeset
|
33 |
EOF |
78658990c725
convert/bzr: make it work with filemaps (issue1631)
Patrick Mezard <pmezard@gmail.com>
parents:
8148
diff
changeset
|
34 |
hg convert --filemap filemap source source-filemap-hg |
78658990c725
convert/bzr: make it work with filemaps (issue1631)
Patrick Mezard <pmezard@gmail.com>
parents:
8148
diff
changeset
|
35 |
hg -R source-filemap-hg manifest -r tip |
7053 | 36 |
cd .. |
37 |
||
38 |
echo % merge |
|
39 |
mkdir test-merge |
|
40 |
cd test-merge |
|
41 |
||
42 |
cat > helper.py <<EOF |
|
43 |
import sys |
|
44 |
from bzrlib import workingtree |
|
45 |
wt = workingtree.WorkingTree.open('.') |
|
46 |
||
47 |
message, stamp = sys.argv[1:] |
|
48 |
wt.commit(message, timestamp=int(stamp)) |
|
49 |
EOF |
|
50 |
||
51 |
bzr init -q source |
|
52 |
cd source |
|
53 |
echo content > a |
|
54 |
echo content2 > b |
|
55 |
bzr add -q a b |
|
56 |
bzr commit -q -m 'Initial add' |
|
57 |
cd .. |
|
58 |
bzr branch -q source source-improve |
|
59 |
cd source |
|
60 |
echo more >> a |
|
61 |
python ../helper.py 'Editing a' 100 |
|
62 |
cd ../source-improve |
|
63 |
echo content3 >> b |
|
64 |
python ../helper.py 'Editing b' 200 |
|
65 |
cd ../source |
|
66 |
bzr merge -q ../source-improve |
|
67 |
bzr commit -q -m 'Merged improve branch' |
|
68 |
cd .. |
|
69 |
hg convert --datesort source source-hg |
|
70 |
glog -R source-hg |
|
71 |
cd .. |
|
72 |
||
73 |
echo % symlinks and executable files |
|
74 |
mkdir test-symlinks |
|
75 |
cd test-symlinks |
|
76 |
bzr init -q source |
|
77 |
cd source |
|
78 |
touch program |
|
79 |
chmod +x program |
|
80 |
ln -s program altname |
|
8148
adce97d28389
convert/bzr: fix symlink handling (issue1626)
Patrick Mezard <pmezard@gmail.com>
parents:
8045
diff
changeset
|
81 |
mkdir d |
adce97d28389
convert/bzr: fix symlink handling (issue1626)
Patrick Mezard <pmezard@gmail.com>
parents:
8045
diff
changeset
|
82 |
echo a > d/a |
adce97d28389
convert/bzr: fix symlink handling (issue1626)
Patrick Mezard <pmezard@gmail.com>
parents:
8045
diff
changeset
|
83 |
ln -s a syma |
adce97d28389
convert/bzr: fix symlink handling (issue1626)
Patrick Mezard <pmezard@gmail.com>
parents:
8045
diff
changeset
|
84 |
bzr add -q altname program syma d/a |
7053 | 85 |
bzr commit -q -m 'Initial setup' |
86 |
touch newprog |
|
87 |
chmod +x newprog |
|
88 |
rm altname |
|
89 |
ln -s newprog altname |
|
90 |
chmod -x program |
|
91 |
bzr add -q newprog |
|
92 |
bzr commit -q -m 'Symlink changed, x bits changed' |
|
93 |
cd .. |
|
94 |
hg convert source source-hg |
|
95 |
manifest source-hg 0 |
|
96 |
manifest source-hg tip |
|
97 |
cd .. |