comparison mercurial/revset.py @ 42002:662ffdde5adf

branchcache: rename itervalues() to iterheads() The itervalues() exists because branchcache() had a dict interface. Since it no longer has a dict interface, it makes sense to have better function names. If a person does not understand how branchcache stores info, it will be hard for them to guess what itervalues() does. Differential Revision: https://phab.mercurial-scm.org/D6152
author Pulkit Goyal <pulkit@yandex-team.ru>
date Mon, 18 Mar 2019 19:01:29 +0300
parents 5fe4de392edb
children 0bd730fbcc2b
comparison
equal deleted inserted replaced
42001:624d6683c705 42002:662ffdde5adf
1238 """ 1238 """
1239 # i18n: "head" is a keyword 1239 # i18n: "head" is a keyword
1240 getargs(x, 0, 0, _("head takes no arguments")) 1240 getargs(x, 0, 0, _("head takes no arguments"))
1241 hs = set() 1241 hs = set()
1242 cl = repo.changelog 1242 cl = repo.changelog
1243 for ls in repo.branchmap().itervalues(): 1243 for ls in repo.branchmap().iterheads():
1244 hs.update(cl.rev(h) for h in ls) 1244 hs.update(cl.rev(h) for h in ls)
1245 return subset & baseset(hs) 1245 return subset & baseset(hs)
1246 1246
1247 @predicate('heads(set)', safe=True, takeorder=True) 1247 @predicate('heads(set)', safe=True, takeorder=True)
1248 def heads(repo, subset, x, order): 1248 def heads(repo, subset, x, order):