You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2011/12/08 00:23:04 UTC

svn commit: r1211703 [4/4] - in /subversion/branches/showing-merge-info: ./ contrib/server-side/mod_dontdothat/ notes/ subversion/bindings/javahl/tests/org/apache/subversion/javahl/ subversion/bindings/javahl/tests/org/tigris/subversion/javahl/ subvers...

Modified: subversion/branches/showing-merge-info/subversion/tests/cmdline/externals_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/tests/cmdline/externals_tests.py?rev=1211703&r1=1211702&r2=1211703&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/tests/cmdline/externals_tests.py (original)
+++ subversion/branches/showing-merge-info/subversion/tests/cmdline/externals_tests.py Wed Dec  7 23:23:02 2011
@@ -225,7 +225,7 @@ def change_external_expect_error(path, n
   but expect to get an error message that matches EXPECTED_ERR."""
 
   svntest.actions.set_prop('svn:externals', new_val, path,
-                           expected_err=expected_err)
+                           expected_re_string=expected_err)
 
 
 def probe_paths_exist(paths):
@@ -706,6 +706,13 @@ def disallow_dot_or_dotdot_directory_ref
   if not external_urls: external_urls = list(external_url_for.values())
   externals_value_8 = external_urls.pop() + " /foo \n"
   if not external_urls: external_urls = list(external_url_for.values())
+  if svntest.main.is_os_windows():
+    externals_value_9 = external_urls.pop() + " D:/foo\n"
+    if not external_urls: external_urls = list(external_url_for.values())
+    externals_value_10 = external_urls.pop() + " D:\\foo\n"
+    if not external_urls: external_urls = list(external_url_for.values())
+    externals_value_11 = external_urls.pop() + " D:foo\n"
+    if not external_urls: external_urls = list(external_url_for.values())
 
   set_externals_for_path_expect_error(B_path, externals_value_1)
   set_externals_for_path_expect_error(G_path, externals_value_2)
@@ -715,6 +722,10 @@ def disallow_dot_or_dotdot_directory_ref
   set_externals_for_path_expect_error(B_path, externals_value_6)
   set_externals_for_path_expect_error(G_path, externals_value_7)
   set_externals_for_path_expect_error(H_path, externals_value_8)
+  if svntest.main.is_os_windows():
+    set_externals_for_path_expect_error(B_path, externals_value_9)
+    set_externals_for_path_expect_error(B_path, externals_value_10)
+    set_externals_for_path_expect_error(B_path, externals_value_11)
 
 
 #----------------------------------------------------------------------

Modified: subversion/branches/showing-merge-info/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout?rev=1211703&r1=1211702&r2=1211703&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout (original)
+++ subversion/branches/showing-merge-info/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout Wed Dec  7 23:23:02 2011
@@ -157,9 +157,10 @@ Valid options:
   --ignore-ancestry        : ignore ancestry when calculating merges
   --force                  : force operation to run
   --accept ARG             : specify automatic conflict resolution action
-                             ('postpone', 'base', 'mine-conflict',
+                             ('postpone', 'working', 'base', 'mine-conflict',
                              'theirs-conflict', 'mine-full', 'theirs-full',
                              'edit', 'launch')
+                             (shorthand: 'p', 'mc', 'tc', 'mf', 'tf', 'e', 'l')
 
 Global options:
   --username ARG           : specify a username ARG

Modified: subversion/branches/showing-merge-info/subversion/tests/cmdline/log_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/tests/cmdline/log_tests.py?rev=1211703&r1=1211702&r2=1211703&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/tests/cmdline/log_tests.py (original)
+++ subversion/branches/showing-merge-info/subversion/tests/cmdline/log_tests.py Wed Dec  7 23:23:02 2011
@@ -2093,6 +2093,45 @@ def merge_sensitive_log_copied_path_inhe
   log_chain = parse_log_output(out)
   check_merge_results(log_chain, expected_merges)
 
+#----------------------------------------------------------------------
+def log_diff(sbox):
+  "'svn log --diff'"
+
+  guarantee_repos_and_wc(sbox)
+
+  was_cwd = os.getcwd()
+  os.chdir(sbox.wc_dir)
+
+  exit_code, output, err = svntest.actions.run_and_verify_svn(None, None, [],
+                                                              'log', '--diff')
+  os.chdir(was_cwd)
+
+  for line in output:
+    if line.startswith('Index:'):
+      break
+  else:
+    raise SVNLogParseError("no diffs found in log output")
+
+  # After a copy, a log of the copy destination used to fail because the
+  # diff tried to use the head-revision URL with the old revision numbers
+  # without using the correct peg revision.
+
+  sbox.simple_copy('A', 'A2')
+  sbox.simple_commit()
+
+  os.chdir(sbox.wc_dir)
+  exit_code, output, err = svntest.actions.run_and_verify_svn(None, None, [],
+                                                              'log', '--diff',
+                                                              '-r10:8', 'A2')
+  os.chdir(was_cwd)
+
+  for line in output:
+    if line.startswith('Index:'):
+      break
+  else:
+    raise SVNLogParseError("no diffs found in log output")
+
+
 ########################################################################
 # Run the tests
 
@@ -2133,6 +2172,7 @@ test_list = [ None,
               log_with_unrelated_peg_and_operative_revs,
               log_on_nonexistent_path_and_valid_rev,
               merge_sensitive_log_copied_path_inherited_mergeinfo,
+              log_diff,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/showing-merge-info/subversion/tests/cmdline/merge_authz_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/tests/cmdline/merge_authz_tests.py?rev=1211703&r1=1211702&r2=1211703&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/tests/cmdline/merge_authz_tests.py (original)
+++ subversion/branches/showing-merge-info/subversion/tests/cmdline/merge_authz_tests.py Wed Dec  7 23:23:02 2011
@@ -73,7 +73,10 @@ from svntest.actions import inject_confl
 #         This is *not* a full test of issue #2829, see also merge_tests.py,
 #         search for "2829".  This tests the problem where a merge adds a path
 #         with a missing sibling and so needs its own explicit mergeinfo.
-@Issues(2893,2997,2829)
+#
+# #4056 - Don't record non-inheritable mergeinfo if missing subtrees are not
+#         touched by the full-depth diff
+@Issues(2893,2997,2829,4056)
 @SkipUnless(svntest.main.server_has_mergeinfo)
 @Skip(svntest.main.is_ra_type_file)
 def mergeinfo_and_skipped_paths(sbox):
@@ -393,10 +396,54 @@ def mergeinfo_and_skipped_paths(sbox):
 
   # Merge -r7:9 to the restricted WC's A_COPY_2/D/H.
   #
+  # r9 adds a path, 'A_COPY_2/D/H/zeta', which has a missing sibling 'psi',
+  # but since 'psi' is untouched by the merge it isn't skipped, and since it
+  # isn't skipped, its parent 'A_COPY_2/D/H' won't get non-inheritable
+  # mergeinfo set on it to describe the merge, so none of the parent's
+  # children will get explicit mergeinfo -- see issue #4056.
+  expected_output = wc.State(A_COPY_2_H_path, {
+    'omega' : Item(status='U '),
+    'zeta'  : Item(status='A '),
+    })
+  expected_mergeinfo_output = wc.State(A_COPY_2_H_path, {
+    ''      : Item(status=' U'),
+    'omega' : Item(status=' U'),
+    })
+  expected_elision_output = wc.State(A_COPY_2_H_path, {
+    'omega' : Item(status=' U'),
+    })
+  expected_status = wc.State(A_COPY_2_H_path, {
+    ''      : Item(status=' M', wc_rev=8),
+    'chi'   : Item(status='  ', wc_rev=8),
+    'omega' : Item(status='M ', wc_rev=8),
+    'zeta'  : Item(status='A ', copied='+', wc_rev='-'),
+    })
+  expected_disk = wc.State('', {
+    ''      : Item(props={SVN_PROP_MERGEINFO : '/A/D/H:8-9'}),
+    'omega' : Item("New content"),
+    'chi'   : Item("This is the file 'chi'.\n"),
+    'zeta'  : Item("This is the file 'zeta'.\n"),
+    })
+  expected_skip = wc.State(A_COPY_2_H_path, {})
+  svntest.actions.run_and_verify_merge(A_COPY_2_H_path, '7', '9',
+                                       sbox.repo_url + '/A/D/H', None,
+                                       expected_output,
+                                       expected_mergeinfo_output,
+                                       expected_elision_output,
+                                       expected_disk,
+                                       expected_status,
+                                       expected_skip,
+                                       None, None, None, None,
+                                       None, 1, 0)
+
+  # Merge -r4:9 to the restricted WC's A_COPY_2/D/H.
+  #
   # r9 adds a path, 'A_COPY_2/D/H/zeta', which has a parent with
-  # non-inheritable mergeinfo (due to the fact 'A_COPY_2/D/H/psi' is missing).
-  # 'A_COPY_2/D/H/zeta' must therefore get its own explicit mergeinfo from
-  # this merge.
+  # non-inheritable mergeinfo (due to the fact 'A_COPY_2/D/H/psi' is missing
+  # and skipped). 'A_COPY_2/D/H/zeta' must therefore get its own explicit
+  # mergeinfo from this merge.
+  svntest.actions.run_and_verify_svn(None, None, [], 'revert', '--recursive',
+                                     wc_restricted)  
   expected_output = wc.State(A_COPY_2_H_path, {
     'omega' : Item(status='U '),
     'zeta'  : Item(status='A '),
@@ -415,15 +462,17 @@ def mergeinfo_and_skipped_paths(sbox):
     'zeta'  : Item(status='A ', copied='+', wc_rev='-'),
     })
   expected_disk = wc.State('', {
-    ''      : Item(props={SVN_PROP_MERGEINFO : '/A/D/H:8-9*'}),
+    ''      : Item(props={SVN_PROP_MERGEINFO : '/A/D/H:5-9*'}),
     'omega' : Item("New content",
-                   props={SVN_PROP_MERGEINFO : '/A/D/H/omega:8-9'}),
+                   props={SVN_PROP_MERGEINFO : '/A/D/H/omega:5-9'}),
     'chi'   : Item("This is the file 'chi'.\n"),
     'zeta'  : Item("This is the file 'zeta'.\n",
                    props={SVN_PROP_MERGEINFO : '/A/D/H/zeta:9'}),
     })
-  expected_skip = wc.State(A_COPY_2_H_path, {})
-  svntest.actions.run_and_verify_merge(A_COPY_2_H_path, '7', '9',
+  expected_skip = wc.State(A_COPY_2_H_path, {
+    'psi' : Item(),
+    })
+  svntest.actions.run_and_verify_merge(A_COPY_2_H_path, '4', '9',
                                        sbox.repo_url + '/A/D/H', None,
                                        expected_output,
                                        expected_mergeinfo_output,

Modified: subversion/branches/showing-merge-info/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/tests/cmdline/merge_tests.py?rev=1211703&r1=1211702&r2=1211703&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/branches/showing-merge-info/subversion/tests/cmdline/merge_tests.py Wed Dec  7 23:23:02 2011
@@ -5603,7 +5603,7 @@ def merge_to_switched_path(sbox):
 #   3188: Mergeinfo on switched targets/subtrees should
 #         elide to repos
 @SkipUnless(server_has_mergeinfo)
-@Issue(2823,2839,3187,3188)
+@Issue(2823,2839,3187,3188,4056)
 def merge_to_path_with_switched_children(sbox):
   "merge to path with switched children"
 
@@ -5698,18 +5698,18 @@ def merge_to_path_with_switched_children
     'omega' : Item(status=' U')
     })
   expected_elision_output = wc.State(A_COPY_H_path, {
+    'omega' : Item(status=' U')
     })
   expected_status = wc.State(A_COPY_H_path, {
     ''      : Item(status=' M', wc_rev=8),
     'psi'   : Item(status='  ', wc_rev=8, switched='S'),
-    'omega' : Item(status='MM', wc_rev=8),
+    'omega' : Item(status='M ', wc_rev=8),
     'chi'   : Item(status='  ', wc_rev=8),
     })
   expected_disk = wc.State('', {
-    ''      : Item(props={SVN_PROP_MERGEINFO : '/A/D/H:8*'}),
+    ''      : Item(props={SVN_PROP_MERGEINFO : '/A/D/H:8'}),
     'psi'   : Item("This is the file 'psi'.\n"),
-    'omega' : Item("New content",
-                   props={SVN_PROP_MERGEINFO : '/A/D/H/omega:8'}),
+    'omega' : Item("New content"),
     'chi'   : Item("This is the file 'chi'.\n"),
     })
   expected_skip = wc.State(A_COPY_H_path, { })
@@ -5743,7 +5743,7 @@ def merge_to_path_with_switched_children
     ''        : Item(status=' M', wc_rev=8),
     'H'       : Item(status=' M', wc_rev=8),
     'H/chi'   : Item(status='  ', wc_rev=8),
-    'H/omega' : Item(status='MM', wc_rev=8),
+    'H/omega' : Item(status='M ', wc_rev=8),
     'H/psi'   : Item(status='  ', wc_rev=8, switched='S'),
     'G'       : Item(status=' M', wc_rev=8, switched='S'),
     'G/pi'    : Item(status='  ', wc_rev=8),
@@ -5753,10 +5753,9 @@ def merge_to_path_with_switched_children
     })
   expected_disk_D = wc.State('', {
     ''        : Item(props={SVN_PROP_MERGEINFO : '/A/D:6*'}),
-    'H'       : Item(props={SVN_PROP_MERGEINFO : '/A/D/H:8*'}),
+    'H'       : Item(props={SVN_PROP_MERGEINFO : '/A/D/H:8'}),
     'H/chi'   : Item("This is the file 'chi'.\n"),
-    'H/omega' : Item("New content",
-                     props={SVN_PROP_MERGEINFO : '/A/D/H/omega:8'}),
+    'H/omega' : Item("New content"),
     'H/psi'   : Item("This is the file 'psi'.\n",),
     'G'       : Item(props={SVN_PROP_MERGEINFO : '/A/D/G:6*'}),
     'G/pi'    : Item("This is the file 'pi'.\n"),
@@ -5790,10 +5789,10 @@ def merge_to_path_with_switched_children
     })
   expected_elision_output = wc.State(A_COPY_D_path, {
     })
-  expected_disk_D.tweak('', props={SVN_PROP_MERGEINFO : '/A/D:5-6*'})
-  expected_disk_D.tweak('H', props={SVN_PROP_MERGEINFO : '/A/D/H:5*,8*'})
+  expected_disk_D.tweak('', props={SVN_PROP_MERGEINFO : '/A/D:5,6*'})
+  expected_disk_D.tweak('H', props={SVN_PROP_MERGEINFO : '/A/D/H:5*,8'})
   expected_disk_D.tweak('H/psi', contents="New content",
-                        props={SVN_PROP_MERGEINFO :'/A/D/H/psi:5'})
+                        props={SVN_PROP_MERGEINFO :'/A/D/H/psi:5,8'})
   expected_status_D.tweak('H/psi', status='MM')
   svntest.actions.run_and_verify_merge(A_COPY_D_path, '4', '5',
                                        sbox.repo_url + '/A/D', None,
@@ -5834,7 +5833,7 @@ def merge_to_path_with_switched_children
     'D/H'       : Item(status=' M', wc_rev=8),
     'D/H/chi'   : Item(status='  ', wc_rev=8),
     'D/H/psi'   : Item(status='MM', wc_rev=8, switched='S'),
-    'D/H/omega' : Item(status='MM', wc_rev=8),
+    'D/H/omega' : Item(status='M ', wc_rev=8),
     })
   expected_disk = wc.State('', {
     ''          : Item(props={SVN_PROP_MERGEINFO : '/A:5-8'}),
@@ -5846,19 +5845,18 @@ def merge_to_path_with_switched_children
     'B/lambda'  : Item("This is the file 'lambda'.\n"),
     'B/F'       : Item(),
     'C'         : Item(),
-    'D'         : Item(props={SVN_PROP_MERGEINFO : '/A/D:5-6*'}),
+    'D'         : Item(props={SVN_PROP_MERGEINFO : '/A/D:5,6*'}),
     'D/G'       : Item(props={SVN_PROP_MERGEINFO : '/A/D/G:6*'}),
     'D/G/pi'    : Item("This is the file 'pi'.\n"),
     'D/G/rho'   : Item("New content",
                        props={SVN_PROP_MERGEINFO : '/A/D/G/rho:6'}),
     'D/G/tau'   : Item("This is the file 'tau'.\n"),
     'D/gamma'   : Item("This is the file 'gamma'.\n"),
-    'D/H'       : Item(props={SVN_PROP_MERGEINFO : '/A/D/H:5*,8*'}),
+    'D/H'       : Item(props={SVN_PROP_MERGEINFO : '/A/D/H:5*,8'}),
     'D/H/chi'   : Item("This is the file 'chi'.\n"),
     'D/H/psi'   : Item("New content",
-                       props={SVN_PROP_MERGEINFO : '/A/D/H/psi:5'}),
-    'D/H/omega' : Item("New content",
-                       props={SVN_PROP_MERGEINFO : '/A/D/H/omega:8'}),
+                       props={SVN_PROP_MERGEINFO : '/A/D/H/psi:5,8'}),
+    'D/H/omega' : Item("New content"),
     })
   expected_skip = wc.State(A_COPY_path, { })
   svntest.actions.run_and_verify_merge(A_COPY_path, '4', '8',
@@ -5869,7 +5867,6 @@ def merge_to_path_with_switched_children
                                        expected_disk,
                                        expected_status, expected_skip,
                                        None, None, None, None, None, 1)
-
   # Commit changes thus far.
   expected_output = svntest.wc.State(wc_dir, {
     'A_COPY'           : Item(verb='Sending'),
@@ -5896,17 +5893,16 @@ def merge_to_path_with_switched_children
   wc_disk.tweak("A_COPY/B/E/beta",
                 contents="New content")
   wc_disk.tweak("A_COPY/D",
-                props={SVN_PROP_MERGEINFO : '/A/D:5-6*'})
+                props={SVN_PROP_MERGEINFO : '/A/D:5,6*'})
   wc_disk.tweak("A_COPY/D/G",
                 props={SVN_PROP_MERGEINFO : '/A/D/G:6*'})
   wc_disk.tweak("A_COPY/D/G/rho",
                 contents="New content",
                 props={SVN_PROP_MERGEINFO : '/A/D/G/rho:6'})
   wc_disk.tweak("A_COPY/D/H",
-                props={SVN_PROP_MERGEINFO : '/A/D/H:5*,8*'})
+                props={SVN_PROP_MERGEINFO : '/A/D/H:5*,8'})
   wc_disk.tweak("A_COPY/D/H/omega",
-                contents="New content",
-                props={SVN_PROP_MERGEINFO : '/A/D/H/omega:8'})
+                contents="New content")
   wc_disk.tweak("A_COPY_2", props={})
   svntest.actions.run_and_verify_switch(sbox.wc_dir, A_COPY_psi_path,
                                         sbox.repo_url + "/A_COPY/D/H/psi",
@@ -5945,8 +5941,7 @@ def merge_to_path_with_switched_children
   expected_disk = wc.State('', {
     ''      : Item(props={SVN_PROP_MERGEINFO : '/A/D/H:5-8'}),
     'psi'   : Item("New content"),
-    'omega' : Item("New content",
-                   props={SVN_PROP_MERGEINFO : '/A/D/H/omega:8'}),
+    'omega' : Item("New content"),
     'chi'   : Item("This is the file 'chi'.\n"),
     })
   expected_skip = wc.State(A_COPY_H_path, { })
@@ -5996,14 +5991,11 @@ def merge_to_path_with_switched_children
   expected_status_D.tweak('H/psi', wc_rev=10, switched=None)
   expected_status_D.tweak('H/omega', wc_rev=9)
   expected_status_D.tweak('G', 'G/rho', switched='S', wc_rev=9)
-  expected_disk_D.tweak('', props={SVN_PROP_MERGEINFO : '/A/D:5-6*,10*',
+  expected_disk_D.tweak('', props={SVN_PROP_MERGEINFO : '/A/D:5,6*,10',
                                    "prop:name" : "propval"})
   expected_disk_D.tweak('G/rho',
                         props={SVN_PROP_MERGEINFO : '/A/D/G/rho:6'})
   expected_disk_D.tweak('H', props={SVN_PROP_MERGEINFO : '/A/D/H:5-8'})
-
-  expected_disk_D.tweak('H/omega',
-                        props={SVN_PROP_MERGEINFO : '/A/D/H/omega:8'})
   expected_disk_D.tweak('H/psi', contents="New content", props={})
   svntest.actions.run_and_verify_merge(A_COPY_D_path, '9', '10',
                                        sbox.repo_url + '/A/D', None,
@@ -6064,7 +6056,6 @@ def merge_to_path_with_switched_children
     'D/G'       : Item(status=' U'),
     'D/G/rho'   : Item(status=' U'),
     'D/H'       : Item(status=' U'),
-    'D/H/omega' : Item(status=' U'),
     })
   expected_elision_output = wc.State(A_COPY_path, {
     ''          : Item(status=' U'),
@@ -6072,7 +6063,6 @@ def merge_to_path_with_switched_children
     'D/G'       : Item(status=' U'),
     'D/G/rho'   : Item(status=' U'),
     'D/H'       : Item(status=' U'),
-    'D/H/omega' : Item(status=' U'),
     })
   expected_status = wc.State(A_COPY_path, {
     ''          : Item(status=' M', wc_rev=10),
@@ -6093,7 +6083,7 @@ def merge_to_path_with_switched_children
     'D/H'       : Item(status=' M', wc_rev=10),
     'D/H/chi'   : Item(status='  ', wc_rev=10),
     'D/H/psi'   : Item(status='M ', wc_rev=10),
-    'D/H/omega' : Item(status='MM', wc_rev=10),
+    'D/H/omega' : Item(status='M ', wc_rev=10),
     })
   expected_disk = wc.State('', {
     'B'         : Item(),
@@ -7290,7 +7280,7 @@ def merge_with_depth_files(sbox):
 #
 # Test issue #3407 'Shallow merges incorrectly set mergeinfo on children'.
 @SkipUnless(server_has_mergeinfo)
-@Issues(2976,3392,3407)
+@Issues(2976,3392,3407,4057)
 def merge_away_subtrees_noninheritable_ranges(sbox):
   "subtrees can lose non-inheritable ranges"
 
@@ -7609,8 +7599,9 @@ def merge_away_subtrees_noninheritable_r
   svntest.actions.run_and_verify_svn(None, None, [], 'revert', '-R', wc_dir)
   svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
 
-  # Merge r8 from A/D/H to A_COPY_D/H at depth empty, creating non-inheritable
-  # mergeinfo on the target.  Commit this merge as r13.
+  # Merge r8 from A/D/H to A_COPY_D/H at depth empty.  Since r8 affects only
+  # A_COPY/D/H itself, the resulting mergeinfo is inheritabled.  Commit this
+  # merge as r13.
   expected_output = wc.State(H_COPY_2_path, {
     ''    : Item(status=' U'),
     })
@@ -7626,7 +7617,7 @@ def merge_away_subtrees_noninheritable_r
     'chi'   : Item(status='  ', wc_rev=12),
     })
   expected_disk = wc.State('', {
-    ''      : Item(props={SVN_PROP_MERGEINFO : '/A/D/H:8*',
+    ''      : Item(props={SVN_PROP_MERGEINFO : '/A/D/H:8',
                           "prop:name" : "propval"}),
     'psi'   : Item("This is the file 'psi'.\n"),
     'omega' : Item("This is the file 'omega'.\n"),
@@ -16859,7 +16850,7 @@ def merge_adds_subtree_with_mergeinfo(sb
 
 #----------------------------------------------------------------------
 # A test for issue #3978 'reverse merge which adds subtree fails'.
-@Issue(3978)
+@Issue(3978,4057)
 @SkipUnless(server_has_mergeinfo)
 def reverse_merge_adds_subtree(sbox):
   "reverse merge adds subtree"
@@ -16886,6 +16877,9 @@ def reverse_merge_adds_subtree(sbox):
                                      'Cherry-pick r7 from A to A_COPY', wc_dir)
 
   # r9 - File depth sync merge from A/D/H to A_COPY/D/H/
+  # This shallow merge does not create non-inheritable mergeinfo because of
+  # the issue #4057 fix; all subtrees affected by the diff are present, so
+  # non-inheritable mergeinfo is not required.
   svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
   svntest.actions.run_and_verify_svn(None, None, [], 'merge',
                                      sbox.repo_url + '/A/D/H',
@@ -16972,12 +16966,10 @@ def reverse_merge_adds_subtree(sbox):
     'D/G/rho'   : Item("This is the file 'rho'.\n"),
     'D/G/tau'   : Item("This is the file 'tau'.\n"),
     'D/gamma'   : Item("This is the file 'gamma'.\n"),
-    'D/H'       : Item(props={SVN_PROP_MERGEINFO : '/A/D/H:2-6*,8*'}),
+    'D/H'       : Item(props={SVN_PROP_MERGEINFO : '/A/D/H:2-6,8'}),
     'D/H/chi'   : Item("This is the file 'chi'.\n"),
-    'D/H/psi'   : Item("New content",
-                       props={SVN_PROP_MERGEINFO : '/A/D/H/psi:2-8'}),
-    'D/H/omega' : Item("New content",
-                       props={SVN_PROP_MERGEINFO : '/A/D/H/omega:2-8'}),
+    'D/H/psi'   : Item("New content"),
+    'D/H/omega' : Item("New content"),
     })
   expected_skip = wc.State('.', { })
   svntest.actions.run_and_verify_merge(A_COPY_path, 7, 6,
@@ -17177,8 +17169,10 @@ def noninheritable_mergeinfo_test_set_up
     })
   expected_mergeinfo_output = wc.State(B_branch_path, {
     ''       : Item(status=' U'),
+    'lambda' : Item(status=' U'),
     })
   expected_elision_output = wc.State(B_branch_path, {
+    'lambda' : Item(status=' U'),
     })
   expected_status = wc.State(B_branch_path, {
     ''        : Item(status=' M'),
@@ -17207,7 +17201,6 @@ def noninheritable_mergeinfo_test_set_up
 # Test for issue #4056 "don't record non-inheritable mergeinfo if missing
 # subtrees are not touched by the full-depth diff".
 @Issue(4056)
-@XFail()
 @SkipUnless(server_has_mergeinfo)
 def unnecessary_noninheritable_mergeinfo_missing_subtrees(sbox):
   "missing subtrees untouched by infinite depth merge"
@@ -17226,19 +17219,16 @@ def unnecessary_noninheritable_mergeinfo
 
   # Merge r3 from ^/A/B to branch/B
   #
-  # Currently this fails because merge isn't smart enough to
-  # realize that despite the shallow merge target, the diff can
-  # only affect branch/B/lambda, which is still present, so there
+  # Merge is smart enough to realize that despite the shallow merge target,
+  # the diff can only affect branch/B/lambda, which is still present, so there
   # is no need to record non-inheritable mergeinfo on the target
   # or any subtree mergeinfo whatsoever:
   #
   #   >svn pg svn:mergeinfo -vR
   #   Properties on 'branch\B':
   #     svn:mergeinfo
-  #       /A/B:3* <-- Should be inheritable
-  #   Properties on 'branch\B\lambda':
-  #     svn:mergeinfo
-  #       /A/B/lambda:3 <-- Not neccessary
+  #       /A/B:3 <-- Nothing was skipped, so doesn't need
+  #                  to be non-inheritable.
   svntest.actions.run_and_verify_merge(B_branch_path,
                                        '2', '3',
                                        sbox.repo_url + '/A/B', None,
@@ -17255,12 +17245,12 @@ def unnecessary_noninheritable_mergeinfo
 # Test for issue #4057 "don't record non-inheritable mergeinfo in shallow
 # merge if entire diff is within requested depth".
 @Issue(4057)
-@XFail()
 @SkipUnless(server_has_mergeinfo)
 def unnecessary_noninheritable_mergeinfo_shallow_merge(sbox):
   "shallow merge reaches all neccessary subtrees"
 
   B_branch_path = os.path.join(sbox.wc_dir, 'branch', 'B')
+  E_path        = os.path.join(sbox.wc_dir, 'A', 'B', 'E')
 
   # Setup a simple branch to which 
   expected_output, expected_mergeinfo_output, expected_elision_output, \
@@ -17269,7 +17259,7 @@ def unnecessary_noninheritable_mergeinfo
 
   # Merge r3 from ^/A/B to branch/B at operational depth=files
   #
-  # Currently this fails because merge isn't smart enough to
+  # Previously this failed because merge wasn't smart enough to
   # realize that despite being a shallow merge, the diff can
   # only affect branch/B/lambda, which is within the specified
   # depth, so there is no need to record non-inheritable mergeinfo
@@ -17294,6 +17284,71 @@ def unnecessary_noninheritable_mergeinfo
                                        None, None, None, None, None, 1, 1,
                                        '--depth', 'files', B_branch_path)
 
+  # Revert the merge and then make a prop change to A/B/E in r4.
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'revert', '--recursive', sbox.wc_dir)
+  svntest.actions.run_and_verify_svn(None,
+                                     ["property 'prop:name' set on '" +
+                                      E_path + "'\n"], [], 'ps',
+                                     'prop:name', 'propval', E_path)
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'ci', '-m', 'A new property on a dir',
+                                     sbox.wc_dir)
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'up', sbox.wc_dir)
+
+  # Merge r4 from ^/A/B to branch/B at operational depth=immediates
+  #
+  # Previously this failed because the mergetracking logic didn't realize
+  # that despite being a shallow merge, the diff only affected branch/B/E,
+  # which was within the specified depth, so there was no need to record
+  # non-inheritable mergeinfo or subtree mergeinfo:
+  #
+  #   >svn pg svn:mergeinfo -vR
+  #   Properties on 'branch\B':
+  #     svn:mergeinfo
+  #       /A/B:4* <-- Should be inheritable
+  #   Properties on 'branch\B\E':
+  #     svn:mergeinfo
+  #       /A/B/E:4 <-- Not neccessary 
+  expected_output = wc.State(B_branch_path, {
+    'E' : Item(status=' U'),
+    })
+  expected_mergeinfo_output = wc.State(B_branch_path, {
+    ''  : Item(status=' U'),
+    'E' : Item(status=' U'),
+    })
+  expected_elision_output = wc.State(B_branch_path, {
+    'E' : Item(status=' U'),
+    })
+  expected_status = wc.State(B_branch_path, {
+    ''        : Item(status=' M'),
+    'lambda'  : Item(status='  '),
+    'E'       : Item(status=' M'),
+    'E/alpha' : Item(status='  '),
+    'E/beta'  : Item(status='  '),
+    'F'       : Item(status='  '),
+    })
+  expected_status.tweak(wc_rev='4')
+  expected_disk = wc.State('', {
+    ''          : Item(props={SVN_PROP_MERGEINFO : '/A/B:4'}),
+    'lambda'  : Item("This is the file 'lambda'.\n"),
+    'E'       : Item(props={'prop:name' : 'propval'}),
+    'E/alpha' : Item("This is the file 'alpha'.\n"),
+    'E/beta'  : Item("This is the file 'beta'.\n"),
+    'F'       : Item(),
+    })
+  svntest.actions.run_and_verify_merge(B_branch_path, '3', '4',
+                                       sbox.repo_url + '/A/B', None,
+                                       expected_output,
+                                       expected_mergeinfo_output,
+                                       expected_elision_output,
+                                       expected_disk,
+                                       expected_status,
+                                       expected_skip,
+                                       None, None, None, None, None, 1, 1,
+                                       '--depth', 'immediates', B_branch_path)
+
 ########################################################################
 # Run the tests
 

Modified: subversion/branches/showing-merge-info/subversion/tests/cmdline/mergeinfo_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/tests/cmdline/mergeinfo_tests.py?rev=1211703&r1=1211702&r2=1211703&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/tests/cmdline/mergeinfo_tests.py (original)
+++ subversion/branches/showing-merge-info/subversion/tests/cmdline/mergeinfo_tests.py Wed Dec  7 23:23:02 2011
@@ -708,15 +708,14 @@ def noninheritabled_mergeinfo_not_always
   svntest.actions.run_and_verify_svn(None, None, [], 'merge',
                                      sbox.repo_url + '/A', branch_path,
                                      '-c3', '--depth=empty')
+  # Forcibly set non-inheritable mergeinfo to replicate the pre-1.8 behavior,
+  # where prior to the fix for issue #4057, non-inheritable mergeinfo was
+  # unconditionally set for merges with shallow operational depths.
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'propset', SVN_PROP_MERGEINFO,
+                                     '/A:3*\n', branch_path)  
   svntest.main.run_svn(None, 'commit', '-m', 'shallow merge', wc_dir)
 
-  # A sanity check that we really have non-inheritable mergeinfo.
-  # If issue #4057 is ever fixed then the above merge will record
-  # inheritable mergeinfo and this test will spuriously pass.
-  svntest.actions.run_and_verify_svn(None, ["/A:3*\n"], [],
-                                     'propget', SVN_PROP_MERGEINFO,
-                                     branch_path)
-
   # Now check that r3 is reported as fully merged from ^/A to ^/branch
   # and does not show up all when asking for eligible revs.
   svntest.actions.run_and_verify_mergeinfo(

Modified: subversion/branches/showing-merge-info/subversion/tests/cmdline/patch_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/tests/cmdline/patch_tests.py?rev=1211703&r1=1211702&r2=1211703&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/tests/cmdline/patch_tests.py (original)
+++ subversion/branches/showing-merge-info/subversion/tests/cmdline/patch_tests.py Wed Dec  7 23:23:02 2011
@@ -3427,7 +3427,6 @@ def patch_strip_cwd(sbox):
   "patch --strip propchanges cwd"
   return patch_one_property(sbox, True)
 
-@XFail()
 @Issue(3814)
 def patch_set_prop_no_eol(sbox):
   "patch doesn't append newline to properties"
@@ -3615,7 +3614,6 @@ def patch_moved_away(sbox):
                                        1, # check-props
                                        1) # dry-run
 
-@XFail()
 @Issue(3991)
 def patch_lacking_trailing_eol(sbox):
   "patch file lacking trailing eol"
@@ -3650,12 +3648,11 @@ def patch_lacking_trailing_eol(sbox):
 
   expected_output = [
     'U         %s\n' % os.path.join(wc_dir, 'iota'),
-    'svn: W[0-9]+: .*', # warning about appending a newline to iota's last line
   ]
 
   # Expect a newline to be appended
   expected_disk = svntest.main.greek_state.copy()
-  expected_disk.tweak('iota', contents=iota_contents+"Some more bytes\n")
+  expected_disk.tweak('iota', contents=iota_contents + "Some more bytes")
 
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
   expected_status.tweak('iota', status='M ')
@@ -3991,6 +3988,63 @@ def patch_delete_and_skip(sbox):
                                        1, # check-props
                                        1) # dry-run
 
+def patch_target_no_eol_at_eof(sbox):
+  "patch target with no eol at eof"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  patch_file_path = make_patch_path(sbox)
+  iota_path = os.path.join(wc_dir, 'iota')
+
+  iota_contents = [
+    "This is the file iota."
+  ]
+
+  svntest.main.file_write(iota_path, ''.join(iota_contents))
+  expected_output = svntest.wc.State(wc_dir, {
+    'iota'  : Item(verb='Sending'),
+    })
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  expected_status.tweak('iota', wc_rev=2)
+  svntest.actions.run_and_verify_commit(wc_dir, expected_output,
+                                        expected_status, None, wc_dir)
+  unidiff_patch = [
+    "--- iota\t(revision 1)\n",
+    "+++ iota\t(working copy)\n",
+    "@@ -1,7 +1,7 @@\n",
+    "-This is the file iota.\n"
+    "\\ No newline at end of file\n",
+    "+It is really the file 'iota'.\n",
+    "\\ No newline at end of file\n",
+  ]
+
+  svntest.main.file_write(patch_file_path, ''.join(unidiff_patch))
+
+  iota_contents = [
+    "It is really the file 'iota'."
+  ]
+  expected_output = [
+    'U         %s\n' % os.path.join(wc_dir, 'iota'),
+  ]
+
+  expected_disk = svntest.main.greek_state.copy()
+  expected_disk.tweak('iota', contents=''.join(iota_contents))
+
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  expected_status.tweak('iota', status='M ', wc_rev=2)
+
+  expected_skip = wc.State('', { })
+
+  svntest.actions.run_and_verify_patch(wc_dir, os.path.abspath(patch_file_path),
+                                       expected_output,
+                                       expected_disk,
+                                       expected_status,
+                                       expected_skip,
+                                       None, # expected err
+                                       1, # check-props
+                                       1) # dry-run
+
 ########################################################################
 #Run the tests
 
@@ -4033,6 +4087,7 @@ test_list = [ None,
               patch_reversed_add_with_props2,
               patch_dev_null,
               patch_delete_and_skip,
+              patch_target_no_eol_at_eof,
             ]
 
 if __name__ == '__main__':

Modified: subversion/branches/showing-merge-info/subversion/tests/cmdline/prop_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/tests/cmdline/prop_tests.py?rev=1211703&r1=1211702&r2=1211703&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/tests/cmdline/prop_tests.py (original)
+++ subversion/branches/showing-merge-info/subversion/tests/cmdline/prop_tests.py Wed Dec  7 23:23:02 2011
@@ -893,8 +893,7 @@ def prop_value_conversions(sbox):
   svntest.actions.set_prop('svn:executable', '*', lambda_path)
   for pval in ('      ', '', 'no', 'off', 'false'):
     svntest.actions.set_prop('svn:executable', pval, mu_path,
-                             ["svn: warning: To turn off the svn:executable property, use 'svn propdel';\n",
-                              "setting the property to '" + pval + "' will not turn it off.\n"])
+                             "svn: warning: W125005.*use 'svn propdel'")
 
   # Anything else should be untouched
   svntest.actions.set_prop('svn:some-prop', 'bar', lambda_path)

Modified: subversion/branches/showing-merge-info/subversion/tests/cmdline/special_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/tests/cmdline/special_tests.py?rev=1211703&r1=1211702&r2=1211703&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/tests/cmdline/special_tests.py (original)
+++ subversion/branches/showing-merge-info/subversion/tests/cmdline/special_tests.py Wed Dec  7 23:23:02 2011
@@ -551,7 +551,9 @@ def diff_symlink_to_dir(sbox):
     "___________________________________________________________________\n",
     "Added: svn:special\n",
     "## -0,0 +1 ##\n",
-    "+*\n" ]
+    "+*\n",
+    "\\ No newline at end of property\n"
+  ]
   svntest.actions.run_and_verify_svn(None, expected_output, [], 'diff',
                                      '.')
   # We should get the same output if we the diff the symlink itself.

Modified: subversion/branches/showing-merge-info/subversion/tests/cmdline/stat_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/tests/cmdline/stat_tests.py?rev=1211703&r1=1211702&r2=1211703&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/tests/cmdline/stat_tests.py (original)
+++ subversion/branches/showing-merge-info/subversion/tests/cmdline/stat_tests.py Wed Dec  7 23:23:02 2011
@@ -1924,6 +1924,31 @@ def wclock_status(sbox):
                                      'status', wc_dir)
 
 
+@Issue(4072)
+@XFail()
+def modified_modulo_translation(sbox):
+  "modified before translation, unmodified after"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  # iota is a shell script.
+  sbox.simple_propset('svn:eol-style', 'LF', 'iota')
+  sbox.simple_commit()
+
+  # CRLF it.
+  open(sbox.ospath('iota'), 'wb').write("This is the file 'iota'.\r\n")
+
+  # Run status.  Expect some output.
+  # TODO: decide how such files should show in the output; whether they
+  #       always show, or only with some --flag; and adjust this accordingly.
+  svntest.actions.run_and_verify_svn(None, svntest.verify.AnyOutput, [],
+                                     'status', wc_dir)
+
+  # Expect the file to be renormalized (to LF) after a revert.
+  sbox.simple_revert('iota')
+  svntest.actions.run_and_verify_svn(None, [], [], 'status', wc_dir)
+
 ########################################################################
 # Run the tests
 
@@ -1965,6 +1990,7 @@ test_list = [ None,
               status_locked_deleted,
               wc_wc_copy_timestamp,
               wclock_status,
+              modified_modulo_translation,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/showing-merge-info/subversion/tests/cmdline/svntest/actions.py
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/tests/cmdline/svntest/actions.py?rev=1211703&r1=1211702&r2=1211703&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/tests/cmdline/svntest/actions.py (original)
+++ subversion/branches/showing-merge-info/subversion/tests/cmdline/svntest/actions.py Wed Dec  7 23:23:02 2011
@@ -1841,7 +1841,7 @@ def create_failing_post_commit_hook(repo
 # set_prop can be used for properties with NULL characters which are not
 # handled correctly when passed to subprocess.Popen() and values like "*"
 # which are not handled correctly on Windows.
-def set_prop(name, value, path, expected_err=None):
+def set_prop(name, value, path, expected_re_string=None):
   """Set a property with specified value"""
   if value and (value[0] == '-' or '\x00' in value or sys.platform == 'win32'):
     from tempfile import mkstemp
@@ -1851,10 +1851,17 @@ def set_prop(name, value, path, expected
     value_file.write(value)
     value_file.flush()
     value_file.close()
-    main.run_svn(expected_err, 'propset', '-F', value_file_path, name, path)
+    exit_code, out, err = main.run_svn(expected_re_string, 'propset',
+                                       '-F', value_file_path, name, path)
     os.remove(value_file_path)
   else:
-    main.run_svn(expected_err, 'propset', name, value, path)
+    exit_code, out, err = main.run_svn(expected_re_string, 'propset',
+                                       name, value, path)
+  if expected_re_string:
+    if not expected_re_string.startswith(".*"):
+      expected_re_string = ".*(" + expected_re_string + ")"
+    expected_err = verify.RegexOutput(expected_re_string, match_all=False)
+    verify.verify_outputs(None, None, err, None, expected_err)
 
 def check_prop(name, path, exp_out, revprop=None):
   """Verify that property NAME on PATH has a value of EXP_OUT.

Modified: subversion/branches/showing-merge-info/subversion/tests/libsvn_client/client-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/tests/libsvn_client/client-test.c?rev=1211703&r1=1211702&r2=1211703&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/tests/libsvn_client/client-test.c (original)
+++ subversion/branches/showing-merge-info/subversion/tests/libsvn_client/client-test.c Wed Dec  7 23:23:02 2011
@@ -102,26 +102,28 @@ test_elide_mergeinfo_catalog(apr_pool_t 
        i < sizeof(elide_testcases) / sizeof(elide_testcases[0]);
        i++)
     {
-      apr_hash_t *catalog;
+      svn_mergeinfo_catalog_t mergeinfo_catalog;
       mergeinfo_catalog_item *item;
 
       svn_pool_clear(iterpool);
 
-      catalog = apr_hash_make(iterpool);
+      mergeinfo_catalog = apr_hash_make(iterpool);
       for (item = elide_testcases[i]; item->path; item++)
         {
-          apr_hash_t *mergeinfo;
+          svn_mergeinfo_t mergeinfo;
 
           SVN_ERR(svn_mergeinfo_parse(&mergeinfo, item->unparsed_mergeinfo,
                                       iterpool));
-          apr_hash_set(catalog, item->path, APR_HASH_KEY_STRING, mergeinfo);
+          apr_hash_set(mergeinfo_catalog, item->path, APR_HASH_KEY_STRING,
+                       mergeinfo);
         }
 
-      SVN_ERR(svn_client__elide_mergeinfo_catalog(catalog, iterpool));
+      SVN_ERR(svn_client__elide_mergeinfo_catalog(mergeinfo_catalog,
+                                                  iterpool));
 
       for (item = elide_testcases[i]; item->path; item++)
         {
-          apr_hash_t *mergeinfo = apr_hash_get(catalog, item->path,
+          apr_hash_t *mergeinfo = apr_hash_get(mergeinfo_catalog, item->path,
                                                APR_HASH_KEY_STRING);
           if (item->remains && !mergeinfo)
             return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,

Modified: subversion/branches/showing-merge-info/subversion/tests/libsvn_diff/parse-diff-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/tests/libsvn_diff/parse-diff-test.c?rev=1211703&r1=1211702&r2=1211703&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/tests/libsvn_diff/parse-diff-test.c (original)
+++ subversion/branches/showing-merge-info/subversion/tests/libsvn_diff/parse-diff-test.c Wed Dec  7 23:23:02 2011
@@ -314,7 +314,8 @@ check_content(svn_diff_hunk_t *hunk, svn
     SVN_TEST_STRING_ASSERT(exp_buf->data, hunk_buf->data);
   }
 
-  SVN_TEST_ASSERT(hunk_buf->len == 0);
+  if (!hunk_eof)
+    SVN_TEST_ASSERT(hunk_buf->len == 0);
 
   return SVN_NO_ERROR;
 }
@@ -946,11 +947,9 @@ test_parse_unidiff_lacking_trailing_eol(
                             "This is the file 'gamma'." NL,
                             pool));
 
-      /* Verify that the contents are as expected, with a NL appended.
-         TODO: test for notification about the NL silently appended */
       SVN_ERR(check_content(hunk, reverse,
                             "This is the file 'gamma'." NL
-                            "some more bytes to 'gamma'" NL,
+                            "some more bytes to 'gamma'",
                             pool));
 
       reverse = !reverse;
@@ -981,7 +980,7 @@ struct svn_test_descriptor_t test_funcs[
                    "test property diffs with odd symbols"),
     SVN_TEST_PASS2(test_git_diffs_with_spaces_diff,
                    "test git diffs with spaces in paths"),
-    SVN_TEST_XFAIL2(test_parse_unidiff_lacking_trailing_eol,
+    SVN_TEST_PASS2(test_parse_unidiff_lacking_trailing_eol,
                    "test parsing unidiffs lacking trailing eol"),
     SVN_TEST_NULL
   };

Modified: subversion/branches/showing-merge-info/subversion/tests/libsvn_wc/db-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/tests/libsvn_wc/db-test.c?rev=1211703&r1=1211702&r2=1211703&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/tests/libsvn_wc/db-test.c (original)
+++ subversion/branches/showing-merge-info/subversion/tests/libsvn_wc/db-test.c Wed Dec  7 23:23:02 2011
@@ -1053,7 +1053,7 @@ test_scan_deletion(apr_pool_t *pool)
             &copy_op_root_abspath,
             db, svn_dirent_join(local_abspath, "J/J-e", pool),
             pool, pool));
