hgext/narrow/narrowspec.py
changeset 36159 0fe7e39dc683
parent 36100 8fd0a9e2d7e9
--- a/hgext/narrow/narrowspec.py	Mon Feb 12 15:49:15 2018 -0800
+++ b/hgext/narrow/narrowspec.py	Mon Feb 12 16:15:34 2018 -0800
@@ -12,14 +12,11 @@
 from mercurial.i18n import _
 from mercurial import (
     error,
+    hg,
     match as matchmod,
     util,
 )
 
-from .. import (
-    share,
-)
-
 FILENAME = 'narrowspec'
 
 def _parsestoredpatterns(text):
@@ -133,7 +130,7 @@
 
 def load(repo):
     if repo.shared():
-        repo = share._getsrcrepo(repo)
+        repo = hg.sharedreposource(repo)
     try:
         spec = repo.vfs.read(FILENAME)
     except IOError as e:
@@ -150,7 +147,7 @@
 def save(repo, includepats, excludepats):
     spec = format(includepats, excludepats)
     if repo.shared():
-        repo = share._getsrcrepo(repo)
+        repo = hg.sharedreposource(repo)
     repo.vfs.write(FILENAME, spec)
 
 def restrictpatterns(req_includes, req_excludes, repo_includes, repo_excludes):