[PATCH 3 of 5] revsets: use itervalues() where only values are needed
Martin von Zweigbergk
martinvonz at google.com
Fri Jun 24 18:10:15 EDT 2016
# HG changeset patch
# User Martin von Zweigbergk <martinvonz at google.com>
# Date 1466712490 25200
# Thu Jun 23 13:08:10 2016 -0700
# Node ID 4fc03f313a06f6f1ba9638d2692351de064e8482
# Parent 452eef4be6b5acbde6b0fd988f6aab27a1c144d1
revsets: use itervalues() where only values are needed
I don't think there will be a noticeable speedup, but it removes an
unused variable.
diff -r 452eef4be6b5 -r 4fc03f313a06 mercurial/revset.py
--- a/mercurial/revset.py Thu Jun 23 13:08:08 2016 -0700
+++ b/mercurial/revset.py Thu Jun 23 13:08:10 2016 -0700
@@ -1143,7 +1143,7 @@
getargs(x, 0, 0, _("head takes no arguments"))
hs = set()
cl = repo.changelog
- for b, ls in repo.branchmap().iteritems():
+ for ls in repo.branchmap().itervalues():
hs.update(cl.rev(h) for h in ls)
# XXX We should combine with subset first: 'subset & baseset(...)'. This is
# necessary to ensure we preserve the order in subset.
More information about the Mercurial-devel
mailing list