[svk-commit] r3118 - in branches/delta-refactor/lib/SVK: Command
nobody at bestpractical.com
nobody at bestpractical.com
Mon Nov 3 08:40:08 EST 2008
Author: clkao
Date: Mon Nov 3 08:40:07 2008
New Revision: 3118
Modified:
branches/delta-refactor/lib/SVK/Command/Diff.pm
branches/delta-refactor/lib/SVK/Delta.pm
branches/delta-refactor/lib/SVK/DeltaOld.pm
Log:
make diff use new delta.
Modified: branches/delta-refactor/lib/SVK/Command/Diff.pm
==============================================================================
--- branches/delta-refactor/lib/SVK/Command/Diff.pm (original)
+++ branches/delta-refactor/lib/SVK/Command/Diff.pm Mon Nov 3 08:40:07 2008
@@ -148,8 +148,6 @@
$target2->run_delta(
$editor,
{
- use_old_delta => 1,
- xdroot => $target2->create_xd_root,
base_root => $oldroot,
base_path => $target->path_anchor,
$self->{recursive} ? () : (depth => 1),
Modified: branches/delta-refactor/lib/SVK/Delta.pm
==============================================================================
--- branches/delta-refactor/lib/SVK/Delta.pm (original)
+++ branches/delta-refactor/lib/SVK/Delta.pm Mon Nov 3 08:40:07 2008
@@ -60,7 +60,9 @@
use base 'SVK::DeltaOld';
-__PACKAGE__->mk_accessors(qw(cb_conflict cb_ignored cb_unchanged cb_resolve_rev cb_unknown));
+__PACKAGE__->mk_accessors(qw(cb_conflict cb_ignored cb_unchanged cb_resolve_rev cb_unknown
+ _compat_xdroot
+ ));
*_node_type = *SVK::DeltaOld::_node_type;
@@ -120,14 +122,17 @@
# objective: move behaviour-related info into $self, and pass around context only
my $source = $target->source;
- my $base_root = $opt->{base_root} || $target->create_xd_root;
+ my $xdroot = $target->create_xd_root; # XXX: shouldn't exist anymore
+ my $base_root = $opt->{base_root} || $xdroot;
my $base_kind = $base_root->check_path($source->path_anchor);
+ $self->_compat_xdroot($xdroot);
+
die "checkout_delta called with non-dir node"
unless $base_kind == $SVN::Node::dir;
my %arg = (
- base_root_is_xd => $opt->{xdroot} ? 0 : 1,
+ base_root_is_xd => $opt->{base_root} ? 0 : 1,
encoder => get_encoder,
kind => $base_kind,
base_kind => $base_kind,
@@ -159,7 +164,7 @@
my $baton = $editor->open_root($rev);
$self->_delta_dir2(
$base_root,
- $target->path_anchor,
+ $opt->{base_path} || $target->path_anchor,
$target, $editor,
{ targets => $source->{targets},
%arg,
@@ -203,7 +208,7 @@
# compat for now
editor => $editor,
- xdroot => $base_root,
+ xdroot => $self->_compat_xdroot,
);
}
@@ -332,6 +337,7 @@
}
my ($type, $st) = _node_type($entry_target->copath);
next unless defined $type;
+
my $delta = $type ? $type eq 'directory' ? '_delta_dir' : '_delta_file'
: $kind == $SVN::Node::file ? '_delta_file' : '_delta_dir';
my $obs = $type ? ($kind == $SVN::Node::dir xor $type eq 'directory') : 0;
@@ -348,7 +354,7 @@
base => !$obs,
depth => defined $arg{depth} ? defined $targets ? $arg{depth} : $arg{depth} - 1: undef,
entry => $newentry,
- kind => $arg{base_root_is_xd} ? $kind : $base_root->check_path ($newpath),
+ kind => $arg{base_root_is_xd} ? $kind : $self->_compat_xdroot->check_path ($newpath),
base_kind => $kind,
targets => $newtarget,
baton => $baton,
@@ -396,9 +402,10 @@
my $entry_target = $target->clone->descend($entry);
my %newpaths = ( entry => defined $arg{entry} ? "$arg{entry}/$entry" : $entry,
targets => $newtarget, base_kind => $SVN::Node::none);
- # XXX: what is this != thing in trinary?
+
$newpaths{kind} = $arg{base_root_is_xd} ? $SVN::Node::none :
- $base_root->check_path($target->path_anchor) != $SVN::Node::none;
+ $self->_compat_xdroot->check_path($entry_target->path_anchor);
+
my ($ccinfo, $sche) = $self->_compose_cinfo($entry_target);
my $add = $sche || $arg{auto_add} || $newpaths{kind};
Modified: branches/delta-refactor/lib/SVK/DeltaOld.pm
==============================================================================
--- branches/delta-refactor/lib/SVK/DeltaOld.pm (original)
+++ branches/delta-refactor/lib/SVK/DeltaOld.pm Mon Nov 3 08:40:07 2008
@@ -515,6 +515,7 @@
targets => $newtarget, base_kind => $SVN::Node::none);
$newpaths{kind} = $arg{base_root_is_xd} ? $SVN::Node::none :
$arg{xdroot}->check_path ($newpaths{path}) != $SVN::Node::none;
+
my ($ccinfo, $sche) = $self->xd->get_entry($newpaths{copath}, 1);
my $add = $sche || $arg{auto_add} || $newpaths{kind};
# If we are not at intermediate path, process ignore
@@ -596,8 +597,8 @@
my %arg = (
base_root => $base_root,
- xdroot => $opt->{xdroot} || $base_root,
- base_root_is_xd => $opt->{xdroot} ? 0 : 1,
+ xdroot => $xdroot,
+ base_root_is_xd => $opt->{base_root} ? 0 : 1,
encoder => get_encoder,
copath => $target->copath,
More information about the svk-commit
mailing list