~ubuntu-branches/debian/sid/subversion/sid

« back to all changes in this revision

Viewing changes to subversion/tests/cmdline/merge_authz_tests.py

  • Committer: Package Import Robot
  • Author(s): James McCoy, Peter Samuelson, James McCoy
  • Date: 2014-01-12 19:48:33 UTC
  • mfrom: (0.2.10)
  • Revision ID: package-import@ubuntu.com-20140112194833-w3axfwksn296jn5x
Tags: 1.8.5-1
[ Peter Samuelson ]
* New upstream release.  (Closes: #725787) Rediff patches:
  - Remove apr-abi1 (applied upstream), rename apr-abi2 to apr-abi
  - Remove loosen-sqlite-version-check (shouldn't be needed)
  - Remove java-osgi-metadata (applied upstream)
  - svnmucc prompts for a changelog if none is provided. (Closes: #507430)
  - Remove fix-bdb-version-detection, upstream uses "apu-config --dbm-libs"
  - Remove ruby-test-wc (applied upstream)
  - Fix “svn diff -r N file” when file has svn:mime-type set.
    (Closes: #734163)
  - Support specifying an encoding for mod_dav_svn's environment in which
    hooks are run.  (Closes: #601544)
  - Fix ordering of “svnadmin dump” paths with certain APR versions.
    (Closes: #687291)
  - Provide a better error message when authentication fails with an
    svn+ssh:// URL.  (Closes: #273874)
  - Updated Polish translations.  (Closes: #690815)

[ James McCoy ]
* Remove all traces of libneon, replaced by libserf.
* patches/sqlite_3.8.x_workaround: Upstream fix for wc-queries-test test
  failurse.
* Run configure with --with-apache-libexecdir, which allows removing part of
  patches/rpath.
* Re-enable auth-test as upstream has fixed the problem of picking up
  libraries from the environment rather than the build tree.
  (Closes: #654172)
* Point LD_LIBRARY_PATH at the built auth libraries when running the svn
  command during the build.  (Closes: #678224)
* Add a NEWS entry describing how to configure mod_dav_svn to understand
  UTF-8.  (Closes: #566148)
* Remove ancient transitional package, libsvn-ruby.
* Enable compatibility with Sqlite3 versions back to Wheezy.
* Enable hardening flags.  (Closes: #734918)
* patches/build-fixes: Enable verbose build logs.
* Build against the default ruby version.  (Closes: #722393)

Show diffs side-by-side

added added

removed removed

Lines of Context:
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)
 
76
#
 
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")
123
126
 
124
127
  # Merge r4:8 into the restricted WC's A_COPY.
125
128
  #
181
184
    'C'         : Item(),
182
185
    })
183
186
  expected_skip = wc.State(A_COPY_path, {
184
 
    'B/E'       : Item(),
 
187
    'B/E'       : Item(verb='Skipped missing target'),
185
188
    })
186
189
  svntest.actions.run_and_verify_merge(A_COPY_path, '4', '8',
187
190
                                       sbox.repo_url + '/A', None,
209
212
  # always takes precedence in terms of getting *non*-inheritable mergeinfo.
210
213
  expected_output = wc.State(A_COPY_2_path, {
211
214
    'D/H/omega' : Item(status='U '),
 
215
    # Below the skip
 
216
    'D/G/rho'   : Item(status='  ', treeconflict='U'),
212
217
    })
213
218
  expected_mergeinfo_output = wc.State(A_COPY_2_path, {
214
219
    ''          : Item(status=' U'),
253
258
    'C'         : Item(),
254
259
    })
255
260
  expected_skip = wc.State(A_COPY_2_path, {
256
 
    'B/E'     : Item(),
257
 
    'D/G'       : Item(),
258
 
    'D/H/psi'   : Item(),
 
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'),
259
264
    })
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"),
321
326
    'C'         : Item(),
322
327
    })
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,
326
332
                                       expected_output,
358
364
    'chi'   : Item("This is the file 'chi'.\n"),
359
365
    })
360
366
  expected_skip = wc.State(A_COPY_2_H_path, {
361
 
    'psi'   : Item(),
 
367
    'psi'   : Item(verb='Skipped missing target'),
362
368
    })
363
369
  # Note we don't bother checking expected mergeinfo output because the
364
370
  # multiple merges being performed here, -c5 and -c8, will result in
393
399
 
394
400
  # Merge -r7:9 to the restricted WC's A_COPY_2/D/H.
395
401
  #
 
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 '),
 
410
    })
 
411
  expected_mergeinfo_output = wc.State(A_COPY_2_H_path, {
 
412
    ''      : Item(status=' U'),
 
413
    'omega' : Item(status=' U'),
 
414
    })
 
415
  expected_elision_output = wc.State(A_COPY_2_H_path, {
 
416
    'omega' : Item(status=' U'),
 
417
    })
 
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='-'),
 
423
    })
 
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"),
 
429
    })
 
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,
 
433
                                       expected_output,
 
434
                                       expected_mergeinfo_output,
 
435
                                       expected_elision_output,
 
436
                                       expected_disk,
 
437
                                       expected_status,
 
438
                                       expected_skip,
 
439
                                       None, None, None, None,
 
440
                                       None, 1, 0)
 
441
 
 
442
  # Merge -r4:9 to the restricted WC's A_COPY_2/D/H.
 
443
  #
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
399
 
  # this merge.
 
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',
 
449
                                     wc_restricted)
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='-'),
416
466
    })
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'}),
424
474
    })
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'),
 
477
    })
 
478
  svntest.actions.run_and_verify_merge(A_COPY_2_H_path, '4', '9',
427
479
                                       sbox.repo_url + '/A/D/H', None,
428
480
                                       expected_output,
429
481
                                       expected_mergeinfo_output,
451
503
                             svntest.main.wc_author2 + " = rw")})
452
504
 
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'
460
512
 
572
624
 
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')
581
633
 
582
634
  # Copy A@1 to A_COPY in r2, and then make some changes to A in r3-6.
583
635
  sbox.build()
585
637
  expected_disk, expected_status = set_up_branch(sbox)
586
638
 
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)