Mercurial > public > mercurial-scm > hg-stable
diff mercurial/setdiscovery.py @ 46841:e7b4607d52e3
setdiscovery: simplify by using tiprev directly
tip() uses tiprev() and reads the node from it, so drop a layer of
indirection.
Differential Revision: https://phab.mercurial-scm.org/D10289
author | Joerg Sonnenberger <joerg@bec.de> |
---|---|
date | Mon, 29 Mar 2021 01:35:54 +0200 |
parents | 2b1b8f3e6510 |
children | d55b71393907 |
line wrap: on
line diff
--- a/mercurial/setdiscovery.py Sun Mar 28 19:50:37 2021 +0200 +++ b/mercurial/setdiscovery.py Mon Mar 29 01:35:54 2021 +0200 @@ -390,7 +390,7 @@ if audit is not None: audit[b'total-roundtrips'] = 1 - if cl.tip() == nullid: + if cl.tiprev() == nullrev: if srvheadhashes != [nullid]: return [nullid], True, srvheadhashes return [nullid], False, []