So far I haven't been able to find a clear answer, though it's possible that the answer is "change your workflow".
I've just started playing around with Mercurial's patch queue and I can see some serious power in it. It seems pretty awesome. In my tests, I've discovered that if you have a patch queue in repo1
, and you pull from repo2
, you can do some bad things. For example:
- Create repos 1, and clone it.
- Enable the queue on
repo1
- Make some commits and some patches on
repo1
- Pull changes to
repo2
- On
repo1
un-apply(pop?) all your patches - Pull changes to
repo2
Now you'll see two different branches - which makes sense from a certain viewpoint. However, since my patches aren't a part of repo1
's history (at least until they're applied), it seems like there should be a way to tell mercurial that my patches are off-limits, and only provide what's in the "official history".
Is there a way to do this?
Mercurial phases may be the answer to this.
Starting with Mercurial v2.1, you can configure
mq
changesets to automatically be markedsecret
.secret
changesets are ignored byincoming/pull
andoutgoing/push
commands.To enable this behavior, you need to add the following to your config:
Once enabled, it behaves as follows: