[svk-commit] r2816 - in trunk: t/bm
nobody at bestpractical.com
nobody at bestpractical.com
Wed May 7 04:22:57 EDT 2008
Author: clsung
Date: Wed May 7 04:22:57 2008
New Revision: 2816
Modified:
trunk/lib/SVK/Command/Branch.pm
trunk/t/bm/create-nocheckout.t
Log:
- implement verbose warning for trying to create branch in non-checkout project
- ref: http://task.hm/EAJ6/
Modified: trunk/lib/SVK/Command/Branch.pm
==============================================================================
--- trunk/lib/SVK/Command/Branch.pm (original)
+++ trunk/lib/SVK/Command/Branch.pm Wed May 7 04:22:57 2008
@@ -188,7 +188,17 @@
die loc ("Copy source can't be URI.\n")
if is_uri ($arg[0]);
- return ($self->arg_co_maybe ($arg[0]), $dst);
+ my $target;
+ eval {
+ $target = $self->arg_co_maybe($arg[0]);
+ };
+ if ($@) {
+ $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 chekout or specify");
+ $logger->info("a project root using the --project flag");
+ die $@;
+ }
+ return ($target, $dst);
}
Modified: trunk/t/bm/create-nocheckout.t
==============================================================================
--- trunk/t/bm/create-nocheckout.t (original)
+++ trunk/t/bm/create-nocheckout.t Wed May 7 04:22:57 2008
@@ -19,14 +19,11 @@
my ($copath, $corpath) = get_copath ('MyProject');
-TODO: {
-local $TODO = 'To be implemented';
is_output ($svk, 'branch', ['--create', 'feature/foo'],
- [qr/path \S+ is not a checkout path./,
- "I can't figure out what project you'd like to create a branch in. Please",
- "either run 'svk branch --create' from within an existing chekout or specify",
- "a project root using the --project flag"]);
-}
+ ["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 chekout or specify",
+ "a project root using the --project flag",
+ qr/path \S+ is not a checkout path./]);
is_output_like ($svk, 'branch', ['--create', 'feature/foo', '//mirror/MyProject'],
qr'Project branch created: feature/foo');
More information about the svk-commit
mailing list