0

In our workflow we are using Mercurial mq for our development the default branch. However, when we need to merge another branch into the default, what is the best practice to apply these patches on top of the merged default?

Obvious (ugly) way: pop all patches, merge branch then push all patches and fix all the .rej files...

Correct way should be to use rebase somehow but not sure what's the correct workflow.

Any ideas?

Michal Sznajder
  • 9,338
  • 4
  • 44
  • 62
eskhool
  • 657
  • 1
  • 11
  • 24

2 Answers2

0

I think hg rebase --mq might do what you want. If not, try this:

hg rebase -s qbase -d default
djc
  • 11,603
  • 5
  • 41
  • 54
  • I don't think that will work at all ... --mq makes the command work on the patch repository...I don't need to change the patch queue repository...I need to rebase the mq patches on top of the merge – eskhool Feb 19 '13 at 04:01
0

The rebase command itself is aware of Mercurial Queues, at least in semi-recent versions of Mercurial.

See the rebase documentation, mention of this feature in the MQ documentation, and somebody's blog post.

In short, you can rebase applied MQ patches like you would any other set of changes, and rebase is smart enough to make sure they remain as MQ patches afterwards.

jwd
  • 10,837
  • 3
  • 43
  • 67