Mercurial > hg
comparison hgext/relink.py @ 49730:c6ae90515660
path: use `get_unique_pull_path_obj` in `hg relink`
This is not really needed, but that help removing caller of the older function.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 02 Dec 2022 06:33:50 +0100 |
parents | 6000f5b25c9b |
children | d28cc52e2c0f |
comparison
equal
deleted
inserted
replaced
49729:acf4be97033b | 49730:c6ae90515660 |
---|---|
65 ): | 65 ): |
66 raise error.Abort(_(b'hardlinks are not supported on this system')) | 66 raise error.Abort(_(b'hardlinks are not supported on this system')) |
67 | 67 |
68 if origin is None and b'default-relink' in ui.paths: | 68 if origin is None and b'default-relink' in ui.paths: |
69 origin = b'default-relink' | 69 origin = b'default-relink' |
70 path, __ = urlutil.get_unique_pull_path(b'relink', repo, ui, origin) | 70 path = urlutil.get_unique_pull_path_obj(b'relink', ui, origin) |
71 src = hg.repository(repo.baseui, path) | 71 src = hg.repository(repo.baseui, path.loc) |
72 ui.status(_(b'relinking %s to %s\n') % (src.store.path, repo.store.path)) | 72 ui.status(_(b'relinking %s to %s\n') % (src.store.path, repo.store.path)) |
73 if repo.root == src.root: | 73 if repo.root == src.root: |
74 ui.status(_(b'there is nothing to relink\n')) | 74 ui.status(_(b'there is nothing to relink\n')) |
75 return | 75 return |
76 | 76 |