subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1462850 [14/14] - in /subversion/branches/fsfs-format7: ./ build/ build/ac-macros/ build/generator/ contrib/client-side/svncopy/ notes/ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/org/apache/subversion/javahl/ subvers...
Date Sat, 30 Mar 2013 20:02:33 GMT
Modified: subversion/branches/fsfs-format7/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/cmdline/merge_tests.py?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/branches/fsfs-format7/subversion/tests/cmdline/merge_tests.py Sat Mar 30 20:02:27 2013
@@ -54,6 +54,7 @@ from svntest.verify import RegexListOutp
 def expected_merge_output(rev_ranges, additional_lines=[], foreign=False,
                           elides=False, two_url=False, target=None,
                           text_conflicts=0, prop_conflicts=0, tree_conflicts=0,
+                          text_resolved=0, prop_resolved=0, tree_resolved=0,
                           skipped_paths=0):
   """Generate an (inefficient) regex representing the expected merge
   output and mergeinfo notifications from REV_RANGES and ADDITIONAL_LINES.
@@ -113,8 +114,11 @@ def expected_merge_output(rev_ranges, ad
     additional_lines = [line.replace("\\", "\\\\") for line in additional_lines]
   lines += additional_lines
 
-  lines += svntest.main.summary_of_conflicts(text_conflicts, prop_conflicts,
-                                             tree_conflicts, skipped_paths)
+  lines += svntest.main.summary_of_conflicts(
+             text_conflicts, prop_conflicts, tree_conflicts,
+             text_resolved, prop_resolved, tree_resolved,
+             skipped_paths,
+             as_regex=True)
 
   return "|".join(lines)
 
@@ -12542,7 +12546,9 @@ def svn_copy(s_rev, path1, path2):
                                      '-r', s_rev, path1, path2)
 
 def svn_merge(rev_range, source, target, lines=None, elides=[],
-              text_conflicts=0, prop_conflicts=0, tree_conflicts=0, args=[]):
+              text_conflicts=0, prop_conflicts=0, tree_conflicts=0,
+              text_resolved=0, prop_resolved=0, tree_resolved=0,
+              args=[]):
   """Merge a single change from path SOURCE to path TARGET and verify the
   output and that there is no error.  (The changes made are not verified.)
 
@@ -12579,7 +12585,10 @@ def svn_merge(rev_range, source, target,
                                   elides=elides,
                                   text_conflicts=text_conflicts,
                                   prop_conflicts=prop_conflicts,
-                                  tree_conflicts=tree_conflicts)
+                                  tree_conflicts=tree_conflicts,
+                                  text_resolved=text_resolved,
+                                  prop_resolved=prop_resolved,
+                                  tree_resolved=tree_resolved)
   svntest.actions.run_and_verify_svn(None, exp_out, [],
                                      'merge', rev_arg, source, target, *args)
 
