[Bps-public-commit] r11363 - in SVN-PropDB: . lib/Prophet
jesse at bestpractical.com
jesse at bestpractical.com
Tue Apr 1 22:29:44 EDT 2008
Author: jesse
Date: Tue Apr 1 22:29:44 2008
New Revision: 11363
Modified:
SVN-PropDB/ (props changed)
SVN-PropDB/lib/Prophet/Conflict.pm
SVN-PropDB/lib/Prophet/Handle.pm
SVN-PropDB/lib/Prophet/Sync/Source/SVN.pm
Log:
r28943 at 70-5-79-205: jesse | 2008-04-01 16:29:35 -1000
* delete/update conflicts now generate a proper nullification changeset
Modified: SVN-PropDB/lib/Prophet/Conflict.pm
==============================================================================
--- SVN-PropDB/lib/Prophet/Conflict.pm (original)
+++ SVN-PropDB/lib/Prophet/Conflict.pm Tue Apr 1 22:29:44 2008
@@ -191,9 +191,9 @@
my $nullify_conflict = Prophet::Change->new( { node_type => $conflict->node_type, node_uuid => $conflict->node_uuid });
if ( $conflict->file_op_conflict eq "delete_missing_file" ) {
- $nullify_conflict->change_type('create_file');
+ $nullify_conflict->change_type('add_file');
} elsif ( $conflict->file_op_conflict eq "update_missing_file" ) {
- $nullify_conflict->change_type('create_file');
+ $nullify_conflict->change_type('add_file');
} elsif ( $conflict->file_op_conflict eq "create_existing_file" ) {
$nullify_conflict->change_type('delete');
} elsif ( $conflict->file_op_conflict ) {
Modified: SVN-PropDB/lib/Prophet/Handle.pm
==============================================================================
--- SVN-PropDB/lib/Prophet/Handle.pm (original)
+++ SVN-PropDB/lib/Prophet/Handle.pm Tue Apr 1 22:29:44 2008
@@ -155,6 +155,7 @@
my $self = shift;
my $changeset = shift;
+ eval {
my $inside_edit = $self->current_edit ? 1: 0;
$self->begin_edit() unless ($inside_edit);
@@ -162,7 +163,8 @@
$self->current_edit->change_prop( 'prophet:special-type' => 'nullification') if ($changeset->is_nullification);
$self->current_edit->change_prop( 'prophet:special-type' => 'resolution') if ($changeset->is_resolution);
$self->commit_edit() unless ($inside_edit);
-
+ };
+ die ($@) if ($@);
}
sub _set_original_source_metadata {
@@ -199,6 +201,8 @@
type => $change->node_type,
uuid => $change->node_uuid
);
+ } else {
+ Carp::confess(" I have never heard of the change type: ".$change->change_type);
}
my $changed = $self->current_edit->root->paths_changed;
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 Tue Apr 1 22:29:44 2008
@@ -271,7 +271,7 @@
# 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);
-
+
# integrate the original change
$self->prophet_handle->integrate_changeset($changeset);
# integrate the conflict resolution change
More information about the Bps-public-commit
mailing list