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

Re: svn commit: r1104192 - in /subversion/trunk/subversion/libsvn_wc: adm_files.c wc.h workqueue.c

From: Greg Stein <gstein_at_gmail.com>
Date: Tue, 17 May 2011 08:38:15 -0400

On Tue, May 17, 2011 at 08:37, Greg Stein <gstein_at_gmail.com> wrote:
> On Tue, May 17, 2011 at 08:30,  <danielsh_at_apache.org> wrote:
>>...
>> +++ subversion/trunk/subversion/libsvn_wc/wc.h Tue May 17 12:30:03 2011
>> @@ -166,6 +166,11 @@ extern "C" {
>>    rules. See issue #2475. */
>>  #define SVN_WC__CHANGED_CANONICAL_URLS 10
>>
>> +/* The format number written to wc-ng working copies so that old clients
>> +   can recognize them as "newer Subversion"'s working copies. */
>> +#define SVN_WC__NON_ENTRIES 11
>> +#define SVN_WC__NON_ENTRIES_STRING "11\n"
>
> 'entries' existed in f11, and then disappeared when we bumped to format 12.

To be clear: there *are* versions of Subversion that thinks f11 means
an entries file should exist. It would be best to bump this to 12.

>>...
>> +++ subversion/trunk/subversion/libsvn_wc/workqueue.c Tue May 17 12:30:03 2011
>> @@ -563,9 +563,38 @@ run_postupgrade(svn_wc__db_t *db,
>>                 void *cancel_baton,
>>                 apr_pool_t *scratch_pool)
>>  {
>> +  const char *entries_path;
>> +  const char *format_path;
>> +  const char *wcroot_abspath;
>> +  const char *adm_path;
>> +  const char *temp_path;
>> +
>>   SVN_ERR(svn_wc__wipe_postupgrade(wri_abspath, FALSE,
>>                                    cancel_func, cancel_baton, scratch_pool));
>>
>> +  SVN_ERR(svn_wc__db_get_wcroot(&wcroot_abspath, db, wri_abspath,
>> +                                scratch_pool, scratch_pool));
>> +
>> +  adm_path = svn_wc__adm_child(wcroot_abspath, NULL, scratch_pool);
>> +  entries_path = svn_wc__adm_child(wcroot_abspath, SVN_WC__ADM_ENTRIES,
>> +                                   scratch_pool);
>> +  format_path = svn_wc__adm_child(wcroot_abspath, SVN_WC__ADM_FORMAT,
>> +                                   scratch_pool);
>> +
>> +  /* Write the 'format' and 'entries' files.
>> +     ### The order may matter for some sufficiently old clients.. but
>> +         this code only runs during upgrade after the files had been
>> +         removed earlier during the upgrade. */
>> +  SVN_ERR(svn_io_write_unique(&temp_path, adm_path, SVN_WC__NON_ENTRIES_STRING,
>> +                              sizeof(SVN_WC__NON_ENTRIES),
>> +                              svn_io_file_del_none, scratch_pool));
>> +  SVN_ERR(svn_io_file_rename(temp_path, format_path, scratch_pool));
>> +
>> +  SVN_ERR(svn_io_write_unique(&temp_path, adm_path, SVN_WC__NON_ENTRIES_STRING,
>> +                              sizeof(SVN_WC__NON_ENTRIES),
>> +                              svn_io_file_del_none, scratch_pool));
>
> on the above two calls, I believe you meant
> sizeof(SVN_WC__NON_ENTRIES_STRING) ... rather than the size of an
> integer :-)
>
> Cheers,
> -g
>
Received on 2011-05-17 14:38:46 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.