Confusing `hg add` + `hg remove` behavior

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


> On Sep 1, 2016, at 20:54, Gregory Szorc <gregory.szorc at gmail.com> 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: http://code.v.igoro.us/posts/2016/09/user-guidance-vs-dwim.html <http://code.v.igoro.us/posts/2016/09/user-guidance-vs-dwim.html>
> 
> 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 mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20160902/a8afc631/attachment.html>


More information about the Mercurial-devel mailing list