[prev in list] [next in list] [prev in thread] [next in thread] 

List:       svk-commit
Subject:    [svk-commit] r3099 - branches/git-storage/lib/SVK
From:       nobody () bestpractical ! com
Date:       2008-10-27 3:47:32
Message-ID: 20081027034733.C153263C69E () diesel ! bestpractical ! com
[Download RAW message or body]

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,
_______________________________________________
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