Rev 46: Now that we are using submit_branch instead of pqm_branch, in http://bazaar.launchpad.net/%7Ebzr-pqm-devel/bzr-pqm/devel
John Arbash Meinel
john at arbash-meinel.com
Wed Nov 14 15:47:31 GMT 2007
At http://bazaar.launchpad.net/%7Ebzr-pqm-devel/bzr-pqm/devel
------------------------------------------------------------
revno: 46
revision-id:john at arbash-meinel.com-20071114154710-q03csgcsiwl8yq4w
parent: john at arbash-meinel.com-20071106172032-zl3c2h2h5fnhqgx7
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: pqm
timestamp: Wed 2007-11-14 09:47:10 -0600
message:
Now that we are using submit_branch instead of pqm_branch,
we need to make sure to use the public_location of the submit_branch.
Merge Directives already do this, so that you can use a local mirror of
a branch to generate your delta. However, we need to make sure that we
do the same when sending since we are re-using the same config option.
modified:
pqm_submit.py pqm_submit.py-20060221060137-b3a3cdde9f50efab
test_pqm_submit.py test_pqm_submit.py-20060221060137-fb48d47216aa0077
-------------- next part --------------
=== modified file 'pqm_submit.py'
--- a/pqm_submit.py 2007-11-06 17:20:32 +0000
+++ b/pqm_submit.py 2007-11-14 15:47:10 +0000
@@ -106,6 +106,15 @@
if submit_location is None:
raise errors.NoSubmitBranch(self.source_branch)
+ # See if the submit_location has a public branch
+ try:
+ submit_branch = Branch.open(submit_location)
+ except errors.NotBranchError:
+ pass
+ else:
+ submit_public_location = submit_branch.get_public_branch()
+ if submit_public_location is not None:
+ submit_location = submit_public_location
self.submit_location = submit_location
# Check that the message is okay to pass to PQM
=== modified file 'test_pqm_submit.py'
--- a/test_pqm_submit.py 2007-11-06 17:20:32 +0000
+++ b/test_pqm_submit.py 2007-11-14 15:47:10 +0000
@@ -182,6 +182,19 @@
self.assertEqual('Commit m\xc3\xa5ss\xc2\xb5ge',
message.get('Subject'))
+ def test_submit_branch_public_location(self):
+ source_branch = self.make_branch('source')
+ public_branch = self.make_branch('public')
+ submit_branch = self.make_branch('submit')
+ submit_public_branch = self.make_branch('submit_public')
+ submit_branch.set_public_branch(submit_public_branch.base)
+ source_branch.set_submit_branch(submit_branch.base)
+ submission = pqm_submit.PQMSubmission(
+ source_branch=source_branch,
+ public_location='public',
+ message=u'Commit m\xe5ss\xb5ge')
+ self.assertEqual(submit_public_branch.base, submission.submit_location)
+
class PQMSubmissionLocationsTests(TestCaseWithTransport):
More information about the bazaar-commits
mailing list