73
73
# This is *not* a full test of issue #2829, see also merge_tests.py,
74
74
# search for "2829". This tests the problem where a merge adds a path
75
75
# with a missing sibling and so needs its own explicit mergeinfo.
76
@Issues(2893,2997,2829)
77
# #4056 - Don't record non-inheritable mergeinfo if missing subtrees are not
78
# touched by the full-depth diff
79
@Issues(2893,2997,2829,4056)
77
80
@SkipUnless(svntest.main.server_has_mergeinfo)
78
81
@Skip(svntest.main.is_ra_type_file)
79
82
def mergeinfo_and_skipped_paths(sbox):
119
122
A_COPY_2_H_path = os.path.join(wc_restricted, "A_COPY_2", "D", "H")
120
123
A_COPY_3_path = os.path.join(wc_restricted, "A_COPY_3")
121
124
omega_path = os.path.join(wc_restricted, "A_COPY", "D", "H", "omega")
122
zeta_path = os.path.join(wc_dir, "A", "D", "H", "zeta")
125
zeta_path = sbox.ospath("A/D/H/zeta")
124
127
# Merge r4:8 into the restricted WC's A_COPY.
255
260
expected_skip = wc.State(A_COPY_2_path, {
261
'B/E' : Item(verb='Skipped missing target'),
262
'D/G' : Item(verb='Skipped missing target'),
263
'D/H/psi' : Item(verb='Skipped missing target'),
260
265
svntest.actions.run_and_verify_merge(A_COPY_2_path, '4', '8',
261
266
sbox.repo_url + '/A', None,
320
325
'mu' : Item("This is the file 'mu'.\n"),
323
expected_skip = wc.State(A_COPY_3_path, {'B/E' : Item()})
328
expected_skip = wc.State(A_COPY_3_path,
329
{'B/E' : Item(verb='Skipped missing target')})
324
330
svntest.actions.run_and_verify_merge(A_COPY_3_path, '5', '7',
325
331
sbox.repo_url + '/A', None,
394
400
# Merge -r7:9 to the restricted WC's A_COPY_2/D/H.
402
# r9 adds a path, 'A_COPY_2/D/H/zeta', which has a missing sibling 'psi',
403
# but since 'psi' is untouched by the merge it isn't skipped, and since it
404
# isn't skipped, its parent 'A_COPY_2/D/H' won't get non-inheritable
405
# mergeinfo set on it to describe the merge, so none of the parent's
406
# children will get explicit mergeinfo -- see issue #4056.
407
expected_output = wc.State(A_COPY_2_H_path, {
408
'omega' : Item(status='U '),
409
'zeta' : Item(status='A '),
411
expected_mergeinfo_output = wc.State(A_COPY_2_H_path, {
412
'' : Item(status=' U'),
413
'omega' : Item(status=' U'),
415
expected_elision_output = wc.State(A_COPY_2_H_path, {
416
'omega' : Item(status=' U'),
418
expected_status = wc.State(A_COPY_2_H_path, {
419
'' : Item(status=' M', wc_rev=8),
420
'chi' : Item(status=' ', wc_rev=8),
421
'omega' : Item(status='M ', wc_rev=8),
422
'zeta' : Item(status='A ', copied='+', wc_rev='-'),
424
expected_disk = wc.State('', {
425
'' : Item(props={SVN_PROP_MERGEINFO : '/A/D/H:8-9'}),
426
'omega' : Item("New content"),
427
'chi' : Item("This is the file 'chi'.\n"),
428
'zeta' : Item("This is the file 'zeta'.\n"),
430
expected_skip = wc.State(A_COPY_2_H_path, {})
431
svntest.actions.run_and_verify_merge(A_COPY_2_H_path, '7', '9',
432
sbox.repo_url + '/A/D/H', None,
434
expected_mergeinfo_output,
435
expected_elision_output,
439
None, None, None, None,
442
# Merge -r4:9 to the restricted WC's A_COPY_2/D/H.
396
444
# r9 adds a path, 'A_COPY_2/D/H/zeta', which has a parent with
397
# non-inheritable mergeinfo (due to the fact 'A_COPY_2/D/H/psi' is missing).
398
# 'A_COPY_2/D/H/zeta' must therefore get its own explicit mergeinfo from
445
# non-inheritable mergeinfo (due to the fact 'A_COPY_2/D/H/psi' is missing
446
# and skipped). 'A_COPY_2/D/H/zeta' must therefore get its own explicit
447
# mergeinfo from this merge.
448
svntest.actions.run_and_verify_svn(None, None, [], 'revert', '--recursive',
400
450
expected_output = wc.State(A_COPY_2_H_path, {
401
451
'omega' : Item(status='U '),
402
452
'zeta' : Item(status='A '),
415
465
'zeta' : Item(status='A ', copied='+', wc_rev='-'),
417
467
expected_disk = wc.State('', {
418
'' : Item(props={SVN_PROP_MERGEINFO : '/A/D/H:8-9*'}),
468
'' : Item(props={SVN_PROP_MERGEINFO : '/A/D/H:5-9*'}),
419
469
'omega' : Item("New content",
420
props={SVN_PROP_MERGEINFO : '/A/D/H/omega:8-9'}),
470
props={SVN_PROP_MERGEINFO : '/A/D/H/omega:5-9'}),
421
471
'chi' : Item("This is the file 'chi'.\n"),
422
472
'zeta' : Item("This is the file 'zeta'.\n",
423
473
props={SVN_PROP_MERGEINFO : '/A/D/H/zeta:9'}),
425
expected_skip = wc.State(A_COPY_2_H_path, {})
426
svntest.actions.run_and_verify_merge(A_COPY_2_H_path, '7', '9',
475
expected_skip = wc.State(A_COPY_2_H_path, {
476
'psi' : Item(verb='Skipped missing target'),
478
svntest.actions.run_and_verify_merge(A_COPY_2_H_path, '4', '9',
427
479
sbox.repo_url + '/A/D/H', None,
429
481
expected_mergeinfo_output,
451
503
svntest.main.wc_author2 + " = rw")})
453
505
# Some paths we'll care about
454
Acopy_path = os.path.join(wc_dir, 'A_copy')
455
gamma_path = os.path.join(wc_dir, 'A', 'D', 'gamma')
456
Acopy_gamma_path = os.path.join(wc_dir, 'A_copy', 'D', 'gamma')
457
Acopy_D_path = os.path.join(wc_dir, 'A_copy', 'D')
506
Acopy_path = sbox.ospath('A_copy')
507
gamma_path = sbox.ospath('A/D/gamma')
508
Acopy_gamma_path = sbox.ospath('A_copy/D/gamma')
509
Acopy_D_path = sbox.ospath('A_copy/D')
458
510
A_url = sbox.repo_url + '/A'
459
511
Acopy_url = sbox.repo_url + '/A_copy'
573
625
# Some paths we'll care about
574
626
wc_dir = sbox.wc_dir
575
A_path = os.path.join(wc_dir, 'A')
576
A_COPY_path = os.path.join(wc_dir, 'A_COPY')
577
beta_COPY_path = os.path.join(wc_dir, 'A_COPY', 'B', 'E', 'beta')
578
rho_COPY_path = os.path.join(wc_dir, 'A_COPY', 'D', 'G', 'rho')
579
omega_COPY_path = os.path.join(wc_dir, 'A_COPY', 'D', 'H', 'omega')
580
psi_COPY_path = os.path.join(wc_dir, 'A_COPY', 'D', 'H', 'psi')
627
A_path = sbox.ospath('A')
628
A_COPY_path = sbox.ospath('A_COPY')
629
beta_COPY_path = sbox.ospath('A_COPY/B/E/beta')
630
rho_COPY_path = sbox.ospath('A_COPY/D/G/rho')
631
omega_COPY_path = sbox.ospath('A_COPY/D/H/omega')
632
psi_COPY_path = sbox.ospath('A_COPY/D/H/psi')
582
634
# Copy A@1 to A_COPY in r2, and then make some changes to A in r3-6.
585
637
expected_disk, expected_status = set_up_branch(sbox)
587
639
# Make a change on the branch, to A_COPY/mu, commit in r7.
588
svntest.main.file_write(os.path.join(wc_dir, "A_COPY", "mu"),
640
svntest.main.file_write(sbox.ospath("A_COPY/mu"),
589
641
"Changed on the branch.")
590
642
expected_output = wc.State(wc_dir, {'A_COPY/mu' : Item(verb='Sending')})
591
643
expected_status.tweak('A_COPY/mu', wc_rev=7)