[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: Blair Zajac <blair_at_orcaware.com>
Date: Fri, 13 Jun 2008 07:58:22 -0700

Thanks, so I'll add checking code later.

However, if an invalid revision kind does appear there, there's no mechanism to
bubble up an error through write_entry. Should we have one?

Without the ability to propagate an error, I'm going to have the file external
just not write the file externals information into the entries file, which will
leave it as a normal switched file to successive svn operations. If a user sees
a file external turn into a normal switched file, then hopefully they'll report
a bug.

C. Michael Pilato wrote:
> 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
Received on 2008-06-13 16:59:00 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.