[svk-devel] Win32 test path separator patch against trunk

Kevin Light klight at walkertechnical.com
Tue Jul 25 16:59:26 EDT 2006


Attached is a patch to the t/* folder of trunk to fix the path separator 
issues on win32.  This should be considered a first pass as I'm sure 
there are some cases that have been missed.

Kevin
-------------- next part --------------
==== Patch <win32-test-path> level 1
Source: [No source]
Target: d483dad1-da31-274d-9560-af1338886bf8:/local/trunk/t:1915
Log:
This patch fixes several of the path specifiers in the tests.
It is probably does not catch all of them.
=== 03import-mime.t
==================================================================
--- 03import-mime.t	(revision 1915)

+++ 03import-mime.t	(patch win32-test-path level 1)

@@ -22,16 +22,16 @@

         ["Committed revision 1.",
         'Import path //import initialized.',
         "Committed revision 2.",
-        __("Directory $corpath imported to depotpath //import as revision 2."),
+        "Directory $corpath imported to depotpath //import as revision 2.",
         ]);
     is_output ($svk, 'pl', ['-v', glob_mime_samples('//import/mime')],
-        [__('Properties on //import/mime/foo.bin:'),
+        ['Properties on //import/mime/foo.bin:',
         '  svn:mime-type: application/octet-stream',
-        __('Properties on //import/mime/foo.html:'),
+        'Properties on //import/mime/foo.html:',
         '  svn:mime-type: text/html',
-        __('Properties on //import/mime/foo.jpg:'),
+        'Properties on //import/mime/foo.jpg:',
         '  svn:mime-type: image/jpeg',
-        __('Properties on //import/mime/not-audio.txt:'),
+        'Properties on //import/mime/not-audio.txt:',
         '  svn:mime-type: audio/x-669-mod',   # wrong, but it's what F::T says
         ]);
 }
=== 03import-nomime.t
==================================================================
--- 03import-nomime.t	(revision 1915)

+++ 03import-nomime.t	(patch win32-test-path level 1)

@@ -18,11 +18,11 @@

     ["Committed revision 1.",
     'Import path //import initialized.',
     "Committed revision 2.",
-    __("Directory $corpath imported to depotpath //import as revision 2."),
+    "Directory $corpath imported to depotpath //import as revision 2.",
     ]);
 is_output ($svk, 'pl', ['-v', glob_mime_samples('//import/mime')],
-    [__('Properties on //import/mime/foo.bin:'),
+    ['Properties on //import/mime/foo.bin:',
         '  svn:mime-type: application/octet-stream',
-        __('Properties on //import/mime/foo.jpg:'),
+        'Properties on //import/mime/foo.jpg:',
         '  svn:mime-type: application/octet-stream',
     ]);
=== 05svm-rm.t
==================================================================
--- 05svm-rm.t	(revision 1915)

+++ 05svm-rm.t	(patch win32-test-path level 1)

@@ -31,13 +31,13 @@

 $svk->mkdir(-p => "rm/m/foo/bar");
 $svk->mkdir(-p => "rm/unrelated");
 is_output($svk, 'rm', ["rm/m/foo/bar"],
-	  ["rm/m/foo/bar is scheduled; use '--force' to go ahead."]);
+	  [__("rm/m/foo/bar is scheduled; use '--force' to go ahead.")]);
 
 is_output($svk, 'rm', ["rm/m/foo/bar", "rm/unrelated"],
 	  ['//rm contains mirror, remove explicitly: //rm/m']);
 
 is_output($svk, 'rm', ['--force', "rm/m/foo/bar"],
-	  ["D   rm/m/foo/bar"]);
+	  [__("D   rm/m/foo/bar")]);
 
 is_output($svk, 'rm', [-m => 'bye', '--direct', '//rm/m'],
 	  ['Committed revision 5.']);
=== 11checkout.t
==================================================================
--- 11checkout.t	(revision 1915)

+++ 11checkout.t	(patch win32-test-path level 1)

@@ -176,11 +176,11 @@

 chdir ('..');
 is_output($svk, 'update', [-r3 =>'co-root-a'],
 	  ['Syncing //V/A(/V/A) in '.__("$corpath/co-root-a").' to 3.',
-	   'A   co-root-a/P',
-	   'A   co-root-a/P/pe']);
+	   __('A   co-root-a/P'),
+	   __('A   co-root-a/P/pe')]);
 is_output($svk, 'co', ['//V/A' =>'co-root-a'],
 	  ['Syncing //V/A(/V/A) in '.__("$corpath/co-root-a").' to 6.',
-	   'D   co-root-a/P']);
+	   __('D   co-root-a/P')]);
 
 rmtree ['co-root-a'];
 is_output ($svk, 'update', ['co-root-a'],
=== 23commit-inter-nav.t
==================================================================
--- 23commit-inter-nav.t	(revision 1915)

+++ 23commit-inter-nav.t	(patch win32-test-path level 1)

@@ -83,11 +83,11 @@

 is_deeply($answer, ['stop'], 'all answers used');
 
 is_output ($svk, 'status', [],
-   ['A   A/deep',
-    'A   A/deep/baz',
-    'A   A/deep/la',
-    'A   A/deep/la/no',
-    'A   A/deep/mas'], 'skip subdirectory');
+   [__('A   A/deep'),
+    __('A   A/deep/baz'),
+    __('A   A/deep/la'),
+    __('A   A/deep/la/no'),
+    __('A   A/deep/mas')], 'skip subdirectory');
 
 #our $show_prompt_output = 1;
 $svk->propset('roch', 'miata', 'A/deep');
@@ -117,8 +117,8 @@

 
 is_deeply($answer, ['stop'], 'all answers used');
 is_output ($svk, 'status', [],
-   ['A   A/deep/mas',
-    ' M  A/deep'], 'accept subdirectory, skip file');
+   [__('A   A/deep/mas'),
+    __(' M  A/deep')], 'accept subdirectory, skip file');
 
 $answer = [[q{
 [1/3] File 'A/deep/mas' is marked for addition:
@@ -136,7 +136,7 @@

 is_deeply($answer, ['stop'], 'all answers used');
 # XXX: this should show info about property
 is_output ($svk, 'status', [],
-   ['A   A/deep/mas'], 'skip file with property');
+   [__('A   A/deep/mas')], 'skip file with property');
 is_output ($svk, 'diff', [],
    ['=== A/deep/mas',
     '==================================================================',
@@ -582,7 +582,7 @@

 $svk->commit('--interactive', '-m', 'foo');
 is_deeply($answer, ['stop'], 'all answers used');
 is_output ($svk, 'status', [],
-    ['M   A/foo'], 'commit all changes to content and properties');
+    [__('M   A/foo')], 'commit all changes to content and properties');
 
 $svk->revert("A/foo");
 $svk->propset('parra', 'kok', '.');
@@ -728,7 +728,7 @@

 
 our $show_prompt=1;
 is_output($svk,'merge', ['-c1', '//A/foo', 'A/deep/mas'],
-[ 'C   A/deep/mas', '1 conflict found.'], "Merge a conflict into the tree");
+[ __('C   A/deep/mas'), '1 conflict found.'], "Merge a conflict into the tree");
 
 overwrite_file ("A/foo", "za\npalny\n");
 $answer = [[q{Conflict detected in:
@@ -743,8 +743,8 @@

 
 is_deeply($answer, ['stop'], 'all answers used');
 is_output ($svk, 'status', [],
-    ['C   A/deep/mas',
-     'M   A/foo'], 'conflict - abort');
+    [__('C   A/deep/mas'),
+     __('M   A/foo')], 'conflict - abort');
 
 $show_prompt=0;
 $answer = [[q{Conflict detected in:
@@ -764,12 +764,12 @@

 $svk->commit('--interactive', '-m', 'foo');
 is_deeply($answer, ['stop'], 'all answers used');
 is_output ($svk, 'status', [],[
-'C   A/deep/mas',
+__('C   A/deep/mas'),
 ], 'conflict - skip the conflict, but commit changes to foo');
 
 $show_prompt=1;
 is_output($svk, 'merge', ['-c1', '//A/foo', 'A/deep/baz'],
-['C   A/deep/baz',
+[__('C   A/deep/baz'),
 '1 conflict found.'
 ], "create another conflict");
 overwrite_file ("A/foo", "");
@@ -787,9 +787,9 @@

 
 is_deeply($answer, ['stop'], 'all answers used');
 is_output ($svk, 'status', [],
-    ['C   A/deep/baz',
-     'C   A/deep/mas',
-     'M   A/foo'], 'multiple conflicts - abort');
+    [__('C   A/deep/baz'),
+     __('C   A/deep/mas'),
+     __('M   A/foo')], 'multiple conflicts - abort');
 
 $show_prompt=0;
 $answer = [[q{Conflict detected in:
@@ -807,8 +807,8 @@

 $svk->commit('--interactive', '-m', 'foo');
 is_deeply($answer, ['stop'], 'all answers used');
 is_output ($svk, 'status', [],
-    ['C   A/deep/baz',
-     'C   A/deep/mas'], 'multiple conflicts- skip');
+    [__('C   A/deep/baz'),
+     __('C   A/deep/mas')], 'multiple conflicts- skip');
 
 $svk->revert('A/deep/baz', 'A/deep/mas');
 $svk->propset('svn:mime-type', 'faked/type', 'A/deep/mas');
@@ -941,6 +941,6 @@

 move to [p]revious change > }, 's'],'stop'];
 $svk->commit('--interactive', '-m', 'foo');
 is_output ($svk, 'status', [],
-    [' M  A/deep'], 'skip directory property on used directory.');
+    [__(' M  A/deep')], 'skip directory property on used directory.');
 is_deeply($answer, ['stop'], 'all answers used');
 
=== 36push-pull.t
==================================================================
--- 36push-pull.t	(revision 1915)

+++ 36push-pull.t	(patch win32-test-path level 1)

@@ -215,16 +215,16 @@

 is_output($svk, 'pull', [],
 	  ["Syncing $uri/A",
 	   'Auto-merging (16, 27) /m to /l2 (base /m:16).',
-	   'g   Q/qz',
-	   'U   T/xd',
-	   'U   new-file',
-	   'A   push-newfile',
+	   __('g   Q/qz'),
+	   __('U   T/xd'),
+	   __('U   new-file'),
+	   __('A   push-newfile'),
 	   qr'New merge ticket: .*:/A:12',
 	   'Committed revision 29.',
 	   "Syncing //l2(/l2) in $corpath_second to 29.",
-	   'U   T/xd',
-	   'U   new-file',
-	   'A   push-newfile']);
+	   __('U   T/xd'),
+	   __('U   new-file'),
+	   __('A   push-newfile')]);
 
 $svk->up($corpath_test);
 append_file("$corpath_test/new-file", "more modification that will get overwritten if using wrong merge base\n");
=== 38stall-schedule.t
==================================================================
--- 38stall-schedule.t	(revision 1915)

+++ 38stall-schedule.t	(patch win32-test-path level 1)

@@ -59,5 +59,5 @@

 	   ' M  .']);
 
 is_output($svk, 'revert', ['-R'],
-	  ['Reverted A/deep',
+	  [__('Reverted A/deep'),
 	   'Reverted .']);
=== 74view.t
==================================================================
--- 74view.t	(revision 1915)

+++ 74view.t	(patch win32-test-path level 1)

@@ -60,10 +60,10 @@

 	   "D   $copath/D/de",
 	  ]);
 is_output ($svk, 'revert', ['-R', $copath],
-	   ["Reverted $copath/BSP/pe",
-	    "Reverted $copath/BSP/newfile",
-	    "Reverted $copath/D",
-	    "Reverted $copath/D/de"]);
+	   [__("Reverted $copath/BSP/pe"),
+	    __("Reverted $copath/BSP/newfile"),
+	    __("Reverted $copath/D"),
+	    __("Reverted $copath/D/de")]);
 
 $svk->add ("$copath/BSP/newfile");
 append_file ("$copath/BSP/pe", "foobar\n");
@@ -139,14 +139,14 @@

 
 is_output($svk, 'co', ['//^trunk/A/view-A', $copath],
 	  ['Syncing //trunk/A(/trunk/A) in '.__($corpath).' to 7.',
-"A   $copath/Q",
-"A   $copath/Q/qu",
-"A   $copath/Q/qz",
-" U  $copath"
+__("A   $copath/Q"),
+__("A   $copath/Q/qu"),
+__("A   $copath/Q/qz"),
+__(" U  $copath")
 ]);
 
 is_output($svk, 'rm', ["$copath/Q/qz"],
-	  ["D   $copath/Q/qz"]);
+	  [__("D   $copath/Q/qz")]);
 
 is_output($svk, 'ci', [-m => 'foo', $copath],
 	  ['Committed revision 8.']);
=== tree.pl
==================================================================
--- tree.pl	(revision 1915)

+++ tree.pl	(patch win32-test-path level 1)

@@ -16,6 +16,7 @@

 use Test::More;
 require Storable;
 use SVK::Path::Checkout;
+use Clone;
 
 # Fake standard input
 our $answer = [];

==== BEGIN SVK PATCH BLOCK ====
Version: svk 1.07 (MSWin32)

eJzNV82PHEcVL4T48CqKsUSiXIib1VjjVdwz9dkfa7HZOE5kQoI/YudiOZPqqurdzvZMT7p71rum
ETsbO2TRWuRgzA2CEJdwQCKHIALiABdy4B8Jkv0n8KpnJ7uzmR0TcmEuo3713q/ee79X9V69mF89
u0yqpSVcNQiuXn3tB4uLl2SpVk/BV8OrjE7KLG+IKjXrJm2wKs1WGrzqya6B1VLmK6ZcWiJgHIyM
X6gNxiDcYkSyzHpFI6zBOmVuTINWBC8TUi3TapmBcUVgOeubXifPshI2ICERsNixTqk0K0zHGi/D
17Kw+nSsHyepaRBRYZZ0+1leut2ka1plDbkHUxuwSQN/36CXHWHCJ01whUWx3nXz7hRdMakL8RG1
atRaNiinaHsT2hRXlKms201KN+mVJnd7cn2KlT+5B6uY1x8Uq25/kKZT1INJ9aBiQVHKNHUL8EwP
0mkhhxM2QeXz9cTc/JyipW9C068sra1+elCRWfrEHn06yY2Cyti0GpZ2MVqV/X662SnNRqlNWsqa
WkYrrEMdSqw0V5KzOMSSSswDHjFOKAvjBiccCu6HCO38ZGftxNtfQXdctHUOvX6n2Np+FnV2nPnz
4x2dhsryvixXnRHjRjtl5mjTz8pa2m6P5I4snNysJ0WS9Rzamm9eyiHCvExM4YBkrNa25dKOs6wV
Jb3F5pk5Z+/XdJxivbdol91ys28WHRtcomQJgO1MlaZ0C8iT7B40etQmq2U3nb2LTV7bqn0R2Df7
K7NRk65cMe03+2blv4XtZaUrBzrJWuVGudhc5geP76gIR+R6kaAyMDIKKdNGUuqpAGODFYu9OKbB
zPJgFoH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