tools/git-buildpackage.git
11 years agoSilence GitRepository.set_upstream_branch
Guido Günther [Fri, 26 Apr 2013 22:00:06 +0000 (00:00 +0200)]
Silence GitRepository.set_upstream_branch

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

11 years agoSilence GitRepository.has_treeish
Guido Günther [Fri, 26 Apr 2013 21:52:55 +0000 (23:52 +0200)]
Silence GitRepository.has_treeish

This also silences 10_test_get_upstream_tree

11 years ago10_test_get_upstream_tree: Fix test descriptions
Guido Günther [Fri, 26 Apr 2013 21:28:16 +0000 (23:28 +0200)]
10_test_get_upstream_tree: Fix test descriptions

11 years ago14_test_gbp_import_dscs: Mock gbp.log.err
Guido Günther [Fri, 26 Apr 2013 21:13:29 +0000 (23:13 +0200)]
14_test_gbp_import_dscs: Mock gbp.log.err

to get rid of the spurious error message

11 years agobuildpackage: implement --[no-]hooks option
Markus Lehtonen [Mon, 22 Apr 2013 07:38:54 +0000 (10:38 +0300)]
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>
11 years agotests: Fix tests for Ubuntu
Markus Lehtonen [Wed, 3 Apr 2013 12:29:19 +0000 (15:29 +0300)]
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>
11 years agoDebianSource: fix is_native()
Markus Lehtonen [Fri, 26 Apr 2013 09:58:38 +0000 (12:58 +0300)]
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>
11 years agotests: add missing import in test_Changelog
Markus Lehtonen [Mon, 22 Apr 2013 19:03:46 +0000 (22:03 +0300)]
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>
11 years agoGitRepository: add describe() method
Markus Lehtonen [Mon, 3 Dec 2012 09:03:06 +0000 (11:03 +0200)]
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>
11 years agotests: another fix for older dch
Markus Lehtonen [Thu, 25 Apr 2013 09:23:47 +0000 (12:23 +0300)]
tests: another fix for older dch

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agotests: fix for older dch
Markus Lehtonen [Tue, 23 Apr 2013 07:59:41 +0000 (10:59 +0300)]
tests: fix for older dch

Prevent dch from asking user input during tests.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agobuildpackage: catch and handle DebianSourceError gracefully
Markus Lehtonen [Mon, 22 Apr 2013 15:43:09 +0000 (18:43 +0300)]
buildpackage: catch and handle DebianSourceError gracefully

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agoDebianSource: raise DebianSourceError if reading changelog fails
Markus Lehtonen [Mon, 22 Apr 2013 15:42:00 +0000 (18:42 +0300)]
DebianSource: raise DebianSourceError if reading changelog fails

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agobash completion: handle upstream-tree like upstream-branch
Guido Günther [Wed, 24 Apr 2013 05:24:05 +0000 (07:24 +0200)]
bash completion: handle upstream-tree like upstream-branch

That's as close as it gets since every ref like is valid

11 years agoSilence _git_command
Guido Günther [Wed, 24 Apr 2013 05:10:56 +0000 (07:10 +0200)]
Silence _git_command

by using _git_inout instead of GitCommand

11 years agoSilence git clone
Guido Günther [Wed, 24 Apr 2013 05:10:11 +0000 (07:10 +0200)]
Silence git clone

by using __git_inout instead of GitCommand

11 years agoGitRepository: make __build_env a static method
Guido Günther [Sun, 14 Apr 2013 11:35:53 +0000 (13:35 +0200)]
GitRepository: make __build_env a static method

since cls is unused and it silences pychecker

11 years agoSilence git init
Guido Günther [Sun, 14 Apr 2013 11:02:38 +0000 (13:02 +0200)]
Silence git init

to make the test suite less verbose

11 years agoDocument changes and release 0.6.0~git20130414 debian/0.6.0_git20130414
Guido Günther [Sat, 13 Apr 2013 17:37:25 +0000 (19:37 +0200)]
Document changes and release 0.6.0~git20130414

11 years agoDon't try access source before it's filled
Guido Günther [Sat, 13 Apr 2013 17:36:04 +0000 (19:36 +0200)]
Don't try access source before it's filled

11 years agoDocument changes and release 0.6.0~git20130413
Guido Günther [Sat, 13 Apr 2013 12:28:39 +0000 (14:28 +0200)]
Document changes and release 0.6.0~git20130413

