Death to "hg update -C"

Hans Meine meine at informatik.uni-hamburg.de
Wed Jul 22 03:58:39 CDT 2009


On Tuesday 21 July 2009 16:27:48 Matt Mackall wrote:
> On Tue, 2009-07-21 at 15:37 +0200, Jelle Herold wrote:
> > Even if I say '-C', many times I don't mean it.
> > I suppose I'm not the only one?
> >
> > Can this be fixed?
>
> No, it cannot be fixed. There are countless users, scripts, and even
> paper books that know about --clean. It is here forever.

Similar to Greg's suggestion, I would say it could be fixed: Similar to strip, 
one could write a backup (e.g. "hg diff --git" output).  In contrast to Greg, 
I would suggest not to have an option for it, and not to write it into the 
home directory, but simply to write it to a fixed name under the .hg/ 
directory (potentially overwriting a previous backup).  This would not lead to 
too much clutter IMO and be similar to the usual rollback data.  (Actually, it 
would be perfect if "rollback" was the command to undo update -C.)

Does that make sense?

(Yes, I know there are some technical difficulties due to diffing w.r.t. --git 
format, renames, and potentially other things, but it looks doable to me.)

Best,
  Hans


More information about the Mercurial mailing list