]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
r12425@catbus: nickm | 2007-04-17 17:16:38 -0400
authorNick Mathewson <nickm@torproject.org>
Tue, 17 Apr 2007 21:16:40 +0000 (21:16 +0000)
committerNick Mathewson <nickm@torproject.org>
Tue, 17 Apr 2007 21:16:40 +0000 (21:16 +0000)
 Detect the svn version correctly when building from an svk checkout too.  Whee, fun with bash and make.

svn:r9985

ChangeLog
src/or/Makefile.am

index e77e5070fc390421387add194ce0d62fbd44e8d6..29dc10af230f8d3cf21e8ed14bf86c73d02148bc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -23,8 +23,8 @@ Changes in version 0.2.0.1-alpha - 2007-??-??
     - When warning about missing headers, tell the user to let us
       know if the compile succeeds anyway, so we can downgrade the
       warning.
-    - If we're building from a subversion repository, include the current
-      SVN revision as part of the version string.
+    - If we're building from a subversion checkout or an SVK mirror, include
+      the current SVN revision as part of the version string.
 
   o Minor features (logging):
     - Always prepend "Bug: " to any log message about a bug.
index 8e2011017e1a653eae08ed98b96c7d5e40e83a47..ff24a5ffeba7816a67231aa32fd729cab64eec43 100644 (file)
@@ -37,6 +37,28 @@ micro-revision.i: FORCE
          sed -n 's/^Revision: \([0-9][0-9]*\).*/"\1"/p' > micro-revision.i \
             || true; \
        fi;                                                     \
+       if test ! -f micro-revision.i -a x`which svk` != x; then\
+          location=../..;                                       \
+          rev=x;                                                \
+          while test x$$rev = xx; do                             \
+            x=`svk info $$location |                             \
+              sed -n 's/^Mirrored From:.*, Rev\. \([0-9][0-9]*\)/\1/p'`; \
+            if test x$$x != x; then                              \
+              rev=$$x;                                           \
+              break;                                            \
+            else                                                \
+              loc=`svk info $$location |                         \
+                sed -n 's/^Copied From: \(.*\), Rev\. [0-9][0-9]*/\1/p'`; \
+              if test x$$loc == x; then                          \
+                rev="";                                         \
+                break;                                          \
+              else                                              \
+                location=/$$loc;                                 \
+              fi;                                               \
+            fi;                                                 \
+          done;                                                 \
+          echo \"$$rev\" > micro-revision.i;                   \
+        fi;                                                     \
        if test ! -f micro-revision.i; then                     \
          echo '""' > micro-revision.i;                         \
        fi