(svn r14053) -Fix: branch detection failed for svn+ssh repos
authorglx
Tue, 12 Aug 2008 18:03:32 +0000
changeset 9903 2c511d591fc8
parent 9902 035856ac432b
child 9904 774f078c0e5c
(svn r14053) -Fix: branch detection failed for svn+ssh repos
Makefile.in
Makefile.src.in
--- a/Makefile.in	Tue Aug 12 12:23:05 2008 +0000
+++ b/Makefile.in	Tue Aug 12 18:03:32 2008 +0000
@@ -156,7 +156,7 @@
 # Find if the local source if modified
 REV_MODIFIED := $(shell svnversion $(SRC_DIR) | sed -n 's/.*\(M\).*/\1/p' )
 # Find the revision like: rXXXX-branch
-REV := $(shell LC_ALL=C svn info $(SRC_DIR) | $(AWK) '/^URL:.*branches/ { split($$2, a, "/"); BRANCH="-"a[5] } /^Last Changed Rev:/ { REV="r"$$4"$(REV_MODIFIED)" } END { print REV BRANCH }')
+REV := $(shell LC_ALL=C svn info $(SRC_DIR) | $(AWK) '/^URL:.*branches/ { split($$2, a, "/"); i=1; while(i<length(a) && a[i++]!="branches"); BRANCH="-"a[i] } /^Last Changed Rev:/ { REV="r"$$4"$(REV_MODIFIED)" } END { print REV BRANCH }')
 endif
 endif
 # Make sure we have something in REV
--- a/Makefile.src.in	Tue Aug 12 12:23:05 2008 +0000
+++ b/Makefile.src.in	Tue Aug 12 18:03:32 2008 +0000
@@ -124,7 +124,7 @@
 ifeq ($(shell if test -d $(SRC_DIR)/.svn; then echo 1; fi), 1)
 # Find if the local source if modified
 # Find the revision like: rXXXX-branch
-REV := $(shell LC_ALL=C svn info $(SRC_DIR) | $(AWK) '/^URL:.*branch/ { split($$2, a, "/"); BRANCH="-"a[5] } /^Last Changed Rev:/ { REV="r"$$4"$(REV_MODIFIED)" } END { print REV BRANCH }')
+REV := $(shell LC_ALL=C svn info $(SRC_DIR) | $(AWK) '/^URL:.*branch/ { split($$2, a, "/");  i=1; while(i<length(a) && a[i++]!="branches"); BRANCH="-"a[i] } /^Last Changed Rev:/ { REV="r"$$4"$(REV_MODIFIED)" } END { print REV BRANCH }')
 REV_NR := $(shell LC_ALL=C svn info $(SRC_DIR) | $(AWK) '/^Last Changed Rev:/ { print $$4 }')
 else
 # Are we a git dir?