Ignoring changed files

Theodore Tso tytso at mit.edu
Mon Dec 4 23:28:41 CST 2006


On Mon, Dec 04, 2006 at 05:31:54PM -0600, Steve Borho wrote:
> It's such a common problem that I wonder if it should be enforced 
> internally.  Mercurial will prevent you from commiting any local 
> changes on top of a patch changeset.  Why not prevent the user from 
> pulling changes on top of a patched changeset?

Pulling is perfectly safe.  If there is a mq-patch changeset applied,
then an "hg pull" will result in the new changesets creating a new
head revision.  It's only if you do an "hg merge" followed by an "hg
commit" that you will run into problems, and the "hg commit" will
result in an error.  Hg probably shouldn't allow you to do the "hg
merge", though.

In contrast, an "hg push" to a remote repository is far more
dangerous, since the mq changeset is potentially emphemeral and could
change after the next "hg qrefresh", the result is a mess --- and it
gets even worse if other people pull down the change from the remote
repository and then commit on top of it.

						- Ted


More information about the Mercurial mailing list