[Bps-public-commit] SD branch, master, updated. 43ddf1d152afa136859fabbdefad67a8d26a3b0a
jesse
jesse at bestpractical.com
Wed May 27 23:06:58 EDT 2009
The branch, master has been updated
via 43ddf1d152afa136859fabbdefad67a8d26a3b0a (commit)
via 1ca629cba73a03b21007bce0c9bae93a09526b87 (commit)
via 27df700f79af4c2630a92ef696125207cc05f3f8 (commit)
from d6da3a5a36ffb438709dca0fa898b57290de2122 (commit)
Summary of changes:
lib/App/SD/ForeignReplica.pm | 17 +++++++++++++++++
lib/App/SD/ForeignReplica/PushEncoder.pm | 12 ++++++------
lib/App/SD/Replica/hm.pm | 2 +-
lib/App/SD/Replica/hm/PushEncoder.pm | 2 +-
4 files changed, 25 insertions(+), 8 deletions(-)
- Log -----------------------------------------------------------------
commit 27df700f79af4c2630a92ef696125207cc05f3f8
Author: Jesse Vincent <jesse at bestpractical.com>
Date: Wed May 27 22:58:17 2009 -0400
Don't do user lookup if no value is supplied to the lookup function
diff --git a/lib/App/SD/Replica/hm.pm b/lib/App/SD/Replica/hm.pm
index c1592c3..3a34e1a 100644
--- a/lib/App/SD/Replica/hm.pm
+++ b/lib/App/SD/Replica/hm.pm
@@ -99,7 +99,7 @@ sub _user_info {
my $self = shift;
my $key = shift;
my $value = shift;
- return undef unless $value;
+ return undef unless defined $value;
my $status = $self->hm->search('User', $key => $value);
die $status->{'error'} unless $status->[0]->{'id'};
return $status->[0];
commit 1ca629cba73a03b21007bce0c9bae93a09526b87
Author: Jesse Vincent <jesse at bestpractical.com>
Date: Wed May 27 23:01:15 2009 -0400
when pushing to hiveminder, accurately capture the current user
diff --git a/lib/App/SD/Replica/hm/PushEncoder.pm b/lib/App/SD/Replica/hm/PushEncoder.pm
index 83eaae4..9a82343 100644
--- a/lib/App/SD/Replica/hm/PushEncoder.pm
+++ b/lib/App/SD/Replica/hm/PushEncoder.pm
@@ -26,7 +26,7 @@ sub integrate_ticket_create {
%{ $self->_recode_props_for_create($change) }
);
- my $hm_user = $self->sync_source->user_info;
+ my $hm_user = $self->sync_source->user_info(email => $self->sync_source->foreign_username);
my @requesters;
if ( $args{'requestor_id'} ) {
commit 43ddf1d152afa136859fabbdefad67a8d26a3b0a
Author: Jesse Vincent <jesse at bestpractical.com>
Date: Wed May 27 23:03:03 2009 -0400
Move the ForeignReplica "should I skip this changeset" logic from change to changeset
diff --git a/lib/App/SD/ForeignReplica.pm b/lib/App/SD/ForeignReplica.pm
index 3f8c665..20ccb3c 100644
--- a/lib/App/SD/ForeignReplica.pm
+++ b/lib/App/SD/ForeignReplica.pm
@@ -3,6 +3,23 @@ use Any::Moose;
use Params::Validate;
extends 'Prophet::ForeignReplica';
+sub integrate_changeset {
+ my $self = shift;
+ my %args = validate(
+ @_,
+ { changeset => { isa => 'Prophet::ChangeSet' },
+ resolver => { optional => 1 },
+ resolver_class => { optional => 1 },
+ resdb => { optional => 1 },
+ conflict_callback => { optional => 1 },
+ reporting_callback => { optional => 1 }
+ }
+ );
+
+ my $changeset = $args{'changeset'};
+ return if $self->last_changeset_from_source( $changeset->original_source_uuid) >= $changeset->original_sequence_no;
+ $self->SUPER::integrate_changeset(%args);
+}
=head2 integrate_change $change $changeset
diff --git a/lib/App/SD/ForeignReplica/PushEncoder.pm b/lib/App/SD/ForeignReplica/PushEncoder.pm
index f10ad4a..1ac01ec 100644
--- a/lib/App/SD/ForeignReplica/PushEncoder.pm
+++ b/lib/App/SD/ForeignReplica/PushEncoder.pm
@@ -16,12 +16,12 @@ sub integrate_change {
# the last changeset our sync source for the original_sequence_no, we can skip it.
# XXX TODO - this logic should be at the changeset level, not the cahnge level, as it applies to all
# changes in the changeset
- #
- return
- if $self->sync_source->app_handle->handle->last_changeset_from_source(
- $changeset->original_source_uuid
- ) >= $changeset->original_sequence_no;
-
+
+# return
+# if $self->sync_source->app_handle->handle->last_changeset_from_source(
+# $changeset->original_source_uuid
+# ) >= $changeset->original_sequence_no;
+#
my $before_integration = time();
eval {
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list