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
Silence git clone

by using __git_inout instead of GitCommand
Silence _git_command

by using _git_inout instead of GitCommand
bash completion: handle upstream-tree like upstream-branch

That's as close as it gets since every ref like is valid
DebianSource: raise DebianSourceError if reading changelog fails

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
buildpackage: catch and handle DebianSourceError gracefully

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
tests: fix for older dch

Prevent dch from asking user input during tests.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
tests: another fix for older dch

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
GitRepository: add describe() method

Provides more output options than find_tag().
- longfmt: for getting the tag name in the long format (tag, number of
  commits and sha1)
- always: for falling back to sha1 if no (matching) tag name is found
- abbrev: for defining the length of sha1 returned

Change GitRepository.find_tag() to use the the new method.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
tests: add missing import in test_Changelog

That was erroneously removed in
3d6b68ae541d6020ff747628b3e44196999e0a50.

and breaks without dch installed

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
DebianSource: fix is_native()

Determine from changelog if debian/source/format does not provide any
type (1.0 format).

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
tests: Fix tests for Ubuntu

On Ubuntu dch produces different version numbering. Adapt tests for
this.

Adds a jew class to parse '/etc/lsb-release' to determine the
distribution and it's codename to dynamically adapt tests accordingly.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
buildpackage: implement --[no-]hooks option

For enabling/disabling all hooks. This option does not affect the
builder command, though.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
14_test_gbp_import_dscs: Mock gbp.log.err

to get rid of the spurious error message
10_test_get_upstream_tree: Fix test descriptions
Silence GitRepository.has_treeish

This also silences 10_test_get_upstream_tree
Silence GitRepository.set_upstream_branch

It's not used within gbp itself so no command line tool expects
an error message to be printed.
Silence GitRepository.grep_log

None of the gbp script rely on the output being printed. In fact we
improve the exception by appending the stderr output.
Discard git mailinfo's error message

since we don't expect it to succeed.