diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2012-06-12 10:42:41 +0300 |
---|---|---|
committer | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2014-11-14 14:45:07 +0200 |
commit | e3a9f6ddd6ae841ad0396f0e6602ac87e1ef8ca1 (patch) | |
tree | 180a75cb77aefd0fa096a3edf913a32d694a95bd /gbp/config.py | |
parent | f7861c586cdf41c50e8478047d7606650d10e693 (diff) | |
download | git-buildpackage-e3a9f6ddd6ae841ad0396f0e6602ac87e1ef8ca1.tar.gz git-buildpackage-e3a9f6ddd6ae841ad0396f0e6602ac87e1ef8ca1.tar.bz2 git-buildpackage-e3a9f6ddd6ae841ad0396f0e6602ac87e1ef8ca1.zip |
rpm: support squashing commits in patch generation
Implements an option for git-buildpackage-rpm and gbp-pq to squash
commits (from upstream) up to certain tree-ish into one monolithic diff.
Useful e.g. if you wan't to auto-generate a stable update patch.
The new format of the cmdline option filename is commit-ish followed by
(optionally) a colon and the desired diff filename base. Suffix '.diff'
is added by GBP.
Magic word 'HEAD' translates to the end-commit when given as the
squash-point. This allows one to configure gbp to always squash all
commits into one monolithic diff.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'gbp/config.py')
-rw-r--r-- | gbp/config.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gbp/config.py b/gbp/config.py index cbc33a59..294eb926 100644 --- a/gbp/config.py +++ b/gbp/config.py @@ -611,6 +611,7 @@ class GbpOptionParserRpm(GbpOptionParser): 'rpmbuild-buildrootdir' : 'BUILDROOT', 'patch-export' : 'False', 'patch-export-compress' : '0', + 'patch-export-squash-until' : '', 'merge' : 'False', 'pristine-tarball-name' : 'auto', 'orig-prefix' : 'auto', @@ -650,6 +651,10 @@ class GbpOptionParserRpm(GbpOptionParser): "Compress (auto-generated) patches larger than given number of " "bytes, 0 never compresses, default is " "'%(patch-export-compress)s'", + 'patch-export-squash-until': + "Squash commits (from upstream) until given tree-ish into one " + "big diff, format is '<commit_ish>[:<filename_base>]'. " + "Default is '%(patch-export-squash-until)s'", 'pristine-tarball-name': "Filename to record to pristine-tar, set to 'auto' to not " "mangle the file name, default is '%(pristine-tarball-name)s'", |