launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #30370
[Merge] ~pelpsi/launchpad:merge-proposal-url-fix into launchpad:master
Simone Pelosi has proposed merging ~pelpsi/launchpad:merge-proposal-url-fix into launchpad:master.
Commit message:
mp.address replaced with canonical_url(mp, rootsite="code")
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~pelpsi/launchpad/+git/launchpad/+merge/448614
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~pelpsi/launchpad:merge-proposal-url-fix into launchpad:master.
diff --git a/lib/lp/code/xmlrpc/git.py b/lib/lp/code/xmlrpc/git.py
index 6e39e8c..c2ad0ce 100644
--- a/lib/lp/code/xmlrpc/git.py
+++ b/lib/lp/code/xmlrpc/git.py
@@ -731,7 +731,10 @@ class GitAPI(LaunchpadXMLRPCView):
return (
"Updated existing merge proposal "
"for %s on Launchpad:\n %s"
- % (quote(branch), merge_proposal.address)
+ % (
+ quote(branch),
+ canonical_url(merge_proposal, rootsite="code"),
+ )
)
else:
base_url = canonical_url(repository, rootsite="code")
diff --git a/lib/lp/code/xmlrpc/tests/test_git.py b/lib/lp/code/xmlrpc/tests/test_git.py
index 4764319..f03072a 100644
--- a/lib/lp/code/xmlrpc/tests/test_git.py
+++ b/lib/lp/code/xmlrpc/tests/test_git.py
@@ -678,7 +678,7 @@ class TestGitAPIMixin:
expected_mp_url = (
"Updated existing merge proposal "
"for %s on Launchpad:\n %s"
- % (quote(pushed_branch), mp.address)
+ % (quote(pushed_branch), canonical_url(mp, rootsite="code"))
)
result = self.git_api.getMergeProposalInfo(