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

Re: svn rollback (Was: Re: svn commit: rev 2162 - ...)

From: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2002-06-12 22:26:52 CEST

On Wed, Jun 12, 2002 at 08:59:17PM +0100, Philip Martin wrote:
> Garrett Rooney <rooneg@electricjellyfish.net> writes:
>
> > there is an 'svn_client_revision_working' which means (according to
> > the header file) 'current, plus local mods'. i haven't pounded on
> > this much, but if you pass it to merge it should generate a diff
> > between what you have currently and whatever other revision you give
> > it.
> >
> > /me crosses his finger since he hasn't delved too deeply into the code...
>
> No, it doesn't do what you think. svn_client_revision_working is used
> in the diff code, but the diff code has three separate paths, one for
> diff with no revision, one for diff with one revision and one for diff
> with two revisions. These paths are effectively three separate
> implementations. The merge code is related to the diff code but only
> implements the two revision path.
>
> If your code works at all, I think you will find that it will take the
> current base revision for whatever target path is given, and remove
> the differences between that revision and the given revision from
> everything under the target path. So going back to my mixed working
> copy
>
> % svn st -v wc
> _ 7 7 pm ./wc
> _ 8 6 pm ./wc/zig
> _ 8 6 pm ./wc/zig/bar
> _ 9 9 pm ./wc/zig/foo
>
>
> A command like 'svn rollback -r5 wc' will subtract the revision 5 to 7
> change from everything. It's not clear that this is correct, it won't
> revert the revision 9 change in wc/zig/foo for example. Subtracting
> the revision 5 to HEAD change is not obviously correct either, it may
> do the wrong thing on wc/zig/bar as it will add the subtract the
> revision 8 to HEAD changes but bar is only at revision 8.

i agree, this is not what we want... i'll look into it and see what
it's actually doing.

> To rollback a mixed revision working copy to a given revision is
> hard. The diff code has an entire editor in libsvn_wc/diff.c to do it.
> That's why I was curious when you claimed to have done it in 100
> lines.

well, it looks like i've got some work cut out for me...

-garrett

-- 
garrett rooney                    Remember, any design flaw you're 
rooneg@electricjellyfish.net      sufficiently snide about becomes  
http://electricjellyfish.net/     a feature.       -- Dan Sugalski
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jun 12 22:27:22 2002

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