[svk-commit] r2310 - trunk/t

nobody at bestpractical.com nobody at bestpractical.com
Mon Mar 5 23:25:27 EST 2007


Author: mb
Date: Mon Mar  5 23:25:27 2007
New Revision: 2310

Added:
   trunk/t/07smerge-tags.t

Log:
Added TODO test for repeated smerges from tags of trunk to a branch.

Added: trunk/t/07smerge-tags.t
==============================================================================
--- (empty file)
+++ trunk/t/07smerge-tags.t	Mon Mar  5 23:25:27 2007
@@ -0,0 +1,65 @@
+#!/usr/bin/perl -w
+use Test::More tests => 3;
+use strict;
+use File::Path;
+use Cwd;
+use SVK::Test;
+
+my ($xd, $svk) = build_test();
+our $output;
+my ($copath, $corpath) = get_copath ('smerge-copy');
+$svk->mkdir ('-m', 'trunk', '//trunk');
+$svk->cp ('-m', 'branch', '//trunk', '//branch');
+my $tree = create_basic_tree ($xd, '//trunk');
+$svk->cp ('-m', 'tag1', '//trunk', '//tag1');
+
+TODO: {
+local $TODO = "Copy source isn't tracked in merge ticket.";
+
+is_output($svk, 'sm', ['-m', 'merge tag1 to branch', '//tag1', '//branch'],
+	  ['Auto-merging (0, 5) /tag1 to /branch (base /trunk:1).',
+	   'A   A',
+	   'A   A/Q',
+	   'A   A/Q/qu',
+	   'A   A/Q/qz',
+	   'A   A/be',
+	   'A   B',
+	   'A   B/S',
+	   'A   B/S/P',
+	   'A   B/S/P/pe',
+	   'A   B/S/Q',
+	   'A   B/S/Q/qu',
+	   'A   B/S/Q/qz',
+	   'A   B/S/be',
+	   'A   B/fe',
+	   'A   me',
+	   'A   C',
+	   'A   C/R',
+	   'A   D',
+	   'A   D/de',
+	   qr'New merge ticket: .*:/tag1:5',
+	   qr'New merge ticket: .*:/trunk:4',
+	   'Committed revision 6.'
+	  ]);
+
+$svk->checkout ('//trunk', $copath);
+chdir($copath);
+
+overwrite_file('new-in-trunk', 'new file on trunk');
+$svk->add('new-in-trunk');
+$svk->ci(-m => 'new file');
+
+$svk->cp ('-m', 'tag2', '//trunk', '//tag2');
+
+is_output($svk, 'sm', ['-m', 'merge tag2 to branch', '//tag2', '//branch'],
+	  ['Auto-merging (0, 8) /tag2 to /branch (base /trunk:4).',
+	   'A   new-in-trunk',
+	   qr'New merge ticket: .*:/tag2:8',
+	   qr'New merge ticket: .*:/trunk:7',
+	   'Committed revision 9.'
+	  ]);
+
+is_output($svk, 'sm', ['-m', 'merge trunk to branch', '//trunk', '//branch'],
+	  ['Auto-merging (7, 7) /trunk to /branch (base /trunk:7).',
+	   'Empty merge.']);
+}


More information about the svk-commit mailing list