bug() revset now properly honors subset
authorGregory Szorc <gps@mozilla.com>
Thu, 07 Nov 2013 16:35:25 -0800
changeset 57 6529ee22dd53512f22ea84acf6a6e7ebe81b0669
parent 56 c3a579779e8842e53a281290070c0ba4f0e45445
child 58 e38832cd9dee8b1c070574080934b9c5cacb1072
push id38
push usergszorc@mozilla.com
push dateFri, 08 Nov 2013 00:35:39 +0000
bug() revset now properly honors subset
__init__.py
--- a/__init__.py
+++ b/__init__.py
@@ -611,17 +611,21 @@ 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)
 
-    return repo.changetracker.changesets_with_bug(n)
+    nodes = repo.changetracker.changesets_with_bug(n)
+    revs = [repo[node].rev() for node in nodes]
+
+    return [r for r in revs if r in subset]
+
 
 def extsetup(ui):
     global bz_available
     try:
         extensions.find('bzexport')
         bz_available = True
     except KeyError:
         pass