Confusing `hg add` + `hg remove` behavior

Augie Fackler raf at
Fri Sep 2 10:53:08 EDT 2016

> On Sep 1, 2016, at 20:54, Gregory Szorc <gregory.szorc at> wrote:
> One of my coworkers just blogged about confusing behavior w.r.t. performing a `hg remove` on a file that was `hg add`ed but not yet committed: <>
> Is there room to change the behavior of `hg remove` to behave more like `hg forget` in this scenario? Or is the best we can do a wording change?

The best we can do is really a wording change, because 'hg remove' wants to both remove the file from version control tracking *and* discard the file from the local filesystem. If we do the latter in this case, we've just caused data loss.

> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Mercurial-devel mailing list