A base assumption of the gitubuntu/git_repository::GitUbuntuRepository
class is that only one source package is stored in a given repository
(by definition this is true on Launchpad) but not explicitly required by
anything in git locally.
Since it is possible locally to rename a source package, e.g., in a
git-ubuntu repository, we want to be consistent with where we obtain the
source package name from -- either the commandline, from the a
debian/changelog file or from a repository's configuration. And
additionally, cross-validate the values when they should agree.
1) The following commands do not currently use a GitUbuntuRepository
object, but run from within a repository. They are simple wrappers
around `dpkg-buildpackage` with good default arguments for our
workflows:
git ubuntu build
git ubuntu build-source
2) The following commands create an existing local repository:
git ubuntu clone
The source package is always provided to this command and is stored
locally in the git-config.
3) The following command(s) create or re-use an existing local
repository:
git ubuntu import
git ubuntu import-ppa
The source package is always provided to these commands. If it disagrees
with the value stored in the git configuration (if any), then it should
be a fatal error.
4) The following command(s) create or re-use an existing local
repository. No consistency is implied, as we are simply importing a DSC
file:
git ubuntu import-local
Future improvements might mandate that import-local follows the same
rules as import and import-ppa.
5) The following commands are run from within a GitUbuntuRepository and
have a ref to extract a debian/changelog from.
git ubuntu merge
git ubuntu tag
The commitish to merge or tag should be examined for debian/changelog as
the source package name. If there is a git config for a source package
name, it should be validated against.
6) The following command(s) are run from within a git repository and do
not require any refs to exist to run:
git ubuntu queue
git ubuntu remote
They should only use the value stored in the git repository. If HEAD
currently exists, then a sanity check against the value in
HEAD:debian/changelog may be valid.