On Sat, 08 Jul 2006, Kamesh Jayachandran wrote:
...
> Assuming we have already merged 155-156 of /branches/b1 to wc.
> 'svn merge -r156:154 file:///path/to/repos/branches/b1' should remove
> 155-156
> from the svn:mergeinfo property for '/branches/b1' after merging.
> Without this
> fix it does not.
> The cause is rangelist api's are capable of handling forward paths not the
> reverse paths.
>
> * subversion/include/svn_mergeinfo.h
> Made svn_range_swap_endpoints public, this function was originally a
> static function in subversion/libsvn_subr/mergeinfo.c
>
> * subversion/libsvn_subr/mergeinfo.c
> (svn_range_swap_endpoints): Renamed function 'range_swap_endpoints'
> 'svn_range_swap_endpoints' as we want this function to be public.
> (svn_rangelist_reverse): Calls 'svn_range_swap_endpoints.
>
> * subversion/libsvn_client/diff.c
> (update_wc_merge_info):
> Reverse the merge ranges(a.k.a eraser) before passing to
> svn_rangelist_remove().
...
Kamesh, thanks for detecting this problem. As we discussed on IRC, I
think we actually need to reverse the order of the svn_merge_range_t's
in the RANGES parameter -- in addition to the end points of each
element -- for svn_rangelist_remove() to work correctly (as it expects
sorted input).
svn_rangelist_reverse() ought to do the trick here -- give the
attached patch a try.
- Dan
- text/plain attachment: patch
- application/pgp-signature attachment: stored
Received on Sat Jul 8 08:22:07 2006