Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Probst <mark.probst@gmail.com>2010-08-05 01:40:47 +0400
committerMark Probst <mark.probst@gmail.com>2010-08-05 02:01:27 +0400
commitdaf44148ad6f79d87318339366d04721e5f498a4 (patch)
tree1ce7344213d9826690085bbd1be4a25abcd3cbd9 /scripts
parent11a85794e3a2b1c65a567c04c1849073b94f8ec0 (diff)
[scripts] commit-to-changelog fails if git fails
The commit-to-changelog script now fails if git fails for whatever reason. The most important reasons would be that git isn't installed, and that the script is called without a repository.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/commits-to-changelog.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/commits-to-changelog.py b/scripts/commits-to-changelog.py
index ba68a6f67e8..744528fffb1 100755
--- a/scripts/commits-to-changelog.py
+++ b/scripts/commits-to-changelog.py
@@ -6,6 +6,7 @@ import re
import os.path
import fnmatch
import os
+import sys
# subtract 8 for the leading tabstop
fill_column = 74 - 8
@@ -15,7 +16,12 @@ path_to_root = None
all_changelogs = {}
def git (command, *args):
- return subprocess.Popen (["git", command] + list (args), stdout = subprocess.PIPE).communicate () [0]
+ popen = subprocess.Popen (["git", command] + list (args), stdout = subprocess.PIPE)
+ output = popen.communicate () [0]
+ if popen.returncode != 0:
+ print >> sys.stderr, "Error: git failed"
+ exit (1)
+ return output
def changelog_path (changelog):
global path_to_root