Show More
@@ -1,432 +1,432 b'' | |||||
1 | $ "$TESTDIR/hghave" svn13 || exit 80 |
|
1 | $ "$TESTDIR/hghave" svn13 || exit 80 | |
2 |
|
2 | |||
3 | $ svnupanddisplay() |
|
3 | $ svnupanddisplay() | |
4 | > { |
|
4 | > { | |
5 | > ( |
|
5 | > ( | |
6 | > cd $1; |
|
6 | > cd $1; | |
7 | > svn up -q; |
|
7 | > svn up -q; | |
8 | > svn st -v | sed 's/ */ /g' | sort |
|
8 | > svn st -v | sed 's/ */ /g' | sort | |
9 | > limit='' |
|
9 | > limit='' | |
10 | > if [ $2 -gt 0 ]; then |
|
10 | > if [ $2 -gt 0 ]; then | |
11 | > limit="--limit=$2" |
|
11 | > limit="--limit=$2" | |
12 | > fi |
|
12 | > fi | |
13 | > svn log --xml -v $limit | python "$TESTDIR/svnxml.py" |
|
13 | > svn log --xml -v $limit | python "$TESTDIR/svnxml.py" | |
14 | > ) |
|
14 | > ) | |
15 | > } |
|
15 | > } | |
16 |
|
16 | |||
17 | $ cat >> $HGRCPATH <<EOF |
|
17 | $ cat >> $HGRCPATH <<EOF | |
18 | > [extensions] |
|
18 | > [extensions] | |
19 | > convert = |
|
19 | > convert = | |
20 | > graphlog = |
|
20 | > graphlog = | |
21 | > EOF |
|
21 | > EOF | |
22 |
|
22 | |||
23 | $ hg init a |
|
23 | $ hg init a | |
24 |
|
24 | |||
25 | Add |
|
25 | Add | |
26 |
|
26 | |||
27 | $ echo a > a/a |
|
27 | $ echo a > a/a | |
28 | $ mkdir -p a/d1/d2 |
|
28 | $ mkdir -p a/d1/d2 | |
29 | $ echo b > a/d1/d2/b |
|
29 | $ echo b > a/d1/d2/b | |
30 | $ hg --cwd a ci -d '0 0' -A -m 'add a file' |
|
30 | $ hg --cwd a ci -d '0 0' -A -m 'add a file' | |
31 | adding a |
|
31 | adding a | |
32 | adding d1/d2/b |
|
32 | adding d1/d2/b | |
33 |
|
33 | |||
34 | Modify |
|
34 | Modify | |
35 |
|
35 | |||
36 | $ "$TESTDIR/svn-safe-append.py" a a/a |
|
36 | $ "$TESTDIR/svn-safe-append.py" a a/a | |
37 | $ hg --cwd a ci -d '1 0' -m 'modify a file' |
|
37 | $ hg --cwd a ci -d '1 0' -m 'modify a file' | |
38 | $ hg --cwd a tip -q |
|
38 | $ hg --cwd a tip -q | |
39 | 1:e0e2b8a9156b |
|
39 | 1:e0e2b8a9156b | |
40 |
|
40 | |||
41 | $ hg convert -d svn a |
|
41 | $ hg convert -d svn a | |
42 | assuming destination a-hg |
|
42 | assuming destination a-hg | |
43 | initializing svn repository 'a-hg' |
|
43 | initializing svn repository 'a-hg' | |
44 | initializing svn working copy 'a-hg-wc' |
|
44 | initializing svn working copy 'a-hg-wc' | |
45 | scanning source... |
|
45 | scanning source... | |
46 | sorting... |
|
46 | sorting... | |
47 | converting... |
|
47 | converting... | |
48 | 1 add a file |
|
48 | 1 add a file | |
49 | 0 modify a file |
|
49 | 0 modify a file | |
50 | $ svnupanddisplay a-hg-wc 2 |
|
50 | $ svnupanddisplay a-hg-wc 2 | |
51 | 2 1 test d1 |
|
51 | 2 1 test d1 | |
52 | 2 1 test d1/d2 |
|
52 | 2 1 test d1/d2 (glob) | |
53 | 2 1 test d1/d2/b |
|
53 | 2 1 test d1/d2/b (glob) | |
54 | 2 2 test . |
|
54 | 2 2 test . | |
55 | 2 2 test a |
|
55 | 2 2 test a | |
56 | revision: 2 |
|
56 | revision: 2 | |
57 | author: test |
|
57 | author: test | |
58 | msg: modify a file |
|
58 | msg: modify a file | |
59 | M /a |
|
59 | M /a | |
60 | revision: 1 |
|
60 | revision: 1 | |
61 | author: test |
|
61 | author: test | |
62 | msg: add a file |
|
62 | msg: add a file | |
63 | A /a |
|
63 | A /a | |
64 | A /d1 |
|
64 | A /d1 | |
65 | A /d1/d2 |
|
65 | A /d1/d2 | |
66 | A /d1/d2/b |
|
66 | A /d1/d2/b | |
67 | $ ls a a-hg-wc |
|
67 | $ ls a a-hg-wc | |
68 | a: |
|
68 | a: | |
69 | a |
|
69 | a | |
70 | d1 |
|
70 | d1 | |
71 |
|
71 | |||
72 | a-hg-wc: |
|
72 | a-hg-wc: | |
73 | a |
|
73 | a | |
74 | d1 |
|
74 | d1 | |
75 | $ cmp a/a a-hg-wc/a |
|
75 | $ cmp a/a a-hg-wc/a | |
76 |
|
76 | |||
77 | Rename |
|
77 | Rename | |
78 |
|
78 | |||
79 | $ hg --cwd a mv a b |
|
79 | $ hg --cwd a mv a b | |
80 | $ hg --cwd a ci -d '2 0' -m 'rename a file' |
|
80 | $ hg --cwd a ci -d '2 0' -m 'rename a file' | |
81 | $ hg --cwd a tip -q |
|
81 | $ hg --cwd a tip -q | |
82 | 2:eb5169441d43 |
|
82 | 2:eb5169441d43 | |
83 |
|
83 | |||
84 | $ hg convert -d svn a |
|
84 | $ hg convert -d svn a | |
85 | assuming destination a-hg |
|
85 | assuming destination a-hg | |
86 | initializing svn working copy 'a-hg-wc' |
|
86 | initializing svn working copy 'a-hg-wc' | |
87 | scanning source... |
|
87 | scanning source... | |
88 | sorting... |
|
88 | sorting... | |
89 | converting... |
|
89 | converting... | |
90 | 0 rename a file |
|
90 | 0 rename a file | |
91 | $ svnupanddisplay a-hg-wc 1 |
|
91 | $ svnupanddisplay a-hg-wc 1 | |
92 | 3 1 test d1 |
|
92 | 3 1 test d1 | |
93 | 3 1 test d1/d2 |
|
93 | 3 1 test d1/d2 (glob) | |
94 | 3 1 test d1/d2/b |
|
94 | 3 1 test d1/d2/b (glob) | |
95 | 3 3 test . |
|
95 | 3 3 test . | |
96 | 3 3 test b |
|
96 | 3 3 test b | |
97 | revision: 3 |
|
97 | revision: 3 | |
98 | author: test |
|
98 | author: test | |
99 | msg: rename a file |
|
99 | msg: rename a file | |
100 | D /a |
|
100 | D /a | |
101 | A /b (from /a@2) |
|
101 | A /b (from /a@2) | |
102 | $ ls a a-hg-wc |
|
102 | $ ls a a-hg-wc | |
103 | a: |
|
103 | a: | |
104 | b |
|
104 | b | |
105 | d1 |
|
105 | d1 | |
106 |
|
106 | |||
107 | a-hg-wc: |
|
107 | a-hg-wc: | |
108 | b |
|
108 | b | |
109 | d1 |
|
109 | d1 | |
110 |
|
110 | |||
111 | Copy |
|
111 | Copy | |
112 |
|
112 | |||
113 | $ hg --cwd a cp b c |
|
113 | $ hg --cwd a cp b c | |
114 |
|
114 | |||
115 | $ hg --cwd a ci -d '3 0' -m 'copy a file' |
|
115 | $ hg --cwd a ci -d '3 0' -m 'copy a file' | |
116 | $ hg --cwd a tip -q |
|
116 | $ hg --cwd a tip -q | |
117 | 3:60effef6ab48 |
|
117 | 3:60effef6ab48 | |
118 |
|
118 | |||
119 | $ hg convert -d svn a |
|
119 | $ hg convert -d svn a | |
120 | assuming destination a-hg |
|
120 | assuming destination a-hg | |
121 | initializing svn working copy 'a-hg-wc' |
|
121 | initializing svn working copy 'a-hg-wc' | |
122 | scanning source... |
|
122 | scanning source... | |
123 | sorting... |
|
123 | sorting... | |
124 | converting... |
|
124 | converting... | |
125 | 0 copy a file |
|
125 | 0 copy a file | |
126 | $ svnupanddisplay a-hg-wc 1 |
|
126 | $ svnupanddisplay a-hg-wc 1 | |
127 | 4 1 test d1 |
|
127 | 4 1 test d1 | |
128 | 4 1 test d1/d2 |
|
128 | 4 1 test d1/d2 (glob) | |
129 | 4 1 test d1/d2/b |
|
129 | 4 1 test d1/d2/b (glob) | |
130 | 4 3 test b |
|
130 | 4 3 test b | |
131 | 4 4 test . |
|
131 | 4 4 test . | |
132 | 4 4 test c |
|
132 | 4 4 test c | |
133 | revision: 4 |
|
133 | revision: 4 | |
134 | author: test |
|
134 | author: test | |
135 | msg: copy a file |
|
135 | msg: copy a file | |
136 | A /c (from /b@3) |
|
136 | A /c (from /b@3) | |
137 | $ ls a a-hg-wc |
|
137 | $ ls a a-hg-wc | |
138 | a: |
|
138 | a: | |
139 | b |
|
139 | b | |
140 | c |
|
140 | c | |
141 | d1 |
|
141 | d1 | |
142 |
|
142 | |||
143 | a-hg-wc: |
|
143 | a-hg-wc: | |
144 | b |
|
144 | b | |
145 | c |
|
145 | c | |
146 | d1 |
|
146 | d1 | |
147 |
|
147 | |||
148 | $ hg --cwd a rm b |
|
148 | $ hg --cwd a rm b | |
149 |
|
149 | |||
150 | Remove |
|
150 | Remove | |
151 |
|
151 | |||
152 | $ hg --cwd a ci -d '4 0' -m 'remove a file' |
|
152 | $ hg --cwd a ci -d '4 0' -m 'remove a file' | |
153 | $ hg --cwd a tip -q |
|
153 | $ hg --cwd a tip -q | |
154 | 4:87bbe3013fb6 |
|
154 | 4:87bbe3013fb6 | |
155 |
|
155 | |||
156 | $ hg convert -d svn a |
|
156 | $ hg convert -d svn a | |
157 | assuming destination a-hg |
|
157 | assuming destination a-hg | |
158 | initializing svn working copy 'a-hg-wc' |
|
158 | initializing svn working copy 'a-hg-wc' | |
159 | scanning source... |
|
159 | scanning source... | |
160 | sorting... |
|
160 | sorting... | |
161 | converting... |
|
161 | converting... | |
162 | 0 remove a file |
|
162 | 0 remove a file | |
163 | $ svnupanddisplay a-hg-wc 1 |
|
163 | $ svnupanddisplay a-hg-wc 1 | |
164 | 5 1 test d1 |
|
164 | 5 1 test d1 | |
165 | 5 1 test d1/d2 |
|
165 | 5 1 test d1/d2 (glob) | |
166 | 5 1 test d1/d2/b |
|
166 | 5 1 test d1/d2/b (glob) | |
167 | 5 4 test c |
|
167 | 5 4 test c | |
168 | 5 5 test . |
|
168 | 5 5 test . | |
169 | revision: 5 |
|
169 | revision: 5 | |
170 | author: test |
|
170 | author: test | |
171 | msg: remove a file |
|
171 | msg: remove a file | |
172 | D /b |
|
172 | D /b | |
173 | $ ls a a-hg-wc |
|
173 | $ ls a a-hg-wc | |
174 | a: |
|
174 | a: | |
175 | c |
|
175 | c | |
176 | d1 |
|
176 | d1 | |
177 |
|
177 | |||
178 | a-hg-wc: |
|
178 | a-hg-wc: | |
179 | c |
|
179 | c | |
180 | d1 |
|
180 | d1 | |
181 |
|
181 | |||
182 | Executable |
|
182 | Executable | |
183 |
|
183 | |||
184 | #if execbit |
|
184 | #if execbit | |
185 | $ chmod +x a/c |
|
185 | $ chmod +x a/c | |
186 | #else |
|
186 | #else | |
187 | $ echo fake >> a/c |
|
187 | $ echo fake >> a/c | |
188 | #endif |
|
188 | #endif | |
189 | $ hg --cwd a ci -d '5 0' -m 'make a file executable' |
|
189 | $ hg --cwd a ci -d '5 0' -m 'make a file executable' | |
190 | #if execbit |
|
190 | #if execbit | |
191 | $ hg --cwd a tip -q |
|
191 | $ hg --cwd a tip -q | |
192 | 5:ff42e473c340 |
|
192 | 5:ff42e473c340 | |
193 | #else |
|
193 | #else | |
194 | $ hg --cwd a tip -q |
|
194 | $ hg --cwd a tip -q | |
195 | 5:817a700c8cf1 |
|
195 | 5:817a700c8cf1 | |
196 | #endif |
|
196 | #endif | |
197 |
|
197 | |||
198 | $ hg convert -d svn a |
|
198 | $ hg convert -d svn a | |
199 | assuming destination a-hg |
|
199 | assuming destination a-hg | |
200 | initializing svn working copy 'a-hg-wc' |
|
200 | initializing svn working copy 'a-hg-wc' | |
201 | scanning source... |
|
201 | scanning source... | |
202 | sorting... |
|
202 | sorting... | |
203 | converting... |
|
203 | converting... | |
204 | 0 make a file executable |
|
204 | 0 make a file executable | |
205 | $ svnupanddisplay a-hg-wc 1 |
|
205 | $ svnupanddisplay a-hg-wc 1 | |
206 | 6 1 test d1 |
|
206 | 6 1 test d1 | |
207 | 6 1 test d1/d2 |
|
207 | 6 1 test d1/d2 (glob) | |
208 | 6 1 test d1/d2/b |
|
208 | 6 1 test d1/d2/b (glob) | |
209 | 6 6 test . |
|
209 | 6 6 test . | |
210 | 6 6 test c |
|
210 | 6 6 test c | |
211 | revision: 6 |
|
211 | revision: 6 | |
212 | author: test |
|
212 | author: test | |
213 | msg: make a file executable |
|
213 | msg: make a file executable | |
214 | M /c |
|
214 | M /c | |
215 | #if execbit |
|
215 | #if execbit | |
216 | $ test -x a-hg-wc/c |
|
216 | $ test -x a-hg-wc/c | |
217 | #endif |
|
217 | #endif | |
218 |
|
218 | |||
219 | #if symlink |
|
219 | #if symlink | |
220 |
|
220 | |||
221 | Symlinks |
|
221 | Symlinks | |
222 |
|
222 | |||
223 | $ ln -s a/missing a/link |
|
223 | $ ln -s a/missing a/link | |
224 | $ hg --cwd a commit -Am 'add symlink' |
|
224 | $ hg --cwd a commit -Am 'add symlink' | |
225 | adding link |
|
225 | adding link | |
226 | $ hg --cwd a mv link newlink |
|
226 | $ hg --cwd a mv link newlink | |
227 | $ hg --cwd a commit -m 'move symlink' |
|
227 | $ hg --cwd a commit -m 'move symlink' | |
228 | $ hg convert -d svn a |
|
228 | $ hg convert -d svn a | |
229 | assuming destination a-hg |
|
229 | assuming destination a-hg | |
230 | initializing svn working copy 'a-hg-wc' |
|
230 | initializing svn working copy 'a-hg-wc' | |
231 | scanning source... |
|
231 | scanning source... | |
232 | sorting... |
|
232 | sorting... | |
233 | converting... |
|
233 | converting... | |
234 | 1 add symlink |
|
234 | 1 add symlink | |
235 | 0 move symlink |
|
235 | 0 move symlink | |
236 | $ svnupanddisplay a-hg-wc 1 |
|
236 | $ svnupanddisplay a-hg-wc 1 | |
237 | 8 1 test d1 |
|
237 | 8 1 test d1 | |
238 | 8 1 test d1/d2 |
|
238 | 8 1 test d1/d2 | |
239 | 8 1 test d1/d2/b |
|
239 | 8 1 test d1/d2/b | |
240 | 8 6 test c |
|
240 | 8 6 test c | |
241 | 8 8 test . |
|
241 | 8 8 test . | |
242 | 8 8 test newlink |
|
242 | 8 8 test newlink | |
243 | revision: 8 |
|
243 | revision: 8 | |
244 | author: test |
|
244 | author: test | |
245 | msg: move symlink |
|
245 | msg: move symlink | |
246 | D /link |
|
246 | D /link | |
247 | A /newlink (from /link@7) |
|
247 | A /newlink (from /link@7) | |
248 |
|
248 | |||
249 | #endif |
|
249 | #endif | |
250 |
|
250 | |||
251 | $ rm -rf a a-hg a-hg-wc |
|
251 | $ rm -rf a a-hg a-hg-wc | |
252 |
|
252 | |||
253 |
|
253 | |||
254 | Executable in new directory |
|
254 | Executable in new directory | |
255 |
|
255 | |||
256 | $ hg init a |
|
256 | $ hg init a | |
257 |
|
257 | |||
258 | $ mkdir a/d1 |
|
258 | $ mkdir a/d1 | |
259 | $ echo a > a/d1/a |
|
259 | $ echo a > a/d1/a | |
260 | #if execbit |
|
260 | #if execbit | |
261 | $ chmod +x a/d1/a |
|
261 | $ chmod +x a/d1/a | |
262 | #else |
|
262 | #else | |
263 | $ echo fake >> a/d1/a |
|
263 | $ echo fake >> a/d1/a | |
264 | #endif |
|
264 | #endif | |
265 | $ hg --cwd a ci -d '0 0' -A -m 'add executable file in new directory' |
|
265 | $ hg --cwd a ci -d '0 0' -A -m 'add executable file in new directory' | |
266 | adding d1/a |
|
266 | adding d1/a | |
267 |
|
267 | |||
268 | $ hg convert -d svn a |
|
268 | $ hg convert -d svn a | |
269 | assuming destination a-hg |
|
269 | assuming destination a-hg | |
270 | initializing svn repository 'a-hg' |
|
270 | initializing svn repository 'a-hg' | |
271 | initializing svn working copy 'a-hg-wc' |
|
271 | initializing svn working copy 'a-hg-wc' | |
272 | scanning source... |
|
272 | scanning source... | |
273 | sorting... |
|
273 | sorting... | |
274 | converting... |
|
274 | converting... | |
275 | 0 add executable file in new directory |
|
275 | 0 add executable file in new directory | |
276 | $ svnupanddisplay a-hg-wc 1 |
|
276 | $ svnupanddisplay a-hg-wc 1 | |
277 | 1 1 test . |
|
277 | 1 1 test . | |
278 | 1 1 test d1 |
|
278 | 1 1 test d1 | |
279 | 1 1 test d1/a |
|
279 | 1 1 test d1/a (glob) | |
280 | revision: 1 |
|
280 | revision: 1 | |
281 | author: test |
|
281 | author: test | |
282 | msg: add executable file in new directory |
|
282 | msg: add executable file in new directory | |
283 | A /d1 |
|
283 | A /d1 | |
284 | A /d1/a |
|
284 | A /d1/a | |
285 | #if execbit |
|
285 | #if execbit | |
286 | $ test -x a-hg-wc/d1/a |
|
286 | $ test -x a-hg-wc/d1/a | |
287 | #endif |
|
287 | #endif | |
288 |
|
288 | |||
289 | Copy to new directory |
|
289 | Copy to new directory | |
290 |
|
290 | |||
291 | $ mkdir a/d2 |
|
291 | $ mkdir a/d2 | |
292 | $ hg --cwd a cp d1/a d2/a |
|
292 | $ hg --cwd a cp d1/a d2/a | |
293 | $ hg --cwd a ci -d '1 0' -A -m 'copy file to new directory' |
|
293 | $ hg --cwd a ci -d '1 0' -A -m 'copy file to new directory' | |
294 |
|
294 | |||
295 | $ hg convert -d svn a |
|
295 | $ hg convert -d svn a | |
296 | assuming destination a-hg |
|
296 | assuming destination a-hg | |
297 | initializing svn working copy 'a-hg-wc' |
|
297 | initializing svn working copy 'a-hg-wc' | |
298 | scanning source... |
|
298 | scanning source... | |
299 | sorting... |
|
299 | sorting... | |
300 | converting... |
|
300 | converting... | |
301 | 0 copy file to new directory |
|
301 | 0 copy file to new directory | |
302 | $ svnupanddisplay a-hg-wc 1 |
|
302 | $ svnupanddisplay a-hg-wc 1 | |
303 | 2 1 test d1 |
|
303 | 2 1 test d1 | |
304 | 2 1 test d1/a |
|
304 | 2 1 test d1/a (glob) | |
305 | 2 2 test . |
|
305 | 2 2 test . | |
306 | 2 2 test d2 |
|
306 | 2 2 test d2 | |
307 | 2 2 test d2/a |
|
307 | 2 2 test d2/a (glob) | |
308 | revision: 2 |
|
308 | revision: 2 | |
309 | author: test |
|
309 | author: test | |
310 | msg: copy file to new directory |
|
310 | msg: copy file to new directory | |
311 | A /d2 |
|
311 | A /d2 | |
312 | A /d2/a (from /d1/a@1) |
|
312 | A /d2/a (from /d1/a@1) | |
313 |
|
313 | |||
314 | Branchy history |
|
314 | Branchy history | |
315 |
|
315 | |||
316 | $ hg init b |
|
316 | $ hg init b | |
317 | $ echo base > b/b |
|
317 | $ echo base > b/b | |
318 | $ hg --cwd b ci -d '0 0' -Ambase |
|
318 | $ hg --cwd b ci -d '0 0' -Ambase | |
319 | adding b |
|
319 | adding b | |
320 |
|
320 | |||
321 | $ "$TESTDIR/svn-safe-append.py" left-1 b/b |
|
321 | $ "$TESTDIR/svn-safe-append.py" left-1 b/b | |
322 | $ echo left-1 > b/left-1 |
|
322 | $ echo left-1 > b/left-1 | |
323 | $ hg --cwd b ci -d '1 0' -Amleft-1 |
|
323 | $ hg --cwd b ci -d '1 0' -Amleft-1 | |
324 | adding left-1 |
|
324 | adding left-1 | |
325 |
|
325 | |||
326 | $ "$TESTDIR/svn-safe-append.py" left-2 b/b |
|
326 | $ "$TESTDIR/svn-safe-append.py" left-2 b/b | |
327 | $ echo left-2 > b/left-2 |
|
327 | $ echo left-2 > b/left-2 | |
328 | $ hg --cwd b ci -d '2 0' -Amleft-2 |
|
328 | $ hg --cwd b ci -d '2 0' -Amleft-2 | |
329 | adding left-2 |
|
329 | adding left-2 | |
330 |
|
330 | |||
331 | $ hg --cwd b up 0 |
|
331 | $ hg --cwd b up 0 | |
332 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
332 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
333 |
|
333 | |||
334 | $ "$TESTDIR/svn-safe-append.py" right-1 b/b |
|
334 | $ "$TESTDIR/svn-safe-append.py" right-1 b/b | |
335 | $ echo right-1 > b/right-1 |
|
335 | $ echo right-1 > b/right-1 | |
336 | $ hg --cwd b ci -d '3 0' -Amright-1 |
|
336 | $ hg --cwd b ci -d '3 0' -Amright-1 | |
337 | adding right-1 |
|
337 | adding right-1 | |
338 | created new head |
|
338 | created new head | |
339 |
|
339 | |||
340 | $ "$TESTDIR/svn-safe-append.py" right-2 b/b |
|
340 | $ "$TESTDIR/svn-safe-append.py" right-2 b/b | |
341 | $ echo right-2 > b/right-2 |
|
341 | $ echo right-2 > b/right-2 | |
342 | $ hg --cwd b ci -d '4 0' -Amright-2 |
|
342 | $ hg --cwd b ci -d '4 0' -Amright-2 | |
343 | adding right-2 |
|
343 | adding right-2 | |
344 |
|
344 | |||
345 | $ hg --cwd b up -C 2 |
|
345 | $ hg --cwd b up -C 2 | |
346 | 3 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
346 | 3 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
347 | $ hg --cwd b merge |
|
347 | $ hg --cwd b merge | |
348 | merging b |
|
348 | merging b | |
349 | warning: conflicts during merge. |
|
349 | warning: conflicts during merge. | |
350 | merging b incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
350 | merging b incomplete! (edit conflicts, then use 'hg resolve --mark') | |
351 | 2 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
351 | 2 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
352 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
352 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
353 | [1] |
|
353 | [1] | |
354 | $ hg --cwd b revert -r 2 b |
|
354 | $ hg --cwd b revert -r 2 b | |
355 | $ hg --cwd b resolve -m b |
|
355 | $ hg --cwd b resolve -m b | |
356 | $ hg --cwd b ci -d '5 0' -m 'merge' |
|
356 | $ hg --cwd b ci -d '5 0' -m 'merge' | |
357 |
|
357 | |||
358 | Expect 4 changes |
|
358 | Expect 4 changes | |
359 |
|
359 | |||
360 | $ hg convert -d svn b |
|
360 | $ hg convert -d svn b | |
361 | assuming destination b-hg |
|
361 | assuming destination b-hg | |
362 | initializing svn repository 'b-hg' |
|
362 | initializing svn repository 'b-hg' | |
363 | initializing svn working copy 'b-hg-wc' |
|
363 | initializing svn working copy 'b-hg-wc' | |
364 | scanning source... |
|
364 | scanning source... | |
365 | sorting... |
|
365 | sorting... | |
366 | converting... |
|
366 | converting... | |
367 | 5 base |
|
367 | 5 base | |
368 | 4 left-1 |
|
368 | 4 left-1 | |
369 | 3 left-2 |
|
369 | 3 left-2 | |
370 | 2 right-1 |
|
370 | 2 right-1 | |
371 | 1 right-2 |
|
371 | 1 right-2 | |
372 | 0 merge |
|
372 | 0 merge | |
373 |
|
373 | |||
374 | $ svnupanddisplay b-hg-wc 0 |
|
374 | $ svnupanddisplay b-hg-wc 0 | |
375 | 4 2 test left-1 |
|
375 | 4 2 test left-1 | |
376 | 4 3 test b |
|
376 | 4 3 test b | |
377 | 4 3 test left-2 |
|
377 | 4 3 test left-2 | |
378 | 4 4 test . |
|
378 | 4 4 test . | |
379 | 4 4 test right-1 |
|
379 | 4 4 test right-1 | |
380 | 4 4 test right-2 |
|
380 | 4 4 test right-2 | |
381 | revision: 4 |
|
381 | revision: 4 | |
382 | author: test |
|
382 | author: test | |
383 | msg: merge |
|
383 | msg: merge | |
384 | A /right-1 |
|
384 | A /right-1 | |
385 | A /right-2 |
|
385 | A /right-2 | |
386 | revision: 3 |
|
386 | revision: 3 | |
387 | author: test |
|
387 | author: test | |
388 | msg: left-2 |
|
388 | msg: left-2 | |
389 | M /b |
|
389 | M /b | |
390 | A /left-2 |
|
390 | A /left-2 | |
391 | revision: 2 |
|
391 | revision: 2 | |
392 | author: test |
|
392 | author: test | |
393 | msg: left-1 |
|
393 | msg: left-1 | |
394 | M /b |
|
394 | M /b | |
395 | A /left-1 |
|
395 | A /left-1 | |
396 | revision: 1 |
|
396 | revision: 1 | |
397 | author: test |
|
397 | author: test | |
398 | msg: base |
|
398 | msg: base | |
399 | A /b |
|
399 | A /b | |
400 |
|
400 | |||
401 | Tags are not supported, but must not break conversion |
|
401 | Tags are not supported, but must not break conversion | |
402 |
|
402 | |||
403 | $ rm -rf a a-hg a-hg-wc |
|
403 | $ rm -rf a a-hg a-hg-wc | |
404 | $ hg init a |
|
404 | $ hg init a | |
405 | $ echo a > a/a |
|
405 | $ echo a > a/a | |
406 | $ hg --cwd a ci -d '0 0' -A -m 'Add file a' |
|
406 | $ hg --cwd a ci -d '0 0' -A -m 'Add file a' | |
407 | adding a |
|
407 | adding a | |
408 | $ hg --cwd a tag -d '1 0' -m 'Tagged as v1.0' v1.0 |
|
408 | $ hg --cwd a tag -d '1 0' -m 'Tagged as v1.0' v1.0 | |
409 |
|
409 | |||
410 | $ hg convert -d svn a |
|
410 | $ hg convert -d svn a | |
411 | assuming destination a-hg |
|
411 | assuming destination a-hg | |
412 | initializing svn repository 'a-hg' |
|
412 | initializing svn repository 'a-hg' | |
413 | initializing svn working copy 'a-hg-wc' |
|
413 | initializing svn working copy 'a-hg-wc' | |
414 | scanning source... |
|
414 | scanning source... | |
415 | sorting... |
|
415 | sorting... | |
416 | converting... |
|
416 | converting... | |
417 | 1 Add file a |
|
417 | 1 Add file a | |
418 | 0 Tagged as v1.0 |
|
418 | 0 Tagged as v1.0 | |
419 | writing Subversion tags is not yet implemented |
|
419 | writing Subversion tags is not yet implemented | |
420 | $ svnupanddisplay a-hg-wc 2 |
|
420 | $ svnupanddisplay a-hg-wc 2 | |
421 | 2 1 test a |
|
421 | 2 1 test a | |
422 | 2 2 test . |
|
422 | 2 2 test . | |
423 | 2 2 test .hgtags |
|
423 | 2 2 test .hgtags | |
424 | revision: 2 |
|
424 | revision: 2 | |
425 | author: test |
|
425 | author: test | |
426 | msg: Tagged as v1.0 |
|
426 | msg: Tagged as v1.0 | |
427 | A /.hgtags |
|
427 | A /.hgtags | |
428 | revision: 1 |
|
428 | revision: 1 | |
429 | author: test |
|
429 | author: test | |
430 | msg: Add file a |
|
430 | msg: Add file a | |
431 | A /a |
|
431 | A /a | |
432 | $ rm -rf a a-hg a-hg-wc |
|
432 | $ rm -rf a a-hg a-hg-wc |
@@ -1,203 +1,203 b'' | |||||
1 |
|
1 | |||
2 | $ "$TESTDIR/hghave" svn svn-bindings || exit 80 |
|
2 | $ "$TESTDIR/hghave" svn svn-bindings || exit 80 | |
3 |
|
3 | |||
4 | $ cat >> $HGRCPATH <<EOF |
|
4 | $ cat >> $HGRCPATH <<EOF | |
5 | > [extensions] |
|
5 | > [extensions] | |
6 | > convert = |
|
6 | > convert = | |
7 | > graphlog = |
|
7 | > graphlog = | |
8 | > [convert] |
|
8 | > [convert] | |
9 | > svn.trunk = mytrunk |
|
9 | > svn.trunk = mytrunk | |
10 | > EOF |
|
10 | > EOF | |
11 |
|
11 | |||
12 | $ svnadmin create svn-repo |
|
12 | $ svnadmin create svn-repo | |
13 | $ SVNREPOPATH=`pwd`/svn-repo |
|
13 | $ SVNREPOPATH=`pwd`/svn-repo | |
14 | #if windows |
|
14 | #if windows | |
15 | $ SVNREPOURL=file:///`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"` |
|
15 | $ SVNREPOURL=file:///`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"` | |
16 | #else |
|
16 | #else | |
17 | $ SVNREPOURL=file://`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"` |
|
17 | $ SVNREPOURL=file://`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"` | |
18 | #endif |
|
18 | #endif | |
19 |
|
19 | |||
20 | Now test that it works with trunk/tags layout, but no branches yet. |
|
20 | Now test that it works with trunk/tags layout, but no branches yet. | |
21 |
|
21 | |||
22 | Initial svn import |
|
22 | Initial svn import | |
23 |
|
23 | |||
24 | $ mkdir projB |
|
24 | $ mkdir projB | |
25 | $ cd projB |
|
25 | $ cd projB | |
26 | $ mkdir mytrunk |
|
26 | $ mkdir mytrunk | |
27 | $ mkdir tags |
|
27 | $ mkdir tags | |
28 | $ cd .. |
|
28 | $ cd .. | |
29 |
|
29 | |||
30 | $ svn import -m "init projB" projB "$SVNREPOURL/proj%20B" | sort |
|
30 | $ svn import -m "init projB" projB "$SVNREPOURL/proj%20B" | sort | |
31 |
|
31 | |||
32 | Adding projB/mytrunk |
|
32 | Adding projB/mytrunk (glob) | |
33 | Adding projB/tags |
|
33 | Adding projB/tags (glob) | |
34 | Committed revision 1. |
|
34 | Committed revision 1. | |
35 |
|
35 | |||
36 | Update svn repository |
|
36 | Update svn repository | |
37 |
|
37 | |||
38 | $ svn co "$SVNREPOURL/proj%20B/mytrunk" B |
|
38 | $ svn co "$SVNREPOURL/proj%20B/mytrunk" B | |
39 | Checked out revision 1. |
|
39 | Checked out revision 1. | |
40 | $ cd B |
|
40 | $ cd B | |
41 | $ echo hello > 'letter .txt' |
|
41 | $ echo hello > 'letter .txt' | |
42 | $ svn add 'letter .txt' |
|
42 | $ svn add 'letter .txt' | |
43 | A letter .txt |
|
43 | A letter .txt | |
44 | $ svn ci -m hello |
|
44 | $ svn ci -m hello | |
45 | Adding letter .txt |
|
45 | Adding letter .txt | |
46 | Transmitting file data . |
|
46 | Transmitting file data . | |
47 | Committed revision 2. |
|
47 | Committed revision 2. | |
48 |
|
48 | |||
49 | $ "$TESTDIR/svn-safe-append.py" world 'letter .txt' |
|
49 | $ "$TESTDIR/svn-safe-append.py" world 'letter .txt' | |
50 | $ svn ci -m world |
|
50 | $ svn ci -m world | |
51 | Sending letter .txt |
|
51 | Sending letter .txt | |
52 | Transmitting file data . |
|
52 | Transmitting file data . | |
53 | Committed revision 3. |
|
53 | Committed revision 3. | |
54 |
|
54 | |||
55 | $ svn copy -m "tag v0.1" "$SVNREPOURL/proj%20B/mytrunk" "$SVNREPOURL/proj%20B/tags/v0.1" |
|
55 | $ svn copy -m "tag v0.1" "$SVNREPOURL/proj%20B/mytrunk" "$SVNREPOURL/proj%20B/tags/v0.1" | |
56 |
|
56 | |||
57 | Committed revision 4. |
|
57 | Committed revision 4. | |
58 |
|
58 | |||
59 | $ "$TESTDIR/svn-safe-append.py" 'nice day today!' 'letter .txt' |
|
59 | $ "$TESTDIR/svn-safe-append.py" 'nice day today!' 'letter .txt' | |
60 | $ svn ci -m "nice day" |
|
60 | $ svn ci -m "nice day" | |
61 | Sending letter .txt |
|
61 | Sending letter .txt | |
62 | Transmitting file data . |
|
62 | Transmitting file data . | |
63 | Committed revision 5. |
|
63 | Committed revision 5. | |
64 | $ cd .. |
|
64 | $ cd .. | |
65 |
|
65 | |||
66 | Convert to hg once |
|
66 | Convert to hg once | |
67 |
|
67 | |||
68 | $ hg convert "$SVNREPOURL/proj%20B" B-hg |
|
68 | $ hg convert "$SVNREPOURL/proj%20B" B-hg | |
69 | initializing destination B-hg repository |
|
69 | initializing destination B-hg repository | |
70 | scanning source... |
|
70 | scanning source... | |
71 | sorting... |
|
71 | sorting... | |
72 | converting... |
|
72 | converting... | |
73 | 3 init projB |
|
73 | 3 init projB | |
74 | 2 hello |
|
74 | 2 hello | |
75 | 1 world |
|
75 | 1 world | |
76 | 0 nice day |
|
76 | 0 nice day | |
77 | updating tags |
|
77 | updating tags | |
78 |
|
78 | |||
79 | Update svn repository again |
|
79 | Update svn repository again | |
80 |
|
80 | |||
81 | $ cd B |
|
81 | $ cd B | |
82 | $ "$TESTDIR/svn-safe-append.py" "see second letter" 'letter .txt' |
|
82 | $ "$TESTDIR/svn-safe-append.py" "see second letter" 'letter .txt' | |
83 | $ echo "nice to meet you" > letter2.txt |
|
83 | $ echo "nice to meet you" > letter2.txt | |
84 | $ svn add letter2.txt |
|
84 | $ svn add letter2.txt | |
85 | A letter2.txt |
|
85 | A letter2.txt | |
86 | $ svn ci -m "second letter" |
|
86 | $ svn ci -m "second letter" | |
87 | Sending letter .txt |
|
87 | Sending letter .txt | |
88 | Adding letter2.txt |
|
88 | Adding letter2.txt | |
89 | Transmitting file data .. |
|
89 | Transmitting file data .. | |
90 | Committed revision 6. |
|
90 | Committed revision 6. | |
91 |
|
91 | |||
92 | $ svn copy -m "tag v0.2" "$SVNREPOURL/proj%20B/mytrunk" "$SVNREPOURL/proj%20B/tags/v0.2" |
|
92 | $ svn copy -m "tag v0.2" "$SVNREPOURL/proj%20B/mytrunk" "$SVNREPOURL/proj%20B/tags/v0.2" | |
93 |
|
93 | |||
94 | Committed revision 7. |
|
94 | Committed revision 7. | |
95 |
|
95 | |||
96 | $ "$TESTDIR/svn-safe-append.py" "blah-blah-blah" letter2.txt |
|
96 | $ "$TESTDIR/svn-safe-append.py" "blah-blah-blah" letter2.txt | |
97 | $ svn ci -m "work in progress" |
|
97 | $ svn ci -m "work in progress" | |
98 | Sending letter2.txt |
|
98 | Sending letter2.txt | |
99 | Transmitting file data . |
|
99 | Transmitting file data . | |
100 | Committed revision 8. |
|
100 | Committed revision 8. | |
101 | $ cd .. |
|
101 | $ cd .. | |
102 |
|
102 | |||
103 | $ hg convert -s svn "$SVNREPOURL/proj%20B/non-existent-path" dest |
|
103 | $ hg convert -s svn "$SVNREPOURL/proj%20B/non-existent-path" dest | |
104 | initializing destination dest repository |
|
104 | initializing destination dest repository | |
105 | abort: no revision found in module /proj B/non-existent-path |
|
105 | abort: no revision found in module /proj B/non-existent-path | |
106 | [255] |
|
106 | [255] | |
107 |
|
107 | |||
108 | ######################################## |
|
108 | ######################################## | |
109 |
|
109 | |||
110 | Test incremental conversion |
|
110 | Test incremental conversion | |
111 |
|
111 | |||
112 | $ hg convert "$SVNREPOURL/proj%20B" B-hg |
|
112 | $ hg convert "$SVNREPOURL/proj%20B" B-hg | |
113 | scanning source... |
|
113 | scanning source... | |
114 | sorting... |
|
114 | sorting... | |
115 | converting... |
|
115 | converting... | |
116 | 1 second letter |
|
116 | 1 second letter | |
117 | 0 work in progress |
|
117 | 0 work in progress | |
118 | updating tags |
|
118 | updating tags | |
119 |
|
119 | |||
120 | $ cd B-hg |
|
120 | $ cd B-hg | |
121 | $ hg glog --template '{rev} {desc|firstline} files: {files}\n' |
|
121 | $ hg glog --template '{rev} {desc|firstline} files: {files}\n' | |
122 | o 7 update tags files: .hgtags |
|
122 | o 7 update tags files: .hgtags | |
123 | | |
|
123 | | | |
124 | o 6 work in progress files: letter2.txt |
|
124 | o 6 work in progress files: letter2.txt | |
125 | | |
|
125 | | | |
126 | o 5 second letter files: letter .txt letter2.txt |
|
126 | o 5 second letter files: letter .txt letter2.txt | |
127 | | |
|
127 | | | |
128 | o 4 update tags files: .hgtags |
|
128 | o 4 update tags files: .hgtags | |
129 | | |
|
129 | | | |
130 | o 3 nice day files: letter .txt |
|
130 | o 3 nice day files: letter .txt | |
131 | | |
|
131 | | | |
132 | o 2 world files: letter .txt |
|
132 | o 2 world files: letter .txt | |
133 | | |
|
133 | | | |
134 | o 1 hello files: letter .txt |
|
134 | o 1 hello files: letter .txt | |
135 | | |
|
135 | | | |
136 | o 0 init projB files: |
|
136 | o 0 init projB files: | |
137 |
|
137 | |||
138 | $ hg tags -q |
|
138 | $ hg tags -q | |
139 | tip |
|
139 | tip | |
140 | v0.2 |
|
140 | v0.2 | |
141 | v0.1 |
|
141 | v0.1 | |
142 | $ cd .. |
|
142 | $ cd .. | |
143 |
|
143 | |||
144 | Test filemap |
|
144 | Test filemap | |
145 | $ echo 'include letter2.txt' > filemap |
|
145 | $ echo 'include letter2.txt' > filemap | |
146 | $ hg convert --filemap filemap "$SVNREPOURL/proj%20B/mytrunk" fmap |
|
146 | $ hg convert --filemap filemap "$SVNREPOURL/proj%20B/mytrunk" fmap | |
147 | initializing destination fmap repository |
|
147 | initializing destination fmap repository | |
148 | scanning source... |
|
148 | scanning source... | |
149 | sorting... |
|
149 | sorting... | |
150 | converting... |
|
150 | converting... | |
151 | 5 init projB |
|
151 | 5 init projB | |
152 | 4 hello |
|
152 | 4 hello | |
153 | 3 world |
|
153 | 3 world | |
154 | 2 nice day |
|
154 | 2 nice day | |
155 | 1 second letter |
|
155 | 1 second letter | |
156 | 0 work in progress |
|
156 | 0 work in progress | |
157 | $ hg -R fmap branch -q |
|
157 | $ hg -R fmap branch -q | |
158 | default |
|
158 | default | |
159 | $ hg glog -R fmap --template '{rev} {desc|firstline} files: {files}\n' |
|
159 | $ hg glog -R fmap --template '{rev} {desc|firstline} files: {files}\n' | |
160 | o 1 work in progress files: letter2.txt |
|
160 | o 1 work in progress files: letter2.txt | |
161 | | |
|
161 | | | |
162 | o 0 second letter files: letter2.txt |
|
162 | o 0 second letter files: letter2.txt | |
163 |
|
163 | |||
164 |
|
164 | |||
165 | Test stop revision |
|
165 | Test stop revision | |
166 | $ hg convert --rev 1 "$SVNREPOURL/proj%20B/mytrunk" stoprev |
|
166 | $ hg convert --rev 1 "$SVNREPOURL/proj%20B/mytrunk" stoprev | |
167 | initializing destination stoprev repository |
|
167 | initializing destination stoprev repository | |
168 | scanning source... |
|
168 | scanning source... | |
169 | sorting... |
|
169 | sorting... | |
170 | converting... |
|
170 | converting... | |
171 | 0 init projB |
|
171 | 0 init projB | |
172 | $ hg -R stoprev branch -q |
|
172 | $ hg -R stoprev branch -q | |
173 | default |
|
173 | default | |
174 |
|
174 | |||
175 | Check convert_revision extra-records. |
|
175 | Check convert_revision extra-records. | |
176 | This is also the only place testing more than one extra field in a revision. |
|
176 | This is also the only place testing more than one extra field in a revision. | |
177 |
|
177 | |||
178 | $ cd stoprev |
|
178 | $ cd stoprev | |
179 | $ hg tip --debug | grep extra |
|
179 | $ hg tip --debug | grep extra | |
180 | extra: branch=default |
|
180 | extra: branch=default | |
181 | extra: convert_revision=svn:........-....-....-....-............/proj B/mytrunk@1 (re) |
|
181 | extra: convert_revision=svn:........-....-....-....-............/proj B/mytrunk@1 (re) | |
182 | $ cd .. |
|
182 | $ cd .. | |
183 |
|
183 | |||
184 | Test converting empty heads (issue3347) |
|
184 | Test converting empty heads (issue3347) | |
185 |
|
185 | |||
186 | $ svnadmin create svn-empty |
|
186 | $ svnadmin create svn-empty | |
187 | $ svnadmin load -q svn-empty < "$TESTDIR/svn/empty.svndump" |
|
187 | $ svnadmin load -q svn-empty < "$TESTDIR/svn/empty.svndump" | |
188 | $ hg --config convert.svn.trunk= convert svn-empty |
|
188 | $ hg --config convert.svn.trunk= convert svn-empty | |
189 | assuming destination svn-empty-hg |
|
189 | assuming destination svn-empty-hg | |
190 | initializing destination svn-empty-hg repository |
|
190 | initializing destination svn-empty-hg repository | |
191 | scanning source... |
|
191 | scanning source... | |
192 | sorting... |
|
192 | sorting... | |
193 | converting... |
|
193 | converting... | |
194 | 1 init projA |
|
194 | 1 init projA | |
195 | 0 adddir |
|
195 | 0 adddir | |
196 | $ hg --config convert.svn.trunk= convert "$SVNREPOURL/../svn-empty/trunk" |
|
196 | $ hg --config convert.svn.trunk= convert "$SVNREPOURL/../svn-empty/trunk" | |
197 | assuming destination trunk-hg |
|
197 | assuming destination trunk-hg | |
198 | initializing destination trunk-hg repository |
|
198 | initializing destination trunk-hg repository | |
199 | scanning source... |
|
199 | scanning source... | |
200 | sorting... |
|
200 | sorting... | |
201 | converting... |
|
201 | converting... | |
202 | 1 init projA |
|
202 | 1 init projA | |
203 | 0 adddir |
|
203 | 0 adddir |
General Comments 0
You need to be logged in to leave comments.
Login now