changeset 42805:bf070a59546a

revlog: move `nullid` early return sooner in `_revisiondata` Let us deal with the special case before we start dealing with more generic case.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 07 Aug 2019 23:52:55 +0200
parents 2eec53a99ec1
children 616aa62e5027
files mercurial/revlog.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revlog.py	Wed Aug 07 23:48:54 2019 +0200
+++ b/mercurial/revlog.py	Wed Aug 07 23:52:55 2019 +0200
@@ -1618,12 +1618,13 @@
             node = nodeorrev
             rev = None
 
+        if node == nullid:
+            return ""
+
         cachedrev = None
         flags = None
         rawtext = None
         basetext = None
-        if node == nullid:
-            return ""
         if self._revisioncache:
             if self._revisioncache[0] == node:
                 # _cache only stores rawtext