[svk-commit] r2397 - in trunk: t

nobody at bestpractical.com nobody at bestpractical.com
Mon May 21 15:03:38 EDT 2007


Author: clkao
Date: Mon May 21 15:03:36 2007
New Revision: 2397

Modified:
   trunk/lib/SVK/Path/Txn.pm
   trunk/t/07smerge-incremental.t

Log:
Fix an inconsistency for smerge -IC behaviour when the base is
a txn path.


Modified: trunk/lib/SVK/Path/Txn.pm
==============================================================================
--- trunk/lib/SVK/Path/Txn.pm	(original)
+++ trunk/lib/SVK/Path/Txn.pm	Mon May 21 15:03:36 2007
@@ -100,7 +100,12 @@
 
 sub prev {
     my ($self) = shift;
-    $self->as_depotpath;
+
+    my $base = $self->as_depotpath;
+    unless (%{ $self->root->paths_changed }) {
+	$base = $base->prev;
+    }
+    return $base;
 }
 
 1;

Modified: trunk/t/07smerge-incremental.t
==============================================================================
--- trunk/t/07smerge-incremental.t	(original)
+++ trunk/t/07smerge-incremental.t	Mon May 21 15:03:36 2007
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 use strict;
 use SVK::Test;
-plan_svm tests => 11;
+plan_svm tests => 15;
 
 our $output;
 # build another tree to be mirrored ourself
@@ -124,17 +124,33 @@
 $svk->commit ($copath, "-m", "simultaneous changes - remote");
 
 $svk->smerge ('-m', 'simultaneous changes - pull', '//m', '//l');
-is_output ($svk, 'smerge', ['-I', '//l', '//m'],
+is_output ($svk, 'smerge', ['-IC', '//l', '//m'],
 	   ['Auto-merging (6, 17) /l to /m (base /m:16).',
 	    '===> Auto-merging (6, 15) /l to /m (base /l:6).',
+	    "U   Q/qu",
+	    "New merge ticket: $uuid:/l:15",
+	    '===> Auto-merging (15, 17) /l to /m (base */l:15).',
+	    'Empty merge.']);
+is_output ($svk, 'smerge', ['-I', '//l at 15', '//m'],
+	   ['Auto-merging (6, 15) /l to /m (base /l:6).',
+	    '===> Auto-merging (6, 15) /l to /m (base /l:6).',
 	    "Merging back to mirror source $uri/A.",
 	    "U   Q/qu",
 	    "New merge ticket: $uuid:/l:15",
 	    'Merge back committed as revision 6.',
 	    "Syncing $uri/A",
 	    'Retrieving log information from 6 to 6',
-	    'Committed revision 18 from revision 6.',
+	    'Committed revision 18 from revision 6.']);
+is_output ($svk, 'smerge', ['-C', '//l', '//m'],
+	   ['Auto-merging (15, 17) /l to /m (base */l:15).',
+	    "Checking locally against mirror source $uri/A.",
+	    'Empty merge.']);
+is_output ($svk, 'smerge', ['-IC', '//l', '//m'],
+	   ['Auto-merging (15, 17) /l to /m (base */l:15).',
+	    '===> Auto-merging (15, 17) /l to /m (base */l:15).',
+	    'Empty merge.']);
+is_output ($svk, 'smerge', ['-I', '//l', '//m'],
+	   ['Auto-merging (15, 17) /l to /m (base */l:15).',
 	    '===> Auto-merging (15, 17) /l to /m (base */l:15).',
 	    "Merging back to mirror source $uri/A.",
 	    'Empty merge.']);
-


More information about the svk-commit mailing list