[svk-commit] r2702 - in trunk: t/bm

nobody at bestpractical.com nobody at bestpractical.com
Tue Feb 26 01:49:51 EST 2008


Author: clsung
Date: Tue Feb 26 01:49:50 2008
New Revision: 2702

Modified:
   trunk/lib/SVK/Command/Branch.pm
   trunk/t/bm/merge.t

Log:
- allow '-P' for svk br merge 

Modified: trunk/lib/SVK/Command/Branch.pm
==============================================================================
--- trunk/lib/SVK/Command/Branch.pm	(original)
+++ trunk/lib/SVK/Command/Branch.pm	Tue Feb 26 01:49:50 2008
@@ -63,10 +63,11 @@
 sub options {
     ('l|list'           => 'list',
      'C|check-only'     => 'check_only',
+     'P|patch=s'        => 'patch',
      'create'           => 'create',
      'all'              => 'all',
      'local'            => 'local',
-     'from=s'             => 'from',
+     'from=s'           => 'from',
      'merge'            => 'merge',
      'move'             => 'move',
      'remove'           => 'remove',

Modified: trunk/t/bm/merge.t
==============================================================================
--- trunk/t/bm/merge.t	(original)
+++ trunk/t/bm/merge.t	Tue Feb 26 01:49:50 2008
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -w
 use strict;
-use Test::More tests => 20;
+use Test::More tests => 21;
 use SVK::Test;
 use File::Path;
 
@@ -152,6 +152,35 @@
      "Checking locally against mirror source $uri.", 'U   B/S/Q/qu',
      qr'New merge ticket: [\w\d-]+:/branches/merge/foo2:22',
      qr'New merge ticket: [\w\d-]+:/trunk:20']);
+my $patch1 = [
+	    '=== B/S/Q/qu',
+	    '==================================================================',
+	    "--- B/S/Q/qu\t(revision 19)",
+	    "+++ B/S/Q/qu\t(patch - level 1)",
+	    '@@ -5,3 +5,5 @@',
+	    " append CBA on local branch foo",
+	    " ",
+	    " append CBA on local branch foo",
+	    "+",
+	    '+append CBA on foo2'];
+is_output ($svk, 'branch', ['--merge', 'merge/foo2', '.', '-P', '-'], 
+    ["Auto-merging (0, 23) $branch_foo2 to $branch_foo (base $branch_foo:20).",
+    "Patching locally against mirror source $uri.",
+    'U   B/S/Q/qu',
+    '==== Patch <-> level 1',
+    qr'Source: [\w\d-]+:/branches/merge/foo2:22',
+    "        ($uri)",
+    qr'Target: [\w\d-]+:/branches/merge/foo:19',
+    "        ($uri)",
+    "Log:",
+    "- Merge //mirror/MyProject/branches/merge/foo2 to //mirror/MyProject/branches/.",
+    @$patch1,
+    '',
+    '==== BEGIN SVK PATCH BLOCK ====',
+    qr'Version: svk .*',
+    '',
+    \'...',
+    ]);
 is_output ($svk, 'branch', ['--merge', 'merge/foo2', '.'], 
     ["Auto-merging (0, 23) $branch_foo2 to $branch_foo (base $branch_foo:20).",
      "Merging back to mirror source $uri.", 'U   B/S/Q/qu',


More information about the svk-commit mailing list