diff hgext/journal.py @ 36159: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 386c1e45e671
children c6061cadb400
line wrap: on
line diff
--- a/hgext/journal.py	Mon Feb 12 15:49:15 2018 -0800
+++ b/hgext/journal.py	Mon Feb 12 16:15:34 2018 -0800
@@ -36,8 +36,6 @@
     util,
 )
 
-from . import share
-
 cmdtable = {}
 command = registrar.command(cmdtable)
 
@@ -169,7 +167,7 @@
     """Copy shared journal entries into this repo when unsharing"""
     if (repo.path == repopath and repo.shared() and
             util.safehasattr(repo, 'journal')):
-        sharedrepo = share._getsrcrepo(repo)
+        sharedrepo = hg.sharedreposource(repo)
         sharedfeatures = _readsharedfeatures(repo)
         if sharedrepo and sharedfeatures > {'journal'}:
             # there is a shared repository and there are shared journal entries
@@ -258,7 +256,7 @@
         self.sharedfeatures = self.sharedvfs = None
         if repo.shared():
             features = _readsharedfeatures(repo)
-            sharedrepo = share._getsrcrepo(repo)
+            sharedrepo = hg.sharedreposource(repo)
             if sharedrepo is not None and 'journal' in features:
                 self.sharedvfs = sharedrepo.vfs
                 self.sharedfeatures = features