@@ -13131,8 +13140,9 @@ def merge_two_edits_to_same_prop(sbox):
 
   # Merge the first change, then the second, to trunk.
   svn_merge(rev3, A_COPY_path, A_path, [
-      " G   %s\n" % mu_path,
-      ],
+      " C   %s\n" % mu_path,
+      "Resolved .* '%s'\n" % mu_path,
+      ], prop_resolved=1,
       args=['--allow-mixed-revisions',
             '--accept=working'])
   svn_merge(rev4, A_COPY_path, A_path, [
@@ -15243,7 +15253,8 @@ def merge_automatic_conflict_resolution(
                                      'revert', '--recursive', wc_dir)
 
   # Test --accept mine-conflict and mine-full
-  expected_output = wc.State(A_COPY_path, {'D/H/psi' : Item(status='U ')})
+  ### TODO: Also test that the output has a 'Resolved' line for this path.
+  expected_output = wc.State(A_COPY_path, {'D/H/psi' : Item(status='C ')})
   expected_disk.tweak('D/H/psi', contents="BASE.\n")
   expected_status.tweak('D/H/psi', status='  ')
   svntest.actions.run_and_verify_merge(A_COPY_path, '2', '3',
@@ -15278,7 +15289,8 @@ def merge_automatic_conflict_resolution(
                                      'revert', '--recursive', wc_dir)
 
   # Test --accept theirs-conflict and theirs-full
-  expected_output = wc.State(A_COPY_path, {'D/H/psi' : Item(status='U ')})
+  ### TODO: Also test that the output has a 'Resolved' line for this path.
+  expected_output = wc.State(A_COPY_path, {'D/H/psi' : Item(status='C ')})
   expected_disk.tweak('D/H/psi', contents="New content")
   expected_status.tweak('D/H/psi', status='M ')
   svntest.actions.run_and_verify_merge(A_COPY_path, '2', '3',
@@ -15312,7 +15324,8 @@ def merge_automatic_conflict_resolution(
   svntest.actions.run_and_verify_svn(None, None, [],
                                      'revert', '--recursive', wc_dir)
   # Test --accept base
-  expected_output = wc.State(A_COPY_path, {'D/H/psi' : Item(status='U ')})
+  ### TODO: Also test that the output has a 'Resolved' line for this path.
+  expected_output = wc.State(A_COPY_path, {'D/H/psi' : Item(status='C ')})
   expected_elision_output = wc.State(A_COPY_path, {
     })
   expected_disk.tweak('D/H/psi', contents="This is the file 'psi'.\n")
@@ -16768,6 +16781,8 @@ def merge_adds_subtree_with_mergeinfo(sb
   "merge adds subtree with mergeinfo"
 
   sbox.build()
+  os.chdir(sbox.wc_dir)
+  sbox.wc_dir = ''
   wc_dir = sbox.wc_dir
   wc_disk, wc_status = set_up_branch(sbox, False, 2)
 
@@ -16896,6 +16911,8 @@ def reverse_merge_adds_subtree(sbox):
   "reverse merge adds subtree"
 
   sbox.build()
+  os.chdir(sbox.wc_dir)
+  sbox.wc_dir = ''
   wc_dir = sbox.wc_dir
   wc_disk, wc_status = set_up_branch(sbox)
 
@@ -17031,6 +17048,8 @@ def merged_deletion_causes_tree_conflict
   "merged deletion causes spurious tree conflict"
 
   sbox.build()
+  os.chdir(sbox.wc_dir)
+  sbox.wc_dir = ''
   wc_dir = sbox.wc_dir
 
   A_path        = sbox.ospath('A')
@@ -17103,6 +17122,8 @@ def record_only_merge_adds_new_subtree_m
   "record only merge adds new subtree mergeinfo"
 
   sbox.build()
+  os.chdir(sbox.wc_dir)
+  sbox.wc_dir = ''
   wc_dir = sbox.wc_dir
   wc_disk, wc_status = set_up_branch(sbox)
 
@@ -17398,6 +17419,8 @@ def svnmucc_abuse_1(sbox):
   "svnmucc: merge a replacement"
 
   sbox.build()
+  os.chdir(sbox.wc_dir)
+  sbox.wc_dir = ''
   wc_dir = sbox.wc_dir
 
   ## Using A/ as our trunk, since one cannot replace the root.
@@ -17452,6 +17475,8 @@ def merge_source_with_replacement(sbox):
   "replacement in merge source not notified correctly"
 
   sbox.build()
+  os.chdir(sbox.wc_dir)
+  sbox.wc_dir = ''
   wc_dir = sbox.wc_dir
 
   # Some paths we'll care about.
@@ -17552,6 +17577,8 @@ def reverse_merge_with_rename(sbox):
   "reverse merge applies revs in reverse order"
 
   sbox.build()
+  os.chdir(sbox.wc_dir)
+  sbox.wc_dir = ''
   wc_dir = sbox.wc_dir
 
   # Some paths we'll care about.
@@ -17634,15 +17661,17 @@ def reverse_merge_with_rename(sbox):
 def merge_adds_then_deletes_subtree(sbox):
   "merge adds then deletes subtree"
 
+  sbox.build()
+  os.chdir(sbox.wc_dir)
+  sbox.wc_dir = ''
+  wc_dir = sbox.wc_dir
+
   # Some paths we'll care about.
   A_path         = sbox.ospath('A')
   nu_path        = sbox.ospath('A/C/nu')
   C_branch_path  = sbox.ospath('branch/C')
   nu_branch_path = sbox.ospath('branch/C/nu')
 
-  sbox.build()
-  wc_dir = sbox.wc_dir
-
   # Make a branch.
   svntest.actions.run_and_verify_svn(None, None, [], 'copy',
                                      sbox.repo_url + '/A',
@@ -17704,6 +17733,11 @@ def merge_adds_then_deletes_subtree(sbox
 def merge_with_added_subtrees_with_mergeinfo(sbox):
   "merge with added subtrees with mergeinfo"
 
+  sbox.build()
+  os.chdir(sbox.wc_dir)
+  sbox.wc_dir = ''
+  wc_dir = sbox.wc_dir
+
   # Some paths we'll care about.
   A_path      = sbox.ospath('A')
   Y_path      = sbox.ospath('A/C/X/Y')
@@ -17714,9 +17748,6 @@ def merge_with_added_subtrees_with_merge
   W_COPY_path = sbox.ospath('A_COPY/C/X/Y/Z/W')
   A_COPY2_path = sbox.ospath('A_COPY_2')
 
-  sbox.build()
-  wc_dir = sbox.wc_dir
-
   # Make two branches of ^/A and then make a few edits under A in r4-7:
   wc_disk, wc_status = set_up_branch(sbox, nbr_of_branches=2)
 
@@ -17876,6 +17907,11 @@ def merge_with_added_subtrees_with_merge
 def merge_with_externals_with_mergeinfo(sbox):
   "merge with externals with mergeinfo"
 
+  sbox.build()
+  os.chdir(sbox.wc_dir)
+  sbox.wc_dir = ''
+  wc_dir = sbox.wc_dir
+
   # Some paths we'll care about.
   A_path = sbox.ospath('A')
   A_COPY_path = sbox.ospath('A_COPY')
@@ -17883,9 +17919,6 @@ def merge_with_externals_with_mergeinfo(
   mu_COPY_path = sbox.ospath('A_COPY/mu')
   mu_path = sbox.ospath('A/mu')
 
-  sbox.build()
-  wc_dir = sbox.wc_dir
-
   # Make a branch of ^/A and then make a few edits under A in r3-6:
   wc_disk, wc_status = set_up_branch(sbox)
 
@@ -18057,6 +18090,8 @@ def merge_target_selection(sbox):
   "merge target selection handling"
 
   sbox.build()
+  os.chdir(sbox.wc_dir)
+  sbox.wc_dir = ''
 
   # r2
   sbox.simple_mkdir('dir')
@@ -18152,6 +18187,8 @@ def merge_properties_on_adds(sbox):
   "merged directory properties are added"
 
   sbox.build()
+  os.chdir(sbox.wc_dir)
+  sbox.wc_dir = ''
 
   sbox.simple_copy('A/D/G', 'G')
 
@@ -18284,7 +18321,8 @@ class RangeList(list):
 def expected_merge_output2(tgt_ospath,
                            recorded_ranges,
                            merged_ranges=None,
-                           prop_conflicts=0):
+                           prop_conflicts=0,
+                           prop_resolved=0):
   """Return an ExpectedOutput instance corresponding to the expected
      output of a merge into TGT_OSPATH, with one 'recording
      mergeinfo...' notification per specified revision range in
@@ -18306,7 +18344,7 @@ def expected_merge_output2(tgt_ospath,
     # List of mergeinfo-strings => list of rangelists
     merged_ranges = [RangeList(r) for r in merged_ranges]
 
-  status_letters_re = prop_conflicts and ' [UC]' or ' U'
+  status_letters_re = (prop_conflicts or prop_resolved) and ' [UC]' or ' U'
   status_letters_mi = ' [UG]'
   lines = []
   for i, rr in enumerate(recorded_ranges):
@@ -18325,14 +18363,19 @@ def expected_merge_output2(tgt_ospath,
     lines += [status_letters_mi + '   ' + re.escape(tgt_ospath) + '\n']
 
   # Summary of conflicts
-  lines += svntest.main.summary_of_conflicts(prop_conflicts=prop_conflicts)
-
-  return RegexListOutput(lines)
+  lines += svntest.main.summary_of_conflicts(prop_conflicts=prop_conflicts,
+                                             prop_resolved=prop_resolved,
+                                             as_regex=True)
+
+  # The 'match_all=False' is because we also expect some
+  # 'Resolved conflicted state of ...' lines.
+  return RegexListOutput(lines, match_all=False)
 
 def expected_out_and_err(tgt_ospath,
                            recorded_ranges,
                            merged_ranges=None,
                            prop_conflicts=0,
+                           prop_resolved=0,
                            expect_error=True):
   """Return a tuple (expected_out, expected_err) giving the expected
      output and expected error output for a merge into TGT_OSPATH. See
@@ -18342,7 +18385,8 @@ def expected_out_and_err(tgt_ospath,
      raised.
   """
   expected_out = expected_merge_output2(tgt_ospath, recorded_ranges,
-                                        merged_ranges, prop_conflicts)
+                                        merged_ranges,
+                                        prop_conflicts, prop_resolved)
   if expect_error:
     expected_err = RegexListOutput([
                      '^svn: E155015: .* conflicts were produced .* into$',
@@ -18386,6 +18430,8 @@ def conflict_aborted_mergeinfo_described
   "conflicted split merge can be repeated"
 
   sbox.build()
+  os.chdir(sbox.wc_dir)
+  sbox.wc_dir = ''
 
   trunk = 'A'
   branch = 'A2'
@@ -18576,6 +18622,8 @@ def multiple_editor_drive_merge_notifica
   "each editor drive gets its own notification"
 
   sbox.build()
+  os.chdir(sbox.wc_dir)
+  sbox.wc_dir = ''
 
   iota_branch_path = sbox.ospath('iota-copy')
   C_branch_path = sbox.ospath('branch')
@@ -18664,6 +18712,8 @@ def multiple_editor_drive_merge_notifica
 def single_editor_drive_merge_notifications(sbox):
   "single editor drive merge notifications"
   sbox.build()
+  os.chdir(sbox.wc_dir)
+  sbox.wc_dir = ''
   wc_dir = sbox.wc_dir
 
   A_copy_path = sbox.ospath('A_COPY')
@@ -18747,6 +18797,202 @@ def single_editor_drive_merge_notificati
                                      '-r9:2', sbox.repo_url + '/A',
                                      A_copy_path)
 
+@SkipUnless(server_has_mergeinfo)
+@Issue(4316)  # 'Merge errors out after resolving conflicts'
+# Very similar to conflict_aborted_mergeinfo_described_partial_merge()
+# (test number 135), except here we tell the merge to resolve the
+# conflicts that are generated part way through a multi-revision-range
+# merge, and we expect it to continue with the rest of the merge.
+def conflicted_split_merge_with_resolve(sbox):
+  "conflicted split merge with resolve"
+
+  sbox.build()
+  os.chdir(sbox.wc_dir)
+  sbox.wc_dir = ''
+
+  trunk = 'A'
+  branch = 'A2'
+  file = 'mu'
+  dir = 'B'
+  trunk_file = 'A/mu'
+  trunk_dir = 'A/B'
+
+  # r2: initial state
+  for rev in range(4, 11):
+    sbox.simple_propset('prop-' + str(rev), 'Old pval ' + str(rev),
+                        trunk_file, trunk_dir)
+  sbox.simple_commit()
+
+  # r3: branch
+  sbox.simple_update()
+  sbox.simple_copy(trunk, branch)
+  sbox.simple_commit()
+
+  zero_rev = 3
+
+  def edit_file_or_dir(path, rev, val):
+    """Make a local edit to the file at PATH."""
+    sbox.simple_propset('prop-' + str(rev), val + ' pval ' + str(rev), path)
+
+  # r4 through r10: simple edits
+  for rev in range(4, 11):
+    edit_file_or_dir(trunk_file, rev, 'Edited')
+    edit_file_or_dir(trunk_dir, rev, 'Edited')
+    sbox.simple_commit()
+
+  # r14: merge some changes to the branch so that later merges will be split
+  svntest.actions.run_and_verify_svn(None, None, [], 'merge', '-c5,9',
+                                     '^/' + trunk, sbox.ospath(branch),
+                                     '--accept', 'theirs-conflict')
+  sbox.simple_commit()
+  sbox.simple_update()
+
+  def revert_branch():
+    svntest.actions.run_and_verify_svn(None, None, [], 'revert', '-R',
+                                       sbox.ospath(branch))
+
+  def try_merge(relpath, conflict_rev, rev_args,
+                expected_out_err, expected_mi):
+    """Revert RELPATH in the branch; make a change that will conflict
+       with CONFLICT_REV if not None; merge RELPATH in the trunk
+       to RELPATH in the branch using revision arguments REV_ARGS (list of
+       '-r...' or '-c...' strings).
+
+       EXPECTED_OUT_ERR_MI is a tuple: (expected_out, expected_err,
+       expected_mi).  EXPECTED_OUT and EXPECTED_ERR are instances of
+       ExpectedOutput.
+
+       Expect to find mergeinfo EXPECTED_MI if not None.  EXPECTED_MI is
+       a single mergeinfo-string.
+    """
+    src_path = trunk + '/' + relpath
+    tgt_path = branch + '/' + relpath
+    tgt_ospath = sbox.ospath(tgt_path)
+
+    expected_out, expected_err = expected_out_err
+
+    revert_branch()
+
+    # Arrange for the merge to conflict at CONFLICT_REV.
+    if conflict_rev:
+      edit_file_or_dir(tgt_path, conflict_rev, 'Conflict')
+
+    src_url = '^/' + src_path + '@11'
+    svntest.actions.run_and_verify_svn(
+                      None, expected_out, expected_err,
+                      'merge', src_url, tgt_ospath, '--accept', 'mine-full',
+                      *rev_args)
+
+    if expected_mi is not None:
+      expected_mergeinfo = ['/' + src_path + ':' + expected_mi + '\n']
+      check_mergeinfo(expected_mergeinfo, tgt_ospath)
+
+  # In a mergeinfo-aware merge, each specified revision range is split
+  # internally into sub-ranges, to avoid any already-merged revisions.
+  #
+  # From white-box inspection, we see there are code paths that treat
+  # the last specified range and the last sub-range specially.  The
+  # first specified range or sub-range is not treated specially in terms
+  # of the code paths, although it might be in terms of data flow.
+  #
+  # We test merges that raise a conflict in the first and last sub-range
+  # of the first and last specified range.
+
+  for target in [file, dir]:
+
+    tgt_ospath = sbox.ospath(branch + '/' + target)
+
+    # First test: Merge "everything" to the branch.
+    #
+    # This merge is split into three sub-ranges: r3-4, r6-8, r10-head.
+    # We have arranged that the merge will raise a conflict in the first
+    # sub-range.  Since we are postponing conflict resolution, the merge
+    # should stop after the first sub-range, allowing us to resolve and
+    # repeat the merge at which point the next sub-range(s) can be merged.
+    # The mergeinfo on the target then should only reflect that the first
+    # sub-range (r3-4) has been merged.
+    expect = expected_out_and_err(tgt_ospath,
+                                  '3-4,6-11',
+                                  ['3-4', '6-8,10-11'],
+                                  prop_resolved=1, expect_error=False)
+    try_merge(target, 4, [], expect, '3-11')
+
+    # Try a multiple-range merge that raises a conflict in the
+    # first sub-range in the first specified range;
+    expect = expected_out_and_err(tgt_ospath,
+                                  '4,6,8-10',
+                                  ['4', '6', '8,10'],
+                                  prop_resolved=1, expect_error=False)
+    try_merge(target, 4, ['-c4-6,8-10'], expect, '4-6,8-10')
+    # last sub-range in the first specified range;
+    expect = expected_out_and_err(tgt_ospath,
+                                  '4-6,8-10', ['4,6', '8,10'],
+                                  prop_resolved=1, expect_error=False)
+    try_merge(target, 6, ['-c4-6,8-10'], expect, '4-6,8-10')
+    # first sub-range in the last specified range;
+    expect = expected_out_and_err(tgt_ospath,
+                                  '4-6,8,10',
+                                  ['4,6', '8', '10'],
+                                  prop_resolved=1, expect_error=False)
+    try_merge(target, 8, ['-c4-6,8-10'], expect, '4-6,8-10')
+    # last sub-range in the last specified range.
+    # (Expect no error, because 'svn merge' does not throw an error if
+    # there is no more merging to do when a conflict occurs.)
+    expect = expected_out_and_err(tgt_ospath,
+                                  '4-6,8-10', ['4,6', '8,10'],
+                                  prop_resolved=1, expect_error=False)
+    try_merge(target, 10, ['-c4-6,8-10'], expect, '4-6,8-10')
+
+    # Try similar merges but involving ranges in reverse order.
+    expect = expected_out_and_err(tgt_ospath,
+                                  '8', ['8'],
+                                  prop_resolved=1, expect_error=False)
+    try_merge(target, 8,  ['-c8-10,4-6'], expect, '4-6,8-10')
+    expect = expected_out_and_err(tgt_ospath,
+                                  '8-10', ['8,10'],
+                                  prop_resolved=1, expect_error=False)
+    try_merge(target, 10, ['-c8-10,4-6'], expect, '4-6,8-10')
+    expect = expected_out_and_err(tgt_ospath,
+                                  '8-10,4', ['8,10', '4'],
+                                  prop_resolved=1, expect_error=False)
+    try_merge(target, 4,  ['-c8-10,4-6'], expect, '4-6,8-10')
+    expect = expected_out_and_err(tgt_ospath,
+                                  '8-10,4-6', ['8,10', '4,6'],
+                                  prop_resolved=1, expect_error=False)
+    try_merge(target, 6,  ['-c8-10,4-6'], expect, '4-6,8-10')
+
+    # Try some reverse merges, with ranges in forward and reverse order.
+    #
+    # Reverse merges start with all source changes merged except 5 and 9.
+    revert_branch()
+    simple_merge(trunk + '/' + target, sbox.ospath(branch + '/' + target),
+                 ['-c-5,-9,4,6-8,10'])
+    sbox.simple_commit()
+    sbox.simple_update()
+
+    expect = expected_out_and_err(tgt_ospath,
+                                  '6-4,10-8', ['-6,-4', '-10,-8'],
+                                  expect_error=False)
+    try_merge(target, None, ['-r6:3', '-r10:7'], expect, '7')
+    expect = expected_out_and_err(tgt_ospath,
+                                  '-6,-4,10-8',
+                                  ['-6', '-4', '-10,-8'],
+                                  prop_resolved=1, expect_error=False)
+    try_merge(target, 6,  ['-r6:3', '-r10:7'], expect, '7')
+    expect = expected_out_and_err(tgt_ospath,
+                                  '6-4,10-8', ['-6,-4', '-10,-8'],
+                                  prop_resolved=1, expect_error=False)
+    try_merge(target, 4,  ['-r6:3', '-r10:7'], expect, '7')
+    expect = expected_out_and_err(tgt_ospath,
+                                  '6-4,-10,-8',
+                                  ['-6,-4', '-10', '-8'],
+                                  prop_resolved=1, expect_error=False)
+    try_merge(target, 10, ['-r6:3', '-r10:7'], expect, '7')
+    expect = expected_out_and_err(tgt_ospath,
+                                  '6-4,10-8', ['-6,-4', '-10,-8'],
+                                  prop_resolved=1, expect_error=False)
+    try_merge(target, 8,  ['-r6:3', '-r10:7'], expect, '7')
+
 ########################################################################
 # Run the tests
 
@@ -18890,6 +19136,7 @@ test_list = [ None,
               conflict_aborted_mergeinfo_described_partial_merge,
               multiple_editor_drive_merge_notifications,
               single_editor_drive_merge_notifications,
+              conflicted_split_merge_with_resolve,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/fsfs-format7/subversion/tests/cmdline/stat_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/cmdline/stat_tests.py?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/cmdline/stat_tests.py (original)
+++ subversion/branches/fsfs-format7/subversion/tests/cmdline/stat_tests.py Sat Mar 30 20:02:27 2013
@@ -630,7 +630,16 @@ def get_text_timestamp(path):
     if re.match("^Text Last Updated", line):
       return line
   logger.warn("Didn't find text-time for %s", path)
-  raise svntest.Failure
+  raise svntest.Failure("didn't find text-time")
+
+def no_text_timestamp(path):
+  "ensure no text-time for path using svn info"
+  exit_code, out, err = svntest.actions.run_and_verify_svn(None, None, [],
+                                                           'info', path)
+  for line in out:
+    if re.match("^Text Last Updated", line):
+      logger.warn("Found text-time for %s", path)
+      raise svntest.Failure("found text-time")
 
 # Helper for timestamp_behaviour test
 def text_time_behaviour(wc_dir, wc_path, status_path, expected_status, cmd):
@@ -2015,6 +2024,74 @@ def status_case_changed(sbox):
                                                 expected_status)
 
 
+def move_update_timestamps(sbox):
+  "timestamp behaviour for move-update"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  sbox.simple_append('A/B/E/beta', 'X\nY\nZ\n', truncate=True)
+  sbox.simple_commit()
+  sbox.simple_append('A/B/E/alpha', 'modified alpha')
+  sbox.simple_append('A/B/E/beta', 'XX\nY\nZ\n', truncate=True)
+  sbox.simple_commit()
+  sbox.simple_update('', 2)
+
+  sbox.simple_append('A/B/E/beta', 'local beta')
+  src_time = get_text_timestamp(sbox.ospath('A/B/E/alpha'))
+  sbox.simple_move("A/B/E", "A/B/E2")
+  alpha_dst_time = get_text_timestamp(sbox.ospath('A/B/E2/alpha'))
+  beta_dst_time = get_text_timestamp(sbox.ospath('A/B/E2/beta'))
+  if src_time != alpha_dst_time:
+    raise svntest.Failure("move failed to copy timestamp")
+
+  expected_output = svntest.wc.State(wc_dir, {
+    'A/B/E'       : Item(status='  ', treeconflict='C'),
+    'A/B/E/alpha' : Item(status='  ', treeconflict='U'),
+    'A/B/E/beta'  : Item(status='  ', treeconflict='U'),
+  })
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 3)
+  expected_status.tweak('A/B/E',
+                        status='D ', treeconflict='C', moved_to='A/B/E2')
+  expected_status.tweak('A/B/E/alpha', 'A/B/E/beta', status='D ')
+  expected_status.add({
+      'A/B/E2'       : Item(status='A ', wc_rev='-', copied='+',
+                            moved_from='A/B/E'),
+      'A/B/E2/alpha' : Item(status='  ', wc_rev='-', copied='+'),
+      'A/B/E2/beta'  : Item(status='M ', wc_rev='-', copied='+'),
+      })
+  expected_disk = svntest.main.greek_state.copy()
+  expected_disk.remove('A/B/E', 'A/B/E/alpha', 'A/B/E/beta')
+  expected_disk.add({
+      'A/B/E2'       : Item(),
+      'A/B/E2/alpha' : Item("This is the file 'alpha'.\n"),
+      'A/B/E2/beta'  : Item("X\nY\nZ\nlocal beta"),
+      })
+  svntest.actions.run_and_verify_update(wc_dir,
+                                        expected_output,
+                                        expected_disk,
+                                        expected_status)
+
+  time.sleep(1.1)
+  svntest.actions.run_and_verify_svn("resolve failed", None, [],
+                                     'resolve',
+                                     '--accept=mine-conflict',
+                                     sbox.ospath('A/B/E'))
+  expected_status.tweak('A/B/E', treeconflict=None)
+  expected_status.tweak('A/B/E2/beta', status='M ')
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+  expected_disk.tweak('A/B/E2/beta', contents="XX\nY\nZ\nlocal beta")
+  expected_disk.tweak('A/B/E2/alpha', contents="This is the file 'alpha'.\nmodified alpha")
+  svntest.actions.verify_disk(wc_dir, expected_disk)
+
+  # alpha is pristine so gets a new timestamp
+  new_time = get_text_timestamp(sbox.ospath('A/B/E2/alpha'))
+  if new_time == alpha_dst_time:
+    raise svntest.Failure("move failed to update timestamp")
+
+  # beta is modified so timestamp is removed
+  no_text_timestamp(sbox.ospath('A/B/E2/beta'))
+
 ########################################################################
 # Run the tests
 
@@ -2061,6 +2138,7 @@ test_list = [ None,
               status_not_present,
               status_unversioned_dir,
               status_case_changed,
+              move_update_timestamps,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/fsfs-format7/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/cmdline/svntest/main.py?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/fsfs-format7/subversion/tests/cmdline/svntest/main.py Sat Mar 30 20:02:27 2013
@@ -547,7 +547,12 @@ def run_command_stdin(command, error_exp
   if (not error_expected) and ((stderr_lines) or (exit_code != 0)):
     for x in stderr_lines:
       logger.warning(x.rstrip())
-    raise Failure
+    if len(varargs) <= 5:
+      brief_command = ' '.join((command,) + varargs)
+    else:
+      brief_command = ' '.join(((command,) + varargs)[:4]) + ' ...'
+    raise Failure('Command failed: "' + brief_command +
+                  '"; exit code ' + str(exit_code))
 
   return exit_code, \
          filter_dbg(stdout_lines), \
@@ -1186,24 +1191,46 @@ def merge_notify_line(revstart=None, rev
       return "--- Merging %sr%ld through r%ld into '%s':\n" \
              % (from_foreign_phrase, revstart, revend, target_re)
 
-def summary_of_conflicts(text_conflicts=0, prop_conflicts=0,
-                         tree_conflicts=0, skipped_paths=0):
+def summary_of_conflicts(text_conflicts=0,
+                         prop_conflicts=0,
+                         tree_conflicts=0,
+                         text_resolved=0,
+                         prop_resolved=0,
+                         tree_resolved=0,
+                         skipped_paths=0,
+                         as_regex=False):
   """Return a list of lines corresponding to the summary of conflicts and
      skipped paths that is printed by merge and update and switch.  If all
      parameters are zero, return an empty list.
   """
   lines = []
-  if text_conflicts or prop_conflicts or tree_conflicts or skipped_paths:
+  if (text_conflicts or prop_conflicts or tree_conflicts
+      or text_resolved or prop_resolved or tree_resolved
+      or skipped_paths):
     lines.append("Summary of conflicts:\n")
-    if text_conflicts:
-      lines.append("  Text conflicts: %d\n" % text_conflicts)
-    if prop_conflicts:
-      lines.append("  Property conflicts: %d\n" % prop_conflicts)
-    if tree_conflicts:
-      lines.append("  Tree conflicts: %d\n" % tree_conflicts)
+    if text_conflicts or text_resolved:
+      if text_resolved == 0:
+        lines.append("  Text conflicts: %d\n" % text_conflicts)
+      else:
+        lines.append("  Text conflicts: %d remaining (and %d already resolved)\n"
+                     % (text_conflicts, text_resolved))
+    if prop_conflicts or prop_resolved:
+      if prop_resolved == 0:
+        lines.append("  Property conflicts: %d\n" % prop_conflicts)
+      else:
+        lines.append("  Property conflicts: %d remaining (and %d already resolved)\n"
+                     % (prop_conflicts, prop_resolved))
+    if tree_conflicts or tree_resolved:
+      if tree_resolved == 0:
+        lines.append("  Tree conflicts: %d\n" % tree_conflicts)
+      else:
+        lines.append("  Tree conflicts: %d remaining (and %d already resolved)\n"
+                     % (tree_conflicts, tree_resolved))
     if skipped_paths:
       lines.append("  Skipped paths: %d\n" % skipped_paths)
 
+  if as_regex:
+    lines = map(re.escape, lines)
   return lines
 
 

Modified: subversion/branches/fsfs-format7/subversion/tests/cmdline/update_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/cmdline/update_tests.py?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/cmdline/update_tests.py (original)
+++ subversion/branches/fsfs-format7/subversion/tests/cmdline/update_tests.py Sat Mar 30 20:02:27 2013
@@ -3694,7 +3694,7 @@ def update_copied_and_deleted_prop(sbox)
 
 #----------------------------------------------------------------------
 
-def update_output_with_conflicts(rev, target, paths=None):
+def update_output_with_conflicts(rev, target, paths=None, resolved=False):
   """Return the expected output for an update of TARGET to revision REV, in
      which all of the PATHS are updated and conflicting.
 
@@ -3707,19 +3707,19 @@ def update_output_with_conflicts(rev, ta
   for path in paths:
     lines += ['C    %s\n' % path]
   lines += ['Updated to revision %d.\n' % rev]
-  lines += svntest.main.summary_of_conflicts(text_conflicts=len(paths))
+  if resolved:
+    for path in paths:
+      lines += ["Resolved conflicted state of '%s'\n" % path]
+    lines += svntest.main.summary_of_conflicts(text_resolved=len(paths))
+  else:
+    lines += svntest.main.summary_of_conflicts(text_conflicts=len(paths))
   return lines
 
 def update_output_with_conflicts_resolved(rev, target, paths=None):
   """Like update_output_with_conflicts(), but where all of the conflicts are
      resolved within the update.
   """
-  if paths is None:
-    paths = [target]
-
-  lines = update_output_with_conflicts(rev, target, paths)
-  for path in paths:
-    lines += ["Resolved conflicted state of '%s'\n" % path]
+  lines = update_output_with_conflicts(rev, target, paths, resolved=True)
   return lines
 
 #----------------------------------------------------------------------
@@ -6128,7 +6128,6 @@ def break_moved_dir_edited_leaf_del(sbox
   expected_status.tweak('A/B/E2', moved_from=None)
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
-@XFail()
 @Issue(3144,3630)
 def break_moved_replaced_dir(sbox):
   "break local move of dir plus replace"
@@ -6182,13 +6181,14 @@ def break_moved_replaced_dir(sbox):
                                         None, None, None,
                                         None, None, 1)
 
-  # Now resolve the conflict, using --accept=theirs-conflict.
+  # Now resolve the conflict, using --accept=working
   # This should break the move of A/B/E to A/B/E2, leaving A/B/E2
   # as a copy. A/B/E is not reverted.
   svntest.actions.run_and_verify_svn("resolve failed", None, [],
                                      'resolve', '--recursive',
-                                     '--accept=theirs-conflict', wc_dir)
+                                     '--accept=working', wc_dir)
   expected_status.tweak('A/B/E2', moved_from=None)
+  expected_status.tweak('A/B/E', treeconflict=None, moved_to=None)
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
 @Issue(4295)

Modified: subversion/branches/fsfs-format7/subversion/tests/libsvn_diff/diff-diff3-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/libsvn_diff/diff-diff3-test.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/libsvn_diff/diff-diff3-test.c (original)
+++ subversion/branches/fsfs-format7/subversion/tests/libsvn_diff/diff-diff3-test.c Sat Mar 30 20:02:27 2013
@@ -241,6 +241,12 @@ two_way_diff(const char *filename1,
   svn_stringbuf_t *actual;
   char *diff_name = apr_psprintf(pool, "diff-%s-%s", filename1, filename2);
 
+  /* Some of the tests have lots of lines, although not much data as
+     the lines are short, and the in-memory diffs allocate a lot of
+     memory.  Since we are doing multiple diff in a single test we use
+     a subpool to reuse that memory. */
+  apr_pool_t *subpool = svn_pool_create(pool);
+
   /* We have an EXPECTED string we can match, because we don't support
      any other combinations (yet) than the ones above. */
   svn_string_t *original = svn_string_create(contents1, pool);
@@ -248,7 +254,8 @@ two_way_diff(const char *filename1,
 
   options = options ? options : svn_diff_file_options_create(pool);
 
-  SVN_ERR(svn_diff_mem_string_diff(&diff, original, modified, options, pool));
+  SVN_ERR(svn_diff_mem_string_diff(&diff, original, modified, options,
+                                   subpool));
 
   actual = svn_stringbuf_create_empty(pool);
   ostream = svn_stream_from_stringbuf(actual, pool);
@@ -256,7 +263,8 @@ two_way_diff(const char *filename1,
   SVN_ERR(svn_diff_mem_string_output_unified(ostream, diff,
                                              filename1, filename2,
                                              SVN_APR_LOCALE_CHARSET,
-                                             original, modified, pool));
+                                             original, modified, subpool));
+  svn_pool_clear(subpool);
   SVN_ERR(svn_stream_close(ostream));
   if (strcmp(actual->data, expected) != 0)
     return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
@@ -311,11 +319,13 @@ two_way_diff(const char *filename1,
   SVN_ERR(three_way_merge(filename1, filename2, filename1,
                           contents1, contents2, contents1, contents2, NULL,
                           svn_diff_conflict_display_modified_latest,
-                          pool));
+                          subpool));
+  svn_pool_clear(subpool);
   SVN_ERR(three_way_merge(filename2, filename1, filename2,
                           contents2, contents1, contents2, contents1, NULL,
                           svn_diff_conflict_display_modified_latest,
-                          pool));
+                          subpool));
+  svn_pool_destroy(subpool);
 
   SVN_ERR(svn_io_remove_file2(diff_name, TRUE, pool));
 
@@ -2565,20 +2575,22 @@ static svn_error_t *
 test_token_compare(apr_pool_t *pool)
 {
   apr_size_t chunk_size = 1 << 17;
-  const char *pattern = "\n\n\n\n\n\n\n\n";
+  const char *pattern = "ABCDEFG\n";
   svn_stringbuf_t *original, *modified;
   svn_diff_file_options_t *diff_opts = svn_diff_file_options_create(pool);
 
   diff_opts->ignore_space = svn_diff_file_ignore_space_all;
 
-  original = svn_stringbuf_create_ensure(chunk_size, pool);
+  original = svn_stringbuf_create_ensure(chunk_size * 2 + 8, pool);
+  /* CHUNK_SIZE bytes */
   while (original->len < chunk_size - 8)
     {
       svn_stringbuf_appendcstr(original, pattern);
     }
   svn_stringbuf_appendcstr(original, "    @@@\n");
 
-  modified = svn_stringbuf_create_ensure(chunk_size, pool);
+  modified = svn_stringbuf_create_ensure(chunk_size * 2 + 9, pool);
+  /* CHUNK_SIZE+1 bytes, one ' ' more than original */
   while (modified->len < chunk_size - 8)
     {
       svn_stringbuf_appendcstr(modified, pattern);
@@ -2600,13 +2612,43 @@ test_token_compare(apr_pool_t *pool)
                                     "--- token-compare-original2" NL
                                     "+++ token-compare-modified2" NL
                                     "@@ -%u,4 +%u,4 @@"  NL
-                                    " \n"
-                                    " \n"
+                                    " ABCDEFG\n"
+                                    " ABCDEFG\n"
                                     "     @@@\n"
                                     "-aaaaaaa\n"
                                     "+bbbbbbb\n",
-                                    1 +(unsigned int)chunk_size - 8 + 1 - 3,
-                                    1 +(unsigned int)chunk_size - 8 + 1 - 3),
+                                    (unsigned int)chunk_size/8 - 2,
+                                    (unsigned int)chunk_size/8 - 2),
+                       diff_opts, pool));
+
+  /* CHUNK_SIZE*2 bytes */
+  while (original->len <= chunk_size * 2 - 8)
+    {
+      svn_stringbuf_appendcstr(original, pattern);
+    }
+
+  /* CHUNK_SIZE*2+1 bytes, one ' ' more than original */
+  while (modified->len <= chunk_size * 2 - 7)
+    {
+      svn_stringbuf_appendcstr(modified, pattern);
+    }
+
+  SVN_ERR(two_way_diff("token-compare-original2", "token-compare-modified2",
+                       original->data, modified->data,
+                       apr_psprintf(pool,
+                                    "--- token-compare-original2" NL
+                                    "+++ token-compare-modified2" NL
+                                    "@@ -%u,7 +%u,7 @@"  NL
+                                    " ABCDEFG\n"
+                                    " ABCDEFG\n"
+                                    "     @@@\n"
+                                    "-aaaaaaa\n"
+                                    "+bbbbbbb\n"
+                                    " ABCDEFG\n"
+                                    " ABCDEFG\n"
+                                    " ABCDEFG\n",
+                                    (unsigned int)chunk_size/8 - 2,
+                                    (unsigned int)chunk_size/8 - 2),
                        diff_opts, pool));
 
   return SVN_NO_ERROR;

Modified: subversion/branches/fsfs-format7/subversion/tests/libsvn_fs/fs-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/libsvn_fs/fs-test.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/libsvn_fs/fs-test.c (original)
+++ subversion/branches/fsfs-format7/subversion/tests/libsvn_fs/fs-test.c Sat Mar 30 20:02:27 2013
@@ -4934,6 +4934,54 @@ delete_fs(const svn_test_opts_t *opts,
   return SVN_NO_ERROR;
 }
 
+/* Issue 4340, "fs layer should reject filenames with trailing \n" */
+static svn_error_t *
+filename_trailing_newline(const svn_test_opts_t *opts,
+                          apr_pool_t *pool)
+{
+  apr_pool_t *subpool = svn_pool_create(pool);
+  svn_fs_t *fs;
+  svn_fs_txn_t *txn;
+  svn_fs_root_t *txn_root, *root;
+  svn_revnum_t youngest_rev = 0;
+  svn_error_t *err;
+  svn_boolean_t allow_newlines;
+  
+  /* Some filesystem implementations can handle newlines in filenames
+   * and can be white-listed here.
+   * Currently, only BDB supports \n in filenames. */
+  allow_newlines = (strcmp(opts->fs_type, "bdb") == 0);
+
+  SVN_ERR(svn_test__create_fs(&fs, "test-repo-filename-trailing-newline",
+                              opts, pool));
+
+  /* Revision 1:  Add a directory /foo  */
+  SVN_ERR(svn_fs_begin_txn(&txn, fs, youngest_rev, subpool));
+  SVN_ERR(svn_fs_txn_root(&txn_root, txn, subpool));
+  SVN_ERR(svn_fs_make_dir(txn_root, "/foo", subpool));
+  SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
+  svn_pool_clear(subpool);
+
+  /* Attempt to copy /foo to "/bar\n". This should fail on FSFS. */
+  SVN_ERR(svn_fs_begin_txn(&txn, fs, youngest_rev, subpool));
+  SVN_ERR(svn_fs_txn_root(&txn_root, txn, subpool));
+  SVN_ERR(svn_fs_revision_root(&root, fs, youngest_rev, subpool));
+  err = svn_fs_copy(root, "/foo", txn_root, "/bar\n", subpool);
+  if (allow_newlines)
+    SVN_TEST_ASSERT(err == SVN_NO_ERROR);
+  else
+    SVN_TEST_ASSERT_ERROR(err, SVN_ERR_FS_PATH_SYNTAX);
+
+  /* Attempt to create a file /foo/baz\n. This should fail on FSFS. */
+  err = svn_fs_make_file(txn_root, "/foo/baz\n", subpool);
+  if (allow_newlines)
+    SVN_TEST_ASSERT(err == SVN_NO_ERROR);
+  else
+    SVN_TEST_ASSERT_ERROR(err, SVN_ERR_FS_PATH_SYNTAX);
+
+  return SVN_NO_ERROR;
+}
 
 
 /* ------------------------------------------------------------------------ */
@@ -5016,5 +5064,7 @@ struct svn_test_descriptor_t test_funcs[
                        "test svn_fs_node_history"),
     SVN_TEST_OPTS_PASS(delete_fs,
                        "test svn_fs_delete_fs"),
+    SVN_TEST_OPTS_PASS(filename_trailing_newline,
+                       "filenames with trailing \\n might be rejected"),
     SVN_TEST_NULL
   };

Modified: subversion/branches/fsfs-format7/subversion/tests/libsvn_repos/repos-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/libsvn_repos/repos-test.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/libsvn_repos/repos-test.c (original)
+++ subversion/branches/fsfs-format7/subversion/tests/libsvn_repos/repos-test.c Sat Mar 30 20:02:27 2013
@@ -3164,6 +3164,101 @@ test_delete_repos(const svn_test_opts_t 
 
   return SVN_NO_ERROR;
 }
+
+/* Related to issue 4340, "fs layer should reject filenames with trailing \n" */
+static svn_error_t *
+filename_with_control_chars(const svn_test_opts_t *opts,
+                            apr_pool_t *pool)
+{
+  apr_pool_t *subpool = svn_pool_create(pool);
+  svn_repos_t *repos;
+  svn_fs_t *fs;
+  svn_fs_txn_t *txn;
+  svn_fs_root_t *txn_root;
+  svn_revnum_t youngest_rev = 0;
+  svn_error_t *err;
+  static const char *bad_paths[] = {
+    "/bar\t",
+    "/bar\n",
+    "/\barb\az",
+    "/\x02 baz",
+    NULL,
+  };
+  const char *p;
+  int i;
+  void *edit_baton;
+  void *root_baton;
+  void *out_baton;
+  const svn_delta_editor_t *editor;
+
+  /* Create the repository. */
+  SVN_ERR(svn_test__create_repos(&repos, "test-repos-filename-with-cntrl-chars",
+                                 opts, pool));
+  fs = svn_repos_fs(repos);
+
+  /* Revision 1:  Add a directory /foo  */
+  SVN_ERR(svn_fs_begin_txn(&txn, fs, youngest_rev, subpool));
+  SVN_ERR(svn_fs_txn_root(&txn_root, txn, subpool));
+  SVN_ERR(svn_fs_make_dir(txn_root, "/foo", subpool));
+  SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
+  svn_pool_clear(subpool);
+
+  /* Checks for control characters are implemented in the commit editor,
+   * not in the FS API. */
+  SVN_ERR(svn_fs_begin_txn(&txn, fs, youngest_rev, pool));
+  SVN_ERR(svn_repos_get_commit_editor4(&editor, &edit_baton, repos,
+                                       txn, "file://test", "/",
+                                       "plato", "test commit",
+                                       dummy_commit_cb, NULL, NULL, NULL,
+                                       pool));
+
+  SVN_ERR(editor->open_root(edit_baton, 1, pool, &root_baton));
+
+  /* Attempt to copy /foo to a bad path P. This should fail. */
+  i = 0;
+  do
+    {
+      p = bad_paths[i++];
+      if (p == NULL)
+        break;
+      svn_pool_clear(subpool);
+      err = editor->add_directory(p, root_baton, "/foo", 1, subpool,
+                                  &out_baton);
+      SVN_TEST_ASSERT_ERROR(err, SVN_ERR_FS_PATH_SYNTAX);
+  } while (p);
+
+  /* Attempt to add a file with bad path P. This should fail. */
+  i = 0;
+  do
+    {
+      p = bad_paths[i++];
+      if (p == NULL)
+        break;
+      svn_pool_clear(subpool);
+      err = editor->add_file(p, root_baton, NULL, SVN_INVALID_REVNUM,
+                             subpool, &out_baton);
+      SVN_TEST_ASSERT_ERROR(err, SVN_ERR_FS_PATH_SYNTAX);
+  } while (p);
+
+
+  /* Attempt to add a directory with bad path P. This should fail. */
+  i = 0;
+  do
+    {
+      p = bad_paths[i++];
+      if (p == NULL)
+        break;
+      svn_pool_clear(subpool);
+      err = editor->add_directory(p, root_baton, NULL, SVN_INVALID_REVNUM,
+                                  subpool, &out_baton);
+      SVN_TEST_ASSERT_ERROR(err, SVN_ERR_FS_PATH_SYNTAX);
+  } while (p);
+
+  SVN_ERR(editor->abort_edit(edit_baton, subpool));
+
+  return SVN_NO_ERROR;
+}
 
 /* The test table.  */
 
@@ -3208,5 +3303,7 @@ struct svn_test_descriptor_t test_funcs[
                        "test issue 4060"),
     SVN_TEST_OPTS_PASS(test_delete_repos,
                        "test svn_repos_delete"),
+    SVN_TEST_OPTS_PASS(filename_with_control_chars,
+                       "test filenames with control characters"),
     SVN_TEST_NULL
   };

Modified: subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/checksum-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/checksum-test.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/checksum-test.c (original)
+++ subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/checksum-test.c Sat Mar 30 20:02:27 2013
@@ -113,6 +113,48 @@ test_pseudo_md5(apr_pool_t *pool)
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+zero_match(apr_pool_t *pool)
+{
+  svn_checksum_t *zero_md5;
+  svn_checksum_t *zero_sha1;
+  svn_checksum_t *A_md5;
+  svn_checksum_t *B_md5;
+  svn_checksum_t *A_sha1;
+  svn_checksum_t *B_sha1;
+  
+  
+  zero_md5 = svn_checksum_create(svn_checksum_md5, pool);
+  SVN_ERR(svn_checksum_clear(zero_md5));
+  SVN_ERR(svn_checksum(&A_md5, svn_checksum_md5, "A", 1, pool));
+  SVN_ERR(svn_checksum(&B_md5, svn_checksum_md5, "B", 1, pool));
+
+  zero_sha1 = svn_checksum_create(svn_checksum_sha1, pool);
+  SVN_ERR(svn_checksum_clear(zero_sha1));
+  SVN_ERR(svn_checksum(&A_sha1, svn_checksum_sha1, "A", 1, pool));
+  SVN_ERR(svn_checksum(&B_sha1, svn_checksum_sha1, "B", 1, pool));
+
+  /* Different non-zero don't match. */
+  SVN_TEST_ASSERT(!svn_checksum_match(A_md5, B_md5));
+  SVN_TEST_ASSERT(!svn_checksum_match(A_sha1, B_sha1));
+  SVN_TEST_ASSERT(!svn_checksum_match(A_md5, A_sha1));
+  SVN_TEST_ASSERT(!svn_checksum_match(A_md5, B_sha1));
+
+  /* Zero matches anything of the same kind. */
+  SVN_TEST_ASSERT(svn_checksum_match(A_md5, zero_md5));
+  SVN_TEST_ASSERT(svn_checksum_match(zero_md5, B_md5));
+  SVN_TEST_ASSERT(svn_checksum_match(A_sha1, zero_sha1));
+  SVN_TEST_ASSERT(svn_checksum_match(zero_sha1, B_sha1));
+
+  /* Zero doesn't match anything of a different kind... */
+  SVN_TEST_ASSERT(!svn_checksum_match(zero_md5, A_sha1));
+  SVN_TEST_ASSERT(!svn_checksum_match(zero_sha1, A_md5));
+  /* ...even another zero. */
+  SVN_TEST_ASSERT(!svn_checksum_match(zero_md5, zero_sha1));
+
+  return SVN_NO_ERROR;
+}
+
 /* An array of all test functions */
 struct svn_test_descriptor_t test_funcs[] =
   {
@@ -123,5 +165,7 @@ struct svn_test_descriptor_t test_funcs[
                    "checksum emptiness"),
     SVN_TEST_PASS2(test_pseudo_md5,
                    "pseudo-md5 compatibility"),
+    SVN_TEST_PASS2(zero_match,
+                   "zero checksum matching"),
     SVN_TEST_NULL
   };

Modified: subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/mergeinfo-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/mergeinfo-test.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/mergeinfo-test.c (original)
+++ subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/mergeinfo-test.c Sat Mar 30 20:02:27 2013
@@ -28,6 +28,7 @@
 
 #define SVN_DEPRECATED
 
+#include "svn_hash.h"
 #include "svn_pools.h"
 #include "svn_types.h"
 #include "svn_mergeinfo.h"

Modified: subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/db-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/db-test.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/db-test.c (original)
+++ subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/db-test.c Sat Mar 30 20:02:27 2013
@@ -378,7 +378,7 @@ static svn_error_t *
 test_getting_info(apr_pool_t *pool)
 {
   const char *local_abspath;
-  svn_kind_t kind;
+  svn_node_kind_t kind;
   svn_wc__db_status_t status;
   svn_revnum_t revision;
   const char *repos_relpath;
@@ -408,7 +408,7 @@ test_getting_info(apr_pool_t *pool)
             &update_root,
             db, local_abspath,
             pool, pool));
-  SVN_TEST_ASSERT(kind == svn_kind_dir);
+  SVN_TEST_ASSERT(kind == svn_node_dir);
   SVN_TEST_ASSERT(status == svn_wc__db_status_normal);
   SVN_TEST_ASSERT(revision == 1);
   SVN_TEST_STRING_ASSERT(repos_relpath, "");
@@ -434,7 +434,7 @@ test_getting_info(apr_pool_t *pool)
             NULL, NULL, NULL,
             db, svn_dirent_join(local_abspath, "A", pool),
             pool, pool));
