Merge lp://staging/~maxb/bzr-builddeb/better-error-multiple-upstream-tarballs into lp://staging/bzr-builddeb

Proposed by Max Bowsher
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: 566
Merged at revision: 566
Proposed branch: lp://staging/~maxb/bzr-builddeb/better-error-multiple-upstream-tarballs
Merge into: lp://staging/bzr-builddeb
Diff against target: 124 lines (+57/-3)
4 files modified
errors.py (+6/-0)
import_dsc.py (+2/-2)
tests/__init__.py (+29/-1)
tests/test_import_dsc.py (+20/-0)
To merge this branch: bzr merge lp://staging/~maxb/bzr-builddeb/better-error-multiple-upstream-tarballs
Reviewer Review Type Date Requested Status
Jelmer Vernooij Approve
Review via email: mp+64090@code.staging.launchpad.net

Description of the change

When attempting to import a package with multiple upstream tarballs, raise
MultipleUpstreamTarballsNotSupported rather than AssertionError.

The primary motivation is so that the UDD failures categorization will automatically split this case from other kinds of unpack failure.

To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

On Thu, 2011-06-09 at 21:46 +0000, Max Bowsher wrote:
> Max Bowsher has proposed merging lp:~maxb/bzr-builddeb/better-error-multiple-upstream-tarballs into lp:bzr-builddeb.
>
> Requested reviews:
> Bzr-builddeb-hackers (bzr-builddeb-hackers)
>
> For more details, see:
> https://code.launchpad.net/~maxb/bzr-builddeb/better-error-multiple-upstream-tarballs/+merge/64090
>
> When attempting to import a package with multiple upstream tarballs, raise
> MultipleUpstreamTarballsNotSupported rather than AssertionError.
>
> The primary motivation is so that the UDD failures categorization will automatically split this case from other kinds of unpack failure.
It would be nice to have a test that verifies that the exception is
raised when there are multiple upstream tarballs.

Other than that, looks good:

  review needsfixing
  merge approve

Cheers,

Jelmer

review: Needs Fixing
567. By Max Bowsher

Add test.

Revision history for this message
Max Bowsher (maxb) wrote :

Alright, I guess the work writing the test will pay off once we actually implement support.

How's this?

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Thanks :)

That last bit seems shorter as:

self.addCleanup(extractor.cleanup)
self.assertRaises(MultipleUpstreamTarballsNotSupported, extractor.extract)

rather than:

+ try:
124 + try:
125 + extractor.extract()
126 + self.fail("Expected exception not thrown")
127 + except MultipleUpstreamTarballsNotSupported:
128 + pass # Expected
129 + finally:
130 + extractor.cleanup()

review: Approve
568. By Max Bowsher

Write test in a shorter style using suggestion from Jelmer.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches