Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mercurial: shelve vs. mq

I have been using mercurial for a little while, and have been slowly learning it's features. A while ago I learned about shelves, and have been using them happily. Now I am trying to understand patch queues, but from what I read, they sound very similar to shelves. I can save my work without actually committing it, switch branches if I want, and later come back to it. How do these two differ?

Note: I saw this: Mercurial: graft vs. record vs. qrecord vs. shelve vs. transplant vs. dirstate vs. queue, but didn't find that it addressed this.

like image 385
Baruch Avatar asked Jan 21 '14 17:01

Baruch


1 Answers

Patch queues have a superset of the features of shelves. In addition to setting aside work in progress, the major difference is that applying a patch creates a changeset, instead of only changing the working directory. Keeping the patches distinct enables other workflows, such as these from the book:

  • "Refreshing a patch" iteratively, giving you checkpoints you can roll back to.
  • "Stacking and tracking patches", multiple applied patches don't get mixed together.
like image 141
A. Coady Avatar answered Nov 10 '22 00:11

A. Coady