-  SVN_TEST_ASSERT(kind == svn_kind_file);
+  SVN_TEST_ASSERT(kind == svn_node_file);
   SVN_TEST_STRING_ASSERT(SHA1_1, svn_checksum_to_cstring(checksum, pool));
   SVN_TEST_STRING_ASSERT(repos_relpath, "A");
   SVN_TEST_STRING_ASSERT(repos_root_url, ROOT_ONE);
@@ -449,7 +449,7 @@ test_getting_info(apr_pool_t *pool)
             NULL, NULL, NULL,
             db, svn_dirent_join(local_abspath, "B", pool),
             pool, pool));
-  SVN_TEST_ASSERT(kind == svn_kind_symlink);
+  SVN_TEST_ASSERT(kind == svn_node_symlink);
   SVN_TEST_ASSERT(status == svn_wc__db_status_excluded);
   SVN_TEST_ASSERT(!SVN_IS_VALID_REVNUM(revision));
   SVN_TEST_STRING_ASSERT(repos_relpath, "B");
@@ -472,7 +472,7 @@ test_getting_info(apr_pool_t *pool)
             NULL, NULL, NULL, NULL,
             db, svn_dirent_join(local_abspath, "C", pool),
             pool, pool));
-  SVN_TEST_ASSERT(kind == svn_kind_unknown);
+  SVN_TEST_ASSERT(kind == svn_node_unknown);
   SVN_TEST_ASSERT(status == svn_wc__db_status_server_excluded);
 
   /* Test: not-present presence. */
