mercurial/commands.py
branchstable
changeset 17370 3fe199579323
parent 17343 e560ecb755fe
child 17376 3738d6254bd3
child 17386 45b5eb2941d0
--- 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]'))