comparison hgext/share.py @ 8801:28eaf6f8abce

share: add experimental share extension
author Matt Mackall <mpm@selenic.com>
date Sat, 13 Jun 2009 18:01:48 -0500
parents
children 8bf6eb68ddaf
comparison
equal deleted inserted replaced
8800:971e38a9344b 8801:28eaf6f8abce
1 # Mercurial extension to provide the 'hg share' command
2 #
3 # Copyright 2006, 2007 Matt Mackall <mpm@selenic.com>
4 #
5 # This software may be used and distributed according to the terms of the
6 # GNU General Public License version 2, incorporated herein by reference.
7
8 import os
9 from mercurial.i18n import _
10 from mercurial import hg, commands
11
12 def share(ui, source, dest, noupdate=False):
13 """create a new shared repository (experimental)
14
15 Initialize a new repository and working directory that shares its
16 history with another repository.
17
18 NOTE: actions that change history such as rollback or moving the
19 source may confuse sharers.
20 """
21
22 return hg.share(ui, source, dest, not noupdate)
23
24 cmdtable = {
25 "share":
26 (share,
27 [('U', 'noupdate', None, _('do not create a working copy'))],
28 _('[-U] SOURCE DEST')),
29 }
30
31 commands.norepo += " share"