From 2e632b8f61b7ad032845186874498d2c8bc356ef Mon Sep 17 00:00:00 2001 From: Jan Lehnardt Date: Mon, 28 Mar 2011 14:00:53 +0000 Subject: Fix function signature mismatch. Allow purging of single revisions in a conflicted document. Closes COUCHDB-1065 Patch by Randall Leeds, verified by Robert Dionne. git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1086240 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_db_updater.erl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/couchdb/couch_db_updater.erl b/src/couchdb/couch_db_updater.erl index c14d6bf9..2b317d95 100644 --- a/src/couchdb/couch_db_updater.erl +++ b/src/couchdb/couch_db_updater.erl @@ -118,8 +118,9 @@ handle_call({purge_docs, IdRevs}, _From, Db) -> {DocInfoToUpdate, NewSeq} = lists:mapfoldl( fun(#full_doc_info{rev_tree=Tree}=FullInfo, SeqAcc) -> - Tree2 = couch_key_tree:map_leafs( fun(RevInfo) -> - RevInfo#rev_info{seq=SeqAcc + 1} + Tree2 = couch_key_tree:map_leafs( + fun(_RevId, {IsDeleted, BodyPointer, _UpdateSeq}) -> + {IsDeleted, BodyPointer, SeqAcc + 1} end, Tree), {couch_doc:to_doc_info(FullInfo#full_doc_info{rev_tree=Tree2}), SeqAcc + 1} -- cgit v1.2.3