Rev 5637: If someone uses -Dlaunchpad, use the 'official' URL instead of the local one. in http://bazaar.launchpad.net/~jameinel/bzr/2.3-three-part-resolution-stacking-741375
John Arbash Meinel
john at arbash-meinel.com
Thu Mar 24 11:38:34 UTC 2011
At http://bazaar.launchpad.net/~jameinel/bzr/2.3-three-part-resolution-stacking-741375
------------------------------------------------------------
revno: 5637
revision-id: john at arbash-meinel.com-20110324113825-7dmqkgjqqt62n4a8
parent: john at arbash-meinel.com-20110324113238-0ad8ecj1e2d4216n
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.3-three-part-resolution-stacking-741375
timestamp: Thu 2011-03-24 12:38:25 +0100
message:
If someone uses -Dlaunchpad, use the 'official' URL instead of the local one.
-------------- next part --------------
=== modified file 'bzrlib/plugins/launchpad/lp_directory.py'
--- a/bzrlib/plugins/launchpad/lp_directory.py 2011-03-24 11:07:47 +0000
+++ b/bzrlib/plugins/launchpad/lp_directory.py 2011-03-24 11:38:25 +0000
@@ -162,9 +162,10 @@
if _lp_login is not None:
result = self._resolve_locally(path, url, _request_factory)
if 'launchpad' in debug.debug_flags:
- res2 = self._resolve_via_xmlrpc(path, url, _request_factory)
- trace.note('resolution for %s\nlocal: %s\nremote: %s'
- % (url, result['urls'], res2['urls']))
+ local_res = result
+ result = self._resolve_via_xmlrpc(path, url, _request_factory)
+ trace.note('resolution for %s\n local: %s\n remote: %s'
+ % (url, local_res['urls'], result['urls']))
else:
result = self._resolve_via_xmlrpc(path, url, _request_factory)
=== modified file 'bzrlib/plugins/launchpad/test_lp_directory.py'
--- a/bzrlib/plugins/launchpad/test_lp_directory.py 2011-03-24 11:07:47 +0000
+++ b/bzrlib/plugins/launchpad/test_lp_directory.py 2011-03-24 11:38:25 +0000
@@ -20,6 +20,7 @@
import xmlrpclib
from bzrlib import (
+ debug,
errors,
tests,
transport,
@@ -197,6 +198,12 @@
self.assertResolve('bzr+ssh://bazaar.demo.launchpad.net/+branch/apt',
'lp://demo/apt')
+ def test_debug_launchpad_uses_resolver(self):
+ self.assertResolve('bzr+ssh://bazaar.launchpad.net/+branch/bzr',
+ 'lp:bzr', submitted=False)
+ debug.debug_flags.add('launchpad')
+ self.addCleanup(debug.debug_flags.discard, 'launchpad')
+ self.assertResolve('bzr+ssh://fake-resolved', 'lp:bzr', submitted=True)
class DirectoryUrlTests(TestCaseInTempDir):
More information about the bazaar-commits
mailing list