@@ -556,12 +556,12 @@ static svn_error_t *
 validate_node(svn_wc__db_t *db,
               const char *local_abspath,
               const char *relpath,
-              svn_kind_t expected_kind,
+              svn_node_kind_t expected_kind,
               svn_wc__db_status_t expected_status,
               apr_pool_t *scratch_pool)
 {
   const char *path = svn_dirent_join(local_abspath, relpath, scratch_pool);
-  svn_kind_t kind;
+  svn_node_kind_t kind;
   svn_wc__db_status_t status;
   apr_hash_t *props;
   const svn_string_t *value;
@@ -691,7 +691,7 @@ test_inserting_nodes(apr_pool_t *pool)
   SVN_ERR(svn_wc__db_base_add_excluded_node(
             db, svn_dirent_join(local_abspath, "N/N-b", pool),
             "N/N-b", ROOT_ONE, UUID_ONE, 3,
-            svn_kind_file, svn_wc__db_status_server_excluded,
+            svn_node_file, svn_wc__db_status_server_excluded,
             NULL, NULL,
             pool));
 
@@ -699,7 +699,7 @@ test_inserting_nodes(apr_pool_t *pool)
   SVN_ERR(svn_wc__db_base_add_excluded_node(
             db, svn_dirent_join(local_abspath, "P", pool),
             "P", ROOT_ONE, UUID_ONE, 3,
-            svn_kind_dir, svn_wc__db_status_excluded,
+            svn_node_dir, svn_wc__db_status_excluded,
             NULL, NULL,
             pool));
 
@@ -707,7 +707,7 @@ test_inserting_nodes(apr_pool_t *pool)
   SVN_ERR(svn_wc__db_base_add_not_present_node(
             db, svn_dirent_join(local_abspath, "Q", pool),
             "Q", ROOT_ONE, UUID_ONE, 3,
-            svn_kind_symlink,
+            svn_node_symlink,
             NULL, NULL,
             pool));
 
@@ -715,36 +715,36 @@ test_inserting_nodes(apr_pool_t *pool)
   SVN_ERR(svn_wc__db_base_add_excluded_node(
             db, svn_dirent_join(local_abspath, "R", pool),
             "R", ROOT_ONE, UUID_ONE, 3,
-            svn_kind_unknown, svn_wc__db_status_server_excluded,
+            svn_node_unknown, svn_wc__db_status_server_excluded,
             NULL, NULL,
             pool));
 
 
   /* Are all the nodes where we expect them to be? */
   SVN_ERR(validate_node(db, local_abspath, "N",
-                        svn_kind_dir, svn_wc__db_status_normal,
+                        svn_node_dir, svn_wc__db_status_normal,
                         pool));
   SVN_ERR(validate_node(db, local_abspath, "N/N-a",
-                        svn_kind_file, svn_wc__db_status_normal,
+                        svn_node_file, svn_wc__db_status_normal,
                         pool));
   SVN_ERR(validate_node(db, local_abspath, "N/N-b",
-                        svn_kind_file,
+                        svn_node_file,
                         svn_wc__db_status_server_excluded,
                         pool));
   SVN_ERR(validate_node(db, local_abspath, "N/N-c",
-                        svn_kind_unknown, svn_wc__db_status_incomplete,
+                        svn_node_unknown, svn_wc__db_status_incomplete,
                         pool));
   SVN_ERR(validate_node(db, local_abspath, "O",
-                        svn_kind_symlink, svn_wc__db_status_normal,
+                        svn_node_symlink, svn_wc__db_status_normal,
                         pool));
   SVN_ERR(validate_node(db, local_abspath, "P",
-                        svn_kind_dir, svn_wc__db_status_excluded,
+                        svn_node_dir, svn_wc__db_status_excluded,
                         pool));
   SVN_ERR(validate_node(db, local_abspath, "Q",
-                        svn_kind_symlink, svn_wc__db_status_not_present,
+                        svn_node_symlink, svn_wc__db_status_not_present,
                         pool));
   SVN_ERR(validate_node(db, local_abspath, "R",
-                        svn_kind_unknown,
+                        svn_node_unknown,
                         svn_wc__db_status_server_excluded,
                         pool));
 
@@ -800,7 +800,7 @@ static svn_error_t *
 test_working_info(apr_pool_t *pool)
 {
   const char *local_abspath;
-  svn_kind_t kind;
+  svn_node_kind_t kind;
   svn_wc__db_status_t status;
   svn_revnum_t revision;
   const char *repos_relpath;
@@ -844,7 +844,7 @@ test_working_info(apr_pool_t *pool)
             db, svn_dirent_join(local_abspath, "I", pool),
             pool, pool));
   SVN_TEST_ASSERT(status == svn_wc__db_status_added);
