diff options
author | Mark Probst <mark.probst@gmail.com> | 2010-08-05 01:56:13 +0400 |
---|---|---|
committer | Mark Probst <mark.probst@gmail.com> | 2010-08-05 02:01:28 +0400 |
commit | 934e05706840d7154d1423237538493232e5f94b (patch) | |
tree | e6ad52a957b92ad89a3a872c33964e25c4e49c3c /scripts | |
parent | daf44148ad6f79d87318339366d04721e5f498a4 (diff) |
[scripts] commit-to-changelog fails if git is too old
We need a git that supports the %B format specifier, which seems to be
1.7.2. Fail if it's not supported.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/commits-to-changelog.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/commits-to-changelog.py b/scripts/commits-to-changelog.py index 744528fffb1..3de40bbe51a 100755 --- a/scripts/commits-to-changelog.py +++ b/scripts/commits-to-changelog.py @@ -247,6 +247,12 @@ def main (): global path_to_root path_to_root = options.root + "/" + #see if git supports %B in --format + output = git ("log", "-n1", "--format=%B", "HEAD") + if output.startswith ("%B"): + print >> sys.stderr, "Error: git doesn't support %B in --format - install version 1.7.2 or newer" + exit (1) + for filename in git ("ls-tree", "-r", "--name-only", "HEAD").splitlines (): if re.search ("(^|/)Change[Ll]og$", filename): (path, name) = os.path.split (filename) |