[Bps-public-commit] r11488 - in SVN-PropDB/lib/Prophet/Sync: Source

clkao at bestpractical.com clkao at bestpractical.com
Fri Apr 4 04:12:29 EDT 2008


Author: clkao
Date: Fri Apr  4 04:12:28 2008
New Revision: 11488

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

Log:
move record_changeset and friends to to Source::SVN rather than
calling to prophet_handle directly from ::Source.


Modified: SVN-PropDB/lib/Prophet/Sync/Source.pm
==============================================================================
--- SVN-PropDB/lib/Prophet/Sync/Source.pm	(original)
+++ SVN-PropDB/lib/Prophet/Sync/Source.pm	Fri Apr  4 04:12:28 2008
@@ -91,6 +91,7 @@
     }
 }
 
+
 =head2 integrate_changeset L<Prophet::ChangeSet>
 
 If there are conflicts, generate a nullification change, figure out a conflict resolution and apply the nullification, original change and resolution all at once (as three separate changes).
@@ -145,26 +146,38 @@
 
      # IMPORTANT: these should be an atomic unit. dying here would be poor.  BUT WE WANT THEM AS THREEDIFFERENT SVN REVS
      # integrate the nullification change
-        $self->prophet_handle->record_changeset( $conflict->nullification_changeset );
+        $self->record_changeset( $conflict->nullification_changeset );
 
         # integrate the original change
-        $self->prophet_handle->integrate_changeset($changeset);
+        $self->record_integration_changeset($changeset);
 
         # integrate the conflict resolution change
-        $self->prophet_handle->record_resolutions( $conflict->resolution_changeset,
-            $self->ressource ? $self->ressource->prophet_handle : $self->prophet_handle );
+        $self->record_resolutions( $conflict->resolution_changeset );
+#            $self->ressource ? $self->ressource->prophet_handle : $self->prophet_handle );
 		$args{'reporting_callback'}->( changeset => $changeset, conflict => $conflict   ) 		if ($args{'reporting_callback'}) ;
 
 
     } else {
-        $self->prophet_handle->integrate_changeset($changeset);
+        $self->record_integration_changeset($changeset);
 		$args{'reporting_callback'}->( changeset => $changeset   ) 		if ($args{'reporting_callback'}) ;
 
 
     }
+}
 
+=head2 record_changeset
+=cut
 
+sub record_changeset {
+	die ref($_[0]).' must implement record_changeset';
+}
+
+=head2 record_integration_changeset
+
+=cut
 
+sub record_integration_changeset {
+	die ref($_[0]).' must implement record_changeset';
 }
 
 

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	Fri Apr  4 04:12:28 2008
@@ -170,4 +170,20 @@
 }
 
 
+sub record_integration_changeset {
+	my $self = shift;
+	$self->prophet_handle->integrate_changeset(@_);
+}
+
+sub record_changeset {
+	my $self = shift;
+	$self->prophet_handle->record_changeset(@_);
+}
+
+sub record_resolutions {
+	my $self = shift;
+	$self->prophet_handle->record_resolutions(@_,
+	            $self->ressource ? $self->ressource->prophet_handle : $self->prophet_handle );
+}
+
 1;



More information about the Bps-public-commit mailing list