Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Won't Fix
-
None
-
None
-
Dont Know
Description
After deleting the current revision to make the conflict revision the winning one,
the returned revisionnummer ("2-f4a2a6b0c7742a5e6dd7eea7a4b625a1") is not the revision number of the documen (1-45c1922c1b51dc5ee945218d63ce2ab4)
echo $COUCH curly -X
DELETE $COUCH/db1 curly -X
DELETE $COUCH/db2 curly -X
PUT $COUCH/db1
curly -X PUT $COUCH/db2
curly -X PUT $COUCH/db1/doc -d '
'
curly -X PUT $COUCH/db2/doc -d '
'
curly -X POST $COUCH/_replicate -d '
'
curly $COUCH/db2/doc?conflicts=true
curly $COUCH/db2/doc?revs=true
curly -X DELETE $COUCH/db2/doc?rev=1-97cea733330a7b8b41aae9e5732f4ac7
curly $COUCH/db2/doc?conflicts=true
curly $COUCH/db2/doc?revs=true curly $COUCH/db2/doc
sendai ~ % echo $COUCH http://localhost:5984
sendai ~ % curly -X DELETE $COUCH/db1
sendai ~ % curly -X DELETE $COUCH/db2
{ "ok" : true }sendai ~ % curly -X PUT $COUCH/db1
{ "ok" : true }sendai ~ % curly -X PUT $COUCH/db2
{ "ok" : true }sendai ~ % curly -X PUT $COUCH/db1/doc -d '
{"wert":1}'
{ "ok" : true, "rev" : "1-97cea733330a7b8b41aae9e5732f4ac7", "id" : "doc" }sendai ~ % curly -X PUT $COUCH/db2/doc -d '
{"wert":2}'
{ "ok" : true, "rev" : "1-45c1922c1b51dc5ee945218d63ce2ab4", "id" : "doc" }sendai ~ % curly -X POST $COUCH/_replicate -d '
{"source":"db1","target":"db2"}'
{ "ok" : true, "history" : [
], "session_id" : "7c74c9bb9f322e10ad072215e823c2d8", "source_last_seq" : 1, "replication_id_version" : 2 }
sendai ~ % curly $COUCH/db2/doc?conflicts=true
{ "_id" : "doc", "wert" : 1, "_conflicts" : [ "1-45c1922c1b51dc5ee945218d63ce2ab4" ], "_rev" : "1-97cea733330a7b8b41aae9e5732f4ac7" }sendai ~ % curly $COUCH/db2/doc?revs=true
{ "_id" : "doc", "wert" : 1, "_revisions" :
, "_rev" : "1-97cea733330a7b8b41aae9e5732f4ac7" }
sendai ~ % curly -X DELETE $COUCH/db2/doc?rev=1-97cea733330a7b8b41aae9e5732f4ac7
{ "ok" : true, "rev" : "2-f4a2a6b0c7742a5e6dd7eea7a4b625a1", "id" : "doc" } ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sendai ~ % curly $COUCH/db2/doc?conflicts=true
sendai ~ % curly $COUCH/db2/doc?revs=true { "_id" : "doc", "wert" : 2, "_revisions" :
{ "ids" : [ "45c1922c1b51dc5ee945218d63ce2ab4" ], "start" : 1 }, "_rev" : "1-45c1922c1b51dc5ee945218d63ce2ab4" }
sendai ~ % curly $COUCH/db2/doc
{ "_id" : "doc", "wert" : 2, "_rev" : "1-45c1922c1b51dc5ee945218d63ce2ab4" }
sendai ~ %