5 # This software may be used and distributed according to the terms of the |
5 # This software may be used and distributed according to the terms of the |
6 # GNU General Public License version 2 or any later version. |
6 # GNU General Public License version 2 or any later version. |
7 |
7 |
8 """recreates hardlinks between repository clones""" |
8 """recreates hardlinks between repository clones""" |
9 |
9 |
10 from mercurial import hg, util |
10 from mercurial import cmdutil, hg, util |
11 from mercurial.i18n import _ |
11 from mercurial.i18n import _ |
12 import os, stat |
12 import os, stat |
13 |
13 |
|
14 cmdtable = {} |
|
15 command = cmdutil.command(cmdtable) |
14 testedwith = 'internal' |
16 testedwith = 'internal' |
15 |
17 |
|
18 @command('relink', [], _('[ORIGIN]')) |
16 def relink(ui, repo, origin=None, **opts): |
19 def relink(ui, repo, origin=None, **opts): |
17 """recreate hardlinks between two repositories |
20 """recreate hardlinks between two repositories |
18 |
21 |
19 When repositories are cloned locally, their data files will be |
22 When repositories are cloned locally, their data files will be |
20 hardlinked so that they only use the space of a single repository. |
23 hardlinked so that they only use the space of a single repository. |