Patchwork [2,of,2] narrow: remove hack to write narrowspec to shared .hg directory

login
register
mail settings
Submitter Yuya Nishihara
Date Sept. 12, 2018, 1:31 p.m.
Message ID <7934af554124813b0a2b.1536759074@mimosa>
Download mbox | patch
Permalink /patch/34538/
State Accepted
Headers show

Comments

Yuya Nishihara - Sept. 12, 2018, 1:31 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1536758369 -32400
#      Wed Sep 12 22:19:29 2018 +0900
# Node ID 7934af554124813b0a2bda1a9437a519ab3c04f1
# Parent  c8ea5c7ec99d1ca4f349025c236c768081dd5084
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."

Patch

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -841,11 +841,7 @@  class localrepository(object):
         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):