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

[PATCH] Fix for issue 3931.

From: Noorul Islam K M <noorul_at_collab.net>
Date: Thu, 23 Jun 2011 16:02:23 +0530

Log

[[[

Fix for issue 3931. 'svn log' is returning log of unrelated path when
peg revision is not related to operative revision. This is happening
when HEAD is used in operative range. This commit fixes this.

* subversion/libsvn_client/log.c
  (svn_client_log5): Handle HEAD in operative revision range.

* subversion/tests/cmdline/log_tests.py
  (log_with_unrelated_peg_and_operative_revs): Remove XFail marker.
    Fix expected error message.

Patch by: Noorul Islam K M <noorul{_AT_}collab.net>
]]]

Index: subversion/tests/cmdline/log_tests.py
===================================================================
--- subversion/tests/cmdline/log_tests.py (revision 1138793)
+++ subversion/tests/cmdline/log_tests.py (working copy)
@@ -1975,7 +1975,6 @@
 
 #----------------------------------------------------------------------
 @Issue(3931)
-_at_XFail()
 def log_with_unrelated_peg_and_operative_revs(sbox):
   "log with unrelated peg and operative rev targets"
 
@@ -2000,7 +1999,7 @@
   # 'Unable to find repository location for ^/A/D/G/rho in revision 9'
   # error, the log for ^/A/D/G/rho_at_8 is returned, but that is an unrelated
   # line of history.
- expected_error = ".*File not found.*"
+ expected_error = ".*Unable to find repository location for.*"
   svntest.actions.run_and_verify_svn(None, None, expected_error,
                                      'log', '-r', '2:HEAD', target)
   svntest.actions.run_and_verify_svn(None, None, expected_error,
Index: subversion/libsvn_client/log.c
===================================================================
--- subversion/libsvn_client/log.c (revision 1138793)
+++ subversion/libsvn_client/log.c (working copy)
@@ -367,6 +367,11 @@
                   (range->start.value.number > range->end.value.number ?
                    range->start : range->end);
             }
+ else if (range->start.kind == svn_opt_revision_head ||
+ range->end.kind == svn_opt_revision_head)
+ {
+ session_opt_rev.kind = svn_opt_revision_head;
+ }
           else if (range->start.kind == svn_opt_revision_date &&
                    range->end.kind == svn_opt_revision_date)
             {
Received on 2011-06-23 12:34:36 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.