Show More
@@ -1,457 +1,469 | |||||
1 | #require svn13 |
|
1 | #require svn13 | |
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 | > EOF |
|
20 | > EOF | |
21 |
|
21 | |||
22 | $ hg init a |
|
22 | $ hg init a | |
23 |
|
23 | |||
24 | Add |
|
24 | Add | |
25 |
|
25 | |||
26 | $ echo a > a/a |
|
26 | $ echo a > a/a | |
27 | $ mkdir -p a/d1/d2 |
|
27 | $ mkdir -p a/d1/d2 | |
28 | $ echo b > a/d1/d2/b |
|
28 | $ echo b > a/d1/d2/b | |
29 | $ hg --cwd a ci -d '0 0' -A -m 'add a file' |
|
29 | $ hg --cwd a ci -d '0 0' -A -m 'add a file' | |
30 | adding a |
|
30 | adding a | |
31 | adding d1/d2/b |
|
31 | adding d1/d2/b | |
32 |
|
32 | |||
33 | Modify |
|
33 | Modify | |
34 |
|
34 | |||
35 | $ "$TESTDIR/svn-safe-append.py" a a/a |
|
35 | $ "$TESTDIR/svn-safe-append.py" a a/a | |
36 | $ hg --cwd a ci -d '1 0' -m 'modify a file' |
|
36 | $ hg --cwd a ci -d '1 0' -m 'modify a file' | |
37 | $ hg --cwd a tip -q |
|
37 | $ hg --cwd a tip -q | |
38 | 1:e0e2b8a9156b |
|
38 | 1:e0e2b8a9156b | |
39 |
|
39 | |||
40 | $ hg convert -d svn a |
|
40 | $ hg convert -d svn a | |
41 | assuming destination a-hg |
|
41 | assuming destination a-hg | |
42 | initializing svn repository 'a-hg' |
|
42 | initializing svn repository 'a-hg' | |
43 | initializing svn working copy 'a-hg-wc' |
|
43 | initializing svn working copy 'a-hg-wc' | |
44 | scanning source... |
|
44 | scanning source... | |
45 | sorting... |
|
45 | sorting... | |
46 | converting... |
|
46 | converting... | |
47 | 1 add a file |
|
47 | 1 add a file | |
48 | 0 modify a file |
|
48 | 0 modify a file | |
49 | $ svnupanddisplay a-hg-wc 2 |
|
49 | $ svnupanddisplay a-hg-wc 2 | |
50 | 2 1 test d1 |
|
50 | 2 1 test d1 | |
51 | 2 1 test d1/d2 (glob) |
|
51 | 2 1 test d1/d2 (glob) | |
52 | 2 1 test d1/d2/b (glob) |
|
52 | 2 1 test d1/d2/b (glob) | |
53 | 2 2 test . |
|
53 | 2 2 test . | |
54 | 2 2 test a |
|
54 | 2 2 test a | |
55 | revision: 2 |
|
55 | revision: 2 | |
56 | author: test |
|
56 | author: test | |
57 | msg: modify a file |
|
57 | msg: modify a file | |
58 | M /a |
|
58 | M /a | |
59 | revision: 1 |
|
59 | revision: 1 | |
60 | author: test |
|
60 | author: test | |
61 | msg: add a file |
|
61 | msg: add a file | |
62 | A /a |
|
62 | A /a | |
63 | A /d1 |
|
63 | A /d1 | |
64 | A /d1/d2 |
|
64 | A /d1/d2 | |
65 | A /d1/d2/b |
|
65 | A /d1/d2/b | |
66 | $ ls a a-hg-wc |
|
66 | $ ls a a-hg-wc | |
67 | a: |
|
67 | a: | |
68 | a |
|
68 | a | |
69 | d1 |
|
69 | d1 | |
70 |
|
70 | |||
71 | a-hg-wc: |
|
71 | a-hg-wc: | |
72 | a |
|
72 | a | |
73 | d1 |
|
73 | d1 | |
74 | $ cmp a/a a-hg-wc/a |
|
74 | $ cmp a/a a-hg-wc/a | |
75 |
|
75 | |||
76 | Rename |
|
76 | Rename | |
77 |
|
77 | |||
78 | $ hg --cwd a mv a b |
|
78 | $ hg --cwd a mv a b | |
79 | $ hg --cwd a ci -d '2 0' -m 'rename a file' |
|
79 | $ hg --cwd a ci -d '2 0' -m 'rename a file' | |
80 | $ hg --cwd a tip -q |
|
80 | $ hg --cwd a tip -q | |
81 | 2:eb5169441d43 |
|
81 | 2:eb5169441d43 | |
82 |
|
82 | |||
83 | $ hg convert -d svn a |
|
83 | $ hg convert -d svn a | |
84 | assuming destination a-hg |
|
84 | assuming destination a-hg | |
85 | initializing svn working copy 'a-hg-wc' |
|
85 | initializing svn working copy 'a-hg-wc' | |
86 | scanning source... |
|
86 | scanning source... | |
87 | sorting... |
|
87 | sorting... | |
88 | converting... |
|
88 | converting... | |
89 | 0 rename a file |
|
89 | 0 rename a file | |
90 | $ svnupanddisplay a-hg-wc 1 |
|
90 | $ svnupanddisplay a-hg-wc 1 | |
91 | 3 1 test d1 |
|
91 | 3 1 test d1 | |
92 | 3 1 test d1/d2 (glob) |
|
92 | 3 1 test d1/d2 (glob) | |
93 | 3 1 test d1/d2/b (glob) |
|
93 | 3 1 test d1/d2/b (glob) | |
94 | 3 3 test . |
|
94 | 3 3 test . | |
95 | 3 3 test b |
|
95 | 3 3 test b | |
96 | revision: 3 |
|
96 | revision: 3 | |
97 | author: test |
|
97 | author: test | |
98 | msg: rename a file |
|
98 | msg: rename a file | |
99 | D /a |
|
99 | D /a | |
100 | A /b (from /a@2) |
|
100 | A /b (from /a@2) | |
101 | $ ls a a-hg-wc |
|
101 | $ ls a a-hg-wc | |
102 | a: |
|
102 | a: | |
103 | b |
|
103 | b | |
104 | d1 |
|
104 | d1 | |
105 |
|
105 | |||
106 | a-hg-wc: |
|
106 | a-hg-wc: | |
107 | b |
|
107 | b | |
108 | d1 |
|
108 | d1 | |
109 |
|
109 | |||
110 | Copy |
|
110 | Copy | |
111 |
|
111 | |||
112 | $ hg --cwd a cp b c |
|
112 | $ hg --cwd a cp b c | |
113 |
|
113 | |||
114 | $ hg --cwd a ci -d '3 0' -m 'copy a file' |
|
114 | $ hg --cwd a ci -d '3 0' -m 'copy a file' | |
115 | $ hg --cwd a tip -q |
|
115 | $ hg --cwd a tip -q | |
116 | 3:60effef6ab48 |
|
116 | 3:60effef6ab48 | |
117 |
|
117 | |||
118 | $ hg convert -d svn a |
|
118 | $ hg convert -d svn a | |
119 | assuming destination a-hg |
|
119 | assuming destination a-hg | |
120 | initializing svn working copy 'a-hg-wc' |
|
120 | initializing svn working copy 'a-hg-wc' | |
121 | scanning source... |
|
121 | scanning source... | |
122 | sorting... |
|
122 | sorting... | |
123 | converting... |
|
123 | converting... | |
124 | 0 copy a file |
|
124 | 0 copy a file | |
125 | $ svnupanddisplay a-hg-wc 1 |
|
125 | $ svnupanddisplay a-hg-wc 1 | |
126 | 4 1 test d1 |
|
126 | 4 1 test d1 | |
127 | 4 1 test d1/d2 (glob) |
|
127 | 4 1 test d1/d2 (glob) | |
128 | 4 1 test d1/d2/b (glob) |
|
128 | 4 1 test d1/d2/b (glob) | |
129 | 4 3 test b |
|
129 | 4 3 test b | |
130 | 4 4 test . |
|
130 | 4 4 test . | |
131 | 4 4 test c |
|
131 | 4 4 test c | |
132 | revision: 4 |
|
132 | revision: 4 | |
133 | author: test |
|
133 | author: test | |
134 | msg: copy a file |
|
134 | msg: copy a file | |
135 | A /c (from /b@3) |
|
135 | A /c (from /b@3) | |
136 | $ ls a a-hg-wc |
|
136 | $ ls a a-hg-wc | |
137 | a: |
|
137 | a: | |
138 | b |
|
138 | b | |
139 | c |
|
139 | c | |
140 | d1 |
|
140 | d1 | |
141 |
|
141 | |||
142 | a-hg-wc: |
|
142 | a-hg-wc: | |
143 | b |
|
143 | b | |
144 | c |
|
144 | c | |
145 | d1 |
|
145 | d1 | |
146 |
|
146 | |||
147 | $ hg --cwd a rm b |
|
147 | $ hg --cwd a rm b | |
148 |
|
148 | |||
149 | Remove |
|
149 | Remove | |
150 |
|
150 | |||
151 | $ hg --cwd a ci -d '4 0' -m 'remove a file' |
|
151 | $ hg --cwd a ci -d '4 0' -m 'remove a file' | |
152 | $ hg --cwd a tip -q |
|
152 | $ hg --cwd a tip -q | |
153 | 4:87bbe3013fb6 |
|
153 | 4:87bbe3013fb6 | |
154 |
|
154 | |||
155 | $ hg convert -d svn a |
|
155 | $ hg convert -d svn a | |
156 | assuming destination a-hg |
|
156 | assuming destination a-hg | |
157 | initializing svn working copy 'a-hg-wc' |
|
157 | initializing svn working copy 'a-hg-wc' | |
158 | scanning source... |
|
158 | scanning source... | |
159 | sorting... |
|
159 | sorting... | |
160 | converting... |
|
160 | converting... | |
161 | 0 remove a file |
|
161 | 0 remove a file | |
162 | $ svnupanddisplay a-hg-wc 1 |
|
162 | $ svnupanddisplay a-hg-wc 1 | |
163 | 5 1 test d1 |
|
163 | 5 1 test d1 | |
164 | 5 1 test d1/d2 (glob) |
|
164 | 5 1 test d1/d2 (glob) | |
165 | 5 1 test d1/d2/b (glob) |
|
165 | 5 1 test d1/d2/b (glob) | |
166 | 5 4 test c |
|
166 | 5 4 test c | |
167 | 5 5 test . |
|
167 | 5 5 test . | |
168 | revision: 5 |
|
168 | revision: 5 | |
169 | author: test |
|
169 | author: test | |
170 | msg: remove a file |
|
170 | msg: remove a file | |
171 | D /b |
|
171 | D /b | |
172 | $ ls a a-hg-wc |
|
172 | $ ls a a-hg-wc | |
173 | a: |
|
173 | a: | |
174 | c |
|
174 | c | |
175 | d1 |
|
175 | d1 | |
176 |
|
176 | |||
177 | a-hg-wc: |
|
177 | a-hg-wc: | |
178 | c |
|
178 | c | |
179 | d1 |
|
179 | d1 | |
180 |
|
180 | |||
181 | Executable |
|
181 | Executable | |
182 |
|
182 | |||
183 | #if execbit |
|
183 | #if execbit | |
184 | $ chmod +x a/c |
|
184 | $ chmod +x a/c | |
185 | #else |
|
185 | #else | |
186 | $ echo fake >> a/c |
|
186 | $ echo fake >> a/c | |
187 | #endif |
|
187 | #endif | |
188 | $ hg --cwd a ci -d '5 0' -m 'make a file executable' |
|
188 | $ hg --cwd a ci -d '5 0' -m 'make a file executable' | |
189 | #if execbit |
|
189 | #if execbit | |
190 | $ hg --cwd a tip -q |
|
190 | $ hg --cwd a tip -q | |
191 | 5:ff42e473c340 |
|
191 | 5:ff42e473c340 | |
192 | #else |
|
192 | #else | |
193 | $ hg --cwd a tip -q |
|
193 | $ hg --cwd a tip -q | |
194 | 5:817a700c8cf1 |
|
194 | 5:817a700c8cf1 | |
195 | #endif |
|
195 | #endif | |
196 |
|
196 | |||
197 | $ hg convert -d svn a |
|
197 | $ hg convert -d svn a | |
198 | assuming destination a-hg |
|
198 | assuming destination a-hg | |
199 | initializing svn working copy 'a-hg-wc' |
|
199 | initializing svn working copy 'a-hg-wc' | |
200 | scanning source... |
|
200 | scanning source... | |
201 | sorting... |
|
201 | sorting... | |
202 | converting... |
|
202 | converting... | |
203 | 0 make a file executable |
|
203 | 0 make a file executable | |
204 | $ svnupanddisplay a-hg-wc 1 |
|
204 | $ svnupanddisplay a-hg-wc 1 | |
205 | 6 1 test d1 |
|
205 | 6 1 test d1 | |
206 | 6 1 test d1/d2 (glob) |
|
206 | 6 1 test d1/d2 (glob) | |
207 | 6 1 test d1/d2/b (glob) |
|
207 | 6 1 test d1/d2/b (glob) | |
208 | 6 6 test . |
|
208 | 6 6 test . | |
209 | 6 6 test c |
|
209 | 6 6 test c | |
210 | revision: 6 |
|
210 | revision: 6 | |
211 | author: test |
|
211 | author: test | |
212 | msg: make a file executable |
|
212 | msg: make a file executable | |
213 | M /c |
|
213 | M /c | |
214 | #if execbit |
|
214 | #if execbit | |
215 | $ test -x a-hg-wc/c |
|
215 | $ test -x a-hg-wc/c | |
216 | #endif |
|
216 | #endif | |
217 |
|
217 | |||
218 | #if symlink |
|
218 | #if symlink | |
219 |
|
219 | |||
220 | Symlinks |
|
220 | Symlinks | |
221 |
|
221 | |||
222 | $ ln -s a/missing a/link |
|
222 | $ ln -s a/missing a/link | |
223 | $ hg --cwd a commit -Am 'add symlink' |
|
223 | $ hg --cwd a commit -Am 'add symlink' | |
224 | adding link |
|
224 | adding link | |
225 | $ hg --cwd a mv link newlink |
|
225 | $ hg --cwd a mv link newlink | |
226 | $ hg --cwd a commit -m 'move symlink' |
|
226 | $ hg --cwd a commit -m 'move symlink' | |
227 | $ hg convert -d svn a |
|
227 | $ hg convert -d svn a a-svnlink | |
228 | assuming destination a-hg |
|
228 | initializing svn repository 'a-svnlink' | |
229 |
initializing svn working copy 'a- |
|
229 | initializing svn working copy 'a-svnlink-wc' | |
230 | scanning source... |
|
230 | scanning source... | |
231 | sorting... |
|
231 | sorting... | |
232 | converting... |
|
232 | converting... | |
|
233 | 7 add a file | |||
|
234 | 6 modify a file | |||
|
235 | 5 rename a file | |||
|
236 | 4 copy a file | |||
|
237 | 3 remove a file | |||
|
238 | 2 make a file executable | |||
233 | 1 add symlink |
|
239 | 1 add symlink | |
234 | 0 move symlink |
|
240 | 0 move symlink | |
235 |
$ svnupanddisplay a- |
|
241 | $ svnupanddisplay a-svnlink-wc 1 | |
236 | 8 1 test d1 |
|
242 | 8 1 test d1 | |
237 | 8 1 test d1/d2 |
|
243 | 8 1 test d1/d2 | |
238 | 8 1 test d1/d2/b |
|
244 | 8 1 test d1/d2/b | |
239 | 8 6 test c |
|
245 | 8 6 test c | |
240 | 8 8 test . |
|
246 | 8 8 test . | |
241 | 8 8 test newlink |
|
247 | 8 8 test newlink | |
242 | revision: 8 |
|
248 | revision: 8 | |
243 | author: test |
|
249 | author: test | |
244 | msg: move symlink |
|
250 | msg: move symlink | |
245 | D /link |
|
251 | D /link | |
246 | A /newlink (from /link@7) |
|
252 | A /newlink (from /link@7) | |
247 |
|
253 | |||
|
254 | Make sure our changes don't affect the rest of the test cases | |||
|
255 | ||||
|
256 | $ hg --cwd a up 5 | |||
|
257 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
258 | $ hg --cwd a --config extensions.strip= strip -r 6 | |||
|
259 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/bd4f7b7a7067-backup.hg | |||
|
260 | ||||
248 |
|
|
261 | #endif | |
249 |
|
|
262 | ||
250 |
|
|
263 | Convert with --full adds and removes files that didn't change | |
251 |
|
264 | |||
252 | $ touch a/f |
|
265 | $ touch a/f | |
253 | $ hg -R a ci -Aqmf |
|
266 | $ hg -R a ci -Aqmf | |
254 | $ echo "rename c d" > filemap |
|
267 | $ echo "rename c d" > filemap | |
255 | $ hg convert -d svn a --filemap filemap --full |
|
268 | $ hg convert -d svn a --filemap filemap --full | |
256 | assuming destination a-hg |
|
269 | assuming destination a-hg | |
257 | initializing svn working copy 'a-hg-wc' |
|
270 | initializing svn working copy 'a-hg-wc' | |
258 | scanning source... |
|
271 | scanning source... | |
259 | sorting... |
|
272 | sorting... | |
260 | converting... |
|
273 | converting... | |
261 | 0 f |
|
274 | 0 f | |
262 | $ svnupanddisplay a-hg-wc 1 |
|
275 | $ svnupanddisplay a-hg-wc 1 | |
263 |
|
|
276 | 7 7 test . | |
264 |
|
|
277 | 7 7 test d | |
265 |
|
|
278 | 7 7 test f | |
266 |
revision: |
|
279 | revision: 7 | |
267 | author: test |
|
280 | author: test | |
268 | msg: f |
|
281 | msg: f | |
269 | D /c |
|
282 | D /c | |
270 | A /d |
|
283 | A /d | |
271 | D /d1 |
|
284 | D /d1 | |
272 | A /f |
|
285 | A /f | |
273 | D /newlink |
|
|||
274 |
|
286 | |||
275 | $ rm -rf a a-hg a-hg-wc |
|
287 | $ rm -rf a a-hg a-hg-wc | |
276 |
|
288 | |||
277 |
|
289 | |||
278 | Executable in new directory |
|
290 | Executable in new directory | |
279 |
|
291 | |||
280 | $ hg init a |
|
292 | $ hg init a | |
281 |
|
293 | |||
282 | $ mkdir a/d1 |
|
294 | $ mkdir a/d1 | |
283 | $ echo a > a/d1/a |
|
295 | $ echo a > a/d1/a | |
284 | #if execbit |
|
296 | #if execbit | |
285 | $ chmod +x a/d1/a |
|
297 | $ chmod +x a/d1/a | |
286 | #else |
|
298 | #else | |
287 | $ echo fake >> a/d1/a |
|
299 | $ echo fake >> a/d1/a | |
288 | #endif |
|
300 | #endif | |
289 |
$ hg --cwd a ci -d '0 |
|
301 | $ hg --cwd a ci -d '0 0' -A -m 'add executable file in new directory' | |
290 | adding d1/a |
|
302 | adding d1/a | |
291 |
|
303 | |||
292 | $ hg convert -d svn a |
|
304 | $ hg convert -d svn a | |
293 | assuming destination a-hg |
|
305 | assuming destination a-hg | |
294 | initializing svn repository 'a-hg' |
|
306 | initializing svn repository 'a-hg' | |
295 | initializing svn working copy 'a-hg-wc' |
|
307 | initializing svn working copy 'a-hg-wc' | |
296 | scanning source... |
|
308 | scanning source... | |
297 | sorting... |
|
309 | sorting... | |
298 | converting... |
|
310 | converting... | |
299 | 0 add executable file in new directory |
|
311 | 0 add executable file in new directory | |
300 | $ svnupanddisplay a-hg-wc 1 |
|
312 | $ svnupanddisplay a-hg-wc 1 | |
301 | 1 1 test . |
|
313 | 1 1 test . | |
302 | 1 1 test d1 |
|
314 | 1 1 test d1 | |
303 | 1 1 test d1/a (glob) |
|
315 | 1 1 test d1/a (glob) | |
304 | revision: 1 |
|
316 | revision: 1 | |
305 | author: test |
|
317 | author: test | |
306 | msg: add executable file in new directory |
|
318 | msg: add executable file in new directory | |
307 | A /d1 |
|
319 | A /d1 | |
308 | A /d1/a |
|
320 | A /d1/a | |
309 | #if execbit |
|
321 | #if execbit | |
310 | $ test -x a-hg-wc/d1/a |
|
322 | $ test -x a-hg-wc/d1/a | |
311 | #endif |
|
323 | #endif | |
312 |
|
324 | |||
313 | Copy to new directory |
|
325 | Copy to new directory | |
314 |
|
326 | |||
315 | $ mkdir a/d2 |
|
327 | $ mkdir a/d2 | |
316 | $ hg --cwd a cp d1/a d2/a |
|
328 | $ hg --cwd a cp d1/a d2/a | |
317 |
$ hg --cwd a ci -d '1 |
|
329 | $ hg --cwd a ci -d '1 0' -A -m 'copy file to new directory' | |
318 |
|
330 | |||
319 | $ hg convert -d svn a |
|
331 | $ hg convert -d svn a | |
320 | assuming destination a-hg |
|
332 | assuming destination a-hg | |
321 | initializing svn working copy 'a-hg-wc' |
|
333 | initializing svn working copy 'a-hg-wc' | |
322 | scanning source... |
|
334 | scanning source... | |
323 | sorting... |
|
335 | sorting... | |
324 | converting... |
|
336 | converting... | |
325 | 0 copy file to new directory |
|
337 | 0 copy file to new directory | |
326 | $ svnupanddisplay a-hg-wc 1 |
|
338 | $ svnupanddisplay a-hg-wc 1 | |
327 | 2 1 test d1 |
|
339 | 2 1 test d1 | |
328 | 2 1 test d1/a (glob) |
|
340 | 2 1 test d1/a (glob) | |
329 | 2 2 test . |
|
341 | 2 2 test . | |
330 | 2 2 test d2 |
|
342 | 2 2 test d2 | |
331 | 2 2 test d2/a (glob) |
|
343 | 2 2 test d2/a (glob) | |
332 | revision: 2 |
|
344 | revision: 2 | |
333 | author: test |
|
345 | author: test | |
334 | msg: copy file to new directory |
|
346 | msg: copy file to new directory | |
335 | A /d2 |
|
347 | A /d2 | |
336 | A /d2/a (from /d1/a@1) |
|
348 | A /d2/a (from /d1/a@1) | |
337 |
|
349 | |||
338 | Branchy history |
|
350 | Branchy history | |
339 |
|
351 | |||
340 | $ hg init b |
|
352 | $ hg init b | |
341 | $ echo base > b/b |
|
353 | $ echo base > b/b | |
342 |
$ hg --cwd b ci -d '0 |
|
354 | $ hg --cwd b ci -d '0 0' -Ambase | |
343 | adding b |
|
355 | adding b | |
344 |
|
356 | |||
345 | $ "$TESTDIR/svn-safe-append.py" left-1 b/b |
|
357 | $ "$TESTDIR/svn-safe-append.py" left-1 b/b | |
346 | $ echo left-1 > b/left-1 |
|
358 | $ echo left-1 > b/left-1 | |
347 |
$ hg --cwd b ci -d '1 |
|
359 | $ hg --cwd b ci -d '1 0' -Amleft-1 | |
348 | adding left-1 |
|
360 | adding left-1 | |
349 |
|
361 | |||
350 | $ "$TESTDIR/svn-safe-append.py" left-2 b/b |
|
362 | $ "$TESTDIR/svn-safe-append.py" left-2 b/b | |
351 | $ echo left-2 > b/left-2 |
|
363 | $ echo left-2 > b/left-2 | |
352 |
$ hg --cwd b ci -d '2 |
|
364 | $ hg --cwd b ci -d '2 0' -Amleft-2 | |
353 | adding left-2 |
|
365 | adding left-2 | |
354 |
|
366 | |||
355 | $ hg --cwd b up 0 |
|
367 | $ hg --cwd b up 0 | |
356 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
368 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
357 |
|
369 | |||
358 | $ "$TESTDIR/svn-safe-append.py" right-1 b/b |
|
370 | $ "$TESTDIR/svn-safe-append.py" right-1 b/b | |
359 | $ echo right-1 > b/right-1 |
|
371 | $ echo right-1 > b/right-1 | |
360 |
$ hg --cwd b ci -d '3 |
|
372 | $ hg --cwd b ci -d '3 0' -Amright-1 | |
361 | adding right-1 |
|
373 | adding right-1 | |
362 | created new head |
|
374 | created new head | |
363 |
|
375 | |||
364 | $ "$TESTDIR/svn-safe-append.py" right-2 b/b |
|
376 | $ "$TESTDIR/svn-safe-append.py" right-2 b/b | |
365 | $ echo right-2 > b/right-2 |
|
377 | $ echo right-2 > b/right-2 | |
366 |
$ hg --cwd b ci -d '4 |
|
378 | $ hg --cwd b ci -d '4 0' -Amright-2 | |
367 | adding right-2 |
|
379 | adding right-2 | |
368 |
|
380 | |||
369 | $ hg --cwd b up -C 2 |
|
381 | $ hg --cwd b up -C 2 | |
370 | 3 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
382 | 3 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
371 | $ hg --cwd b merge |
|
383 | $ hg --cwd b merge | |
372 | merging b |
|
384 | merging b | |
373 | warning: conflicts during merge. |
|
385 | warning: conflicts during merge. | |
374 | merging b incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
386 | merging b incomplete! (edit conflicts, then use 'hg resolve --mark') | |
375 | 2 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
387 | 2 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
376 |
use 'hg resolve' |
|
388 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
377 | [1] |
|
389 | [1] | |
378 | $ hg --cwd b revert -r 2 b |
|
390 | $ hg --cwd b revert -r 2 b | |
379 | $ hg --cwd b resolve -m b |
|
391 | $ hg --cwd b resolve -m b | |
380 | (no more unresolved files) |
|
392 | (no more unresolved files) | |
381 |
$ hg --cwd b ci -d '5 |
|
393 | $ hg --cwd b ci -d '5 0' -m 'merge' | |
382 |
|
394 | |||
383 | Expect 4 changes |
|
395 | Expect 4 changes | |
384 |
|
396 | |||
385 | $ hg convert -d svn b |
|
397 | $ hg convert -d svn b | |
386 | assuming destination b-hg |
|
398 | assuming destination b-hg | |
387 | initializing svn repository 'b-hg' |
|
399 | initializing svn repository 'b-hg' | |
388 | initializing svn working copy 'b-hg-wc' |
|
400 | initializing svn working copy 'b-hg-wc' | |
389 | scanning source... |
|
401 | scanning source... | |
390 | sorting... |
|
402 | sorting... | |
391 | converting... |
|
403 | converting... | |
392 | 5 base |
|
404 | 5 base | |
393 | 4 left-1 |
|
405 | 4 left-1 | |
394 | 3 left-2 |
|
406 | 3 left-2 | |
395 | 2 right-1 |
|
407 | 2 right-1 | |
396 | 1 right-2 |
|
408 | 1 right-2 | |
397 | 0 merge |
|
409 | 0 merge | |
398 |
|
410 | |||
399 | $ svnupanddisplay b-hg-wc 0 |
|
411 | $ svnupanddisplay b-hg-wc 0 | |
400 | 4 2 test left-1 |
|
412 | 4 2 test left-1 | |
401 | 4 3 test b |
|
413 | 4 3 test b | |
402 | 4 3 test left-2 |
|
414 | 4 3 test left-2 | |
403 | 4 4 test . |
|
415 | 4 4 test . | |
404 | 4 4 test right-1 |
|
416 | 4 4 test right-1 | |
405 | 4 4 test right-2 |
|
417 | 4 4 test right-2 | |
406 | revision: 4 |
|
418 | revision: 4 | |
407 | author: test |
|
419 | author: test | |
408 | msg: merge |
|
420 | msg: merge | |
409 | A /right-1 |
|
421 | A /right-1 | |
410 | A /right-2 |
|
422 | A /right-2 | |
411 | revision: 3 |
|
423 | revision: 3 | |
412 | author: test |
|
424 | author: test | |
413 | msg: left-2 |
|
425 | msg: left-2 | |
414 | M /b |
|
426 | M /b | |
415 | A /left-2 |
|
427 | A /left-2 | |
416 | revision: 2 |
|
428 | revision: 2 | |
417 | author: test |
|
429 | author: test | |
418 | msg: left-1 |
|
430 | msg: left-1 | |
419 | M /b |
|
431 | M /b | |
420 | A /left-1 |
|
432 | A /left-1 | |
421 | revision: 1 |
|
433 | revision: 1 | |
422 | author: test |
|
434 | author: test | |
423 | msg: base |
|
435 | msg: base | |
424 | A /b |
|
436 | A /b | |
425 |
|
437 | |||
426 | Tags are not supported, but must not break conversion |
|
438 | Tags are not supported, but must not break conversion | |
427 |
|
439 | |||
428 | $ rm -rf a a-hg a-hg-wc |
|
440 | $ rm -rf a a-hg a-hg-wc | |
429 | $ hg init a |
|
441 | $ hg init a | |
430 | $ echo a > a/a |
|
442 | $ echo a > a/a | |
431 |
$ |
|
443 | $ hg --cwd a ci -d '0 0' -A -m 'Add file a' | |
432 | adding a |
|
444 | adding a | |
433 |
$ hg --cwd a tag -d '1 |
|
445 | $ hg --cwd a tag -d '1 0' -m 'Tagged as v1.0' v1.0 | |
434 |
|
446 | |||
435 | $ hg convert -d svn a |
|
447 | $ hg convert -d svn a | |
436 | assuming destination a-hg |
|
448 | assuming destination a-hg | |
437 | initializing svn repository 'a-hg' |
|
449 | initializing svn repository 'a-hg' | |
438 | initializing svn working copy 'a-hg-wc' |
|
450 | initializing svn working copy 'a-hg-wc' | |
439 | scanning source... |
|
451 | scanning source... | |
440 | sorting... |
|
452 | sorting... | |
441 | converting... |
|
453 | converting... | |
442 | 1 Add file a |
|
454 | 1 Add file a | |
443 | 0 Tagged as v1.0 |
|
455 | 0 Tagged as v1.0 | |
444 | writing Subversion tags is not yet implemented |
|
456 | writing Subversion tags is not yet implemented | |
445 | $ svnupanddisplay a-hg-wc 2 |
|
457 | $ svnupanddisplay a-hg-wc 2 | |
446 | 2 1 test a |
|
458 | 2 1 test a | |
447 | 2 2 test . |
|
459 | 2 2 test . | |
448 | 2 2 test .hgtags |
|
460 | 2 2 test .hgtags | |
449 | revision: 2 |
|
461 | revision: 2 | |
450 | author: test |
|
462 | author: test | |
451 | msg: Tagged as v1.0 |
|
463 | msg: Tagged as v1.0 | |
452 | A /.hgtags |
|
464 | A /.hgtags | |
453 | revision: 1 |
|
465 | revision: 1 | |
454 | author: test |
|
466 | author: test | |
455 | msg: Add file a |
|
467 | msg: Add file a | |
456 | A /a |
|
468 | A /a | |
457 | $ rm -rf a a-hg a-hg-wc |
|
469 | $ rm -rf a a-hg a-hg-wc |
General Comments 0
You need to be logged in to leave comments.
Login now