1 |
Author: robbat2 |
2 |
Date: 2008-02-04 11:38:21 +0000 (Mon, 04 Feb 2008) |
3 |
New Revision: 9272 |
4 |
|
5 |
Modified: |
6 |
private/antarus/infra/commit-email.pl |
7 |
Log: |
8 |
Fix bugs in the script antarus modified for me. |
9 |
|
10 |
Modified: private/antarus/infra/commit-email.pl |
11 |
=================================================================== |
12 |
--- private/antarus/infra/commit-email.pl 2008-02-01 22:22:20 UTC (rev 9271) |
13 |
+++ private/antarus/infra/commit-email.pl 2008-02-04 11:38:21 UTC (rev 9272) |
14 |
@@ -36,6 +36,7 @@ |
15 |
|
16 |
use strict; |
17 |
use Carp; |
18 |
+use File::Basename; |
19 |
|
20 |
###################################################################### |
21 |
# Configuration section. |
22 |
@@ -228,7 +229,7 @@ |
23 |
# directory. This could be removed - it's only for compatibility with |
24 |
# 1.0.x svnlook - from 1.1.0, svnlook will be sensible about choosing a |
25 |
# temporary directory all by itself. |
26 |
-my $tmp_dir = ( -d $ENV{'TEMP'} ? $ENV{'TEMP'} : '/tmp' ); |
27 |
+my $tmp_dir = ( (defined($ENV{'TEMP'}) && -d $ENV{'TEMP'}) ? $ENV{'TEMP'} : '/tmp' ); |
28 |
chdir($tmp_dir) |
29 |
or die "$0: cannot chdir `$tmp_dir': $!\n"; |
30 |
|
31 |
@@ -443,7 +444,9 @@ |
32 |
my @split = split('=', $header, 2); |
33 |
push(@head, "$split[0]: $split[1]\n"); |
34 |
} |
35 |
- push(@head, "X-VCS-Repository: $repos\n"); |
36 |
+ my $repobase = basename($repos); |
37 |
+ push(@head, "X-VCS-Repository: $repobase\n"); |
38 |
+ push(@head, "X-VCS-Revision: $rev\n"); |
39 |
push(@head, "X-VCS-Files: " . join(' ', @adds, @dels, @mods) . "\n"); |
40 |
push(@head, "X-VCS-Directories: " . $dirlist . "\n"); |
41 |
push(@head, "X-VCS-Committer: $author\n"); |
42 |
@@ -520,7 +523,7 @@ |
43 |
"options are\n", |
44 |
" --from email_address Email address for 'From:' (overrides -h)\n", |
45 |
" -h hostname Hostname to append to author for 'From:'\n", |
46 |
- " --header header_name=value to append to the mail\n" |
47 |
+ " --header header_name=value to append to the mail\n", |
48 |
" -l logfile Append mail contents to this log file\n", |
49 |
" -m regex Regular expression to match committed path\n", |
50 |
" -r email_address Email address for 'Reply-To:'\n", |
51 |
|
52 |
-- |
53 |
gentoo-commits@l.g.o mailing list |