[Bps-public-commit] r11561 - in SVN-PropDB: . doc lib/Prophet lib/Prophet/Replica/Hiveminder t

jesse at bestpractical.com jesse at bestpractical.com
Sat Apr 5 21:36:48 EDT 2008


Author: jesse
Date: Sat Apr  5 21:36:47 2008
New Revision: 11561

Modified:
   SVN-PropDB/   (props changed)
   SVN-PropDB/doc/todo
   SVN-PropDB/lib/Prophet/Handle.pm
   SVN-PropDB/lib/Prophet/Replica/Hiveminder.pm
   SVN-PropDB/lib/Prophet/Replica/Hiveminder/PullEncoder.pm
   SVN-PropDB/t/sd-hm.t

Log:
 r29295 at 31b:  jesse | 2008-04-05 15:30:06 -1000
 * Fixing some of the ticket url bugs


Modified: SVN-PropDB/doc/todo
==============================================================================
--- SVN-PropDB/doc/todo	(original)
+++ SVN-PropDB/doc/todo	Sat Apr  5 21:36:47 2008
@@ -1,18 +1,5 @@
 Todo Saturday
 
-    - get a state_db exposed within the ::ForeignReplica driver
-    - replace app::cache with state dbs
-    
-      - multiple Prophet::Handle can point to the same repo_handle but with different db_root
-      - repo_handle should be the actual storage layer
-        - current use of repo_handle
-          - prophet::record: get_logs/youngest_rev/reivision_root/node_proplist
-          - prophet::handle: revision_root, current_edit
-          - prophet::test : youngest_rev
-          - move {begin,end}_edit, node* methods into repo handler (Prophet::Handle::SVN) ? @done 
-        - refactoring _record_merge_ticket into _record_random_metadata so can be reused for state/txn/etc cache
-  
-    
     - implement a simple Prophet::Replica::Hiveminder for "personal tasks only"
     - write tests for RT-prophet-prophet-RT sync
     

Modified: SVN-PropDB/lib/Prophet/Handle.pm
==============================================================================
--- SVN-PropDB/lib/Prophet/Handle.pm	(original)
+++ SVN-PropDB/lib/Prophet/Handle.pm	Sat Apr  5 21:36:47 2008
@@ -202,10 +202,4 @@
 }
 
 
-
-use YAML::Syck;
-
-package YAML;
-*Dump = *YAML::Syck::Dump;
-
 1;

Modified: SVN-PropDB/lib/Prophet/Replica/Hiveminder.pm
==============================================================================
--- SVN-PropDB/lib/Prophet/Replica/Hiveminder.pm	(original)
+++ SVN-PropDB/lib/Prophet/Replica/Hiveminder.pm	Sat Apr  5 21:36:47 2008
@@ -165,7 +165,7 @@
 
 sub uuid_for_remote_id {
     my ( $self, $id ) = @_;
-    return $self->_lookup_remote_id($id)|| $self->uuid_for_url( $self->hm_url . "/ticket/$id" );
+    return $self->_lookup_remote_id($id)|| $self->uuid_for_url( $self->hm_url . "/task/$id" );
 }
 
 our $REMOTE_ID_METATYPE = "_remote_id_map";
@@ -179,7 +179,7 @@
     my $self = shift;
     my ($id) = validate_pos( @_, 1 );
 
-    return $self->_remote_id_storage->( $self->uuid_for_url( $self->hm_url . "/ticket/$id" ) );
+    return $self->_remote_id_storage->( $self->uuid_for_url( $self->hm_url . "/task/$id" ) );
 }
 
 sub _set_remote_id {
@@ -190,7 +190,7 @@
         }
     );
     return $self->_remote_id_storage->(
-        $self->uuid_for_url( $self->hm_url . "/ticket/" . $args{'remote_id'} ),
+        $self->uuid_for_url( $self->hm_url . "/task/" . $args{'remote_id'} ),
         $args{uuid} );
 }
 

Modified: SVN-PropDB/lib/Prophet/Replica/Hiveminder/PullEncoder.pm
==============================================================================
--- SVN-PropDB/lib/Prophet/Replica/Hiveminder/PullEncoder.pm	(original)
+++ SVN-PropDB/lib/Prophet/Replica/Hiveminder/PullEncoder.pm	Sat Apr  5 21:36:47 2008
@@ -22,7 +22,8 @@
 
     my $previous_state = $args{'task'};
     for my $txn ( sort { $b->{'id'} <=> $a->{'id'} } @{ $args{'transactions'} } ) {
-
+        warn "Our task is ".$args{'task'}->{id};
+        warn "Our transaction type is ". $txn->{'type'};
         my $changeset = Prophet::ChangeSet->new(
             {   original_source_uuid => $self->sync_source->uuid,
                 original_sequence_no => $txn->{'id'},
@@ -31,11 +32,10 @@
         # In Hiveminder, a changeset has only one change 
         my $change = Prophet::Change->new( {   node_type   => 'ticket',
             node_uuid   => $self->sync_source->uuid_for_remote_id( $args{'previous_state'}->{'id'} ),
-            change_type => ($txn->{type} eq 'create' ? 'add_file' :'update_file' )
+            change_type => ( $txn->{type} eq 'create' ? 'add_file' : 'update_file' )
 
         }
         );
-        warn "We're not yet detecting create vs update vs delete";
         $changeset->add_change({ change => $change});
         foreach my $entry ( @{ $txn->{'history_entries'} } ) {
             # Each of these entries is essentially a propchange

Modified: SVN-PropDB/t/sd-hm.t
==============================================================================
--- SVN-PropDB/t/sd-hm.t	(original)
+++ SVN-PropDB/t/sd-hm.t	Sat Apr  5 21:36:47 2008
@@ -12,6 +12,13 @@
 }
 
 # you need to run this test script from the BTDT directory
+BEGIN {
+    require File::Temp;
+    $ENV{'PROPHET_REPO'} = $ENV{'SVB_REPO'} =
+        File::Temp::tempdir( CLEANUP => 0).'/_svb';
+    warn $ENV{'PROPHET_REPO'};
+}
+
 
 eval 'use BTDT::Test; 1;' or die "$@";
 



More information about the Bps-public-commit mailing list