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

Re: [PATCH] Improve error handling in svn_ra_serf__replay_range()

From: vijay <vijay_at_collab.net>
Date: Thu, 20 Dec 2012 19:52:25 +0530

On Wednesday 19 December 2012 07:27 PM, Daniel Shahaf wrote:
>> +@SkipUnless(svntest.main.is_ra_type_dav)
>> +def dump_url_not_in_head(sbox) :
>
> Spurious whitespace.
>
>> + "dump: URL deleted in HEAD should return error"
>> + sbox.build(create_wc = False)
>> +
>> + E_url = sbox.repo_url + '/A/B/E'
>>
>> + # Delete directory 'E'from repository.
>> + svntest.actions.run_and_verify_svn(None, None, [], "rm", E_url, "-m",
>> + "delete 'E'")
>
>
> Can't you pass read_only=True to sbox.build() and then use EE rather
> than E here?
>
> I note that 'svnadmin create r; svnrdump dump file://$PWD/r/foo' does
> not error --- maybe your patch fixes that too?

The attached patch fixes this issue. This patch is different from the
previous versions.

We have to error out immediately if we do 'svnrdump dump
<non-existent-url>', right?

I could notice a change in behavior after this patch is applied.

The single revision/first revision dump is driven with the repos root
URL using update mechanism(svn_ra_do_update()). So the following
commands were succeeding though the dump target URL is not there in HEAD.

[[[
URL=http://svn.apache.org/repos/asf/subversion/trunk/contrib/server-side/mod_setlocale

$ svnrdump dump $URL -r1232154 > /dev/null
* Dumped revision 1232154.

$ svnrdump dump $URL -r1232155 > /dev/null
* Dumped revision 1232155.
]]]

After this patch applied, the above commands will fail. Is this behavior
correct?

svnrdump should support peg-revisions to take dump of paths not present
in HEAD.

Thanks & Regards,
Vijayaguru

>
>>
>> + expected_dump_fail_err_re = "svnrdump: E160013: '.*' path not found"
>> +
>> + # Returns error as in issue #4100.
>> + svntest.actions.run_and_verify_svnrdump(None, svntest.verify.AnyOutput,
>> + expected_dump_fail_err_re, 1, '-q',
>> + 'dump', E_url)
>> +
>> +
>> +#----------------------------------------------------------------------
>> +
>> +
>> ########################################################################
>> # Run the tests
>>
>

Received on 2012-12-20 15:23:26 CET

This is an archived mail posted to the Subversion Dev mailing list.