Death to "hg update -C"

Matt Mackall mpm at selenic.com
Tue Jul 21 09:27:48 CDT 2009


On Tue, 2009-07-21 at 15:37 +0200, Jelle Herold wrote:
> Hello,
> 
> As much as I love mercurial, I *really hate* "update -C"...
> 
> This is the second time I lost work due to some confusion with
> hg merge, hg revert and hg update '-C'.
> 
> (extra disastrous this time where 1. failed backups and
>   2. I actually destroyed the work of a colleague).
> 
> So, I know the real bug is in front of the screen, touching
> the keyboard. But IMHO mercurial should take extreme measures
> never to loose any (outstanding) work.
> 
> 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.

Perhaps you can teach yourself about hg up --check (-c) instead, which
works like -C but only if you've already got a clean working directory.

-- 
http://selenic.com : development and support for Mercurial and Linux




More information about the Mercurial mailing list