11 years agoAdd gbp.git.source.Source.sourcepkg
Guido Günther [Sat, 13 Apr 2013 11:50:01 +0000 (13:50 +0200)]
Add gbp.git.source.Source.sourcepkg

to easily fetch the source package name

Git-Dch: Ignore

11 years agoHonor debian/source/format
Guido Günther [Sat, 13 Apr 2013 01:02:02 +0000 (03:02 +0200)]
Honor debian/source/format

when checking if a package is a native package

Closes: #669267

11 years agoIntroduce Source class
Guido Günther [Fri, 29 Mar 2013 14:55:12 +0000 (15:55 +0100)]
Introduce Source class

so we don't have to expose all the details of Debian's different
files and conventions.

11 years agoAdd minimal vfs interface
Guido Günther [Mon, 8 Apr 2013 08:20:23 +0000 (10:20 +0200)]
Add minimal vfs interface

so we can access blobs in git as file like objects

11 years agoUse _git_inout for git.show
Guido Günther [Sat, 13 Apr 2013 10:56:10 +0000 (12:56 +0200)]
Use _git_inout for git.show

so we don't spew the error message on stdout for nonexistent objects

11 years agoRevert "GitRepository.show: use _git_inout()"
Guido Günther [Mon, 8 Apr 2013 09:05:32 +0000 (11:05 +0200)]
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.

11 years agotests: Use tempfile.mkdtemp to create temp dirs for tests
Thomas Koch [Mon, 21 Jan 2013 14:50:39 +0000 (15:50 +0100)]
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.

11 years agoGitRepository.show: use _git_inout()
Markus Lehtonen [Mon, 25 Mar 2013 09:09:36 +0000 (11:09 +0200)]
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>
11 years agoAdd .coveragerc
Markus Lehtonen [Tue, 19 Mar 2013 13:05:02 +0000 (15:05 +0200)]
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>
11 years agoFix typos
Guido Günther [Sat, 6 Apr 2013 20:15:21 +0000 (22:15 +0200)]
Fix typos

Git-Dch: Ignore

11 years agoGenerate coverage xml
Guido Günther [Fri, 29 Mar 2013 12:15:18 +0000 (13:15 +0100)]
Generate coverage xml

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

11 years agoAdd urgency management.
Daniel Dehennin [Mon, 21 Nov 2011 18:57:18 +0000 (19:57 +0100)]
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.

11 years agoAdd option to manage distribution fields for non snapshot mode.
Daniel Dehennin [Mon, 21 Nov 2011 14:44:41 +0000 (15:44 +0100)]
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

11 years agoMove DscFile to separate module
Guido Günther [Fri, 29 Mar 2013 14:35:55 +0000 (15:35 +0100)]
Move DscFile to separate module

11 years agoMove DebianPkgPolicy to separate module
Guido Günther [Fri, 29 Mar 2013 14:24:02 +0000 (15:24 +0100)]
Move DebianPkgPolicy to separate module

11 years agoMove debian/changelog manipulation to gbp.deb.changelog.ChangeLog.
Daniel Dehennin [Wed, 30 May 2012 19:30:45 +0000 (21:30 +0200)]
Move debian/changelog manipulation to gbp.deb.changelog.ChangeLog.

spawn_dch switch gbp.command.wrappers.Command.

* gbp/deb/changelog.py (ChangeLog.spawn_dch): static method adapted from
  gbp.scripts.dch and converted to gbp.command_wrappers.Command.
  (add_entry): New method adapted from
  gbp.scripts.dch.add_changelog_entry.
  (add_section): New method adapted from
  gbp.scripts.dch.add_changelog_entry. Remove DebianGitRepository and
  options, this has nothing to do with changelog management.

* tests/test_Changelog.py: Test new methods.

* gbp/scripts/dch.py: Remove useless functions: system(), spawn_dch(),
  add_changelog_section() and add_changelog_entry().
  Update calls accordingly.
  (fixup_trailer): Use spawn_dch() method of ChangeLog class.
  (process_options): dch_options became a list.
  (main): Use add_section() and add_entry() methods of ChangeLog object.
  Take care of upstream version since ChangeLog.add_section() does not
  manage it anymore.
  Update exception handling, ChangeLog.spawn_dch() can raise
  "CommandExecFailed" exception.

