Show More
@@ -6,10 +6,15 b'' | |||||
6 | '''share a common history between several working directories''' |
|
6 | '''share a common history between several working directories''' | |
7 |
|
7 | |||
8 | from mercurial.i18n import _ |
|
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 | testedwith = 'internal' |
|
13 | testedwith = 'internal' | |
12 |
|
14 | |||
|
15 | @command('share', | |||
|
16 | [('U', 'noupdate', None, _('do not create a working copy'))], | |||
|
17 | _('[-U] SOURCE [DEST]')) | |||
13 | def share(ui, source, dest=None, noupdate=False): |
|
18 | def share(ui, source, dest=None, noupdate=False): | |
14 | """create a new shared repository |
|
19 | """create a new shared repository | |
15 |
|
20 | |||
@@ -30,6 +35,7 b' def share(ui, source, dest=None, noupdat' | |||||
30 |
|
35 | |||
31 | return hg.share(ui, source, dest, not noupdate) |
|
36 | return hg.share(ui, source, dest, not noupdate) | |
32 |
|
37 | |||
|
38 | @command('unshare', [], '') | |||
33 | def unshare(ui, repo): |
|
39 | def unshare(ui, repo): | |
34 | """convert a shared repository to a normal one |
|
40 | """convert a shared repository to a normal one | |
35 |
|
41 | |||
@@ -61,15 +67,4 b' def unshare(ui, repo):' | |||||
61 | # update store, spath, sopener and sjoin of repo |
|
67 | # update store, spath, sopener and sjoin of repo | |
62 | repo.unfiltered().__init__(repo.baseui, repo.root) |
|
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 | commands.norepo += " share" |
|
70 | commands.norepo += " share" |
General Comments 0
You need to be logged in to leave comments.
Login now