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

Re: [PATCH] #2403: Incorrect merge of binary file when already existing

From: Daniel Rall <dlr_at_collab.net>
Date: 2006-05-12 22:41:28 CEST

On Fri, 12 May 2006, Daniel Rall wrote:

> On Fri, 12 May 2006, Peter N. Lundblad wrote:
...
> > > Index: subversion/libsvn_client/diff.c
> > > ===================================================================
> > > --- subversion/libsvn_client/diff.c (revision 19623)
> > > +++ subversion/libsvn_client/diff.c (working copy)
> > > @@ -1002,6 +1016,8 @@
> > > }
> > > else
> > > {
> > > + /* Indicate that we're merging as the result of an add. */
> > > + merge_b->add_necessitated_merge = TRUE;
> > > SVN_ERR(merge_file_changed(adm_access, content_state, prop_state,
> > > mine, older, yours,
> > > rev1, rev2,
> >
> > Doesn't the flag need to be reset to FALSE afterwards?
>
> I don't think so -- as I understand things, the merge_cmd_baton struct
> has a lifetime of a single merge operation, and the fact that
> invocation of the merge_file_added() callback subsequently needed to
> invoke the merge_file_changed() function doesn't change during the
> lifetime of that merge operation.

On second thought, you're absolutely right. When there are multiple
files involved in a merge, the baton will be reused for the merge of
each file. The "add_necessitated_merge" flag is file-specific, so
should indeed be cleared after each delegation to merge_file_changed()
from merge_file_added().

Thanks again!

-- 
Daniel Rall

  • application/pgp-signature attachment: stored
Received on Fri May 12 22:41:57 2006

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.