couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From beno...@apache.org
Subject [06/10] couch-httpd commit: updated refs/heads/1994-merge-rcouch to 82e454a
Date Sun, 13 Jul 2014 12:34:21 GMT
view changes: distinct deleted document from removed keys


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

Branch: refs/heads/1994-merge-rcouch
Commit: d4705bff8465f0d81bc406743b2602291a3ac7d1
Parents: 3ca63eb
Author: benoitc <bchesneau@gmail.com>
Authored: Thu Jul 3 13:07:33 2014 +0200
Committer: benoitc <bchesneau@gmail.com>
Committed: Sun Jul 13 14:33:20 2014 +0200

----------------------------------------------------------------------
 src/couch_httpd_changes.erl | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-httpd/blob/d4705bff/src/couch_httpd_changes.erl
----------------------------------------------------------------------
diff --git a/src/couch_httpd_changes.erl b/src/couch_httpd_changes.erl
index 9548e30..01a71fe 100644
--- a/src/couch_httpd_changes.erl
+++ b/src/couch_httpd_changes.erl
@@ -281,9 +281,9 @@ view_change_row(Db, DocInfo, Args, Removed) ->
                 || #rev_info{rev=R} <- Revs]
     end,
 
-    Del = case {Removed, Del0} of
-        {true, _} -> true;
-        {false, true} -> true;
+    Del = case {Del0, Removed} of
+        {true, _} -> deleted;
+        {false, true} -> removed;
         _ -> false
     end,
 
@@ -454,5 +454,6 @@ parse_json(V, false) when is_list(V) ->
 parse_json(V, _) ->
     V.
 
-deleted_item(true) -> [{<<"deleted">>, true}];
+deleted_item(deleted) -> [{<<"deleted">>, true}];
+deleted_item(removed) -> [{<<"removed">>, true}];
 deleted_item(_) -> [].


Mime
View raw message