[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 4 commits - bin/lo-commit-stat
Petr Mladek
pmladek at kemper.freedesktop.org
Mon Jun 4 02:18:51 PDT 2012
bin/lo-commit-stat | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
New commits:
commit a50c30bd01b0859d4b84c8ec24e9cabb68ee0714
Author: Korrawit Pruegsanusak <detective.conan.1412 at gmail.com>
Date: Fri Jun 1 00:24:22 2012 +0700
lo-commit-stat: better formatting for bug fix commits
* some used "resolved" instead of "resolves"
* some didn't have a colon after that
* some inserted a space after bug ID and a separator
* some used a "-" as a separator
Change-Id: Iee6a0f0346a257124e9488fc8f3bbdc59b32cbac
Signed-off-by: Petr Mladek <pmladek at suse.cz>
diff --git a/bin/lo-commit-stat b/bin/lo-commit-stat
index 1b49525..0697432 100755
--- a/bin/lo-commit-stat
+++ b/bin/lo-commit-stat
@@ -42,9 +42,9 @@ sub search_bugs($$$$)
# print " found $bug\n";
# remove bug number from the comment; it will be added later a standardized way
$bug_orig =~ s/\#/\\#/;
- $line =~ s/[Rr]esolves:\s*$bug_orig\s*//;
+ $line =~ s/[Rr]esolve[ds]:?\s*$bug_orig\s*//;
$line =~ s/\s*-\s*$bug_orig\s*//;
- $line =~ s/\(?$bug_orig\)?[:,]?\s*//;
+ $line =~ s/\(?$bug_orig\)?\s*[:,-]?\s*//;
# bnc# is preferred over n# for novell bugs
$bug =~ s/^n\#/bnc#/;
commit 6e7d2dea7a1913a777a912aab270e9aff5e21d57
Author: Korrawit Pruegsanusak <detective.conan.1412 at gmail.com>
Date: Fri Jun 1 00:24:20 2012 +0700
lo-commit-stat: we don't have 'bootstrap' repo anymore
Change-Id: I2c5a73f992f204bccf8f1d125334d2746a1884fa
Signed-off-by: Petr Mladek <pmladek at suse.cz>
diff --git a/bin/lo-commit-stat b/bin/lo-commit-stat
index 885d053..1b49525 100755
--- a/bin/lo-commit-stat
+++ b/bin/lo-commit-stat
@@ -387,7 +387,7 @@ sub usage()
" --bug-numbers print just fixed bug numbers\n" .
" --rev-list use \"git rev-list\" instead of \"git log\"; useful to check\n" .
" differences between branches\n" .
- " topdir directory with the libreoffice/bootstrap clone; the piece repos\n" .
+ " topdir directory with the libreoffice/core clone; the piece repos\n" .
" must be cloned in the main-repo-root/clone/<piece> subdirectories\n" .
" git_arg extra parameters passed to the git command to define\n" .
" the area of interest; The default command is \"git log\" and\n" .
@@ -422,7 +422,7 @@ foreach my $arg (@ARGV) {
usage();
exit;
} elsif ($arg eq '--no-pieces') {
- $piece = "bootstrap";
+ $piece = "core";
} elsif ($arg =~ m/--piece=(.*)/) {
$piece = $1;
} elsif ($arg =~ m/--log-suffix=(.*)/) {
commit d16881370b2586d615eb4f32199e3b2007a3a3bf
Author: Korrawit Pruegsanusak <detective.conan.1412 at gmail.com>
Date: Fri Jun 1 00:24:18 2012 +0700
lo-commit-stat: lowercase first char if the word contains only lowercase chars
For Example:
* ScConditionalFormat -> no change
* SVG -> no change
* WaE -> no change
* Some -> some
After this change, we now have to sort case-insensitively,
or the lines starting with uppercase will clog up together.
Change-Id: If08cbaa19e6f3496dd1f07920464d16140e2aa3a
Signed-off-by: Petr Mladek <pmladek at suse.cz>
diff --git a/bin/lo-commit-stat b/bin/lo-commit-stat
index f1677b2..885d053 100755
--- a/bin/lo-commit-stat
+++ b/bin/lo-commit-stat
@@ -63,10 +63,12 @@ sub standardize_summary($)
$line =~ s/^\s*//;
$line =~ s/\s*$//;
- # lower first letter
- $line =~ m/(^.)/;
- my $first_char = lc($1);
- $line =~ s/^./$first_char/;
+ # lower first letter if the word contains only lowercase letter
+ if ( $line =~ m/(^.[a-z]+\b)/ ) {
+ $line =~ m/(^.)/;
+ my $first_char = lc($1);
+ $line =~ s/^./$first_char/;
+ }
# FIXME: remove do at the end of line
# remove bug numbers
@@ -259,7 +261,7 @@ sub print_stat($$)
my $old_summary="";
my %authors = ();
my %bugs = ();
- foreach my $id ( sort { $pdata->{$piece}{$a}{'summary'} cmp $pdata->{$piece}{$b}{'summary'} } keys %{$pdata->{$piece}}) {
+ foreach my $id ( sort { lc $pdata->{$piece}{$a}{'summary'} cmp lc $pdata->{$piece}{$b}{'summary'} } keys %{$pdata->{$piece}}) {
my $summary = $pdata->{$piece}{$id}{'summary'};
if ($summary ne $old_summary) {
print_summary_in_stat($old_summary, \$piece_title, \%bugs, \%authors, " + ", $log);
commit 20b61d7a8d3d7a6064d679fb7a07496b60508005
Author: Korrawit Pruegsanusak <detective.conan.1412 at gmail.com>
Date: Fri Jun 1 00:24:16 2012 +0700
lo-commit-stat: bug ID should have >= 4 digits
This is to avoid capturing stack frame numbers as bug ID.
http://lists.freedesktop.org/archives/libreoffice/2012-February/027133.html
Change-Id: I14169d3a7db73a5d10df01ad1fd9fb95e4c0bd2f
Signed-off-by: Petr Mladek <pmladek at suse.cz>
diff --git a/bin/lo-commit-stat b/bin/lo-commit-stat
index 1572924..f1677b2 100755
--- a/bin/lo-commit-stat
+++ b/bin/lo-commit-stat
@@ -26,7 +26,8 @@ sub search_bugs($$$$)
while (defined $bug) {
# match fdo#123, rhz#123, i#123
- if ( $line =~ m/(\w*\#+\d+)/ ) {
+ # but match only bug number with >= 4 digits
+ if ( $line =~ m/(\w*\#+\d{4,})/ ) {
$bug_orig = $1;
$bug = $1;
# match #i123#
More information about the Libreoffice-commits
mailing list