Mercurial > hg
comparison mercurial/bundle2.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 | 2d835c42ab41 |
children | 566daffc607d |
comparison
equal
deleted
inserted
replaced
42001:624d6683c705 | 42002:662ffdde5adf |
---|---|
1978 # trigger a transaction so that we are guaranteed to have the lock now. | 1978 # trigger a transaction so that we are guaranteed to have the lock now. |
1979 if op.ui.configbool('experimental', 'bundle2lazylocking'): | 1979 if op.ui.configbool('experimental', 'bundle2lazylocking'): |
1980 op.gettransaction() | 1980 op.gettransaction() |
1981 | 1981 |
1982 currentheads = set() | 1982 currentheads = set() |
1983 for ls in op.repo.branchmap().itervalues(): | 1983 for ls in op.repo.branchmap().iterheads(): |
1984 currentheads.update(ls) | 1984 currentheads.update(ls) |
1985 | 1985 |
1986 for h in heads: | 1986 for h in heads: |
1987 if h not in currentheads: | 1987 if h not in currentheads: |
1988 raise error.PushRaced('remote repository changed while pushing - ' | 1988 raise error.PushRaced('remote repository changed while pushing - ' |