# HG changeset patch # User Gregory Szorc # Date 1471492677 25200 # Node ID 1ee358c3ed266f604b9fd1f1939dc4f3bc7c95cd # Parent 726d30a6d89ba2ade0447db232ab34a8b36ccb01 debugcommands: move 'debugfileset' in the new module diff -r 726d30a6d89b -r 1ee358c3ed26 mercurial/commands.py --- a/mercurial/commands.py Wed Nov 23 17:36:35 2016 +0000 +++ b/mercurial/commands.py Wed Aug 17 20:57:57 2016 -0700 @@ -41,7 +41,6 @@ error, exchange, extensions, - fileset, formatter, graphmod, hbisect, @@ -1859,19 +1858,6 @@ with repo.wlock(False): return cmdutil.copy(ui, repo, pats, opts) -@command('debugfileset', - [('r', 'rev', '', _('apply the filespec on this revision'), _('REV'))], - _('[-r REV] FILESPEC')) -def debugfileset(ui, repo, expr, **opts): - '''parse and apply a fileset specification''' - ctx = scmutil.revsingle(repo, opts.get('rev'), None) - if ui.verbose: - tree = fileset.parse(expr) - ui.note(fileset.prettyformat(tree), "\n") - - for f in ctx.getfileset(expr): - ui.write("%s\n" % f) - @command('debugfsinfo', [], _('[PATH]'), norepo=True) def debugfsinfo(ui, path="."): """show information detected about current filesystem""" diff -r 726d30a6d89b -r 1ee358c3ed26 mercurial/debugcommands.py --- a/mercurial/debugcommands.py Wed Nov 23 17:36:35 2016 +0000 +++ b/mercurial/debugcommands.py Wed Aug 17 20:57:57 2016 -0700 @@ -26,6 +26,7 @@ error, exchange, extensions, + fileset, hg, localrepo, lock as lockmod, @@ -571,3 +572,16 @@ _(' bug reporting: %s\n'), extbuglink or "") fm.end() + +@command('debugfileset', + [('r', 'rev', '', _('apply the filespec on this revision'), _('REV'))], + _('[-r REV] FILESPEC')) +def debugfileset(ui, repo, expr, **opts): + '''parse and apply a fileset specification''' + ctx = scmutil.revsingle(repo, opts.get('rev'), None) + if ui.verbose: + tree = fileset.parse(expr) + ui.note(fileset.prettyformat(tree), "\n") + + for f in ctx.getfileset(expr): + ui.write("%s\n" % f)