hgext/share.py
changeset 23614 cd79fb4d75fd
parent 23548 141baca16059
child 23625 3a8a85469ee8
--- a/hgext/share.py	Wed Dec 17 13:25:24 2014 -0600
+++ b/hgext/share.py	Sat Dec 13 11:32:46 2014 -0800
@@ -15,14 +15,15 @@
 testedwith = 'internal'
 
 @command('share',
-    [('U', 'noupdate', None, _('do not create a working copy'))],
-    _('[-U] SOURCE [DEST]'),
+    [('U', 'noupdate', None, _('do not create a working copy')),
+     ('B', 'bookmarks', None, _('also share bookmarks'))],
+    _('[-U] [-B] SOURCE [DEST]'),
     norepo=True)
-def share(ui, source, dest=None, noupdate=False):
+def share(ui, source, dest=None, noupdate=False, bookmarks=False):
     """create a new shared repository
 
     Initialize a new repository and working directory that shares its
-    history with another repository.
+    history (and optionally bookmarks) with another repository.
 
     .. note::
 
@@ -36,7 +37,7 @@
        the broken clone to reset it to a changeset that still exists.
     """
 
-    return hg.share(ui, source, dest, not noupdate)
+    return hg.share(ui, source, dest, not noupdate, bookmarks)
 
 @command('unshare', [], '')
 def unshare(ui, repo):