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

nobody at bestpractical.com nobody at bestpractical.com
Sat Dec 15 22:18:41 EST 2007


Author: clsung
Date: Sat Dec 15 22:18:39 2007
New Revision: 2634

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

Log:
- add --all to --list, list all branches (in branches/ and local)
  - hmm, then how about tags/ features/ ?

Modified: branches/bm/lib/SVK/Command/Branch.pm
==============================================================================
--- branches/bm/lib/SVK/Command/Branch.pm	(original)
+++ branches/bm/lib/SVK/Command/Branch.pm	Sat Dec 15 22:18:39 2007
@@ -63,6 +63,7 @@
     ('l|list'  => 'list',
      'C|check-only'     => 'check_only',
      'create'=> 'create',
+     'all'=> 'all',
      'local'=> 'local',
      'merge'=> 'merge',
      'move' => 'move',
@@ -125,6 +126,7 @@
     }
 
     my $branches = $proj->branches ($self->{local});
+    push @{$branches},@{$proj->branches (!$self->{local})} if ($self->{all});
 
     my $fmt = "%s\n"; # here to change layout
     printf $fmt, $_ for @{$branches};

Modified: branches/bm/t/bm/basic.t
==============================================================================
--- branches/bm/t/bm/basic.t	(original)
+++ branches/bm/t/bm/basic.t	Sat Dec 15 22:18:39 2007
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 use strict;
 use SVK::Test;
-plan tests => 12;
+plan tests => 13;
 our $output;
 
 my ($xd, $svk) = build_test('test');
@@ -64,3 +64,6 @@
 is_output($svk, 'br', ['-l', '--local', '//mirror/MyProject'],
           ['feature/foobar']);
 
+is_output($svk, 'br', ['-l', '--all', '//mirror/MyProject'],
+          ['Foo', 'feature/foo', 'feature/foobar']);
+


More information about the svk-commit mailing list