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

Re: "svn unpull"?

From: Adam Megacz <adam_at_megacz.com>
Date: 2006-05-22 01:31:24 CEST

>> That is, if I have a working copy with version 5, I want to put my
>> working copy in the state it would be in if version 3 had never been
>> checked in (that is, the changes in versions 1,2,4,5).

> I don't know darcs. Does "svn up -r 3" do what you want?

Not really what I wanted, since after doing so the changes embodied in
versions 4+5 would no longer be represented in my working copy.

For example, if change 3 added function "foo()" to "bar.c" and
revision 4 added function "baz()" to "bar.c", the result should be
that "bar.c" contains "baz()" but not "foo()" (assuming they don't
share any lines, which would require human intervention, of course).

> If you did in fact want to make the changes such that you could
> commit them, then Subversion does support a much more-intelligigent
> solution than svn diff and a manual patch, namely svn merge.

Hrm, okay, it seems that "svn merge -r 2:3" would automate the
diff-patch hack I'm currently using, but still has the accidental
checkin problem. Plus it gets even worse if I mix "good" edits with
the "undo" change:

  svn merge -r 2:3
  svn commit # create version 6 = (1,2,4,5,<edits>)

Now if I realize I wasn't supposed to destroy the changes from version
3, I can't just undo version #6 -- I have to delicately take apart the
erroneous checkin.

Here's a question: would the state of my working copy be any different
if I had performed "svn merge -r 2:3" versus if I had manually done a
diff-and-patch? In other words, does svn keep any sort of memory in
my working copy that "hey, this guy undid version 3", or does it just
know that "hey, this guy edited a bunch of stuff"?

  - a

PGP/GPG: 5C9F F366 C9CF 2145 E770  B1B8 EFB1 462D A146 C380
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon May 22 01:32:59 2006

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.