~racb/git-ubuntu:changelog-parents

Last commit made on 2020-02-12
Get this branch:
git clone -b changelog-parents https://git.launchpad.net/~racb/git-ubuntu
Only Robie Basak can upload to this branch. If you are Robie Basak please log in for upload directions.

Branch merges

Branch information

Name:
changelog-parents
Repository:
lp:~racb/git-ubuntu

Recent commits

fd197c3... by Robie Basak

Add further docstrings and comments

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.

4a653b8... by Robie Basak

get_changelog_parent_commits: use PatchState enum

Now that the PatchState enum exists, adjust the get_changelog_parents
prototype to use it and adjust all callers accordingly.

b0a7b7f... by Robie Basak

Support multiple changelog parents

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.

LP: #1761332

Original-Author: Nishanth Aravamudan <email address hidden>

02937bf... by Robie Basak

Add multiple changelog parent tests

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.

Original-Author: Nishanth Aravamudan <email address hidden>

f27cc26... by Robie Basak

Generalise test_get_changelog_parent_commits

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.

02742b0... by Robie Basak

test_get_import_commit_msg: multiple parent case

As we introduce multiple changelog parents, add a test case for this
edge case to ensure that the commit message remains correct.

Original-Author: Nishanth Aravamudan <email address hidden>

563cc82... by Robie Basak

Allow for multiple changelog parents

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.

Original-Author: Nishanth Aravamudan <email address hidden>

f89a0e6... by Robie Basak

Sort reimport tags before using them

This is necessary to fix the test introduced in the previous change.

718583e... by Robie Basak

Add test: test_get_existing_import_tags_ordering

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.

ea04eba... by Robie Basak

test_get_existing_import_tags: squash applied

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.