You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Paul Burba <pt...@gmail.com> on 2008/01/24 22:30:12 UTC

[PATCH] Avoid self-referrential mergeinfo (Was: Does a path ever need mergeinfo from itself?)

> -----Original Message-----
> From: C. Michael Pilato [mailto:cmpilato@collab.net]
> Sent: Monday, January 14, 2008 3:10 PM
> To: Paul Burba
> Cc: dev@subversion.tigris.org
> Subject: Re: Does a path ever need mergeinfo from itself?
>
> Paul Burba wrote:
> > Ignoring the use of --reintegrate for a moment, is there
> any reason
> > we ever need the '/A:2-3' mergeinfo on 'A' itself?  Am I missing
> > something obvious here?
>
> I can't immediately think of a reason why a path would need
> to have mergeinfo from its own history.
>
> But be careful: matching paths do not overlapping histories
> make.  You'll need to consider the locations of your path in
> the merged revisions to decide if that portion of the
> mergeinfo is expendable.
>
> C. Michael Pilato <cm...@collab.net>
> CollabNet   <>   www.collab.net   <>   Distributed
> Development On Demand

Attached is a patch that prevents a merge from adding mergeinfo to a
path from that path's own history (i.e. a cyclic merge won't result in
redundant mergeinfo).  As discussed in the earlier thread
(http://svn.haxx.se/dev/archive-2008-01/0265.shtml) adding mergeinfo
from a path's own history doesn't seem useful in any way, results in
extraneous mergeinfo (would anyone argue against keeping mergeinfo as
concise as possible?), and can even make what should be a no-op merge
into an operative merge (if the only change was the addition of the
mergeinfo).

A few questions remain:

1) Does anyone have any objections to adding this functionality?  I
know Tom Widmer had some, see
http://svn.haxx.se/dev/archive-2008-01/0286.shtml, but I never heard
back from him.

2) On Win32 when running the new merge_test.py 85 over ra_svn I get an
odd error in filter_self_referential_mergeinfo() when attempting to
reparent the merge baton's ra_session1:

  ..\..\..\subversion\libsvn_ra_svn\marshal.c:875: (apr_err=210004)
  svn: Unknown status 'reparent' in command response

If anyone has time to apply this patch and run merge_test.py 85 over
ra_svn please do, and let me know if you get the same problem.

Paul

[[[
Prevent cyclic merges from adding self-referential mergeinfo.

* subversion/libsvn_client/merge.c
  (mergeinfo_behavior): Move ahead of first call.
  (filter_self_referential_mergeinfo): New.
  (merge_props_changed): Call filter_self_referential_mergeinfo() before
  merging incoming prop changes with original props.

* subversion/tests/cmdline/merge_tests.py
  (self_referrential_mergeinfo): New.
  (test_list): Add self_referrential_mergeinfo.
]]]

Re: [PATCH] Avoid self-referrential mergeinfo (Was: Does a path ever need mergeinfo from itself?)

Posted by Paul Burba <pt...@gmail.com>.
On Jan 24, 2008 5:30 PM, Paul Burba <pt...@gmail.com> wrote:
> > -----Original Message-----
> > From: C. Michael Pilato [mailto:cmpilato@collab.net]
> > Sent: Monday, January 14, 2008 3:10 PM
> > To: Paul Burba
> > Cc: dev@subversion.tigris.org
> > Subject: Re: Does a path ever need mergeinfo from itself?
> >
> > Paul Burba wrote:
> > > Ignoring the use of --reintegrate for a moment, is there
> > any reason
> > > we ever need the '/A:2-3' mergeinfo on 'A' itself?  Am I missing
> > > something obvious here?
> >
> > I can't immediately think of a reason why a path would need
> > to have mergeinfo from its own history.
> >
> > But be careful: matching paths do not overlapping histories
> > make.  You'll need to consider the locations of your path in
> > the merged revisions to decide if that portion of the
> > mergeinfo is expendable.
> >
> > C. Michael Pilato <cm...@collab.net>
> > CollabNet   <>   www.collab.net   <>   Distributed
> > Development On Demand
>
> Attached is a patch that prevents a merge from adding mergeinfo to a
> path from that path's own history (i.e. a cyclic merge won't result in
> redundant mergeinfo).  As discussed in the earlier thread
> (http://svn.haxx.se/dev/archive-2008-01/0265.shtml) adding mergeinfo
> from a path's own history doesn't seem useful in any way, results in
> extraneous mergeinfo (would anyone argue against keeping mergeinfo as
> concise as possible?), and can even make what should be a no-op merge
> into an operative merge (if the only change was the addition of the
> mergeinfo).
>
> A few questions remain:
>
> 1) Does anyone have any objections to adding this functionality?  I
> know Tom Widmer had some, see
> http://svn.haxx.se/dev/archive-2008-01/0286.shtml, but I never heard
> back from him.
>
> 2) On Win32 when running the new merge_test.py 85 over ra_svn I get an
> odd error in filter_self_referential_mergeinfo() when attempting to
> reparent the merge baton's ra_session1:
>
>   ..\..\..\subversion\libsvn_ra_svn\marshal.c:875: (apr_err=210004)
>   svn: Unknown status 'reparent' in command response
>
> If anyone has time to apply this patch and run merge_test.py 85 over
> ra_svn please do, and let me know if you get the same problem.

No objections raised so I committed this change in r29085.  I haven't
made any headway on the test failure over ra_svn, but it appears
unrelated to this change (I just had the bad luck to provoke it).
I'll look into that some more.

Paul

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org