[svk-commit] r3107 - in branches/git-storage/lib/SVK: Depot
nobody at bestpractical.com
nobody at bestpractical.com
Thu Oct 30 02:34:28 EDT 2008
Author: clkao
Date: Thu Oct 30 02:34:28 2008
New Revision: 3107
Modified:
branches/git-storage/lib/SVK/Depot/Git.pm
branches/git-storage/lib/SVK/Root/Git.pm
Log:
run_cmd in depot::git.
Modified: branches/git-storage/lib/SVK/Depot/Git.pm
==============================================================================
--- branches/git-storage/lib/SVK/Depot/Git.pm (original)
+++ branches/git-storage/lib/SVK/Depot/Git.pm Thu Oct 30 02:34:28 2008
@@ -8,4 +8,9 @@
Carp::confess "should not access git depot repos";
}
+sub run_cmd {
+ my $self = shift;
+ return `git --git-dir @{[ $self->repospath ]} @_`;
+}
+
1;
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 Thu Oct 30 02:34:28 2008
@@ -5,11 +5,12 @@
sub _get_path {
my ($self, $full_path) = @_;
- my $refs = [ map { m/.*? (.*)/ } `git --git-dir @{[ $self->depot->repospath ]} show-ref` =~ m/^.*$/mg ];
+ my $refs = [ map { m/.*? (.*)/ }
+ $self->depot->run_cmd('show-ref') =~ m/^.*$/mg ];
my $re = join('|', @$refs);
if (my ($tree, $path) = $full_path =~ m{^/($re)(?:/(.*))?$}) {
$path = '' unless defined $path;
- my ($ref) = `git --git-dir @{[ $self->depot->repospath ]} show-ref $tree` =~ m/^(.*?) /;
+ my ($ref) = $self->depot->run_cmd("show-ref $tree") =~ m/^(.*?) /;
return ($ref, $path);
}
}
More information about the svk-commit
mailing list