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

Re: [PATCH] Warn when attempting to reverse merge range from target's future history

From: Paul Burba <ptburba_at_gmail.com>
Date: Tue, 19 Feb 2008 10:27:39 -0500

On Feb 15, 2008 9:05 AM, Kamesh Jayachandran <kamesh_at_collab.net> wrote:
>
> > svn: warning: Cannot reverse merge a range from a path's own future
> > history; try updating first
> >
> >
> >
> > Beyond the obvious question of "is the right course of action", I was wondering:
> >
> > 1) Does that error message make sense?
> >
>
> Looks fine with me.
>
> I have couple of comments to your patch.
>
> Sorry for not able to respond inline to your original patch(blame my
> mailer).
>
>
> Comment1:
> The outer condition to show the warning message should be
>
> - if (((*remaining_ranges)->nelts == 0)
> - && (revision2 < revision1)
> - && (entry->revision < revision2))
>
>
> + if (((*remaining_ranges)->nelts == 0)
> + && (revision2 < revision1)
> + && (entry->revision <= revision2))
>
>
> i.e The final condition should be 'entry->revision <= revision2' not
> entry->revision < revision2

Thanks Kamesh, that is correct, since the merge is a no-op in that case too.

> Comment2:
>
> Why should we use 'svn_client__repos_locations' to get the URL of
> ulr1_at_revision1 at entry->revision? Is it needed?

Keep in mind that this warning is only intended to show up when the
merge target described by entry->revision is on the *same* line of
history as URL1_at_REVISION1 (due to merge source normalization we
already know that URL2_at_REVISION2 is on the same line of history as
URL1_at_REVISION1). So the call to svn_client__repos_locations() is
needed to answer the question of whether or not we are merging from a
target's future history. If we are not, then there shouldn't be a
warning...

...or are you suggesting that we should warn even when merging from an
unrelated source?

Paul

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-02-19 16:48:31 CET

This is an archived mail posted to the Subversion Dev mailing list.