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

Re: [PATCH] Diff no longer accepts rev in which target didn't exist

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2005-11-02 13:58:13 CET

Julian Foad wrote:
>
> * Here's a patch, for review, to fix up a test that relied on this
> behaviour. (There's no harm in applying this patch even if we decide
> that the new behaviour is a bug and subsequently fix it.)

Er, here's the patch.

- Julian

Update an XFail test which was failing for the wrong reason. It was failing
because, since the "diff" command was updated to work with peg revisions, it
doesn't allow diffing against a revision in which the target did not exist.

* subversion/tests/clients/cmdline/diff_tests.py
  (verify_expected_output): If it fails, print a clue to the reason.
  (diff_prop_change_local_edit): Change some diffs against r0 to diffs against
    r1, and remove others (that were not needed).

Index: subversion/tests/clients/cmdline/diff_tests.py
===================================================================
--- subversion/tests/clients/cmdline/diff_tests.py (revision 17143)
+++ subversion/tests/clients/cmdline/diff_tests.py (working copy)
@@ -102,6 +102,7 @@ def verify_expected_output(diff_output,
     if line.find(expected) != -1:
       break
   else:
+ print 'Not found:', expected
     raise svntest.Failure
 
 def verify_excluded_output(diff_output, excluded):
@@ -1386,37 +1387,22 @@ def diff_prop_change_local_edit(sbox):
   # Make local edits to iota.
   svntest.main.file_append(iota_path, "\nMore text.\n")
 
- # diff r0:PREV should show neither the property change nor the local edit.
+ # diff r1:COMMITTED should show the property change but not the local edit.
   out, err = svntest.actions.run_and_verify_svn(None, None, [],
- 'diff', '-r0:PREV', iota_path)
- for line in out:
- if line.find("+More text.") != -1:
- raise svntest.Failure
- if line.find(" + pvalue") != -1:
- raise svntest.Failure
-
- # diff r0:COMMITTED should show the property change but not the local edit.
- out, err = svntest.actions.run_and_verify_svn(None, None, [],
- 'diff', '-r0:COMMITTED', iota_path)
+ 'diff', '-r1:COMMITTED', iota_path)
   for line in out:
     if line.find("+More text.") != -1:
       raise svntest.Failure
   verify_expected_output(out, " + pvalue")
 
- # diff r0:BASE should show the property change but not the local edit.
+ # diff r1:BASE should show the property change but not the local edit.
   out, err = svntest.actions.run_and_verify_svn(None, None, [],
- 'diff', '-r0:BASE', iota_path)
+ 'diff', '-r1:BASE', iota_path)
   for line in out:
     if line.find("+More text.") != -1:
       raise svntest.Failure # fails at r7481
   verify_expected_output(out, " + pvalue") # fails at r7481
 
- # diff r0:WC should show the property change as well as the local edit.
- out, err = svntest.actions.run_and_verify_svn(None, None, [],
- 'diff', '-r0', iota_path)
- verify_expected_output(out, "+More text.")
- verify_expected_output(out, " + pvalue") # fails at r7481
-
   # diff r1:WC should show the local edit as well as the property change.
   out, err = svntest.actions.run_and_verify_svn(None, None, [],
                                                 'diff', '-r1', iota_path)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Nov 2 14:00:48 2005

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.