[Bps-public-commit] r11433 - SVN-PropDB/lib/Prophet/Sync/Source

clkao at bestpractical.com clkao at bestpractical.com
Thu Apr 3 06:14:01 EDT 2008


Author: clkao
Date: Thu Apr  3 06:14:00 2008
New Revision: 11433

Modified:
   SVN-PropDB/lib/Prophet/Sync/Source/RT.pm
   SVN-PropDB/lib/Prophet/Sync/Source/SVN.pm

Log:
give a dummy resdb for source::rt to spin.


Modified: SVN-PropDB/lib/Prophet/Sync/Source/RT.pm
==============================================================================
--- SVN-PropDB/lib/Prophet/Sync/Source/RT.pm	(original)
+++ SVN-PropDB/lib/Prophet/Sync/Source/RT.pm	Thu Apr  3 06:14:00 2008
@@ -5,7 +5,7 @@
 use base qw/Prophet::Sync::Source/;
 use Params::Validate qw(:all);
 use UNIVERSAL::require;
-use RT::Client::REST;
+use RT::Client::REST ();
 
 use Prophet::Handle;
 use Prophet::ChangeSet;
@@ -23,10 +23,16 @@
 
 =cut
 
+use File::Temp 'tempdir';
+
 sub setup {
     my $self = shift;
     $self->rt(RT::Client::REST->new(server => 'http://rt3.fsck.com' ));
     $self->rt->login(username => 'guest', password => 'guest');
+    my $orz = tempdir();
+    $self->{___Orz} = $orz;
+    SVN::Repos::create($orz, undef, undef, undef, undef);
+    $self->ressource( __PACKAGE__->new( { url => "file://$orz", is_resdb => 1 } ) );
 }
 
 sub fetch_resolutions { warn 'no resdb'}
@@ -70,6 +76,12 @@
     return \@results;
 }
 
+sub _find_matching_txns {
+    my $self = shift;
+    my $id = shift;
+    warn "looking for matching txn for $id";
+    return;
+}
 
 sub _find_matching_tickets {
     my $self = shift;

Modified: SVN-PropDB/lib/Prophet/Sync/Source/SVN.pm
==============================================================================
--- SVN-PropDB/lib/Prophet/Sync/Source/SVN.pm	(original)
+++ SVN-PropDB/lib/Prophet/Sync/Source/SVN.pm	Thu Apr  3 06:14:00 2008
@@ -45,7 +45,7 @@
     if ( $self->url =~ /^file:\/\/(.*)$/ ) {
         $self->prophet_handle( Prophet::Handle->new( { repository => $1 } ) );
     }
-    if ( $self->url =~ m/_res$/ ) {
+    if ( $self->is_resdb ) {
 
         # XXX: should probably just point to self
         return;



More information about the Bps-public-commit mailing list