Add docstrings to some functions which previously did not have any. One
related comment is also added.
Some of these docstrings expose some shortcomings in the implementation,
but in the interest of making progress the code is documented as-is, and
improvements to the code are left for the future.
The specification now defines what to do when multiple publications of
the same package version string exist in Launchpad: use multiple
changelog parents.
This modifies get_changelog_parent_commits to match the new required
behaviour.
If multiple changelog parents exist and have been imported according to
the spec, then they should be detected and returned by
get_changelog_parent_commits(). This is not yet implemented, so are
marked xfail. When implemented and correct, these tests will notice.
As we introduce multiple changelog parents, adjust the
test_get_changelog_parent_commits test parameter spec to support a
comparison of multiple return values rather than just one.
This does not functionally change the test. We're just adding the
ability to add test parameters that check that multiple changelog
parents are returned in the future.
The specification now requires that multiple changelog parents are
handled in the edge case that a single package name and version string
are published with different source trees in Launchpad; for example when
Debian and Ubuntu managed to publish the same package version
differently.
Here we change the type only, so where a changelog_parent was previously
used or held, it is now a changelog_parents list instead. This should
result in no functional differences but allows for the necessary
behavioural changes in the future.
To maintain hash stability, the spec defines that multiple changelog
parents must appear in the order that they were published. For this to
work, get_existing_import_tags must return the tags in the correct order
even if the underlying git repository tags appear in an arbitrary order.
This currently does not work, so we mark the test xfail to demonstrate
that the bug exists, to be fixed in the next change.
Since the unapplied and applied paths are now the same, the
test_get_existing_import_tags and test_get_existing_applied_tags tests
can be identical with only one implementation and a common set of input
parameters. Make it so.