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

Problem introduced in revision 34378 of libsvn_fs_fs/fs_fs.c?

From: Marc Haesen <Marc.Haesen_at_oneaccess-net.com>
Date: Wed, 26 Nov 2008 10:51:55 +0100

Hi,

 

Could it be that the following code changed in revision 34378 of
libsvn_fs_fs/fs_fs.c:

 

===================================================================

--- fs_fs.c (revision 34377)

+++ fs_fs.c (revision 34428)

@@ -1867,19 +1866,21 @@

 }

 

 

-/* Return a formatted string that represents the location of

- representation REP. If MUTABLE_REP_TRUNCATED is given, the rep is

- for props or dir contents, and only a "-1" revision number will be

- given for a mutable rep. Perform the allocation from POOL. */

+/* Return a formatted string, compatible with filesystem format FORMAT,

+ that represents the location of representation REP. If

+ MUTABLE_REP_TRUNCATED is given, the rep is for props or dir
contents,

+ and only a "-1" revision number will be given for a mutable rep.

+ Perform the allocation from POOL. */

 static const char *

 representation_string(representation_t *rep,

- svn_boolean_t mutable_rep_truncated, apr_pool_t
*pool)

+ int format,

+ svn_boolean_t mutable_rep_truncated,

+ apr_pool_t *pool)

 {

- /* ###: Make the writing of the sha1 and reuse count dependent on the

- format number. */

   if (rep->txn_id && mutable_rep_truncated)

     return "-1";

- else

+

+ if (format < SVN_FS_FS__MIN_REP_SHARING_FORMAT)

     return apr_psprintf(pool, "%ld %" APR_OFF_T_FMT " %"
SVN_FILESIZE_T_FMT

                         " %" SVN_FILESIZE_T_FMT " %s %s %"
APR_INT64_T_FMT,

                         rep->revision, rep->offset, rep->size,

 

 

Should have been (look at difference in test on repository format):

 

===================================================================

--- fs_fs.c (revision 34377)

+++ fs_fs.c (revision 34428)

@@ -1867,19 +1866,21 @@

 }

 

 

-/* Return a formatted string that represents the location of

- representation REP. If MUTABLE_REP_TRUNCATED is given, the rep is

- for props or dir contents, and only a "-1" revision number will be

- given for a mutable rep. Perform the allocation from POOL. */

+/* Return a formatted string, compatible with filesystem format FORMAT,

+ that represents the location of representation REP. If

+ MUTABLE_REP_TRUNCATED is given, the rep is for props or dir
contents,

+ and only a "-1" revision number will be given for a mutable rep.

+ Perform the allocation from POOL. */

 static const char *

 representation_string(representation_t *rep,

- svn_boolean_t mutable_rep_truncated, apr_pool_t
*pool)

+ int format,

+ svn_boolean_t mutable_rep_truncated,

+ apr_pool_t *pool)

 {

- /* ###: Make the writing of the sha1 and reuse count dependent on the

- format number. */

   if (rep->txn_id && mutable_rep_truncated)

     return "-1";

- else

+

+ if (format >= SVN_FS_FS__MIN_REP_SHARING_FORMAT)

     return apr_psprintf(pool, "%ld %" APR_OFF_T_FMT " %"
SVN_FILESIZE_T_FMT

                         " %" SVN_FILESIZE_T_FMT " %s %s %"
APR_INT64_T_FMT,

                         rep->revision, rep->offset, rep->size,

 

If I do a dump/load of a repository, I get a different size of the
repository with revision 34377 compared with the current version
(34428). If I apply this patch on 34428, I get the same repository after
a dump/load.

 

Regards,

Marc
Received on 2008-11-26 10:52:34 CET

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.