Rev 3271: (Daniel Watkins) Change some assertions to exceptions in LP plugin. in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Thu Mar 13 02:13:09 GMT 2008
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 3271
revision-id:pqm at pqm.ubuntu.com-20080313021257-1l2g9qfezux7fboc
parent: pqm at pqm.ubuntu.com-20080313004030-mff9aq1jfg13n0qi
parent: bialix at ukr.net-20080312215823-d6p90ir733xtve3z
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2008-03-13 02:12:57 +0000
message:
(Daniel Watkins) Change some assertions to exceptions in LP plugin.
(#196618)
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/plugins/launchpad/lp_registration.py lp_registration.py-20060315190948-daa617eafe3a8d48
------------------------------------------------------------
revno: 3246.4.5
revision-id:bialix at ukr.net-20080312215823-d6p90ir733xtve3z
parent: d.m.watkins at warwick.ac.uk-20080303172028-0cit76yl6si93wao
parent: pqm at pqm.ubuntu.com-20080312213603-mtgxmfy3td5n04yh
committer: Alexander Belchenko <bialix at ukr.net>
branch nick: bug.196618
timestamp: Wed 2008-03-12 23:58:23 +0200
message:
merge bzr.dev
added:
bzrlib/directory_service.py directory_service.py-20080305221044-vr2mkvlsk8jypa2y-1
bzrlib/tests/test_directory_service.py test_directory_servi-20080305221044-vr2mkvlsk8jypa2y-2
doc/en/admin-guide/ docenadminguide-20080305135054-y7y2c986yf94zljn-1
doc/en/admin-guide/index.txt index.txt-20080305140741-ecw0lap8dxkxc05g-1
renamed:
bzrlib/plugins/launchpad/lp_indirect.py => bzrlib/plugins/launchpad/lp_directory.py lp_indirect.py-20070126012204-de5rugwlt22c7u7e-1
bzrlib/plugins/launchpad/test_lp_indirect.py => bzrlib/plugins/launchpad/test_lp_directory.py test_lp_indirect.py-20070126002743-oyle362tzv9cd8mi-1
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/bzrdir.py bzrdir.py-20060131065624-156dfea39c4387cb
bzrlib/debug.py debug.py-20061102062349-vdhrw9qdpck8cl35-1
bzrlib/delta.py delta.py-20050729221636-54cf14ef94783d0a
bzrlib/deprecated_graph.py graph.py-20050905070950-b47dce53236c5e48
bzrlib/diff.py diff.py-20050309040759-26944fbbf2ebbf36
bzrlib/errors.py errors.py-20050309040759-20512168c4e14fbd
bzrlib/help_topics/__init__.py help_topics.py-20060920210027-rnim90q9e0bwxvy4-1
bzrlib/mail_client.py mail_client.py-20070809192806-vuxt3t19srtpjpdn-1
bzrlib/merge.py merge.py-20050513021216-953b65a438527106
bzrlib/merge_directive.py merge_directive.py-20070228184838-ja62280spt1g7f4x-1
bzrlib/plugins/launchpad/__init__.py __init__.py-20060315182712-2d5feebd2a1032dc
bzrlib/registry.py lazy_factory.py-20060809213415-2gfvqadtvdn0phtg-1
bzrlib/repofmt/pack_repo.py pack_repo.py-20070813041115-gjv5ma7ktfqwsjgn-1
bzrlib/repository.py rev_storage.py-20051111201905-119e9401e46257e3
bzrlib/status.py status.py-20050505062338-431bfa63ec9b19e6
bzrlib/tests/__init__.py selftest.py-20050531073622-8d0e3c8845c97a64
bzrlib/tests/blackbox/test_merge.py test_merge.py-20060323225809-9bc0459c19917f41
bzrlib/tests/blackbox/test_mv.py test_mv.py-20060705114902-33tkxz0o9cdshemo-1
bzrlib/tests/branch_implementations/test_branch.py testbranch.py-20050711070244-121d632bc37d7253
bzrlib/tests/branch_implementations/test_revision_history.py test_revision_histor-20070326062311-v7co92liyuchb80w-1
bzrlib/tests/intertree_implementations/test_compare.py test_compare.py-20060724101752-09ysswo1a92uqyoz-2
bzrlib/tests/test_errors.py test_errors.py-20060210110251-41aba2deddf936a8
bzrlib/tests/test_mail_client.py test_mail_client.py-20070809192806-vuxt3t19srtpjpdn-2
bzrlib/tests/test_merge.py testmerge.py-20050905070950-c1b5aa49ff911024
bzrlib/tests/test_merge_directive.py test_merge_directive-20070228184838-ja62280spt1g7f4x-2
bzrlib/tests/test_osutils.py test_osutils.py-20051201224856-e48ee24c12182989
bzrlib/tests/test_registry.py test_lazy_factory.py-20060809213415-2gfvqadtvdn0phtg-2
bzrlib/tests/test_transform.py test_transaction.py-20060105172520-b3ffb3946550e6c4
bzrlib/tests/test_tsort.py testtsort.py-20051025073946-27da871c394d5be4
bzrlib/tests/test_upgrade.py test_upgrade.py-20051004040251-555fe1d2bae1bc71
bzrlib/tests/test_urlutils.py test_urlutils.py-20060502192900-46b1f9579987cf9c
bzrlib/tests/test_workingtree_4.py test_workingtree_4.p-20070223025758-531n3tznl3zacv2o-1
bzrlib/tests/workingtree_implementations/test_merge_from_branch.py test_merge_from_bran-20060904034200-12jxyk2zlhpufxe1-1
bzrlib/transform.py transform.py-20060105172343-dd99e54394d91687
bzrlib/transport/__init__.py transport.py-20050711165921-4978aa7ce1285ad5
bzrlib/tree.py tree.py-20050309040759-9d5f2496be663e77
bzrlib/tsort.py tsort.py-20051025073946-7808f6aaf7d07208
bzrlib/urlutils.py urlutils.py-20060502195429-e8a161ecf8fac004
bzrlib/util/configobj/configobj.py configobj.py-20051018184548-06992a2246425e3e
bzrlib/util/configobj/docs/configobj.txt configobj.txt-20051018184548-4949b5f17e6a19c7
bzrlib/util/configobj/docs/validate.txt validate.txt-20051018184548-9e0e5ad913e258f5
bzrlib/workingtree.py workingtree.py-20050511021032-29b6ec0a681e02e3
bzrlib/workingtree_4.py workingtree_4.py-20070208044105-5fgpc5j3ljlh5q6c-1
doc/developers/lca-merge.txt lcamerge.txt-20080103061803-9isydn4ivgwrvorw-1
doc/en/user-guide/resolving_conflicts.txt resolving_conflicts.-20071122141511-0knao2lklsdsvb1q-5
setup.py setup.py-20050314065409-02f8a0a6e3f9bc70
bzrlib/plugins/launchpad/lp_directory.py lp_indirect.py-20070126012204-de5rugwlt22c7u7e-1
bzrlib/plugins/launchpad/test_lp_directory.py test_lp_indirect.py-20070126002743-oyle362tzv9cd8mi-1
------------------------------------------------------------
revno: 3246.4.4
revision-id:d.m.watkins at warwick.ac.uk-20080303172028-0cit76yl6si93wao
parent: d.m.watkins at warwick.ac.uk-20080303171331-53ytk7dylv264zqn
committer: Daniel Watkins <D.M.Watkins at warwick.ac.uk>
branch nick: 196618
timestamp: Mon 2008-03-03 17:20:28 +0000
message:
Modified NEWS.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
------------------------------------------------------------
revno: 3246.4.3
revision-id:d.m.watkins at warwick.ac.uk-20080303171331-53ytk7dylv264zqn
parent: d.m.watkins at warwick.ac.uk-20080303165131-625nwr1x7fas4apb
committer: Daniel Watkins <D.M.Watkins at warwick.ac.uk>
branch nick: 196618
timestamp: Mon 2008-03-03 17:13:31 +0000
message:
Replaced another assert.
modified:
bzrlib/plugins/launchpad/lp_registration.py lp_registration.py-20060315190948-daa617eafe3a8d48
------------------------------------------------------------
revno: 3246.4.2
revision-id:d.m.watkins at warwick.ac.uk-20080303165131-625nwr1x7fas4apb
parent: d.m.watkins at warwick.ac.uk-20080303165120-6arxozbh3y47kdbe
committer: Daniel Watkins <D.M.Watkins at warwick.ac.uk>
branch nick: 196618
timestamp: Mon 2008-03-03 16:51:31 +0000
message:
Added NEWS entry.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
------------------------------------------------------------
revno: 3246.4.1
revision-id:d.m.watkins at warwick.ac.uk-20080303165120-6arxozbh3y47kdbe
parent: pqm at pqm.ubuntu.com-20080229011300-p50it0si2y8mbv0d
committer: Daniel Watkins <D.M.Watkins at warwick.ac.uk>
branch nick: 196618
timestamp: Mon 2008-03-03 16:51:20 +0000
message:
Replaced problematic assertion with exception call.
modified:
bzrlib/plugins/launchpad/lp_registration.py lp_registration.py-20060315190948-daa617eafe3a8d48
=== modified file 'NEWS'
--- a/NEWS 2008-03-12 23:08:34 +0000
+++ b/NEWS 2008-03-13 02:12:57 +0000
@@ -61,6 +61,9 @@
invoking external mail client in `bzr send` command.
(#139318, Alexander Belchenko)
+ * Improved error reporting in the Launchpad plugin. (Daniel Watkins,
+ #196618)
+
* Include quick-start-summary.svg file to python-based installer(s)
for Windows. (#192924, Alexander Belchenko)
=== modified file 'bzrlib/plugins/launchpad/lp_registration.py'
--- a/bzrlib/plugins/launchpad/lp_registration.py 2008-02-05 02:28:04 +0000
+++ b/bzrlib/plugins/launchpad/lp_registration.py 2008-03-03 17:13:31 +0000
@@ -205,7 +205,8 @@
author_email='',
product_name='',
):
- assert branch_url, 'branch_url %r is invalid' % branch_url
+ if not branch_url:
+ raise errors.InvalidURL(branch_url, "You need to specify a non-empty branch URL.")
self.branch_url = branch_url
if branch_name:
self.branch_name = branch_name
@@ -257,7 +258,9 @@
_authenticated = False
def __init__(self, path):
- assert path
+ if not path:
+ raise errors.InvalidURL(path=path,
+ extra="You must specify a product.")
self.path = path
def _request_params(self):
More information about the bazaar-commits
mailing list