Age | Commit message (Collapse) | Author | Files | Lines |
|
So like git you can now use gbp <command> instead of git-<command> or
gbp-<command>. The manpages and docs aren't adjusted yet.
|
|
This kills another _git_getoutput. Also deprecate the method since we
don't need to special case the 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>
|
|
|
|
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>
|
|
To be consistent with the date property and for easier compatibility
with git dates.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
to ease readability
|
|
and better use the output for verification
|
|
so we have the object creation close to the object itself.
|
|
to avoid accidental usage. Use DebianSource.is_native instead.
|
|
to avoid spurious output on the console and add the error message to the
exception intead.
|
|
None of the gbp script rely on the output being printed. In fact we
improve the exception by appending the stderr output.
|
|
|
|
to get rid of the spurious error message
|
|
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>
|
|
That was erroneously removed in
3d6b68ae541d6020ff747628b3e44196999e0a50.
and breaks without dch installed
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
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>
|
|
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Prevent dch from asking user input during tests.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
when checking if a package is a native package
Closes: #669267
|
|
so we don't have to expose all the details of Debian's different
files and conventions.
|
|
so we can access blobs in git as file like objects
|
|
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.
|
|
* 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.
|
|
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
|
|
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
|
|
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>
|
|
based on a patch by Daniel Dehennin
Needed for #672954, #646684, #669171
|
|
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>
|
|
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>
|
|
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Add module docstring and wrap one overlong line.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Guido Günther <agx@sigxcpu.org>
|
|
Move over the first test from our external (shell based) test suite to
the component tests.
|
|
|
|
very heavily based on code by Markus Lehtonen
|
|
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>
|
|
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>
|
|
Closes: #694113
|
|
|
|
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>
|
|
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>
|
|
|
|
so the RPM based tools don't need to rely on a control file but
can e.g. look at the spec file.
|
|
|
|
|
|
Makes it possible to reuse code between various tests.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
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>
|
|
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
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>
|