Over the early part of this year Mike Pilato and other Collabnet
employees met with many of our customers to get feeback on Subversion,
One merge related item that came up was: '--reintegration should
tolerate sparse checkouts that aren't affected'.
I created issue #3603 to track this.
The good news is that simply removing the check for a sparse WC works
perfectly in the case where the 'missing' subtrees in the reintegrate
target are unaffected by the merge: The merge succeeds, no new subtree
mergeinfo is created, no errors, it just DTRT.
If the reintegrate target is missing a subtree that *is* affected by
the merge, then a tree-conflict occurs. Subtree mergeinfo is also set
to partition the missing subtree so it doesn't inherit the mergeinfo
set on the root (exactly like a non-reintegrate merge does already).
My question is this: Is that sufficient?
I think it is. It's not as if reintegrate merges can't result in tree
conflicts already (e.g. if work continues on trunk after the last sync
merge to a branch, the reintegration of the branch back to trunk can
easily cause this).
In a perfect world maybe we'd give a error along the lines of 'hey,
you are trying to reintegrate into a shallow WC and some of the paths
affected by the merge aren't present, you are going to get tree
conflicts, is this really what you want? :-)'
But going this route adds more merge special casing and obviously has
a performance penalty, two things we definitely don't need more of. I
think that if you are reintegrating into a shallow WC we should simply
permit it and assume this this is what you really want. Anyone
disagree? If not, I'll be applying the attached patch RSN.
Fix issue #3603 'allow reintegrate merges into WCs with missing subtrees'.
(ensure_wc_reflects_repository_subtree): Consider shallow WCs as ready
to reintegrate to. That's it! Nothing special, it works as you'd
(reintegrate_fail_on_shallow_wc): Rename to...
(reintegrate_on_shallow_wc): ...this. Reimplement the test to expect
success when reintegrating into a shallow WC.
(test_list): Reflect test rename.
Received on 2010-04-14 20:28:50 CEST