couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject [09/50] [abbrv] couch commit: updated refs/heads/import-rcouch to e2dbc79
Date Thu, 06 Feb 2014 17:39:51 GMT
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 <jan@apache.org>
Authored: Sat Aug 3 15:19:13 2013 +0200
Committer: Jan Lehnardt <jan@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


Mime
View raw message