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

[PATCH] merge-tracking first merge being revert does not record 'svn:mergeinfo'

From: Kamesh Jayachandran <kamesh_at_collab.net>
Date: 2006-07-09 19:54:51 CEST

Hi All,
Find the attached patch.

With regards
Kamesh Jayachandran

[[[
Patch by: Kamesh Jayachandran <kamesh@collab.net>
If the first merge is revert, 'svn:mergeinfo' is not getting recorded.

* subversion/libsvn_client/diff.c
  (update_wc_merge_info):
   If there is no 'svn:mergeinfo' recorded already and the merge is a revert
   make use of the passed in 'ranges' for 'svn:mergeinfo' calculation.
]]]

Index: subversion/libsvn_client/diff.c
===================================================================
--- subversion/libsvn_client/diff.c (revision 20485)
+++ subversion/libsvn_client/diff.c (working copy)
@@ -1751,9 +1751,14 @@
 
   if (is_revert)
     {
- ranges = svn_rangelist_dup(ranges, pool);
- SVN_ERR(svn_rangelist_reverse(ranges, pool));
- SVN_ERR(svn_rangelist_remove(&rangelist, ranges, rangelist, pool));
+ if (rangelist->nelts == 0)
+ rangelist = ranges;
+ else
+ {
+ ranges = svn_rangelist_dup(ranges, pool);
+ SVN_ERR(svn_rangelist_reverse(ranges, pool));
+ SVN_ERR(svn_rangelist_remove(&rangelist, ranges, rangelist, pool));
+ }
     }
   else
     SVN_ERR(svn_rangelist_merge(&rangelist, rangelist, ranges, pool));

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Jul 9 19:53:46 2006

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.