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

jesse at bestpractical.com jesse at bestpractical.com
Mon Mar 31 19:51:40 EDT 2008


Author: jesse
Date: Mon Mar 31 19:51:39 2008
New Revision: 11312

Modified:
   SVN-PropDB/   (props changed)
   SVN-PropDB/doc/todo
   SVN-PropDB/lib/Prophet/Change.pm
   SVN-PropDB/t/simple-conflicting-merge.t

Log:
 r28861 at 72-58-70-140:  jesse | 2008-03-31 13:50:18 -1000
 * test cleanups


Modified: SVN-PropDB/doc/todo
==============================================================================
--- SVN-PropDB/doc/todo	(original)
+++ SVN-PropDB/doc/todo	Mon Mar 31 19:51:39 2008
@@ -1,11 +1,63 @@
+alice: status: new
+bob: sync from alice
+bob: new->stalled
+alice: new->open
+bob: sync from alice
+bob: CONFLICT
+bob: resolve in favor of "open"
+bob: write resolution (as r3): OPEN IS BETTER
+bob: nullify stalled->new
+bob: record new->open
+alice: sync from bob
+alice: gets resolution
+alice: 
+    
+
+
+
+
+
+
+
+
+Serializing a conflict resolution
+
+we have a record in
+Data we must record:
+    * md5 of neutralized conflict
+    * each prop that might conflict
+        * possible resolutions
+        * chosen resolution
+
+
+/_prophet/conflict_resolutions/851bd6a627b419cfb815d008c8e7c3a8 (md5)
+    _meta: delete-file
+    or 
+    _meta: update-file
+    
+
+--- !!perl/hash:Prophet::ConflictingChange 
+change_type: update_file
+file_op_conflict: ''
+node_type: Bug
+node_uuid: 6B865DF2-FF6C-11DC-9FF9-6E0949FE7D50
+prop_conflicts: 
+  - !!perl/hash:Prophet::ConflictingPropChange 
+    choices: 
+      - open
+      - stalled
+    name: status
+    source_old_value: new
+target_node_exists: 1
+
+status: open
+status-options: new, open
+foo: bar
 
 
 Todo
 
-- implement merge of conflicts with: "local always wins"
 - prompt for resolution of conflicts
-- record conflict resolution data 
-- reuse conflict resolution data on repeated resolve
 - ability to 'pull' conflicting updates from a remote db
 - handle conflicting conflict resolutions
 
@@ -26,4 +78,7 @@
 
 - naive support for large attachments
 - ability to pull non-conflicting updates from a remote db
+- implement merge of conflicts with: "local always wins"
+- record conflict resolution data 
+- reuse conflict resolution data on repeated resolve
 

Modified: SVN-PropDB/lib/Prophet/Change.pm
==============================================================================
--- SVN-PropDB/lib/Prophet/Change.pm	(original)
+++ SVN-PropDB/lib/Prophet/Change.pm	Mon Mar 31 19:51:39 2008
@@ -40,7 +40,6 @@
 
 sub prop_changes {
     my $self = shift;
-    Carp::cluck unless $self->{prop_changes};
     return @{$self->{prop_changes} || []};
 }
 

Modified: SVN-PropDB/t/simple-conflicting-merge.t
==============================================================================
--- SVN-PropDB/t/simple-conflicting-merge.t	(original)
+++ SVN-PropDB/t/simple-conflicting-merge.t	Mon Mar 31 19:51:39 2008
@@ -27,7 +27,6 @@
     if ( $out =~ /^(.*?)\s./ ) {
         $record_id = $1;
     }
-    diag($record_id);
 
     run_ok( 'prophet-node-update', [ '--type', 'Bug', '--uuid', $record_id, '--status' => 'stalled' ] );
     run_output_matches(
@@ -134,10 +133,6 @@
     # these aren't available yet in the memory-version
     $applied_as_hash->{$_} = undef for qw(sequence_no source_uuid original_source_uuid original_sequence_no);
     is_deeply( $applied_as_hash, $null_as_hash );
-    warn YAML::Dump($applied_as_hash);
-    
-    warn YAML::Dump($null_as_hash);
-    
 
     # is the most recent change:
     my $from_alice = shift @changesets;
@@ -145,7 +140,6 @@
     my $from_alice_as_hash = $from_alice->as_hash;
 
     $from_alice_as_hash->{$_} = undef for qw(sequence_no source_uuid);
-    warn YAML::Dump($from_alice_as_hash);use YAML;
     is_deeply(
         $from_alice_as_hash,
         {   is_empty             => 0,



More information about the Bps-public-commit mailing list