diff options
author | Daniel Silverstone <dsilvers@netsurf-browser.org> | 2011-03-13 12:17:18 +0000 |
---|---|---|
committer | Daniel Silverstone <dsilvers@netsurf-browser.org> | 2011-03-13 12:17:18 +0000 |
commit | 514b94b1f4471c41a68fd3ad2a6226840e4e2aef (patch) | |
tree | 5e8d78a4d2427af443d764fc06f762f2d7b32427 | |
parent | 8695000b833f9464ef414e09cb2a96958fe96c8b (diff) | |
download | netsurf-514b94b1f4471c41a68fd3ad2a6226840e4e2aef.tar.gz netsurf-514b94b1f4471c41a68fd3ad2a6226840e4e2aef.tar.bz2 |
Add hostname and path
svn path=/trunk/netsurf/; revision=12023
-rw-r--r-- | content/fetchers/about.c | 8 | ||||
-rwxr-xr-x | utils/svn-testament.pl | 11 |
2 files changed, 19 insertions, 0 deletions
diff --git a/content/fetchers/about.c b/content/fetchers/about.c index b343d2a61..0e703f370 100644 --- a/content/fetchers/about.c +++ b/content/fetchers/about.c @@ -332,6 +332,14 @@ static bool fetch_about_testament_handler(struct fetch_about_context *ctx) FETCH_ERROR_NO_ERROR)) goto fetch_about_testament_handler_aborted; + slen = snprintf(buffer, sizeof buffer, + "Built on %s in %s\n\n", + WT_HOSTNAME, WT_ROOT); + + if (fetch_about_send_callback(FETCH_DATA, ctx, buffer, slen, + FETCH_ERROR_NO_ERROR)) + goto fetch_about_testament_handler_aborted; + if (WT_MODIFIED > 0) { slen = snprintf(buffer, sizeof buffer, "Working tree has %d modification%s\n\n", 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})); |