stuck in commit/update/push/pull loop

Pierre-Yves David pierre-yves.david at logilab.fr
Tue Dec 20 16:21:03 UTC 2011


On Tue, Dec 20, 2011 at 09:09:26AM -0700, Steve Franks wrote:
> > I bet you a nickel that'll get you unstuck. But then so would actually
> > running 'hg rm' on the missing files, committing your changes, then
> > merging.
> 
> Thanks for the help!
> 
> You know, you sound a tad defensive about the huge POLS violation that
> is requiring a command to delete a file.  All the other tools (except
> maybe git which I'm not familiar with) treat a deletion just like any
> other modification: something to be committed. But, hey, if there
> weren't special cases, we wouldn't have jobs, right? I'm sure there's
> a very good reason for requiring a command to delete.
> 
> Matter of fact, requiring a command to delete actually worries me a
> bit. It makes me think that rm removes the file from version control
> altogether, so it 'forgets' about the file.

Mercurial never remove anything from it's immutale changesets part of it's
immutable history. Updating to a changeset X will always result in the exact
state the repository was when X was commited by mercurial.

> I'd personally rather a deletion was just another reversible delta in the
> history...doubtless there's another command for that.

hg rm do exactly this. It's stop tracking the file for future commit and
register the removal of the file from the working copy in the next commit.

> I know I can probably glean the answer to that from the help or the wiki, so
> unless anyone wants to chat about the implications, or I'm dead wrong, I'll
> be over there...

You're dead wrong :-) The only way to trip history for any trace of a file is
to rewrite the whole repo using convert.


-- 
Pierre-Yves David

http://www.logilab.fr/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20111220/97b926d3/attachment.asc>


More information about the Mercurial mailing list