subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grierson, David" <>
Subject RE: Feature request: Save the old file when svn revert
Date Tue, 21 Jul 2015 13:58:08 GMT
> -----Original Message-----
> From: Markus Schaber []
> Sent: 21 July 2015 14:01
> To: Grierson, David;
> Cc: 牛暁冬;
> Subject: AW: Feature request: Save the old file when svn revert
> ...
> I'm not really sure what to think about this one...
> In the end, the whole purpose of "svn revert" is to drop the local
> changes and *revert* everything back to the state the repository has.
> All other commands need a --force or other explicit user decision to
> override user changed data, but the whole purpose of the "svn revert"
> command is to undo local changes - putting a --force option or
> something similar seems like a bit of contradiction.
> On the other hand, I'm not an SVN core developer, so it's just my
> personal opinion.
> How do the other RCSes handle this situation? Maybe we can learn
> some ideas for a nice(r) UI there...

Good question ...

The equivalent in ClearCase was a "cleartool uncheckout":

This has the -kee/p and -rm options on the command:

> –kee/p
> Preserves the contents of the checked-out version under a file-name of the form element-name.keep
> (or, to prevent name collisions, element-name.keep.1, element-name.keep.2, and so on).
> –rm
> Does not preserve the contents of the checked-out version. Thus, any edits that had been
made to
> the checked-out version are lost.

The default action is to prompt the user for what to do with the lost changes:

> Cancel the checkout of file element util.c.

$ cleartool uncheckout util.c
Save private copy of "util.c"? [yes] no
Checkout cancelled for "util.c".

I guess the equivalent in git is the reset command:

This seems to have three key options:

> --hard
> Resets the index and working tree. Any changes to tracked files in the working tree since
> are discarded.
> -merge
> Resets the index and updates the files in the working tree that are different between
<commit> and
> HEAD, but keeps those which are different between the index and working tree (i.e. which
have changes
> which have not been added). If a file that is different between <commit> and the
index has unstaged
> changes, reset is aborted.
> --keep
> Resets index entries and updates files in the working tree that are different between
<commit> and
> HEAD. If a file that is different between <commit> and HEAD has local changes,
reset is aborted.

So _similar_ (but more quirky IMHO) operation to ClearCase.

Information in this email including any attachments may be privileged, confidential and is
intended exclusively for the addressee. The views expressed may not be official policy, but
the personal views of the originator. If you have received it in error, please notify the
sender by return e-mail and delete it from your system. You should not reproduce, distribute,
store, retransmit, use or disclose its contents to anyone. Please note we reserve the right
to monitor all e-mail communication through our internal and external networks. SKY and the
SKY marks are trademarks of Sky plc and Sky International AG and are used under licence. Sky
UK Limited (Registration No. 2906991), Sky-In-Home Service Limited (Registration No. 2067075)
and Sky Subscribers Services Limited (Registration No. 2340150) are direct or indirect subsidiaries
of Sky plc (Registration No. 2247735). All of the companies mentioned in this paragraph are
incorporated in England and Wales and share the same registered office at Grant Way, Isleworth,
Middlesex TW7 5QD.
View raw message