Closes: #672954

11 years agoDocument changes and release 0.6.0~git20130329 debian/0.6.0_git20130329
Guido Günther [Fri, 29 Mar 2013 11:35:52 +0000 (12:35 +0100)]
Document changes and release 0.6.0~git20130329

11 years agoInclude the name of the package being built in the debian tag message
Daniel Kahn Gillmor [Tue, 26 Mar 2013 21:41:53 +0000 (17:41 -0400)]
Include the name of the package being built in the debian tag message

Currently, the message in the debian tag is just:

  "Debian release %s" % cp.version

This is a bad idea, because it means that the signed message itself
contains no mention of the project that is being worked on.

Since all git repositories are conceptually the same git repository
(some just have commits that others don't have), a malicious attacker
could inject tags from project A into the repository for project B and
the original developer's signature on those tags would be intact.

This is potentially a security problem.  For example: if there are
automated build systems that pull from a repo and verify signed tags
made by a known developer (and that developer contributes to multiple
projects), this conflation could be used to make those systems build
packages from an entirely other project.

The attached patch enforces the inclusion of the name of the package
into the tag's message.

Closes: #704018

11 years agotests.test_GitRepository: import and setup gbp.log
Markus Lehtonen [Mon, 3 Dec 2012 08:29:55 +0000 (10:29 +0200)]
tests.test_GitRepository: import and setup gbp.log

In order to initialize gbp logging properly. Fixes false positives when
the GitRepository tests are run alone.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agoFix docstring
Guido Günther [Wed, 27 Mar 2013 18:18:32 +0000 (19:18 +0100)]
Fix docstring

11 years agoSplit out building a debian version from an upstream commit
Guido Günther [Wed, 27 Mar 2013 15:58:47 +0000 (16:58 +0100)]
Split out building a debian version from an upstream commit

based on a patch by Daniel Dehennin

Needed for #672954, #646684, #669171

11 years agoComponentTestBase: capability to check files of repo
Markus Lehtonen [Fri, 4 Jan 2013 16:39:43 +0000 (18:39 +0200)]
ComponentTestBase: capability to check files of repo

Makes it possible to check that the correct files are present in
the working copy of the repo.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agoGitArgs: utilize the add() method in other add_X methods
Markus Lehtonen [Wed, 8 Aug 2012 06:44:20 +0000 (09:44 +0300)]
GitArgs: utilize the add() method in other add_X methods

Only use the add() method for updating the argument list. This makes the
code more robust and makes all add method variant types support the same
argument types.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agoGitRepository/_cmd_has_feature: more intelligent parsing
Markus Lehtonen [Fri, 8 Mar 2013 09:48:23 +0000 (11:48 +0200)]
GitRepository/_cmd_has_feature: more intelligent parsing

More intelligent parsing of the git output (man page). Try to
parse optional options like '--[no-]standard-notes' of git-show
correctly. In this example both 'no-standard-notes' and 'standard-notes'
would be available.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agosetup: possibility to skip nosetest requirements
Markus Lehtonen [Wed, 6 Mar 2013 09:11:56 +0000 (11:11 +0200)]
setup: possibility to skip nosetest requirements

Makes it possible to not require test requirements by defining
WITHOUT_NOSETESTS environment variable when running setup.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agotests: skip test_Changelog if 'dch' tool is not available
Markus Lehtonen [Tue, 5 Mar 2013 15:49:06 +0000 (17:49 +0200)]
tests: skip test_Changelog if 'dch' tool is not available

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agotests/component: pylint fixes
Markus Lehtonen [Thu, 17 Jan 2013 09:43:49 +0000 (11:43 +0200)]
tests/component: pylint fixes

Add module docstring and wrap one overlong line.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agogbp-pull: update tags, too
Markus Lehtonen [Wed, 27 Feb 2013 10:28:11 +0000 (12:28 +0200)]
gbp-pull: update tags, too

To make sure that the tags are in sync with the remote.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agopackaging: Add man as dependency
Zhang Qiang [Fri, 26 Oct 2012 18:21:18 +0000 (14:21 -0400)]
packaging: Add man as dependency

Required by GitRepository._cmd_has_feature() method.

Signed-off-by: Zhang Qiang <qiang.z.zhang@intel.com>
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Guido Günther <agx@sigxcpu.org>
11 years agoComponentTestBase: close streamhandler when stopping log capture
Markus Lehtonen [Tue, 5 Mar 2013 15:46:21 +0000 (17:46 +0200)]
ComponentTestBase: close streamhandler when stopping log capture

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Guido Günther <agx@sigxcpu.org>
11 years agoPurging of the build dir should be configurable via a config file
Guido Günther [Fri, 22 Mar 2013 17:14:33 +0000 (18:14 +0100)]
Purging of the build dir should be configurable via a config file

so introdice --git[-no]-purge which is consistent with the other
boolean options and deprecate --git-dont-purge.

Closes: #702200

11 years agoAllow for upper case characters in the upstream version
Guido Günther [Fri, 22 Mar 2013 16:34:15 +0000 (17:34 +0100)]
Allow for upper case characters in the upstream version

Closes: #703694

11 years agoBetter document how one derives from PkgTypes
Guido Günther [Fri, 22 Mar 2013 16:59:14 +0000 (17:59 +0100)]
Better document how one derives from PkgTypes

11 years agoReturn boolean types from is_ methods
Guido Günther [Fri, 22 Mar 2013 16:47:07 +0000 (17:47 +0100)]
Return boolean types from is_ methods

instead of a match object or None

11 years agoRemove unused imports
Guido Günther [Fri, 22 Mar 2013 16:32:28 +0000 (17:32 +0100)]
Remove unused imports

11 years agoDocument changes and release 0.6.0~git20121125 debian/0.6.0_git20130314
Guido Günther [Thu, 14 Mar 2013 06:18:51 +0000 (07:18 +0100)]
Document changes and release 0.6.0~git20121125

11 years agoexamples: fix logging
Guido Günther [Thu, 14 Mar 2013 06:13:20 +0000 (07:13 +0100)]
examples: fix logging

Thanks: Carsten Schoenert

11 years agoFix typo
Guido Günther [Wed, 13 Feb 2013 06:52:05 +0000 (07:52 +0100)]
Fix typo

Thanks: Andreas Beckmann
Closes: #700443

11 years agoAdd missing --git-
Guido Günther [Sat, 2 Feb 2013 15:20:27 +0000 (16:20 +0100)]
Add missing --git-

LP: #1112831

11 years agogbp-pull: fix --depth cmdline option
Markus Lehtonen [Tue, 15 Jan 2013 15:20:29 +0000 (17:20 +0200)]
gbp-pull: fix --depth cmdline option

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agogbp-clone: fix return value in case of GitRepositoryError
Markus Lehtonen [Tue, 15 Jan 2013 13:17:28 +0000 (15:17 +0200)]
gbp-clone: fix return value in case of GitRepositoryError

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agopq/apply_and_commit_patch: fix date parsing
Markus Lehtonen [Tue, 15 Jan 2013 12:54:47 +0000 (14:54 +0200)]
pq/apply_and_commit_patch: fix date parsing

GitModifier doesn't support dates in the format used in git format-patch
emails.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agoMove over import dsc test from external test suite
Guido Günther [Wed, 16 Jan 2013 08:25:07 +0000 (09:25 +0100)]
Move over import dsc test from external test suite

Move over the first test from our external (shell based) test suite to
the component tests.

11 years agoAdd test data submodule
Guido Günther [Wed, 16 Jan 2013 09:00:33 +0000 (10:00 +0100)]
Add test data submodule

11 years agoAdd component test initialization
Guido Günther [Wed, 16 Jan 2013 07:59:58 +0000 (08:59 +0100)]
Add component test initialization

very heavily based on code by Markus Lehtonen

11 years agotests.testutils: baseclass for testing commandline tools
Markus Lehtonen [Wed, 31 Oct 2012 15:27:58 +0000 (17:27 +0200)]
tests.testutils: baseclass for testing commandline tools

Introduce a new baseclass to be utilized in testing the git-buildpackage
command line tools.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agobuildpackage: add 'force' option to write_wc()
Markus Lehtonen [Fri, 6 Jul 2012 07:00:27 +0000 (10:00 +0300)]
buildpackage: add 'force' option to write_wc()

To select whether to include file that would otherwise be ignored by
gitignore (.gitignore or .git/info/exclude).

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agopq: do author guessing outside the apply_patch functions
Markus Lehtonen [Tue, 27 Nov 2012 15:49:23 +0000 (17:49 +0200)]
pq: do author guessing outside the apply_patch functions

Call the author parsing/guessing function outside the apply patch
functions. This way, the caller can decide when to do the guessing, and
with which parameters. Now the apply_patch functions do what their name
suggests.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agolog: make color setting a tristate on/off/auto
Markus Lehtonen [Tue, 27 Nov 2012 09:30:33 +0000 (11:30 +0200)]
log: make color setting a tristate on/off/auto

Makes it possible to force color=on e.g. when piping output. Also, moves
all 'auto' logic to one single place, i.e. the streamhandler.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agoDocument --git-pristine-tar-commit
Guido Günther [Mon, 3 Dec 2012 03:20:23 +0000 (04:20 +0100)]
Document --git-pristine-tar-commit

11 years agoTristate: drop broken and unused is_valid_state() method
Markus Lehtonen [Tue, 27 Nov 2012 09:25:28 +0000 (11:25 +0200)]
Tristate: drop broken and unused is_valid_state() method

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agoTristate: allow to init from another Tristate object
Markus Lehtonen [Tue, 27 Nov 2012 09:24:19 +0000 (11:24 +0200)]
Tristate: allow to init from another Tristate object

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agoCheck the sha1 doesn't exceed 40 bytes
Guido Günther [Tue, 27 Nov 2012 17:03:35 +0000 (18:03 +0100)]
Check the sha1 doesn't exceed 40 bytes

11 years agoGitRepository/strip_sha1: fix length checking
Markus Lehtonen [Tue, 27 Nov 2012 07:37:32 +0000 (09:37 +0200)]
GitRepository/strip_sha1: fix length checking

Accept longer sha1 than what was asked for. The length option given to
git is merely a "wish to get a sha1 of this length". Git may also return
longer sha1 if truncating to given length would give
ambiguous/non-unique sha1.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agogit-dch: Allow to create changelogs when not on a branch
Guido Günther [Sun, 25 Nov 2012 18:06:50 +0000 (19:06 +0100)]
git-dch: Allow to create changelogs when not on a branch

This makes snapshot changelog generation e.g. within jenkins builds
simpler since jenkins by defaults checkouts out the commit without
creating a branch.

11 years agogbp-create-remote-repo: Set HEAD in remote repo
Guido Günther [Sun, 25 Nov 2012 17:15:20 +0000 (18:15 +0100)]
gbp-create-remote-repo: Set HEAD in remote repo

to debian branch

Closes: #692006

11 years agogbp.log: Improve error message on broken color lists
Guido Günther [Sun, 25 Nov 2012 16:49:03 +0000 (17:49 +0100)]
gbp.log: Improve error message on broken color lists

11 years agoNew configuration option for setting the output color scheme
Markus Lehtonen [Tue, 13 Nov 2012 09:50:34 +0000 (11:50 +0200)]
New configuration option for setting the output color scheme

Adds a new command line and config file option 'color-scheme' for
selecting the colors used in log output.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agolog: add support for setting the color scheme
Markus Lehtonen [Tue, 13 Nov 2012 09:39:25 +0000 (11:39 +0200)]
log: add support for setting the color scheme

Implements changeable color schemes in the gbp.log module. Color scheme
is given as a colon-separated list, with one color for each log level:
'<debug_color>:<info_color>:<warning_colro>:<error_color>'. Colors can
be given as an integer number (ANSI terminal color code) or color name
(.e.g 'red').  Missing or empty fields are interpreted as using the
default color for that log level.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agogbp.log: lowercase the levelname
Guido Günther [Sun, 25 Nov 2012 16:09:27 +0000 (17:09 +0100)]
gbp.log: lowercase the levelname

too match the output before the switch to Python's logging module

11 years agolog: rewrite the module to use Python logging module
Markus Lehtonen [Thu, 15 Nov 2012 12:19:28 +0000 (14:19 +0200)]
log: rewrite the module to use Python logging module

Replaces the Logger with a new one, derived from the Logger class of the
Python standard library. Colorized output is handled by a separate
handler class.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agogbp-pq: Improve patch header write out
Guido Günther [Sun, 25 Nov 2012 12:53:28 +0000 (13:53 +0100)]
gbp-pq: Improve patch header write out

Avoid trailing new lines in the patch header when reexporing patches.
to avoid diffs when nothing changed.

11 years agoIgnore rope project files
Guido Günther [Sun, 25 Nov 2012 09:30:23 +0000 (10:30 +0100)]
Ignore rope project files

as generated by ropemacs

11 years agoDocument changes and release 0.6.0~git20121124 debian/0.6.0_git20121124
Guido Günther [Sat, 24 Nov 2012 13:59:54 +0000 (14:59 +0100)]
Document changes and release 0.6.0~git20121124

11 years agogit-import-dscs: Properly catch import errors
Guido Günther [Sat, 24 Nov 2012 13:25:52 +0000 (14:25 +0100)]
git-import-dscs: Properly catch import errors

Closes: #694113

11 years agoRemove unused imports and adjust formatting
Guido Günther [Sat, 24 Nov 2012 13:27:30 +0000 (14:27 +0100)]
Remove unused imports and adjust formatting

Git-Dch: Ignore

11 years agogbp-pq: don't use plural form when there's only one try left
Guido Günther [Sat, 24 Nov 2012 12:10:35 +0000 (13:10 +0100)]
gbp-pq: don't use plural form when there's only one try left

11 years agoGitRepository/has_submodules: use correct .gitmodules file
Markus Lehtonen [Mon, 29 Oct 2012 08:37:02 +0000 (10:37 +0200)]
GitRepository/has_submodules: use correct .gitmodules file

Examine .gitmodules from the "root directory" of the repo, not the
current working directory. Fixes has_submodules() method, when called
from arbitrary cwd.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agoGitRepository/get_commit_info: support tags
Markus Lehtonen [Tue, 30 Oct 2012 06:56:19 +0000 (08:56 +0200)]
GitRepository/get_commit_info: support tags

Dereference the given revision to a commit. Fixes get_commit_info() when
called for a tag.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agoTest gbp.pq.common.write_patch
Guido Günther [Fri, 23 Nov 2012 23:33:54 +0000 (00:33 +0100)]
Test gbp.pq.common.write_patch

11 years agoOutput test results in xunit format too
Guido Günther [Sat, 24 Nov 2012 10:17:18 +0000 (11:17 +0100)]
Output test results in xunit format too

11 years agoGitRepository/get_submodules: use correct path
Markus Lehtonen [Thu, 12 Jul 2012 08:26:55 +0000 (11:26 +0300)]
GitRepository/get_submodules: use correct path

By default, run git in the repo path, not current cwd. Also, now returns
submodule paths without leading './'.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agoGitRepository/get_commits: more flexible revision ranges
Markus Lehtonen [Thu, 8 Nov 2012 06:22:26 +0000 (08:22 +0200)]
GitRepository/get_commits: more flexible revision ranges

Support getting the complete history of an arbitrary commit-ish
(since=None, until=COMMIT-ISH). Formerly this was only possible for the
current git HEAD. Now, get_commits(since=None, until='COMMIT')
translates to 'git log COMMIT'.

Also, for consistency, add support for getting the history from an
arbitrary commit until the current HEAD (since=COMMIT-ISH, until=None).

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agoimport-orig: remove dead GbpNothingImported exception
Markus Lehtonen [Thu, 8 Nov 2012 16:45:01 +0000 (18:45 +0200)]
import-orig: remove dead GbpNothingImported exception

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agoimport-orig: remove dead if statement
Markus Lehtonen [Thu, 8 Nov 2012 15:24:47 +0000 (17:24 +0200)]
import-orig: remove dead if statement

GitRepository.commit_dir() never returns empty objects. It raises an
exception, instead.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
11 years agoAdd sha1 stripping in a single place
Guido Günther [Fri, 23 Nov 2012 18:04:25 +0000 (19:04 +0100)]
Add sha1 stripping in a single place

so we can easily sanity check the result.

11 years agoTest if setting a topic works
Guido Günther [Fri, 23 Nov 2012 17:52:06 +0000 (18:52 +0100)]
Test if setting a topic works

11 years agopq: Allow to pass in custom fucntion to fetch authorship information
Guido Günther [Fri, 23 Nov 2012 17:32:34 +0000 (18:32 +0100)]
pq: Allow to pass in custom fucntion to fetch authorship information

so the RPM based tools don't need to rely on a control file but
can e.g. look at the spec file.

11 years agoTest apply_and_commit_patch
Guido Günther [Fri, 23 Nov 2012 17:26:02 +0000 (18:26 +0100)]
Test apply_and_commit_patch