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

Re: Function find_unmerged_mergeinfo()

From: Paul Burba <ptburba_at_gmail.com>
Date: Fri, 18 Dec 2009 18:13:56 -0500

On Fri, Dec 18, 2009 at 12:25 PM, Julian Foad <julian.foad_at_wandisco.com> wrote:
> Paul,
>
> I was looking at
> subversion/libsvn_client/merge.c:find_unmerged_mergeinfo() to review a
> recent bug fix for back-port.
>
> It is said to be a "Helper for calculate_left_hand_side()", but I
> noticed it seems to be basically a function for comparing one mergeinfo
> catalog with another, to see what has not been merged from one to the
> other. That sounds like the same kind of calculation that normal merges,
> and the "svn merginfo" command, perform.
>
> Is there not an existing function we can use for this purpose?

Hi Julian,

Regarding the commonality between reintegrate merges and regular
merges: There isn't any single function for the latter analogous to
find_unmerged_mergeinfo(). Rather it is do_directory_merge() and its
legion of helpers. Keep in mind that a regular merge must deal with a
working copy target and all this entails: mixed revisions, local
modifications, switched subtrees, subtrees missing due to
authorization restrictions, text/tree conflicts created by earlier
editor drives, etc. find_unmerged_mergeinfo() doesn't have to deal
with any of this, in fact it doesn't even need the working copy
because during a reintegrate merge it is asking, not about the
reintegrate WC target, but rather about what has previously been
merged from the WC target to the reintegrate source.

But you are probably onto something with the svn mergeinfo command.
The new 1.7 svn_client_mergeinfo_log API is smart enough the handle
subtree mergeinfo, so it could probably replace some/all of the code
currently in libsvn_client/merge.c:find_unmerged_mergeinfo() and
ensure_all_missing_ranges_are_phantoms().

Paul

> (Of course this function takes its input in a specific format, and
> generates several specific output indications, but those are details
> that could be wrapped around a generic "compare mergeinfo catalogs"
> function.)
>
> - Julian
Received on 2009-12-19 00:14: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.