[tor-commits] [tor/master] Revert "Simplest fix to bug2402: do not include SVN versions"
nickm at torproject.org
nickm at torproject.org
Wed Apr 6 20:19:51 UTC 2011
commit 671318c3a84657acc8b97cf59871489065264ece
Author: Nick Mathewson <nickm at torproject.org>
Date: Fri Mar 11 10:47:25 2011 -0500
Revert "Simplest fix to bug2402: do not include SVN versions"
This reverts commit a1073ee956021ead19d30c2151510dbaced416a8.
Apparently, we totally misunderstood how the debian packages were using
microrevisions. Better fix that!
---
changes/bug2402 | 4 ----
src/or/config.c | 11 ++++++++++-
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/changes/bug2402 b/changes/bug2402
deleted file mode 100644
index f16f677..0000000
--- a/changes/bug2402
+++ /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.
diff --git a/src/or/config.c b/src/or/config.c
index 209a92d..8397b23 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -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
More information about the tor-commits
mailing list