subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1706284 - in /subversion/branches/move-tracking-2/subversion: svnmover/svnmover.c tests/cmdline/svnmover_tests.py
Date Thu, 01 Oct 2015 16:21:43 GMT
Author: julianfoad
Date: Thu Oct  1 16:21:43 2015
New Revision: 1706284

URL: http://svn.apache.org/viewvc?rev=1706284&view=rev
Log:
On the 'move-tracking-2' branch: Show more detail in diff headers.

* subversion/svnmover/svnmover.c
  (subtree_diff_r,
   branch_diff_r): Include revision and element numbers in diff headers.

* subversion/tests/cmdline/svnmover_tests.py
  (reported_branch_del_line,
   reported_branch_add_line,
   reported_br_diff): Adjust the expected diff headers.

Modified:
    subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c
    subversion/branches/move-tracking-2/subversion/tests/cmdline/svnmover_tests.py

Modified: subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c?rev=1706284&r1=1706283&r2=1706284&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c (original)
+++ subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c Thu Oct  1 16:21:43
2015
@@ -1918,9 +1918,11 @@ svn_branch_diff_func_t(svn_editor3_t *ed
 static svn_error_t *
 subtree_diff_r(svn_editor3_t *editor,
                svn_branch_subtree_t *left,
+               svn_revnum_t left_rev,
                const char *left_bid,
                const char *left_rrpath,
                svn_branch_subtree_t *right,
+               svn_revnum_t right_rev,
                const char *right_bid,
                const char *right_rrpath,
                svn_branch_diff_func_t diff_func,
@@ -1928,10 +1930,12 @@ subtree_diff_r(svn_editor3_t *editor,
                apr_pool_t *scratch_pool)
 {
   const char *left_str
-    = left ? apr_psprintf(scratch_pool, "%s at /%s", left_bid, left_rrpath)
+    = left ? apr_psprintf(scratch_pool, "r%ld:%s:e%d at /%s",
+                          left_rev, left_bid, left->root_eid, left_rrpath)
            : NULL;
   const char *right_str
-    = right ? apr_psprintf(scratch_pool, "%s at /%s", right_bid, right_rrpath)
+    = right ? apr_psprintf(scratch_pool, "r%ld:%s:e%d at /%s",
+                           right_rev, right_bid, right->root_eid, right_rrpath)
             : NULL;
   const char *header;
   apr_hash_t *subbranches_l, *subbranches_r, *subbranches_all;
@@ -2018,8 +2022,8 @@ subtree_diff_r(svn_editor3_t *editor,
             }
         }
       SVN_ERR(subtree_diff_r(editor,
-                             sub_left, sub_left_bid, sub_left_rrpath,
-                             sub_right, sub_right_bid, sub_right_rrpath,
+                             sub_left, left_rev, sub_left_bid, sub_left_rrpath,
+                             sub_right, right_rev, sub_right_bid, sub_right_rrpath,
                              diff_func, prefix, scratch_pool));
     }
   return SVN_NO_ERROR;
@@ -2043,13 +2047,15 @@ branch_diff_r(svn_editor3_t *editor,
     = svn_branch_get_subtree(right->branch, right->eid, scratch_pool);
 
   SVN_ERR(subtree_diff_r(editor,
-                        s_left,
-                        svn_branch_get_id(left->branch, scratch_pool),
-                        svn_branch_get_root_rrpath(left->branch, scratch_pool),
-                        s_right,
-                        svn_branch_get_id(right->branch, scratch_pool),
-                        svn_branch_get_root_rrpath(right->branch, scratch_pool),
-                        diff_func, prefix, scratch_pool));
+                         s_left,
+                         left->rev,
+                         svn_branch_get_id(left->branch, scratch_pool),
+                         svn_branch_get_root_rrpath(left->branch, scratch_pool),
+                         s_right,
+                         right->rev,
+                         svn_branch_get_id(right->branch, scratch_pool),
+                         svn_branch_get_root_rrpath(right->branch, scratch_pool),
+                         diff_func, prefix, scratch_pool));
   return SVN_NO_ERROR;
 }
 

Modified: subversion/branches/move-tracking-2/subversion/tests/cmdline/svnmover_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/cmdline/svnmover_tests.py?rev=1706284&r1=1706283&r2=1706284&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/tests/cmdline/svnmover_tests.py (original)
+++ subversion/branches/move-tracking-2/subversion/tests/cmdline/svnmover_tests.py Thu Oct
 1 16:21:43 2015
@@ -538,10 +538,10 @@ def reported_element_add_line(rpath, bra
   return 'A   ' + re.escape(rpath) + branch_text
 
 def reported_branch_del_line(subbranch_fullpath):
-  return r'--- deleted branch B[0-9.]+ at /%s' % (re.escape(subbranch_fullpath),)
+  return r'--- deleted branch [reB:0-9.]+ at /%s' % (re.escape(subbranch_fullpath),)
 
 def reported_branch_add_line(subbranch_fullpath):
-  return r'--- added branch B[0-9.]+ at /%s' % (re.escape(subbranch_fullpath),)
+  return r'--- added branch [rBe:0-9.]+ at /%s' % (re.escape(subbranch_fullpath),)
 
 def reported_br_params(path1, path2):
   """Return (SUBBRANCH_RPATH, SUBBRANCH_FULLPATH).
@@ -567,8 +567,8 @@ def reported_br_diff(path1, path2=None):
      paths are expected to be *different* on each side.
   """
   if path2 is None:
-    return [r'--- diff branch B[0-9.]+ at /%s' % (re.escape(path1),)]
-  return [r'--- diff branch B[0-9.]+ at /%s : B[0-9.]+ at /%s' % (
+    return [r'--- diff branch [rBe:0-9.]+ at /%s' % (re.escape(path1),)]
+  return [r'--- diff branch [rBe:0-9.]+ at /%s : [rBe:0-9.]+ at /%s' % (
            re.escape(path1), re.escape(path2))]
 
 def reported_del(one_path=None, paths=[], branches=[]):



Mime
View raw message