[svk-devel] [PATCH] better progress information for sync

Jonathan Rockway jon at jrock.us
Tue Dec 19 11:36:48 EST 2006


Michael Brouwer wrote:
> In trunk I believe that retriving logs and revisions are pipelined (or
> will be soon).  That something you might want to take into
> consideration, since you'd have to update 2 status lines at once. 
> Pehaps the status for logs and commits can be folded into one line
> somehow. Something like this might work I suppose (though the wording
> could be changed):
> 
> Syncing from file://localhost/home/jon/test_parrot
> Metadata 50% (5032/10456) data 25% (2541/10436)

The code in trunk currently sets up the pipeline after
traverse_new_changesets (the Retrieving log information ... section)
runs, so I don't think this has happened yet (or it doesn't mean what
you think it means).

However, your message did get me thinking about how to more cleanly add
the progress information, especially to the traverse_new_changesets
part, and I think I figured it out.  I'll add a callback to that method
(in addition to the sync_changesets callback that already exists).  Then
the determination of whether to use ->log->info(...) or print
_show_progress(...) can be made in Mirror.pm, on a backend-independent
basis.  It will probably need some refactoring when other backends are
added directly to svk, but it probably will need that anyway :)

I'll send another patch when I have a free moment (or two) to make one.

-- 
package JAPH;use Catalyst qw/-Debug/;($;=JAPH)->config(name => do {
$,.=reverse qw[Jonathan tsu rehton lre rekca Rockway][$_].[split //,
";$;"]->[$_].q; ;for 1..4;$,=~s;^.;;;$,});$;->setup;


More information about the svk-devel mailing list