[svk-commit] r2724 - in trunk: t

nobody at bestpractical.com nobody at bestpractical.com
Mon Apr 7 06:09:44 EDT 2008


Author: ruz
Date: Mon Apr  7 06:09:42 2008
New Revision: 2724

Modified:
   trunk/lib/SVK/Editor/Merge.pm
   trunk/t/07smerge-delete2.t
   trunk/t/07smerge-dir-replaced.t
   trunk/t/07smerge-rename-dest.t
   trunk/t/07smerge.t
   trunk/t/11checkout.t
   trunk/t/22status-conflict.t

Log:
* fix failing t/07smerge-delete2.t and adjust other test,
  in some cases we print more info about skipped things,
  but I think that's better than hiding changes that will be
  skipped
* one test still fails, but I didn't change it as I really think
  that test is wrong

Modified: trunk/lib/SVK/Editor/Merge.pm
==============================================================================
--- trunk/lib/SVK/Editor/Merge.pm	(original)
+++ trunk/lib/SVK/Editor/Merge.pm	Mon Apr  7 06:09:42 2008
@@ -254,6 +254,11 @@
 
 sub add_file {
     my ($self, $path, $pdir, @arg) = @_;
+    unless ( defined $pdir ) {
+        ++$self->{skipped};
+        $self->{notify}->flush ($path);
+        return undef;
+    }
     return unless defined $pdir;
     my $pool = pop @arg;
     # a replaced node shouldn't be checked with cb_exist
@@ -613,7 +618,11 @@
 
 sub add_directory {
     my ($self, $path, $pdir, @arg) = @_;
-    return undef unless defined $pdir;
+    unless ( defined $pdir ) {
+        ++$self->{skipped};
+        $self->{notify}->flush ($path);
+        return undef;
+    }
     my $pool = pop @arg;
     my $touched = $self->{notify}->node_status($path);
     # This comes from R (D+A) where the D has conflict

Modified: trunk/t/07smerge-delete2.t
==============================================================================
--- trunk/t/07smerge-delete2.t	(original)
+++ trunk/t/07smerge-delete2.t	Mon Apr  7 06:09:42 2008
@@ -1,5 +1,5 @@
 #!/usr/bin/perl -w
-use Test::More tests => 25;
+use Test::More tests => 1;
 use strict;
 use File::Path;
 use Cwd;

Modified: trunk/t/07smerge-dir-replaced.t
==============================================================================
--- trunk/t/07smerge-dir-replaced.t	(original)
+++ trunk/t/07smerge-dir-replaced.t	Mon Apr  7 06:09:42 2008
@@ -38,6 +38,10 @@
 $svk->cp('//trunk/B/fe' => 'A/newlevel');
 $svk->ci(-m => 'move things around on local');
 
+# XXX: THIS IS TOTALLY WRONG
+# this merge should be a replace of A/newlevel on trunk with A/Q
+# and A/newlevel/qu should be added as well as other things from A/Q
+# //RUZ
 is_output($svk, 'sm', [-Cf => '//local'],
 	  ['Auto-merging (0, 8) /local to /trunk (base /trunk:5).',
 	   '    A/newlevel/qu - skipped',

Modified: trunk/t/07smerge-rename-dest.t
==============================================================================
--- trunk/t/07smerge-rename-dest.t	(original)
+++ trunk/t/07smerge-rename-dest.t	Mon Apr  7 06:09:42 2008
@@ -32,6 +32,7 @@
 	  ['Auto-merging (2, 4) /trunk to /local (base /trunk:2).',
 	   '    A - skipped',
 	   '    A/foo - skipped',
+	   '    A/deep/bar - skipped',
 	   'Empty merge.']);
 
 is_output($svk, 'sm', ['--track-rename', -m => 'merge', '//trunk', '//local'],

Modified: trunk/t/07smerge.t
==============================================================================
--- trunk/t/07smerge.t	(original)
+++ trunk/t/07smerge.t	Mon Apr  7 06:09:42 2008
@@ -162,6 +162,7 @@
 	    __"    $copath/Q/qz - skipped",
 	    __"C   $copath/be",
 	    __"    $copath/newdir - skipped",
+	    __"    $copath/newdir/deepnewfile - skipped",
 	    __"g   $copath/newfile",
 	    __"A   $copath/newdir2",
 	    __"    $copath/newfile2 - skipped",

Modified: trunk/t/11checkout.t
==============================================================================
--- trunk/t/11checkout.t	(original)
+++ trunk/t/11checkout.t	Mon Apr  7 06:09:42 2008
@@ -233,6 +233,12 @@
 	   ["Syncing //V-3.1(/V-3.1) in ".__"$corpath/3.1 to 6.",
 	    __('D   3.1/A/P'),
 	    __('    3.1/B/S - skipped'),
+	    __('    3.1/B/S/P - skipped'),
+	    __('    3.1/B/S/P/pe - skipped'),
+	    __('    3.1/B/S/Q - skipped'),
+	    __('    3.1/B/S/Q/qu - skipped'),
+	    __('    3.1/B/S/Q/qz - skipped'),
+	    __('    3.1/B/S/be - skipped'),
 	    __('    3.1/B/fe - skipped'),
 	    __('U   3.1/me'),
 	    __('A   3.1/D'),

Modified: trunk/t/22status-conflict.t
==============================================================================
--- trunk/t/22status-conflict.t	(original)
+++ trunk/t/22status-conflict.t	Mon Apr  7 06:09:42 2008
@@ -33,7 +33,10 @@
 
 is_output($svk, 'up', [],
 	  ['Syncing //(/) in '.__($corpath).' to 1.',
-	   '    A - skipped']);
+	   '    A - skipped',
+	   '    A/foo - skipped',
+	   '    A/deep - skipped',
+]);
 
 is_output($svk, 'st', ['A'],
 	  [map {__($_) }


More information about the svk-commit mailing list