[svk-commit] r2902 - in trunk: t/bm
nobody at bestpractical.com
nobody at bestpractical.com
Wed May 21 05:09:48 EDT 2008
Author: clsung
Date: Wed May 21 05:09:46 2008
New Revision: 2902
Modified:
trunk/lib/SVK/Command/Branch.pm
trunk/t/bm/create-nocheckout.t
Log:
- fix my previous error (r2899)
Modified: trunk/lib/SVK/Command/Branch.pm
==============================================================================
--- trunk/lib/SVK/Command/Branch.pm (original)
+++ trunk/lib/SVK/Command/Branch.pm Wed May 21 05:09:46 2008
@@ -229,7 +229,7 @@
use SVK::Util qw( is_uri );
use SVK::Logger;
-sub lock { $_[0]->lock_target ($_[1]); };
+sub lock { $_[0]->lock_target ($_[2]); };
sub parse_arg {
my ($self, @arg) = @_;
@@ -244,10 +244,9 @@
# always try to eval current wc
my ($proj,$target, $msg) = $self->locate_project($arg[0]);
if (!$proj) {
- $logger->info( "I can't figure out what project you'd like to create a branch in. Please");
- $logger->info("either run '$0 branch --create' from within an existing checkout or specify");
- $logger->info("a project root using the --project flag");
- exit;
+ $logger->warn( "I can't figure out what project you'd like to create a branch in. Please");
+ $logger->warn("either run '$0 branch --create' from within an existing checkout or specify");
+ $logger->warn("a project root using the --project flag");
}
return ($proj, $target, $dst);
}
@@ -255,6 +254,7 @@
sub run {
my ($self, $proj, $target, $branch_name) = @_;
+ return unless $proj;
delete $self->{from} if $self->{from} and $self->{from} eq 'trunk';
my $src_path = $proj->branch_path($self->{from} ? $self->{from} : 'trunk');
Modified: trunk/t/bm/create-nocheckout.t
==============================================================================
--- trunk/t/bm/create-nocheckout.t (original)
+++ trunk/t/bm/create-nocheckout.t Wed May 21 05:09:46 2008
@@ -22,8 +22,7 @@
is_output ($svk, 'branch', ['--create', 'feature/foo'],
["I can't figure out what project you'd like to create a branch in. Please",
"either run '$0 branch --create' from within an existing checkout or specify",
- "a project root using the --project flag",
- qr/path \S+ is not a checkout path./]);
+ "a project root using the --project flag"]);
is_output_like ($svk, 'branch', ['--create', 'feature/foo', '//mirror/MyProject'],
qr'Project branch created: feature/foo');
More information about the svk-commit
mailing list