Merge lp:~stevenk/launchpad/derive-common-ancestor into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Steve Kowalik |
Approved revision: | no longer in the source branch. |
Merged at revision: | 12580 |
Proposed branch: | lp:~stevenk/launchpad/derive-common-ancestor |
Merge into: | lp:launchpad |
Diff against target: |
396 lines (+128/-67) 5 files modified
lib/lp/registry/browser/tests/test_distroseriesdifference_webservice.py (+9/-1) lib/lp/registry/model/distroseriesdifference.py (+20/-23) lib/lp/registry/scripts/tests/test_populate_distroseriesdiff.py (+11/-2) lib/lp/registry/tests/test_distroseriesdifference.py (+49/-27) lib/lp/testing/factory.py (+39/-14) |
To merge this branch: | bzr merge lp:~stevenk/launchpad/derive-common-ancestor |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gavin Panella (community) | Approve | ||
Review via email: mp+52796@code.launchpad.net |
Commit message
[r=allenap][bug=732392] Use changelog parsing to calculate base versions for DistroSeriesDif
Description of the change
Change how base versions are calculated for DistroSeriesDif
When DSDs were first implemented, they based base version calculation on the assumption that the highest common version is published in both series. Unfortunately, this assumption is false.
Based on the work from a Soyuz mini-sprint (the last one ever, in fact) it was determined that the safest and most correct way to determine the base version is parsing the changelog of the two packages. See https:/
I have implemented a method into the object factory that creates a changelog with as many entries as required, which is then stored in the Librarian, and the LFA returned. I have extended makeSourcePacka
It also does a little bit of drive-by in terms of lint.
Lovely jubbly :)
[1]
+ entry = dedent('''
+ %s (%s) unstable; urgency=low
+
+ * %s.
+
+ -- Foo Bar <email address hidden> Tue, 01 Jan 1970 01:50:41 +0000
+
+ ''' % (spn, version, version))
This trailing whitespace will probably get culled by someone's editor
one day. If it's needed then I think you should find a more robust way
of ensuring it stays there. Fwiw, dedent will do the right thing
without it.
There's some trailing whitespace in test_distroseri esdifference. py
too.
[2]
There are no tests for the new factory methods. I'm not sure of how
needed they are, but there are a fair few in test_factory. Add some if
you think there's some value to it.