From: Sandro Santilli Date: Wed, 29 Feb 2012 13:35:20 +0000 (+0000) Subject: Don't override postgis_svn_revision.h with a fake revision (#1634) X-Git-Tag: 2.0.0beta1~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8a86eaeaf6f19bccceab7e8764769a88925ed3bc;p=postgis Don't override postgis_svn_revision.h with a fake revision (#1634) git-svn-id: http://svn.osgeo.org/postgis/trunk@9348 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/utils/svn_repo_revision.pl b/utils/svn_repo_revision.pl index 519e87075..add006981 100755 --- a/utils/svn_repo_revision.pl +++ b/utils/svn_repo_revision.pl @@ -14,8 +14,6 @@ $target = $ARGV[0] if $ARGV[0]; # Read the svn revision number my $svn_rev = &read_rev($target); -# TODO: compare what's known already with what's to be written - # Write it &write_defn($svn_rev); @@ -113,7 +111,7 @@ sub write_defn { my $oldrev = 0; # Do not override the file if new detected - # revision isn't different from the existing one + # revision isn't zero nor different from the existing one if ( -f $rev_file ) { open(IN, "<$rev_file"); my $oldrevline = ; @@ -121,8 +119,8 @@ sub write_defn { $oldrev = $1; } close(IN); - if ( $rev == $oldrev ) { - print STDERR "Not updating existing rev file at $rev\n"; + if ( $rev == 0 or $rev == $oldrev ) { + print STDERR "Not updating existing rev file at $oldrev\n"; return; } }