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

Re: revert -keep?

From: David Mankin <david_at_ants.com>
Date: 2003-08-10 00:49:27 CEST

--On Saturday, August 09, 2003 11:30 PM +0200 Michael Wood
<mwood@its.uct.ac.za> wrote:
>> I'd like to point out that the CVS equivalent command to 'svn revert' is
>> 'cvs update -C filename'. This command *does* keep the modified copy
>> around under a .#filename.version file. Offering the same thing in svn,
>> while technically only a "convenience" for manually copying the files,
>> is likely to prevent people being disappointed that their local changes
>> were lost.
> Subversion will only throw away the local changes iff you use --force.
> Is that not reminder enough?

Not so! 'svn revert' (at least in svn 0.26.0) will destroy your changes
when you don't use --force.

Karl Palsson wrote:
> Ben Collins-Sussman wrote:
>> This use-case happens to us all the time in svn development. We're
>> working on a large change, and whoops, need to switch gears, so we put
>> the whole changeset aside:
>> $ svn diff > mypatch
>> $ svn revert . -R
>> $ svn up
>> $ edit files, commit, etc.
>> $ patch -p0 < mypatch
>> ...then continue on where you left off.
>> Your proposal seems much clunkier to me. You'd rather have 'svn
>> revert' leave a bunch of 'backup' files around your working
>> copy... and then later hand-move them back into place? :-/
> Yeah, I would, disk space is cheap. I wasn't proposing making it the
> default however. If you don't approve, that's fine with me, but all you
> have to do right now is leave out the diff > mypatch, and it's alllll
> gone. The 'Protection' afforded by requiring a parameter to revert is
> effectively useless in my mind. You very quickly get to the point where
> the . is automatic, just like ./blah to execute stuff.

Like Karl, I think it would be better if it would keep your changes in a .#
file. Then we could have --force mean "don't keep my changes, I really
want them gone." Then it would behave as Michael assumed it would.

(Also, Ben, your solution only works when changes can be correctly detected
and restored with diff/patch.)

-David Mankin

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sun Aug 10 00:50:19 2003

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