Mercurial > public > mercurial-scm > hg
diff mercurial/commands.py @ 17370:3fe199579323 stable
debugfileset: implement --rev, more tests
author | Patrick Mezard <patrick@mezard.eu> |
---|---|
date | Wed, 15 Aug 2012 22:28:32 +0200 |
parents | e560ecb755fe |
children | 3738d6254bd3 45b5eb2941d0 |
line wrap: on
line diff
--- a/mercurial/commands.py Wed Aug 15 22:09:09 2012 +0200 +++ b/mercurial/commands.py Wed Aug 15 22:28:32 2012 +0200 @@ -1847,14 +1847,17 @@ localrevs = opts.get('local_head') doit(localrevs, remoterevs) -@command('debugfileset', [], ('REVSPEC')) -def debugfileset(ui, repo, expr): +@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)[0] ui.note(tree, "\n") - for f in fileset.getfileset(repo[None], expr): + for f in fileset.getfileset(ctx, expr): ui.write("%s\n" % f) @command('debugfsinfo', [], _('[PATH]'))