[Bps-public-commit] r15343 - in sd/branches/debbugs/lib/App/SD/Replica: .
jesse at bestpractical.com
jesse at bestpractical.com
Thu Aug 21 16:49:44 EDT 2008
Author: jesse
Date: Thu Aug 21 16:49:43 2008
New Revision: 15343
Modified:
sd/branches/debbugs/lib/App/SD/Replica/debbugs.pm
sd/branches/debbugs/lib/App/SD/Replica/debbugs/PullEncoder.pm
sd/branches/debbugs/lib/App/SD/Replica/debbugs/PushEncoder.pm
Log:
* removing some redundant code from the debbugs thing
Modified: sd/branches/debbugs/lib/App/SD/Replica/debbugs.pm
==============================================================================
--- sd/branches/debbugs/lib/App/SD/Replica/debbugs.pm (original)
+++ sd/branches/debbugs/lib/App/SD/Replica/debbugs.pm Thu Aug 21 16:49:43 2008
@@ -1,6 +1,6 @@
package App::SD::Replica::debbugs;
use Moose;
-extends qw/Prophet::ForeignReplica/;
+extends qw/App::SD::ForeignReplica/;
use Params::Validate qw(:all);
use Memoize;
@@ -11,7 +11,7 @@
# FIXME: what should this actually be?
has debbugs => ( isa => 'Net::Debbugs', is => 'rw');
-has debbugs_url => ( isa => 'Str', is => 'rw');
+has remote_url => ( isa => 'Str', is => 'rw');
has debbugs_query => ( isa => 'Str', is => 'rw');
sub setup {
@@ -25,35 +25,9 @@
# ...
}
-sub prophet_has_seen_transaction {
- goto \&App::SD::Replica::RT::prophet_has_seen_transaction;
-}
-
-sub record_pushed_transaction {
- goto \&App::SD::Replica::RT::record_pushed_transaction;
-}
-
sub record_pushed_transactions {}
-sub remote_id_for_uuid {
- my ( $self, $uuid_for_remote_id ) = @_;
-
-
- # XXX: should not access CLI handle
- my $ticket = Prophet::Record->new(
- handle => Prophet::CLI->new->app_handle->handle,
- type => 'ticket'
- );
- $ticket->load( uuid => $uuid_for_remote_id );
- my $id = $ticket->prop( $self->uuid . '-id' );
- return $id;
-}
-
-sub uuid_for_remote_id {
- my ( $self, $id ) = @_;
- return $self->_lookup_uuid_for_remote_id($id) ||
- $self->uuid_for_url( $self->remote_url . "/ticket/$id" );
-}
+# XXX record_pushed_tikcet should go up to the base class
sub record_pushed_ticket {
my $self = shift;
Modified: sd/branches/debbugs/lib/App/SD/Replica/debbugs/PullEncoder.pm
==============================================================================
--- sd/branches/debbugs/lib/App/SD/Replica/debbugs/PullEncoder.pm (original)
+++ sd/branches/debbugs/lib/App/SD/Replica/debbugs/PullEncoder.pm Thu Aug 21 16:49:43 2008
@@ -59,23 +59,6 @@
memoize 'resolve_user_id_to_email';
-=head2 warp_list_to_old_value CURRENT_VALUE, ADD, DEL
-
-Both RT and Hiveminder use this, but what's it actually for?
-
-=cut
-
-sub warp_list_to_old_value {
- my $self = shift;
- my $current_value = shift ||'';
- my $add = shift;
- my $del = shift;
-
- my @new = grep { defined } split( /\s*,\s*/, $current_value );
- my @old = (grep { defined $_ && $_ ne $add } @new, $del ) || ();
- return join( ", ", @old );
-}
-
=head2 find_matching_tickets QUERY
=cut
Modified: sd/branches/debbugs/lib/App/SD/Replica/debbugs/PushEncoder.pm
==============================================================================
--- sd/branches/debbugs/lib/App/SD/Replica/debbugs/PushEncoder.pm (original)
+++ sd/branches/debbugs/lib/App/SD/Replica/debbugs/PushEncoder.pm Thu Aug 21 16:49:43 2008
@@ -5,7 +5,7 @@
use Path::Class;
has sync_source =>
- ( isa => 'App::SD::Replica::Debbugs',
+ ( isa => 'App::SD::Replica::debbugs',
is => 'rw');
=head2 integrate_change L<Prophet::Change>, L<Prophet::ChangeSet>
More information about the Bps-public-commit
mailing list