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

Bug: property diff on a directory named explicitly

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2004-10-15 14:59:08 CEST

Diff of a property change or addition should contain a "+" line.
Diff of a property change or deletion should contain a "-" line.
On a diff between repository revisions (not WC) of a dir named
explicitly, the "-" line is missing. (For a file, and for a dir
recursed into, the result is correct.)

Here is an example of the effect:

~/tmp/sandbox> svn diff -r104:105

Property changes on: dir
___________________________________________________________________
Name: prop
    - oldval
    + newval

~/tmp/sandbox> svn diff -r104:105 dir

Property changes on: dir
___________________________________________________________________
Name: prop
    + newval

The only relevant issue that I can find is #1493: "Property Diffs Should
Use libsvn_diff".

I have attached a test for this which I propose to check in first as XFAIL.

Then we can see about fixing it.

- Julian

New XFail test for property diff on a directory named explicitly.

* subversion/tests/clients/cmdline/diff_tests.py
  (diff_prop_on_named_dir): New test.
  (test_list): Add the new test, as XFail.

Index: subversion/tests/clients/cmdline/diff_tests.py
===================================================================
--- subversion/tests/clients/cmdline/diff_tests.py (revision 11414)
+++ subversion/tests/clients/cmdline/diff_tests.py (working copy)
@@ -1571,6 +1571,40 @@
 
   os.chdir(was_cwd)
 
+#----------------------------------------------------------------------
+def diff_prop_on_named_dir(sbox):
+ "diff a prop change on a dir named explicitly"
+
+ # Diff of a property change or addition should contain a "+" line.
+ # Diff of a property change or deletion should contain a "-" line.
+ # On a diff between repository revisions (not WC) of a dir named
+ # explicitly, the "-" line was missing. (For a file, and for a dir
+ # recursed into, the result was correct.)
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+
+ current_dir = os.getcwd()
+ os.chdir(sbox.wc_dir)
+ try:
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'propset', 'p', 'v', 'A')
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'ci', '-m', '')
+
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'propdel', 'p', 'A')
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'ci', '-m', '')
+
+ diff_output, err_output = svntest.main.run_svn(None,
+ 'diff', '-r2:3', 'A')
+ # Check that the result contains a "-" line.
+ verify_expected_output(diff_output, " - v")
+
+ finally:
+ os.chdir(current_dir)
+
 ########################################################################
 #Run the tests
 
@@ -1600,6 +1634,7 @@
               check_for_omitted_prefix_in_path_component,
               diff_renamed_file,
               diff_within_renamed_dir,
+ XFail(diff_prop_on_named_dir),
               ]
 
 if __name__ == '__main__':

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Oct 15 15:01:57 2004

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.