[svk-commit] r2324 - in branches/2.0-releng: . t

nobody at bestpractical.com nobody at bestpractical.com
Wed Mar 14 14:51:41 EDT 2007


Author: clkao
Date: Wed Mar 14 14:51:40 2007
New Revision: 2324

Added:
   branches/2.0-releng/t/update-gone.t
Modified:
   branches/2.0-releng/MANIFEST
   branches/2.0-releng/lib/SVK/Command/Update.pm

Log:
Merge from trunk:

 r2312 at trunk:  clkao | 2007-03-06 12:09:13 +0000
 Make updating a checkout that no longer exists in the depot give
 proper message.
 r2313 at trunk:  clkao | 2007-03-06 12:10:39 +0000
 test for r2312


Modified: branches/2.0-releng/MANIFEST
==============================================================================
--- branches/2.0-releng/MANIFEST	(original)
+++ branches/2.0-releng/MANIFEST	Wed Mar 14 14:51:40 2007
@@ -283,6 +283,7 @@
 t/mirror/sync-replaced-nocopy.t
 t/mirror/sync-replaced.t
 t/mirror/sync-replicate.t
+t/update-gone.t
 t/svk-sec.gpg
 t/svk.gpg
 utils/extract-docs

Modified: branches/2.0-releng/lib/SVK/Command/Update.pm
==============================================================================
--- branches/2.0-releng/lib/SVK/Command/Update.pm	(original)
+++ branches/2.0-releng/lib/SVK/Command/Update.pm	Wed Mar 14 14:51:40 2007
@@ -155,13 +155,15 @@
 	# something that exist.
 	die loc("Path %1 does not exist.\n", $update_target->depotpath)
 	    unless $xdroot->check_path($cotarget->path);
-
 	$cotarget->anchorify;
-	$update_target->anchorify;
 	# still in the checkout
 	if ($self->{xd}{checkout}->get($cotarget->copath)->{depotpath}) {
+	    $update_target->anchorify;
 	    $kind = $newroot->check_path($update_target->path_anchor);
 	}
+	else {
+	    die loc("Path %1 no longer exists.\n", $update_target->depotpath);
+	}
     }
 
     my $content_revision = $update_target->isa('SVK::Path::View') ?

Added: branches/2.0-releng/t/update-gone.t
==============================================================================
--- (empty file)
+++ branches/2.0-releng/t/update-gone.t	Wed Mar 14 14:51:40 2007
@@ -0,0 +1,19 @@
+#!/usr/bin/perl -w
+use strict;
+use SVK::Test;
+plan tests => 1;
+our $output;
+
+# build another tree to be mirrored ourself
+my ($xd, $svk) = build_test();
+
+my $tree = create_basic_tree ($xd, '//');
+
+my ($copath, $corpath) = get_copath ('update-gone');
+
+$svk->checkout ('//A', $copath);
+
+$svk->rm('//A', -m => 'gone');
+
+is_output($svk, 'update', [$copath],
+	 ['Path //A no longer exists.']);


More information about the svk-commit mailing list