Skip to content
This repository was archived by the owner on Oct 17, 2022. It is now read-only.

Clarify usage of COPY#186

Closed
flimzy wants to merge 1 commit into
masterfrom
copy
Closed

Clarify usage of COPY#186
flimzy wants to merge 1 commit into
masterfrom
copy

Conversation

@flimzy
Copy link
Copy Markdown
Member

@flimzy flimzy commented Oct 26, 2017

The documentation suggests that COPY can be used to overwrite the target document, but there's no (obvious) way to actually do this. The rev parameter is used for the source, and there is no (documented/obvious) way to specify the rev for the target document to update. This leads me to believe it is mis-documented.

If someone can explain that my assumption is incorrect, I'll instead update the docs to explain how to overwrite the target.

Copy link
Copy Markdown
Member

@eiri eiri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

COPY actually can be used to overwrite an existing target, when Destination set to the target id with its revision, as described here

The only clarification possibly needed is that it doesn't have to be a full URL in Destination when doc copied to the same db, it could be just in form of id?rev=1-abcd

@flimzy
Copy link
Copy Markdown
Member Author

flimzy commented Oct 26, 2017

Ahh thanks! I think it's worth mentioning that in the description of the Destination header. I may submit a different PR for that later.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants