narrow: this code should assume REVIDX_FLAGS_ORDER exists
authorAugie Fackler <augie@google.com>
Mon, 29 Jan 2018 18:13:56 -0500
changeset 36082 adc8e1fe2f46
parent 36081 48c12b440b4a
child 36083 9772ef9f6c04
narrow: this code should assume REVIDX_FLAGS_ORDER exists Differential Revision: https://phab.mercurial-scm.org/D1977
hgext/narrow/narrowrevlog.py
--- a/hgext/narrow/narrowrevlog.py	Mon Jan 29 18:12:17 2018 -0500
+++ b/hgext/narrow/narrowrevlog.py	Mon Jan 29 18:13:56 2018 -0500
@@ -15,9 +15,8 @@
 
 ELLIPSIS_NODE_FLAG = 1 << 14
 revlog.REVIDX_KNOWN_FLAGS |= ELLIPSIS_NODE_FLAG
-if (util.safehasattr(revlog, 'REVIDX_FLAGS_ORDER') and
-    ELLIPSIS_NODE_FLAG not in revlog.REVIDX_FLAGS_ORDER):
-        revlog.REVIDX_FLAGS_ORDER.append(ELLIPSIS_NODE_FLAG)
+if ELLIPSIS_NODE_FLAG not in revlog.REVIDX_FLAGS_ORDER:
+    revlog.REVIDX_FLAGS_ORDER.append(ELLIPSIS_NODE_FLAG)
 
 def readtransform(self, text):
     return text, False