##// END OF EJS Templates
share: declare commands using decorator
Gregory Szorc -
r21253:d2ce7a20 default
parent child Browse files
Show More
@@ -6,10 +6,15 b''
6 6 '''share a common history between several working directories'''
7 7
8 8 from mercurial.i18n import _
9 from mercurial import hg, commands, util
9 from mercurial import cmdutil, hg, commands, util
10 10
11 cmdtable = {}
12 command = cmdutil.command(cmdtable)
11 13 testedwith = 'internal'
12 14
15 @command('share',
16 [('U', 'noupdate', None, _('do not create a working copy'))],
17 _('[-U] SOURCE [DEST]'))
13 18 def share(ui, source, dest=None, noupdate=False):
14 19 """create a new shared repository
15 20
@@ -30,6 +35,7 b' def share(ui, source, dest=None, noupdat'
30 35
31 36 return hg.share(ui, source, dest, not noupdate)
32 37
38 @command('unshare', [], '')
33 39 def unshare(ui, repo):
34 40 """convert a shared repository to a normal one
35 41
@@ -61,15 +67,4 b' def unshare(ui, repo):'
61 67 # update store, spath, sopener and sjoin of repo
62 68 repo.unfiltered().__init__(repo.baseui, repo.root)
63 69
64 cmdtable = {
65 "share":
66 (share,
67 [('U', 'noupdate', None, _('do not create a working copy'))],
68 _('[-U] SOURCE [DEST]')),
69 "unshare":
70 (unshare,
71 [],
72 ''),
73 }
74
75 70 commands.norepo += " share"
General Comments 0
You need to be logged in to leave comments. Login now