[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] wc-ng - Remove use of entry_t from calculate_target_mergeinfo

From: Matthew Bentham <mjb67_at_artvps.com>
Date: Wed, 03 Mar 2010 11:48:32 +0000

On 02/03/2010 17:18, Matthew Bentham wrote:
> On 02/03/2010 13:40, Matthew Bentham wrote:
>> On 02/03/2010 13:06, Greg Stein wrote:
...
>>> On Tue, Mar 2, 2010 at 04:45, Matthew Bentham<mjb67_at_artvps.com> wrote:
>>> Because of the fragility around entry->copied, I can't really tell
>>> whether this patch is Right from a simple inspection. I presume that
>>> you've run the full test suite, and it continues to pass with this
>>> change?
>>
...
>> At the moment I'm trying to write a test that passes in trunk, and fails
>> if I force 'copied' to 'FALSE'.
>
> I've set up a Linux development environment and run the whole test
> suite. There are no test failures if all adds are treated as local adds
> in calculate_target_mergeinfo. So I think I need to work on improving
> the test coverage before I can go back to removing entry_t here.

I need help with this change. I can't figure out what
'calculate_target_mergeinfo' is supposed to be doing in the case where
"entry->copied == TRUE", so I can't figure out how to test it.

I _thought_ that it was trying to find inherited mergeinfo of the source
of a copy, and combine that into the explicit mergeinfo of the target of
the copy.

So I expected this to happen in a trunk build (in a test sandbox wc):

[[[

-bash-3.2$ /localdata/mjb67/svninstall/bin/svn cp A D
A D
-bash-3.2$ cat >> A/mu
foo
bar
-bash-3.2$ /localdata/mjb67/svninstall/bin/svn commit -m "" A
Sending A/mu
Transmitting file data .
Committed revision 18.
-bash-3.2$ /localdata/mjb67/svninstall/bin/svn merge -r 17:18 A D
--- Merging r18 into 'D':
U D/mu
--- Recording mergeinfo for merge of r18 into 'D':
  U D
-bash-3.2$ /localdata/mjb67/svninstall/bin/svn mergeinfo A/mu D/mu
r18
-bash-3.2$ /localdata/mjb67/svninstall/bin/svn cp D/mu mu
A mu
-bash-3.2$ /localdata/mjb67/svninstall/bin/svn mergeinfo A/mu mu
**I expected to see "r18" here, but there is nothing **

]]]

calculate_target_mergeinfo only seems to get called when the source, or
target, or both, of the copy is in the repository, so I tried this:

[[[

-bash-3.2$ /localdata/mjb67/svninstall/bin/svn cp D E
A E
-bash-3.2$ /localdata/mjb67/svninstall/bin/svn mergeinfo A/mu E/mu
r18
-bash-3.2$ /localdata/mjb67/svninstall/bin/svn cp -m "" E/mu
file:///localdata/mjb67/subversion/builddir/subversion/tests/cmdline/svn-test-work/repositories/copy_tests-49/A/mumu
../subversion/svn/copy-cmd.c:144: (apr_err=160013)
../subversion/libsvn_client/copy.c:2177: (apr_err=160013)
../subversion/libsvn_client/copy.c:1372: (apr_err=160013)
../subversion/libsvn_client/copy.c:1372: (apr_err=160013)
../subversion/libsvn_client/copy.c:135: (apr_err=160013)
../subversion/libsvn_client/mergeinfo.c:455: (apr_err=160013)
../subversion/libsvn_client/mergeinfo.c:499: (apr_err=160013)
../subversion/libsvn_ra_local/ra_plugin.c:703: (apr_err=160013)
../subversion/libsvn_repos/fs-wrap.c:633: (apr_err=160013)
../subversion/libsvn_fs_fs/tree.c:3651: (apr_err=160013)
../subversion/libsvn_fs_fs/tree.c:3519: (apr_err=160013)
../subversion/libsvn_fs_fs/tree.c:669: (apr_err=160013)
svn: File not found: revision 19, path '/E/mu'

]]]

This stack is interesting, because copy.c:135 is in
calculate_target_mergeinfo, in the case where it tries to get the
source's mergeinfo from the repository.

So I'm leaning to the conclusion that whatever it's trying to do in this
case isn't working anyway, which kind of leaves me at a loose end in
terms of improving the testing and removing entry_t use.

Any ideas?

Matthew
Received on 2010-03-03 12:49:26 CET

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.