[Bps-public-commit] r11705 - in sd/trunk: bin lib/App lib/App/SD/Replica

jesse at bestpractical.com jesse at bestpractical.com
Fri Apr 11 22:45:30 EDT 2008


Author: jesse
Date: Fri Apr 11 22:45:29 2008
New Revision: 11705

Modified:
   sd/trunk/bin/sd
   sd/trunk/lib/App/SD.pm
   sd/trunk/lib/App/SD/Replica/Hiveminder.pm
   sd/trunk/lib/App/SD/Replica/RT.pm
   sd/trunk/t/sd-rt-hm.t

Log:
 * update to new Prophet Replica/Handle unification

Modified: sd/trunk/bin/sd
==============================================================================
--- sd/trunk/bin/sd	(original)
+++ sd/trunk/bin/sd	Fri Apr 11 22:45:29 2008
@@ -37,7 +37,7 @@
 
 sub cmd_comments {
     my ($ticket) = @ARGV;
-    my $record = App::SD::Model::Ticket->new( { handle => $CLI->handle } );
+    my $record = App::SD::Model::Ticket->new( { handle => $CLI->app_handle->handle } );
     $record->load( uuid => $ticket );
     print "id: " . $record->uuid . "\n";
     unless (@{$record->comments}) {
@@ -61,7 +61,7 @@
 
 
     local $ENV{PROPHET_RESOLVER} = 'Prompt';
-    my %args =  ( to => $url, from => "svn:file://".$CLI->handle->repo_path );
+    my %args =  ( to => $url, from => "svn:file://".$CLI->app_handle->handle->repo_path );
 
     $CLI->args(\%args);
     $CLI->do_merge();
@@ -86,7 +86,7 @@
 sub cmd_pull {
     my $url = shift @ARGV;
     local $ENV{PROPHET_RESOLVER} = 'Prompt';
-    my %args =  ( from => $url, to => "svn:file://".$CLI->handle->repo_path );
+    my %args =  ( from => $url, to => "svn:file://".$CLI->app_handle->handle->repo_path );
 
     $CLI->args(\%args);
     $CLI->do_merge();

Modified: sd/trunk/lib/App/SD.pm
==============================================================================
--- sd/trunk/lib/App/SD.pm	(original)
+++ sd/trunk/lib/App/SD.pm	Fri Apr 11 22:45:29 2008
@@ -3,6 +3,6 @@
 
 package App::SD;
 
-#use base 'Prophet::App';
+use base 'Prophet::App';
 
 1;

Modified: sd/trunk/lib/App/SD/Replica/Hiveminder.pm
==============================================================================
--- sd/trunk/lib/App/SD/Replica/Hiveminder.pm	(original)
+++ sd/trunk/lib/App/SD/Replica/Hiveminder.pm	Fri Apr 11 22:45:29 2008
@@ -10,7 +10,6 @@
 
 use URI;
 use Memoize;
-use Prophet::Handle;
 use Prophet::ChangeSet;
 use App::SD::Replica::Hiveminder::PullEncoder;
 
@@ -18,7 +17,6 @@
 use constant scheme => 'hm';
 
 
-our $DEBUG = $Prophet::Handle::DEBUG;
 
 =head2 setup
 
@@ -53,8 +51,8 @@
     );
 
     $self->hm_username($username);
-    my $cli = Prophet::CLI->new();
-    $self->state_handle( $cli->get_handle_for_replica( $self, $self->state_db_uuid ) );
+
+    $self->SUPER::setup(@_);
 }
 
 =head2 uuid

Modified: sd/trunk/lib/App/SD/Replica/RT.pm
==============================================================================
--- sd/trunk/lib/App/SD/Replica/RT.pm	(original)
+++ sd/trunk/lib/App/SD/Replica/RT.pm	Fri Apr 11 22:45:29 2008
@@ -9,7 +9,6 @@
 use RT::Client::REST::User ();
 use RT::Client::REST::Ticket;
 use Memoize;
-use Prophet::Handle;
 use Prophet::ChangeSet;
 use App::SD::Replica::RT::PullEncoder;
 
@@ -17,7 +16,6 @@
 
 __PACKAGE__->mk_accessors(qw/rt rt_url rt_queue rt_query/);
 
-our $DEBUG = $Prophet::Handle::DEBUG;
 
 =head1 NOTES ON PUSH
 
@@ -93,8 +91,8 @@
 
     $self->rt->login( username => $username, password => $password );
 
-    my $cli = Prophet::CLI->new();
-    $self->state_handle( $cli->get_handle_for_replica( $self, $self->state_db_uuid ) );
+        $self->SUPER::setup(@_);
+
 }
 
 sub record_pushed_transactions {

Modified: sd/trunk/t/sd-rt-hm.t
==============================================================================
--- sd/trunk/t/sd-rt-hm.t	(original)
+++ sd/trunk/t/sd-rt-hm.t	Fri Apr 11 22:45:29 2008
@@ -118,8 +118,8 @@
     ( $ret, $out, $err ) = run_script( 'sd', [ 'push', $sd_rt_url ] );
 
     ok( $task->load_by_cols( summary => 'Fly Man' ) );
-
-}
+};
+exit(0);
 
 __END__
 



More information about the Bps-public-commit mailing list