diff mercurial/archival.py @ 39899: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 1a2ff11e8a88
children 844deb408a5b
line wrap: on
line diff
--- a/mercurial/archival.py	Wed Sep 26 22:17:26 2018 -0700
+++ b/mercurial/archival.py	Wed Sep 26 22:17:34 2018 -0700
@@ -16,6 +16,9 @@
 import zlib
 
 from .i18n import _
+from .node import (
+    nullrev,
+)
 
 from . import (
     error,
@@ -76,7 +79,7 @@
     # repo[0] may be hidden
     for rev in repo:
         return repo[rev]
-    return repo['null']
+    return repo[nullrev]
 
 # {tags} on ctx includes local tags and 'tip', with no current way to limit
 # that to global tags.  Therefore, use {latesttag} as a substitute when