1 # Copyright 2006, 2007 Matt Mackall <mpm@selenic.com>
3 # This software may be used and distributed according to the terms of the
4 # GNU General Public License version 2, incorporated herein by reference.
6 '''share a common history between several working directories'''
8 from mercurial.i18n import _
9 from mercurial import hg, commands
11 def share(ui, source, dest=None, noupdate=False):
12 """create a new shared repository (experimental)
14 Initialize a new repository and working directory that shares its
15 history with another repository.
17 NOTE: actions that change history such as rollback or moving the
18 source may confuse sharers.
21 return hg.share(ui, source, dest, not noupdate)
26 [('U', 'noupdate', None, _('do not create a working copy'))],
27 _('[-U] SOURCE [DEST]')),
30 commands.norepo += " share"