changeset 19916:fb583a1efef0

mq: refactor usage of repo.branchmap().iteritems() with itervalues()
author Brodie Rao <brodie@sf.io>
date Mon, 01 Apr 2013 20:01:16 -0700
parents 1989111687a3
children cff331cbb5ee
files hgext/mq.py
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/mq.py	Sat Oct 19 14:21:05 2013 -0700
+++ b/hgext/mq.py	Mon Apr 01 20:01:16 2013 -0700
@@ -1204,9 +1204,7 @@
         diffopts = self.diffopts()
         wlock = repo.wlock()
         try:
-            heads = []
-            for b, ls in repo.branchmap().iteritems():
-                heads += ls
+            heads = [h for hs in repo.branchmap().itervalues() for h in hs]
             if not heads:
                 heads = [nullid]
             if repo.dirstate.p1() not in heads and not exact: