D1977: narrow: this code should assume REVIDX_FLAGS_ORDER exists

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Thu Feb 1 23:00:33 UTC 2018


durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1977

AFFECTED FILES
  hgext/narrow/narrowrevlog.py

CHANGE DETAILS

diff --git a/hgext/narrow/narrowrevlog.py b/hgext/narrow/narrowrevlog.py
--- a/hgext/narrow/narrowrevlog.py
+++ b/hgext/narrow/narrowrevlog.py
@@ -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



To: durin42, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list