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

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

From: Paul Burba <ptburba_at_gmail.com>
Date: Thu, 24 Jan 2008 17:30:12 -0500

> -----Original Message-----
> From: C. Michael Pilato [mailto:cmpilato_at_collab.net]
> Sent: Monday, January 14, 2008 3:10 PM
> To: Paul Burba
> Cc: dev_at_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 <cmpilato_at_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.
]]]

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org

Received on 2008-01-24 23:30:32 CET

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.