[Bps-public-commit] r18945 - App-Changelogger/bin
alexmv at bestpractical.com
alexmv at bestpractical.com
Thu Mar 26 17:19:52 EDT 2009
Author: alexmv
Date: Thu Mar 26 17:19:51 2009
New Revision: 18945
Modified:
App-Changelogger/bin/sort-changelog
Log:
Fixes for git parsing
Modified: App-Changelogger/bin/sort-changelog
==============================================================================
--- App-Changelogger/bin/sort-changelog (original)
+++ App-Changelogger/bin/sort-changelog Thu Mar 26 17:19:51 2009
@@ -107,13 +107,15 @@
push @stanza, $line;
}
}
- my $last_stanza = hashify_git_stanza(@stanza);
- push @git_entries , $last_stanza;
+ my $last_stanza = hashify_git_stanza(@stanza);
+ push @git_entries , $last_stanza;
return { logentry => \@git_entries};
}
=begin git-sample
+(this is produced by git log --format=fuller --stat)
+
commit 8837a66df7e8959d3101a5227d7b3c597990c0d0
Author: Nicholas Clark <nick at ccl4.org>
AuthorDate: Tue Dec 2 20:16:33 2008 +0000
@@ -142,7 +144,7 @@
if ($content =~ /^Author:\s*(.*)$/im) {
$stanza->{author} = $1;
}
- if ($content =~ /^AuthorDate:\s*(.*)$/im) {
+ if ($content =~ /^(?:Author)?Date:\s*(.*)$/im) {
$stanza->{date} = $1;
}
if ($content =~ /^Commit:\s*(.*)$/im) {
@@ -152,10 +154,10 @@
$stanza->{commit_date} = $1;
}
- if ($content =~ /.*?^(\s{4}.*)^\s{2}\w/ims) {
+ if ($content =~ /.*?^(\s{4}.*?)(^\s{1,2}\S+\s+\|\s+\d+|\z)/ims) {
$stanza->{msg} = $1;
}
- if ($content =~ /\n(\s{2}\w.*)$/ims) {
+ if ($content =~ /\n(\s{1,2}\S+\s+\|\s+\d+.*)$/ims) {
$stanza->{changed_files} = $1;
}
return $stanza;
More information about the Bps-public-commit
mailing list