Question

I have a mercurial queue patch on my local machine that I need to share with a coworker that I'd prefer not to commit to an upstream repository. Is there a simple way that I can package that patch and share it with him?

Was it helpful?

Solution

mq stores the patches in the .hg\patches\ folder as files without an extension.

You can copy or email those files and use hg qimport FILE on the other end to bring them into the patch queue on the other repository. Note that if you copy it directly to the target .hg\patches\ folder, you'll need to use the --existing switch so hg knows to not create the file.

The .hg/patches folder, by the way, can be a repository in itself to track changes in the patch queue itself. You can init it with hg init --mq and commit the current patches by hg com --mq.

OTHER TIPS

  • If both sides have MQ enabled, you can use for pull|push --mq option
  • You can use MQCollab extension
  • You can just copy needed mq-patch from patch-directory (default: `.hg/patches) and transfer it using any way: patch is ordinary diff, which can be applied to "foreign" files in repository even without MQ
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top