Mercurial > public > mercurial-scm > hg-stable
diff hgext/narrow/narrowspec.py @ 36197:0fe7e39dc683
hg: move share._getsrcrepo into core
The fact we were calling this from extensions was a sign that it
should live in core.
We were also able to remove some extra attribute aliases from the
share extension.
Differential Revision: https://phab.mercurial-scm.org/D2200
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 12 Feb 2018 16:15:34 -0800 |
parents | 8fd0a9e2d7e9 |
children |
line wrap: on
line diff
--- 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):