[svk-commit] r2803 - in trunk: lib/SVK t

nobody at bestpractical.com nobody at bestpractical.com
Tue May 6 10:14:53 EDT 2008


Author: clkao
Date: Tue May  6 10:14:17 2008
New Revision: 2803

Modified:
   trunk/lib/SVK/Command/Commit.pm
   trunk/lib/SVK/Util.pm
   trunk/t/23commit.t

Log:
revert 2796.

Modified: trunk/lib/SVK/Command/Commit.pm
==============================================================================
--- trunk/lib/SVK/Command/Commit.pm	(original)
+++ trunk/lib/SVK/Command/Commit.pm	Tue May  6 10:14:17 2008
@@ -388,7 +388,6 @@
 	  cb_conflict => sub { shift->conflict(@_) },
       cb_unknown  => sub {
           my ($self, $path) = @_;
-          $path = $target->copath($path);
           push @unversioned, "?   $path\n";
       },
 	);
@@ -465,7 +464,7 @@
 
     $self->decode_commit_message;
 
-    my @need_to_add = map  {$_->[1]}
+    my @need_to_add = map  {$target->copath($_->[1])}
                       grep {$_->[0] eq 'A'}
                       @$targets;
     for (@need_to_add)

Modified: trunk/lib/SVK/Util.pm
==============================================================================
--- trunk/lib/SVK/Util.pm	(original)
+++ trunk/lib/SVK/Util.pm	Tue May  6 10:14:17 2008
@@ -329,7 +329,7 @@
         }
         grep {
         !/^\?/m
-        }    # remove unversioned files
+        }    # remove unversioned fils
         grep {/\S/}
         split( /\n+/, $ret[1] );
 

Modified: trunk/t/23commit.t
==============================================================================
--- trunk/t/23commit.t	(original)
+++ trunk/t/23commit.t	Tue May  6 10:14:17 2008
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 use strict;
 use SVK::Test;
-plan tests => 74;
+plan tests => 69;
 
 our $output;
 my ($xd, $svk) = build_test();
@@ -333,40 +333,6 @@
 is_output ($svk, 'status', [],
 	   [__('M   A/foo'),
         __('M   A/verbose')]);
-
-$svk->revert('A/verbose');
-
-# bug with ?->A in `svk ci ..`
-$svk->remove('A/verbose');
-
-is_output ($svk, 'status', [],
-	   [__('M   A/foo'),
-        __('D   A/verbose')]);
-
-$svk->commit ('-m', 'blah');
-
-overwrite_file("A/foo", "hi");
-
-is_output ($svk, 'status', [],
-	   [__('M   A/foo')]);
-
-overwrite_file("A/verbose", "happy happy joy joy");
-
-chdir('A/deep');
-is_output ($svk, 'commit', ['..'],
-    ['Waiting for editor...',
-    'Committed revision 20.'], 'we got a commit by replacing a ? with an A');
-chdir('../..');
-
-is_output ($svk, 'status', [],
-	   [__('M   A/foo')]);
-
-overwrite_file("A/verbose", "just making sure I'm versioned");
-
-is_output ($svk, 'status', [],
-	   [__('M   A/foo'),
-        __('M   A/verbose')]);
-
 $svk->revert('A/verbose');
 # }}}
 
@@ -403,7 +369,7 @@
 append_file ("A/bar", "foobar2");
 is_output ($svk, 'commit', [],
 	   ['Waiting for editor...',
-	    'Committed revision 23.'], 'buffer unmodified');
+	    'Committed revision 21.'], 'buffer unmodified');
 $answer = 'a';
 append_file ("A/bar", "foobar2");
 is_output ($svk, 'commit', [],
@@ -416,20 +382,20 @@
 	   ["Can't use -F with -m."]);
 
 is_output ($svk, 'commit', [-F => 'svk-commit'],
-	   ['Committed revision 24.'], 'commit with -F');
+	   ['Committed revision 22.'], 'commit with -F');
 
-is_output_like ($svk, 'log', [-r => 24],
+is_output_like ($svk, 'log', [-r => 22],
 		qr/my log message/);
 
 append_file ("A/bar", "please be changed");
 is_output($svk, 'commit', [-m => "i like a monkey\nand a birdie", '--template'],
           ["Waiting for editor...",
-	   "Committed revision 25."], 'commit with -m and --template');
+	   "Committed revision 23."], 'commit with -m and --template');
 
-is_output_like ($svk, 'log', [-r => 25],
+is_output_like ($svk, 'log', [-r => 23],
 		qr/i like a gorilla/, 'first line successfully edited from template');
 
-is_output_like ($svk, 'log', [-r => 25],
+is_output_like ($svk, 'log', [-r => 23],
 		qr/and a parrot/, 'second line successfully edited from template');
 
 append_file ("A/bar", "changed some more");
@@ -437,23 +403,23 @@
 
 is_output($svk, 'commit', [-F => 'svk-commit', '--template'],
           ["Waiting for editor...",
-	   "Committed revision 26."], 'commit with -F and --template');
+	   "Committed revision 24."], 'commit with -F and --template');
 
-is_output_like ($svk, 'log', [-r => 26],
+is_output_like ($svk, 'log', [-r => 24],
 		qr/this time it's a parrot/, 'first line successfully edited from template');
 
-is_output_like ($svk, 'log', [-r => 26],
+is_output_like ($svk, 'log', [-r => 24],
 		qr/also a gorilla/, 'second line successfully edited from template');
 
 overwrite_file("changeme", 'to be committed with revprop');
 $svk->add("changeme");
 
 is_output($svk, 'commit', [-m => 'with revprop', '--set-revprop', 'fnord=baz'],
-          ["Committed revision 27."], 'fnord');
+          ["Committed revision 25."], 'fnord');
 
 is_output(
-    $svk, 'pl', ['-r' => 27, '--revprop'],
-    ['Unversioned properties on revision 27:',
+    $svk, 'pl', ['-r' => 25, '--revprop'],
+    ['Unversioned properties on revision 25:',
      '  fnord',
      '  svn:author',
      '  svn:date',


More information about the svk-commit mailing list