Age | Commit message (Collapse) | Author |
|
This reverts commit 0c582cd827f164168a313e0bb4eabf9487bdd088.
|
|
so we can caputure stderr and pass it along with any errors.
|
|
to avoid spurious output on the console and add the error message to the
exception intead.
|
|
and make sure the callers forward the error properly
|
|
but add any error output to the exception instead. All callers have been
audited to properly output the message if needed.
|
|
and use that in the doctest to get rid of the spurious output
|
|
since we don't expect it to succeed.
|
|
None of the gbp script rely on the output being printed. In fact we
improve the exception by appending the stderr output.
|
|
It's not used within gbp itself so no command line tool expects
an error message to be printed.
|
|
This also silences 10_test_get_upstream_tree
|
|
For enabling/disabling all hooks. This option does not affect the
builder command, though.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
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>
|
|
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>
|
|
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
by using _git_inout instead of GitCommand
|
|
by using __git_inout instead of GitCommand
|
|
since cls is unused and it silences pychecker
|
|
to make the test suite less verbose
|
|
|
|
to easily fetch the source package name
Git-Dch: Ignore
|
|
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
|
|
so we don't spew the error message on stdout for nonexistent objects
|
|
This changes the newline behaviour. readlines() as used by
_git_getoutput correctly keeps the newlines while this change doesn't.
This reverts commit 92edb4eda14cf4b5fd1514feb7b81aa50456285c.
|
|
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>
|
|
* 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
|
|
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
|
|
|
|
based on a patch by Daniel Dehennin
Needed for #672954, #646684, #669171
|
|
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>
|
|
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>
|
|
To make sure that the tags are in sync with the remote.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
so introdice --git[-no]-purge which is consistent with the other
boolean options and deprecate --git-dont-purge.
Closes: #702200
|
|
Closes: #703694
|
|
|
|
instead of a match object or None
|
|
|
|
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
GitModifier doesn't support dates in the format used in git format-patch
emails.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|