[svk-commit] r2342 - in branches/2.0-releng: lib/SVK/Editor t
nobody at bestpractical.com
nobody at bestpractical.com
Wed Mar 14 21:46:01 EDT 2007
Author: clkao
Date: Wed Mar 14 21:46:01 2007
New Revision: 2342
Added:
branches/2.0-releng/t/07smerge-moved.t
Modified:
branches/2.0-releng/MANIFEST
branches/2.0-releng/lib/SVK/Editor/XD.pm
Log:
Merge from trunk:
r2307 at trunk: clkao | 2007-03-04 21:26:03 +0000
Fix a bug in merging moved files.
Submitted by: Daniel Jacobowitz <drow at false.org>
Modified: branches/2.0-releng/MANIFEST
==============================================================================
--- branches/2.0-releng/MANIFEST (original)
+++ branches/2.0-releng/MANIFEST Wed Mar 14 21:46:01 2007
@@ -206,6 +206,7 @@
t/07smerge-incremental.t
t/07smerge-log.t
t/07smerge-mixanchor.t
+t/07smerge-moved.t
t/07smerge-multi.t
t/07smerge-prop.t
t/07smerge-relayed.t
Modified: branches/2.0-releng/lib/SVK/Editor/XD.pm
==============================================================================
--- branches/2.0-releng/lib/SVK/Editor/XD.pm (original)
+++ branches/2.0-releng/lib/SVK/Editor/XD.pm Wed Mar 14 21:46:01 2007
@@ -334,7 +334,7 @@
$editor->{master_editor} = SVK::Editor::Checkout->new(%$self);
if (defined $editor->{target}) {
# XXX: depot_delta can't generate single file fulltext.
- my $handle = $editor->apply_textdelta($editor->{target},
+ my $handle = $editor->apply_textdelta($editor->{target_baton},
$from_root->file_md5_checksum($copyfrom));
if ($handle && $#{$handle} >= 0) {
if ($self->{send_fulltext}) {
Added: branches/2.0-releng/t/07smerge-moved.t
==============================================================================
--- (empty file)
+++ branches/2.0-releng/t/07smerge-moved.t Wed Mar 14 21:46:01 2007
@@ -0,0 +1,33 @@
+#!/usr/bin/perl -w
+use Test::More tests => 1;
+use strict;
+use File::Path;
+use Cwd;
+use SVK::Test;
+
+my ($xd, $svk) = build_test();
+our $output;
+my ($copath, $corpath) = get_copath ('smerge-moved');
+$svk->mkdir ('-m', 'trunk', '//trunk');
+$svk->checkout ('//trunk', $copath);
+my ($repospath, undef, $repos) = $xd->find_repos ('//', 1);
+my $uuid = $repos->fs->get_uuid;
+
+mkdir "$copath/";
+mkdir "$copath/deep";
+overwrite_file ("$copath/foo", "foobar\n");
+$svk->add ("$copath/foo", "$copath/deep");
+$svk->commit ('-m', 'init', "$copath");
+
+$svk->cp ('-m', 'branch', '//trunk', '//local');
+
+$svk->mv ('-m', 'move foo', '//trunk/foo', '//trunk/deep/foo');
+
+($copath, $corpath) = get_copath ('smerge-moved');
+$svk->checkout ('//local', $copath);
+
+is_output ($svk, 'smerge', ['//trunk', $copath],
+ ['Auto-merging (2, 4) /trunk to /local (base /trunk:2).',
+ __("A + $copath/deep/foo"),
+ __("D $copath/foo"),
+ "New merge ticket: $uuid:/trunk:4"]);
More information about the svk-commit
mailing list