[or-cvs] r17581: {tor} Add experimental support for learning svn revision number in (in tor/trunk: . src/or)
nickm at seul.org
nickm at seul.org
Thu Dec 11 06:52:24 UTC 2008
Author: nickm
Date: 2008-12-11 01:52:24 -0500 (Thu, 11 Dec 2008)
New Revision: 17581
Modified:
tor/trunk/ChangeLog
tor/trunk/src/or/Makefile.am
Log:
Add experimental support for learning svn revision number in git-svn based repositories. Fancy.
Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog 2008-12-11 06:18:09 UTC (rev 17580)
+++ tor/trunk/ChangeLog 2008-12-11 06:52:24 UTC (rev 17581)
@@ -15,6 +15,7 @@
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
Modified: tor/trunk/src/or/Makefile.am
===================================================================
--- tor/trunk/src/or/Makefile.am 2008-12-11 06:18:09 UTC (rev 17580)
+++ tor/trunk/src/or/Makefile.am 2008-12-11 06:52:24 UTC (rev 17581)
@@ -55,11 +55,18 @@
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; \
More information about the tor-commits
mailing list