This fails hard in the dictionary comprehension over timestamps since it
expects tuples of items instead of a list of keys. Use items() to
correctly provide the former.
import_patches_applied_tree: use correct quilt env
When quilt runs, we must use GitUbuntuRepository:quilt_env in order to
make sure that QUILT_* environment variables are set correctly.
Otherwise we rely on the importer runner having the correct quilt
environment set, which may not be the case.
Also see LP 1734137: separately we need to ensure that any /etc/quiltrc
or ~/.quiltrc is ignored correctly, but I'm treating that as a separate
bug as it needs a more significant refactor to wrap all quilt calls. We
should fix that bug before declaring hash stability, but it isn't as
important as this fix as that one is less likely to be a problem in
practice on our production importer.
Take a treeish instead of a commit hash hex string and provide a wrapper
for old callers.
This is one step towards a move to using pure objects in most
parameters.
It's needed now so that the importer can also use quilt_env providing
only a treeish object. I could also have changed the method definition
to something intermediary, but as this is the eventual goal anyway,
might as well do it now.
It looks like this was an accidental regression in commit 0f3c9430.
'version' refers to the last set version in the for loop above, instead
of 'spi.version' which is the current package being imported.
'version' thus referred to the previously found tag, which of course
always exists. The code therefore assumed that the current version
doesn't need importing since the tag already exists, which is wrong.
Unfortunately this area of code doesn't have effective test coverage yet
and it isn't practical to add it here yet. My importer testing spike
will separately have to refactor and cover this. In the meantime a fix
without a test will have to do.