Fine, but I don’t think this would require a multi-level undo stack. A simple flag to indicate at the completion of any command if anything has changed (i.e., files written, deleted, or renamed) during its execution would be enough to decide whether to clear the one-level stack or leave it as is. No time-consuming checks would be needed, IMO, if setting of the flag is placed in the correct places.
From: Stephan Beal Sent: Saturday, April 19, 2014 6:35 PM To: Fossil SCM user's discussion Subject: Re: [fossil-users] undo option unavailable even when nothing changed On Sat, Apr 19, 2014 at 4:18 PM, <to...@acm.org> wrote: This does not seem to be right. Because if by mistake you type “f rev” twice (not being sure if you’ve already done it) you lose the ability to undo. A multi-level undo stack has been on the wish-list for a while but has never been implemented. The problem of running it twice is that revert doesn't check to see if there are changes before reverting, presumably because it can be costly to do so and because one doesn't normally try to revert when there are no changes (making it a useless cost 99% of the time). Personally, i'd be against adding the penalty of a check for "has something changed?" to _all_ revert calls just to cover this corner case, but i think it'd be easy enough to add if there's a large outcry for this. -- ----- stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a perfect world, freedom will have to do." -- Bigby Wolf -------------------------------------------------------------------------------- _______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
_______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users