Mercurial > public > mercurial-scm > hg
diff mercurial/scmutil.py @ 39894:d739f423bf06
repo: look up nullrev context by revnum, not symbolic name
I think lookup of the 'null' symbol should be done via
scmutil.revsymbol() and repo['null'] is only supported for historical
reasons. However, repo[nullrev] is fine, so we can switch to that
instead of switching to scmutil.revsymbol('null').
Differential Revision: https://phab.mercurial-scm.org/D4780
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Wed, 26 Sep 2018 22:17:34 -0700 |
parents | b99903534e06 |
children | a477679f6323 |
line wrap: on
line diff
--- a/mercurial/scmutil.py Wed Sep 26 22:17:26 2018 -0700 +++ b/mercurial/scmutil.py Wed Sep 26 22:17:34 2018 -0700 @@ -21,6 +21,7 @@ bin, hex, nullid, + nullrev, short, wdirid, wdirrev, @@ -730,7 +731,7 @@ if len(parents) > 1: return parents if repo.ui.debugflag: - return [parents[0], repo['null']] + return [parents[0], repo[nullrev]] if parents[0].rev() >= intrev(ctx) - 1: return [] return parents