mirror of
https://github.com/facebook/sapling.git
synced 2024-10-08 15:57:43 +03:00
dbcec5595d
Trying as much as possible to consistently: - use a present tense predicate followed by a direct object - verb referring directly to the functionality provided (ie. not "add command that does this" but simple "do that") - keep simple and to the point, leaving details for the long help (width is tight, possibly even more so for translations) Thanks to timeless, Martin Geisler, Rafael Villar Burke, Dan Villiom Podlaski Christiansen and others for the helpful suggestions.
32 lines
888 B
Python
32 lines
888 B
Python
# 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.
|
|
|
|
'''share a common history between several working directories'''
|
|
|
|
import os
|
|
from mercurial.i18n import _
|
|
from mercurial import hg, commands
|
|
|
|
def share(ui, source, dest=None, noupdate=False):
|
|
"""create a new shared repository (experimental)
|
|
|
|
Initialize a new repository and working directory that shares its
|
|
history with another repository.
|
|
|
|
NOTE: actions that change history such as rollback or moving the
|
|
source may confuse sharers.
|
|
"""
|
|
|
|
return hg.share(ui, source, dest, not noupdate)
|
|
|
|
cmdtable = {
|
|
"share":
|
|
(share,
|
|
[('U', 'noupdate', None, _('do not create a working copy'))],
|
|
_('[-U] SOURCE [DEST]')),
|
|
}
|
|
|
|
commands.norepo += " share"
|