[Updated] D10409: relink: use `get_unique_pull_path`
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Sat Apr 17 22:11:11 UTC 2021
Closed by commit rHGb5e7cdb93abc: relink: use `get_unique_pull_path` (authored by marmoute).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D10409?vs=26865&id=26974
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D10409/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D10409
AFFECTED FILES
hgext/relink.py
CHANGE DETAILS
diff --git a/hgext/relink.py b/hgext/relink.py
--- a/hgext/relink.py
+++ b/hgext/relink.py
@@ -19,7 +19,10 @@
registrar,
util,
)
-from mercurial.utils import stringutil
+from mercurial.utils import (
+ stringutil,
+ urlutil,
+)
cmdtable = {}
command = registrar.command(cmdtable)
@@ -62,10 +65,11 @@
util, b'samedevice'
):
raise error.Abort(_(b'hardlinks are not supported on this system'))
- src = hg.repository(
- repo.baseui,
- ui.expandpath(origin or b'default-relink', origin or b'default'),
- )
+
+ if origin is None and b'default-relink' in ui.paths:
+ origin = b'default-relink'
+ path, __ = urlutil.get_unique_pull_path(b'relink', repo, ui, origin)
+ src = hg.repository(repo.baseui, path)
ui.status(_(b'relinking %s to %s\n') % (src.store.path, repo.store.path))
if repo.root == src.root:
ui.status(_(b'there is nothing to relink\n'))
To: marmoute, #hg-reviewers, pulkit
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210417/cec03eb3/attachment-0002.html>
More information about the Mercurial-patches
mailing list