-  SVN_TEST_ASSERT(kind == svn_kind_dir);
+  SVN_TEST_ASSERT(kind == svn_node_dir);
   SVN_TEST_ASSERT(revision == SVN_INVALID_REVNUM);
   SVN_TEST_ASSERT(repos_relpath == NULL);
   SVN_TEST_ASSERT(repos_root_url == NULL);
@@ -895,14 +895,14 @@ test_pdh(apr_pool_t *pool)
   SVN_ERR(svn_wc__db_base_add_excluded_node(
             db, svn_dirent_join(local_abspath, "sub", pool),
             "sub", ROOT_ONE, UUID_ONE, 1,
-            svn_kind_file, svn_wc__db_status_server_excluded,
+            svn_node_file, svn_wc__db_status_server_excluded,
             NULL, NULL,
             pool));
 
   SVN_ERR(svn_wc__db_base_add_excluded_node(
             db, svn_dirent_join(local_abspath, "sub/A", pool),
             "sub/A", ROOT_ONE, UUID_ONE, 1,
-            svn_kind_file, svn_wc__db_status_server_excluded,
+            svn_node_file, svn_wc__db_status_server_excluded,
             NULL, NULL,
             pool));
 
@@ -1459,7 +1459,7 @@ test_externals_store(apr_pool_t *pool)
 
   {
     svn_wc__db_status_t status;
-    svn_kind_t kind;
+    svn_node_kind_t kind;
     const char *repos_root_url;
     const char *repos_uuid;
     const char *defining_abspath;
@@ -1476,7 +1476,7 @@ test_externals_store(apr_pool_t *pool)
                                      pool, pool));
 
     SVN_TEST_ASSERT(status == svn_wc__db_status_normal);
