[svk-commit] r2783 - in trunk: t/bm

nobody at bestpractical.com nobody at bestpractical.com
Tue Apr 29 03:57:19 EDT 2008


Author: clsung
Date: Tue Apr 29 03:57:18 2008
New Revision: 2783

Modified:
   trunk/lib/SVK/Command/Branch.pm
   trunk/t/bm/remove.t

Log:
- fix noise when
  % svk br --delete 'only_one_nonexistent_branch'

Modified: trunk/lib/SVK/Command/Branch.pm
==============================================================================
--- trunk/lib/SVK/Command/Branch.pm	(original)
+++ trunk/lib/SVK/Command/Branch.pm	Tue Apr 29 03:57:18 2008
@@ -316,6 +316,7 @@
 use base qw( SVK::Command::Delete SVK::Command::Branch );
 use SVK::I18N;
 use SVK::Util qw( is_uri );
+use SVK::Logger;
 
 sub lock { $_[0]->lock_target ($_[1]); };
 
@@ -352,13 +353,14 @@
 	$target = $target->root->check_path($target->path) ? $target : undef;
 	$target ? 
 	    $self->{message} .= "- Delete branch ".$target->path."\n" :
-	    warn loc("No such branch exists: %1 %2\n",
-		$_, $self->{local} ? '(in local)' : '');
+	    $logger->info ( loc("No such branch exists: %1 %2",
+		$_, $self->{local} ? '(in local)' : '')
+	    );
 
 	$target;
     } @dsts;
 
-    $self->SUPER::run(@dsts);
+    $self->SUPER::run(@dsts) if @dsts;
 
     return;
 }

Modified: trunk/t/bm/remove.t
==============================================================================
--- trunk/t/bm/remove.t	(original)
+++ trunk/t/bm/remove.t	Tue Apr 29 03:57:18 2008
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 use strict;
 use SVK::Test;
-plan tests => 10;
+plan tests => 11;
 our $output;
 
 my ($xd, $svk) = build_test('test');
@@ -73,4 +73,6 @@
 
 is_output($svk, 'br', ['-l', '//mirror/MyProject'], []);
 
+is_output($svk, 'br', ['--remove', 'fake2'],
+    ["No such branch exists: fake2 "]);
 1;


More information about the svk-commit mailing list