[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: request for comments from developers about issues 1004 and 901

From: SteveKing <steveking_at_gmx.ch>
Date: 2003-08-12 22:13:27 CEST

----- Original Message -----
From: "D.J. Heap" <djheap@dhiprovo.com>
>
> There would be only one parameter that is a struct containing a notify
> type indicator (and the baton, I would think, and perhaps other stuff
> that is common to all notifications if there is any) and then a union of
> different structs. Based on the notify type indicator you would know
> which unioned struct to fill in/use for the info about that action.
>
> The one parameter to the notify callback would be a struct like
> (pseudo-code):
>
> typedef struct svn_wc_notify_info_t
> {
> void *baton;
> svn_wc_notify_action_t action;
> union
> {
> svn_wc_notify_notify_info_t notify_info;
> svn_wc_notify_update_info_t update_info;
> svn_wc_notify_commit_info_t commit_info;
> };
> } svn_wc_notify_info_t;
>
> The union structs would be just normal structs containing members
> relevant to their notification action.
>
> So clients would see the main struct in the callback, and then check the
> action type to see which struct to use for the more specific info about
> the action. At least, I believe this is the general idea...Philip?

Thanks for the hint.
Would it be ok if I try making a patch with such a new callback?
Or better question: would such a patch have any chance of getting applied?

I'm thinking of something like that:

- taking the callback definition out of the svn_wc.h and putting
  it into svn_client.h since the callback wouldn't be used only
  to indicate changes in the working copy but on other occasions too
  (like the export command which doesn't change the working copy).
- parameter for the enum which indicates the struct used in the union
- parameter for the baton, the pool and the union itself
- the union would have first only one struct: svn_wc_notify_info_t
  which has the same members as the parameters of the callback
  as it has them right now.
- later the union will be expanded by additional structs to indicate
  more detailed progress information.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Aug 12 22:14:43 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.