bug() revset should parse bugs at run-time
authorGregory Szorc <gps@mozilla.com>
Mon, 18 Nov 2013 13:38:04 -0800
changeset 85 a791d156bdde
parent 84 2948a807c49c
child 86 d1eddd779220
push id62
push usergszorc@mozilla.com
push date2013-11-18 21:38 +0000
bug() revset should parse bugs at run-time
__init__.py
--- a/__init__.py
+++ b/__init__.py
@@ -754,20 +754,17 @@ def revset_bug(repo, subset, x):
     err = _('bug() requires an integer argument.')
     n = revset.getstring(x, err)
 
     try:
         n = int(n)
     except Exception:
         raise ParseError(err)
 
-    nodes = repo.changetracker.changesets_with_bug(n)
-    revs = set(repo[node].rev() for node in nodes)
-
-    return [r for r in subset if r in revs]
+    return [r for r in subset if n in parse_bugs(repo[r].description())]
 
 
 def revset_dontbuild(repo, subset, x):
     if x:
         raise ParseError(_('dontbuild() does not take any arguments'))
 
     return [r for r in subset if 'DONTBUILD' in repo[r].description()]