[svk-commit] r2215 - in branches/2.0-releng: lib/SVK t
nobody at bestpractical.com
nobody at bestpractical.com
Tue Dec 5 04:25:23 EST 2006
Author: clkao
Date: Tue Dec 5 04:25:23 2006
New Revision: 2215
Added:
branches/2.0-releng/t/22status-conflict.t
Modified:
branches/2.0-releng/MANIFEST
branches/2.0-releng/lib/SVK/XD.pm
Log:
Fix a bug that "svk st X" prints stack trace when X exists and
has conflicts.
Modified: branches/2.0-releng/MANIFEST
==============================================================================
--- branches/2.0-releng/MANIFEST (original)
+++ branches/2.0-releng/MANIFEST Tue Dec 5 04:25:23 2006
@@ -228,6 +228,7 @@
t/20add.t
t/21delete.t
t/22status.t
+t/22status-conflict.t
t/23commit-file.t
t/23commit-inter-nav.t
t/23commit-inter-output.t
Modified: branches/2.0-releng/lib/SVK/XD.pm
==============================================================================
--- branches/2.0-releng/lib/SVK/XD.pm (original)
+++ branches/2.0-releng/lib/SVK/XD.pm Tue Dec 5 04:25:23 2006
@@ -1294,7 +1294,8 @@
}
# don't use depth when we are still traversing through targets
my $descend = defined $targets || !(defined $arg{depth} && $arg{depth} == 0);
- $arg{cb_conflict}->($arg{editor}, $arg{entry}, $arg{baton})
+ # XXX: the top level entry is undefined, which should be fixed.
+ $arg{cb_conflict}->($arg{editor}, defined $arg{entry} ? $arg{entry} : '', $arg{baton})
if $thisdir && $arg{cb_conflict} && $cinfo->{'.conflict'};
return 1 if $self->_node_deleted_or_absent (%arg, pool => $pool);
Added: branches/2.0-releng/t/22status-conflict.t
==============================================================================
--- (empty file)
+++ branches/2.0-releng/t/22status-conflict.t Tue Dec 5 04:25:23 2006
@@ -0,0 +1,48 @@
+#!/usr/bin/perl -w
+use Test::More tests => 5;
+use strict;
+use SVK::Test;
+our $output;
+my ($xd, $svk) = build_test();
+my ($copath, $corpath) = get_copath ('status-conflict');
+
+my ($repospath, undef, $repos) = $xd->find_repos ('//', 1);
+$svk->checkout ('//', $copath);
+chdir($copath);
+mkdir('A');
+mkdir('A/deep');
+overwrite_file("A/foo", "foobar");
+
+$svk->add('A');
+$svk->ci(-m => 'orz');
+
+
+mkdir("A/something");
+
+is_output($svk, 'up', [-r => 0],
+ ['Syncing //(/) in '.__($corpath).' to 0.',
+ __('C A'),
+ __('D A/deep'),
+ __('D A/foo'),
+ __('C A/something'),
+ '2 conflicts found.']);
+
+is_output($svk, 'st', [],
+ ['C A',
+ 'C A/something']);
+
+is_output($svk, 'up', [],
+ ['Syncing //(/) in '.__($corpath).' to 1.',
+ ' A - skipped']);
+
+is_output($svk, 'st', ['A'],
+ [map {__($_) }
+ '! A/deep',
+ '! A/foo',
+ 'C A/something',
+ 'C A']);
+
+is_output($svk, 'st', ['A/something'],
+ [__('C A/something')]);
+
+
More information about the svk-commit
mailing list