Mercurial > public > mercurial-scm > hg-stable
diff mercurial/hg.py @ 23614:cd79fb4d75fd
share: add option to share bookmarks
This patch adds the -B/--bookmarks option to the share command added by the
share extension. All it does for now is create a marker, 'bookmarks.shared',
that will be used by future code to implement the sharing functionality.
author | Ryan McElroy <rmcelroy@fb.com> |
---|---|
date | Sat, 13 Dec 2014 11:32:46 -0800 |
parents | 68c434799559 |
children | 7cc77030c557 |
line wrap: on
line diff
--- a/mercurial/hg.py Wed Dec 17 13:25:24 2014 -0600 +++ b/mercurial/hg.py Sat Dec 13 11:32:46 2014 -0800 @@ -158,7 +158,7 @@ return '' return os.path.basename(os.path.normpath(path)) -def share(ui, source, dest=None, update=True): +def share(ui, source, dest=None, update=True, bookmarks=True): '''create a shared repository''' if not islocal(source): @@ -225,6 +225,9 @@ continue _update(r, uprev) + if bookmarks: + r.opener('bookmarks.shared', 'w').close() + def copystore(ui, srcrepo, destpath): '''copy files from store of srcrepo in destpath