D1978: narrow: assume addflagprocessor will always exist on revlog module

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Thu Feb 1 18:00:39 EST 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/D1978

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
@@ -27,9 +27,8 @@
 def rawtransform(self, text):
     return False
 
-if util.safehasattr(revlog, 'addflagprocessor'):
-    revlog.addflagprocessor(ELLIPSIS_NODE_FLAG,
-                            (readtransform, writetransform, rawtransform))
+revlog.addflagprocessor(ELLIPSIS_NODE_FLAG,
+                        (readtransform, writetransform, rawtransform))
 
 def setup():
     # We just wanted to add the flag processor, which is done at module



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


More information about the Mercurial-devel mailing list