tools/git-buildpackage.git
11 years agoDocument changes and release 0.6.0~git20130506 debian/0.6.0_git20130506
Guido Günther [Mon, 6 May 2013 17:26:22 +0000 (19:26 +0200)]
Document changes and release 0.6.0~git20130506

11 years agomanpages: Document gbp-pull's --ignore-branch option
Guido Günther [Sat, 4 May 2013 12:13:07 +0000 (14:13 +0200)]
manpages: Document gbp-pull's --ignore-branch option

11 years agogbp-pull: Fix typo in help output
Guido Günther [Sat, 4 May 2013 12:00:05 +0000 (14:00 +0200)]
gbp-pull: Fix typo in help output

11 years agoGitRepository Use _git_inout in get_branch
Guido Günther [Thu, 2 May 2013 20:20:02 +0000 (22:20 +0200)]
GitRepository Use _git_inout in get_branch

to suppress the confusiong "fatal: ref HEAD is not a symbolic ref". We
alrady put out a more descriptive error message. This makes using
--ignore-branch look far less dangerous.

11 years agoAdd --ignore-branch to gbp-pull
Guido Günther [Thu, 2 May 2013 19:46:47 +0000 (21:46 +0200)]
Add --ignore-branch to gbp-pull

This allows us to fetch upstream and pristine-tar even when in detached
head state. This can be usefull when e.g. building in jenkins which uses
a detached head by default.

11 years agodch: make sure branch is always defined
Guido Günther [Thu, 2 May 2013 19:35:10 +0000 (21:35 +0200)]
dch: make sure branch is always defined

This fixes a problem when running git-dch form a detached HEAD

11 years agotrivial: simplify option assignment
Guido Günther [Tue, 30 Apr 2013 14:57:38 +0000 (16:57 +0200)]
trivial: simplify option assignment

to ease readability

11 years agoSilence test_debian_missing_author
Guido Günther [Tue, 30 Apr 2013 14:49:34 +0000 (16:49 +0200)]
Silence test_debian_missing_author

and better use the output for verification

11 years agoSilence dpkg --compare-versions
Guido Günther [Mon, 29 Apr 2013 20:33:37 +0000 (22:33 +0200)]
Silence dpkg --compare-versions

and add the error detail to the exception message. This silences the
testsuite and makes sure we have error message and exception output in
sync.

11 years agoUse Popen.communicate instead of subprocess call
Guido Günther [Mon, 29 Apr 2013 17:59:12 +0000 (19:59 +0200)]
Use Popen.communicate instead of subprocess call

so we can capture stderr and use it in error messages intead of spewing
it on the console.

11 years agoMake parse_dsc a classmethod of DscFile
Guido Günther [Mon, 29 Apr 2013 18:55:40 +0000 (20:55 +0200)]
Make parse_dsc a classmethod of DscFile

so we have the object creation close to the object itself.

11 years agoChangeLog: Remove is_native
Guido Günther [Mon, 29 Apr 2013 12:45:44 +0000 (14:45 +0200)]
ChangeLog: Remove is_native

to avoid accidental usage. Use DebianSource.is_native instead.

11 years agodch: Use DebianSource.is_native
Guido Günther [Mon, 29 Apr 2013 12:31:43 +0000 (14:31 +0200)]
dch: Use DebianSource.is_native

instead of ChangeLog.is_native since the former used
debian/source/format in favor of debian/changelog.

11 years agoRevert "Use Popen.communicate instead of subprocess call"
Guido Günther [Mon, 29 Apr 2013 12:31:37 +0000 (14:31 +0200)]
Revert "Use Popen.communicate instead of subprocess call"

This reverts commit 0c582cd827f164168a313e0bb4eabf9487bdd088.

11 years agoUse Popen.communicate instead of subprocess call
Guido Günther [Mon, 29 Apr 2013 12:30:31 +0000 (14:30 +0200)]
Use Popen.communicate instead of subprocess call

so we can caputure stderr and pass it along with any errors.

11 years agoGitRepository.has_feature: capture stderr
Guido Günther [Sat, 27 Apr 2013 20:26:36 +0000 (22:26 +0200)]
GitRepository.has_feature: capture stderr

to avoid spurious output on the console and add the error message to the
exception intead.

11 years agoGitRepository.commit_dir: raise GitRepositoryError instead of GbpError
Guido Günther [Sat, 27 Apr 2013 20:20:04 +0000 (22:20 +0200)]
GitRepository.commit_dir: raise GitRepositoryError instead of GbpError

and make sure the callers forward the error properly

11 years agoSilence GitRepository.write_tree
Guido Günther [Sat, 27 Apr 2013 20:15:43 +0000 (22:15 +0200)]
Silence GitRepository.write_tree

but add any error output to the exception instead. All callers have been
audited to properly output the message if needed.

11 years agocommand_wrappers: allow to silence __call__
Guido Günther [Sat, 27 Apr 2013 20:02:18 +0000 (22:02 +0200)]
command_wrappers: allow to silence __call__

and use that in the doctest to get rid of the spurious output

11 years agoDiscard git mailinfo's error message
Guido Günther [Fri, 26 Apr 2013 22:35:19 +0000 (00:35 +0200)]
Discard git mailinfo's error message

since we don't expect it to succeed.

11 years agoSilence GitRepository.grep_log
Guido Günther [Fri, 26 Apr 2013 22:12:26 +0000 (00:12 +0200)]
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.

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>