]> git.lizzy.rs Git - plan9front.git/blob - sys/lib/python/hgext/share.py
hgwebfs: simplify retry loop construction
[plan9front.git] / sys / lib / python / hgext / share.py
1 # Copyright 2006, 2007 Matt Mackall <mpm@selenic.com>
2 #
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.
5
6 '''share a common history between several working directories'''
7
8 from mercurial.i18n import _
9 from mercurial import hg, commands
10
11 def share(ui, source, dest=None, noupdate=False):
12     """create a new shared repository (experimental)
13
14     Initialize a new repository and working directory that shares its
15     history with another repository.
16
17     NOTE: actions that change history such as rollback or moving the
18     source may confuse sharers.
19     """
20
21     return hg.share(ui, source, dest, not noupdate)
22
23 cmdtable = {
24     "share":
25     (share,
26      [('U', 'noupdate', None, _('do not create a working copy'))],
27      _('[-U] SOURCE [DEST]')),
28 }
29
30 commands.norepo += " share"