couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject couch commit: updated refs/heads/2655-r-met to 855ee1c
Date Thu, 02 Apr 2015 10:53:50 GMT
Repository: couchdb-couch
Updated Branches:
  refs/heads/2655-r-met 7d811d33a -> 855ee1c1f (forced update)


Ignore new special field _r_met

COUCHDB-2655


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

Branch: refs/heads/2655-r-met
Commit: 855ee1c1f5fbfee7b7aca0c8f565ed82168f7605
Parents: b6d8665
Author: Robert Newson <rnewson@apache.org>
Authored: Thu Apr 2 11:48:23 2015 +0100
Committer: Robert Newson <rnewson@apache.org>
Committed: Thu Apr 2 11:53:42 2015 +0100

----------------------------------------------------------------------
 src/couch_doc.erl | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/855ee1c1/src/couch_doc.erl
----------------------------------------------------------------------
diff --git a/src/couch_doc.erl b/src/couch_doc.erl
index 6fc9b09..39fe4f3 100644
--- a/src/couch_doc.erl
+++ b/src/couch_doc.erl
@@ -86,6 +86,8 @@ to_json_meta(Meta) ->
             [{<<"_conflicts">>, revs_to_strs(Conflicts)}];
         ({deleted_conflicts, DConflicts}) ->
             [{<<"_deleted_conflicts">>, revs_to_strs(DConflicts)}];
+        ({r_met, Bool}) ->
+            [{<<"_r_met">>, Bool}];
         (_) ->
             []
         end, Meta).
@@ -193,6 +195,11 @@ transfer_fields([{<<"_rev">>, _Rev} | Rest], Doc) ->
     % we already got the rev from the _revisions
     transfer_fields(Rest,Doc);
 
+transfer_fields([{<<"_r_met">>, _Bool} | Rest], Doc) ->
+    % _r_met is informational only and has no bearing on
+    % how we'll use the document.
+    transfer_fields(Rest,Doc);
+
 transfer_fields([{<<"_attachments">>, {JsonBins}} | Rest], Doc) ->
     Atts = [couch_att:from_json(Name, Props) || {Name, {Props}} <- JsonBins],
     transfer_fields(Rest, Doc#doc{atts=Atts});


Mime
View raw message