[svk-commit] r2182 - in trunk/lib/SVK: .
clkao at bestpractical.com
clkao at bestpractical.com
Sun Nov 19 04:41:06 EST 2006
Author: clkao
Date: Sun Nov 19 04:41:05 2006
New Revision: 2182
Modified:
trunk/lib/SVK/Command/Commit.pm
trunk/lib/SVK/Path.pm
trunk/lib/SVK/Util.pm
Log:
Remove more code supporting svn < 1.3.0.
Modified: trunk/lib/SVK/Command/Commit.pm
==============================================================================
--- trunk/lib/SVK/Command/Commit.pm (original)
+++ trunk/lib/SVK/Command/Commit.pm Sun Nov 19 04:41:05 2006
@@ -14,7 +14,7 @@
use SVK::Editor::InteractiveStatus;
use SVK::Util qw( get_buffer_from_editor slurp_fh read_file
- tmpfile abs2rel find_prev_copy from_native to_native
+ tmpfile abs2rel from_native to_native
get_encoder get_anchor );
use Class::Autouse qw( SVK::Editor::Rename SVK::Editor::Merge );
Modified: trunk/lib/SVK/Path.pm
==============================================================================
--- trunk/lib/SVK/Path.pm (original)
+++ trunk/lib/SVK/Path.pm Sun Nov 19 04:41:05 2006
@@ -3,7 +3,7 @@
use SVK::Version; our $VERSION = $SVK::VERSION;
use SVK::I18N;
use autouse 'SVK::Util' => qw( get_anchor catfile abs2rel
- IS_WIN32 find_prev_copy get_depot_anchor );
+ IS_WIN32 get_depot_anchor );
use Class::Autouse qw(SVK::Editor::Dynamic SVK::Editor::TxnCleanup);
use SVN::Delta;
Modified: trunk/lib/SVK/Util.pm
==============================================================================
--- trunk/lib/SVK/Util.pm (original)
+++ trunk/lib/SVK/Util.pm Sun Nov 19 04:41:05 2006
@@ -10,7 +10,6 @@
get_encoding get_encoder from_native to_native
find_svm_source traverse_history
- find_prev_copy
read_file write_file slurp_fh md5_fh bsd_glob mimetype mimetype_is_text
is_binary_file
@@ -859,57 +858,6 @@
return $rv;
}
-=head3 find_prev_copy ($fs, $rev)
-
-Find the revision of the nearest copy in a repository that is less or
-equal to C<$rev>. Returns the found revision number, and a hash of
-arrayref that contains copied paths and its source found in that
-revision.
-
-=cut
-
-sub _copies_in_root {
- my ($root) = @_;
- my $copies;
- my $changed = $root->paths_changed;
- my $pool = SVN::Pool->new_default;
- for (keys %$changed) {
- $pool->clear;
- next if $changed->{$_}->change_kind == $SVN::Fs::PathChange::delete;
- my ($copyfrom_rev, $copyfrom_path) = $root->copied_from ($_);
- $copies->{$_} = [$copyfrom_rev, $copyfrom_path]
- if defined $copyfrom_path;
- }
- return $copies;
-}
-
-sub find_prev_copy {
- my ($fs, $endrev, $ppool) = @_;
- my $pool = SVN::Pool->new_default;
- # hold this resulting root in the subpool of ppool.
- my $spool = $ppool ? SVN::Pool::create ($$ppool) : $pool;
- my ($rev, $startrev) = ($endrev, $endrev);
- my ($root, $copy);
- while ($rev > 0) {
- $pool->clear;
- SVN::Pool::apr_pool_clear ($spool) if $ppool;
- if (defined (my $cache = $fs->revision_prop ($rev, 'svk:copy_cache_prev'))) {
- $startrev = $rev + 1;
- $rev = $cache;
- last if $rev == 0;
- }
- $root = $fs->revision_root ($rev, $spool);
- if ($copy = _copies_in_root ($root)) {
- last;
- }
- --$rev; --$startrev;
- }
- $fs->change_rev_prop ($_, 'svk:copy_cache_prev', $rev), $pool->clear
- for $startrev..$endrev;
- return unless $rev;
- return ($root, $copy);
-}
-
sub reformat_svn_date {
my ($format, $svn_date) = @_;
return time2str($format, str2time($svn_date));
More information about the svk-commit
mailing list