On May 11, 2017, at 5:03 AM, Richard Hipp <d...@sqlite.org> wrote:
> 
> On 5/11/17, Ross Berteig <r...@cheshireeng.com> wrote:
>> On 5/10/2017 8:54 PM, Ron Aaron wrote:
>>> 
>>> I tried to revert to a good revision 'xxx' using "fossil revert -r xxx"
>> 
>> But in my experience, fossil revert is a rarely used command.
> 
> Yeah.  In fact, I didn't even remember that there was a 'revert'
> command.  And even now, I'm not entirely clear what it does, or what
> it is intended to do.

I think it’s there to make Subversion transplants like me happy.

In my current 1000-command Bash command history, I’ve run some variant on 
“fossil revert” 4 times, and other Fossil commands 240 times.  That makes 
“revert” 1.67% of my recent Fossil commands.

It’s not the best sampling method, but it is enough to make “fossil revert” a 
significant command in my world.

As to when I use it, it’s mostly the next level beyond the use cases where you 
use “stash”: that is, you want to revert the current changes without even 
saving them, other than in the undo buffer.  I use it whenever I’ve done 
something entirely unwanted and need to get back to the prior checkin.

When you’re typing prose, do you ever just backspace over a mistyped word and 
retype it rather than edit it in place?  “fossil revert” is like that for me 
with code.

An example from the past week is that I accidentally said “fossil add” on a 
file through a symlink that is not itself checked in, so that on checkout you’d 
get a real directory in place of the symlink because Fossil is storing the file 
with the path as given on the command line, not fully dereferenced to canonical 
form.  I noticed this error during “fossil checkin”, so I aborted the checkin 
comment editor, reverted the change, and re-added the file under the correct 
name.

It may be relevant that I’m of the “check in early and often” school, so that 
“fossil revert” rarely throws away more than an hour of work, and often much 
less.
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to