mqのrebase
Mercurial Queueを使ってる時に元ソース側を更新しつつ、再度パッチを適用する、というのを上手くやるには、"hg qsave"とか"hg push -m"なんかを使う、なんてのも見かける。
- http://mercurial.selenic.com/wiki/MqMergePatches
- http://mercurial.selenic.com/wiki/WorkingWithSubversion
けど、これらが何をするものか知る前に今や非推奨の様子。
$ hg help qsave hg qsave [-m TEXT] [-l FILE] [-c] [-n NAME] [-e] [-f] save current queue state (DEPRECATED) This command is deprecated, use "hg rebase" instead.
"hg rebase"を使えとのこと。サラっと言われたがextensionなので.hgrcで
[extensions] rebase =
などと書いておく。で、WorkingWithSubversion - Mercurialの"With MQ only"の例だと、
$ hg up -C .^ $ hg qpush -a $ hg qsave -c -e $ hg up -C 2 $ hg qpush -am
となってるあたりを、
$ hg up -C .^ $ hg qpush -a $ hg rebase -d 2
としてやれば良いようだ。あと、
$ hg up -C .^
なんてこともサラっとやってるが、これもparentrevspec extentionを使ってる。
気が向いたら詳しく書く。