Mercurial > hg
annotate tests/test-convert-bzr-directories @ 11306:deaeb2d84d8a stable
fix encoding bug in 05ac42e56452
author | Sune Foldager <cryo@cyanite.org> |
---|---|
date | Tue, 08 Jun 2010 13:19:22 +0200 |
parents | 9e6d6568bf7a |
children |
rev | line source |
---|---|
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 % empty directory | |
6 mkdir test-empty | |
7 cd test-empty | |
8 bzr init -q source | |
9 cd source | |
10 echo content > a | |
11 bzr add -q a | |
12 bzr commit -q -m 'Initial add' | |
13 mkdir empty | |
14 bzr add -q empty | |
15 bzr commit -q -m 'Empty directory added' | |
16 echo content > empty/something | |
17 bzr add -q empty/something | |
18 bzr commit -q -m 'Added file into directory' | |
19 cd .. | |
20 hg convert source source-hg | |
21 manifest source-hg 1 | |
22 manifest source-hg tip | |
23 cd .. | |
24 | |
25 echo % directory renames | |
26 mkdir test-dir-rename | |
27 cd test-dir-rename | |
28 bzr init -q source | |
29 cd source | |
30 mkdir tpyo | |
31 echo content > tpyo/something | |
32 bzr add -q tpyo | |
33 bzr commit -q -m 'Added directory' | |
34 bzr mv tpyo typo | |
35 bzr commit -q -m 'Oops, typo' | |
36 cd .. | |
37 hg convert source source-hg | |
38 manifest source-hg 0 | |
39 manifest source-hg tip | |
40 cd .. | |
41 | |
42 echo % nested directory renames | |
43 mkdir test-nested-dir-rename | |
44 cd test-nested-dir-rename | |
45 bzr init -q source | |
46 cd source | |
47 mkdir -p firstlevel/secondlevel/thirdlevel | |
48 echo content > firstlevel/secondlevel/file | |
49 echo this_needs_to_be_there_too > firstlevel/secondlevel/thirdlevel/stuff | |
50 bzr add -q firstlevel | |
51 bzr commit -q -m 'Added nested directories' | |
52 bzr mv firstlevel/secondlevel secondlevel | |
53 bzr commit -q -m 'Moved secondlevel one level up' | |
54 cd .. | |
55 hg convert source source-hg | |
56 manifest source-hg tip | |
57 cd .. | |
58 | |
59 echo % directory remove | |
60 mkdir test-dir-remove | |
61 cd test-dir-remove | |
62 bzr init -q source | |
63 cd source | |
64 mkdir src | |
65 echo content > src/sourcecode | |
66 bzr add -q src | |
67 bzr commit -q -m 'Added directory' | |
68 bzr rm -q src | |
69 bzr commit -q -m 'Removed directory' | |
70 cd .. | |
71 hg convert source source-hg | |
72 manifest source-hg 0 | |
73 manifest source-hg tip | |
74 cd .. | |
75 | |
76 echo % directory replace | |
77 mkdir test-dir-replace | |
78 cd test-dir-replace | |
79 bzr init -q source | |
80 cd source | |
81 mkdir first second | |
82 echo content > first/file | |
83 echo morecontent > first/dummy | |
84 echo othercontent > second/something | |
85 bzr add -q first second | |
86 bzr commit -q -m 'Initial layout' | |
87 bzr mv first/file second/file | |
88 bzr mv first third | |
89 bzr commit -q -m 'Some conflicting moves' | |
90 cd .. | |
91 hg convert source source-hg | |
92 manifest source-hg tip | |
93 cd .. |