Very nice program. Comments and usage questions...

Chad Netzer cnetzer at comcast.net
Sun Jul 10 12:16:13 UTC 2005


I think having "hg remove" delete the file by itself is useful and
convenient, but ONLY if it aborts the transaction if any of the
requested files have pending commits on them (ie. they are changed from
the repository).  If the user really desires removing a modified file,
they should have to do it manually (ie as is done now).

With that proviso, the "hg remove" command actually may become more
useful because it encourages one to "hg commit" (or "hg revert") before
"hg remove", which is both history and data preserving.

This assumes that the new "hg remove" does the deletions before
returning control to the shell.  The other option is that it would take
an actual "hg commit" before the files disappeared, but that seems to
have considerably more complicated semantics.  Encouraging a
modify/commit/remove ordering seem both safe and easy.


On a related note, while horsing around in order to compose this
mesaage, I came across this odd situation:

% mkdir temp
% cd temp
% hg init
% touch foo
% hg add foo
% rm foo
% hg remove foo   # interesting error message here, BTW
% hg commit

The commital log in the above case shows file foo being removed
(although it was never commited in the first place).  The error message
upon "hg removei foo" was:

foo never committed!
not in dirstate: f!
not in dirstate: o!
not in dirstate: o!

Chad Netzer





More information about the Mercurial mailing list