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

stash (was Re: revert --force)

From: Tobias Hahn <tobias.hahn_at_ableton.com>
Date: Thu, 10 Dec 2009 20:08:31 +0100

I recognize that I meet some resistance here to my proposal...

So what about a command svn stash (shamelessly stolen from git-stash) then? Example:

$ svn stash save "Some dirty changes."

This would add new files, save all local modifications away and then revert --force the tree. At this point the wc would be clean, so I could

$ svn merge -r ...
$ svn commit -m "Merged -r ... "

Later, I would be able to either

$ svn stash pop

if I decide my changes were important or do nothing if not.

I realize that the way git handles repos makes this feature particularly easy for them to implement, but it should be possible for svn as well.

Would this constitute a less controversial feature request?

Best, Tobias

Am 10.12.2009 um 16:52 schrieb Tobias Hahn:

> Hi,
>
> I am frequently unnerved by the fact that revert does not remove unversioned files and directories. I understand that protecting them from accidental deletion is often desirable, but not always. My suggestion is therefore to add a --force option to revert which does a true revert: It reverts the working copy without trying to be smart and just erases everything what's not in the repository.
>
> Here's my use case:
> - I'm working on a branch.
> - I have a path in my working copy which is modified by some automatic scripts.
> - About once a week, I merge trunk. To do so, I need a clean working copy. To get it clean, I have to
> - manually delete all these files (slow and error prone) or
> - delete the path and checkout again (very slow)
> - just revert --force it (wishful thinking).
>
> Thoughts?
>
> Best, Tobias
>
>
> Ableton AG, Sitz Berlin, Amtsgericht Berlin-Charlottenburg, HRB 72838
> Vorstand: Gerhard Behles, Jan Bohl, Bernd Roggendorf
> Vorsitzender des Aufsichtsrats: Uwe Struck
>
>
>
>

Ableton AG, Sitz Berlin, Amtsgericht Berlin-Charlottenburg, HRB 72838
Vorstand: Gerhard Behles, Jan Bohl, Bernd Roggendorf
Vorsitzender des Aufsichtsrats: Uwe Struck

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2429288

Please start new threads on the <users_at_subversion.apache.org> mailing list.
To subscribe to the new list, send an empty e-mail to <users-subscribe_at_subversion.apache.org>.
Received on 2009-12-10 20:09:18 CET

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.