[svk-commit] r3099 - branches/git-storage/lib/SVK
nobody at bestpractical.com
nobody at bestpractical.com
Sun Oct 26 23:47:32 EDT 2008
Author: clsung
Date: Sun Oct 26 23:47:29 2008
New Revision: 3099
Modified:
branches/git-storage/lib/SVK/XD.pm
Log:
- a quick hack on SVK::XD for git (since this is git branch, the following commits will omit 'git')
Modified: branches/git-storage/lib/SVK/XD.pm
==============================================================================
--- branches/git-storage/lib/SVK/XD.pm (original)
+++ branches/git-storage/lib/SVK/XD.pm Sun Oct 26 23:47:29 2008
@@ -452,6 +452,15 @@
$path = Path::Class::foreign_dir('Unix', $path)->stringify;
my $repospath = $self->{depotmap}{$depot} or die loc("No such depot: %1.\n", $depot);
+ if ($repospath =~ m{\.git/?$}) {
+ require SVK::Path::Git;
+ my $p = SVK::Path::Git->real_new
+ ({ depot => SVK::Depot->new({ repospath => $repospath, depotname => $depot }),
+ commit => 'HEAD',
+ path => $path,
+ } );
+ return ($repospath, $path, $p);
+ }
return ($repospath, $path, $open && _open_repos ($repospath));
}
@@ -469,6 +478,9 @@
sub find_depot {
my ($self, $depotname) = @_;
my $repospath = $self->{depotmap}{$depotname} or die loc("No such depot: %1.\n", $depotname);
+ if ($repospath =~ m{\.git/?$}) {
+ return SVK::Depot->new({ repospath => $repospath, depotname => $depotname });
+ }
return SVK::Depot->new( { depotname => $depotname,
repospath => $repospath,
More information about the svk-commit
mailing list