Show More
@@ -19,7 +19,10 b' from mercurial import (' | |||||
19 | registrar, |
|
19 | registrar, | |
20 | util, |
|
20 | util, | |
21 | ) |
|
21 | ) | |
22 |
from mercurial.utils import |
|
22 | from mercurial.utils import ( | |
|
23 | stringutil, | |||
|
24 | urlutil, | |||
|
25 | ) | |||
23 |
|
26 | |||
24 | cmdtable = {} |
|
27 | cmdtable = {} | |
25 | command = registrar.command(cmdtable) |
|
28 | command = registrar.command(cmdtable) | |
@@ -62,10 +65,11 b' def relink(ui, repo, origin=None, **opts' | |||||
62 | util, b'samedevice' |
|
65 | util, b'samedevice' | |
63 | ): |
|
66 | ): | |
64 | raise error.Abort(_(b'hardlinks are not supported on this system')) |
|
67 | raise error.Abort(_(b'hardlinks are not supported on this system')) | |
65 | src = hg.repository( |
|
68 | ||
66 | repo.baseui, |
|
69 | if origin is None and b'default-relink' in ui.paths: | |
67 |
|
|
70 | origin = b'default-relink' | |
68 | ) |
|
71 | path, __ = urlutil.get_unique_pull_path(b'relink', repo, ui, origin) | |
|
72 | src = hg.repository(repo.baseui, path) | |||
69 | ui.status(_(b'relinking %s to %s\n') % (src.store.path, repo.store.path)) |
|
73 | ui.status(_(b'relinking %s to %s\n') % (src.store.path, repo.store.path)) | |
70 | if repo.root == src.root: |
|
74 | if repo.root == src.root: | |
71 | ui.status(_(b'there is nothing to relink\n')) |
|
75 | ui.status(_(b'there is nothing to relink\n')) |
General Comments 0
You need to be logged in to leave comments.
Login now