couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <rnew...@apache.org>
Subject Re: [jira] [Commented] (COUCHDB-1485) COPY behavior changed between 1.1.1 to 1.2
Date Tue, 30 Oct 2012 18:13:52 GMT
#!/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 <bchesneau@gmail.com> wrote:
> On Mon, Oct 29, 2012 at 8:52 PM, Randall Leeds (JIRA) <jira@apache.org> 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.

Mime
View raw message