-# Get the diff from svnlook.
-my @no_diff_deleted = $no_diff_deleted ? ('--no-diff-deleted') : ();
-my @no_diff_added = $no_diff_added ? ('--no-diff-added') : ();
-my @difflines = &read_from_process($svnlook, 'diff', $repos,
- '-r', $rev, @no_diff_deleted,
- @no_diff_added);
+# Add the adds, dels and mods to the body of the message.
+if (@adds)
+ {
+ @adds = sort @adds;
+ push(@body, "Added:\n");
+ push(@body, map { " $_\n" } @adds);
+ }
+if (@dels)
+ {
+ @dels = sort @dels;
+ push(@body, "Removed:\n");
+ push(@body, map { " $_\n" } @dels);
+ }
+if (@mods)
+ {
+ @mods = sort @mods;
+ push(@body, "Modified:\n");
+ push(@body, map { " $_\n" } @mods);
+ }
+
+my @difflines;
+my $diff_howto = "Use \"svn diff" . " -r " . ($rev - 1) . ":$rev\" to view"
+ . " diff.\n";
+
+# Work out how many bytes we have available for the diff.
+my $size_avail = 0;
+if ($size_limit > 0)
+ {
+ my $bodylen = 0;
+ for (@body) { $bodylen += length($_); }
+ $size_avail = $size_limit - $bodylen;
+
+ warn "sl= $size_limit -- sa = $size_avail";
+
+ if ($size_avail <= 0)
+ {
+ @difflines = ( "Diff skipped; message reached limit of $size_limit"
+ . " bytes with list of changed paths.\n$diff_howto" );
+ }
+}