bug() revset should parse bugs at run-time
authorGregory Szorc <gps@mozilla.com>
Mon, 18 Nov 2013 13:38:04 -0800
changeset 358620 e5cd165dd0cc770284bd9dfd9d8704ca618a2485
parent 358619 c271e98faade5ff31bf10f40c67e984c8b2e54c6
child 358621 5fb3dda9a9925996d7d6ff6cfe5a12c0a2677f8b
push id16998
push userrwood@mozilla.com
push dateMon, 02 May 2016 19:42:03 +0000
bug() revset should parse bugs at run-time
hgext/mozext/__init__.py
--- a/hgext/mozext/__init__.py
+++ b/hgext/mozext/__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()]