couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [6/9] couch commit: updated refs/heads/windsor-merge to 2c36e16
Date Thu, 07 Aug 2014 17:57:23 GMT
Update old function specs to be correct


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

Branch: refs/heads/windsor-merge
Commit: 87f0a0ff907f2594cb3c576bc5398ceccf9af12c
Parents: 18c0a80
Author: Benjamin Bastian <benjamin.bastian@gmail.com>
Authored: Thu Jan 23 14:27:53 2014 -0800
Committer: Robert Newson <rnewson@apache.org>
Committed: Thu Aug 7 18:55:10 2014 +0100

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


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/87f0a0ff/src/couch_key_tree.erl
----------------------------------------------------------------------
diff --git a/src/couch_key_tree.erl b/src/couch_key_tree.erl
index 1659547..9ad6f7f 100644
--- a/src/couch_key_tree.erl
+++ b/src/couch_key_tree.erl
@@ -90,7 +90,8 @@ merge(RevTree, Tree) ->
 %% @doc Attempt to merge Tree into each branch of the RevTree.
 %% If it can't find a branch that the new tree merges into, add it as a
 %% new branch in the RevTree.
--spec merge_tree(revtree(), tree(), revtree()) -> {revtree(), boolean()}.
+-spec merge_tree(revtree(), tree(), revtree()) ->
+                {revtree(), new_leaf | new_branch | internal_node}.
 merge_tree([], Tree, []) ->
     {[Tree], new_leaf};
 merge_tree([], Tree, MergeAcc) ->
@@ -122,7 +123,8 @@ merge_tree([{Depth, Nodes} | Rest], {IDepth, INodes}=Tree, MergeAcc) ->
 %% before we can start comparing node keys. If one of the branches
 %% ends up running out of nodes we know that these two branches can
 %% not be merged.
--spec merge_at([node()], integer(), [node()]) -> {revtree(), boolean()} | fail.
+-spec merge_at([node()], integer(), [node()]) ->
+                {revtree(), new_leaf | new_branch | internal_node} | fail.
 merge_at(_Nodes, _Pos, []) ->
     fail;
 merge_at([], _Pos, _INodes) ->
@@ -164,7 +166,8 @@ merge_at([Tree | Sibs], 0, INodes) ->
         fail -> fail
     end.
 
--spec merge_extend(tree(), tree()) -> {tree(), atom()}.
+-spec merge_extend(tree(), tree()) ->
+                {tree(), new_leaf | new_branch | internal_node}.
 merge_extend([], B) when B =/= [] ->
     % Most likely the insert branch simply extends this one, so the new
     % branch is exactly B. Its also possible that B is a branch because


Mime
View raw message