On Mon, Sep 1, 2008 at 11:39 AM, Arfrever Frehtes Taifersar Arahesis
> I discovered 2 bugs in handling of svn:mergeinfo when I was performing some
> merges on the svnpatch-diff branch.
> 1. Addition of incorrect svn:mergeinfo on some files or directories:
> Steps to reproduce:
> svn co -r32624 https://svn.collab.net/repos/svn/branches/svnpatch-diff subversion-svnpatch-diff-r32624
> cd subversion-svnpatch-diff-r32624
> svn merge -r32500:32620 ^/trunk
> This merge adds incorrect svn:mergeinfo on:
> These files / directories don't have svn:mergeinfo before merging.
Not that you are necessarily saying this, but the fact that these
paths don't have pre-existing mergeinfo is not a problem per se.
Because explicit mergeinfo was added to these paths on trunk in r32524
when the merge is performed that mergeinfo gets added just like any
> After merging, svn:mergeinfo on these files / directories doesn't contain:
Now that *is* a problem. The mergeinfo from r32524 gets added the the
four paths in question but that's all. There are two separate
problems here (using build.conf to illustrate the problem, but it's
the same problem across all four paths):
1) libsvn_client/merge.c:merge_props_changed() adds the mergeinfo from
r32524 to build.conf, but it but does not consider what mergeinfo
Prior to the merge build.conf inherits this mergeinfo from the root of
the svnpatch-diff working copy:
But merge_props_changed() just adds this mergeinfo from r32524:
So here we "lose" the inherited mergeinfo
'/trunk/build.conf:1-31375,31378-32500' from making it look like that
hasn't been merged to build.conf from trunk yet.
2) At the start of the merge
libsvn_client/merge.c:do_directory_merge() gathers up all the subtrees
with mergeinfo and stores them in children_with_mergeinfo, obviously
build.conf is not part of this list as it has no pre-existing
Next do_directory_merge() then drives the editor, which adds explicit
mergeinfo to the four new paths. Then it updates the mergeinfo for
the paths in children_with_mergeinfo to reflect the merge just
performed. But since build.conf isn't described in
children_with_mergeinfo it doesn't get updated -- so effectively and
build.conf loses the mergeinfo '/trunk/build.conf:32501-32620'.
Working on a fix for both of these problems.
> (Next `svn merge ^/trunk` would try to merge r25664:30782 from trunk which causes
> many conflicts.)
> 2. Incomplete reversion of changes during reverse merging:
> Steps to reproduce:
> svn co -r32625 https://svn.collab.net/repos/svn/branches/svnpatch-diff subversion-svnpatch-diff-r32625
> cd subversion-svnpatch-diff-r32625
> svn merge -c-32625 ^/branches/svnpatch-diff
> r32625 added (incorrect) svn:mergeinfo on:
> Reverse merging should delete svn:mergeinfo property,
>but it leaves empty svn:mergeinfo.
Looks like this is a side effect of the problem above. If these four
paths had the proper mergeinfo from the merge in r32624 then the
mergeinfo on these four paths would elide to the root of the wc,
leaving nothing behind. Fixing the first problem should fix this one
too (at least future occurrences of it).
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-09-04 18:53:43 CEST