D3518: remotenames: check the remotepath with url containing user information too
pulkit (Pulkit Goyal)
phabricator at mercurial-scm.org
Thu May 10 13:29:17 UTC 2018
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
Current logic to match a remotepatch to a user defined path first removes the
authentication information from the url and then tries to match it. However this
is not true every time. If we clone a repo using ssh, the default path contains
the user information too.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D3518
AFFECTED FILES
mercurial/logexchange.py
CHANGE DETAILS
diff --git a/mercurial/logexchange.py b/mercurial/logexchange.py
--- a/mercurial/logexchange.py
+++ b/mercurial/logexchange.py
@@ -112,8 +112,8 @@
# represent the remotepath with user defined path name if exists
for path, url in repo.ui.configitems('paths'):
# remove auth info from user defined url
- url = util.removeauth(url)
- if url == rpath:
+ noauthurl = util.removeauth(url)
+ if url == rpath or noauthurl == rpath:
rpath = path
break
To: pulkit, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list