##// END OF EJS Templates
tests: unify test-convert-bzr-directories
Matt Mackall -
r12514:c40b4744 default
parent child Browse files
Show More
@@ -1,93 +1,151 b''
1 #!/bin/sh
2
1
3 . "$TESTDIR/bzr-definitions"
2 $ . "$TESTDIR/bzr-definitions"
3
4 empty directory
4
5
5 echo % empty directory
6 $ mkdir test-empty
6 mkdir test-empty
7 $ cd test-empty
7 cd test-empty
8 $ bzr init -q source
8 bzr init -q source
9 $ cd source
9 cd source
10 $ echo content > a
10 echo content > a
11 $ bzr add -q a
11 bzr add -q a
12 $ bzr commit -q -m 'Initial add'
12 bzr commit -q -m 'Initial add'
13 $ mkdir empty
13 mkdir empty
14 $ bzr add -q empty
14 bzr add -q empty
15 $ bzr commit -q -m 'Empty directory added'
15 bzr commit -q -m 'Empty directory added'
16 $ echo content > empty/something
16 echo content > empty/something
17 $ bzr add -q empty/something
17 bzr add -q empty/something
18 $ bzr commit -q -m 'Added file into directory'
18 bzr commit -q -m 'Added file into directory'
19 $ cd ..
19 cd ..
20 $ hg convert source source-hg
20 hg convert source source-hg
21 initializing destination source-hg repository
21 manifest source-hg 1
22 scanning source...
22 manifest source-hg tip
23 sorting...
23 cd ..
24 converting...
25 2 Initial add
26 1 Empty directory added
27 0 Added file into directory
28 $ manifest source-hg 1
29 % manifest of 1
30 644 a
31 $ manifest source-hg tip
32 % manifest of tip
33 644 a
34 644 empty/something
35 $ cd ..
24
36
25 echo % directory renames
37 directory renames
26 mkdir test-dir-rename
38
27 cd test-dir-rename
39 $ mkdir test-dir-rename
28 bzr init -q source
40 $ cd test-dir-rename
29 cd source
41 $ bzr init -q source
30 mkdir tpyo
42 $ cd source
31 echo content > tpyo/something
43 $ mkdir tpyo
32 bzr add -q tpyo
44 $ echo content > tpyo/something
33 bzr commit -q -m 'Added directory'
45 $ bzr add -q tpyo
34 bzr mv tpyo typo
46 $ bzr commit -q -m 'Added directory'
35 bzr commit -q -m 'Oops, typo'
47 $ bzr mv tpyo typo
36 cd ..
48 tpyo => typo
37 hg convert source source-hg
49 $ bzr commit -q -m 'Oops, typo'
38 manifest source-hg 0
50 $ cd ..
39 manifest source-hg tip
51 $ hg convert source source-hg
40 cd ..
52 initializing destination source-hg repository
53 scanning source...
54 sorting...
55 converting...
56 1 Added directory
57 0 Oops, typo
58 $ manifest source-hg 0
59 % manifest of 0
60 644 tpyo/something
61 $ manifest source-hg tip
62 % manifest of tip
63 644 typo/something
64 $ cd ..
65
66 nested directory renames
41
67
42 echo % nested directory renames
68 $ mkdir test-nested-dir-rename
43 mkdir test-nested-dir-rename
69 $ cd test-nested-dir-rename
44 cd test-nested-dir-rename
70 $ bzr init -q source
45 bzr init -q source
71 $ cd source
46 cd source
72 $ mkdir -p firstlevel/secondlevel/thirdlevel
47 mkdir -p firstlevel/secondlevel/thirdlevel
73 $ echo content > firstlevel/secondlevel/file
48 echo content > firstlevel/secondlevel/file
74 $ echo this_needs_to_be_there_too > firstlevel/secondlevel/thirdlevel/stuff
49 echo this_needs_to_be_there_too > firstlevel/secondlevel/thirdlevel/stuff
75 $ bzr add -q firstlevel
50 bzr add -q firstlevel
76 $ bzr commit -q -m 'Added nested directories'
51 bzr commit -q -m 'Added nested directories'
77 $ bzr mv firstlevel/secondlevel secondlevel
52 bzr mv firstlevel/secondlevel secondlevel
78 firstlevel/secondlevel => secondlevel
53 bzr commit -q -m 'Moved secondlevel one level up'
79 $ bzr commit -q -m 'Moved secondlevel one level up'
54 cd ..
80 $ cd ..
55 hg convert source source-hg
81 $ hg convert source source-hg
56 manifest source-hg tip
82 initializing destination source-hg repository
57 cd ..
83 scanning source...
84 sorting...
85 converting...
86 1 Added nested directories
87 0 Moved secondlevel one level up
88 $ manifest source-hg tip
89 % manifest of tip
90 644 secondlevel/file
91 644 secondlevel/thirdlevel/stuff
92 $ cd ..
93
94 directory remove
58
95
59 echo % directory remove
96 $ mkdir test-dir-remove
60 mkdir test-dir-remove
97 $ cd test-dir-remove
61 cd test-dir-remove
98 $ bzr init -q source
62 bzr init -q source
99 $ cd source
63 cd source
100 $ mkdir src
64 mkdir src
101 $ echo content > src/sourcecode
65 echo content > src/sourcecode
102 $ bzr add -q src
66 bzr add -q src
103 $ bzr commit -q -m 'Added directory'
67 bzr commit -q -m 'Added directory'
104 $ bzr rm -q src
68 bzr rm -q src
105 $ bzr commit -q -m 'Removed directory'
69 bzr commit -q -m 'Removed directory'
106 $ cd ..
70 cd ..
107 $ hg convert source source-hg
71 hg convert source source-hg
108 initializing destination source-hg repository
72 manifest source-hg 0
109 scanning source...
73 manifest source-hg tip
110 sorting...
74 cd ..
111 converting...
112 1 Added directory
113 0 Removed directory
114 $ manifest source-hg 0
115 % manifest of 0
116 644 src/sourcecode
117 $ manifest source-hg tip
118 % manifest of tip
119 $ cd ..
120
121 directory replace
75
122
76 echo % directory replace
123 $ mkdir test-dir-replace
77 mkdir test-dir-replace
124 $ cd test-dir-replace
78 cd test-dir-replace
125 $ bzr init -q source
79 bzr init -q source
126 $ cd source
80 cd source
127 $ mkdir first second
81 mkdir first second
128 $ echo content > first/file
82 echo content > first/file
129 $ echo morecontent > first/dummy
83 echo morecontent > first/dummy
130 $ echo othercontent > second/something
84 echo othercontent > second/something
131 $ bzr add -q first second
85 bzr add -q first second
132 $ bzr commit -q -m 'Initial layout'
86 bzr commit -q -m 'Initial layout'
133 $ bzr mv first/file second/file
87 bzr mv first/file second/file
134 first/file => second/file
88 bzr mv first third
135 $ bzr mv first third
89 bzr commit -q -m 'Some conflicting moves'
136 first => third
90 cd ..
137 $ bzr commit -q -m 'Some conflicting moves'
91 hg convert source source-hg
138 $ cd ..
92 manifest source-hg tip
139 $ hg convert source source-hg
93 cd ..
140 initializing destination source-hg repository
141 scanning source...
142 sorting...
143 converting...
144 1 Initial layout
145 0 Some conflicting moves
146 $ manifest source-hg tip
147 % manifest of tip
148 644 second/file
149 644 second/something
150 644 third/dummy
151 $ cd ..
1 NO CONTENT: file was removed
NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now