}
## Now the detailed list of upstream commits.
- if (grep { defined } values %DONOR_REV_MAP) {
- $msg .= "\nDetailed list of changes:\n";
- my @paths; my @roots;
- for my $path (keys %DONOR_REV_MAP) {
- my $rev = $DONOR_REV_MAP{$path};
- if (defined $rev) { push @paths, $path; push @roots, $rev; }
- }
+ $msg .= "\nDetailed list of changes:\n";
+ my @lpaths; my @roots;
+ for my $path (sort keys %DONOR_REV_MAP) {
+ my $rev = $DONOR_REV_MAP{$path};
+ if (defined $rev) { push @lpaths, $path; push @roots, $rev; }
+ else { $msg .= " Initial import of $path.\n"; }
+ }
+ if (@roots) {
chomp (my @revs = capturex @with_dir, $DONOR_DIR,
"git", "rev-list", "--reverse",
- "HEAD", "--not", @roots, "--", @paths);
+ "HEAD", "--not", @roots, "--", @lpaths);
for my $rev (@revs) {
my @affected = ();
- for my $path (@paths) {
+ for my $path (@lpaths) {
runx [0, 1], @with_dir, $DONOR_DIR,
"git", "merge-base", "--is-ancestor",
$DONOR_REV_MAP{$path}, $rev;
capturex @with_dir, $DONOR_DIR,
"git", "show", "--stat", $rev, "--", @affected;
}
- } else {
- $msg .= "\nInitial import.\n";
}
## The trailer, so that we can see where we left off.