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

Re: svn commit: rev 5717 - trunk/subversion/libsvn_client

From: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2003-04-24 15:25:33 CEST

Ben Collins-Sussman wrote:

>rooneg@tigris.org writes:
>
>
>
>>Author: rooneg
>>Date: Wed Apr 23 20:08:05 2003
>>New Revision: 5717
>>
>>Fix the new export editor's handling of files with svn:keywords set.
>>
>>
>
>Thanks so much, Garrett!
>

no problem. i figure that since i forced the original svn export
hack^Wimplementation on the world, i should at least help with it's
replacement ;-)

>>
>>+ /* We need to keep this around so we can explicitly close it in close_file,
>>+ thus flushing it's output to disk so we can copy and translate it. */
>>+ apr_file_t *tmp_file;
>>
>>
>
>Ah, I understand now. I guess it the file was only implicitly flushed
>and closed when the editor-driver freed the file_baton's pool. Makes
>sense.
>

correct.

>>+ apr_status_t apr_err = apr_file_close (fb->tmp_file);
>>
>>
>
>A random question: when the window handler receives a NULL window
>(meaning it's done), couldn't it just close the *stream* it's been
>writing to? Then only the handler baton would need a new field, not
>the file baton.
>

i suppose that might work. i didn't think to try it.

>>- svn_subst_keywords_t *final_kw = apr_pcalloc (pool, sizeof(*final_kw));
>>+ svn_subst_keywords_t final_kw;
>>
>> if (fb->eol_style_val)
>> svn_subst_eol_style_from_value (&style, &eol, fb->eol_style_val->data);
>>
>> if (fb->keywords_val)
>>- build_final_keyword_struct (fb, final_kw, pool);
>>+ build_final_keyword_struct (fb, &final_kw, pool);
>>
>>
>
>
>Does this really work? The helper function assumes that final_kw has
>had all its fields initialized to NULL.
>

oops, my bad. it worked for me, but if it does need them to be NULL,
sander's fix is correct (use svn_subst_keywords_t final_kw = { 0 };).

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Apr 24 15:26:26 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.