Guido Günther [Thu, 14 Mar 2013 06:18:51 +0000 (07:18 +0100)]
Document changes and release 0.6.0~git20121125
Guido Günther [Thu, 14 Mar 2013 06:13:20 +0000 (07:13 +0100)]
examples: fix logging
Thanks: Carsten Schoenert
Guido Günther [Wed, 13 Feb 2013 06:52:05 +0000 (07:52 +0100)]
Fix typo
Thanks: Andreas Beckmann
Closes: #700443
Guido Günther [Sat, 2 Feb 2013 15:20:27 +0000 (16:20 +0100)]
Add missing --git-
LP: #1112831
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>
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>
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>
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.
Guido Günther [Wed, 16 Jan 2013 09:00:33 +0000 (10:00 +0100)]
Add test data submodule
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
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>
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>
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>
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>
Guido Günther [Mon, 3 Dec 2012 03:20:23 +0000 (04:20 +0100)]
Document --git-pristine-tar-commit
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>
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>
Guido Günther [Tue, 27 Nov 2012 17:03:35 +0000 (18:03 +0100)]
Check the sha1 doesn't exceed 40 bytes
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>
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.
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
Guido Günther [Sun, 25 Nov 2012 16:49:03 +0000 (17:49 +0100)]
gbp.log: Improve error message on broken color lists
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>
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>
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
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>
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.
Guido Günther [Sun, 25 Nov 2012 09:30:23 +0000 (10:30 +0100)]
Ignore rope project files
as generated by ropemacs
Guido Günther [Sat, 24 Nov 2012 13:59:54 +0000 (14:59 +0100)]
Document changes and release 0.6.0~git20121124
Guido Günther [Sat, 24 Nov 2012 13:25:52 +0000 (14:25 +0100)]
git-import-dscs: Properly catch import errors
Closes: #694113
Guido Günther [Sat, 24 Nov 2012 13:27:30 +0000 (14:27 +0100)]
Remove unused imports and adjust formatting
Git-Dch: Ignore
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
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>
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>
Guido Günther [Fri, 23 Nov 2012 23:33:54 +0000 (00:33 +0100)]
Test gbp.pq.common.write_patch
Guido Günther [Sat, 24 Nov 2012 10:17:18 +0000 (11:17 +0100)]
Output test results in xunit format too
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>
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>
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>
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>
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.
Guido Günther [Fri, 23 Nov 2012 17:52:06 +0000 (18:52 +0100)]
Test if setting a topic works
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.
Guido Günther [Fri, 23 Nov 2012 17:26:02 +0000 (18:26 +0100)]
Test apply_and_commit_patch
Guido Günther [Fri, 23 Nov 2012 17:25:47 +0000 (18:25 +0100)]
Use an absolute path when parsing the control file
so we con't accidentally parse a file from another dir.
Guido Günther [Fri, 23 Nov 2012 17:24:32 +0000 (18:24 +0100)]
testutils: create missing directories when adding a file
Markus Lehtonen [Fri, 9 Nov 2012 05:59:18 +0000 (07:59 +0200)]
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>
Markus Lehtonen [Tue, 6 Nov 2012 17:01:01 +0000 (19:01 +0200)]
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>
Markus Lehtonen [Wed, 14 Nov 2012 13:39:52 +0000 (15:39 +0200)]
notifications.py: remove unused import
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Markus Lehtonen [Wed, 14 Nov 2012 13:23:48 +0000 (15:23 +0200)]
command_wrappers: suppress some pylint warnings
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Guido Günther [Fri, 23 Nov 2012 07:01:19 +0000 (08:01 +0100)]
Add issing git- prefix to --color and --notify options
Thanks: Filippo Rusconi
Closes: #693978
Guido Günther [Thu, 8 Nov 2012 22:43:18 +0000 (23:43 +0100)]
Remove unused import
Guido Günther [Thu, 8 Nov 2012 22:05:30 +0000 (23:05 +0100)]
Minor git-import-orig manpage improvements
Guido Günther [Thu, 8 Nov 2012 21:20:26 +0000 (22:20 +0100)]
GbpError accepts an error message
so no need to print it separately
Guido Günther [Mon, 5 Nov 2012 19:39:24 +0000 (20:39 +0100)]
Allow to remove the orig tarball symlink
that's used make pristine-tar see the correct orig tarball name.
Closes: #692401
Markus Lehtonen [Wed, 26 Sep 2012 12:07:56 +0000 (15:07 +0300)]
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>
Markus Lehtonen [Fri, 14 Sep 2012 14:38:55 +0000 (17:38 +0300)]
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>
Ed Bartosh [Tue, 5 Jun 2012 11:59:22 +0000 (14:59 +0300)]
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>
Markus Lehtonen [Thu, 5 Apr 2012 11:51:18 +0000 (14:51 +0300)]
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>
Markus Lehtonen [Thu, 27 Sep 2012 09:33:10 +0000 (12:33 +0300)]
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>
Dmitrijs Ledkovs [Sun, 4 Nov 2012 17:56:29 +0000 (17:56 +0000)]
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>
Guido Günther [Thu, 25 Oct 2012 16:58:20 +0000 (18:58 +0200)]
Print number of tries left
Guido Günther [Mon, 15 Oct 2012 14:02:22 +0000 (16:02 +0200)]
Add support dch's --security option
Guido Günther [Wed, 19 Sep 2012 20:28:56 +0000 (22:28 +0200)]
PEP-8 and pyflakes cleanups
Guido Günther [Sun, 26 Aug 2012 15:57:07 +0000 (17:57 +0200)]
Add debian/source/format parser
Guido Günther [Wed, 22 Aug 2012 08:59:24 +0000 (10:59 +0200)]
Document changes and release 0.6.0~git20120822
Markus Lehtonen [Fri, 6 Jul 2012 13:25:37 +0000 (16:25 +0300)]
GitArgs/add: support iterable and non-string args
Support giving iterables (other than basestring, e.g. list(s)) as an
argument to GitArgs.add(). Also, add support non-iterable arguments that
support the str() conversion.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Ed Bartosh [Fri, 3 Aug 2012 13:20:28 +0000 (16:20 +0300)]
GitRepository: Implement set_upstream_branch and get_upstream_branch methods
set_upstream_branch sets upstream branch for the local branch using
git branch --set-upstream
get_upstream_branch returns info about upstream branches
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Guido Günther [Wed, 22 Aug 2012 08:31:43 +0000 (10:31 +0200)]
manpages: correct manual section and remove duplicate entry
Markus Lehtonen [Tue, 14 Aug 2012 08:05:57 +0000 (11:05 +0300)]
docs: make refentry ids of manpages more consistent
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Markus Lehtonen [Tue, 14 Aug 2012 08:03:22 +0000 (11:03 +0300)]
docs: fix cross-referencing in manpages
Docbook2man has to be run twice to make sure the cross-references are
correct. First pass is just to update the cross-reference file
(manpage.refs). The second the builds the actual manpages. Otherwise
forward-references might be broken.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Zhang Qiang [Wed, 1 Aug 2012 06:14:20 +0000 (14:14 +0800)]
GitRepository/branch_contains: remove prefix '*' in branch name
The git output always prefixes the current branch name with '*'. Without
this fix branch_contains() always fails for the currently active branch.
Signed-off-by: Zhang Qiang <qiang.z.zhang@intel.com>
Guido Günther [Sat, 18 Aug 2012 16:43:00 +0000 (18:43 +0200)]
manpage: Fix typo in git-dch's multimain-merge option
Closes: #684322
Guido Günther [Mon, 13 Aug 2012 06:36:39 +0000 (08:36 +0200)]
dch: Fix error reporting on parsing errors
Guido Günther [Fri, 3 Aug 2012 17:29:00 +0000 (19:29 +0200)]
Document changes and release 0.6.0~git20120803
Guido Günther [Thu, 2 Aug 2012 16:50:11 +0000 (18:50 +0200)]
Improve error reporting from uscan
by parsing out the warnings and error fields from the dehs output.
Guido Günther [Thu, 2 Aug 2012 09:27:22 +0000 (11:27 +0200)]
Move uscan to separate class
Guido Günther [Thu, 2 Aug 2012 08:03:06 +0000 (10:03 +0200)]
Add tests for gbp.deb.{DpkgCompareVersions,DscFile}
Guido Günther [Thu, 2 Aug 2012 07:57:21 +0000 (09:57 +0200)]
gbp.command_wrappers: Reformat to 80 chars line length
Guido Günther [Wed, 1 Aug 2012 13:28:27 +0000 (15:28 +0200)]
Test help output by importing the modules
so we get correct coverage information for the scripts
Guido Günther [Wed, 1 Aug 2012 12:45:33 +0000 (14:45 +0200)]
Skip tests requiring devscripts if dch is not there
so tests don't fail on rpm based systems.
Daniel Dehennin [Thu, 31 May 2012 08:17:52 +0000 (10:17 +0200)]
Test behavior of gbp.scripts.dch.main().
* tests/11_test_dch_main.py: Test common cases with "--release" and
"--snapshot". Try 2 consecutive snapshots to check for merged entries.
Guido Günther [Tue, 31 Jul 2012 14:28:32 +0000 (16:28 +0200)]
Remove multiple spaces
Guido Günther [Sun, 29 Jul 2012 19:31:08 +0000 (21:31 +0200)]
GitModifier: add tests for dict interface
Guido Günther [Sun, 29 Jul 2012 07:12:04 +0000 (09:12 +0200)]
GitModifier: use __getitem__ to fetch date
instead of accessing __dict__ directly which only has _date.
Guido Günther [Tue, 3 Jul 2012 08:48:21 +0000 (11:48 +0300)]
GitRepository: raise GitRepositoryError on git errors
Raise GitRepositoryError in cases where CommandExecFailed (from
GitCommand) was previously silently passed forward.
Heavily based on a patch by Markus Lehtonen <markus.lehtonen@linux.intel.com>
Markus Lehtonen [Tue, 19 Jun 2012 06:09:11 +0000 (09:09 +0300)]
GitRepository/get_commit_info: add file status
Add file status and name to the info returned by the get_commit_info()
method.
Signed-off-by: Zhang Qiang <qiang.z.zhang@intel.com>
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Markus Lehtonen [Mon, 2 Jul 2012 08:21:03 +0000 (11:21 +0300)]
GitRepository/get_commit_info: add committer info
Add committer to the info returned by get_commit_info() method. Returns
committer name, email and timestamp as a GitModifier object.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Markus Lehtonen [Thu, 31 May 2012 07:20:36 +0000 (10:20 +0300)]
GitRepository/get_commit_info: add author timestamp
Add author timestamps to the info returned by get_commit_info() method.
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Guido Günther [Tue, 3 Jul 2012 19:47:54 +0000 (21:47 +0200)]
GitModifier: More flexible date handling
Allow to pass in the date as datetime object, timestamp or git raw date.
and allow to retrieve these values. This make constructing GitModifiers
from python simpler.
Guido Günther [Fri, 27 Jul 2012 10:52:31 +0000 (12:52 +0200)]
Fix variable renaming
Markus Lehtonen [Wed, 30 May 2012 06:06:59 +0000 (09:06 +0300)]
GitRepository: option to ignore untracked in is_clean()
Add an option to ignore untracked files when checking if the repository
is clean.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Markus Lehtonen [Wed, 4 Jul 2012 09:48:54 +0000 (12:48 +0300)]
GitRepository/get_author_info: return user.name as name
Return users full name (user.name) instead of email (user.email) as the
'name' of the author when taking the value from git config.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Guido Günther [Mon, 23 Jul 2012 11:11:35 +0000 (11:11 +0000)]
gbp.git.GitRepository: Add remove_remote
Guido Günther [Mon, 23 Jul 2012 11:11:33 +0000 (11:11 +0000)]
git.repository.GitRepository.add_remote_repo: use GitArgs
Guido Günther [Tue, 3 Jul 2012 19:49:05 +0000 (21:49 +0200)]
GitRepository: Make rev_parse's short option an int everywhere
Markus Lehtonen [Tue, 3 Jul 2012 07:06:54 +0000 (10:06 +0300)]
GitRepository/rev_parse: add new argument 'short'
Adds a new argument to get abbreviated SHA1.
Also, modifies rev_parse() to use GitArgs class.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Markus Lehtonen [Mon, 2 Jul 2012 08:59:33 +0000 (11:59 +0300)]
GitRepository/get_commit_info: check return value of git command correctly
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Guido Günther [Mon, 2 Jul 2012 06:05:06 +0000 (08:05 +0200)]
Make exception syntax consistent
Guido Günther [Sat, 30 Jun 2012 10:43:26 +0000 (12:43 +0200)]
GitRepository: Add test that covers remote branches in has_branch()