diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2014-02-28 15:27:38 +0200 |
---|---|---|
committer | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2014-03-05 17:36:38 +0200 |
commit | be3ab164c5eafaf2e57c9ae01d240f3eedc81799 (patch) | |
tree | dc53be8b5c4185611093cd364c45396bab163f88 | |
parent | 3ffdde36fa6e57dcec3351fdda1848cba9b7d5ed (diff) | |
download | git-buildpackage-be3ab164c5eafaf2e57c9ae01d240f3eedc81799.tar.gz git-buildpackage-be3ab164c5eafaf2e57c9ae01d240f3eedc81799.tar.bz2 git-buildpackage-be3ab164c5eafaf2e57c9ae01d240f3eedc81799.zip |
rpm-ch: fix revision field mathching in guess_commit()
Be non-greedy when matching string format fields.
Change-Id: I2821830fb32fbdb77740bc06de4cb93c29d039e4
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
-rwxr-xr-x | gbp/scripts/rpm_changelog.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gbp/scripts/rpm_changelog.py b/gbp/scripts/rpm_changelog.py index f240fd8d..0d7b7e52 100755 --- a/gbp/scripts/rpm_changelog.py +++ b/gbp/scripts/rpm_changelog.py @@ -185,7 +185,7 @@ def guess_commit(section, repo, options): header = section.header # Try to parse the fields from the header revision - rev_re = '^%s$' % re.sub(r'%\((\S+)\)s', r'(?P<\1>\S+)', + rev_re = '^%s$' % re.sub(r'%\((\S+?)\)s', r'(?P<\1>\S+)', options.changelog_revision) match = re.match(rev_re, header['revision'], re.I) fields = match.groupdict() if match else {} |