# HG changeset patch # User Gregory Szorc # Date 1537309931 25200 # Node ID a063786c89fb5c5bb4977fc2f1cdb7d278a50ced # Parent 7aa440222323281999feff346f10bd8f499e6048 narrow: remove narrowrevlog Core now automatically enables ellipsis support on revlogs when repositories have narrow enabled. So, we no longer need to globally register the revlog flag as part of activating the narrow extension and this code can be deleted. A side effect of this change is that repositories will now raise an error on encountering an ellipsis flag when the narrow extension is loaded. Previously, loading the narrow extension on a non-narrow repo could result in silent usage of the ellipsis flag. This could lead to undetected bugs. I think the new behavior is more correct. Differential Revision: https://phab.mercurial-scm.org/D4649 diff -r 7aa440222323 -r a063786c89fb hgext/narrow/TODO.rst --- a/hgext/narrow/TODO.rst Thu Sep 13 15:57:18 2018 -0700 +++ b/hgext/narrow/TODO.rst Tue Sep 18 15:32:11 2018 -0700 @@ -7,18 +7,11 @@ came up the import to hgext, but nobody's got concrete improvement ideas as of then. -Fold most (or preferably all) of narrowrevlog.py into core. - -Address commentary in narrowrevlog.excludedmanifestrevlog.add - +Address commentary in manifest.excludedmanifestrevlog.add - specifically we should improve the collaboration with core so that add() never gets called on an excluded directory and we can improve the stand-in to raise a ProgrammingError. -Figure out how to correctly produce narrowmanifestrevlog and -narrowfilelog instances instead of monkeypatching regular revlogs at -runtime to our subclass. Even better, merge the narrowing logic -directly into core. - Reason more completely about rename-filtering logic in narrowfilelog. There could be some surprises lurking there. diff -r 7aa440222323 -r a063786c89fb hgext/narrow/__init__.py --- a/hgext/narrow/__init__.py Thu Sep 13 15:57:18 2018 -0700 +++ b/hgext/narrow/__init__.py Tue Sep 18 15:32:11 2018 -0700 @@ -28,7 +28,6 @@ narrowcopies, narrowpatch, narrowrepo, - narrowrevlog, narrowtemplates, narrowwirepeer, ) @@ -58,7 +57,6 @@ def uisetup(ui): """Wraps user-facing mercurial commands with narrow-aware versions.""" localrepo.featuresetupfuncs.add(featuresetup) - narrowrevlog.setup() narrowbundle2.setup() narrowcommands.setup() narrowwirepeer.uisetup() diff -r 7aa440222323 -r a063786c89fb hgext/narrow/narrowrevlog.py --- a/hgext/narrow/narrowrevlog.py Thu Sep 13 15:57:18 2018 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ -# narrowrevlog.py - revlog storing irrelevant nodes as "ellipsis" nodes -# -# Copyright 2017 Google, Inc. -# -# This software may be used and distributed according to the terms of the -# GNU General Public License version 2 or any later version. - -from __future__ import absolute_import - -from mercurial import ( - revlog, -) - -revlog.addflagprocessor(revlog.REVIDX_ELLIPSIS, revlog.ellipsisprocessor) - -def setup(): - # We just wanted to add the flag processor, which is done at module - # load time. - pass