You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2018/07/08 13:50:20 UTC

[couchdb] branch fix/1101/mango-conflicts updated (20e2b21 -> 8d57bb3)

This is an automated email from the ASF dual-hosted git repository.

jan pushed a change to branch fix/1101/mango-conflicts
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


 discard 20e2b21  Add `conflicts: true` option to mango selectors
     new 8d57bb3  Add `conflicts: true` option to mango selectors

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (20e2b21)
            \
             N -- N -- N   refs/heads/fix/1101/mango-conflicts (8d57bb3)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:


[couchdb] 01/01: Add `conflicts: true` option to mango selectors

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jan pushed a commit to branch fix/1101/mango-conflicts
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 8d57bb350e46a1ab1450c90fb2f5525063018493
Author: Jan Lehnardt <ja...@apache.org>
AuthorDate: Sun Jul 8 15:48:39 2018 +0200

    Add `conflicts: true` option to mango selectors
    
    This allows for using Mango queries for finding docs with conflicts.
    
    Closes #1101
---
 src/mango/src/mango_cursor_view.erl | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/mango/src/mango_cursor_view.erl b/src/mango/src/mango_cursor_view.erl
index 1e2108b..dbea36e 100644
--- a/src/mango/src/mango_cursor_view.erl
+++ b/src/mango/src/mango_cursor_view.erl
@@ -70,7 +70,8 @@ explain(Cursor) ->
         {end_key, maybe_replace_max_json(Args#mrargs.end_key)},
         {direction, Args#mrargs.direction},
         {stable, Args#mrargs.stable},
-        {update, Args#mrargs.update}
+        {update, Args#mrargs.update},
+        {conflicts, Args#mrargs.conflicts}
     ]}}].
 
 
@@ -283,9 +284,8 @@ apply_opts([{r, RStr} | Rest], Args) ->
     NewArgs = Args#mrargs{include_docs = IncludeDocs},
     apply_opts(Rest, NewArgs);
 apply_opts([{conflicts, true} | Rest], Args) ->
-    % I need to patch things so that views can specify
-    % parameters when loading the docs from disk
-    apply_opts(Rest, Args);
+    NewArgs = Args#mrargs{conflicts = true},
+    apply_opts(Rest, NewArgs);
 apply_opts([{conflicts, false} | Rest], Args) ->
     % Ignored cause default
     apply_opts(Rest, Args);