diff -r 57875cf423c9 -r 2372284d9457 tests/printrevset.py --- a/tests/printrevset.py Sat Oct 05 10:29:34 2019 -0400 +++ b/tests/printrevset.py Sun Oct 06 09:45:02 2019 -0400 @@ -1,16 +1,15 @@ from __future__ import absolute_import from mercurial import ( - cmdutil, - commands, - extensions, - logcmdutil, - revsetlang, - smartset, + cmdutil, + commands, + extensions, + logcmdutil, + revsetlang, + smartset, ) -from mercurial.utils import ( - stringutil, -) +from mercurial.utils import stringutil + def logrevset(repo, pats, opts): revs = logcmdutil._initialrevs(repo, opts) @@ -19,6 +18,7 @@ match, pats, slowpath = logcmdutil._makematcher(repo, revs, pats, opts) return logcmdutil._makerevset(repo, match, pats, slowpath, opts) + def uisetup(ui): def printrevset(orig, repo, pats, opts): revs, filematcher = orig(repo, pats, opts) @@ -35,7 +35,14 @@ ui.write(stringutil.prettyrepr(revs) + b'\n') revs = smartset.baseset() # display no revisions return revs, filematcher + extensions.wrapfunction(logcmdutil, 'getrevs', printrevset) aliases, entry = cmdutil.findcmd(b'log', commands.table) - entry[1].append((b'', b'print-revset', False, - b'print generated revset and exit (DEPRECATED)')) + entry[1].append( + ( + b'', + b'print-revset', + False, + b'print generated revset and exit (DEPRECATED)', + ) + )