[Bps-public-commit] r11601 - in SVN-PropDB: . doc lib/Prophet lib/Prophet/Sync t

jesse at bestpractical.com jesse at bestpractical.com
Sun Apr 6 19:00:32 EDT 2008


Author: jesse
Date: Sun Apr  6 19:00:31 2008
New Revision: 11601

Added:
   SVN-PropDB/doc/jesse_test_env_setup
Removed:
   SVN-PropDB/lib/Prophet/Sync/
Modified:
   SVN-PropDB/   (props changed)
   SVN-PropDB/MANIFEST
   SVN-PropDB/Makefile.PL
   SVN-PropDB/lib/Prophet/ForeignReplica.pm
   SVN-PropDB/lib/Prophet/Replica.pm
   SVN-PropDB/lib/Prophet/Replica/Hiveminder.pm
   SVN-PropDB/lib/Prophet/Replica/RT.pm
   SVN-PropDB/t/sd-rt.t

Log:
 r29403 at 70-5-147-132:  jesse | 2008-04-06 12:54:17 -1000
 * test cleanups
 * minor changes to simplify an API (turn a generator into a function
 * added a test environment example for jesse
 * extracted a bit of code common to foriegnreplicas


Modified: SVN-PropDB/MANIFEST
==============================================================================
--- SVN-PropDB/MANIFEST	(original)
+++ SVN-PropDB/MANIFEST	Sun Apr  6 19:00:31 2008
@@ -1,4 +1,5 @@
 bin/generalized_sync_n_merge.t
+bin/prophet
 bin/prophet-merge
 bin/prophet-node-create
 bin/prophet-node-delete
@@ -7,7 +8,10 @@
 bin/prophet-node-show
 bin/prophet-node-update
 bin/run_test_yml.pl
+bin/sd
+bin/taste_recipe
 doc/glossary
+doc/jesse_test_env_setup
 doc/notes-on-merging
 doc/repository-layout
 doc/todo
@@ -27,10 +31,21 @@
 lib/Prophet/Conflict.pm
 lib/Prophet/ConflictingChange.pm
 lib/Prophet/ConflictingPropChange.pm
+lib/Prophet/ForeignReplica.pm
 lib/Prophet/Handle.pm
+lib/Prophet/Handle/SVN.pm
 lib/Prophet/HistoryEntry.pm
 lib/Prophet/PropChange.pm
 lib/Prophet/Record.pm
+lib/Prophet/Replica.pm
+lib/Prophet/Replica/Hiveminder.pm
+lib/Prophet/Replica/Hiveminder/PullEncoder.pm
+lib/Prophet/Replica/HTTP.pm
+lib/Prophet/Replica/RT.pm
+lib/Prophet/Replica/RT/PullEncoder.pm
+lib/Prophet/Replica/SVN.pm
+lib/Prophet/Replica/SVN/ReplayEditor.pm
+lib/Prophet/Replica/SVN/Util.pm
 lib/Prophet/Resolver.pm
 lib/Prophet/Resolver/AlwaysSource.pm
 lib/Prophet/Resolver/AlwaysTarget.pm
@@ -38,10 +53,6 @@
 lib/Prophet/Resolver/FromResolutionDB.pm
 lib/Prophet/Resolver/IdenticalChanges.pm
 lib/Prophet/Resolver/Prompt.pm
-lib/Prophet/Sync/Source.pm
-lib/Prophet/Sync/Source/SVN.pm
-lib/Prophet/Sync/Source/SVN/ReplayEditor.pm
-lib/Prophet/Sync/Source/SVN/Util.pm
 lib/Prophet/Test.pm
 lib/Prophet/Test/Arena.pm
 lib/Prophet/Test/Participant.pm
@@ -50,15 +61,27 @@
 MANIFEST			This list of files
 MANIFEST.SKIP
 META.yml
+README
 t/01-dependencies.t
 t/99-pod-coverage.t
 t/99-pod.t
 t/canonicalize.t
+t/create-conflict.t
 t/create.t
+t/delete-delete-conflict.t
+t/export.t
 t/lib/TestApp/Bug.pm
 t/non-conflicting-merge.t
 t/real-conflicting-merge.t
+t/res-conflict-3.t
+t/sd-hm.t
+t/sd-rt-hm.t
+t/sd-rt.t
 t/simple-conflicting-merge.t
+t/simple-push.t
+t/sync-delete-conflict.t
+t/sync-ticket.t
 t/sync_3party.t
 t/use.t
 t/validate.t
+t/validation.t

Modified: SVN-PropDB/Makefile.PL
==============================================================================
--- SVN-PropDB/Makefile.PL	(original)
+++ SVN-PropDB/Makefile.PL	Sun Apr  6 19:00:31 2008
@@ -33,7 +33,7 @@
         'Crazy debugging tools' => [
             -default => 1,
             recommends => 'Devel::Gladiator'
-        ]
+        ],
     'Hiveminder sync' => [
             -default => 0,
             requires => 'Net::Jifty',

Added: SVN-PropDB/doc/jesse_test_env_setup
==============================================================================
--- (empty file)
+++ SVN-PropDB/doc/jesse_test_env_setup	Sun Apr  6 19:00:31 2008
@@ -0,0 +1,5 @@
+export PATH=/usr/bin:$PATH
+export PERL5LIB=/Users/jesse/svk/rt-3.8/lib
+export JIFTY_APP_ROOT=/Users/jesse/svk/hiveminder-trunk/
+export RT_DBA_USER=root
+export RT_DBA_PASSWORD=''

Modified: SVN-PropDB/lib/Prophet/ForeignReplica.pm
==============================================================================
--- SVN-PropDB/lib/Prophet/ForeignReplica.pm	(original)
+++ SVN-PropDB/lib/Prophet/ForeignReplica.pm	Sun Apr  6 19:00:31 2008
@@ -59,5 +59,11 @@
     return ($username, $password);
 }
 
