Re: Consistency between 'update' and 'switch' APIs
From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Thu, 14 Mar 2013 02:15:28 +0000 (GMT)
C. Michael Pilato wrote:
> On 03/13/2013 01:36 PM, Julian Foad wrote:
PROPOSAL, RECOGNIZING BOTH MEANINGS OF IGNORE-ANCESTRY
- svn_ra_do_update2():
- svn_wc__get_switch_editor():
- svn_client__update_internal(), svn_client_update4():
- svn_client__switch_internal(), svn_client_switch4():
> This may be a bit of a sidebar, but: Does svn_ra_do_status() need the same
The interesting case here is a file replaced with an identical file: that's the only case where it's unchanged if ignoring ancestry but otherwise it's changed. A normal update would try to replace it in the WC, potentially raising a tree conflict if it was locally modified. An update ignoring ancestry would cause no change for that node. It is logically sound that we might want 'status' to be able to act in either of these ways, especially if we are using it to decide whether 'update' will make a change.
But what if we are using 'status -u' to decide whether the WC is up to date enough to be able to commit? In that case, the definition of 'up to date' is fixed by the server side, and treats replacement as a change. (Unless we contemplate adding 'ignore-ancestry' on commits as well, which I think would only have an effect in that specific situation of a replaced-but-identical file, and that seems waaaay too bizarre to contemplate.)
I am starting to wonder if it wouldn't be a better idea to stop supporting 'ignore ancestry' at the RA layer at all. What is the compelling use case for this functionality? And what will we do when we add support for rename tracking, which essentially requires us to track node ids? You can't then just skip a node if it's identical, because you will still need to report that its id changed. I'm sure we could make the 'ignore ancestry' concept still work by passing the node-id change out of band, but that's starting to sound really nasty.
If the RA would no longer support 'ignore ancestry', the client side could still coalesce a delete and an add into a diff when it wants to (with some care taken to ensure we don't needlessly re-transmit the whole file content).
Can anyone answer why this ignore-ancestry support was added to 'switch' in the first place (I mean at the file-diff level, not the high-level check for related URLs), or if it just happened by accident?
PROPOSAL, WITHOUT INCREASING THE SUPPORT FOR IGNORE-ANCESTRY
- svn_wc__get_switch_editor():
- svn_client__switch_internal(), svn_client_switch4():
- Julian
|
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.