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

Re: svn commit: r37259 - trunk/subversion/libsvn_wc

From: Hyrum K. Wright <hyrum_wright_at_mail.utexas.edu>
Date: Tue, 14 Apr 2009 12:51:18 -0500

On Apr 14, 2009, at 12:43 PM, Greg Stein wrote:

> On Tue, Apr 14, 2009 at 19:19, Hyrum K. Wright
> <hyrum_at_hyrumwright.org> wrote:
>> ...
>> +++ trunk/subversion/libsvn_wc/log.c Tue Apr 14 10:19:44
>> 2009 (r37259)
>> ...
>> @@ -1496,14 +1490,13 @@ log_do_upgrade_format(struct log_runner
>> /* Remove the .svn/format file, if it exists. */
>> svn_error_clear(svn_io_remove_file(path, loggy->pool));
>>
>> - /* The nice thing is that, just by setting this flag, the
>> entries file will
>> - be rewritten in the desired format. */
>> - loggy->entries_modified = TRUE;
>> -
>> /* Reading the entries file will support old formats, even if
>> this number
>> is updated. */
>> SVN_ERR(svn_wc__adm_set_wc_format(fmt, loggy->adm_access, loggy-
>> >pool));
>>
>> + SVN_ERR(svn_wc_entries_read(&entries, loggy->adm_access, TRUE,
>> loggy->pool));
>> + SVN_ERR(svn_wc__entries_write(entries, loggy->adm_access, loggy-
>> >pool));
>
> Might be safer to read the entries *first*, set the format, then write
> the entries. I doubt it will happen, but we don't want that read() to
> reset the format to what was found in the WC.

I can't comment on what would be "safer", but I will note that the
"reset format-read entries-write entries" method of upgrading is what
we've been doing all along. It's just been hidden by the way loggy
works and the entries_modified flag.

> Better yet: one function to do the above.

Eh, possibly, but I hope to rework this entire section at some point
to do proper upgrading.

-Hyrum

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1713911
Received on 2009-04-14 19:51: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.