[svk-commit] r2705 - in trunk: lib/SVK

nobody at bestpractical.com nobody at bestpractical.com
Mon Mar 17 20:55:40 EDT 2008


Author: clsung
Date: Mon Mar 17 20:55:38 2008
New Revision: 2705

Modified:
   trunk/lib/SVK/Merge.pm
   trunk/t/smerge/svn-argument.t

Log:
- die when invalid merge base like file:///dev/shm/svk/test_repos/trunk:6

Sumitted by: Mark Eichin <eichin_AT_metacarta dot com>

Modified: trunk/lib/SVK/Merge.pm
==============================================================================
--- trunk/lib/SVK/Merge.pm	(original)
+++ trunk/lib/SVK/Merge.pm	Mon Mar 17 20:55:38 2008
@@ -207,6 +207,8 @@
     my ($basepath, $baserev, $baseentry);
     my ($merge_base, $merge_baserev) = $self->{merge_base} ?
 	split(/:/, $self->{merge_base}) : ('', undef);
+    die loc("Invalid merge base:'%1'\n", $self->{merge_base} )
+	if $merge_baserev && $merge_baserev !~ /^\d+$/;
     ($merge_base, $merge_baserev) = (undef, $merge_base)
         if $merge_base =~ /^\d+$/;
 

Modified: trunk/t/smerge/svn-argument.t
==============================================================================
--- trunk/t/smerge/svn-argument.t	(original)
+++ trunk/t/smerge/svn-argument.t	Mon Mar 17 20:55:38 2008
@@ -7,7 +7,7 @@
 
 my ($xd, $svk) = build_test('test');
 our $output;
-my ($copath, $corpath) = get_copath ('smerge-copy');
+my ($copath, $corpath) = get_copath ('smerge-argument');
 $svk->mkdir ('-pm', 'trunk', '/test/trunk');
 $svk->mkdir ('-pm', 'some other local', '//local');
 my $tree = create_basic_tree ($xd, '/test/trunk');
@@ -22,12 +22,6 @@
 
 $svk->mkdir (-m => 'something bzz', '//local/blah/A/bzz');
 
+# invalid base format such as "file:///dev/shm/svk/test_repos/trunk:5"
 is_output($svk, 'sm', [-m => 'local to trunk', -b => $uri.':5', '//local/blah', '//foo/bar/trunk'],
-          ['Auto-merging (0, 7) /local/blah to /foo/bar/trunk (base /foo/bar/trunk:5).',
-           "Merging back to mirror source $uri.",
-           'A   A/bzz',
-           qr'New merge ticket: .*:/local/blah:7',
-           'Merge back committed as revision 4.',
-           qr'Syncing .*',
-           'Retrieving log information from 4 to 4',
-           'Committed revision 8 from revision 4.']);
+          ["Invalid merge base:'$uri:5'"])


More information about the svk-commit mailing list