-    SVN_TEST_ASSERT(kind == svn_kind_file);
+    SVN_TEST_ASSERT(kind == svn_node_file);
     SVN_TEST_STRING_ASSERT(repos_root_url, "svn://some-repos/svn");
     SVN_TEST_STRING_ASSERT(repos_uuid, "not-a-uuid");
     SVN_TEST_STRING_ASSERT(defining_abspath, subdir);
@@ -1507,7 +1507,7 @@ test_externals_store(apr_pool_t *pool)
                                      pool, pool));
 
     SVN_TEST_ASSERT(status == svn_wc__db_status_normal);
-    SVN_TEST_ASSERT(kind == svn_kind_dir);
+    SVN_TEST_ASSERT(kind == svn_node_dir);
     SVN_TEST_STRING_ASSERT(repos_root_url, "svn://other-repos/nsv");
     SVN_TEST_STRING_ASSERT(repos_uuid, "no-uuid-either");
     SVN_TEST_STRING_ASSERT(defining_abspath, subdir);

Modified: subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/op-depth-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/op-depth-test.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/op-depth-test.c Sat Mar 30 20:02:27 2013
@@ -168,12 +168,12 @@ print_row(const nodes_row_t *row,
     props = "";
 
   if (row->repo_revnum == SVN_INVALID_REVNUM)
-    return apr_psprintf(result_pool, "%d, %s, %s%s%s%s%s",
+    return apr_psprintf(result_pool, "%d, \"%s\", \"%s\"%s%s%s%s",
                         row->op_depth, row->local_relpath, row->presence,
                         moved_here_str, moved_to_str,
                         file_external_str, props);
   else
-    return apr_psprintf(result_pool, "%d, %s, %s, %s ^/%s@%d%s%s%s%s",
+    return apr_psprintf(result_pool, "%d, \"%s\", \"%s\", %s ^/%s@%d%s%s%s%s",
                         row->op_depth, row->local_relpath, row->presence,
                         row->op_depth == 0 ? "base" : "copyfrom",
                         row->repo_relpath, (int)row->repo_revnum,
@@ -6634,8 +6634,8 @@ finite_move_update_bump(const svn_test_o
   SVN_ERR(sbox_wc_update(&b, "", 1));
   SVN_ERR(sbox_wc_move(&b, "A/B", "B2"));
   SVN_ERR(sbox_wc_move(&b, "P/Q", "Q2"));
-  SVN_ERR(sbox_wc_update_depth(&b, "A/B", 2, svn_depth_files));
-  SVN_ERR(sbox_wc_update_depth(&b, "P/Q", 2, svn_depth_files));
+  SVN_ERR(sbox_wc_update_depth(&b, "A/B", 2, svn_depth_files, FALSE));
+  SVN_ERR(sbox_wc_update_depth(&b, "P/Q", 2, svn_depth_files, FALSE));
   SVN_ERR(check_tree_conflict_repos_path(&b, "A/B", NULL, NULL));
   err = sbox_wc_resolve(&b, "A/B", svn_depth_empty,
                         svn_wc_conflict_choose_mine_conflict);
@@ -6666,8 +6666,8 @@ finite_move_update_bump(const svn_test_o
   SVN_ERR(sbox_wc_update(&b, "", 1));
   SVN_ERR(sbox_wc_move(&b, "A/B", "B2"));
   SVN_ERR(sbox_wc_move(&b, "P", "P2"));
-  SVN_ERR(sbox_wc_update_depth(&b, "A/B", 2, svn_depth_immediates));
-  SVN_ERR(sbox_wc_update_depth(&b, "P", 2, svn_depth_immediates));
+  SVN_ERR(sbox_wc_update_depth(&b, "A/B", 2, svn_depth_immediates, FALSE));
+  SVN_ERR(sbox_wc_update_depth(&b, "P", 2, svn_depth_immediates, FALSE));
   SVN_ERR(check_tree_conflict_repos_path(&b, "P", NULL, NULL));
   err = sbox_wc_resolve(&b, "P", svn_depth_empty,
                         svn_wc_conflict_choose_mine_conflict);
@@ -6700,8 +6700,8 @@ finite_move_update_bump(const svn_test_o
   SVN_ERR(sbox_wc_update(&b, "", 1));
   SVN_ERR(sbox_wc_move(&b, "A/B/C", "C2"));
   SVN_ERR(sbox_wc_move(&b, "P/Q", "Q2"));
-  SVN_ERR(sbox_wc_update_depth(&b, "A/B/C", 2, svn_depth_empty));
-  SVN_ERR(sbox_wc_update_depth(&b, "P/Q", 2, svn_depth_empty));
+  SVN_ERR(sbox_wc_update_depth(&b, "A/B/C", 2, svn_depth_empty, FALSE));
+  SVN_ERR(sbox_wc_update_depth(&b, "P/Q", 2, svn_depth_empty, FALSE));
   SVN_ERR(check_tree_conflict_repos_path(&b, "P/Q", NULL, NULL));
   err = sbox_wc_resolve(&b, "P/Q", svn_depth_empty,
                         svn_wc_conflict_choose_mine_conflict);
@@ -7608,6 +7608,432 @@ move_update_subtree(const svn_test_opts_
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+move_parent_into_child(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "move_parent_into_child", opts, pool));
+  SVN_ERR(sbox_wc_mkdir(&b, "A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_update(&b, "", 1));
+
+  SVN_ERR(sbox_wc_move(&b, "A/B", "B2"));
+  SVN_ERR(sbox_wc_move(&b, "A", "B2/A"));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",       "normal",       1, ""},
+      {0, "A",      "normal",       1, "A"},
+      {0, "A/B",    "normal",       1, "A/B"},
+      {1, "A",      "base-deleted", NO_COPY_FROM, "B2/A"},
+      {1, "A/B",    "base-deleted", NO_COPY_FROM},
+      {1, "B2",     "normal",       1, "A/B", MOVED_HERE},
+      {2, "B2/A",   "normal",       1, "A", MOVED_HERE},
+      {2, "B2/A/B", "normal",       1, "A/B", MOVED_HERE},
+      {3, "B2/A/B", "base-deleted", NO_COPY_FROM, "B2"},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  SVN_ERR(sbox_wc_move(&b, "B2", "A"));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",      "normal",       1, ""},
+      {0, "A",     "normal",       1, "A"},
+      {0, "A/B",   "normal",       1, "A/B"},
+      {1, "A",     "normal",       1, "A/B", FALSE, "A/A", TRUE},
+      {1, "A/B",   "base-deleted", NO_COPY_FROM},
+      {2, "A/A",   "normal",       1, "A", MOVED_HERE},
+      {2, "A/A/B", "normal",       1, "A/B", MOVED_HERE},
+      {3, "A/A/B", "base-deleted", NO_COPY_FROM, "A"},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  SVN_ERR(sbox_wc_move(&b, "A/A", "A/B"));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",      "normal",       1, ""},
+      {0, "A",     "normal",       1, "A"},
+      {0, "A/B",   "normal",       1, "A/B"},
+      {1, "A",     "normal",       1, "A/B", FALSE, "A/B", TRUE},
+      {1, "A/B",   "base-deleted", NO_COPY_FROM},
+      {2, "A/B",   "normal",       1, "A", MOVED_HERE},
+      {2, "A/B/B", "normal",       1, "A/B", MOVED_HERE},
+      {3, "A/B/B", "base-deleted", NO_COPY_FROM, "A"},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+move_depth_expand(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "move_depth_expand", opts, pool));
+  SVN_ERR(sbox_wc_mkdir(&b, "A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/A/A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/A/A/A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B/A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B/A/A"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_update(&b, "", 0));
+
+  SVN_ERR(sbox_wc_update_depth(&b, "", 1, svn_depth_immediates, TRUE));
+  SVN_ERR(sbox_wc_update_depth(&b, "A", 1, svn_depth_immediates, TRUE));
+  /* Make A/B not present */
+  SVN_ERR(sbox_wc_update_depth(&b, "A/B", 0, svn_depth_immediates, TRUE));
+
+  SVN_ERR(sbox_wc_move(&b, "A", "C"));
+  SVN_ERR(sbox_wc_mkdir(&b, "C/A/A")); /* Local addition obstruction */
+  SVN_ERR(sbox_wc_copy(&b, "C/A", "C/B")); /* Copied obstruction */
+
+  {
+    nodes_row_t nodes[] = {
+      {0, "",       "normal",       1, "" },
+
+      {0, "A",      "normal",       1, "A" },
+      {1, "A",      "base-deleted", NO_COPY_FROM, "C" },
+      {0, "A/A",    "normal",       1, "A/A" },
+      {1, "A/A",    "base-deleted", NO_COPY_FROM },
+      {0, "A/B",    "not-present",  0, "A/B" },
+
+      {1, "C",      "normal",       1, "A", MOVED_HERE },
+
+      {1, "C/A",    "normal",       1, "A/A", MOVED_HERE },
+      {3, "C/A/A",  "normal",       NO_COPY_FROM },
+
+      {1, "C/B",    "not-present",  0, "A/B", MOVED_HERE},
+      {2, "C/B",    "normal",       1, "A/A" },
+      {3, "C/B/A",  "normal",       NO_COPY_FROM },
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  SVN_ERR(sbox_wc_update_depth(&b, "", 1, svn_depth_infinity, TRUE));
+
+  /* This used to cause a segfault. Then it asserted in a different place */
+  SVN_ERR(sbox_wc_resolve(&b, "A", svn_depth_empty,
+                          svn_wc_conflict_choose_mine_conflict));
+
+  /* And now verify that there are no not-present nodes left and a
+     consistent working copy */
+  {
+    nodes_row_t nodes[] = {
+      {0, "",        "normal",       1, "" },
+
+      {0, "A",       "normal",       1, "A" },
+      {0, "A/A",     "normal",       1, "A/A" },
+      {0, "A/A/A",   "normal",       1, "A/A/A" },
+      {0, "A/A/A/A", "normal",       1, "A/A/A/A" },
+      {0, "A/B",     "normal",       1, "A/B" },
+      {0, "A/B/A",   "normal",       1, "A/B/A" },
+      {0, "A/B/A/A", "normal",       1, "A/B/A/A" },
+
+      {1, "A",       "base-deleted", NO_COPY_FROM, "C" },
+      {1, "A/A",     "base-deleted", NO_COPY_FROM },
+      {1, "A/A/A",   "base-deleted", NO_COPY_FROM },
+      {1, "A/B",     "base-deleted", NO_COPY_FROM },
+      {1, "A/B/A",   "base-deleted", NO_COPY_FROM },
+      {1, "A/B/A/A", "base-deleted", NO_COPY_FROM },
+      {1, "A/A/A/A", "base-deleted", NO_COPY_FROM },
+
+
+      {1, "C",       "normal",       1, "A", MOVED_HERE },
+      {1, "C/A",     "normal",       1, "A/A", MOVED_HERE },
+      {1, "C/A/A",   "normal",       1, "A/A/A", MOVED_HERE },
+      {1, "C/A/A/A", "normal",       1, "A/A/A/A", MOVED_HERE },
+
+      {3, "C/A/A",   "normal",       NO_COPY_FROM },
+      {3, "C/A/A/A", "base-deleted", NO_COPY_FROM },
+
+      {1, "C/B",     "normal",       1, "A/B", MOVED_HERE },
+      {1, "C/B/A",   "normal",       1, "A/B/A", MOVED_HERE },
+      {1, "C/B/A/A", "normal",       1, "A/B/A/A", MOVED_HERE },
+
+      {2, "C/B",     "normal",       1, "A/A" },
+      {2, "C/B/A",   "base-deleted", NO_COPY_FROM },
+      {2, "C/B/A/A", "base-deleted", NO_COPY_FROM },
+
+      {3, "C/B/A",   "normal",       NO_COPY_FROM },
+
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+move_retract(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "move_retract", opts, pool));
+
+  SVN_ERR(sbox_wc_mkdir(&b, "A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/A/A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/A/A/A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/A/A/C"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/A/A/D"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B/A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B/A/A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B/A/C"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B/A/D"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_delete(&b, "A/A/A/A"));
+  SVN_ERR(sbox_wc_delete(&b, "A/A/A/C"));
+  SVN_ERR(sbox_wc_delete(&b, "A/A/A/D"));
+  SVN_ERR(sbox_wc_delete(&b, "A/B/A/C"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+
+  SVN_ERR(sbox_wc_update(&b, "", 1));
+  SVN_ERR(sbox_wc_move(&b, "A/B/A/D", "D"));
+  SVN_ERR(sbox_wc_delete(&b, "A/B"));
+  SVN_ERR(sbox_wc_move(&b, "A/A", "A/B"));
+
+  {
+    nodes_row_t nodes[] = {
+      {0, "",        "normal",       1, "" },
+
+      {0, "A",       "normal",       1, "A" },
+      {0, "A/A",     "normal",       1, "A/A" },
+      {0, "A/A/A",   "normal",       1, "A/A/A" },
+      {0, "A/A/A/A", "normal",       1, "A/A/A/A" },
+      {0, "A/A/A/C", "normal",       1, "A/A/A/C" },
+      {0, "A/A/A/D", "normal",       1, "A/A/A/D" },
+
+      {2, "A/A",     "base-deleted", NO_COPY_FROM, "A/B"},
+      {2, "A/A/A",   "base-deleted", NO_COPY_FROM },
+      {2, "A/A/A/A", "base-deleted", NO_COPY_FROM },
+      {2, "A/A/A/C", "base-deleted", NO_COPY_FROM },
+      {2, "A/A/A/D", "base-deleted", NO_COPY_FROM },
+
+      {0, "A/B",     "normal",       1, "A/B" },
+      {0, "A/B/A",   "normal",       1, "A/B/A" },
+      {0, "A/B/A/A", "normal",       1, "A/B/A/A" },
+      {0, "A/B/A/C", "normal",       1, "A/B/A/C" },
+      {0, "A/B/A/D", "normal",       1, "A/B/A/D" },
+
+      {2, "A/B",     "normal",       1, "A/A", MOVED_HERE },
+      {2, "A/B/A",   "normal",       1, "A/A/A", MOVED_HERE },
+      {2, "A/B/A/A", "normal",       1, "A/A/A/A", MOVED_HERE },
+      {2, "A/B/A/C", "normal",       1, "A/A/A/C", MOVED_HERE },
+      {2, "A/B/A/D", "normal",       1, "A/A/A/D", FALSE, "D", TRUE },
+
+      {1, "D",       "normal",       1, "A/B/A/D", MOVED_HERE },
+
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  SVN_ERR(sbox_wc_update(&b, "", 2));
+
+  {
+    nodes_row_t nodes[] = {
+      {0, "",        "normal",       2, "" },
+
+      {0, "A",       "normal",       2, "A" },
+      {0, "A/A",     "normal",       2, "A/A" },
+      {0, "A/A/A",   "normal",       2, "A/A/A" },
+
+      {2, "A/A",     "base-deleted", NO_COPY_FROM, "A/B"},
+      {2, "A/A/A",   "base-deleted", NO_COPY_FROM },
+
+      {0, "A/B",     "normal",       2, "A/B" },
+      {0, "A/B/A",   "normal",       2, "A/B/A" },
+      {0, "A/B/A/A", "normal",       2, "A/B/A/A" },
+      {0, "A/B/A/D", "normal",       2, "A/B/A/D" },
+
+      {2, "A/B",     "normal",       1, "A/A", MOVED_HERE },
+      {2, "A/B/A",   "normal",       1, "A/A/A", MOVED_HERE },
+      {2, "A/B/A/A", "normal",       1, "A/A/A/A", MOVED_HERE },
+      {2, "A/B/A/C", "normal",       1, "A/A/A/C", MOVED_HERE },
+      {2, "A/B/A/D", "normal",       1, "A/A/A/D", FALSE, "D", TRUE },
+
+      {1, "D",       "normal",       1, "A/B/A/D", MOVED_HERE },
+
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+
+  SVN_ERR(sbox_wc_resolve(&b, "A/A", svn_depth_empty,
+                          svn_wc_conflict_choose_mine_conflict));
+
+  {
+    nodes_row_t nodes[] = {
+      {0, "",        "normal",       2, "" },
+
+      {0, "A",       "normal",       2, "A" },
+      {0, "A/A",     "normal",       2, "A/A" },
+      {0, "A/A/A",   "normal",       2, "A/A/A" },
+
+      {0, "A/B",     "normal",       2, "A/B" },
+      {0, "A/B/A",   "normal",       2, "A/B/A" },
+      {0, "A/B/A/A", "normal",       2, "A/B/A/A" },
+      {0, "A/B/A/D", "normal",       2, "A/B/A/D" },
+
+      {2, "A/A",     "base-deleted", NO_COPY_FROM, "A/B"},
+      {2, "A/A/A",   "base-deleted", NO_COPY_FROM },
+
+      {2, "A/B",     "normal",       2, "A/A", MOVED_HERE },
+      {2, "A/B/A",   "normal",       2, "A/A/A", MOVED_HERE },
+      {2, "A/B/A/A", "base-deleted", NO_COPY_FROM }, /* ### MISSING! */
+      {2, "A/B/A/D", "base-deleted", NO_COPY_FROM, "D" }, /* ### MISSING! */
+
+      /* Still conflicted */
+      {1, "D",       "normal",       1, "A/B/A/D", MOVED_HERE },
+
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  /* ### TODO: Resolve via which specific target? */
+  SVN_ERR(sbox_wc_resolve(&b, "", svn_depth_infinity,
+                          svn_wc_conflict_choose_mine_conflict));
+
+  {
+    nodes_row_t nodes[] = {
+
+      {1, "D",       "normal",       2, "A/B/A/D", MOVED_HERE },
+
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "D", nodes));
+  }
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+move_delete_file_externals(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "move_delete_file_externals", opts,
+                                   pool));
+
+  SVN_ERR(sbox_wc_mkdir(&b, "A"));
+  SVN_ERR(sbox_wc_mkdir(&b, "A/B"));
+  sbox_file_write(&b, "f", "New file");
+  SVN_ERR(sbox_wc_add(&b, "f"));
+  SVN_ERR(sbox_wc_propset(&b, "svn:externals", "^/f B/P/g", "A"));
+  SVN_ERR(sbox_wc_propset(&b, "svn:externals", "^/f Q/g\n^/f g", "A/B"));
+  SVN_ERR(sbox_wc_commit(&b, ""));
+  SVN_ERR(sbox_wc_update(&b, "", 1));
+
+  {
+    nodes_row_t nodes[] = {
+      {0, "",        "normal",       1, ""},
+      {0, "A",       "normal",       1, "A"},
+      {0, "A/B",     "normal",       1, "A/B"},
+      {0, "f",       "normal",       1, "f"},
+      {0, "A/B/g",   "normal",       1, "f", TRUE},
+      {0, "A/B/P/g", "normal",       1, "f", TRUE},
+      {0, "A/B/Q/g", "normal",       1, "f", TRUE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  /* Delete removes the file external rows. */
+  SVN_ERR(sbox_wc_delete(&b, "A"));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",    "normal",       1, ""},
+      {0, "A",   "normal",       1, "A"},
+      {0, "A/B", "normal",       1, "A/B"},
+      {0, "f",   "normal",       1, "f"},
+      {1, "A",   "base-deleted", NO_COPY_FROM},
+      {1, "A/B", "base-deleted", NO_COPY_FROM},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  /* Revert doesn't restore the file external rows... */
+  SVN_ERR(sbox_wc_revert(&b, "A", svn_depth_infinity));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",    "normal",       1, ""},
+      {0, "A",   "normal",       1, "A"},
+      {0, "A/B", "normal",       1, "A/B"},
+      {0, "f",   "normal",       1, "f"},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+  /* ... but update does. */
+  SVN_ERR(sbox_wc_update(&b, "", 1));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",        "normal",       1, ""},
+      {0, "A",       "normal",       1, "A"},
+      {0, "A/B",     "normal",       1, "A/B"},
+      {0, "f",       "normal",       1, "f"},
+      {0, "A/B/g",   "normal",       1, "f", TRUE},
+      {0, "A/B/P/g", "normal",       1, "f", TRUE},
+      {0, "A/B/Q/g", "normal",       1, "f", TRUE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  /* Move removes the file external rows. */
+  SVN_ERR(sbox_wc_move(&b, "A", "A2"));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",     "normal",       1, ""},
+      {0, "A",    "normal",       1, "A"},
+      {0, "A/B",  "normal",       1, "A/B"},
+      {0, "f",    "normal",       1, "f"},
+      {1, "A",    "base-deleted", NO_COPY_FROM, "A2"},
+      {1, "A/B",  "base-deleted", NO_COPY_FROM},
+      {1, "A2",   "normal",       1, "A", MOVED_HERE},
+      {1, "A2/B", "normal",       1, "A/B", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+  /* Update adds file external rows to the copy. */
+  SVN_ERR(sbox_wc_update(&b, "", 1));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",         "normal",       1, ""},
+      {0, "A",        "normal",       1, "A"},
+      {0, "A/B",      "normal",       1, "A/B"},
+      {0, "f",        "normal",       1, "f"},
+      {1, "A",        "base-deleted", NO_COPY_FROM, "A2"},
+      {1, "A/B",      "base-deleted", NO_COPY_FROM},
+      {1, "A2",       "normal",       1, "A", MOVED_HERE},
+      {1, "A2/B",     "normal",       1, "A/B", MOVED_HERE},
+      {0, "A2/B/g",   "normal",       1, "f", TRUE},
+      {0, "A2/B/P/g", "normal",       1, "f", TRUE},
+      {0, "A2/B/Q/g", "normal",       1, "f", TRUE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  return SVN_NO_ERROR;
+}
 
 /* ---------------------------------------------------------------------- */
 /* The list of test functions */
@@ -7752,5 +8178,13 @@ struct svn_test_descriptor_t test_funcs[
                        "move_back (issue 4302)"),
     SVN_TEST_OPTS_PASS(move_update_subtree,
                        "move_update_subtree (issue 4232)"),
+    SVN_TEST_OPTS_PASS(move_parent_into_child,
+                       "move_parent_into_child (issue 4333)"),
+    SVN_TEST_OPTS_PASS(move_depth_expand,
+                       "move depth expansion"),
+    SVN_TEST_OPTS_PASS(move_retract,
+                       "move retract (issue 4336)"),
+    SVN_TEST_OPTS_PASS(move_delete_file_externals,
+                       "move/delete file externals (issue 4293)"),
     SVN_TEST_NULL
   };

Modified: subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/utils.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/utils.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/utils.c (original)
+++ subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/utils.c Sat Mar 30 20:02:27 2013
@@ -317,7 +317,8 @@ svn_error_t *
 sbox_wc_update_depth(svn_test__sandbox_t *b,
                      const char *path,
                      svn_revnum_t revnum,
-                     svn_depth_t depth)
+                     svn_depth_t depth,
+                     svn_boolean_t sticky)
 {
   svn_client_ctx_t *ctx;
   apr_array_header_t *result_revs;
@@ -332,14 +333,14 @@ sbox_wc_update_depth(svn_test__sandbox_t
   SVN_ERR(svn_client_create_context2(&ctx, NULL, b->pool));
   ctx->wc_ctx = b->wc_ctx;
   return svn_client_update4(&result_revs, paths, &revision, depth,
-                            FALSE, FALSE, FALSE, FALSE, FALSE,
+                            sticky, FALSE, FALSE, FALSE, FALSE,
                             ctx, b->pool);
 }
 
 svn_error_t *
 sbox_wc_update(svn_test__sandbox_t *b, const char *path, svn_revnum_t revnum)
 {
-  SVN_ERR(sbox_wc_update_depth(b, path, revnum, svn_depth_infinity));
+  SVN_ERR(sbox_wc_update_depth(b, path, revnum, svn_depth_unknown, FALSE));
   return SVN_NO_ERROR;
 }
 

Modified: subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/utils.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/utils.h?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/utils.h (original)
+++ subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/utils.h Sat Mar 30 20:02:27 2013
@@ -134,7 +134,8 @@ svn_error_t *
 sbox_wc_update_depth(svn_test__sandbox_t *b,
                      const char *path,
                      svn_revnum_t revnum,
-                     svn_depth_t depth);
+                     svn_depth_t depth,
+                     svn_boolean_t sticky);
 
 svn_error_t *
 sbox_wc_switch(svn_test__sandbox_t *b,

Modified: subversion/branches/fsfs-format7/subversion/tests/svn_test_main.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/svn_test_main.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/svn_test_main.c (original)
+++ subversion/branches/fsfs-format7/subversion/tests/svn_test_main.c Sat Mar 30 20:02:27 2013
@@ -27,6 +27,9 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <setjmp.h>
+#ifdef WIN32
+#include <crtdbg.h>
+#endif
 
 #include <apr_pools.h>
 #include <apr_general.h>
@@ -41,8 +44,10 @@
 #include "svn_io.h"
 #include "svn_path.h"
 #include "svn_ctype.h"
-#include "svn_private_config.h"
 
+#include "private/svn_cmdline_private.h"
+
+#include "svn_private_config.h"
 
 /* Some Subversion test programs may want to parse options in the
    argument list, so we remember it here. */
@@ -395,6 +400,27 @@ main(int argc, const char *argv[])
         prog_name = argv[0];
     }
 
+#ifdef WIN32
+#if _MSC_VER >= 1400
+  /* ### This should work for VC++ 2002 (=1300) and later */
+  /* Show the abort message on STDERR instead of a dialog to allow
+     scripts (e.g. our testsuite) to continue after an abort without
+     user intervention. Allow overriding for easier debugging. */
+  if (!getenv("SVN_CMDLINE_USE_DIALOG_FOR_ABORT"))
+    {
+      /* In release mode: Redirect abort() errors to stderr */
+      _set_error_mode(_OUT_TO_STDERR);
+
+      /* In _DEBUG mode: Redirect all debug output (E.g. assert() to stderr.
+         (Ignored in releas builds) */
+      _CrtSetReportFile( _CRT_ASSERT, _CRTDBG_FILE_STDERR);
+      _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
+      _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
+      _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
+    }
+#endif /* _MSC_VER >= 1400 */
+#endif
+
   if (err)
     return svn_cmdline_handle_exit_error(err, pool, prog_name);
   while (1)

Modified: subversion/branches/fsfs-format7/tools/dev/svnraisetreeconflict/svnraisetreeconflict.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/tools/dev/svnraisetreeconflict/svnraisetreeconflict.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/tools/dev/svnraisetreeconflict/svnraisetreeconflict.c (original)
+++ subversion/branches/fsfs-format7/tools/dev/svnraisetreeconflict/svnraisetreeconflict.c Sat Mar 30 20:02:27 2013
@@ -43,6 +43,7 @@
 #include "svn_version.h"
 
 #include "private/svn_wc_private.h"
+#include "private/svn_cmdline_private.h"
 
 #include "svn_private_config.h"
 

Modified: subversion/branches/fsfs-format7/tools/dev/unix-build/Makefile.svn
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/tools/dev/unix-build/Makefile.svn?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/tools/dev/unix-build/Makefile.svn (original)
+++ subversion/branches/fsfs-format7/tools/dev/unix-build/Makefile.svn Sat Mar 30 20:02:27 2013
@@ -74,7 +74,7 @@ NEON_VER	= 0.29.6
 SERF_VER	= 1.2.0
 SERF_OLD_VER	= 0.3.1
 CYRUS_SASL_VER	= 2.1.25
-SQLITE_VER	= 3071201
+SQLITE_VER	= 3071600
 LIBMAGIC_VER	= 5.11
 RUBY_VER	= 1.8.7-p358
 BZ2_VER	= 1.0.6
@@ -120,7 +120,7 @@ NEON_URL	= http://webdav.org/neon/$(NEON
 #SERF_URL	= http://serf.googlecode.com/files/$(SERF_DIST)
 SERF_URL	= http://serf.googlecode.com/svn/tags/$(SERF_VER)
 SERF_OLD_URL	= http://serf.googlecode.com/svn/tags/$(SERF_OLD_VER)
-SQLITE_URL	= http://www.sqlite.org/$(SQLITE_DIST)
+SQLITE_URL	= http://www.sqlite.org/2013/$(SQLITE_DIST)
 CYRUS_SASL_URL	= ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/$(CYRUS_SASL_DIST)
 LIBMAGIC_URL	= ftp://ftp.astron.com/pub/file/$(LIBMAGIC_DIST)
 RUBY_URL	= http://ftp.ruby-lang.org/pub/ruby/1.8/$(RUBY_DIST)

Modified: subversion/branches/fsfs-format7/tools/dist/backport.pl
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/tools/dist/backport.pl?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/tools/dist/backport.pl (original)
+++ subversion/branches/fsfs-format7/tools/dist/backport.pl Sat Mar 30 20:02:27 2013
@@ -223,7 +223,8 @@ sub handle_entry {
 
 sub main {
   usage, exit 0 if @ARGV;
-  usage, exit 1 unless -r $STATUS;
+
+  open STATUS, "<", $STATUS or (usage, exit 1);
 
   # Because we use the ':normal' command in Vim...
   die "A vim with the +ex_extra feature is required"
@@ -232,18 +233,17 @@ sub main {
   # ### TODO: need to run 'revert' here
   # ### TODO: both here and in merge(), unlink files that previous merges added
   die "Local mods to STATUS file $STATUS" if `$SVN status -q $STATUS`;
-  @ARGV = $STATUS;
 
   # Skip most of the file
-  while (<>) {
+  while (<STATUS>) {
     last if /^Approved changes/;
   }
-  while (<>) {
+  while (<STATUS>) {
     last unless /^=+$/;
   }
   $/ = ""; # paragraph mode
 
-  while (<>) {
+  while (<STATUS>) {
     my @lines = split /\n/;
 
     given ($lines[0]) {
@@ -257,6 +257,8 @@ sub main {
       }
       # Backport entry?
       when (/^ \*/) {
+        warn "Too many bullets in $lines[0]" and next
+          if grep /^ \*/, @lines[1..$#lines];
         handle_entry @lines;
       }
       default {

Propchange: subversion/branches/fsfs-format7/tools/dist/make-deps-tarball.sh
------------------------------------------------------------------------------
  Merged /subversion/trunk/tools/dist/make-deps-tarball.sh:r1454791-1462839

Modified: subversion/branches/fsfs-format7/tools/server-side/svn-rep-sharing-stats.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/tools/server-side/svn-rep-sharing-stats.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/tools/server-side/svn-rep-sharing-stats.c (original)
+++ subversion/branches/fsfs-format7/tools/server-side/svn-rep-sharing-stats.c Sat Mar 30 20:02:27 2013
@@ -35,6 +35,8 @@
 /* for svn_fs_fs__id_* (used in assertions only) */
 #include "../../subversion/libsvn_fs_fs/id.h"
 
+#include "private/svn_cmdline_private.h"
+
 #include "svn_private_config.h"
 
 

Modified: subversion/branches/fsfs-format7/tools/server-side/svnauthz.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/tools/server-side/svnauthz.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/tools/server-side/svnauthz.c (original)
+++ subversion/branches/fsfs-format7/tools/server-side/svnauthz.c Sat Mar 30 20:02:27 2013
@@ -28,7 +28,9 @@
 #include "svn_repos.h"
 #include "svn_utf.h"
 #include "svn_path.h"
+
 #include "private/svn_fspath.h"
+#include "private/svn_cmdline_private.h"
 
 
 /*** Option Processing. ***/



Mime
View raw message