Code review comment for lp://staging/~jml/launchpad/ubuntu-package-bug-345737

Revision history for this message
Jonathan Lange (jml) wrote :

This branch makes lp:ubuntu/foo resolve to the branch associated with the development version of the 'foo' package on Ubuntu, defined as the branch linked to the Release pocket of that package of the current series of that distribution.

To do this, I've registered a new adapter from DistributionSourcePackage to ICanHasLinkedBranch. While I was there, I also added a bzr_identity attribute to ICanHasLinkedBranch, as well as a setBranch method. Neither of these are deeply associated with the change, but they are both things that are related & I've wanted to do for a while.

bazaar_identity has been changed to return 'lp:ubuntu/package' for source package branches associated to the development focus package.

I had to change the linked branch traversal code to pass segments into the traversable adapters. This was so I could raise context-aware errors in the case of 'ubuntu/doesntexist' and 'ubuntu/doesntexist/openssh'.

I've also increased the interlinking of distro-related registry objects. In particular, SourcePackage now links to DistributionSourcePackage (the latter being conceptually a parent of the former), and DistributionSourcePackage links to the development source package.

There are a lot of pyflakes & pep8 cleanups along the way, inflating the size of the diff.

I've also based this branch on lp:~jml/launchpad/remove-getitem. This was necessary in order to get the adapt() method behaving correctly with DistributionSourcePackage.

« Back to merge proposal