Age | Commit message (Collapse) | Author | Files | Lines |
|
This is done in sake of more general purpose naming, intended for
enabling rpm support.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Needed by the upcoming rpm tools.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
The 'force' option now has two possible values:
'merge': upstream branch is merged, even if fast-forward is not
possible.
'clean': check out a clean copy from the upstream if fast-forward is not
possible (i.e. no merge). Local changes are lost in this case.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Treat non-checked-out branches similarly to the current branch when
forcing update. That is, do git merge, instead of just setting the ref.
Also, renames fast_forward_branch() to update_branch() to better match
the functionality.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
This updates all remote-tracking branches (for the remote that is
fetched from) whose local branch name is identical to the remote branch
name.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Adds a new GbpOptionParserRpm class for handling rpm-specific options.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Preparation for RPM support.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Signed-off-by: Zhang Qiang <qiang.z.zhang@intel.com>
Signed-off-by: Huang Hao <hao.h.huang@intel.com>
|
|
All other gbp branches have configurable names. This commit adds the
readiness for user to configure/change the name of the patch-queue
branches, as well.
Patch-queue is defined in options as a format string, where '%(branch)s'
refers to the debian/packaging branch. If the pq-branch format string
does not contain '%(branch)s', there is only one patch-queue branch and
the debian/packaging branch is used as its base branch. That is, e.g. a
'gbp-pq switch' operation from the patch-queue branch always switches to
the debian/packaging branch.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Olev Kartau <olev.kartau@intel.com>
|
|
Adds support for a configurable tmpdir under which all gbp tools now
create their temporary directories and files.
NOTE: an exception is git-import-dscs which doesn't use the common
configuration system.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Minimal initial implementation that only adds tempdir parent directory
creation.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Olev Kartau <olev.kartau@intel.com>
|
|
Exporting sources failed when git-buildpackage was run from a
subdirectory of the git working directory because the path of the custom
index file was not handled correctly.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Add support for building different kind of "working copies", when using
the --git-export option:
- 'WC.TRACKED': only use files that are already tracked
- 'WC.UNTRACKED': use untracked files, too
- 'WC.IGNORED': also add files that'd normally be ignored
Using '--git-export=WC' beaves like before.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Whether to ignore untracked files (untracked=False) or not
(untracked=True). Now, clones the temporary index file from the actual
index, in order to correctly update files.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
|
|
With this option you can either only update already tracked files to
index the (untracked=False) or add new files, too.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Add support for reading the local config file(s) from a given git
tree-ish.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
A step towards being able to run GBP tools from subdirectories.
Now expands '%(top_dir)s' and '%(git_dir)s' in config file path to root
of the working directory and git metadata directory, respectively.
Also, adds a new method _read_config_file() in preparation for
supporting per-tree config files.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
By utilizing the parse_archive_filename() function that detects e.g.
"alias suffixes" such as 'tgz'.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
New method for checking if the sources are a tarball (possibly for
checking if the sources are committable by pristine-tar).
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
New properties for easily getting the archive format (tar, zip, ...) and
compression format (gzip, bzip2, ...) of the sources.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
A new method for checking if the given filename is usable as a orig
(upstream) source archive.
Also, takes this method into use in the UpstreamSource class.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
The UpstreamSource class now gets a PkgPolicy in it's initialization.
Also, introduces new DebiaUpstreamSource class which is taken in use in
the scripts.
The PkgPolicy is not yet used for anything in UpstreamSource.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Add support for changing the prefix directory inside the tarball that is
generated. Also, fixes a bug that caused a "prefix-less" tarball to get
one, if unpacked and then repacked.
Also, adds this support to repack_source() in common/import_orig.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Moves repacked_tarball_name() from scripts/common back to the
Debian-specific script. The logic is too Debian-specific for RPM, after
all.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Now a tmpdir is always created and sources are always unpacked into
there.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
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>
|
|
Renames the function to parse_archive_filename() and changes it's
return values. Filename parsing is merely generic functionality, not
tied to any packaging policy.
The function now returns the base name of the file (that is, filename
without, archive and compression extensions), archive format and
compression method. Adds supported archive formats 'tar' and 'zip' and
file extension aliases, e.g. 'tgz'.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
This is useful if sgml2x package is not available.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
This is a method of getting the filename and status information of a
diff. That is, a list of files that changed and their status, "added",
"modified" etc.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
A method for generating one patch, with the possibility to filter the
git patch through a python function.
Always generates textual diffs as the 'patch' utility doesn't support
git binary diffs.
Ignore changes to submodules in patch generation as these diffs cannot
be applied by the patch utility when building packages.
TODO: convert all code to use the new format_patch() and get rid of the
format_patches() method.
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>
|
|
Make dump_tree() utilize the GitRepository.archive() method - similarly
to git_archive_submodules() - instead of ad-hoc Python pipes. This makes
dump_tree() work independent of the callers current working directory.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Use GitRepository.archive() method like git_archive_submodules() does.
This makes it possible to call git_archive_single() independent of the
callers current working directory.
Get rid of the pipe in git_archive_single() and utilize the filter
function of archive() method of GitRepository, instead.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Add support for filtering. That is, allow the caller to pipe the output
of git-archive through a filter command, usually a compression program.
This utilizes the new filtering functionality of the _git_inout()
method.
Also, gets rid of the hackish use of 'cwd' option.
The 'output' is now considered to be relative to the caller's cwd, not
the git repo dir. This should be more intuitive.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Support filtering of the output of git command through a python
function.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Adds support for defining the archive format of the output of
git_archive_single(), e.g. 'zip'. Defaults to 'tar', as before.
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
In order to get rid of dependency to dateutil.
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
This allows initialization of a GitRepository object, even if the
current working directory (or path given to GitRepository) is not the
top level directory of the git repository.
Don't guess the git meta data dir, but, take it as reported by git
itself.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Simple wrapper to the git-status command.
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
In addition to the remote name, return remote URLs. Return value is now
a dict with remote name as the key and a list of URLs as the value. The
first value in the list is the effective fetch URL, the rest of the
values are push URLs.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Add 'longfmt' for getting the tag name in the long format (tag, number
of commits and sha1) and 'always' for falling back to sha1 if no
(matching) tag name is found.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
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>
|
|
In tests/11_test_dch_main.py, there are checks for package names. This
change adds "ubuntu" and related release bane strings ORed in regexp
match to the patterns that are expecteds in assert statements.
Signed-off-by: Olev Kartau <olev.kartau@intel.com>
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
instead of the deprecated _git_getoutput() method.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
|
|
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>
|
|
|
|
|