]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Revert "Simplest fix to bug2402: do not include SVN versions"
authorNick Mathewson <nickm@torproject.org>
Fri, 11 Mar 2011 15:47:25 +0000 (10:47 -0500)
committerNick Mathewson <nickm@torproject.org>
Fri, 11 Mar 2011 15:47:25 +0000 (10:47 -0500)
This reverts commit a1073ee956021ead19d30c2151510dbaced416a8.

Apparently, we totally misunderstood how the debian packages were using
microrevisions.  Better fix that!

changes/bug2402 [deleted file]
src/or/config.c

diff --git a/changes/bug2402 b/changes/bug2402
deleted file mode 100644 (file)
index f16f677..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-  o Minor bugfixes (build)
-    - Do not include Git version tags as though they were SVN tags when
-      generating a tarball from inside a repository that has switched between
-      branches.  Bugfix on 0.2.1.15-rc; fixes bug 2402.
index 209a92d1592a43674e1bc4c9f17d9401b1e0fea3..8397b231a3c06753cc856ec2d5b259bf5ab66d20 100644 (file)
@@ -827,7 +827,16 @@ static char *_version = NULL;
 const char *
 get_version(void)
 {
-  return VERSION;
+  if (_version == NULL) {
+    if (strlen(tor_svn_revision)) {
+      size_t len = strlen(VERSION)+strlen(tor_svn_revision)+8;
+      _version = tor_malloc(len);
+      tor_snprintf(_version, len, "%s (r%s)", VERSION, tor_svn_revision);
+    } else {
+      _version = tor_strdup(VERSION);
+    }
+  }
+  return _version;
 }
 
 /** Release additional memory allocated in options