From d8e0038333aec76f6faff7c48c4f3c53f8e72939 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Thu, 8 Mar 2012 05:07:15 +0000 Subject: [PATCH] Fix SVN revision check with SVN 1.7 when the aegisub directory is not the top level directory of the working copy. Patch by Larso. Closes #1458. Originally committed to SVN as r6548. --- aegisub/configure.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aegisub/configure.in b/aegisub/configure.in index 7bb087767..3240112f8 100644 --- a/aegisub/configure.in +++ b/aegisub/configure.in @@ -154,8 +154,9 @@ PKG_PROG_PKG_CONFIG([pkgconfig_required_version]) # XXX: This needs to be fixed to handle mixed revisions properly # There is probably a better way to handle it as well... AC_MSG_CHECKING([for svn version]) -AS_IF([test -d "$srcdir/.svn"], [ - SVN_REVISION=`svnversion $srcdir | sed "s/\(^@<:@0-9@:>@*\).*/\1/"` +# Try to get revision from working copy and check if it makes sense +SVN_REVISION=`svnversion $srcdir | sed "s/\(^@<:@0-9@:>@*\).*/\1/"` 2> /dev/null +AS_IF([test -n "$SVN_REVISION" -a -z "`echo $SVN_REVISION | tr -d '0-9'`"], [ `echo $SVN_REVISION > $srcdir/svn_revision` AC_MSG_RESULT([$SVN_REVISION from "svnversion $srcdir"]) ], [test -f "$srcdir/svn_revision"], [