summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Kocoloski <kocolosk@apache.org>2009-07-07 02:59:26 +0000
committerAdam Kocoloski <kocolosk@apache.org>2009-07-07 02:59:26 +0000
commitb6b9b984330ed90886c2d135dea542406549d31d (patch)
tree573cd6d9679b2c5902b851b989772be6c6148351
parent282b96ddd9a84b740788c2358ec0f5fedafb7cc6 (diff)
fix deleted_conflicts qs parameter
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@791684 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--share/www/script/test/replication.js7
-rw-r--r--src/couchdb/couch_db.erl2
2 files changed, 6 insertions, 3 deletions
diff --git a/share/www/script/test/replication.js b/share/www/script/test/replication.js
index c9caa5ee..5c06dd4e 100644
--- a/share/www/script/test/replication.js
+++ b/share/www/script/test/replication.js
@@ -205,12 +205,15 @@ couchTests.replication = function(debug) {
this.afterBA2 = function(dbA, dbB) {
// open documents and include the conflict meta data
- var docA = dbA.open("foo", {conflicts: true});
- var docB = dbB.open("foo", {conflicts: true});
+ var docA = dbA.open("foo", {conflicts: true, deleted_conflicts: true});
+ var docB = dbB.open("foo", {conflicts: true, deleted_conflicts: true});
// We should have no conflicts this time
T(docA._conflicts === undefined)
T(docB._conflicts === undefined);
+
+ // They show up as deleted conflicts instead
+ T(docA._deleted_conflicts[0] == docB._deleted_conflicts[0]);
};
}
};
diff --git a/src/couchdb/couch_db.erl b/src/couchdb/couch_db.erl
index 33b4d542..522df808 100644
--- a/src/couchdb/couch_db.erl
+++ b/src/couchdb/couch_db.erl
@@ -822,7 +822,7 @@ doc_meta_info(#doc_info{high_seq=Seq,revs=[#rev_info{rev=Rev}|RestInfo]}, RevTre
case lists:member(deleted_conflicts, Options) of
false -> [];
true ->
- case [Rev1 || #rev_info{rev=Rev1,deleted=false} <- RestInfo] of
+ case [Rev1 || #rev_info{rev=Rev1,deleted=true} <- RestInfo] of
[] -> [];
DelConflictRevs -> [{deleted_conflicts, DelConflictRevs}]
end