mercurial/localrepo.py
changeset 39849 d3d4b4b5f725
parent 39848 4ece3cdfd907
child 39850 d89d5bc06eaa
--- a/mercurial/localrepo.py	Wed Sep 19 17:05:59 2018 -0700
+++ b/mercurial/localrepo.py	Wed Sep 19 17:27:37 2018 -0700
@@ -2786,6 +2786,7 @@
         'narrowfiles',
         'sharedrepo',
         'sharedrelative',
+        'shareditems',
     }
 
     return {k: v for k, v in createopts.items() if k not in known}
@@ -2806,6 +2807,8 @@
        Boolean indicating if the path to the shared repo should be
        stored as relative. By default, the pointer to the "parent" repo
        is stored as an absolute path.
+    shareditems
+       Set of items to share to the new repository (in addition to storage).
     """
     createopts = createopts or {}
 
@@ -2867,6 +2870,10 @@
     if 'sharedrepo' in createopts:
         hgvfs.write(b'sharedpath', sharedpath)
 
+    if createopts.get('shareditems'):
+        shared = b'\n'.join(sorted(createopts['shareditems'])) + b'\n'
+        hgvfs.write(b'shared', shared)
+
 def poisonrepository(repo):
     """Poison a repository instance so it can no longer be used."""
     # Perform any cleanup on the instance.