[Bps-public-commit] App-Changeloggr branch, master, updated. f7d06589b23520834c19cd946eb7df612113a9aa
sartak at bestpractical.com
sartak at bestpractical.com
Wed Aug 5 12:01:17 EDT 2009
The branch, master has been updated
via f7d06589b23520834c19cd946eb7df612113a9aa (commit)
via 524a74b393fd550556fd7d0b53252d522496c70f (commit)
via 02a431ea807d80e9d99d0cecc6b144fc38e9a16b (commit)
from 71d3f5480cd3a623e99d6d6b1e85a933ea262fd1 (commit)
Summary of changes:
bin/backfill-diffstat | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
- Log -----------------------------------------------------------------
commit 02a431ea807d80e9d99d0cecc6b144fc38e9a16b
Author: Shawn M Moore <sartak at gmail.com>
Date: Wed Aug 5 11:58:52 2009 -0400
Need to chdir into the git repo
diff --git a/bin/backfill-diffstat b/bin/backfill-diffstat
index 2b918c8..d3f6b84 100644
--- a/bin/backfill-diffstat
+++ b/bin/backfill-diffstat
@@ -21,6 +21,8 @@ my $changelog = App::Changeloggr::Model::Changelog->new(
my ($ok, $msg) = $changelog->load_by_cols(name => $changelog_name);
die "Unable to load changelog '$changelog_name': $msg" if !$ok;
+chdir $path;
+
my $changes = $changelog->changes;
while (my $change = $changes->next) {
next if $change->message =~ /\d+ files? changed, \d+ insertions?\(\+\), \d+ deletions?\(-\)/;
commit 524a74b393fd550556fd7d0b53252d522496c70f
Author: Shawn M Moore <sartak at gmail.com>
Date: Wed Aug 5 11:59:05 2009 -0400
Handle older gets by using --pretty instead of --format
diff --git a/bin/backfill-diffstat b/bin/backfill-diffstat
index d3f6b84..300cc40 100644
--- a/bin/backfill-diffstat
+++ b/bin/backfill-diffstat
@@ -27,7 +27,7 @@ my $changes = $changelog->changes;
while (my $change = $changes->next) {
next if $change->message =~ /\d+ files? changed, \d+ insertions?\(\+\), \d+ deletions?\(-\)/;
my $id = $change->identifier;
- my $stat = `git log --format=oneline --stat $id~1..$id`;
+ my $stat = `git log --pretty=oneline --stat $id~1..$id`;
$stat =~ s/^.*\n//;
$change->set_diffstat($stat);
commit f7d06589b23520834c19cd946eb7df612113a9aa
Author: Shawn M Moore <sartak at gmail.com>
Date: Wed Aug 5 12:01:04 2009 -0400
Give some feedback about diffs without diffstat
diff --git a/bin/backfill-diffstat b/bin/backfill-diffstat
index 300cc40..4fb2c96 100644
--- a/bin/backfill-diffstat
+++ b/bin/backfill-diffstat
@@ -30,7 +30,12 @@ while (my $change = $changes->next) {
my $stat = `git log --pretty=oneline --stat $id~1..$id`;
$stat =~ s/^.*\n//;
- $change->set_diffstat($stat);
- print ".";
+ if ($stat =~ /\S/) {
+ print ".";
+ $change->set_diffstat($stat);
+ }
+ else {
+ print "\nNo diffstat for $id\n";
+ }
}
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list