Commit 62afb85e authored by Glenn Morris's avatar Glenn Morris

Improve generated ChangeLog for gitmerge.el commits. (Bug#20717)

* build-aux/gitlog-to-changelog: Handle gitmerge.el skipped commits.

* admin/gitmerge.el (gitmerge-commit-message):
Exclude "skipped" messages from ChangeLog once again.

; * ChangLog.2: Related fixes.
parent cabaa992
...@@ -676,20 +676,6 @@ ...@@ -676,20 +676,6 @@
* test/automated/map-test.el: New file. * test/automated/map-test.el: New file.
* lisp/emacs-lisp/map.el: New file. * lisp/emacs-lisp/map.el: New file.
2015-04-11 Ulrich Müller <ulm@gentoo.org>
Bump Emacs version to 24.5.50.
2015-04-06 Nicolas Petton <nicolas@petton.fr>
* lisp/ChangeLog: Remove a duplicate
2015-04-05 Nicolas Petton <nicolas@petton.fr>
lisp/ldefs-boot.el: Update for the 24.5 release
Update the 24.5 release date in all ChangeLog files
2015-05-30 Dmitry Gutov <dgutov@yandex.ru> 2015-05-30 Dmitry Gutov <dgutov@yandex.ru>
Make sure there's no explicit tag name Make sure there's no explicit tag name
......
...@@ -314,7 +314,10 @@ Returns non-nil if conflicts remain." ...@@ -314,7 +314,10 @@ Returns non-nil if conflicts remain."
SKIP denotes whether those commits are actually skipped. If END SKIP denotes whether those commits are actually skipped. If END
is nil, only the single commit BEG is merged." is nil, only the single commit BEG is merged."
(with-temp-buffer (with-temp-buffer
(insert ; (if skip "; " "") ; I have no idea what to do for this ;; We do not insert "; " for non-skipped messages,
;; because the date of those entries is helpful in figuring out
;; when things got merged, since git does not track that.
(insert (if skip "; " "")
"Merge from " branch "\n\n" "Merge from " branch "\n\n"
(if skip (if skip
(concat "The following commit" (concat "The following commit"
......
...@@ -3,7 +3,7 @@ eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}' ...@@ -3,7 +3,7 @@ eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}'
if 0; if 0;
# Convert git log output to ChangeLog format. # Convert git log output to ChangeLog format.
my $VERSION = '2015-05-19 01:37'; # UTC my $VERSION = '2015-06-11 01:03'; # UTC
# The definition above must lie within the first 8 lines in order # The definition above must lie within the first 8 lines in order
# for the Emacs time-stamp write hook (at end) to update it. # for the Emacs time-stamp write hook (at end) to update it.
# If you change this file with Emacs, please let the write hook # If you change this file with Emacs, please let the write hook
...@@ -270,6 +270,7 @@ sub git_dir_option($) ...@@ -270,6 +270,7 @@ sub git_dir_option($)
my $prev_multi_paragraph; my $prev_multi_paragraph;
my $prev_date_line = ''; my $prev_date_line = '';
my @prev_coauthors = (); my @prev_coauthors = ();
my @skipshas = ();
while (1) while (1)
{ {
defined (my $in = <PIPE>) defined (my $in = <PIPE>)
...@@ -290,6 +291,21 @@ sub git_dir_option($) ...@@ -290,6 +291,21 @@ sub git_dir_option($)
$sha =~ /^[0-9a-fA-F]{40}$/ $sha =~ /^[0-9a-fA-F]{40}$/
or die "$ME:$.: invalid SHA1: $sha\n"; or die "$ME:$.: invalid SHA1: $sha\n";
my $skipflag = 0;
if (@skipshas)
{
foreach(@skipshas)
{
if ($sha =~ /^$_/)
{
$skipflag = 1;
## Perhaps only warn if a pattern matches more than once?
warn "$ME: warning: skipping $sha due to $_\n";
last;
}
}
}
# If this commit's log requires any transformation, do it now. # If this commit's log requires any transformation, do it now.
my $code = $amend_code->{$sha}; my $code = $amend_code->{$sha};
if (defined $code) if (defined $code)
...@@ -348,9 +364,30 @@ sub git_dir_option($) ...@@ -348,9 +364,30 @@ sub git_dir_option($)
while ($line[$#line] =~ /^\s*$/) { pop @line; } while ($line[$#line] =~ /^\s*$/) { pop @line; }
} }
# Handle Emacs gitmerge.el "skipped" commits.
# Yes, this should be controlled by an option. So sue me.
if ( grep /^(; )?Merge from /, @line )
{
my $found = 0;
foreach (@line)
{
if (grep /^The following commit.*skipped:$/, $_)
{
$found = 1;
## Reset at each merge to reduce chance of false matches.
@skipshas = ();
next;
}
if ($found && $_ =~ /^([0-9a-fA-F]{7,}) [^ ]/)
{
push ( @skipshas, $1 );
}
}
}
# Ignore commits that match the --ignore-matching pattern, if specified. # Ignore commits that match the --ignore-matching pattern, if specified.
if (! (defined $ignore_matching if (! ($skipflag || (defined $ignore_matching
&& @line && $line[0] =~ /$ignore_matching/)) && @line && $line[0] =~ /$ignore_matching/)))
{ {
if (defined $ignore_line && @line) if (defined $ignore_line && @line)
{ {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment