changeset 39557:623081f2abc2

narrow: remove hack to write narrowspec to shared .hg directory AFAIK, we no longer need it since the narrowspec file was move to the store directory in 576eef1ab43d, "narrow: move .hg/narrowspec to .hg/store/narrowspec."
author Yuya Nishihara <yuya@tcha.org>
date Wed, 12 Sep 2018 22:19:29 +0900
parents c8ea5c7ec99d
children b0e0db1565d1
files mercurial/localrepo.py
diffstat 1 files changed, 1 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Wed Sep 12 22:15:43 2018 +0900
+++ b/mercurial/localrepo.py	Wed Sep 12 22:19:29 2018 +0900
@@ -841,11 +841,7 @@
         return self._narrowmatch
 
     def setnarrowpats(self, newincludes, newexcludes):
-        target = self
-        if self.shared():
-            from . import hg
-            target = hg.sharedreposource(self)
-        narrowspec.save(target, newincludes, newexcludes)
+        narrowspec.save(self, newincludes, newexcludes)
         self.invalidate(clearfilecache=True)
 
     def __getitem__(self, changeid):