~racb/git-ubuntu:rich-history-preservation

Last commit made on 2020-04-23
Get this branch:
git clone -b rich-history-preservation 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:
rich-history-preservation
Repository:
lp:~racb/git-ubuntu

Recent commits

f8c5029... by Robie Basak

Add rich history preservation

Add a new facility to permit rich history to be preserved across
reimports (when using "git ubuntu import --reimport"). Previous rich
history is exported to a temporary directory prior to the reimport.
During import, the rich history importer is then given the opportunity
to reconstruct an upload tag "just in time" before it is used.

Testing the importer end-to-end for this is not currently practical
since we have no tests for the --reimport function at all. We have
pragmatically concluded that it is sufficient to functionally test the
new rich history code, since --reimport will generally only be used with
manual supervision and the likely bugs in the importer code itself are
that rich history preservation won't work at all, or the importer will
fail entirely, and so will be easily noticed.

I have also added some limited additional tests to bring coverage of the
new gitubuntu.rich_history up to 100%.

583cfba... by Robie Basak

Add repo_factory fixture

This is useful for tests that require multiple repo fixtures.

7a70527... by Robie Basak

Interleave LP publications during consumption

The specification requires that we consider Debian and Ubuntu
publications in Launchpad simultaneously, ordering by date_created
across them both. This implements this requirement with
interleave_launchpad_versions_published_after() to wrap multiple calls
of launchpad_versions_published_after() and interleaving the results as
they are returned. The caller is adjusted to use this instead of
iterating over the two distributions separately.

LP: #1851361

371c755... by Robie Basak

Add docstrings for existing code

ade4371... by Robie Basak

launchpad_versions_published_after: empty is OK

Do not raise an exception if there are no items to return. Instead, make
it the caller's responsibility to handle an empty result. This makes it
easier for the caller to handle this case.

d87a1ad... by Robie Basak

Set LP HEAD by looking at our heads

Instead of relying on only_debian as returned from
launchpad_versions_published_after(), instead determine whether the
Launchpad HEAD should be pointing at Ubuntu or Debian by looking to see
if we have a local Ubuntu head.

This removes an entanglement with launchpad_versions_published_after(),
making for easier future refactoring.

a676513... by Bryce Harrington

clone: Allow git+ssh proto for fetch

git-ubuntu clone uses the 'https' protocol by default, but provides a
--proto CLI option for the user to select other options. The allowed
options are 'git', 'http', and 'https'.

This patch adds 'git+ssh' as another allowed option. Manual testing
shows it works as expected with git ubuntu, with no further
configuration required.

N.b. there are other protocols permitted by git, such as 'ssh', 'ftp',
and local. These may require additional configuration work to set up,
so are omitted for now until use cases are identified.

1c54cd3... by Robie Basak

Add explanatory comments on changelog notes

35da7eb... by Robie Basak

Configure notes.displayRef on clone

When "git ubuntu clone" runs, also configure notes.displayRef so that
changelog notes display in "git log" automatically.

In the future this behaviour might change to be configurable, but this
default case seems reasonable to do for an initial implementation.

73d62e7... by Robie Basak

Fetch changelog notes on "git ubuntu clone"

When "git ubuntu clone" runs, set up the fetch refspec to also fetch any
changelog notes.