summaryrefslogtreecommitdiff
path: root/utils/svn-testament.pl
diff options
context:
space:
mode:
Diffstat (limited to 'utils/svn-testament.pl')
-rwxr-xr-xutils/svn-testament.pl11
1 files changed, 11 insertions, 0 deletions
diff --git a/utils/svn-testament.pl b/utils/svn-testament.pl
index f159f00d4..30240e927 100755
--- a/utils/svn-testament.pl
+++ b/utils/svn-testament.pl
@@ -67,6 +67,17 @@ my $testament = "";
$testament .= "#define USERNAME \"$userinfo{USERNAME}\"\n";
$testament .= "#define GECOS \"$userinfo{GECOS}\"\n";
+my $qroot = $root;
+$qroot =~ s/"/\\"/g;
+
+my $hostname = $ENV{HOSTNAME};
+
+$hostname = "unknown-host" unless (defined($hostname) && $hostname ne "");
+$hostname =~ s/"/\\"/g;
+
+$testament .= "#define WT_ROOT \"$qroot\"\n";
+$testament .= "#define WT_HOSTNAME \"$hostname\"\n";
+
my $url = $svninfo{url};
# This only works on 1.3.x and above
$url = substr($url, length($svninfo{repositoryroot}));