[svk-commit] r3015 - in trunk: t/bm
nobody at bestpractical.com
nobody at bestpractical.com
Fri Jul 25 04:56:17 EDT 2008
Author: clsung
Date: Fri Jul 25 04:56:16 2008
New Revision: 3015
Modified:
trunk/lib/SVK/Command/Branch.pm
trunk/t/bm/online-offline.t
Log:
- for http://task.hm/EKYJ
- svk br --offline when you're on trunk should probably not create a local branch called 'trunk'
Modified: trunk/lib/SVK/Command/Branch.pm
==============================================================================
--- trunk/lib/SVK/Command/Branch.pm (original)
+++ trunk/lib/SVK/Command/Branch.pm Fri Jul 25 04:56:16 2008
@@ -982,6 +982,7 @@
if (!$branch_name) { # no branch_name means using current branch(trunk) as src
$branch_name = $proj->branch_name($target->path);
$self->{from} = $branch_name;
+ $branch_name = $proj->name."-trunk" if $branch_name eq 'trunk';
}
$self->{local} = 1;
$self->{switch} = 1;
Modified: trunk/t/bm/online-offline.t
==============================================================================
--- trunk/t/bm/online-offline.t (original)
+++ trunk/t/bm/online-offline.t Fri Jul 25 04:56:16 2008
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
use strict;
use SVK::Test;
-plan tests => 24;
+plan tests => 26;
our $output;
my ($xd, $svk) = build_test('test');
@@ -134,3 +134,14 @@
'Copied From: feature/foobar at 12',
'Merged From: release/abc at 18']);
+chdir('..');
+$svk->br('--switch','trunk');
+
+is_output_like ($svk, 'info', [],
+ qr|Depot Path: //mirror/MyProject/trunk|);
+
+$svk->br('--offline'); # offline the trunk
+
+# w/o bname, will use <pname>-trunk as the local(offline) bname
+is_output_like ($svk, 'info', [],
+ qr|Depot Path: //local/MyProject/MyProject-trunk|);
More information about the svk-commit
mailing list