subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1513874 - /subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
Date Wed, 14 Aug 2013 13:27:37 GMT
Author: stefan2
Date: Wed Aug 14 13:27:36 2013
New Revision: 1513874

URL: http://svn.apache.org/r1513874
Log:
Every write to packed revprops would wrongly add another newline
(empty entry) at the end of the respective manifest file.  This is
a scalability issue and does not affect correctness.

* subversion/libsvn_fs_fs/fs_fs.c
  (get_revprop_packname): don't add an empty path name after the last entry

Modified:
    subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c

Modified: subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c?rev=1513874&r1=1513873&r2=1513874&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c Wed Aug 14 13:27:36 2013
@@ -3715,7 +3715,10 @@ get_revprop_packname(svn_fs_t *fs,
   /* parse the manifest. Every line is a file name */
   revprops->manifest = apr_array_make(pool, ffd->max_files_per_dir,
                                       sizeof(const char*));
-  while (content->data)
+
+  /* Read all lines.  Since the last line ends with a newline, we will
+     end up with a valid but empty string after the last entry. */
+  while (content->data && *content->data)
     {
       APR_ARRAY_PUSH(revprops->manifest, const char*) = content->data;
       content->data = strchr(content->data, '\n');



Mime
View raw message