Updated Branches: refs/heads/master a2bea1f94 -> 8c4285373
Whitespace Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/8c428537 Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/8c428537 Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/8c428537 Branch: refs/heads/master Commit: 8c4285373de9faef20de5a55c56f4cda94e90a29 Parents: a2bea1f Author: bitdiddle <[email protected]> Authored: Mon Mar 12 08:51:18 2012 -0400 Committer: bitdiddle <[email protected]> Committed: Mon Mar 12 08:51:18 2012 -0400 ---------------------------------------------------------------------- src/couchdb/couch_doc.erl | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb/blob/8c428537/src/couchdb/couch_doc.erl ---------------------------------------------------------------------- diff --git a/src/couchdb/couch_doc.erl b/src/couchdb/couch_doc.erl index 7b7233e..b565a91 100644 --- a/src/couchdb/couch_doc.erl +++ b/src/couchdb/couch_doc.erl @@ -62,8 +62,8 @@ revid_to_str(RevId) -> rev_to_str({Pos, RevId}) -> ?l2b([integer_to_list(Pos),"-",revid_to_str(RevId)]). - - + + revs_to_strs([]) -> []; revs_to_strs([{Pos, RevId}| Rest]) -> @@ -423,7 +423,7 @@ merge_stubs(#doc{id=Id,atts=MemBins}=StubsDoc, #doc{atts=DiskBins}) -> MergedBins = lists:map( fun(#att{name=Name, data=stub, revpos=StubRevPos}) -> case dict:find(Name, BinDict) of - {ok, #att{revpos=DiskRevPos}=DiskAtt} + {ok, #att{revpos=DiskRevPos}=DiskAtt} when DiskRevPos == StubRevPos orelse StubRevPos == nil -> DiskAtt; _ -> @@ -517,7 +517,7 @@ doc_from_multi_part_stream(ContentType, DataFun) -> end), Ref = make_ref(), Parser ! {get_doc_bytes, Ref, self()}, - receive + receive {doc_bytes, Ref, DocBytes} -> Doc = from_json_obj(?JSON_DECODE(DocBytes)), % go through the attachments looking for 'follows' in the data,
