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

Re: [PATCH] Test for line ending bug in svnrdump (issue 4263)

From: Gabriela Gibson <gabriela.gibson_at_gmail.com>
Date: Wed, 12 Dec 2012 01:16:34 +0000

On 11/12/12 23:01, Daniel Shahaf wrote:
> Gabriela Gibson wrote on Tue, Dec 11, 2012 at 22:18:54 +0000:
>> On 11/12/12 00:46, Daniel Shahaf wrote:
>>
>>
>> I will attempt to do just this. Also your tip with the libtool was
>> much appreciated, thank you very much :)
>>
>
> Welcome.
>
>> Index: subversion/tests/cmdline/svnrdump_tests.py
>> ===================================================================
>> --- subversion/tests/cmdline/svnrdump_tests.py (revision 1420388)
>> +++ subversion/tests/cmdline/svnrdump_tests.py (working copy)
>> @@ -356,6 +356,12 @@ def copy_bad_line_endings_dump(sbox):
>>
expected_dumpfile_name="copy-bad-line-endings.expected.dump",
>> bypass_prop_validation=True)
>>
>> +@XFail()
>> +@Issue(4263)
>> +def copy_bad_line_endings_load(sbox):
>> + "load: inconsistent line endings in svn:* props"
>> + run_load_test(sbox, "copy-bad-line-endings.dump")
>> +
>
> OK, sorry, I missed it yesterday, but there's a problem here. Looking
> at the docstring of run_load_test():
>
> def run_load_test(sbox, dumpfile_name, expected_dumpfile_name = None,
> expect_deltas = True):
> """Load a dumpfile using 'svnrdump load', dump it with 'svnadmin
> dump' and check that the same dumpfile is produced"""
>
> It checks for identity. However, the problem here is \r in an svn:*
> property; as of 1.6, the server doesn't allow any new instances of
> this to enter a repository, so the resulting dumpfile won't be
> equal to the input one.
>
> I think you need to pass expected_dumpfile_name= to run_load_test().
>
> Does that make sense?
>
Yes.

There is a candidate for expected_dumpfile_name already in the tree:
/tests/cmdline/svnrdump_tests/copy-bad-line-endings.expected.dump

However, it's not clear that this defines the desired behaviour when
loading.

The differences between copy-bad-line-endings.expected.dump and
copy-bad-line-endings.dump appear to be:

1. '\r' in the middle of a line is replaced by '\n'.
2. '\r' at the end of a line is deleted.

Let's call this "option 1".

I had in mind to replace '\r' with '<space>'.
This would be option 2.

Which is the prefered option?

Regards

Gabriela
Received on 2012-12-12 02:17:07 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.