couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robertkowal...@apache.org
Subject couch commit: updated refs/heads/perf-test-1 to 2f30e37
Date Mon, 29 Jun 2015 21:56:32 GMT
Repository: couchdb-couch
Updated Branches:
  refs/heads/perf-test-1 [created] 2f30e3773


Revert "perf: http layer - speedup couchdb version lookup"

This reverts commit e19b262d4e5bd5ff1765b22589b8d3eeaac88749.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/2f30e377
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/2f30e377
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/2f30e377

Branch: refs/heads/perf-test-1
Commit: 2f30e3773e3b63aa8c6c7988652dad45e2c7138a
Parents: c2ef372
Author: Robert Kowalski <robertkowalski@apache.org>
Authored: Mon Jun 29 23:56:01 2015 +0200
Committer: Robert Kowalski <robertkowalski@apache.org>
Committed: Mon Jun 29 23:56:01 2015 +0200

----------------------------------------------------------------------
 src/couch_server.erl | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/2f30e377/src/couch_server.erl
----------------------------------------------------------------------
diff --git a/src/couch_server.erl b/src/couch_server.erl
index 6c718ce..e8a94fb 100644
--- a/src/couch_server.erl
+++ b/src/couch_server.erl
@@ -45,9 +45,12 @@ dev_start() ->
     couch:start().
 
 get_version() ->
-    case application:get_key(couch, vsn) of
-        {ok, Version} -> Version;
-        undefined -> "0.0.0"
+    Apps = application:loaded_applications(),
+    case lists:keysearch(couch, 1, Apps) of
+    {value, {_, _, Vsn}} ->
+        Vsn;
+    false ->
+        "0.0.0"
     end.
 get_version(short) ->
   %% strip git hash from version string


Mime
View raw message