summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorygribov <ygribov@138bc75d-0d04-0410-961f-82ee72b054a4>2014-07-21 07:45:45 +0000
committerygribov <ygribov@138bc75d-0d04-0410-961f-82ee72b054a4>2014-07-21 07:45:45 +0000
commit86b6b74fd0c96b08221043da9dedd5f4e018ef99 (patch)
tree92d09cf415668caca723f4dd4086d5d092d81873 /contrib
parent430c950d56a88847639918deab16392e4eddf8d1 (diff)
downloadgcc-86b6b74fd0c96b08221043da9dedd5f4e018ef99.tar.gz
contrib/
2014-07-21 Trevor Saunders <tsaunders@mozilla.com> Yury Gribov <y.gribov@samsung.com> * mklog: Run mklog as a filter. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212884 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'contrib')
-rw-r--r--contrib/ChangeLog7
-rwxr-xr-xcontrib/mklog19
2 files changed, 14 insertions, 12 deletions
diff --git a/contrib/ChangeLog b/contrib/ChangeLog
index b714b88eff9..8060536ad29 100644
--- a/contrib/ChangeLog
+++ b/contrib/ChangeLog
@@ -1,6 +1,11 @@
2014-07-21 Trevor Saunders <tsaunders@mozilla.com>
+ Yury Gribov <y.gribov@samsung.com>
- mklog: Read name and email from git config when available.
+ * mklog: Run mklog as a filter.
+
+2014-07-21 Trevor Saunders <tsaunders@mozilla.com>
+
+ * mklog: Read name and email from git config when available.
2014-06-28 Richard Biener <rguenther@suse.de>
diff --git a/contrib/mklog b/contrib/mklog
index 5f5d98e9f4d..cdc64551d5f 100755
--- a/contrib/mklog
+++ b/contrib/mklog
@@ -59,9 +59,13 @@ if (-d .git) {
#-----------------------------------------------------------------------------
if ($#ARGV != 0) {
$prog = `basename $0`; chop ($prog);
- print "usage: $prog file.diff\n\n";
- print "Adds a ChangeLog template to the start of file.diff\n";
- print "It assumes that file.diff has been created with -up or -cp.\n";
+ print <<EOF;
+usage: $prog file.diff
+
+Generate ChangeLog template for file.diff.
+It assumes that patch has been created with -up or -cp.
+When file.diff is -, read standard input.
+EOF
exit 1;
}
@@ -270,15 +274,8 @@ foreach (@diff_lines) {
# functions.
$cl_entries{$clname} .= $change_msg ? "$change_msg\n" : ":\n";
-$temp = `mktemp /tmp/$basename.XXXXXX` || exit 1; chop ($temp);
-open (CLFILE, ">$temp") or die "Could not open file $temp for writing";
-
foreach my $clname (keys %cl_entries) {
- print CLFILE "$clname:\n\n$hdrline\n\n$cl_entries{$clname}\n";
+ print "$clname:\n\n$hdrline\n\n$cl_entries{$clname}\n";
}
-# Concatenate the ChangeLog template and the original .diff file.
-system ("cat $diff >>$temp && mv $temp $diff") == 0
- or die "Could not add the ChangeLog entry to $diff";
-
exit 0;