aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2009-12-06 14:01:45 +0100
committerBjörn Gustavsson <[email protected]>2009-12-06 14:01:45 +0100
commit5b4c201e794fd1cced21e8d54e83ae498e5372b6 (patch)
treeaeb7e8a20e8f566d3e8dab761762d661a820e693
parent0aa5a2767f4fe5aed65a289253b7eff1faf0d48c (diff)
downloadotp-5b4c201e794fd1cced21e8d54e83ae498e5372b6.tar.gz
otp-5b4c201e794fd1cced21e8d54e83ae498e5372b6.tar.bz2
otp-5b4c201e794fd1cced21e8d54e83ae498e5372b6.zip
page, cook: Include the OTP application(s)
For each topic, list the application(s) that is touched by the topic branch.
-rwxr-xr-xapplication16
-rwxr-xr-xcook8
-rwxr-xr-xpage9
3 files changed, 31 insertions, 2 deletions
diff --git a/application b/application
new file mode 100755
index 0000000000..53313fbb0e
--- /dev/null
+++ b/application
@@ -0,0 +1,16 @@
+#!/usr/bin/perl -w
+use strict;
+
+my $range = shift;
+
+my %app;
+foreach (`git diff --name-only $range`) {
+ if (m@lib/([^/]*)@) {
+ $app{$1} = 1;
+ } elsif (m@erts/@) {
+ $app{erts} = 1;
+ } else {
+ $app{otp} = 1;
+ }
+}
+print join(', ', sort keys %app), "\n";
diff --git a/cook b/cook
index 48041ceb8f..5ca1cf7e91 100755
--- a/cook
+++ b/cook
@@ -6,9 +6,11 @@ use File::Spec;
-d '.git' or die "$0: Not a Git repository";
my $root = dirname($0);
+my $application = "$root/application";
my $last = `(cd $root; git ls-files "whats" | tail -1)`;
@ARGV = ("$root/$last");
+
my $date;
my $output_file;
{
@@ -134,7 +136,11 @@ sub print_commits {
my(@revs) = `git rev-list $range`;
my $commits = @revs == 1 ? "1 commit" : scalar(@revs) . " commits";
my $max = 12;
- system qq[git show -s --date=short --format="* $topic (%ad) $commits" $topic];
+ my $diff_range = $range;
+ $diff_range =~ s/[.][.]/.../;
+ my $apps = `$application $diff_range`;
+ chomp $apps;
+ system qq[git show -s --date=short --format="* $topic ($apps) (%ad) $commits" $topic];
system qq[git --no-pager log -n $max --format=" - %s (%h)" $range];
print ".\n.\n\.\n" if @revs > $max;
}
diff --git a/page b/page
index 3ddda003c5..b7f607dc3d 100755
--- a/page
+++ b/page
@@ -6,9 +6,11 @@ use File::Spec;
-d '.git' or die "$0: Not a Git repository";
my $root = dirname($0);
+my $application = "$root/application";
my $last = `(cd $root; git ls-files "whats" | tail -1)`;
@ARGV = ("$root/$last");
+
my $output_file = "GH-PAGES/index.html";
open STDOUT, ">", $output_file or
die "$0: Failed to open $output_file for writing: $!\n";
@@ -57,8 +59,13 @@ foreach (`git log --oneline --first-parent dev..pu`) {
my(@revs) = `git rev-list $range`;
my $commits = @revs == 1 ? "1 commit" : scalar(@revs) . " commits";
my $max = 12;
+ my $apps = `$application $child^1...$child^2`;
+ chomp $apps;
+
system "git", "show", "-s", "--date=short",
- qq[--format=<li><a href="$root_url/%H">$topic</a>:], "$child";
+ qq[--format=<li><a href="$root_url/%H">$topic</a> ($apps):],
+ "$child";
+
print "<ul>\n";
my $format = qq[<li><a href="$root_url/%H">%s</a></li>];
system "git", "--no-pager", "log", "-n", $max,