Guido Günther [Sat, 29 Jun 2013 11:06:43 +0000 (13:06 +0200)]
gbp.git.Repository.get_branch(): use _git_command
instead of the deprecated _git_inout and clarify the return codes and
exceptions raised.
Guido Günther [Sat, 29 Jun 2013 10:40:57 +0000 (12:40 +0200)]
.gitignore docbook xref
Git-Dch: Ignore
Guido Günther [Sat, 29 Jun 2013 10:38:42 +0000 (12:38 +0200)]
Git.Repository.__git_inout: Close all other file descriptors
No need to leak fds to the child.
Guido Günther [Sat, 29 Jun 2013 10:38:42 +0000 (12:38 +0200)]
Git.Repository.__git_inout: properly set stdin
We should set stdin to subprocess.PIPE when piping input according
to the subprocess docs.
Guido Günther [Thu, 27 Jun 2013 17:14:38 +0000 (19:14 +0200)]
Use has_key
It's shorter and get's rid of the unused dummy variable.
Guido Günther [Thu, 27 Jun 2013 17:08:59 +0000 (19:08 +0200)]
Document gbp's help option
Guido Günther [Thu, 27 Jun 2013 09:23:09 +0000 (11:23 +0200)]
Document changes and release 0.6.1
Guido Günther [Thu, 27 Jun 2013 07:36:10 +0000 (09:36 +0200)]
Depend on python-pkg-resources
Closes: #714238
Guido Günther [Thu, 27 Jun 2013 07:34:46 +0000 (09:34 +0200)]
Split {Build-,}Deps per line
and sort alphabetically
Guido Günther [Wed, 26 Jun 2013 14:39:55 +0000 (16:39 +0200)]
Document changes and release 0.6.0
Guido Günther [Wed, 26 Jun 2013 17:14:32 +0000 (19:14 +0200)]
import-dsc: print filename instead of object name
Guido Günther [Wed, 26 Jun 2013 16:43:49 +0000 (18:43 +0200)]
config: Don't fill in the parser with all defaults
There's no need to fill the parser with all the built in defaults since
we can simply copy them to the config from the class dict. This allows
us to first set the values from the old {git,gbp}-* commands and then
only overwrite changed values from the newer "gbp <command>" versions.
Otherwise we'd overwite all old style config with the new style one.
This also fixes the problem where the default section wouldn't be read
at all if the command doesn't even have an empty section in any gbp.conf
file.
Guido Günther [Wed, 26 Jun 2013 16:36:20 +0000 (18:36 +0200)]
Fix typo
Git-Dch: Ignore
Guido Günther [Wed, 26 Jun 2013 16:01:09 +0000 (18:01 +0200)]
gbp-import-dscs: invoke gbp import-dsc
instead of git-import-dsc
Guido Günther [Wed, 26 Jun 2013 15:15:19 +0000 (17:15 +0200)]
Consistently call gbp the supercommand
and robustify against invalid modules names.
Guido Günther [Wed, 26 Jun 2013 14:59:52 +0000 (16:59 +0200)]
gbp: support --help
Guido Günther [Wed, 26 Jun 2013 11:47:42 +0000 (13:47 +0200)]
Update package description
Guido Günther [Wed, 26 Jun 2013 11:44:26 +0000 (13:44 +0200)]
NEWS: add a note about the new gbp super command
Guido Günther [Wed, 26 Jun 2013 11:32:32 +0000 (13:32 +0200)]
Rename the sgml files from git- to gbp-
Guido Günther [Wed, 26 Jun 2013 11:28:26 +0000 (13:28 +0200)]
gbp.conf: Use command names instead of {git,gbp}-
Guido Günther [Wed, 26 Jun 2013 11:09:51 +0000 (13:09 +0200)]
docs: Rename the entities from &git-<command>; to &gbp-<command>;
Guido Günther [Wed, 26 Jun 2013 10:54:48 +0000 (12:54 +0200)]
manpages: Changes references from git- to gbp-
Guido Günther [Wed, 26 Jun 2013 10:27:05 +0000 (12:27 +0200)]
docs: Use gbp <command> instead of {git,gbp}-<command>
Guido Günther [Wed, 26 Jun 2013 09:56:38 +0000 (11:56 +0200)]
Add gbp manpage
Guido Günther [Wed, 26 Jun 2013 09:42:27 +0000 (11:42 +0200)]
Bash complete on "gbp <command>" too
Guido Günther [Wed, 26 Jun 2013 10:09:31 +0000 (12:09 +0200)]
Git-Ignore generated gbp.conf.5 too
Guido Günther [Wed, 19 Jun 2013 09:38:21 +0000 (11:38 +0200)]
GbpOptionParser: add test for 'filter' option handling
Guido Günther [Tue, 18 Jun 2013 22:25:53 +0000 (00:25 +0200)]
GbpOptionParser: Make sure we parse the old config sections
For backward compatibility between {gbp,git}-<subcommand> and "gbp
<subcommand>" make sure we parse the former sections if using the later.
Guido Günther [Wed, 19 Jun 2013 09:31:45 +0000 (11:31 +0200)]
GbpOptionParser: Make sure we access the GbpOptionParser*'s default dict
and not the one from the OptionParser. The instance's default dict this
gets reset to empty when invoking OptionParser.__init__.
Guido Günther [Sun, 8 Jan 2012 18:35:34 +0000 (19:35 +0100)]
Add wrapper for all gbp commands
So like git you can now use gbp <command> instead of git-<command> or
gbp-<command>. The manpages and docs aren't adjusted yet.
Markus Lehtonen [Thu, 29 Nov 2012 17:17:59 +0000 (19:17 +0200)]
GitRepository/diff: allow single object
Allow diffing a single object, e.g. getting diff from single commit.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Guido Günther [Tue, 11 Jun 2013 13:37:22 +0000 (15:37 +0200)]
Simplify expression
Git-Dch: Ignore
Guido Günther [Tue, 11 Jun 2013 13:20:44 +0000 (15:20 +0200)]
GitRepository.get_subject: use get_commit_info
This kills another _git_getoutput. Also deprecate the method since we
don't need to special case the subject.
Markus Lehtonen [Mon, 6 May 2013 12:19:58 +0000 (15:19 +0300)]
buildpackage: use get_commit_info() instead of get_subject()
Utilize the get_commit_info() method of GitRepository instead of the
deprecated get_subject().
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Guido Günther [Tue, 11 Jun 2013 13:15:58 +0000 (15:15 +0200)]
Remove unused imports
Markus Lehtonen [Wed, 28 Nov 2012 08:43:20 +0000 (10:43 +0200)]
import-orig: keep working copy in sync with branch HEAD
Update working copy and index (to branch HEAD) if we modify the
currently checked-out branch. Otherwise the repository is left in
unclean state when the current branch is upstream or pristine-tar and
the '--no-merge' option is used.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Markus Lehtonen [Tue, 7 Aug 2012 13:22:00 +0000 (16:22 +0300)]
GitRepository/get_commit_info: add patchname to info
Add a new 'patchname' field to the information returned by
get_commit_info. That is, the subject in a sanitized format, similar to
what git-format-patch uses.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Markus Lehtonen [Thu, 29 Nov 2012 17:11:21 +0000 (19:11 +0200)]
gitmodifier: make the datetime object always have timezone
To be consistent with the date property and for easier compatibility
with git dates.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Guido Günther [Thu, 30 May 2013 13:24:32 +0000 (15:24 +0200)]
Document changes and release 0.6.0~git20130630
Guido Günther [Sun, 5 May 2013 10:59:56 +0000 (12:59 +0200)]
Add Jenkins Scratchbuilder example
It's a simple script that can be used to build Debian packages via gbp
and Jenkins.
Gaudenz Steinlin [Fri, 17 May 2013 12:44:47 +0000 (14:44 +0200)]
git-buildpackage: Unbreak overlay mode
Signed-off-by: Guido Günther <agx@sigxcpu.org>
Closes: #708636
Guido Günther [Wed, 8 May 2013 14:40:41 +0000 (16:40 +0200)]
GitRepository: Use LC_ALL=C when checking features
This fixes the doctest and also makes sure we use an up to date manpage.
Thanks: Daniel Dehennin for the report
Guido Günther [Mon, 6 May 2013 17:26:22 +0000 (19:26 +0200)]
Document changes and release 0.6.0~git20130506
Guido Günther [Sat, 4 May 2013 12:13:07 +0000 (14:13 +0200)]
manpages: Document gbp-pull's --ignore-branch option
Guido Günther [Sat, 4 May 2013 12:00:05 +0000 (14:00 +0200)]
gbp-pull: Fix typo in help output
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.
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.
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
Guido Günther [Tue, 30 Apr 2013 14:57:38 +0000 (16:57 +0200)]
trivial: simplify option assignment
to ease readability
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
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
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
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.
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.
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.
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
Guido Günther [Fri, 26 Apr 2013 21:28:16 +0000 (23:28 +0200)]
10_test_get_upstream_tree: Fix test descriptions
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
Guido Günther [Wed, 24 Apr 2013 05:10:56 +0000 (07:10 +0200)]
Silence _git_command
by using _git_inout instead of GitCommand
Guido Günther [Wed, 24 Apr 2013 05:10:11 +0000 (07:10 +0200)]
Silence git clone
by using __git_inout instead of GitCommand
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
Guido Günther [Sun, 14 Apr 2013 11:02:38 +0000 (13:02 +0200)]
Silence git init
to make the test suite less verbose
Guido Günther [Sat, 13 Apr 2013 17:37:25 +0000 (19:37 +0200)]
Document changes and release 0.6.0~git20130414
Guido Günther [Sat, 13 Apr 2013 17:36:04 +0000 (19:36 +0200)]
Don't try access source before it's filled
Guido Günther [Sat, 13 Apr 2013 12:28:39 +0000 (14:28 +0200)]
Document changes and release 0.6.0~git20130413
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
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
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.
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
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
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.
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.
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>
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>
Guido Günther [Sat, 6 Apr 2013 20:15:21 +0000 (22:15 +0200)]
Fix typos
Git-Dch: Ignore
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
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.
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
Guido Günther [Fri, 29 Mar 2013 14:35:55 +0000 (15:35 +0100)]
Move DscFile to separate module
Guido Günther [Fri, 29 Mar 2013 14:24:02 +0000 (15:24 +0100)]
Move DebianPkgPolicy to separate module
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