[svk-commit] r2490 - in branches/2.0-releng: lib/SVK/Path

nobody at bestpractical.com nobody at bestpractical.com
Tue Jul 17 11:59:02 EDT 2007


Author: clkao
Date: Tue Jul 17 11:59:02 2007
New Revision: 2490

Modified:
   branches/2.0-releng/lib/SVK/Path/Txn.pm
   branches/2.0-releng/t/07smerge-incremental.t

Log:
merge from trunk:
 r2397 at trunk:  clkao | 2007-05-21 20:02:58 +0100
 Fix an inconsistency for smerge -IC behaviour when the base is
 a txn path.
 


Modified: branches/2.0-releng/lib/SVK/Path/Txn.pm
==============================================================================
--- branches/2.0-releng/lib/SVK/Path/Txn.pm	(original)
+++ branches/2.0-releng/lib/SVK/Path/Txn.pm	Tue Jul 17 11:59:02 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: branches/2.0-releng/t/07smerge-incremental.t
==============================================================================
--- branches/2.0-releng/t/07smerge-incremental.t	(original)
+++ branches/2.0-releng/t/07smerge-incremental.t	Tue Jul 17 11:59:02 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