[tor-commits] [torflow/master] Output git revision.

mikeperry at torproject.org mikeperry at torproject.org
Mon Nov 21 04:53:27 UTC 2011


commit 02a11b2728581c0f446fd3aeeca2a1b42beb30e0
Author: Mike Perry <mikeperry-git at fscked.org>
Date:   Sun Nov 20 20:43:11 2011 -0800

    Output git revision.
---
 NetworkScanners/BwAuthority/aggregate.py |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/NetworkScanners/BwAuthority/aggregate.py b/NetworkScanners/BwAuthority/aggregate.py
index c55b9a1..8e308d1 100755
--- a/NetworkScanners/BwAuthority/aggregate.py
+++ b/NetworkScanners/BwAuthority/aggregate.py
@@ -56,6 +56,9 @@ MAX_AGE = 2*GUARD_SAMPLE_RATE
 # If the resultant scan file is older than 1.5 days, something is wrong
 MAX_SCAN_AGE = 60*60*24*1.5
 
+# path to git repos (.git)
+PATH_TO_TORFLOW_REPO = '../../.git/'
+PATH_TO_TORCTL_REPO = '../../TorCtl/.git/'
 
 def base10_round(bw_val):
   # This keeps the first 3 decimal digits of the bw value only
@@ -327,6 +330,11 @@ def main(argv):
   TorUtil.read_config(argv[1]+"/scanner.1/bwauthority.cfg")
   TorUtil.loglevel = "NOTICE"
 
+  (branch, head) = TorUtil.get_git_version(PATH_TO_TORFLOW_REPO)
+  plog('INFO', 'TorFlow Version: %s' % branch+' '+head)
+  (branch, head) = TorUtil.get_git_version(PATH_TO_TORCTL_REPO)
+  plog('INFO', 'TorCtl Version: %s' % branch+' '+head)
+
   s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
   s.connect((TorUtil.control_host,TorUtil.control_port))
   c = TorCtl.Connection(s)





More information about the tor-commits mailing list