[svk-commit] r2285 - in trunk: lib/SVK

nobody at bestpractical.com nobody at bestpractical.com
Tue Jan 2 12:42:45 EST 2007


Author: jesse
Date: Tue Jan  2 12:42:44 2007
New Revision: 2285

Modified:
   trunk/   (props changed)
   trunk/lib/SVK/XD.pm

Log:
 r46704 at pinglin:  jesse | 2007-01-02 12:41:57 -0500
 * Noninteractive alternative for create_depots. -- Simon Cozens
 
   I'm currently working on a CMS based on SVK, and need to be able to a lot of
   SVK things non-interactively. At the moment there are a load of get_prompts 
   scattered around the place which makes it difficult to script SVK.
   As I find them, I'm patching around them with non-interactive equivalents.
   Here's one for create_depots. 
   
   Simon 
 


Modified: trunk/lib/SVK/XD.pm
==============================================================================
--- trunk/lib/SVK/XD.pm	(original)
+++ trunk/lib/SVK/XD.pm	Tue Jan  2 12:42:44 2007
@@ -242,17 +242,21 @@
 	    qr/^[yn]/i,
 	);
 	next if $ans =~ /^n/i;
-
-        make_path(dirname($path));
-
-	SVN::Repos::create($path, undef, undef, undef,
-			   {'fs-type' => $ENV{SVNFSTYPE} || 'fsfs',
-			    'bdb-txn-nosync' => '1',
-			    'bdb-log-autoremove' => '1'});
+        $self->_create_depot($path)
     }
     return;
 }
 
+sub _create_depot {
+    my ($self, $path) = @_;
+    make_path(dirname($path));
+
+    SVN::Repos::create($path, undef, undef, undef,
+                       {'fs-type' => $ENV{SVNFSTYPE} || 'fsfs',
+                        'bdb-txn-nosync' => '1',
+                        'bdb-log-autoremove' => '1'});
+}
+
 
 =item store
 


More information about the svk-commit mailing list