[svk-commit] r2570 - branches/bm/t/bm

nobody at bestpractical.com nobody at bestpractical.com
Mon Oct 29 04:28:36 EDT 2007


Author: clsung
Date: Mon Oct 29 04:28:35 2007
New Revision: 2570

Added:
   branches/bm/t/bm/merge.t

Log:
- test for '--merge'

Added: branches/bm/t/bm/merge.t
==============================================================================
--- (empty file)
+++ branches/bm/t/bm/merge.t	Mon Oct 29 04:28:35 2007
@@ -0,0 +1,36 @@
+#!/usr/bin/perl -w
+use strict;
+use Test::More tests => 4;
+use SVK::Test;
+use File::Path;
+
+#sub copath { SVK::Path::Checkout->copath($copath, @_) }
+
+my ($xd, $svk) = build_test('test');
+our $output;
+$svk->mkdir(-m => 'trunk', '/test/trunk');
+$svk->mkdir(-m => 'trunk', '/test/branches');
+$svk->mkdir(-m => 'trunk', '/test/tags');
+my $tree = create_basic_tree($xd, '/test/trunk');
+
+my $depot = $xd->find_depot('test');
+my $uri = uri($depot->repospath);
+
+$svk->mirror('//mirror/MyProject', $uri);
+$svk->sync('//mirror/MyProject');
+
+my ($copath, $corpath) = get_copath ('MyProject');
+$svk->checkout('//mirror/MyProject/trunk',$copath);
+warn $output;
+chdir($copath);
+
+is_output_like ($svk, 'branch', ['--create', 'feature/foo','--switch-to'], qr'Project branch created: feature/foo');
+append_file ('A/be', "\nsome more foobar\nzz\n");
+$svk->propset ('someprop', 'propvalue', 'A/be');
+$svk->diff();
+$svk->commit ('-m', 'commit message here (r6)','');
+is_output ($svk, 'merge',
+    ['-C', '-rHEAD:7', '//mirror/MyProject/branches/feature/foo', '//mirror/MyProject/trunk'], 
+    [ "Checking locally against mirror source $uri.", 'gg  A/be']);
+is_output ($svk, 'branch', ['--merge', '-C', 'feature/foo', 'trunk'], 
+    [ "Checking locally against mirror source $uri.", 'gg  A/be']);


More information about the svk-commit mailing list