I’m looking for a DVCS which would allow me to use something like a “named commit” — similar to what patch queues achieve, but not quite… (I’ll compare only to mq and stg, since I don’t know of any other similar ones)
Patch queues are close, but I’d like those features:
- Creating new branch in the repository, branches also the patch series. (m
quses global patch queues,gitloses thestginformation while branching and branches with patches currently applied) - Ability to list the “named commits”, pop and push them just like patches. (both do that)
- Tying the “named commit” changes to normal commits – so that when I create a patch at rev 1, I change the patch at rev 3, I can still checkout rev 1 and see the old version. (
mqis global again,stgfails with “not on any branch” when I come back to older revision) - Same as above really – ability to tag a revision in a way that if I check it out, I get the “named commits” I had then.
Is there anything similar out there? Any extensions to some DVCS? Or maybe there’s a way to make mq or stg behave the way I want? Any suggestions?
It seems like mq which keeps its information is in the same repo as other files, would be close to what I need, but is that even possible?
Just to explain the purpose quickly: I want to keep the patches applied all the time, but they’re not “part of development”. I just want several specific features kept separately in my own fork of the main repo.
You can do this with Mercurial by using
mqinside of its own repo. Most commands have a--mqflag that will operate on the patch queue. To get started usehg init --mq(hg qinitalso works, but that pattern is more limited, especially sinceqpushwould be overloaded). This creates a repo inside of.hg/patches, which is independent from the main repo. Then, usemqas usual. When you want to commit your patch queue, usehg commit --mq.You can also tag and branch with the
--mqflag, to keep track of different heads. Unfortunately, it looks like the Bookmarks extension does not yet support mq, which would be nice since you probably want lightweight labels. If you wanted, though, you could set up an alias forqbookmarkwhich just adds the-R .hg/patchesso it operates on the patch queue repo.I haven’t used this extensively myself, but it looks like enough of the native Mercurial commands support
--mqas to make it a possible solution for you.