couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From beno...@apache.org
Subject couch-mrview commit: updated refs/heads/1994-merge-rcouch to 8dae82a
Date Mon, 14 Jul 2014 15:01:06 GMT
Repository: couchdb-couch-mrview
Updated Branches:
  refs/heads/1994-merge-rcouch 4e0f29577 -> 8dae82ae6


fix issue with the keys option

next accumulated state was incorrectly given to the function. this
changes fix it.


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

Branch: refs/heads/1994-merge-rcouch
Commit: 8dae82ae6545b31c2f52b91f8e7aef1af9519f0e
Parents: 4e0f295
Author: benoitc <bchesneau@gmail.com>
Authored: Mon Jul 14 15:35:13 2014 +0200
Committer: benoitc <bchesneau@gmail.com>
Committed: Mon Jul 14 16:59:18 2014 +0200

----------------------------------------------------------------------
 src/couch_mrview.erl | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/8dae82ae/src/couch_mrview.erl
----------------------------------------------------------------------
diff --git a/src/couch_mrview.erl b/src/couch_mrview.erl
index dc6ece1..dddfc4d 100644
--- a/src/couch_mrview.erl
+++ b/src/couch_mrview.erl
@@ -127,12 +127,13 @@ view_changes_since(Db, DDoc, VName, StartSeq, UserFun, Options, Acc)
->
                     {ok, Acc2}
             end,
 
-            {_, _, AccOut} = lists:foldl(fun(Opts, Acc0) ->
-                        Acc1 = {Dir, StartSeq, Acc0},
-                        {ok, _R, A} = couch_mrview_util:fold_changes(
+
+            Acc0 = {Dir, StartSeq, Acc},
+            {_, _, AccOut} = lists:foldl(fun(Opts, Acc1) ->
+                        {ok, _R, Acc2} = couch_mrview_util:fold_changes(
                                     Btree, WrapperFun, Acc1, Opts),
-                        A
-                end, Acc, OptList),
+                        Acc2
+                end, Acc0, OptList),
             {ok, AccOut};
         _ ->
             {error, seqs_not_indexed}


Mime
View raw message