I'm not familiar with GUI progress notification paradigms and the first
example I checked (scp) wasn't too instructive. Perhaps someone has
a readily available pointer to share?
If not... I'm not sure. I'm not after svn_grand_unified_progress_func_t,
only after some distraction to let people know that 'svnadmin verify'
hasn't hung. And STAGE isn't needed yet; it's only there for
adding more information in the future.
So I'll go ahead and change STAGE's type to a pointer to an
declare-but-not-defined struct; if we want to define that struct in
1.next, fine. Until then, we pass NULL.
Julian Foad wrote on Thu, Jul 14, 2011 at 14:09:11 +0100:
> Daniel Shahaf wrote:
> > Greg Stein wrote on Thu, Jul 14, 2011 at 00:50:21 -0400:
> > > On Wed, Jul 13, 2011 at 22:39, <danielsh_at_apache.org> wrote:
> > > > /**
> > > > + * Callback function type for progress notification.
> > > > + *
> > > > + * @a progress is the number of steps already completed, @a total is
> > > > + * the total number of steps in this stage, @a stage is the number of
> > > > + * stages (for extensibility), @a baton is the callback baton.
> > > > + *
> > > > + * @note The number of stages may vary depending on the backend, library
> > > > + * version, and so on. @a total may be a best-effort estimate.
> > > > + *
> > > > + * @since New in 1.8.
> > > > + */
> > > > +typedef void (*svn_fs_progress_notify_func_t)(apr_off_t progress,
> > > > + apr_off_t total,
> > > > + int stage,
> > > > + void *baton,
> > > > + apr_pool_t *scratch_pool);
>
> Isn't progress notification pretty much standard in GUI environments -
> are there not standard notification paradigms which you could use, which
> have a notion of "how much out of how much in total" and have some
> string parameter to convey "the thing I'm currently processing" and even
> have the notion of stages?
>
> I would expect to see us move towards using a single progress callback
> type throughout Subversion instead of an FS-specific thing.
>
> - Julian
>
> > > > @@ -315,6 +327,12 @@ typedef struct svn_repos_notify_t
> > > >
> > > > + /** For #svn_repos_notify_verify_aux_progress;
> > > > + see svn_fs_progress_notify_func_t. */
> > > > + apr_off_t progress_progress;
> > > > + apr_off_t progress_total;
> > > > + int progress_stage;
> > >
> > > See above re: apr_off_t. And should "stage" be an integer, or is that
> > > an enumerated constant?
> >
> > Dunno. The idea was to not have to revv the API if we ever decide to
> > add some other checks besides rep-cache.db.
> >
> > Perhaps even a C string instead of either an int (counter) or an
> > enum type (which would be backend and library-version specific).
> >
> > Ideas welcome.
>
>
>
Received on 2011-07-15 09:22:38 CEST