Hello community,
here is the log from the commit of package linuxrc-devtools for
openSUSE:Factory checked in at 2019-05-22 11:15:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/linuxrc-devtools (Old)
and /work/SRC/openSUSE:Factory/.linuxrc-devtools.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "linuxrc-devtools"
Wed May 22 11:15:27 2019 rev:8 rq:704377 version:0.15
Changes:
--------
--- /work/SRC/openSUSE:Factory/linuxrc-devtools/linuxrc-devtools.changes
2018-01-13 21:46:51.660274719 +0100
+++
/work/SRC/openSUSE:Factory/.linuxrc-devtools.new.5148/linuxrc-devtools.changes
2019-05-22 11:15:28.586539933 +0200
@@ -1,0 +2,40 @@
+Tue Jan 29 12:22:26 UTC 2019 - [email protected]
+
+- merge gh#openSUSE/linuxrc-devtools#21
+- add support for jira
+- 0.15
+
+--------------------------------------------------------------------
+Thu Nov 15 15:30:55 UTC 2018 - [email protected]
+
+- merge gh#openSUSE/linuxrc-devtools#20
+- fix typo
+
+--------------------------------------------------------------------
+Fri Oct 12 14:31:04 UTC 2018 - [email protected]
+
+- merge gh#openSUSE/linuxrc-devtools#19
+- remove shortened lines from log (that match the beginning of
+ other lines)
+
+--------------------------------------------------------------------
+Mon Aug 27 13:40:24 UTC 2018 - [email protected]
+
+- merge gh#openSUSE/linuxrc-devtools#18
+- rework log creation to work better with merge commits
+
+--------------------------------------------------------------------
+Mon Aug 6 13:15:04 UTC 2018 - [email protected]
+
+- merge gh#openSUSE/linuxrc-devtools#17
+- ignore tags inside merge commits
+
+--------------------------------------------------------------------
+Thu Apr 19 09:34:10 UTC 2018 - [email protected]
+
+- merge gh#openSUSE/linuxrc-devtools#16
+- avoid identical timestamps in changelog and make default email
+ address configurable
+- fix time updates
+
+--------------------------------------------------------------------
Old:
----
linuxrc-devtools-0.14.tar.xz
New:
----
linuxrc-devtools-0.15.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ linuxrc-devtools.spec ++++++
--- /var/tmp/diff_new_pack.8yu3vE/_old 2019-05-22 11:15:29.298539802 +0200
+++ /var/tmp/diff_new_pack.8yu3vE/_new 2019-05-22 11:15:29.298539802 +0200
@@ -1,7 +1,7 @@
#
# spec file for package linuxrc-devtools
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: linuxrc-devtools
-Version: 0.14
+Version: 0.15
Release: 0
Source: %{name}-%{version}.tar.xz
++++++ linuxrc-devtools-0.14.tar.xz -> linuxrc-devtools-0.15.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/linuxrc-devtools-0.14/VERSION
new/linuxrc-devtools-0.15/VERSION
--- old/linuxrc-devtools-0.14/VERSION 2018-01-09 15:58:21.000000000 +0100
+++ new/linuxrc-devtools-0.15/VERSION 2019-01-29 13:22:26.000000000 +0100
@@ -1 +1 @@
-0.14
+0.15
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/linuxrc-devtools-0.14/changelog
new/linuxrc-devtools-0.15/changelog
--- old/linuxrc-devtools-0.14/changelog 2018-01-09 15:58:21.000000000 +0100
+++ new/linuxrc-devtools-0.15/changelog 2019-01-29 13:22:26.000000000 +0100
@@ -1,3 +1,20 @@
+2019-01-29: 0.15
+ - merge gh#openSUSE/linuxrc-devtools#16
+ - avoid identical timestamps in changelog and make default email
+ address configurable
+ - fix time updates
+ - merge gh#openSUSE/linuxrc-devtools#17
+ - ignore tags inside merge commits
+ - merge gh#openSUSE/linuxrc-devtools#18
+ - rework log creation to work better with merge commits
+ - merge gh#openSUSE/linuxrc-devtools#19
+ - remove shortened lines from log (that match the beginning of
+ other lines)
+ - merge gh#openSUSE/linuxrc-devtools#20
+ - fix typo
+ - merge gh#openSUSE/linuxrc-devtools#21
+ - add support for jira
+
2018-01-09: 0.14
- merge gh#openSUSE/linuxrc-devtools#15
- more complete OBS state check
@@ -30,12 +47,10 @@
- skip *.changes file in 'package' dir
- add --prepare option to build_it script
- add make_package script
+ - enhance submission scripts
2017-08-10: 0.8
- merge gh#openSUSE/linuxrc-devtools#8
- - added --(no-)keep-date options
-
-2017-05-03: 0.7
- started rewrite of git2log script
- implement start tag, switch default format to obs
- document git2log
@@ -62,6 +77,8 @@
- avoid empty log message when version info is missing
- add --(no-)join-author option
- added '@-log@' tag (delete commit message)
+ - added --(no-)keep-date options
+ - rework to produce nicer log files
2016-11-23: 0.6
- merge gh#openSUSE/linuxrc-devtools#7
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/linuxrc-devtools-0.14/git2log
new/linuxrc-devtools-0.15/git2log
--- old/linuxrc-devtools-0.14/git2log 2018-01-09 15:58:21.000000000 +0100
+++ new/linuxrc-devtools-0.15/git2log 2019-01-29 13:22:26.000000000 +0100
@@ -61,6 +61,7 @@
my $opt_merge_msg_before = 1; # log auto generated pr merge message
before the commit messages (vs. after)
my $opt_join_author = 1; # join consecutive commit messages as
long as they are by the same author
my $opt_keep_date = 1; # don't join consecutive commit
messages if they have different time stamps
+my $opt_default_email = '[email protected]'; # default email
to use in changelog
GetOptions(
'help' => sub { usage 0 },
@@ -76,6 +77,7 @@
'join-author!' => \$opt_join_author,
'keep-date!' => \$opt_keep_date,
'log|changelog' => \$opt_log,
+ 'default-email=s' => \$opt_default_email,
) || usage 1;
# ensure we are used correctly
@@ -164,7 +166,7 @@
--version Write version number to FILE.
--branch Write current branch to FILE.
--start START_TAG Start with tag START_TAG.
- --max N Write at most MAX long entries.
+ --max N Write at most N log entries.
--update Write changelog or version only if FILE is outdated.
--format FORMAT Write log using FORMAT. Supported FORMATs are 'internal'
(default) and 'obs'.
--width WIDTH Reformat log entries to be max WIDTH chars wide.
@@ -176,6 +178,8 @@
--no-join-author Keep consecutive commits by the same author separate.
--keep-date Join consecutive commits only if they have the same
date. (default)
--no-keep-date Join consecutive commits even if dates differ.
+ --default-email Use this email in changelog entries if no other suitable
email could be
+ determined (default: opensuse-packaging\@opensuse.org).
--help Print this help text.
usage
@@ -254,6 +258,8 @@
#
# Only tags recognized by is_formatted_tag() are considered.
#
+# Tags inside merge commits are ignored.
+#
# The parsed logs is stored in $config->{log}, an array of log sections.
# Each section is a hash with these keys:
# - 'tags': array of tags for this section
@@ -264,12 +270,21 @@
{
my $log_entry;
+ # the end of the merge commit if in a merge
+ my $merge;
+
for (@{$config->{raw_log}}) {
if(/^commit (\S+)( \((.*)\))?/) {
my $commit = $1;
my $tag_list = $3;
my $xtag;
+ # we have reached the end of the merge commit
+ undef $merge if $merge && $commit =~ /^$merge/;
+
+ # ignore tag info inside a merge commit
+ $tag_list = "" if $merge;
+
for my $t (split /, /, $tag_list) {
if($t =~ /tag: (\S+)/) {
my $tag = $1;
@@ -289,6 +304,10 @@
$log_entry = { commit => $commit } if !$log_entry;
}
}
+ elsif(!$merge && /^Merge: (\S+)/) {
+ # remember end of merge
+ $merge = $1;
+ }
push @{$log_entry->{lines}}, $_ if $log_entry;
}
@@ -492,11 +511,13 @@
# Adjust time stamps in entire git log.
#
# The time stamps of the git commits are not necessarily ordered by date.
-# But the generated changelog is required to have a monotonic time.
+# But the generated changelog is required to have a strictly monotonic time.
#
# We do this by going through the log in reverse and rewriting any dates we
# find whenever the date decreases.
#
+# A minimum time difference of 1 second beween entries is maintained.
+#
# Not very subtle but it works.
#
sub fix_dates
@@ -508,10 +529,14 @@
if(/^(Date:\s+)(\S+)(\s+\S+)/) {
if(defined $last_date && $2 < $last_date) {
$_ = "$1$last_date$3\n";
- next;
}
+ else {
+ $last_date = $2;
+ }
+
+ # ensure a minimal time gap of 1 second
+ $last_date += 1;
}
- $last_date = $2;
}
}
@@ -565,7 +590,6 @@
my $merge;
my $commit;
- my $saved_commit;
my $commits;
for (@{$log->{lines}}) {
@@ -583,67 +607,57 @@
if($merge) {
$commit->{merge_ref} = $merge->{ref};
$commit->{date} = $merge->{date};
+ $commit->{author} = $merge->{author};
# add to all commits so it's not lost when we re-arrange
- $commit->{merge_msg} = $merge->{msg} if $merge->{msg};
- # saved entry no longer needed
- undef $saved_commit;
+ $commit->{merge_msg} = $merge->{msg};
}
next;
}
- if(/^Merge: (\S+)/) {
+ if(/^Merge: (\S+)/ && !$merge) {
if($commit) {
$merge = { merge_end => $1, ref => $commit->{ref} } unless $merge;
- $saved_commit = pop @{$commits};
}
- undef $commit;
next;
}
if(/^Date:\s+(\S.*)/) {
- if($commit) {
- $commit->{date} = $1 if !$commit->{date};
- }
- elsif($merge) {
- $merge->{date} = $1 if !$merge->{date};
- }
+ $commit->{date} ||= $1 if $commit;
+ $merge->{date} ||= $1 if $merge;
next;
}
if(/^Author:\s+(\S.*)/) {
- $commit->{author} = $1 if $commit;
- $merge->{author} = $1 if $merge && !$merge->{author};
+ $commit->{author} ||= $1 if $commit;
+ $merge->{author} ||= $1 if $merge;
next;
}
- if($commit) {
- push @{$commit->{lines}}, $_ if s/^ //;
- }
- elsif($merge && !$merge->{msg}) {
+ if($merge) {
if(/^ Merge pull request (#\d+) from (\S+)/) {
if($config->{github_project}) {
- $merge->{msg} = "merge gh#$config->{github_project}$1";
+ push @{$merge->{msg}}, "merge gh#$config->{github_project}$1";
}
else {
- $merge->{msg} = "merge pr $2";
+ push @{$merge->{msg}}, "merge pr $2";
}
}
- elsif(/^ Merge branch '([^']+)'/) {
- $merge->{msg} = "merge branch $1";
+ elsif(/^ Merge branch '([^']+)'( into)?/) {
+ push @{$merge->{msg}}, "merge branch $1" if $2 eq "";
+ }
+ elsif(/^ Merge remote-tracking branch /) {
+ # ignore
+ }
+ elsif(s/^ //) {
+ push @{$commit->{lines}}, $_ unless /^# /;
+ }
+ }
+ elsif($commit) {
+ if(s/^ //) {
+ push @{$commit->{lines}}, $_ unless /^# /;
}
}
- }
-
- # it can happen that there's a lonely merge commit left at the end
- if($merge && $saved_commit) {
- $saved_commit->{merge_ref} = $merge->{ref};
- $saved_commit->{date} = $merge->{date};
- $saved_commit->{author} = $merge->{author};
- $saved_commit->{merge_msg} = $merge->{msg} if $merge->{msg};
- $saved_commit->{formatted} = [];
-
- push @{$commits}, $saved_commit;
}
# Note: the individual steps below work on the array @$commits and modify
@@ -661,6 +675,11 @@
my $tagged_merges = {};
for my $commit (@$commits) {
+ # skip leading empty lines
+ for (@{$commit->{lines}}) {
+ last if !/^\s*$/;
+ shift @{$commit->{lines}};
+ }
my $para_cnt = 0;
my $delete_all = 0;
my $delete_first = 0;
@@ -725,7 +744,7 @@
for my $commit (@$commits) {
next unless $commit->{formatted};
for (@{$commit->{formatted}}) {
- s/(fate|bnc|bsc)\s*(#\d+)/\L$1\E$2/ig;
+ s/(fate|bnc|bsc|boo|jsc)\s*(#[a-z\d\-]+)/\L$1\E$2/ig;
}
}
@@ -741,10 +760,10 @@
$merge_logged->{$commit->{merge_ref}} = 1;
if($commit->{merge_msg}) {
if($opt_merge_msg_before) {
- unshift @{$commit->{formatted}}, $commit->{merge_msg};
+ unshift @{$commit->{formatted}}, @{$commit->{merge_msg}};
}
else {
- push @{$commit->{formatted}}, $commit->{merge_msg};
+ push @{$commit->{formatted}}, @{$commit->{merge_msg}};
}
}
}
@@ -792,6 +811,36 @@
}
# step 8
+ # - remove identical lines
+
+ for my $commit (@$commits) {
+ next unless $commit->{formatted};
+ my %k;
+ $commit->{formatted} = [ grep { !$k{$_}++ } @{$commit->{formatted}} ]
+ }
+
+ # step 9
+ # - remove shortened lines (that match the beginning of other lines)
+
+ for my $commit (@$commits) {
+ next unless $commit->{formatted};
+
+ # return 1 if some other commit line starts with function arg
+ my $is_substr = sub {
+ my $str = $_[0];
+ $str =~ s/\s*…$//; # github likes to shorten lines with ' …'
+ my $str_len = length $str;
+ for (@{$commit->{formatted}}) {
+ return 1 if $str_len < length($_) && $str eq substr($_, 0, $str_len);
+ }
+
+ return 0;
+ };
+
+ $commit->{formatted} = [ grep { ! $is_substr->($_) }
@{$commit->{formatted}} ]
+ }
+
+ # step 10
# - add line breaks
for my $commit (@$commits) {
@@ -801,11 +850,10 @@
}
}
- # step 9
+ # step 11
# - generate final log message
#
- # note: non-(open)suse email addresses are replaced by a generic
- # '[email protected]'
+ # note: non-(open)suse email addresses are replaced by $opt_default_email
my $formated_log;
@@ -825,7 +873,7 @@
$auth =~ s/>.*$//;
# replace non-suse e-mail addresses with a generic one
if($auth !~ /\@(suse\.(com|cz|de)|opensuse\.org)$/) {
- $auth = '[email protected]'
+ $auth = $opt_default_email;
}
$formated_log .= " - $auth\n\n";
}