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

Re: [PATCH] Optimize svn up/svn switch with internal diff3

From: Erik Huelsmann <ehuels_at_gmail.com>
Date: 2006-06-23 17:17:01 CEST

> > > + /* Dry-run iff resorting to external diff for real merge */
> > > SVN_ERR(svn_wc_merge2(svn_path_join(base, txtb, pool),
> > > svn_path_join(base,
> > > base_name, pool),
> > > adm_access,
> > > oldrev_str, newrev_str, ".mine",
> > > - TRUE, &merge_outcome, NULL, NULL,
> > > + diff3_cmd != NULL, /* dry run */
> > > + &merge_outcome, NULL, NULL,
> > > pool));
> >
> > This now makes changes in the working copy without using the log file
> > mechanism. The second merge, the one that made all the changes in the
> > past, does use log files. Now the log file code have always been a
> > bit of a tricky area, I'm not sure we get it right at present, but is
> > your change doing the right thing?
>
> It's doing the same thing we always did in the second merge, but, I
> think we need to change both. Instead of merging directly into the
> working copy file, I think we should copy the wc file into the admin
> area, merge into that 'backup copy' and then - using loggy code - move
> the merge result into the working copy.

Ah, looking at svn_wc_merge2, I see that success/failure in
svn_wc_merge2 is atomic: if it fails, the target remains unchanged. If
it succeeds, the target is updated. (IOW: the merge happens to an
intermediate file.)

Also, the entry has been updated to the new revision even before the
actual merge happens (before and after the patch).

bye,

Erik.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jun 23 17:17:44 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.