You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2012/02/28 14:40:20 UTC
svn commit: r1294646 -
/subversion/trunk/subversion/tests/cmdline/svndumpfilter_tests.py
Author: julianfoad
Date: Tue Feb 28 13:40:20 2012
New Revision: 1294646
URL: http://svn.apache.org/viewvc?rev=1294646&view=rev
Log:
Fix the new svndumpfilter test on Windows. A follow-up to r1294583.
* subversion/tests/cmdline/svndumpfilter_tests.py
(match_empty_prefix_or_pattern): Rename to 'match_empty_prefix' and stop
testing the '--pattern' option with wildcards, as there doesn't seem to be an easy way to make wildcards work consistently on Windows and this part of the behaviour wasn't broken.
Modified:
subversion/trunk/subversion/tests/cmdline/svndumpfilter_tests.py
Modified: subversion/trunk/subversion/tests/cmdline/svndumpfilter_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svndumpfilter_tests.py?rev=1294646&r1=1294645&r2=1294646&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svndumpfilter_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svndumpfilter_tests.py Tue Feb 28 13:40:20 2012
@@ -600,8 +600,8 @@ def dropped_but_not_renumbered_empty_rev
sbox.repo_url)
#----------------------------------------------------------------------
-def match_empty_prefix_or_pattern(sbox):
- "svndumpfilter with an empty prefix or pattern"
+def match_empty_prefix(sbox):
+ "svndumpfilter with an empty prefix"
dumpfile_location = os.path.join(os.path.dirname(sys.argv[0]),
'svndumpfilter_tests_data',
@@ -636,7 +636,6 @@ def match_empty_prefix_or_pattern(sbox):
'': Item(status=' ', wc_rev=1) })
test(sbox, dumpfile, 'exclude', '')
- test(sbox, dumpfile, 'exclude', '--pattern', '/A/D/G*', '*')
# Test including everything
expected_disk = svntest.main.greek_state.copy()
@@ -644,7 +643,13 @@ def match_empty_prefix_or_pattern(sbox):
expected_status = svntest.actions.get_virginal_state(sbox.wc_dir, 1)
test(sbox, dumpfile, 'include', '', '/A/D/G')
- test(sbox, dumpfile, 'include', '--pattern', '*')
+
+ # Note: We also ought to test the '--pattern' option, including or
+ # excluding a pattern of '*'. However, passing a wildcard parameter
+ # is troublesome on Windows: it may be expanded, depending on whether
+ # the svndumpfilter executable was linked with 'setarg.obj', and there
+ # doesn't seem to be a consistent way to quote such an argument to
+ # prevent expansion.
########################################################################
# Run the tests
@@ -658,7 +663,7 @@ test_list = [ None,
dumpfilter_with_patterns,
filter_mergeinfo_revs_outside_of_dump_stream,
dropped_but_not_renumbered_empty_revs,
- match_empty_prefix_or_pattern,
+ match_empty_prefix,
]
if __name__ == '__main__':
Re: svn commit: r1294646 - /subversion/trunk/subversion/tests/cmdline/svndumpfilter_tests.py
Posted by Julian Foad <ju...@btopenworld.com>.
Greg Stein wrote:
> Couldn't you just make a Posix-specific test for pattern=* testing?
> That would give us at least *some* testing coverage for it.
My patch was all about fixing the plain prefix (non-pattern) mode, and there is already a test for the pattern mode with pattern=/A/D/G/* so no compelling reason to add a pattern=* test. Yes it would always be good to add an extra test, be it posix-only or whatever, if anyone wants to, but my task is complete.
- Julian
> julianfoad@apache.org wrote:
>> URL: http://svn.apache.org/viewvc?rev=1294646&view=rev
>> Log:
>> Fix the new svndumpfilter test on Windows. A follow-up to r1294583.
>>
>> * subversion/tests/cmdline/svndumpfilter_tests.py
>> (match_empty_prefix_or_pattern): Rename to 'match_empty_prefix'
>> and stop testing the '--pattern' option with wildcards, as there
>> doesn't seem to be an easy way to make wildcards work consistently on
>> Windows and this part of the behaviour wasn't broken.
Re: svn commit: r1294646 - /subversion/trunk/subversion/tests/cmdline/svndumpfilter_tests.py
Posted by Philip Martin <ph...@wandisco.com>.
Greg Stein <gs...@gmail.com> writes:
> Couldn't you just make a Posix-specific test for pattern=* testing?
Put the '*' in a file and use --targets and it should work for all
systems -- that's what we do when passing '*' as a property value,
--
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com
Re: svn commit: r1294646 - /subversion/trunk/subversion/tests/cmdline/svndumpfilter_tests.py
Posted by Greg Stein <gs...@gmail.com>.
Couldn't you just make a Posix-specific test for pattern=* testing?
That would give us at least *some* testing coverage for it.
Cheers,
-g
On Tue, Feb 28, 2012 at 08:40, <ju...@apache.org> wrote:
> Author: julianfoad
> Date: Tue Feb 28 13:40:20 2012
> New Revision: 1294646
>
> URL: http://svn.apache.org/viewvc?rev=1294646&view=rev
> Log:
> Fix the new svndumpfilter test on Windows. A follow-up to r1294583.
>
> * subversion/tests/cmdline/svndumpfilter_tests.py
> (match_empty_prefix_or_pattern): Rename to 'match_empty_prefix' and stop
> testing the '--pattern' option with wildcards, as there doesn't seem to be an easy way to make wildcards work consistently on Windows and this part of the behaviour wasn't broken.
>
> Modified:
> subversion/trunk/subversion/tests/cmdline/svndumpfilter_tests.py
>
> Modified: subversion/trunk/subversion/tests/cmdline/svndumpfilter_tests.py
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svndumpfilter_tests.py?rev=1294646&r1=1294645&r2=1294646&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/tests/cmdline/svndumpfilter_tests.py (original)
> +++ subversion/trunk/subversion/tests/cmdline/svndumpfilter_tests.py Tue Feb 28 13:40:20 2012
> @@ -600,8 +600,8 @@ def dropped_but_not_renumbered_empty_rev
> sbox.repo_url)
>
> #----------------------------------------------------------------------
> -def match_empty_prefix_or_pattern(sbox):
> - "svndumpfilter with an empty prefix or pattern"
> +def match_empty_prefix(sbox):
> + "svndumpfilter with an empty prefix"
>
> dumpfile_location = os.path.join(os.path.dirname(sys.argv[0]),
> 'svndumpfilter_tests_data',
> @@ -636,7 +636,6 @@ def match_empty_prefix_or_pattern(sbox):
> '': Item(status=' ', wc_rev=1) })
>
> test(sbox, dumpfile, 'exclude', '')
> - test(sbox, dumpfile, 'exclude', '--pattern', '/A/D/G*', '*')
>
> # Test including everything
> expected_disk = svntest.main.greek_state.copy()
> @@ -644,7 +643,13 @@ def match_empty_prefix_or_pattern(sbox):
> expected_status = svntest.actions.get_virginal_state(sbox.wc_dir, 1)
>
> test(sbox, dumpfile, 'include', '', '/A/D/G')
> - test(sbox, dumpfile, 'include', '--pattern', '*')
> +
> + # Note: We also ought to test the '--pattern' option, including or
> + # excluding a pattern of '*'. However, passing a wildcard parameter
> + # is troublesome on Windows: it may be expanded, depending on whether
> + # the svndumpfilter executable was linked with 'setarg.obj', and there
> + # doesn't seem to be a consistent way to quote such an argument to
> + # prevent expansion.
>
> ########################################################################
> # Run the tests
> @@ -658,7 +663,7 @@ test_list = [ None,
> dumpfilter_with_patterns,
> filter_mergeinfo_revs_outside_of_dump_stream,
> dropped_but_not_renumbered_empty_revs,
> - match_empty_prefix_or_pattern,
> + match_empty_prefix,
> ]
>
> if __name__ == '__main__':
>
>