mercurial/localrepo.py
changeset 31133 23080c03a604
parent 31111 95ec3ad62f62
child 31144 afcc4b4a0826
--- a/mercurial/localrepo.py	Wed Feb 15 11:49:12 2017 -0800
+++ b/mercurial/localrepo.py	Mon Feb 13 14:05:24 2017 +0100
@@ -244,7 +244,7 @@
     supportedformats = set(('revlogv1', 'generaldelta', 'treemanifest',
                             'manifestv2'))
     _basesupported = supportedformats | set(('store', 'fncache', 'shared',
-                                             'dotencode'))
+                                             'relshared', 'dotencode'))
     openerreqs = set(('revlogv1', 'generaldelta', 'treemanifest', 'manifestv2'))
     filtername = None
 
@@ -325,8 +325,11 @@
 
         self.sharedpath = self.path
         try:
-            vfs = scmutil.vfs(self.vfs.read("sharedpath").rstrip('\n'),
-                              realpath=True)
+            sharedpath = self.vfs.read("sharedpath").rstrip('\n')
+            if 'relshared' in self.requirements:
+                sharedpath = self.vfs.join(sharedpath)
+            vfs = scmutil.vfs(sharedpath, realpath=True)
+
             s = vfs.base
             if not vfs.exists():
                 raise error.RepoError(