Page MenuHomePhabricator

D21859.diff
No OneTemporary

D21859.diff

diff --git a/support/hg/arc-hg.py b/support/hg/arc-hg.py
--- a/support/hg/arc-hg.py
+++ b/support/hg/arc-hg.py
@@ -273,8 +273,21 @@
markers = []
- source, branches = parseurl(ui.expandpath(source))
- remote = hg.peer(repo, opts, source)
+ # Determine the remote to use based on the default path configured in
+ # [ui.paths] for this local repository.
+ #
+ # The expandpath function in the ui module was deprecated in 5.8 and removed
+ # in 6.4. NOTE: There is also an expandpath function in mercurial.util (not
+ # plural mercurial.utils...) however that function behaves differently from
+ # the old ui.expandpath. Reviewing the source comments for the old
+ # ui.expandpath function points to using urilutils.get_ functions.
+ try:
+ remote_path, branches = parseurl(ui.expandpath(source))
+ except:
+ from mercurial import utils
+ origsource, remote_path, branch = utils.urlutil.get_clone_path(ui, source)
+
+ remote = hg.peer(repo, opts, remote_path)
with remote.commandexecutor() as e:
branchmap = e.callcommand(b'branchmap', {}).result()

File Metadata

Mime Type
text/plain
Expires
May 11 2024, 5:18 AM (5 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6284888
Default Alt Text
D21859.diff (1 KB)

Event Timeline