Add option to manage distribution fields for non snapshot mode.

The snapshot mode fails to merge two "debian/changelog" entries if the
distribution is not "UNRELEASED".

* tests/11_test_dch_main.py: test the new --distribution option to
  dch.main(). Add only meaningful tests, i.e. options alone and combined
  with --release and --snapshot.

* git-dch (fixup_section): Rename as it's used to fix header in addition
  to trailer, this require a new named parameter "options".
  (main): Add version_group option "-D" and "--distribution" to
  specify the distribution name.
  Add version_group option "--force-distribution" to force the provided
  distribution to be used, used by "dch".
  Rename fixup_trailer() to fixup_section() and add options as parameters.

* docs/manpages/git-dch.sgml: Update documentation for new options.

Closes: #646684
Add urgency management.

* tests/11_test_dch_main.py: test the new --urgency option to
  dch.main(). Add only meaningful tests, i.e. options alone and combined
  with --release and --snapshot.

* git-dch (fixup_section): Manage "urgency" option.
  (main): Add version_group option "-U" and "--urgency" to set the
  urgency level of the entry.

* docs/manpages/git-dch.sgml: Update documentation for new option.
Generate coverage xml

for cobertura style coverage information that can be picked up
by e.g. Jenkins
Fix typos

Git-Dch: Ignore
Add .coveragerc

To get correct report if coverage is invoked directly (not through
nose/disttools) in order to get an xml report, for example.

Currently only used for restricting the coverage output to the gbp
python package. That is, same thing that 'cover-package' option in
setup.cfg does.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
GitRepository.show: use _git_inout()

Instead of the deprecated _git_getoutput() method. Also, capture stderr
and put the error message to the exception, instead.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
tests: Use tempfile.mkdtemp to create temp dirs for tests

This puts test dirs below /tmp which often is a tmpfs.

All tests include the context module which consolidates tmpdir creation
and cleanup, undoes a chdir in teardown and silences log messages.
Revert "GitRepository.show: use _git_inout()"

This changes the newline behaviour. readlines() as used by
_git_getoutput correctly keeps the newlines while this change doesn't.

This reverts commit 92edb4eda14cf4b5fd1514feb7b81aa50456285c.
Use _git_inout for git.show

so we don't spew the error message on stdout for nonexistent objects
Add minimal vfs interface

so we can access blobs in git as file like objects
Introduce Source class

so we don't have to expose all the details of Debian's different
files and conventions.
Honor debian/source/format

when checking if a package is a native package

Closes: #669267
Add gbp.git.source.Source.sourcepkg

to easily fetch the source package name

Git-Dch: Ignore
Document changes and release 0.6.0~git20130413
Don't try access source before it's filled
Document changes and release 0.6.0~git20130414
Silence git init

to make the test suite less verbose
GitRepository: make __build_env a static method

since cls is unused and it silences pychecker