comparison mercurial/revset.py @ 29407:20fabe814f89

revsets: use itervalues() where only values are needed I don't think there will be a noticeable speedup, but it removes an unused variable.
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 23 Jun 2016 13:08:10 -0700
parents c2193e59ef9f
children 785cadec2091
comparison
equal deleted inserted replaced
29406:c2193e59ef9f 29407:20fabe814f89
1143 """ 1143 """
1144 # i18n: "head" is a keyword 1144 # i18n: "head" is a keyword
1145 getargs(x, 0, 0, _("head takes no arguments")) 1145 getargs(x, 0, 0, _("head takes no arguments"))
1146 hs = set() 1146 hs = set()
1147 cl = repo.changelog 1147 cl = repo.changelog
1148 for b, ls in repo.branchmap().iteritems(): 1148 for ls in repo.branchmap().itervalues():
1149 hs.update(cl.rev(h) for h in ls) 1149 hs.update(cl.rev(h) for h in ls)
1150 # XXX We should combine with subset first: 'subset & baseset(...)'. This is 1150 # XXX We should combine with subset first: 'subset & baseset(...)'. This is
1151 # necessary to ensure we preserve the order in subset. 1151 # necessary to ensure we preserve the order in subset.
1152 return baseset(hs) & subset 1152 return baseset(hs) & subset
1153 1153