[Bps-public-commit] r14434 - in Pushmi/trunk: lib/Pushmi

alexmv at bestpractical.com alexmv at bestpractical.com
Wed Jul 23 13:27:04 EDT 2008


Author: alexmv
Date: Wed Jul 23 13:27:02 2008
New Revision: 14434

Modified:
   Pushmi/trunk/   (props changed)
   Pushmi/trunk/lib/Pushmi/Mirror.pm

Log:
 r34564 at kohr-ah:  chmrr | 2008-07-23 13:21:50 -0400
  * Cache the repos object on the mirror


Modified: Pushmi/trunk/lib/Pushmi/Mirror.pm
==============================================================================
--- Pushmi/trunk/lib/Pushmi/Mirror.pm	(original)
+++ Pushmi/trunk/lib/Pushmi/Mirror.pm	Wed Jul 23 13:27:02 2008
@@ -25,6 +25,7 @@
 
 sub repos {
     my $self = shift;
+    return $self->{repos} if $self->{repos};
     my %args = ( create => 0, @_ );
     my $repos;
     if ( -e $self->path ) {
@@ -36,7 +37,7 @@
     } else {
         die "Repository @{[$self->path]} doesn't exist; won't create\n";
     }
-    return $repos;
+    return $self->{repos} = $repos;
 }
 
 sub root_svkpath {



More information about the Bps-public-commit mailing list