--On Saturday, August 09, 2003 11:30 PM +0200 Michael Wood
>> 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.)
To unsubscribe, e-mail: firstname.lastname@example.org
For additional commands, e-mail: email@example.com
Received on Sun Aug 10 00:50:19 2003