[svk-commit] r3135 - in branches/git-storage/lib/SVK: Root
nobody at bestpractical.com
nobody at bestpractical.com
Wed Nov 5 23:48:56 EST 2008
Author: clsung
Date: Wed Nov 5 23:48:55 2008
New Revision: 3135
Modified:
branches/git-storage/lib/SVK/Root/Git.pm
branches/git-storage/lib/SVK/XD.pm
Log:
- make it create the file and append the real content
Modified: branches/git-storage/lib/SVK/Root/Git.pm
==============================================================================
--- branches/git-storage/lib/SVK/Root/Git.pm (original)
+++ branches/git-storage/lib/SVK/Root/Git.pm Wed Nov 5 23:48:55 2008
@@ -13,7 +13,9 @@
$path = '' unless defined $path;
} else {
$tree = 'refs/heads/master';
- $path = substr($full_path,1);
+# $path = substr($full_path,2);
+ $path = $full_path;
+ $path =~ s#^/##;
}
my ($ref) = $self->depot->run_cmd("show-ref $tree") =~ m/^(.*?) /;
return ($ref, $path);
Modified: branches/git-storage/lib/SVK/XD.pm
==============================================================================
--- branches/git-storage/lib/SVK/XD.pm (original)
+++ branches/git-storage/lib/SVK/XD.pm Wed Nov 5 23:48:55 2008
@@ -1003,18 +1003,17 @@
$dir = $dir->parent;
} while ( $dir ne '.' and $dir ne '..' );
}
- $editor->open_root();
for my $dir (sort keys %dirs) {
my $botan = $editor->add_directory ($dir, '', undef, undef);
for my $file (sort @{$dirs{$dir}}) {
next unless $file;
- $editor->add_file($file, $dir);
-# my $fname = $self->{files}{$_}->filename;
-# my $fh;
-# $edit->add_file ($_)
-# if $self->{added}{$_};
-# open $fh, '<:raw', $fname or die $!;
-# $edit->modify_file ($_, $fh, $self->{md5}{$_});
+ my $botan2 = $editor->add_file($file, $dir);
+ my $glob = $oldroot->file_contents($file);
+ my $handle = $editor->apply_textdelta($file);
+ if ($handle && $#{$handle} >= 0) {
+ SVN::TxDelta::send_stream ($glob, @$handle,undef);
+ }
+ $editor->close_file($botan2);
}
$editor->close_directory($botan);
}
More information about the svk-commit
mailing list