Show More
@@ -45,7 +45,7 b' create other, independent patch queues w' | |||||
45 | from mercurial.i18n import _ |
|
45 | from mercurial.i18n import _ | |
46 | from mercurial.node import bin, hex, short, nullid, nullrev |
|
46 | from mercurial.node import bin, hex, short, nullid, nullrev | |
47 | from mercurial.lock import release |
|
47 | from mercurial.lock import release | |
48 | from mercurial import commands, cmdutil, hg, patch, scmutil, util |
|
48 | from mercurial import commands, cmdutil, hg, patch, scmutil, util, revset | |
49 | from mercurial import repair, extensions, url, error |
|
49 | from mercurial import repair, extensions, url, error | |
50 | import os, sys, re, errno, shutil |
|
50 | import os, sys, re, errno, shutil | |
51 |
|
51 | |||
@@ -3096,6 +3096,20 b' def summary(orig, ui, repo, *args, **kwa' | |||||
3096 | ui.note(_("mq: (empty queue)\n")) |
|
3096 | ui.note(_("mq: (empty queue)\n")) | |
3097 | return r |
|
3097 | return r | |
3098 |
|
3098 | |||
|
3099 | def revsetmq(repo, subset, x): | |||
|
3100 | """``mq()`` | |||
|
3101 | Changesets managed by MQ. | |||
|
3102 | """ | |||
|
3103 | revset.getargs(x, 0, 0, _("mq takes no arguments")) | |||
|
3104 | applied = set([repo[r.node].rev() for r in repo.mq.applied]) | |||
|
3105 | return [r for r in subset if r in applied] | |||
|
3106 | ||||
|
3107 | def extsetup(ui): | |||
|
3108 | revset.symbols['mq'] = revsetmq | |||
|
3109 | ||||
|
3110 | # tell hggettext to extract docstrings from these functions: | |||
|
3111 | i18nfunctions = [revsetmq] | |||
|
3112 | ||||
3099 | def uisetup(ui): |
|
3113 | def uisetup(ui): | |
3100 | mqopt = [('', 'mq', None, _("operate on patch repository"))] |
|
3114 | mqopt = [('', 'mq', None, _("operate on patch repository"))] | |
3101 |
|
3115 |
@@ -843,6 +843,14 b' mq tags' | |||||
843 | 1 foo qbase |
|
843 | 1 foo qbase | |
844 | 2 bar qtip tip |
|
844 | 2 bar qtip tip | |
845 |
|
845 | |||
|
846 | mq revset | |||
|
847 | ||||
|
848 | $ hg log -r 'mq()' --template '{rev}\n' | |||
|
849 | 1 | |||
|
850 | 2 | |||
|
851 | $ hg help revsets | grep -i mq | |||
|
852 | "mq()" | |||
|
853 | Changesets managed by MQ. | |||
846 |
|
854 | |||
847 | bad node in status |
|
855 | bad node in status | |
848 |
|
856 |
General Comments 0
You need to be logged in to leave comments.
Login now