If you have mq patches applied and you pull will your repository be damaged?
The answer is no. When you pull, you add more changesets to your local history. The applied MQ patches also live as changesets in the changeset graph, but that's not dangerous and you will not lose any data.
What may happen is that you have applied some patches:
.... a --- b --- p1 --- p2 --- p3
You then send the patches to the upstream mailinglist for inclusion. Someone reviews the patches, commits them, and pushes the changesets to the main repository. Other changesets are pushed afterwards and next time you pull you end up with:
.... a --- b --- p1 --- p2 --- p3 --- c --- d
Changesets p1
to p3
are still MQ patches in your repository, but they now have non-MQ children! Trying to pop them results in (with Mercurial 2.1.1):
$ hg qpop
abort: popping would remove a revision not managed by this patch queue
This is a bit of a dead-lock. It's annoying but not dangerous. To resolve it you must make MQ understand that p1
to p3
are no longer managed by MQ. You do this by removing the lines for these changesets from .hg/patches/status
. MQ should probably eventually remove these lines by itself when this happens — but it happens pretty rarely so nobody has written that patch yet.