[prev in list] [next in list] [prev in thread] [next in thread]
List: svk-commit
Subject: [svk-commit] r3107 - in branches/git-storage/lib/SVK: Depot
From: nobody () bestpractical ! com
Date: 2008-10-30 6:34:28
Message-ID: 20081030063428.BCE6E4DCE5A () diesel ! bestpractical ! com
[Download RAW message or body]
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);
}
}
_______________________________________________
svk-commit mailing list
svk-commit@bestpractical.com
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/svk-commit
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic