Add debian/source/format parser
PEP-8 and pyflakes cleanups
Add support dch's --security option
Print number of tries left
Fix  testsuite failure if DEB_VENDOR != Debian

The package fails to build from source if the DEB_VENDOR is not Debian,
as the test output from git-dch expects Debian distribution specific
behaviour.

You can see the failed build log with DEB_VENDOR=Ubuntu here:
https://launchpadlibrarian.net/121690052/buildlog_ubuntu-raring-i386.git-buildpackage_0.6.0~git20120822_FAILEDTOBUILD.txt.gz

Closes: #692289

Signed-off-by: Guido Günther <agx@sigxcpu.org>
GitRepository: implement _cmd_has_feature() method

This method is intended for checking if the local git (client) command
supports a certain feature. The "feature" is considered to be a
command line option. E.g. does "merge" command have the "edit" feature
translates to does git-merge support the '--edit' command line option.

To figure this out, _cmd_has_feature() parses through the "OPTIONS"
section of the man page of the git command.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
GitRepository: fix merge() for older git versions

Utilize _cmd_has_feature() in GitRepository.merge() to not give
edit/no-edit option for older versions of git-merge, that don't support
it. Fixes a regression (with git-version < 1.7.8) caused by commit
f3aa87fa0361a.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
GitRepository.find_tag: change deprecated _git_getoutput to _git_inout

Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
GitRepository/diff: add 'paths' argument

Makes the diff function more versatile. I.e. makes diffing only certain
paths possible. Also, add basic unittests for the diff() method.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
GitRepository/diff: catch git error

Raise an exception if the git command fails. Also, utilize _git_inout()
instead of the deprecated _git_getoutput().

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Allow to remove the orig tarball symlink

that's used make pristine-tar see the correct orig tarball name.

Closes: #692401
GbpError accepts an error message

so no need to print it separately
Minor git-import-orig manpage improvements
Remove unused import
Add issing git- prefix to --color and --notify options

Thanks: Filippo Rusconi
Closes: #693978
command_wrappers: suppress some pylint warnings

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
notifications.py: remove unused import

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
tests: make tests a Python module

Makes it possible to reuse code between various tests.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
pq: fix "no authorship" warning messages

Add one missing string field. Show the patch filename instead of the
pull path - the user doesn't need to know if the patch was applied from
a temporary directory, for example.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
testutils: create missing directories when adding a file