[Bps-public-commit] r11790 - in sd/trunk: bin

jesse at bestpractical.com jesse at bestpractical.com
Sat Apr 19 17:29:32 EDT 2008


Author: jesse
Date: Sat Apr 19 17:29:31 2008
New Revision: 11790

Modified:
   sd/trunk/bin/sd
   sd/trunk/t/sd-rt-hm.t

Log:
* Clean up to support prophet changes

Modified: sd/trunk/bin/sd
==============================================================================
--- sd/trunk/bin/sd	(original)
+++ sd/trunk/bin/sd	Sat Apr 19 17:29:31 2008
@@ -1,8 +1,9 @@
 #!/usr/bin/perl 
 use warnings;
 use strict;
+use Carp::Always;
 
-
+$ENV{'PROPHET_REPLICA_TYPE'} ||= 'prophet';
 $ENV{'PROPHET_REPO'} = $ENV{'SD_REPO'} || $ENV{'HOME'}.'/.svb';
 
 use Prophet::CLI;
@@ -61,7 +62,7 @@
 
 
     local $ENV{PROPHET_RESOLVER} = 'Prompt';
-    my %args =  ( to => $url, from => "svn:file://".$CLI->app_handle->handle->repo_path );
+    my %args =  ( to => $url, from => $ENV{'PROPHET_REPLICA_TYPE'}.":file://".$CLI->app_handle->handle->fs_root );
 
     $CLI->args(\%args);
     $CLI->do_merge();
@@ -69,7 +70,7 @@
 
 
 return;
-    my $source = Prophet::Replica->new( { url => 'svn:file://'.$CLI->handle->repo_path } );
+    my $source = Prophet::Replica->new( { url => $ENV{'PROPHET_REPLICA_TYPE'}.':file://'.$CLI->app_handle->fs_root } );
     my $target = Prophet::Replica->new( { url => $url });
 #    my $changesets = $source->new_changesets_for($target);
     my $changesets = $source->new_changesets_for($target);
@@ -86,7 +87,7 @@
 sub cmd_pull {
     my $url = shift @ARGV;
     local $ENV{PROPHET_RESOLVER} = 'Prompt';
-    my %args =  ( from => $url, to => "svn:file://".$CLI->app_handle->handle->repo_path );
+    my %args =  ( from => $url, to => $ENV{'PROPHET_REPLICA_TYPE'}.":file://".$CLI->app_handle->handle->fs_root );
 
     $CLI->args(\%args);
     $CLI->do_merge();
@@ -96,9 +97,6 @@
 =begin comment
     # Trivial first pass:
     
-    # Give a SVN URL to the remote replica? do we need two svn urls (for res db?)
-    
-    
     
 =end comment
 

Modified: sd/trunk/t/sd-rt-hm.t
==============================================================================
--- sd/trunk/t/sd-rt-hm.t	(original)
+++ sd/trunk/t/sd-rt-hm.t	Sat Apr 19 17:29:31 2008
@@ -9,7 +9,7 @@
 use Prophet::Test;
 
 BEGIN {
-    unless (eval 'use RT::Test; 1') {
+    unless (eval 'use RT::Test (); 1') {
         diag $@;
         plan skip_all => 'requires 3.7 to run tests.';
     }



More information about the Bps-public-commit mailing list