You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2011/07/07 21:14:05 UTC

svn commit: r1143983 - /subversion/branches/revprop-packing/subversion/libsvn_fs_fs/fs_fs.c

Author: hwright
Date: Thu Jul  7 19:14:04 2011
New Revision: 1143983

URL: http://svn.apache.org/viewvc?rev=1143983&view=rev
Log:
On the revprop-packing branch:
Replace a magic number with a constant.

* subversion/libsvn_fs_fs/fs_fs.c
  (REVPROP_MANIFEST_FIELD_WIDTH): New.
  (pack_revprop_shard): Use the constant in creating the manifest.

Modified:
    subversion/branches/revprop-packing/subversion/libsvn_fs_fs/fs_fs.c

Modified: subversion/branches/revprop-packing/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/libsvn_fs_fs/fs_fs.c?rev=1143983&r1=1143982&r2=1143983&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/revprop-packing/subversion/libsvn_fs_fs/fs_fs.c Thu Jul  7 19:14:04 2011
@@ -69,6 +69,10 @@
  * by giving us arbitrarily large paths. */
 #define FSFS_MAX_PATH_LEN 4096
 
+/* Revprop packing uses a fixed-width manifest field size.  This is that
+ * width. */
+#define REVPROP_MANIFEST_FIELD_WIDTH 16
+
 /* The default maximum number of files per directory to store in the
    rev and revprops directory.  The number below is somewhat arbitrary,
    and can be overriden by defining the macro while compiling; the
@@ -7856,7 +7860,8 @@ pack_revprop_shard(svn_fs_t *fs,
 
       /* Update the manifest. */
       SVN_ERR(svn_stream_printf(manifest_stream, iterpool,
-                                "%016" APR_OFF_T_FMT, next_offset));
+              "%0" APR_STRINGIFY(REVPROP_MANIFEST_FIELD_WIDTH) APR_OFF_T_FMT,
+              next_offset));
       next_offset += finfo.size;
 
       /* Copy all the bits from the rev file to the end of the pack file. */