You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2011/07/09 03:47:05 UTC
svn commit: r1144571 -
/subversion/branches/revprop-packing/subversion/libsvn_fs_fs/fs_fs.c
Author: danielsh
Date: Sat Jul 9 01:47:05 2011
New Revision: 1144571
URL: http://svn.apache.org/viewvc?rev=1144571&view=rev
Log:
On the revprop-packing branch:
Fix a bug when editing properties without changing the serialized hash's length.
* subversion/libsvn_fs_fs/fs_fs.c
(set_revision_proplist):
Always copy the tail revisions' data.
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=1144571&r1=1144570&r2=1144571&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 Sat Jul 9 01:47:05 2011
@@ -3136,25 +3136,15 @@ set_revision_proplist(svn_fs_t *fs,
svn_stream_disown(target_stream, pool),
old_offset, NULL, NULL, pool));
+ /* Write the new data. */
len = sb->len;
SVN_ERR(svn_stream_write(target_stream, sb->data, &len));
+ len = sb->len - offset_diff;
+ SVN_ERR(svn_stream_skip(source_stream, len));
- if (offset_diff)
- {
- /* If we have an offset, it means we aren't the last rev in the
- shard, and need copy the rest of the content from source to
- target. */
- len = sb->len - offset_diff;
- SVN_ERR(svn_stream_skip(source_stream, len));
- SVN_ERR(svn_stream_copy4(source_stream, target_stream, -1,
- NULL, NULL, pool));
- }
- else
- {
- /* Otherwise, just close everything up. */
- SVN_ERR(svn_stream_close(source_stream));
- SVN_ERR(svn_stream_close(target_stream));
- }
+ /* Copy the remaining existing data. */
+ SVN_ERR(svn_stream_copy4(source_stream, target_stream, -1,
+ NULL, NULL, pool));
/* Move it all into place. */
SVN_ERR(move_into_place(target_path, pack_file_path, pack_file_path,