Bump ubuntu-dev-tools to 0.176, but only for Python 3. The Python 2
installation will remain as-is, since 0.176 doesn't appear to work with
Python 2.
This fixes an import bug where the necessary fix was in ubuntu-dev-tools.
The Python 2 installation is presumed needed by some other tooling
called by git-ubuntu via the shell. I expect this can go away when we
move the snap base to core20, which is currently deferred for the
future. In the meantime, we exclude the Python 2 version from installing
into some common directories to avoid conflicts. This does lead to a
somewhat frankenstein installation of ubuntu-dev-tools, but I don't
think it will create a problem in practice until we can move to core20.
This is a major functional change in the behaviour of the importer
algorithm. The output of the importer will now change to match the new
spec.
The impacted areas are the ones that find any previous commit to use,
create a commit as necessary, and tag accordingly.
Accepted upload tags are now adopted directly rather than creating a new
commit with the upload tag as its parent.
Reimport tags are now fully incorporated, eliminating the bugs around
edge cases where Launchpad stores different uploads in Debian and Ubuntu
against the same package version string.
The following bugs are fixed by this change. I have verified that for
each bug an adequate existing test exists or a test would not be
applicable (for example because orphan tags no longer exist).
There are various existing uses of --is-ancestor that could be changed
to use this new method instead, but this is deliberately being left as
tech-debt for now.
We will shortly be refactoring to create the tag from multiple places,
so to keep the debug message the same, move it to the place that the tag
is actually created.
It is easier to proceed with the necessary changes with the import
itself decoupled from the current status of the head pointer.
In the new algorithm, we will no longer care what was there previously.
The important thing is that the version is imported and the head is
updated to point to it. It's therefore safe to remove these checks.
This eliminates the need to supply unapplied_tip_version and
pretty_head_name to get_unapplied_import_parents() so these parameters
are removed.
Further, pretty_head_name is now used in the caller only once, so this
variable can also be eliminated there and the one remaining use replaced
directly with its definition.
Move the assignment of variables to just before their points of use.
This makes it easier to split up the function in future changes.
It can be verified that this introduces no functional changes. The only
risk is an attempt to access a variable before it is set; this is
feasible to check by hand.