I found a bug in "svn info -R": it doesn't report a node that has a tree
conflict but otherwise is nonexistent, except if this node is the root
node of the requested target path.

The test for "info -R" in info_tests.py was not correctly checking the
output, and has been passing despite this bug.  The following patch
fixes the test (subject to a dependency on output ordering, which I
haven't yet coded around) and thus makes it fail:

[[[
Index: subversion/tests/cmdline/info_tests.py
===================================================================
--- subversion/tests/cmdline/info_tests.py      (revision 1099049)
+++ subversion/tests/cmdline/info_tests.py      (working copy)
@@ -188,28 +188,20 @@ def info_with_tree_conflicts(sbox):
                                             'operation': 'update',
                                             'action'   : action,
                                             'reason'   : reason,
                                             },
                           )])
 
-  # Check recursive info.  Just ensure that all victims are listed.
-  exit_code, output, error = svntest.actions.run_and_verify_svn(None,
None,
-                                                                [],
'info',
-                                                                G,
'-R')
+  # Check recursive info.
+    # ### This is currently dependent on ordering of the dict entries.
+  expected_infos = [{ 'Path' : r'.*[/\\]G' }]
   for fname, action, reason in scenarios:
-    found = False
-    expected = ".*incoming %s.*" % (action)
-    for item in output:
-      if re.search(expected, item):
-        found = True
-        break
-    if not found:
-      raise svntest.verify.SVNUnexpectedStdout(
-        "Tree conflict missing in svn info -R output:\n"
-        "  Expected: '%s'\n"
-        "  Found: '%s'" % (expected, output))
+    expected_str = ".*local %s, incoming %s.*" % (reason, action)
+    expected_infos.append({ 'Name' : fname,
+                            'Tree conflict' : expected_str })
+  svntest.actions.run_and_verify_info(expected_infos, G, '-R')
 
 def info_on_added_file(sbox):
   """info on added file"""
 
   svntest.actions.make_repo_and_wc(sbox)
   wc_dir = sbox.wc_dir
]]]

I'll look into fixing the bug now.

- Julian


Reply via email to