Mercurial > public > mercurial-scm > hg
diff mercurial/narrowspec.py @ 36470:d851951b421c
narrow: remove dependency from narrowspec module to hg module
Differential Revision: https://phab.mercurial-scm.org/D2493
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 27 Feb 2018 23:05:39 -0800 |
parents | 9fd8c2a3db5a |
children | fed6fe856333 |
line wrap: on
line diff
--- a/mercurial/narrowspec.py Wed Feb 28 10:32:00 2018 -0800 +++ b/mercurial/narrowspec.py Tue Feb 27 23:05:39 2018 -0800 @@ -12,7 +12,6 @@ from .i18n import _ from . import ( error, - hg, match as matchmod, util, ) @@ -129,8 +128,6 @@ return [i for i in includes if i.startswith('include:')] def load(repo): - if repo.shared(): - repo = hg.sharedreposource(repo) try: spec = repo.vfs.read(FILENAME) except IOError as e: @@ -146,8 +143,6 @@ def save(repo, includepats, excludepats): spec = format(includepats, excludepats) - if repo.shared(): - repo = hg.sharedreposource(repo) repo.vfs.write(FILENAME, spec) def restrictpatterns(req_includes, req_excludes, repo_includes, repo_excludes):