[Bps-public-commit] r11427 - in SVN-PropDB: . doc

jesse at bestpractical.com jesse at bestpractical.com
Thu Apr 3 04:31:34 EDT 2008


Author: jesse
Date: Thu Apr  3 04:31:30 2008
New Revision: 11427

Modified:
   SVN-PropDB/   (props changed)
   SVN-PropDB/doc/todo
   SVN-PropDB/t/simple-push.t

Log:
 r29041 at 68-247-224-106:  jesse | 2008-04-02 22:31:06 -1000
 * now tests bob's pre-merge state


Modified: SVN-PropDB/doc/todo
==============================================================================
--- SVN-PropDB/doc/todo	(original)
+++ SVN-PropDB/doc/todo	Thu Apr  3 04:31:30 2008
@@ -3,18 +3,47 @@
 
 
 -  ::CLI should automatically discover an app's model class based on the type name
-
 - Creation of bug tracking model classes
-
-
-
 - validation on bug tracker fields (status/severity)
 
 - ability to add comments to a bug (visible history entries)
+    - relations between models
+    - maybe long-prop edits
 
 - push to a remote prophet
+    - find out what the remote _would_ pull by inspecting its merge tickets on 
+            - current replica
+        - once we do that, we can find out who _we_ have synced from after that point, right? Then we want:
+            - anyone we have a merge ticket for _since_ the last time the other party saw us.
+            
+    - bundle all changesets newer than that which we know the other party hasn't seen up as a serialized structure (FeedSync? Storable ;)?)
+    - send them to remote to "pull from textfile
+    - nobu
+
 - pull from a remote RT by url and query
+    - get RT to give us a list of ticket records matching our query
+    - get rt ro give us a list of history entries on those ticket records
+    - be able to tell RT to only give us history entries newer than the $DATE of RT history entry with ID #1234 (which is the sequence number we used for the merge ticket from the remote RT).
+
+    - massage this crap into a sequence of prophet changesets
+    - apply.
+    - rt id & record uuid bidirectional mapping how?
+        - uuid as a link?
+        - get rt to store uuid on all tickets at create time?
+            - jesse thinks rt should do this anyway
+
+- issues:
+    - how do we validate RT queues?
+    - how do we deal with RT rejecting a commit because the committer doesn't have acls?
+    - how do we map random remote sd users to rt users?
+    
+
 - push to a remote RT
+    - get the remote RT to give us its merge tickets ?!
+    - for every txn RT hasn't seen, send the txn to remote.
+    - if it's a record-create, we need to do some clever mapping.
+        "find an RT ticket with the uuid $UUID"
+        map that back to local
 
 - Replace this todo list with a svb database
 - elegant support for large attachments

Modified: SVN-PropDB/t/simple-push.t
==============================================================================
--- SVN-PropDB/t/simple-push.t	(original)
+++ SVN-PropDB/t/simple-push.t	Thu Apr  3 04:31:30 2008
@@ -30,7 +30,64 @@
 my $bob = Prophet::Sync::Source->new( { url => repo_uri_for('bob') } );
 
 my $changesets = $bob->new_changesets_for($alice);
-warn Dumper($changesets); use Data::Dumper;
+
+my $openbug = '';
+as_bob {
+    my ($ret,$stdout,$stderr) = run_script('prophet-node-search' ,[qw(--type Bug --regex open)]);
+    if ($stdout =~ /^(.*?)\s/) {
+        $openbug= $1;
+    }
+};
+
+
+is_deeply( [map { $_->as_hash} @$changesets],
+[
+          {
+            'sequence_no' => 1,
+            'original_sequence_no' => 1,
+            'is_empty' => 1,
+            'is_nullification' => undef,
+            'original_source_uuid' => replica_uuid_for('bob'),
+            'is_resolution' => undef,
+            'source_uuid' => replica_uuid_for('bob')
+          },
+          {
+            'sequence_no' => 2,
+            'original_sequence_no' => 2,
+            'is_empty' => 1,
+            'is_nullification' => undef,
+            'original_source_uuid' => replica_uuid_for('bob'),
+            'is_resolution' => undef,
+            'source_uuid' => replica_uuid_for('bob')
+          },
+          {
+            'sequence_no' => 3,
+            'original_sequence_no' => 3,
+            'original_source_uuid' => replica_uuid_for('bob'),
+            'is_resolution' => undef,
+            'source_uuid' => replica_uuid_for('bob'),
+            'changes' => {
+                           $openbug => {
+                                                                       'change_type' => 'add_file',
+                                                                       'prop_changes' => {
+                                                                                           'from' => {
+                                                                                                       'new_value' => 'bob',
+                                                                                                       'old_value' => undef
+                                                                                                     },
+                                                                                           'status' => {
+                                                                                                         'new_value' => 'open',
+                                                                                                         'old_value' => undef
+                                                                                                       }
+                                                                                         },
+                                                                       'node_type' => 'Bug'
+                                                                     }
+                         },
+            'is_nullification' => undef,
+            'is_empty' => 0
+          }
+        ]);
+# Alice syncs
+
 
 as_alice {
 



More information about the Bps-public-commit mailing list