[svk-commit] r2565 - in branches/bm: t/bm

nobody at bestpractical.com nobody at bestpractical.com
Thu Oct 25 10:21:46 EDT 2007


Author: clsung
Date: Thu Oct 25 10:21:40 2007
New Revision: 2565

Modified:
   branches/bm/lib/SVK/Command/Branch.pm
   branches/bm/t/bm/basic.t

Log:
- implement TODO in bm/basic.t
  - really implement --list

Modified: branches/bm/lib/SVK/Command/Branch.pm
==============================================================================
--- branches/bm/lib/SVK/Command/Branch.pm	(original)
+++ branches/bm/lib/SVK/Command/Branch.pm	Thu Oct 25 10:21:40 2007
@@ -98,21 +98,21 @@
 sub run {
     my ($self, $target) = @_;
 
-    my $source = $target->source;
+    $target = $target->source if $target->isa('SVK::Path::Checkout');
     my $proj = SVK::Project->create_from_path(
-	$source->depot,
-	$source->path
+	$target->depot,
+	$target->path
     );
 
     if (!$proj) {
 	print loc("No project branch founded.\n");
 	return;
     }
-    # need to beautify the output
-    use Data::Dumper;
-    warn Dumper $proj->branches() if $proj; 
 
-    print loc("Project branch listed.\n");
+    my @branches = $proj->branches;
+
+    my $fmt = "%s\n"; # here to change layout
+    printf $fmt, @$_ for @branches;
     return;
 }
 

Modified: branches/bm/t/bm/basic.t
==============================================================================
--- branches/bm/t/bm/basic.t	(original)
+++ branches/bm/t/bm/basic.t	Thu Oct 25 10:21:40 2007
@@ -23,11 +23,10 @@
 
 $svk->checkout('//mirror/MyProject/trunk', $copath);
 
-TODO: {
-local $TODO = 'not implemented yet';
-is_output($svk, 'bm', ['-l'],
+chdir($copath);
+
+is_output($svk, 'br', ['-l'],
           ['Foo'], 'default to guess project of current checkout');
 
-is_output($svk, 'bm', ['-l', '//mirror/MyProject'],
+is_output($svk, 'br', ['-l', '//mirror/MyProject'],
           ['Foo']);
-};


More information about the svk-commit mailing list