bin/lo-commit-stat  |   38 ++++++++++++++++++++++++++++++++------
 bin/lo-pack-sources |    2 +-
 2 files changed, 33 insertions(+), 7 deletions(-)

New commits:
commit c7e744d669940acf87dc8e580236067ba4ba3743
Author: Petr Mladek <pmla...@suse.cz>
Date:   Tue Jun 12 19:46:42 2012 +0200

    lo-commit-stat: avoid problems whit '%' in the commit message
    
    Change-Id: Ia10bac649cc078f6ef39002d280dcff7e5d0b06d

diff --git a/bin/lo-commit-stat b/bin/lo-commit-stat
index 310548e..1a8e6bb 100755
--- a/bin/lo-commit-stat
+++ b/bin/lo-commit-stat
@@ -80,6 +80,9 @@ sub standardize_summary($)
         my $first_char = lc($1);
         $line =~ s/^./$first_char/;
     }
+    # print does not like 0% or so
+    $line =~ s/%/%%/g;
+    
 
     # FIXME: remove do at the end of line
     #        remove bug numbers
commit 88968e244f4b5f82aa2262ac3dd5c6733d553643
Author: Thorsten Behrens <tbehr...@suse.com>
Date:   Tue Jun 12 03:34:33 2012 +0200

    Optionally output wiki-markup from lo-commit-stat
    
    Starts to be a bit annoying to roll shell-sed every release.
    We fix too many bugs.
    
    Change-Id: I34b0e9c2bf2c43f84abd555a9d2ac7dde0b6ba3a

diff --git a/bin/lo-commit-stat b/bin/lo-commit-stat
index 0697432..310548e 100755
--- a/bin/lo-commit-stat
+++ b/bin/lo-commit-stat
@@ -25,11 +25,16 @@ sub search_bugs($$$$)
     my $bug_orig;
     while (defined $bug) {
 
-        # match fdo#123, rhz#123, i#123
+        # match fdo#123, rhz#123, i#123, #123
         # but match only bug number with >= 4 digits
-        if ( $line =~ m/(\w*\#+\d{4,})/ ) {
+        if ( $line =~ m/(\w+\#+\d{4,})/ ) {
             $bug_orig = $1;
             $bug = $1;
+               # default to issuezilla for the #123 variant
+        # but match only bug number with >= 4 digits
+        } elsif ( $line =~ m/(\#)(\d{4,})/ ) {
+            $bug_orig = $1 . $2;
+            $bug = "i#$2";
         # match #i123#
         } elsif ( $line =~ m/(\#i)(\d+)(\#)/ ) {
             $bug_orig = $1 . $2 . $3;
@@ -48,6 +53,12 @@ sub search_bugs($$$$)
 
         # bnc# is preferred over n# for novell bugs
         $bug =~ s/^n\#/bnc#/;
+        # deb# is preferred over debian# for debian bugs
+        $bug =~ s/^debian\#/deb#/;
+        # easyhack# is sometimes used for fdo# - based easy hacks
+        $bug =~ s/^easyhack\#/fdo#/;
+        # someone mistyped fdo as fd0
+        $bug =~ s/^fd0\#/fdo#/;
         # save the bug number
         %{$pdata->{$piece}{$commit_id}{'bugs'}} = () if (! defined 
%{$pdata->{$piece}{$commit_id}{'bugs'}});
         $pdata->{$piece}{$commit_id}{'bugs'}{$bug} = 1;
@@ -307,15 +318,19 @@ sub get_bug_name($$)
             } else {
                 print "warning: not found; using commit message\n";
             }
+        } else {
+            print "\n";
         }
+    } else {
+        print "\n";
     }
 
     return $summary;
 }
 
-sub print_bugs($$)
+sub print_bugs($$$)
 {
-    my ($pdata, $log) = @_;
+    my ($pdata, $log, $convert_func) = @_;
 
     # associate bugs with their summaries and fixers
     my %bugs = ();
@@ -345,7 +360,7 @@ sub print_bugs($$)
             $authors = " [" . join (", ", keys %{$bugs{$bug}{'author'}}) . "]";
         }
 
-        printf $log $bug . " " . $summary . $authors . "\n";
+        printf $log "%s %s%s\n", $convert_func->($bug), $summary, $authors;
     }
 }
 
@@ -384,6 +399,7 @@ sub usage()
           "                     commit-log-<branch>-<log-name-suffix>.log; the 
branch name\n" .
           "                     is detected automatically\n" .
           "     --bugs          print just bug fixes\n" .
+          "     --wikibugs      print just bug fixes, use wiki markup\n" .
           "     --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" .
@@ -432,6 +448,9 @@ foreach my $arg (@ARGV) {
     } elsif ($arg eq '--bugs') {
         $log_prefix = "bugfixes";
         $print_mode = "bugs";
+    } elsif ($arg eq '--wikibugs') {
+        $log_prefix = "bugfixes";
+        $print_mode = "wikibugs";
     } elsif ($arg eq '--bug-numbers') {
         $log_prefix = "bugnumbers";
         $print_mode = "bugnumbers";
@@ -462,7 +481,11 @@ load_data(\%data, $top_dir, $piece, $branch_name, 
$git_command);
 
 $log = open_log_file($log_dir, $log_prefix, $log_suffix, $top_dir, 
$branch_name);
 if ( $print_mode eq "bugs" ) {
-    print_bugs(\%data, $log);
+    # identity-transform bug ids
+    print_bugs(\%data, $log, sub { return $_[0] } );
+} elsif ( $print_mode eq "wikibugs" ) {
+    # wiki-ize bug ids
+    print_bugs(\%data, $log, sub { $_[0] =~ s/(.*)\#(.*)/* {{$1|$2}}/; return 
$_[0] });
 } elsif ( $print_mode eq "bugnumbers" ) {
     print_bugnumbers(\%data, $log);
 } else {
commit 87669a44a1463f4e2bd486d2d82b900807148742
Author: Petr Mladek <pmla...@suse.cz>
Date:   Tue Jun 12 19:42:13 2012 +0200

    lo-pack-sources: correct check for valid libreoffice/core dir
    
    Change-Id: I8dbe60b85d0a330e3b2b5f54984b561fe9be05be

diff --git a/bin/lo-pack-sources b/bin/lo-pack-sources
index 11fcd74..7df4a0f 100755
--- a/bin/lo-pack-sources
+++ b/bin/lo-pack-sources
@@ -399,7 +399,7 @@ unless ( -d "$source_dir" ) {
 }
 
 # check if it is a valid libreoffice-core directory
-$is_lo_core_dir=1 if (-f "$source_dir/autogen.sh" && -f 
"$source_dir/set_soenv.in");
+$is_lo_core_dir=1 if (-f "$source_dir/autogen.sh" && -f 
"$source_dir/config_host.mk.in");
 
 # all tarballs are generated from the libreoffice-core directory
 if (@pieces > 1 && $is_lo_core_dir == 0 ) {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to