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

Re: Validating svn_wc_entry_t fields in write_entry()?

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Thu, 12 Jun 2008 11:28:22 -0400

Seems to me like it'd make more sense to validate the entry bits quite a bit
earlier, like in svn_wc__modify_entry() or one of its helper functions.
Entries are cached, so writing them out can happen later than when they are
modified. You don't want to allow the opportunity to refer to a cached
bogus entry that wasn't caught simply because it hasn't been flushed to disk
yet.

Blair Zajac wrote:
> I am using a svn_opt_revision_t to store the file external revision
> number, but I only allow the svn_opt_revision_unspecified,
> svn_opt_revision_head and svn_opt_revision_number kinds.
>
> I'd like to have write_entry() check the validity of the
> svn_opt_revision_t value before it writes it out, but currently
> write_entry() returns void.
>
> I was thinking of having write_entry() return a svn_error_t * and then I
> could bubble up any errors.
>
> Is this a good place to put a check that the rest of my code has
> properly set the svn_wc_entry_t fields?
>
> Blair
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
> For additional commands, e-mail: dev-help_at_subversion.tigris.org
>

-- 
C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on 2008-06-12 17:28:38 CEST

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.