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

RE: Backing out changes: the prefered method?

From: Geisser, Oliver <O.Geisser_at_CEYONIQ.COM>
Date: 2002-01-31 11:33:45 CET

Hi

> -----Original Message-----
> From: Ben Collins-Sussman [mailto:sussman@collab.net]
> Sent: Wednesday, January 30, 2002 10:37 PM
> To: Sean Russell
> Cc: Garrett Rooney; dev@subversion.tigris.org
> Subject: Re: Backing out changes: the prefered method?
[...]

> Here's the example. Assume you have a working copy, all at revision
> 5. You then make a change to foo.c, and commit, thereby creating
> revision 6 in the repository. A few other commits to other files go
> by, and you do some updates.
>
> Now it's the following week, and you have a working copy (mostly) at
> revision 15. You run 'svn status -v' and notice that the last time
> foo.c changed was in revision 6. You now decide you want make remove
> that last change you made to foo.c.
OK. Example is clear.

> So -- this has nothing to do with updating. You have subversion
> generate a diff between foo.c in revision 6 and foo.c in revision 5;
> you then apply that diff to your working foo.c. Now: your working
> copy still believes that you have version 15 of foo.c (which
> incidentally is no different than revision 6 of foo.c). But now you
> have some local mods too. The working copy has no idea that those
> local mods just *happen* to revert the last change made to foo.c.
> When you commit your modified foo.c, you create revision 16. And now
> foo.c in rev 16 is exactly equal to foo.c as it was in rev 5.

I understand the problem of "working copy version relates to revision on
server".
That's not the problem to me.

What I do not understand: Why should I think in terms of "diffs" ?
This seems a little bit strange to me.
I just want that the content of foo.c from revision 5 replaces the content
of foo.c
in my working copy.

If I have access to the content of foo.c (from revision 5) I can replace it
locally.
So a crazy idea would be:

rm foo.c
wget -O foo.c <url to foo.c in revision 5>

Because this seems crazy I would prefer a simple svn command.
Maybe a svn get:

svn get -R 5 foo.c

The "get" command would retrieve the content of the file in the given
revision
and create/replace it locally. Nothing else.

What do you think ?

-og

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:37:01 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.