test_fixtures: for simplicity chdir to the repo local directory
This ensures the users of the fixtures do not need to do it
for themselves. This is only strictly required for importer testing,
which assumes it is in the correct directory.
This assertion is complementary to the other. Also add a test.
---
Originally, I had included a change that automatically set the native
variable based upon the version passed in (so you only had to specify
one of version or native), but I'm no longer confident that is what you
want the API to be. This change is sufficient to catch the issue and
ensures 100% code coverage with the test.
git_repository: drop ensure_importer_branches_exist
Much like 1d658869b56b ("Create dsc branch on first use"), create the
pristine-tar necessary branches on first use, which all occurs within
the context manager in git_repository.py.
This should only result in one functional change, but should ensure
there are no side-effects of simply instantiating a GitUbuntuRepository
object and the helper function is no longer necessary.
The functional change is that when there is only publishing history in
one of Debian or Ubuntu, there will only be pristine-tar related
branches for the specific distribution. This requires, in turn, ensuring
that pristine_tar_list does not create any branches, so that `git ubuntu
build`'s usage continues to work as expected.
It is a separate issue as to whether these branches should exist in the
first place or not.
This will allow for importer tests to start with a given
Repo object, specify the modifications to it, and then
generate the expected result structurally. The original
and modified-copy can then be compared with the to-be-written
Repo comparator.