[Bps-public-commit] r11479 - in SVN-PropDB: bin doc
clkao at bestpractical.com
clkao at bestpractical.com
Fri Apr 4 00:29:42 EDT 2008
Author: clkao
Date: Fri Apr 4 00:29:38 2008
New Revision: 11479
Modified:
SVN-PropDB/bin/sd
SVN-PropDB/doc/todo
SVN-PropDB/lib/Prophet/Sync/Source/RT.pm
Log:
- trivial book keeping for push ticket for merge to RT.
- refactor plan
Modified: SVN-PropDB/bin/sd
==============================================================================
--- SVN-PropDB/bin/sd (original)
+++ SVN-PropDB/bin/sd Fri Apr 4 00:29:38 2008
@@ -122,10 +122,21 @@
# Trivial first pass:
# only support pull
-
+ my $url = shift @ARGV;
+ my $source = Prophet::Sync::Source->new( { url => 'file://'.$CLI->handle->repo_path } );
+ my $target = Prophet::Sync::Source->new( { url => $url });
+# my $changesets = $source->new_changesets_for($target);
+ my $changesets = $source->new_changesets_for($target);
+ warn Dumper($changesets); use Data::Dumper;
+
+# handle: record_changeset_integration
+# $self->_record_merge_ticket( $changeset->original_source_uuid, $changeset->original_sequence_no );
+
+ $target->record_changeset_integration( $_->original_source_uuid, $_->original_sequence_no) for @$changesets;
}
+
sub cmd_pull {
my $url = shift @ARGV;
local $ENV{PROPHET_RESOLVER} = 'Prompt';
Modified: SVN-PropDB/doc/todo
==============================================================================
--- SVN-PropDB/doc/todo (original)
+++ SVN-PropDB/doc/todo Fri Apr 4 00:29:38 2008
@@ -1,6 +1,9 @@
Todo
+- refactor Source::integrate_changeset to get the merge ticket and let the source(dst) decide how to record them, rather than having handle does the job
+- also need to send along all merge tickets we have
+
- ::CLI should automatically discover an app's model class based on the type name @done
- Creation of bug tracking model classes @done
@@ -67,8 +70,8 @@
comments RT: comment/correspond
RT: Queue
RT: priority
- RT: initial_priority
- RT: final_priority
+ NO RT: initial_priority
+ NO RT: final_priority
RT: time_estimated
RT: time_worked
RT: time_left
@@ -77,7 +80,7 @@
RT: started
RT: lastupdated
RT: resolved
- RT: told (last user contact)
+ NO RT: told (last user contact)
[csv] RT: links * many
[csv] DependsOn
[csv] DependedOnBy
Modified: SVN-PropDB/lib/Prophet/Sync/Source/RT.pm
==============================================================================
--- SVN-PropDB/lib/Prophet/Sync/Source/RT.pm (original)
+++ SVN-PropDB/lib/Prophet/Sync/Source/RT.pm Fri Apr 4 00:29:38 2008
@@ -109,7 +109,7 @@
)
};
}
- die 'not yet';
+# die 'not yet';
my @results = map { $self->translate_prop_names($_) } sort { $a->original_sequence_no <=> $b->original_sequence_no } @changesets;
return \@results;
}
@@ -464,14 +464,18 @@
sub last_changeset_from_source {
my $self = shift;
- my ($source) = validate_pos( @_, { type => SCALAR } );
- my ( $stream, $pool );
+ my ($source_uuid) = validate_pos( @_, { type => SCALAR } );
- my $filename = join( "/", $self->prophet_handle->db_root, $Prophet::Handle::MERGETICKET_METATYPE, $source );
- my ( $rev_fetched, $props )
- = eval { $self->ra->get_file( $filename, $self->ra->get_latest_revnum, $stream, $pool ); };
- return ( $props->{'last-changeset'} || 0 );
+ use App::Cache;
+ my $cache = App::Cache->new({ ttl => 60*60 }); # la la la
+ return $cache->get($self->uuid.'-'.$source) || 0;
+}
+
+sub record_changeset_integration {
+ my ($self, $source_uuid, $source_seq) = @_;
+ my $cache = App::Cache->new({ ttl => 60*60 }); # la la la
+ return $cache->set($self->uuid.'-'.$source_uuid, $source_seq);
}
sub warp_list_to_old_value {
More information about the Bps-public-commit
mailing list