]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Add experimental support for learning svn revision number in git-svn based repositori...
authorNick Mathewson <nickm@torproject.org>
Thu, 11 Dec 2008 06:52:24 +0000 (06:52 +0000)
committerNick Mathewson <nickm@torproject.org>
Thu, 11 Dec 2008 06:52:24 +0000 (06:52 +0000)
svn:r17581

ChangeLog
src/or/Makefile.am

index 8c5c9cda1d162281124843c0eefe5692b074cf24..8e69f816b470ce8c3661b5c7ae2bc9a8dc0b5e25 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,7 @@ Changes in version 0.2.1.9-alpha - 200?-??-??
       automatically stop Tor from starting.  Instead, we retry failed
       dns_inits() every 10 minutes, and change the exit policy to reject *:*
       until one succeeds.  Fixes bug 691.
+    - Detect svn revision properly when we're using git-svn.
 
   o Minor features (controller):
     - New CONSENSUS_ARRIVED event to note when a new consensus has
index d7bac19708c315924e7724fb05ac89d14597ab23..28d7e736dcd4380e4302a84f44457e927c40d951 100644 (file)
@@ -55,11 +55,18 @@ noinst_HEADERS = or.h eventdns.h eventdns_tor.h micro-revision.i
 tor_main.o: micro-revision.i
 
 micro-revision.i: FORCE
-       @svkdir=$$SVKROOT; \
-       if test "x$$svkdir" = x ; then \
-         svkdir=$$HOME/.svk; \
-       fi; \
-       if test -d ../../.svn && test -x "`which svn 2>&1;true`" ; then \
+       @svkdir=$$SVKROOT;                                      \
+       if test "x$$svkdir" = x ; then                          \
+         svkdir=$$HOME/.svk;                                   \
+       fi;                                                     \
+       if test -d ../../.git && test -x "`which git 2>&1;true`" ; then \
+         if test -d ../../.git/svn && test -x "`which git-svn 2>&1;true`" ; then \
+           git-svn info ../../README |                         \
+           sed -n 's/^Revision: \([0-9][0-9]*\).*/"\1"/p'      \
+                                          > micro-revision.tmp \
+               || true;                                        \
+         fi;                                                   \
+       elif test -d ../../.svn && test -x "`which svn 2>&1;true`" ; then \
          svn info ../.. |                                      \
          sed -n 's/^Revision: \([0-9][0-9]*\).*/"\1"/p' > micro-revision.tmp \
             || true;                                           \