diff -r c9ce8ecd6ca1 -r f28b58e35768 mercurial/commands.py --- a/mercurial/commands.py Tue Jun 01 11:18:57 2010 -0500 +++ b/mercurial/commands.py Tue Jun 01 11:18:57 2010 -0500 @@ -13,7 +13,7 @@ import patch, help, mdiff, url, encoding, templatekw import archival, changegroup, cmdutil, sshserver, hbisect, hgweb, hgweb.server import merge as mergemod -import minirst +import minirst, revset # Commands start here, listed alphabetically @@ -936,6 +936,15 @@ ui.configsource(section, name, untrusted)) ui.write('%s=%s\n' % (sectname, value)) +def debugrevspec(ui, repo, expr): + '''parse and apply a revision specification''' + if ui.verbose: + tree = revset.parse(expr) + ui.note(tree, "\n") + func = revset.match(expr) + for c in func(repo, range(len(repo))): + ui.write("%s\n" % c) + def debugsetparents(ui, repo, rev1, rev2=None): """manually set the parents of the current working directory @@ -3782,6 +3791,8 @@ (debugrename, [('r', 'rev', '', _('revision to debug'))], _('[-r REV] FILE')), + "debugrevspec": + (debugrevspec, [], ('REVSPEC')), "debugsetparents": (debugsetparents, [], _('REV1 [REV2]')), "debugstate":