Giovanni Bajo wrote:
> On 8/10/2007 11:43 AM, Michael Willmott wrote:
>
>>> This is going to cause two additional "svn propget" for each merge.
>>> Can't you use the VersionedProperty cache that was thought
>>> specifically for that? You already have merge_metadata() available,
>>> and I believe that block_metadata() is already computed at least for
>>> the reflected case.
>>>
>>> Which makes me think that maybe this feature should be gated on
>>> --bidirectional :)
>>>
>>> Notice that all the above might be wrong: I would appreciate if you
>>> watched at the output of svnmerge with -vv to prove me wrong (or
>>> right ;).
>>
>> I had a similar thought, and yes -vv does show additional (and in some
>> cases, duplicated) progets. The only concern I have is that this fix
>> should be functional regardless of the state of --bidirectional, since
>> it prevents merge property conflicts.
>
> I didn't follow the thread, but do these merge property conflicts can
> happen in a non-bidirectional scenario?
Yes, if one does uni-directional merges from A -> B -> C, the patch
prevents property conflicts in that case. So gating on bidirectional
does not make sense.
The attached patch uses the VersionedProperty cache.
Cheers,
Raman Gupta
Index: svnmerge.py
===================================================================
--- svnmerge.py (revision 25979)
+++ svnmerge.py (working copy)
@@ -1321,11 +1321,13 @@
old_merge_props = branch_props
old_block_props = get_block_props(branch_dir)
merge_metadata = logs[opts["source-url"]].merge_metadata()
+ block_metadata = logs[opts["source-url"]].block_metadata()
for start,end in minimal_merge_intervals(revs, phantom_revs):
if not record_only:
- # Clear merge/blocked properties to avoid spurious property conflicts
- set_merge_props(branch_dir, {})
- set_block_props(branch_dir, {})
+ # Preset merge/blocked properties to the source value at the start rev
+ # to avoid spurious property conflicts
+ set_merge_props(branch_dir, merge_metadata.get(start - 1))
+ set_block_props(branch_dir, block_metadata.get(start - 1))
# Do the merge
svn_command("merge --force -r %d:%d %s %s" % \
(start - 1, end, opts["source-url"], branch_dir))
_______________________________________________
Svnmerge mailing list
[email protected]
http://www.orcaware.com/mailman/listinfo/svnmerge