Age | Commit message (Collapse) | Author |
|
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>
|
|
|
|
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>
|
|
|
|
so we get correct coverage information for the scripts
|
|
so tests don't fail on rpm based systems.
|
|
* tests/11_test_dch_main.py: Test common cases with "--release" and
"--snapshot". Try 2 consecutive snapshots to check for merged entries.
|
|
|
|
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>
|
|
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>
|
|
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>
|
|
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.
|
|
Add an option to ignore untracked files when checking if the repository
is clean.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
|
|
|
|
|
|
this make sure the number of return values doesn't stays sane when
also returning timestamps and committer information.
|