Author: svn-role Date: Sun May 28 04:00:08 2017 New Revision: 1796470 URL: http://svn.apache.org/viewvc?rev=1796470&view=rev Log: Merge the 1.9.x-fix-fsfs branch:
* r1796143 Fix the FSFS breakage caused by the latest SHA-1-related merges. Justification: FSFS is basically broken (~400 tests failing). Branch: ^/subversion/branches/1.9.x-fix-fsfs Votes: +1: stefan2, stsp, danielsh Modified: subversion/branches/1.9.x/ (props changed) subversion/branches/1.9.x/STATUS subversion/branches/1.9.x/subversion/libsvn_fs_fs/transaction.c Propchange: subversion/branches/1.9.x/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Sun May 28 04:00:08 2017 @@ -2,6 +2,7 @@ /subversion/branches/1.5.x-r30215:870312 /subversion/branches/1.7.x-fs-verify:1146708,1161180 /subversion/branches/1.9-cache-improvements:1678948-1679863 +/subversion/branches/1.9.x-fix-fsfs:1796142-1796469 /subversion/branches/1.9.x-fsfs-pack-fixes:1759183-1770158 /subversion/branches/1.9.x-fsfs-rep-comparison:1717869-1739708 /subversion/branches/1.9.x-r1664664:1674265-1674433 Modified: subversion/branches/1.9.x/STATUS URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/STATUS?rev=1796470&r1=1796469&r2=1796470&view=diff ============================================================================== --- subversion/branches/1.9.x/STATUS (original) +++ subversion/branches/1.9.x/STATUS Sun May 28 04:00:08 2017 @@ -89,13 +89,3 @@ Veto-blocked changes: Approved changes: ================= - - * r1796143 - Fix the FSFS breakage caused by the latest SHA-1-related merges. - Justification: - FSFS is basically broken (~400 tests failing). - Branch: - ^/subversion/branches/1.9.x-fix-fsfs - Votes: - +1: stefan2, stsp, danielsh - Modified: subversion/branches/1.9.x/subversion/libsvn_fs_fs/transaction.c URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/libsvn_fs_fs/transaction.c?rev=1796470&r1=1796469&r2=1796470&view=diff ============================================================================== --- subversion/branches/1.9.x/subversion/libsvn_fs_fs/transaction.c (original) +++ subversion/branches/1.9.x/subversion/libsvn_fs_fs/transaction.c Sun May 28 04:00:08 2017 @@ -2618,6 +2618,7 @@ write_container_rep(representation_t *re struct write_container_baton *whb; svn_checksum_ctx_t *fnv1a_checksum_ctx; apr_off_t offset = 0; + svn_fs_fs__p2l_entry_t entry; SVN_ERR(svn_fs_fs__get_file_offset(&offset, file, scratch_pool)); @@ -2660,30 +2661,27 @@ write_container_rep(representation_t *re /* Use the old rep for this content. */ memcpy(rep, old_rep, sizeof (*rep)); + return SVN_NO_ERROR; } } - else - { - svn_fs_fs__p2l_entry_t entry; - /* Write out our cosmetic end marker. */ - SVN_ERR(svn_stream_puts(whb->stream, "ENDREP\n")); + /* Write out our cosmetic end marker. */ + SVN_ERR(svn_stream_puts(whb->stream, "ENDREP\n")); - SVN_ERR(allocate_item_index(&rep->item_index, fs, &rep->txn_id, - offset, scratch_pool)); + SVN_ERR(allocate_item_index(&rep->item_index, fs, &rep->txn_id, + offset, scratch_pool)); - entry.offset = offset; - SVN_ERR(svn_fs_fs__get_file_offset(&offset, file, scratch_pool)); - entry.size = offset - entry.offset; - entry.type = item_type; - entry.item.revision = SVN_INVALID_REVNUM; - entry.item.number = rep->item_index; - SVN_ERR(fnv1a_checksum_finalize(&entry.fnv1_checksum, - fnv1a_checksum_ctx, - scratch_pool)); + entry.offset = offset; + SVN_ERR(svn_fs_fs__get_file_offset(&offset, file, scratch_pool)); + entry.size = offset - entry.offset; + entry.type = item_type; + entry.item.revision = SVN_INVALID_REVNUM; + entry.item.number = rep->item_index; + SVN_ERR(fnv1a_checksum_finalize(&entry.fnv1_checksum, + fnv1a_checksum_ctx, + scratch_pool)); - SVN_ERR(store_p2l_index_entry(fs, &rep->txn_id, &entry, scratch_pool)); - } + SVN_ERR(store_p2l_index_entry(fs, &rep->txn_id, &entry, scratch_pool)); return SVN_NO_ERROR; } @@ -2725,6 +2723,7 @@ write_container_delta_rep(representation svn_checksum_ctx_t *fnv1a_checksum_ctx; svn_stream_t *source; svn_fs_fs__rep_header_t header = { 0 }; + svn_fs_fs__p2l_entry_t entry; apr_off_t rep_end = 0; apr_off_t delta_start = 0; @@ -2807,30 +2806,27 @@ write_container_delta_rep(representation /* Use the old rep for this content. */ memcpy(rep, old_rep, sizeof (*rep)); + return SVN_NO_ERROR; } } - else - { - svn_fs_fs__p2l_entry_t entry; - /* Write out our cosmetic end marker. */ - SVN_ERR(svn_stream_puts(file_stream, "ENDREP\n")); + /* Write out our cosmetic end marker. */ + SVN_ERR(svn_stream_puts(file_stream, "ENDREP\n")); - SVN_ERR(allocate_item_index(&rep->item_index, fs, &rep->txn_id, - offset, scratch_pool)); + SVN_ERR(allocate_item_index(&rep->item_index, fs, &rep->txn_id, + offset, scratch_pool)); - entry.offset = offset; - SVN_ERR(svn_fs_fs__get_file_offset(&offset, file, scratch_pool)); - entry.size = offset - entry.offset; - entry.type = item_type; - entry.item.revision = SVN_INVALID_REVNUM; - entry.item.number = rep->item_index; - SVN_ERR(fnv1a_checksum_finalize(&entry.fnv1_checksum, - fnv1a_checksum_ctx, - scratch_pool)); + entry.offset = offset; + SVN_ERR(svn_fs_fs__get_file_offset(&offset, file, scratch_pool)); + entry.size = offset - entry.offset; + entry.type = item_type; + entry.item.revision = SVN_INVALID_REVNUM; + entry.item.number = rep->item_index; + SVN_ERR(fnv1a_checksum_finalize(&entry.fnv1_checksum, + fnv1a_checksum_ctx, + scratch_pool)); - SVN_ERR(store_p2l_index_entry(fs, &rep->txn_id, &entry, scratch_pool)); - } + SVN_ERR(store_p2l_index_entry(fs, &rep->txn_id, &entry, scratch_pool)); return SVN_NO_ERROR; }