+our $REMOTE_ID_METATYPE = "_remote_id_map";
+
+sub _remote_id_storage {
+    my $self = shift;
+    return $self->state_handle->metadata_storage($REMOTE_ID_METATYPE, 'prophet-uuid')->(@_);
+}
 
 1;

Modified: SVN-PropDB/lib/Prophet/Replica.pm
==============================================================================
--- SVN-PropDB/lib/Prophet/Replica.pm	(original)
+++ SVN-PropDB/lib/Prophet/Replica.pm	Sun Apr  6 19:00:31 2008
@@ -361,8 +361,8 @@
     my $self = shift;
     my (  $other ) = validate_pos(@_, { isa => 'Prophet::Replica'});
     if ($self->db_uuid && $other->db_uuid && $self->db_uuid ne $other->db_uuid) {
-        warn "HEY. You should not be merging between two replicas with different database uuids";
-
+        #warn "HEY. You should not be merging between two replicas with different database uuids";
+        # XXX TODO
     }
 
     return [ 

Modified: SVN-PropDB/lib/Prophet/Replica/Hiveminder.pm
==============================================================================
--- SVN-PropDB/lib/Prophet/Replica/Hiveminder.pm	(original)
+++ SVN-PropDB/lib/Prophet/Replica/Hiveminder.pm	Sun Apr  6 19:00:31 2008
@@ -241,18 +241,12 @@
     return $self->_lookup_remote_id($id)|| $self->uuid_for_url( $self->hm_url . "/task/$id" );
 }
 
-our $REMOTE_ID_METATYPE = "_remote_id_map";
-
-sub _remote_id_storage {
-    my $self = shift;
-    return $self->state_handle->metadata_storage($REMOTE_ID_METATYPE, 'prophet-uuid');
-}
 
 sub _lookup_remote_id {
     my $self = shift;
     my ($id) = validate_pos( @_, 1 );
 
-    return $self->_remote_id_storage->( $self->uuid_for_url( $self->hm_url . "/task/$id" ) );
+    return $self->_remote_id_storage( $self->uuid_for_url( $self->hm_url . "/task/$id" ) );
 }
 
 sub _set_remote_id {
@@ -262,9 +256,7 @@
           remote_id => 1
         }
     );
-    warn "==> doing set remote id $args{remote_id}.........".$self->uuid_for_url( $self->hm_url . "/task/" . $args{'remote_id'} );
-    warn "====> $args{uuid}";
-    return $self->_remote_id_storage->(
+    return $self->_remote_id_storage(
         $self->uuid_for_url( $self->hm_url . "/task/" . $args{'remote_id'} ),
         $args{uuid} );
 }

Modified: SVN-PropDB/lib/Prophet/Replica/RT.pm
==============================================================================
--- SVN-PropDB/lib/Prophet/Replica/RT.pm	(original)
+++ SVN-PropDB/lib/Prophet/Replica/RT.pm	Sun Apr  6 19:00:31 2008
@@ -172,18 +172,11 @@
     return $self->_lookup_remote_id($id)|| $self->uuid_for_url( $self->rt_url . "/ticket/$id" );
 }
 
-our $REMOTE_ID_METATYPE = "_remote_id_map";
-
-sub _remote_id_storage {
-    my $self = shift;
-    return $self->state_handle->metadata_storage($REMOTE_ID_METATYPE, 'prophet-uuid');
-}
-
 sub _lookup_remote_id {
     my $self = shift;
     my ($id) = validate_pos( @_, 1 );
 
-    return $self->_remote_id_storage->( $self->uuid_for_url( $self->rt_url . "/ticket/$id" ) );
+    return $self->_remote_id_storage( $self->uuid_for_url( $self->rt_url . "/ticket/$id" ) );
 }
 
 sub _set_remote_id {
@@ -193,7 +186,7 @@
           remote_id => 1
         }
     );
-    return $self->_remote_id_storage->(
+    return $self->_remote_id_storage(
         $self->uuid_for_url( $self->rt_url . "/ticket/" . $args{'remote_id'} ),
         $args{uuid} );
 }

Modified: SVN-PropDB/t/sd-rt.t
==============================================================================
--- SVN-PropDB/t/sd-rt.t	(original)
+++ SVN-PropDB/t/sd-rt.t	Sun Apr  6 19:00:31 2008
@@ -5,11 +5,12 @@
 # RT_DBA_USER=root RT_DBA_PASSWORD= prove -lv -I/Users/clkao/work/bps/rt-3.7/lib t/sd-rt.t
 use strict;
 
+
 use Test::More;
 eval 'use RT::Test; 1'
     or plan skip_all => 'requires 3.7 to run tests.'.$@;
 
-use Prophet::Test tests => 9;
+eval 'use Prophet::Test tests => 9';
 
 no warnings 'once';
 



More information about the Bps-public-commit mailing list