-  SVN_TEST_ASSERT(validate_abspath(local_abspath, "J/J-e",
+  SVN_TEST_ASSERT(validate_abspath(local_abspath, "J",
                                    base_del_abspath, pool));
   SVN_TEST_ASSERT(validate_abspath(local_abspath, "other/place",
                                    moved_to_abspath, pool));
@@ -1070,7 +1070,7 @@ test_scan_deletion(apr_pool_t *pool)
             &copy_op_root_abspath,
             db, svn_dirent_join(local_abspath, "J/J-e/J-e-a", pool),
             pool, pool));
-  SVN_TEST_ASSERT(validate_abspath(local_abspath, "J/J-e",
+  SVN_TEST_ASSERT(validate_abspath(local_abspath, "J",
                                    base_del_abspath, pool));
   SVN_TEST_ASSERT(validate_abspath(local_abspath, "other/place/J-e-a",
                                    moved_to_abspath, pool));
@@ -1120,7 +1120,7 @@ test_scan_deletion(apr_pool_t *pool)
   /* ### I don't understand this.  "J/J-e/J-e-b/Jeba" is a deleted
      base node that is not overlayed by the replacement rooted at "J".
      Why does base_del_abspath refer to "J-e"?  */
-  SVN_TEST_ASSERT(validate_abspath(local_abspath, "J/J-e",
+  SVN_TEST_ASSERT(validate_abspath(local_abspath, "J",
                                    base_del_abspath, pool));
   SVN_TEST_ASSERT(validate_abspath(local_abspath, "other/place/J-e-b/Jeba",
                                    moved_to_abspath, pool));
@@ -1174,7 +1174,7 @@ test_scan_deletion(apr_pool_t *pool)
             &copy_op_root_abspath,
             db, svn_dirent_join(local_abspath, "K/K-b", pool),
             pool, pool));
-  SVN_TEST_ASSERT(validate_abspath(local_abspath, "K/K-b",
+  SVN_TEST_ASSERT(validate_abspath(local_abspath, "K",
                                    base_del_abspath, pool));
   SVN_TEST_ASSERT(validate_abspath(local_abspath, "moved/away",
                                    moved_to_abspath, pool));

Modified: subversion/branches/showing-merge-info/subversion/tests/libsvn_wc/op-depth-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/tests/libsvn_wc/op-depth-test.c?rev=1211703&r1=1211702&r2=1211703&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/branches/showing-merge-info/subversion/tests/libsvn_wc/op-depth-test.c Wed Dec  7 23:23:02 2011
@@ -322,35 +322,50 @@ typedef struct nodes_row_t {
     svn_revnum_t repo_revnum;
     const char *repo_relpath;
     svn_boolean_t file_external;
+    const char *moved_to;
+    svn_boolean_t moved_here;
 } nodes_row_t;
 
 /* Macro for filling in the REPO_* fields of a non-base NODES_ROW_T
  * that has no copy-from info. */
 #define NO_COPY_FROM SVN_INVALID_REVNUM, NULL
+#define MOVED_HERE FALSE, NULL, TRUE
 
 /* Return a human-readable string representing ROW. */
 static const char *
 print_row(const nodes_row_t *row,
           apr_pool_t *result_pool)
 {
-  const char *file_external_str;
+  const char *file_external_str, *moved_here_str, *moved_to_str;
 
   if (row == NULL)
     return "(null)";
 
+  if (row->moved_to)
+    moved_to_str = apr_psprintf(result_pool, ", to %s", row->moved_to);
+  else
+    moved_to_str = "";
+
+  if (row->moved_here)
+    moved_here_str = ", here";
+  else
+    moved_here_str = "";
+      
   if (row->file_external)
     file_external_str = ", file-external";
   else
     file_external_str = "";
       
   if (row->repo_revnum == SVN_INVALID_REVNUM)
-    return apr_psprintf(result_pool, "%d, %s, %s%s",
+    return apr_psprintf(result_pool, "%d, %s, %s%s%s%s",
                         row->op_depth, row->local_relpath, row->presence,
+                        moved_here_str, moved_to_str,
                         file_external_str);
   else
-    return apr_psprintf(result_pool, "%d, %s, %s, from ^/%s@%d%s",
+    return apr_psprintf(result_pool, "%d, %s, %s, from ^/%s@%d%s%s%s",
                         row->op_depth, row->local_relpath, row->presence,
                         row->repo_relpath, (int)row->repo_revnum,
+                        moved_here_str, moved_to_str,
                         file_external_str);
 }
 
@@ -393,7 +408,12 @@ compare_nodes_rows(const void *key, apr_
   else if (expected->repo_revnum != found->repo_revnum
            || (strcmp_null(expected->repo_relpath, found->repo_relpath) != 0)
            || (strcmp_null(expected->presence, found->presence) != 0)
-           || (expected->file_external != found->file_external))
+           || (expected->file_external != found->file_external)
+           || (expected->moved_here != found->moved_here)
+           || (expected->moved_to && !found->moved_to)
+           || (!expected->moved_to && found->moved_to)
+           || (expected->moved_to
+               && strcmp(expected->moved_to, found->moved_to)))
     {
       b->errors = svn_error_createf(
                     SVN_ERR_TEST_FAILED, b->errors,
@@ -423,7 +443,7 @@ check_db_rows(svn_test__sandbox_t *b,
   svn_sqlite__stmt_t *stmt;
   static const char *const statements[] = {
     "SELECT op_depth, nodes.presence, nodes.local_relpath, revision,"
-    "       repos_path, file_external, def_local_relpath"
+    "       repos_path, file_external, def_local_relpath, moved_to, moved_here"
     " FROM nodes "
     " LEFT OUTER JOIN externals"
     "             ON nodes.local_relpath = externals.local_relpath"
@@ -460,6 +480,8 @@ check_db_rows(svn_test__sandbox_t *b,
         comparison_baton.errors
           = svn_error_createf(SVN_ERR_TEST_FAILED, comparison_baton.errors,
                               "incomplete {%s}", print_row(row, b->pool));
+      row->moved_to = svn_sqlite__column_text(stmt, 7, b->pool);
+      row->moved_here = svn_sqlite__column_boolean(stmt, 8);
 
       key = apr_psprintf(b->pool, "%d %s", row->op_depth, row->local_relpath);
       apr_hash_set(found_hash, key, APR_HASH_KEY_STRING, row);
@@ -1691,9 +1713,9 @@ test_wc_move(const svn_test_opts_t *opts
       { 0, "",           "normal",       1, "" },
       { 0, "A",          "normal",       1, "A" },
       { 0, "A/B",        "normal",       1, "A/B" },
-      { 0, "A/B/C",      "normal",       1, "A/B/C" },
+      { 0, "A/B/C",      "normal",       1, "A/B/C", FALSE, "A/B/C-move" },
       { 3, "A/B/C",      "base-deleted", NO_COPY_FROM },
-      { 3, "A/B/C-move", "normal",       1, "A/B/C" },
+      { 3, "A/B/C-move", "normal",       1, "A/B/C", MOVED_HERE },
       { 0 }
     };
     SVN_ERR(check_db_rows(&b, "", rows));
@@ -1704,14 +1726,14 @@ test_wc_move(const svn_test_opts_t *opts
     nodes_row_t rows[] = {
       { 0, "",                "normal",       1, "" },
       { 0, "A",               "normal",       1, "A" },
-      { 0, "A/B",             "normal",       1, "A/B" },
-      { 0, "A/B/C",           "normal",       1, "A/B/C" },
+      { 0, "A/B",             "normal",       1, "A/B", FALSE, "A/B-move" },
+      { 0, "A/B/C",           "normal",       1, "A/B/C", FALSE, "A/B-move/C-move" },
       { 2, "A/B",             "base-deleted", NO_COPY_FROM },
       { 2, "A/B/C",           "base-deleted", NO_COPY_FROM },
-      { 2, "A/B-move",        "normal",       1, "A/B" },
+      { 2, "A/B-move",        "normal",       1, "A/B", MOVED_HERE },
       { 2, "A/B-move/C",      "normal",       1, "A/B/C" },
       { 3, "A/B-move/C",      "base-deleted", NO_COPY_FROM },
-      { 3, "A/B-move/C-move", "normal",       1, "A/B/C" },
+      { 3, "A/B-move/C-move", "normal",       1, "A/B/C", MOVED_HERE },
       { 0 }
     };
     SVN_ERR(check_db_rows(&b, "", rows));
@@ -3146,7 +3168,9 @@ test_shadowed_update(const svn_test_opts
   SVN_ERR(wc_update(&b, "", 2));
   SVN_ERR(wc_copy(&b, "A", "A_tmp"));
   SVN_ERR(wc_update(&b, "", 1));
-  SVN_ERR(wc_move(&b, "A_tmp", "A"));
+  SVN_ERR(wc_move(&b, "A_tmp", "A")); /* ### XFAIL: sets moved-here on
+                                         A but A_tmp is removed and so
+                                         does not have moved-to. */
 
   SVN_ERR(wc_mkdir(&b, "K"));
   SVN_ERR(wc_mkdir(&b, "K/L"));
@@ -3720,6 +3744,604 @@ incomplete_switch(const svn_test_opts_t 
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+nested_moves_child_first(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "nested_moves_child_first", opts, pool));
+
+  SVN_ERR(wc_mkdir(&b, "A"));
+  SVN_ERR(wc_mkdir(&b, "A/B"));
+  SVN_ERR(wc_mkdir(&b, "A/B/C"));
+  SVN_ERR(wc_commit(&b, ""));
+  SVN_ERR(wc_update(&b, "", 1));
+
+  {
+    nodes_row_t nodes[] = {
+      {0, "",      "normal", 1, ""},
+      {0, "A",     "normal", 1, "A"},
+      {0, "A/B",   "normal", 1, "A/B"},
+      {0, "A/B/C", "normal", 1, "A/B/C"},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+  SVN_ERR(wc_move(&b, "A/B/C", "A/B/C2"));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",       "normal",       1, ""},
+      {0, "A",      "normal",       1, "A"},
+      {0, "A/B",    "normal",       1, "A/B"},
+      {0, "A/B/C",  "normal",       1, "A/B/C", FALSE, "A/B/C2"},
+      {3, "A/B/C",  "base-deleted", NO_COPY_FROM},
+      {3, "A/B/C2", "normal",       1, "A/B/C", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+  SVN_ERR(wc_move(&b, "A/B", "A/B2"));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",        "normal",       1, ""},
+      {0, "A",       "normal",       1, "A"},
+      {0, "A/B",     "normal",       1, "A/B",   FALSE, "A/B2"},
+      {0, "A/B/C",   "normal",       1, "A/B/C", FALSE, "A/B2/C2"},
+      {2, "A/B",     "base-deleted", NO_COPY_FROM},
+      {2, "A/B/C",   "base-deleted", NO_COPY_FROM},
+      {2, "A/B2",    "normal",       1, "A/B",   MOVED_HERE},
+      {2, "A/B2/C",  "normal",       1, "A/B/C"},
+      {3, "A/B2/C",  "base-deleted", NO_COPY_FROM},
+      {3, "A/B2/C2", "normal",       1, "A/B/C", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+  SVN_ERR(wc_move(&b, "A", "A2"));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",        "normal",       1, ""},
+      {0, "A",       "normal",       1, "A",     FALSE, "A2"},
+      {0, "A/B",     "normal",       1, "A/B",   FALSE, "A2/B2"},
+      {0, "A/B/C",   "normal",       1, "A/B/C", FALSE, "A2/B2/C2"},
+      {1, "A",       "base-deleted", NO_COPY_FROM},
+      {1, "A/B",     "base-deleted", NO_COPY_FROM},
+      {1, "A/B/C",   "base-deleted", NO_COPY_FROM},
+      {1, "A2",      "normal",       1, "A",     MOVED_HERE},
+      {1, "A2/B",    "normal",       1, "A/B"},
+      {1, "A2/B/C",  "normal",       1, "A/B/C"},
+      {2, "A2/B",    "base-deleted", NO_COPY_FROM},
+      {2, "A2/B/C",  "base-deleted", NO_COPY_FROM},
+      {2, "A2/B2",   "normal",       1, "A/B",   MOVED_HERE},
+      {2, "A2/B2/C", "normal",       1, "A/B/C"},
+      {3, "A2/B2/C", "base-deleted", NO_COPY_FROM},
+      {3, "A2/B2/C2","normal",       1, "A/B/C", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+nested_moves_child_last(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "nested_moves_child_last", opts, pool));
+
+  SVN_ERR(wc_mkdir(&b, "A"));
+  SVN_ERR(wc_mkdir(&b, "A/B"));
+  SVN_ERR(wc_mkdir(&b, "A/B/C"));
+  SVN_ERR(wc_commit(&b, ""));
+  SVN_ERR(wc_update(&b, "", 1));
+
+  {
+    nodes_row_t nodes[] = {
+      {0, "",      "normal", 1, ""},
+      {0, "A",     "normal", 1, "A"},
+      {0, "A/B",   "normal", 1, "A/B"},
+      {0, "A/B/C", "normal", 1, "A/B/C"},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+  SVN_ERR(wc_move(&b, "A", "A2"));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",        "normal",       1, ""},
+      {0, "A",       "normal",       1, "A",     FALSE, "A2"},
+      {0, "A/B",     "normal",       1, "A/B"},
+      {0, "A/B/C",   "normal",       1, "A/B/C"},
+      {1, "A",       "base-deleted", NO_COPY_FROM},
+      {1, "A/B",     "base-deleted", NO_COPY_FROM},
+      {1, "A/B/C",   "base-deleted", NO_COPY_FROM},
+      {1, "A2",      "normal",       1, "A",     MOVED_HERE},
+      {1, "A2/B",    "normal",       1, "A/B",   MOVED_HERE},
+      {1, "A2/B/C",  "normal",       1, "A/B/C", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+  SVN_ERR(wc_move(&b, "A2/B", "A2/B2"));  /* ### Leaves moved-here on lines
+                                             marked XFAIL */
+  {
+    nodes_row_t nodes[] = {
+      {0, "",        "normal",       1, ""},
+      {0, "A",       "normal",       1, "A",     FALSE, "A2"},
+      {0, "A/B",     "normal",       1, "A/B",   FALSE, "A2/B2"},
+      {0, "A/B/C",   "normal",       1, "A/B/C"},
+      {1, "A",       "base-deleted", NO_COPY_FROM},
+      {1, "A/B",     "base-deleted", NO_COPY_FROM},
+      {1, "A/B/C",   "base-deleted", NO_COPY_FROM},
+      {1, "A2",      "normal",       1, "A",     MOVED_HERE},
+      {1, "A2/B",    "normal",       1, "A/B"},               /* XFAIL */
+      {1, "A2/B/C",  "normal",       1, "A/B/C"},             /* XFAIL */
+      {2, "A2/B",    "base-deleted", NO_COPY_FROM},
+      {2, "A2/B/C",  "base-deleted", NO_COPY_FROM},
+      {2, "A2/B2",   "normal",       1, "A/B",   MOVED_HERE},
+      {2, "A2/B2/C", "normal",       1, "A/B/C", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+  SVN_ERR(wc_move(&b, "A2/B2/C", "A2/B2/C2")); /* ### Leaves moved-here on line
+                                                  marked XFAIL */
+  {
+    nodes_row_t nodes[] = {
+      {0, "",        "normal",       1, ""},
+      {0, "A",       "normal",       1, "A",     FALSE, "A2"},
+      {0, "A/B",     "normal",       1, "A/B",   FALSE, "A2/B2"},
+      {0, "A/B/C",   "normal",       1, "A/B/C", FALSE, "A2/B2/C2"},
+      {1, "A",       "base-deleted", NO_COPY_FROM},
+      {1, "A/B",     "base-deleted", NO_COPY_FROM},
+      {1, "A/B/C",   "base-deleted", NO_COPY_FROM},
+      {1, "A2",      "normal",       1, "A",     MOVED_HERE},
+      {1, "A2/B",    "normal",       1, "A/B"},
+      {1, "A2/B/C",  "normal",       1, "A/B/C"},
+      {2, "A2/B",    "base-deleted", NO_COPY_FROM},
+      {2, "A2/B/C",  "base-deleted", NO_COPY_FROM},
+      {2, "A2/B2",   "normal",       1, "A/B",   MOVED_HERE},
+      {2, "A2/B2/C", "normal",       1, "A/B/C"},                /* XFAIL */
+      {3, "A2/B2/C", "base-deleted", NO_COPY_FROM},
+      {3, "A2/B2/C2","normal",       1, "A/B/C", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+move_in_copy(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "move_in_replace", opts, pool));
+
+  SVN_ERR(wc_mkdir(&b, "A"));
+  SVN_ERR(wc_mkdir(&b, "A/B"));
+  SVN_ERR(wc_commit(&b, ""));
+  SVN_ERR(wc_update(&b, "", 1));
+  SVN_ERR(wc_copy(&b, "A", "A2"));
+
+  {
+    nodes_row_t nodes[] = {
+      {0, "",     "normal", 1, ""},
+      {0, "A",    "normal", 1, "A"},
+      {0, "A/B",  "normal", 1, "A/B"},
+      {1, "A2",   "normal", 1, "A"},
+      {1, "A2/B", "normal", 1, "A/B"},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+  SVN_ERR(wc_move(&b, "A2/B", "A2/B2")); /* ### Moved-here gets recorded, but
+                                            not moved-to. */
+  {
+    nodes_row_t nodes[] = {
+      {0, "",      "normal",       1, ""},
+      {0, "A",     "normal",       1, "A"},
+      {0, "A/B",   "normal",       1, "A/B"},
+      {1, "A2",    "normal",       1, "A"},
+      {1, "A2/B",  "normal",       1, "A/B"},
+      {2, "A2/B",  "base-deleted", NO_COPY_FROM},
+      {2, "A2/B2", "normal",       1, "A/B"},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+move_in_replace(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "move_in_replace", opts, pool));
+
+  SVN_ERR(wc_mkdir(&b, "A"));
+  SVN_ERR(wc_mkdir(&b, "A/B"));
+  SVN_ERR(wc_mkdir(&b, "X"));
+  SVN_ERR(wc_mkdir(&b, "X/B"));
+  SVN_ERR(wc_commit(&b, ""));
+  SVN_ERR(wc_update(&b, "", 1));
+  SVN_ERR(wc_delete(&b, "A"));
+  SVN_ERR(wc_copy(&b, "X", "A"));
+
+  {
+    nodes_row_t nodes[] = {
+      {0, "",    "normal", 1, ""},
+      {0, "A",   "normal", 1, "A"},
+      {0, "A/B", "normal", 1, "A/B"},
+      {0, "X",   "normal", 1, "X"},
+      {0, "X/B", "normal", 1, "X/B"},
+      {1, "A",   "normal", 1, "X"},
+      {1, "A/B", "normal", 1, "X/B"},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+  SVN_ERR(wc_move(&b, "A/B", "A/B2")); /* ### Moved-to gets recorded on A/B
+                                          at op-depth=0, that's not the node
+                                          that got moved. */
+  {
+    nodes_row_t nodes[] = {
+      {0, "",     "normal",       1, ""},
+      {0, "A",    "normal",       1, "A"},
+      {0, "A/B",  "normal",       1, "A/B"},
+      {0, "X",    "normal",       1, "X"},
+      {0, "X/B",  "normal",       1, "X/B"},
+      {1, "A",    "normal",       1, "X"},
+      {1, "A/B",  "normal",       1, "X/B"},
+      {2, "A/B",  "base-deleted", NO_COPY_FROM},
+      {2, "A/B2", "normal",       1, "X/B", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+copy_a_move(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "copy_a_move", opts, pool));
+
+  SVN_ERR(wc_mkdir(&b, "A"));
+  SVN_ERR(wc_mkdir(&b, "A/B"));
+  SVN_ERR(wc_mkdir(&b, "A/B/C"));
+  SVN_ERR(wc_commit(&b, ""));
+  SVN_ERR(wc_update(&b, "", 1));
+
+  {
+    nodes_row_t nodes[] = {
+      {0, "",      "normal", 1, ""},
+      {0, "A",     "normal", 1, "A"},
+      {0, "A/B",   "normal", 1, "A/B"},
+      {0, "A/B/C", "normal", 1, "A/B/C"},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+  SVN_ERR(wc_move(&b, "A/B/C", "A/C2"));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",      "normal",       1, ""},
+      {0, "A",     "normal",       1, "A"},
+      {0, "A/B",   "normal",       1, "A/B"},
+      {0, "A/B/C", "normal",       1, "A/B/C", FALSE, "A/C2"},
+      {2, "A/C2",  "normal",       1, "A/B/C", MOVED_HERE},
+      {3, "A/B/C", "base-deleted", NO_COPY_FROM},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+  /* Copying a move doesn't copy any moved-to/here artifacts, which
+     means that moving inside a copy is not the same as copying
+     something that contains a move?  Is this behaviour correct? */
+  SVN_ERR(wc_copy(&b, "A", "A2"));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",       "normal",       1, ""},
+      {0, "A",      "normal",       1, "A"},
+      {0, "A/B",    "normal",       1, "A/B"},
+      {0, "A/B/C",  "normal",       1, "A/B/C", FALSE, "A/C2"},
+      {2, "A/C2",   "normal",       1, "A/B/C", MOVED_HERE},
+      {3, "A/B/C",  "base-deleted", NO_COPY_FROM},
+      {1, "A2",     "normal",       1, "A"},
+      {1, "A2/B",   "normal",       1, "A/B"},
+      {1, "A2/B/C", "normal",       1, "A/B/C"},
+      {2, "A2/C2",  "normal",       1, "A/B/C"},
+      {3, "A2/B/C", "base-deleted", NO_COPY_FROM},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+move_to_swap(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "move_to_swap", opts, pool));
+
+  SVN_ERR(wc_mkdir(&b, "A"));
+  SVN_ERR(wc_mkdir(&b, "A/B"));
+  SVN_ERR(wc_mkdir(&b, "X"));
+  SVN_ERR(wc_mkdir(&b, "X/Y"));
+  SVN_ERR(wc_commit(&b, ""));
+  SVN_ERR(wc_update(&b, "", 1));
+
+  SVN_ERR(wc_move(&b, "A/B", "X/B"));
+  SVN_ERR(wc_move(&b, "X/Y", "A/Y"));
+
+  {
+    nodes_row_t nodes[] = {
+      {0, "",    "normal",       1, ""},
+      {0, "A",   "normal",       1, "A"},
+      {0, "A/B", "normal",       1, "A/B", FALSE, "X/B"},
+      {0, "X",   "normal",       1, "X"},
+      {0, "X/Y", "normal",       1, "X/Y", FALSE, "A/Y"},
+      {2, "A/B", "base-deleted", NO_COPY_FROM},
+      {2, "A/Y", "normal",       1, "X/Y", MOVED_HERE},
+      {2, "X/Y", "base-deleted", NO_COPY_FROM},
+      {2, "X/B", "normal",       1, "A/B", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  SVN_ERR(wc_move(&b, "A", "A2"));
+  SVN_ERR(wc_move(&b, "X", "A"));
+  SVN_ERR(wc_move(&b, "A2", "X"));
+
+  /* Is this correct or should A/Y and X/B at op-depth=1 be marked
+     moved-here? */
+  {
+    nodes_row_t nodes[] = {
+      {0, "",    "normal",       1, ""},
+      {0, "A",   "normal",       1, "A",   FALSE, "X"},
+      {0, "A/B", "normal",       1, "A/B", FALSE, "A/B"},
+      {0, "X",   "normal",       1, "X",   FALSE, "A"},
+      {0, "X/Y", "normal",       1, "X/Y", FALSE, "X/Y"},
+      {1, "A",   "normal",       1, "X",   MOVED_HERE},
+      {1, "A/Y", "normal",       1, "X/Y"},                /* moved-here? */
+      {1, "A/B", "base-deleted", NO_COPY_FROM},
+      {1, "X",   "normal",       1, "A",   MOVED_HERE},
+      {1, "X/B", "normal",       1, "A/B"},                /* moved-here? */
+      {1, "X/Y", "base-deleted", NO_COPY_FROM},
+      {2, "A/Y", "base-deleted", NO_COPY_FROM},
+      {2, "X/B", "base-deleted", NO_COPY_FROM},
+      {2, "A/B", "normal",       1, "A/B", MOVED_HERE},
+      {2, "X/Y", "normal",       1, "X/Y", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  /* Revert and try in different order */
+  SVN_ERR(wc_revert(&b, "", svn_depth_infinity));
+
+  SVN_ERR(wc_move(&b, "A", "A2"));
+  SVN_ERR(wc_move(&b, "X", "A"));
+  SVN_ERR(wc_move(&b, "A2", "X"));
+
+  {
+    nodes_row_t nodes[] = {
+      {0, "",    "normal",       1, ""},
+      {0, "A",   "normal",       1, "A",   FALSE, "X"},
+      {0, "A/B", "normal",       1, "A/B"},
+      {0, "X",   "normal",       1, "X",   FALSE, "A"},
+      {0, "X/Y", "normal",       1, "X/Y"},
+      {1, "A",   "normal",       1, "X",   MOVED_HERE},
+      {1, "A/Y", "normal",       1, "X/Y", MOVED_HERE},
+      {1, "A/B", "base-deleted", NO_COPY_FROM},
+      {1, "X",   "normal",       1, "A",   MOVED_HERE},
+      {1, "X/B", "normal",       1, "A/B", MOVED_HERE},
+      {1, "X/Y", "base-deleted", NO_COPY_FROM},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  SVN_ERR(wc_move(&b, "A/Y", "X/Y"));
+  SVN_ERR(wc_move(&b, "X/B", "A/B"));
+  
+  /* Currently XFAIL on because marked lines set moved-here.  Perhaps
+     this is correct and it should XFAIL on the earlier order?  */
+  {
+    nodes_row_t nodes[] = {
+      {0, "",    "normal",       1, ""},
+      {0, "A",   "normal",       1, "A",   FALSE, "X"},
+      {0, "A/B", "normal",       1, "A/B", FALSE, "A/B"},
+      {0, "X",   "normal",       1, "X",   FALSE, "A"},
+      {0, "X/Y", "normal",       1, "X/Y", FALSE, "X/Y"},
+      {1, "A",   "normal",       1, "X",   MOVED_HERE},
+      {1, "A/Y", "normal",       1, "X/Y"},                /* XFAIL */
+      {1, "A/B", "base-deleted", NO_COPY_FROM},
+      {1, "X",   "normal",       1, "A",   MOVED_HERE},
+      {1, "X/B", "normal",       1, "A/B"},                /* XFAIL */
+      {1, "X/Y", "base-deleted", NO_COPY_FROM},
+      {2, "A/Y", "base-deleted", NO_COPY_FROM},
+      {2, "X/B", "base-deleted", NO_COPY_FROM},
+      {2, "A/B", "normal",       1, "A/B", MOVED_HERE},
+      {2, "X/Y", "normal",       1, "X/Y", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+revert_nested_move(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+  nodes_row_t nodes_A_moved[] = {
+    {0, "",       "normal",       1, ""},
+    {0, "A",      "normal",       1, "A",     FALSE, "A2"},
+    {0, "A/B",    "normal",       1, "A/B"},
+    {0, "A/B/C",  "normal",       1, "A/B/C"},
+    {1, "A",      "base-deleted", NO_COPY_FROM},
+    {1, "A/B",    "base-deleted", NO_COPY_FROM},
+    {1, "A/B/C",  "base-deleted", NO_COPY_FROM},
+    {1, "A2",     "normal",       1, "A",     MOVED_HERE},
+    {1, "A2/B",   "normal",       1, "A/B",   MOVED_HERE},
+    {1, "A2/B/C", "normal",       1, "A/B/C", MOVED_HERE},
+    {0}
+  };
+  nodes_row_t nodes_AB_moved[] = {
+    {0, "",        "normal",       1, ""},
+    {0, "A",       "normal",       1, "A",     FALSE, "A2"},
+    {0, "A/B",     "normal",       1, "A/B",   FALSE, "A2/B2"},
+    {0, "A/B/C",   "normal",       1, "A/B/C"},
+    {1, "A",       "base-deleted", NO_COPY_FROM},
+    {1, "A/B",     "base-deleted", NO_COPY_FROM},
+    {1, "A/B/C",   "base-deleted", NO_COPY_FROM},
+    {1, "A2",      "normal",       1, "A",     MOVED_HERE},
+    {1, "A2/B",    "normal",       1, "A/B",   MOVED_HERE},
+    {1, "A2/B/C",  "normal",       1, "A/B/C", MOVED_HERE},
+    {2, "A2/B",    "base-deleted", NO_COPY_FROM},
+    {2, "A2/B/C",  "base-deleted", NO_COPY_FROM},
+    {2, "A2/B2",   "normal",       1, "A/B",   MOVED_HERE},
+    {2, "A2/B2/C", "normal",       1, "A/B/C", MOVED_HERE},
+    {0}
+  };
+  nodes_row_t nodes_ABC_moved[] = {
+    {0, "",         "normal",       1, ""},
+    {0, "A",        "normal",       1, "A",     FALSE, "A2"},
+    {0, "A/B",      "normal",       1, "A/B",   FALSE, "A2/B2"},
+    {0, "A/B/C",    "normal",       1, "A/B/C", FALSE, "A2/B2/C2"},
+    {1, "A",        "base-deleted", NO_COPY_FROM},
+    {1, "A/B",      "base-deleted", NO_COPY_FROM},
+    {1, "A/B/C",    "base-deleted", NO_COPY_FROM},
+    {1, "A2",       "normal",       1, "A",     MOVED_HERE},
+    {1, "A2/B",     "normal",       1, "A/B",   MOVED_HERE},
+    {1, "A2/B/C",   "normal",       1, "A/B/C", MOVED_HERE},
+    {2, "A2/B",     "base-deleted", NO_COPY_FROM},
+    {2, "A2/B/C",   "base-deleted", NO_COPY_FROM},
+    {2, "A2/B2",    "normal",       1, "A/B",   MOVED_HERE},
+    {2, "A2/B2/C",  "normal",       1, "A/B/C", MOVED_HERE},
+    {3, "A2/B2/C",  "base-deleted", NO_COPY_FROM},
+    {3, "A2/B2/C2", "normal",       1, "A/B/C", MOVED_HERE},
+    {0}
+  };
+
+  SVN_ERR(svn_test__sandbox_create(&b, "revert_nested_move", opts, pool));
+
+  SVN_ERR(wc_mkdir(&b, "A"));
+  SVN_ERR(wc_mkdir(&b, "A/B"));
+  SVN_ERR(wc_mkdir(&b, "A/B/C"));
+  SVN_ERR(wc_commit(&b, ""));
+  SVN_ERR(wc_update(&b, "", 1));
+
+  SVN_ERR(wc_move(&b, "A", "A2"));
+  SVN_ERR(check_db_rows(&b, "", nodes_A_moved));
+
+  SVN_ERR(wc_move(&b, "A2/B", "A2/B2"));
+  SVN_ERR(check_db_rows(&b, "", nodes_AB_moved));
+
+  SVN_ERR(wc_move(&b, "A2/B2/C", "A2/B2/C2"));
+  SVN_ERR(check_db_rows(&b, "", nodes_ABC_moved));
+
+  SVN_ERR(wc_revert(&b, "A2/B", svn_depth_infinity));
+  SVN_ERR(wc_revert(&b, "A2/B2", svn_depth_infinity));
+  SVN_ERR(check_db_rows(&b, "", nodes_A_moved));
+
+  SVN_ERR(wc_move(&b, "A2/B", "A2/B2"));
+  SVN_ERR(wc_move(&b, "A2/B2/C", "A2/B2/C2"));
+  SVN_ERR(check_db_rows(&b, "", nodes_ABC_moved));
+
+  SVN_ERR(wc_revert(&b, "A2/B2/C", svn_depth_infinity));
+  SVN_ERR(wc_revert(&b, "A2/B2/C2", svn_depth_infinity));
+  SVN_ERR(check_db_rows(&b, "", nodes_AB_moved));
+
+  SVN_ERR(wc_revert(&b, "A2/B", svn_depth_infinity));
+  SVN_ERR(wc_revert(&b, "A2/B2", svn_depth_infinity));
+  SVN_ERR(check_db_rows(&b, "", nodes_A_moved));
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+move_on_move(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "move_on_move", opts, pool));
+
+  SVN_ERR(wc_mkdir(&b, "A"));
+  SVN_ERR(wc_mkdir(&b, "A/B"));
+  SVN_ERR(wc_mkdir(&b, "X"));
+  SVN_ERR(wc_mkdir(&b, "X/B"));
+  SVN_ERR(wc_commit(&b, ""));
+  SVN_ERR(wc_update(&b, "", 1));
+
+  SVN_ERR(wc_move(&b, "A/B", "A/B2"));
+  SVN_ERR(wc_move(&b, "A", "A2"));
+  SVN_ERR(wc_copy(&b, "X", "A"));
+
+  {
+    /* Perhaps this should XFAIL on 1,A2/B,"normal" not being MOVED_HERE? */
+    nodes_row_t nodes[] = {
+      {0, "",         "normal",       1, ""},
+      {0, "A",        "normal",       1, "A",     FALSE, "A2"},
+      {0, "A/B",      "normal",       1, "A/B",   FALSE, "A2/B2"},
+      {0, "X",        "normal",       1, "X"},
+      {0, "X/B",      "normal",       1, "X/B"},
+      {1, "A",        "normal",       1, "X"},
+      {1, "A/B",      "normal",       1, "X/B"},
+      {1, "A2",       "normal",       1, "A",     MOVED_HERE},
+      {1, "A2/B",     "normal",       1, "A/B"},
+      {2, "A2/B",     "base-deleted", NO_COPY_FROM},
+      {2, "A2/B2",    "normal",       1, "A/B",   MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  /* A/B to A2/B2 is already recorded in A/B but the copy has given us
+     another A/B that we can move.  A second move overwites the first
+     move stored in A/B even though it's a different node being moved,
+     and that breaks the recording of the move to A2/B2. */
+  SVN_ERR(wc_move(&b, "A/B", "A/B3"));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",         "normal",       1, ""},
+      {0, "A",        "normal",       1, "A",     FALSE, "A2"},
+      {0, "A/B",      "normal",       1, "A/B",   FALSE, "A2/B2"}, /* XFAIL */
+      {0, "X",        "normal",       1, "X"},
+      {0, "X/B",      "normal",       1, "X/B"},
+      {1, "A",        "normal",       1, "X"},
+      {1, "A/B",      "normal",       1, "X/B"},
+      {1, "A2",       "normal",       1, "A",     MOVED_HERE},
+      {1, "A2/B",     "normal",       1, "A/B"},
+      {2, "A2/B",     "base-deleted", NO_COPY_FROM},
+      {2, "A2/B2",    "normal",       1, "A/B",   MOVED_HERE},
+      {2, "A/B",      "base-deleted", NO_COPY_FROM},
+      {2, "A/B3",     "normal",       1, "X/B",   MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  return SVN_NO_ERROR;
+}
+
+
+
 /* ---------------------------------------------------------------------- */
 /* The list of test functions */
 
@@ -3766,7 +4388,7 @@ struct svn_test_descriptor_t test_funcs[
                        "test_op_delete"),
     SVN_TEST_OPTS_PASS(test_child_replace_with_same_origin,
                        "test_child_replace_with_same"),
-    SVN_TEST_OPTS_PASS(test_shadowed_update,
+    SVN_TEST_OPTS_XFAIL(test_shadowed_update,
                        "test_shadowed_update"),
     SVN_TEST_OPTS_PASS(test_copy_of_deleted,
                        "test_copy_of_deleted (issue #3873)"),
@@ -3788,5 +4410,21 @@ struct svn_test_descriptor_t test_funcs[
                        "test_wc_wc_copy_absent"),
     SVN_TEST_OPTS_PASS(incomplete_switch,
                        "incomplete_switch (issue 4040)"),
+    SVN_TEST_OPTS_PASS(nested_moves_child_first,
+                       "nested_moves_child_first"),
+    SVN_TEST_OPTS_XFAIL(nested_moves_child_last,
+                       "nested_moves_child_last"),
+    SVN_TEST_OPTS_XFAIL(move_in_copy,
+                       "move_in_copy"),
+    SVN_TEST_OPTS_XFAIL(move_in_replace,
+                       "move_in_replace"),
+    SVN_TEST_OPTS_PASS(copy_a_move,
+                       "copy_a_move"),
+    SVN_TEST_OPTS_XFAIL(move_to_swap,
+                       "move_to_swap"),
+    SVN_TEST_OPTS_PASS(revert_nested_move,
+                       "revert_nested_move"),
+    SVN_TEST_OPTS_XFAIL(move_on_move,
+                       "move_on_move"),
     SVN_TEST_NULL
   };

Modified: subversion/branches/showing-merge-info/tools/dev/unix-build/Makefile.svn
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/tools/dev/unix-build/Makefile.svn?rev=1211703&r1=1211702&r2=1211703&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/tools/dev/unix-build/Makefile.svn (original)
+++ subversion/branches/showing-merge-info/tools/dev/unix-build/Makefile.svn Wed Dec  7 23:23:02 2011
@@ -1352,7 +1352,8 @@ endif
 
 .PHONY: libpath
 libpath:
-	@echo export LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):$$LD_LIBRARY_PATH
+	@echo export LD_LIBRARY_PATH="$(LD_LIBRARY_PATH):$$LD_LIBRARY_PATH" \
+		"PYTHONPATH=$(SVN_PREFIX)/lib/svn-python"
 
 .PHONY: start-svnserve stop-svnserve start-httpd stop-httpd
 

Modified: subversion/branches/showing-merge-info/tools/dist/dist.sh
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/tools/dist/dist.sh?rev=1211703&r1=1211702&r2=1211703&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/tools/dist/dist.sh (original)
+++ subversion/branches/showing-merge-info/tools/dist/dist.sh Wed Dec  7 23:23:02 2011
@@ -268,12 +268,12 @@ vsn_file="$DISTPATH/subversion/include/s
 
 if [ "$VERSION" != "trunk" ]; then
   sed \
-   -e "/#define *SVN_VER_MAJOR/s/[0-9]\\+/$ver_major/" \
-   -e "/#define *SVN_VER_MINOR/s/[0-9]\\+/$ver_minor/" \
-   -e "/#define *SVN_VER_PATCH/s/[0-9]\\+/$ver_patch/" \
+   -e "/#define *SVN_VER_MAJOR/s/[0-9][0-9]*/$ver_major/" \
+   -e "/#define *SVN_VER_MINOR/s/[0-9][0-9]*/$ver_minor/" \
+   -e "/#define *SVN_VER_PATCH/s/[0-9][0-9]*/$ver_patch/" \
    -e "/#define *SVN_VER_TAG/s/\".*\"/\" ($VER_TAG)\"/" \
    -e "/#define *SVN_VER_NUMTAG/s/\".*\"/\"$VER_NUMTAG\"/" \
-   -e "/#define *SVN_VER_REVISION/s/[0-9]\\+/$REVISION/" \
+   -e "/#define *SVN_VER_REVISION/s/[0-9][0-9]*/$REVISION/" \
     < "$vsn_file" > "$vsn_file.tmp"
 else
   # Don't munge the version number if we are creating a nightly trunk tarball

Propchange: subversion/branches/showing-merge-info/tools/server-side/mod_dontdothat/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Dec  7 23:23:02 2011
@@ -0,0 +1,2 @@
+*.slo
+.libs