2009-06-14 03:01:48 +04:00
|
|
|
# Copyright 2006, 2007 Matt Mackall <mpm@selenic.com>
|
|
|
|
#
|
|
|
|
# This software may be used and distributed according to the terms of the
|
|
|
|
# GNU General Public License version 2, incorporated herein by reference.
|
|
|
|
|
2009-06-22 17:48:08 +04:00
|
|
|
'''share a common history between several working directories'''
|
2009-06-21 18:45:47 +04:00
|
|
|
|
2009-06-14 03:01:48 +04:00
|
|
|
from mercurial.i18n import _
|
|
|
|
from mercurial import hg, commands
|
|
|
|
|
2009-06-14 03:16:44 +04:00
|
|
|
def share(ui, source, dest=None, noupdate=False):
|
2009-06-14 03:01:48 +04:00
|
|
|
"""create a new shared repository (experimental)
|
|
|
|
|
2009-07-26 04:01:19 +04:00
|
|
|
Initialize a new repository and working directory that shares its
|
|
|
|
history with another repository.
|
2009-06-14 03:01:48 +04:00
|
|
|
|
2009-07-26 04:01:19 +04:00
|
|
|
NOTE: actions that change history such as rollback or moving the
|
|
|
|
source may confuse sharers.
|
2009-06-14 03:01:48 +04:00
|
|
|
"""
|
|
|
|
|
|
|
|
return hg.share(ui, source, dest, not noupdate)
|
|
|
|
|
|
|
|
cmdtable = {
|
|
|
|
"share":
|
|
|
|
(share,
|
|
|
|
[('U', 'noupdate', None, _('do not create a working copy'))],
|
2009-06-14 03:16:44 +04:00
|
|
|
_('[-U] SOURCE [DEST]')),
|
2009-06-14 03:01:48 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
commands.norepo += " share"
|