You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2014/02/06 18:39:51 UTC

[09/50] [abbrv] couch commit: updated refs/heads/import-rcouch to e2dbc79

move couch_version() to couch_server:couch_version(short)


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

Branch: refs/heads/import-rcouch
Commit: b3df544301653e9346eefdb04a92473c305ed9b3
Parents: c7cd4b4
Author: Jan Lehnardt <ja...@apache.org>
Authored: Sat Aug 3 15:19:13 2013 +0200
Committer: Jan Lehnardt <ja...@apache.org>
Committed: Thu Oct 3 16:08:37 2013 +0200

----------------------------------------------------------------------
 couch_server.erl | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/b3df5443/couch_server.erl
----------------------------------------------------------------------
diff --git a/couch_server.erl b/couch_server.erl
index 4aceb55..7cee0f5 100644
--- a/couch_server.erl
+++ b/couch_server.erl
@@ -13,7 +13,7 @@
 -module(couch_server).
 -behaviour(gen_server).
 
--export([open/2,create/2,delete/2,get_version/0,get_uuid/0]).
+-export([open/2,create/2,delete/2,get_version/0,get_version/1,get_uuid/0]).
 -export([all_databases/0, all_databases/2]).
 -export([init/1, handle_call/3,sup_start_link/0]).
 -export([handle_cast/2,code_change/3,handle_info/2,terminate/2]).
@@ -42,6 +42,11 @@ get_version() ->
     false ->
         "0.0.0"
     end.
+get_version(short) ->
+  %% strip git hash from version string
+  [Version|_Rest] = string:tokens(get_version(), "+"),
+  Version.
+
 
 get_uuid() ->
     case couch_config:get("couchdb", "uuid", nil) of