[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

svn info --recursive isn't reporting tree-conflict-only nodes

From: Julian Foad <julian.foad_at_wandisco.com>
Date: Tue, 03 May 2011 14:31:47 +0100

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
Received on 2011-05-03 15:32:21 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.