#!/bin/sh
URL="localhost:5984/db1"
curl "localhost:5984"
curl $URL -XDELETE
curl $URL -XPUT
curl $URL/doc1 -XPUT -d '{}'
curl $URL/doc1 -HDestination:doc2 -XCOPY
{"couchdb":"Welcome","version":"1.1.1"}
{"error":"not_found","reason":"missing"}
{"ok":true}
{"ok":true,"id":"doc1","rev":"1-967a00dff5e02add41819138abb3284d"}
{"id":"doc2","rev":"1-967a00dff5e02add41819138abb3284d"}
vs
{"couchdb":"Welcome","version":"1.2.0"}
{"ok":true}
{"ok":true}
{"ok":true,"id":"doc1","rev":"1-967a00dff5e02add41819138abb3284d"}
{"ok":true,"id":"doc2","rev":"1-6aaf7080aad9d1a9482e07c46581dac0"}
On 30 October 2012 17:47, Benoit Chesneau <[email protected]> wrote:
> On Mon, Oct 29, 2012 at 8:52 PM, Randall Leeds (JIRA) <[email protected]> wrote:
>
>
>>
>> Whatever the case, it's always been that COPY returns the new revision in
>> the response. I don't know if it was every guaranteed that the revision id
>> would stay the same after a COPY.
>
> I'm pretty sure the revision in the new doc resulting from the copy
> has always been different from the source.