[svk-commit] r2294 - trunk/lib/SVK
nobody at bestpractical.com
nobody at bestpractical.com
Thu Jan 25 22:10:02 EST 2007
Author: audreyt
Date: Thu Jan 25 22:10:01 2007
New Revision: 2294
Modified:
trunk/lib/SVK/Path.pm
Log:
* SVK::Path - Add ->node_id() API to avoid a redundant call to ->root()->node_id().
Modified: trunk/lib/SVK/Path.pm
==============================================================================
--- trunk/lib/SVK/Path.pm (original)
+++ trunk/lib/SVK/Path.pm Thu Jan 25 22:10:01 2007
@@ -506,9 +506,7 @@
# XXX: defer to $other->related_to if it is SVK::Path::Checkout,
# when we need to use it.
- return SVN::Fs::check_related
- ($self->root->node_id ($self->path),
- $other->root->node_id ($other->path));
+ return SVN::Fs::check_related($self->node_id, $other->node_id);
}
=head2 copied_from ($want_mirror)
@@ -558,7 +556,7 @@
my ($self, %arg) = @_;
my $root = $self->root;
my @rev = ($arg{start} || 1, $self->revision);
- my $id = $root->node_id($self->path);
+ my $id = $self->node_id;
my $pool = SVN::Pool->new_default;
while ($rev[0] <= $rev[1]) {
@@ -728,6 +726,17 @@
return ($path, $rev);
}
+=head2 node_id ()
+
+Returns the node id of this path object.
+
+=cut
+
+sub node_id {
+ my ($self) = @_;
+ $self->root->node_id($self->path);
+}
+
=head1 SEE ALSO
L<SVK::Path::Checkout>
More information about the svk-commit
mailing list