@matheusbsbs / matheus-bagliano / commits / e2b36f6018
Fork 0

git-svn: add test for useSvnsyncProps

These tests are very similar as the ones I used for useSvmProps and expect the same results because both dumps were generated from the same original repo. Signed-off-by: Eric Wong <normalperson@yhbt.net>

Eric Wong committed Feb 18, 2007 at 01:30 UTC e2b36f6018062cfa44b6952ce73c0609db0af240
2 files changed +613
t/t9111-git-svn-use-svnsync-props.sh new
+51
@@ -0,0 +1,51 @@
1 +#!/bin/sh
2 +#
3 +# Copyright (c) 2007 Eric Wong
4 +#
5 +
6 +test_description='git-svn useSvnsyncProps test'
7 +
8 +. ./lib-git-svn.sh
9 +
10 +test_expect_success 'load svnsync repo' "
11 + svnadmin load -q $rawsvnrepo < ../t9111/svnsync.dump &&
12 + git-svn init -R arr -i bar $svnrepo/bar &&
13 + git-svn init -R argh -i dir $svnrepo/dir &&
14 + git-svn init -R argh -i e $svnrepo/dir/a/b/c/d/e &&
15 + git-config svn.useSvnsyncProps true &&
16 + git-svn fetch --all
17 + "
18 +
19 +uuid=161ce429-a9dd-4828-af4a-52023f968c89
20 +
21 +bar_url=http://mayonaise/svnrepo/bar
22 +test_expect_success 'verify metadata for /bar' "
23 + git-cat-file commit refs/remotes/bar | \
24 + grep '^git-svn-id: $bar_url@12 $uuid$' &&
25 + git-cat-file commit refs/remotes/bar~1 | \
26 + grep '^git-svn-id: $bar_url@11 $uuid$' &&
27 + git-cat-file commit refs/remotes/bar~2 | \
28 + grep '^git-svn-id: $bar_url@10 $uuid$' &&
29 + git-cat-file commit refs/remotes/bar~3 | \
30 + grep '^git-svn-id: $bar_url@9 $uuid$' &&
31 + git-cat-file commit refs/remotes/bar~4 | \
32 + grep '^git-svn-id: $bar_url@6 $uuid$' &&
33 + git-cat-file commit refs/remotes/bar~5 | \
34 + grep '^git-svn-id: $bar_url@1 $uuid$'
35 + "
36 +
37 +e_url=http://mayonaise/svnrepo/dir/a/b/c/d/e
38 +test_expect_success 'verify metadata for /dir/a/b/c/d/e' "
39 + git-cat-file commit refs/remotes/e | \
40 + grep '^git-svn-id: $e_url@1 $uuid$'
41 + "
42 +
43 +dir_url=http://mayonaise/svnrepo/dir
44 +test_expect_success 'verify metadata for /dir' "
45 + git-cat-file commit refs/remotes/dir | \
46 + grep '^git-svn-id: $dir_url@2 $uuid$' &&
47 + git-cat-file commit refs/remotes/dir~1 | \
48 + grep '^git-svn-id: $dir_url@1 $uuid$'
49 + "
50 +
51 +test_done
t/t9111/svnsync.dump new
+562
@@ -0,0 +1,562 @@
1 +SVN-fs-dump-format-version: 2
2 +
3 +UUID: b4bfe35e-f256-4096-874c-08c5639ecad7
4 +
5 +Revision-number: 0
6 +Prop-content-length: 240
7 +Content-length: 240
8 +
9 +K 18
10 +svn:sync-from-uuid
11 +V 36
12 +161ce429-a9dd-4828-af4a-52023f968c89
13 +K 10
14 +svn:author
15 +V 7
16 +svnsync
17 +K 24
18 +svn:sync-last-merged-rev
19 +V 2
20 +12
21 +K 8
22 +svn:date
23 +V 27
24 +2007-02-17T05:10:52.017552Z
25 +K 17
26 +svn:sync-from-url
27 +V 24
28 +http://mayonaise/svnrepo
29 +PROPS-END
30 +
31 +Revision-number: 1
32 +Prop-content-length: 120
33 +Content-length: 120
34 +
35 +K 7
36 +svn:log
37 +V 18
38 +import for git-svn
39 +K 10
40 +svn:author
41 +V 7
42 +svnsync
43 +K 8
44 +svn:date
45 +V 27
46 +2007-02-17T05:10:52.108847Z
47 +PROPS-END
48 +
49 +Node-path: bar
50 +Node-kind: dir
51 +Node-action: add
52 +Prop-content-length: 10
53 +Content-length: 10
54 +
55 +PROPS-END
56 +
57 +
58 +Node-path: bar/zzz
59 +Node-kind: file
60 +Node-action: add
61 +Prop-content-length: 10
62 +Text-content-length: 4
63 +Text-content-md5: 33b02bc15ce9557d2dd8484d58f95ac4
64 +Content-length: 14
65 +
66 +PROPS-END
67 +zzz
68 +
69 +
70 +Node-path: dir
71 +Node-kind: dir
72 +Node-action: add
73 +Prop-content-length: 10
74 +Content-length: 10
75 +
76 +PROPS-END
77 +
78 +
79 +Node-path: dir/a
80 +Node-kind: dir
81 +Node-action: add
82 +Prop-content-length: 10
83 +Content-length: 10
84 +
85 +PROPS-END
86 +
87 +
88 +Node-path: dir/a/b
89 +Node-kind: dir
90 +Node-action: add
91 +Prop-content-length: 10
92 +Content-length: 10
93 +
94 +PROPS-END
95 +
96 +
97 +Node-path: dir/a/b/c
98 +Node-kind: dir
99 +Node-action: add
100 +Prop-content-length: 10
101 +Content-length: 10
102 +
103 +PROPS-END
104 +
105 +
106 +Node-path: dir/a/b/c/d
107 +Node-kind: dir
108 +Node-action: add
109 +Prop-content-length: 10
110 +Content-length: 10
111 +
112 +PROPS-END
113 +
114 +
115 +Node-path: dir/a/b/c/d/e
116 +Node-kind: dir
117 +Node-action: add
118 +Prop-content-length: 10
119 +Content-length: 10
120 +
121 +PROPS-END
122 +
123 +
124 +Node-path: dir/a/b/c/d/e/file
125 +Node-kind: file
126 +Node-action: add
127 +Prop-content-length: 10
128 +Text-content-length: 9
129 +Text-content-md5: 3fd46fe46fcdcf062c802ca60dc826d5
130 +Content-length: 19
131 +
132 +PROPS-END
133 +deep dir
134 +
135 +
136 +Node-path: exec.sh
137 +Node-kind: file
138 +Node-action: add
139 +Prop-content-length: 35
140 +Text-content-length: 10
141 +Text-content-md5: 3e2b31c72181b87149ff995e7202c0e3
142 +Content-length: 45
143 +
144 +K 14
145 +svn:executable
146 +V 0
147 +
148 +PROPS-END
149 +#!/bin/sh
150 +
151 +
152 +Node-path: foo
153 +Node-kind: file
154 +Node-action: add
155 +Prop-content-length: 10
156 +Text-content-length: 4
157 +Text-content-md5: d3b07384d113edec49eaa6238ad5ff00
158 +Content-length: 14
159 +
160 +PROPS-END
161 +foo
162 +
163 +
164 +Node-path: foo.link
165 +Node-kind: file
166 +Node-action: add
167 +Prop-content-length: 33
168 +Text-content-length: 8
169 +Text-content-md5: 1043146e49ef02cab12eef865cb34ff3
170 +Content-length: 41
171 +
172 +K 11
173 +svn:special
174 +V 1
175 +*
176 +PROPS-END
177 +link foo
178 +
179 +Revision-number: 2
180 +Prop-content-length: 135
181 +Content-length: 135
182 +
183 +K 7
184 +svn:log
185 +V 33
186 +try a deep --rmdir with a commit
187 +
188 +K 10
189 +svn:author
190 +V 7
191 +svnsync
192 +K 8
193 +svn:date
194 +V 27
195 +2007-02-17T05:10:54.847015Z
196 +PROPS-END
197 +
198 +Node-path: dir/file
199 +Node-kind: file
200 +Node-action: add
201 +Node-copyfrom-rev: 1
202 +Node-copyfrom-path: dir/a/b/c/d/e/file
203 +Text-content-length: 9
204 +Text-content-md5: 3fd46fe46fcdcf062c802ca60dc826d5
205 +Content-length: 9
206 +
207 +deep dir
208 +
209 +
210 +Node-path: dir/a
211 +Node-action: delete
212 +
213 +
214 +Node-path: file
215 +Node-kind: file
216 +Node-action: add
217 +Node-copyfrom-rev: 1
218 +Node-copyfrom-path: dir/a/b/c/d/e/file
219 +Text-content-length: 9
220 +Text-content-md5: 3fd46fe46fcdcf062c802ca60dc826d5
221 +Content-length: 9
222 +
223 +deep dir
224 +
225 +
226 +Revision-number: 3
227 +Prop-content-length: 136
228 +Content-length: 136
229 +
230 +K 7
231 +svn:log
232 +V 34
233 +remove executable bit from a file
234 +
235 +K 10
236 +svn:author
237 +V 7
238 +svnsync
239 +K 8
240 +svn:date
241 +V 27
242 +2007-02-17T05:10:58.232691Z
243 +PROPS-END
244 +
245 +Node-path: exec.sh
246 +Node-kind: file
247 +Node-action: change
248 +Prop-content-length: 10
249 +Text-content-length: 10
250 +Text-content-md5: 3e2b31c72181b87149ff995e7202c0e3
251 +Content-length: 20
252 +
253 +PROPS-END
254 +#!/bin/sh
255 +
256 +
257 +Revision-number: 4
258 +Prop-content-length: 131
259 +Content-length: 131
260 +
261 +K 7
262 +svn:log
263 +V 29
264 +add executable bit back file
265 +
266 +K 10
267 +svn:author
268 +V 7
269 +svnsync
270 +K 8
271 +svn:date
272 +V 27
273 +2007-02-17T05:10:59.666560Z
274 +PROPS-END
275 +
276 +Node-path: exec.sh
277 +Node-kind: file
278 +Node-action: change
279 +Prop-content-length: 36
280 +Text-content-length: 10
281 +Text-content-md5: 3e2b31c72181b87149ff995e7202c0e3
282 +Content-length: 46
283 +
284 +K 14
285 +svn:executable
286 +V 1
287 +*
288 +PROPS-END
289 +#!/bin/sh
290 +
291 +
292 +Revision-number: 5
293 +Prop-content-length: 154
294 +Content-length: 154
295 +
296 +K 7
297 +svn:log
298 +V 52
299 +executable file becomes a symlink to bar/zzz (file)
300 +
301 +K 10
302 +svn:author
303 +V 7
304 +svnsync
305 +K 8
306 +svn:date
307 +V 27
308 +2007-02-17T05:11:00.676495Z
309 +PROPS-END
310 +
311 +Node-path: exec.sh
312 +Node-kind: file
313 +Node-action: change
314 +Prop-content-length: 33
315 +Text-content-length: 12
316 +Text-content-md5: f138693371665cc117742508761d684d
317 +Content-length: 45
318 +
319 +K 11
320 +svn:special
321 +V 1
322 +*
323 +PROPS-END
324 +link bar/zzz
325 +
326 +Revision-number: 6
327 +Prop-content-length: 168
328 +Content-length: 168
329 +
330 +K 7
331 +svn:log
332 +V 66
333 +new symlink is added to a file that was also just made executable
334 +
335 +K 10
336 +svn:author
337 +V 7
338 +svnsync
339 +K 8
340 +svn:date
341 +V 27
342 +2007-02-17T05:11:01.686891Z
343 +PROPS-END
344 +
345 +Node-path: bar/zzz
346 +Node-kind: file
347 +Node-action: change
348 +Prop-content-length: 36
349 +Text-content-length: 4
350 +Text-content-md5: 33b02bc15ce9557d2dd8484d58f95ac4
351 +Content-length: 40
352 +
353 +K 14
354 +svn:executable
355 +V 1
356 +*
357 +PROPS-END
358 +zzz
359 +
360 +
361 +Node-path: exec-2.sh
362 +Node-kind: file
363 +Node-action: add
364 +Node-copyfrom-rev: 5
365 +Node-copyfrom-path: exec.sh
366 +Text-content-length: 12
367 +Text-content-md5: f138693371665cc117742508761d684d
368 +Content-length: 12
369 +
370 +link bar/zzz
371 +
372 +Revision-number: 7
373 +Prop-content-length: 136
374 +Content-length: 136
375 +
376 +K 7
377 +svn:log
378 +V 34
379 +modify a symlink to become a file
380 +
381 +K 10
382 +svn:author
383 +V 7
384 +svnsync
385 +K 8
386 +svn:date
387 +V 27
388 +2007-02-17T05:11:02.677035Z
389 +PROPS-END
390 +
391 +Node-path: exec-2.sh
392 +Node-kind: file
393 +Node-action: change
394 +Prop-content-length: 10
395 +Text-content-length: 9
396 +Text-content-md5: 8e92eff9e911886cede27d420f89c735
397 +Content-length: 19
398 +
399 +PROPS-END
400 +git help
401 +
402 +
403 +Revision-number: 8
404 +Prop-content-length: 109
405 +Content-length: 109
406 +
407 +K 7
408 +svn:log
409 +V 8
410 +éï∏
411 +
412 +K 10
413 +svn:author
414 +V 7
415 +svnsync
416 +K 8
417 +svn:date
418 +V 27
419 +2007-02-17T05:11:03.676862Z
420 +PROPS-END
421 +
422 +Node-path: exec-2.sh
423 +Node-kind: file
424 +Node-action: change
425 +Text-content-length: 17
426 +Text-content-md5: 49881954063cf26ca48c212396a957ca
427 +Content-length: 17
428 +
429 +git help
430 +# hello
431 +
432 +
433 +Revision-number: 9
434 +Prop-content-length: 130
435 +Content-length: 130
436 +
437 +K 7
438 +svn:log
439 +V 28
440 +/bar/d should be in the log
441 +
442 +K 10
443 +svn:author
444 +V 7
445 +svnsync
446 +K 8
447 +svn:date
448 +V 27
449 +2007-02-17T05:11:07.686552Z
450 +PROPS-END
451 +
452 +Node-path: bar/d
453 +Node-kind: file
454 +Node-action: add
455 +Prop-content-length: 10
456 +Text-content-length: 4
457 +Text-content-md5: 0bee89b07a248e27c83fc3d5951213c1
458 +Content-length: 14
459 +
460 +PROPS-END
461 +abc
462 +
463 +
464 +Revision-number: 10
465 +Prop-content-length: 122
466 +Content-length: 122
467 +
468 +K 7
469 +svn:log
470 +V 20
471 +add a new directory
472 +
473 +K 10
474 +svn:author
475 +V 7
476 +svnsync
477 +K 8
478 +svn:date
479 +V 27
480 +2007-02-17T05:11:08.405953Z
481 +PROPS-END
482 +
483 +Node-path: bar/newdir
484 +Node-kind: dir
485 +Node-action: add
486 +Prop-content-length: 10
487 +Content-length: 10
488 +
489 +PROPS-END
490 +
491 +
492 +Node-path: bar/newdir/dir
493 +Node-kind: file
494 +Node-action: add
495 +Prop-content-length: 10
496 +Text-content-length: 4
497 +Text-content-md5: 9cd599a3523898e6a12e13ec787da50a
498 +Content-length: 14
499 +
500 +PROPS-END
501 +new
502 +
503 +
504 +Revision-number: 11
505 +Prop-content-length: 133
506 +Content-length: 133
507 +
508 +K 7
509 +svn:log
510 +V 31
511 +modify a file in new directory
512 +
513 +K 10
514 +svn:author
515 +V 7
516 +svnsync
517 +K 8
518 +svn:date
519 +V 27
520 +2007-02-17T05:11:09.126645Z
521 +PROPS-END
522 +
523 +Node-path: bar/newdir/dir
524 +Node-kind: file
525 +Node-action: change
526 +Text-content-length: 8
527 +Text-content-md5: a950e20332358e523a5e9d571e47fa64
528 +Content-length: 8
529 +
530 +new
531 +foo
532 +
533 +
534 +Revision-number: 12
535 +Prop-content-length: 116
536 +Content-length: 116
537 +
538 +K 7
539 +svn:log
540 +V 14
541 +update /bar/d
542 +
543 +K 10
544 +svn:author
545 +V 7
546 +svnsync
547 +K 8
548 +svn:date
549 +V 27
550 +2007-02-17T05:11:09.846221Z
551 +PROPS-END
552 +
553 +Node-path: bar/d
554 +Node-kind: file
555 +Node-action: change
556 +Text-content-length: 4
557 +Text-content-md5: 7abb78de7f2756ca8b511cbc879fd5e7
558 +Content-length: 4
559 +
560 +cba
561 +
562 +