Mercurial > public > mercurial-scm > hg-stable
diff mercurial/commands.py @ 14511:30506b894359
filesets: introduce basic fileset expression parser
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 01 Jun 2011 19:12:18 -0500 |
parents | 4f695345979c |
children | e7a1814854b9 |
line wrap: on
line diff
--- a/mercurial/commands.py Thu Jun 02 00:43:34 2011 +0300 +++ b/mercurial/commands.py Wed Jun 01 19:12:18 2011 -0500 @@ -13,7 +13,7 @@ import patch, help, url, encoding, templatekw, discovery import archival, changegroup, cmdutil, sshserver, hbisect, hgweb, hgweb.server import merge as mergemod -import minirst, revset +import minirst, revset, fileset import dagparser, context, simplemerge import random, setdiscovery, treediscovery, dagutil @@ -1597,6 +1597,13 @@ localrevs = opts.get('local_head') doit(localrevs, remoterevs) +@command('debugfileset', [], ('REVSPEC')) +def debugfileset(ui, repo, expr): + '''parse and apply a fileset specification''' + if ui.verbose: + tree = fileset.parse(expr)[0] + ui.note(tree, "\n") + @command('debugfsinfo', [], _('[PATH]')) def debugfsinfo(ui, path = "."): """show information detected about current filesystem"""