You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/07/01 22:00:36 UTC
svn commit: r1498651 - in
/subversion/branches/fsfs-format7/subversion/libsvn_fs_x: fs.h hotcopy.c
low_level.c transaction.c
Author: stefan2
Date: Mon Jul 1 20:00:36 2013
New Revision: 1498651
URL: http://svn.apache.org/r1498651
Log:
On the fsfs-format7 branch: Remove the remaining format option flags
from FSX because none of them is relevant to it. Remove all references
to these flag and get rid of the obsolete FSFS-fallback behavior.
* subversion/libsvn_fs_x/fs.h
(define SVN_FS_FS__MIN_SVNDIFF1_FORMAT,
define SVN_FS_FS__MIN_TXN_CURRENT_FORMAT,
define SVN_FS_FS__MIN_KIND_IN_CHANGED_FORMAT): drop
* subversion/libsvn_fs_x/hotcopy.c
(hotcopy_body): remove check
* subversion/libsvn_fs_x/low_level.c
(write_change_entry): drop include_node_kind parameter; remove check
(svn_fs_x__write_changes): update caller; remove check
* subversion/libsvn_fs_x/transaction.c
(create_txn_dir_pre_1_5): drop obsolete function
(create_txn_dir): remove check & fallback code
(rep_write_get_baton,
write_hash_delta_rep): remove check
Modified:
subversion/branches/fsfs-format7/subversion/libsvn_fs_x/fs.h
subversion/branches/fsfs-format7/subversion/libsvn_fs_x/hotcopy.c
subversion/branches/fsfs-format7/subversion/libsvn_fs_x/low_level.c
subversion/branches/fsfs-format7/subversion/libsvn_fs_x/transaction.c
Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_x/fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_x/fs.h?rev=1498651&r1=1498650&r2=1498651&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_x/fs.h (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_x/fs.h Mon Jul 1 20:00:36 2013
@@ -119,16 +119,6 @@ extern "C" {
independent of any other FS back ends. */
#define SVN_FS_FS__FORMAT_NUMBER 7
-/* The minimum format number that supports svndiff version 1. */
-#define SVN_FS_FS__MIN_SVNDIFF1_FORMAT 2
-
-/* The minimum format number that supports transaction ID generation
- using a transaction sequence in the txn-current file. */
-#define SVN_FS_FS__MIN_TXN_CURRENT_FORMAT 3
-
-/* The minimum format number that stores node kinds in changed-paths lists. */
-#define SVN_FS_FS__MIN_KIND_IN_CHANGED_FORMAT 4
-
/* Private FSFS-specific data shared between all svn_txn_t objects that
relate to a particular transaction in a filesystem (as identified
by transaction id and filesystem UUID). Objects of this type are
Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_x/hotcopy.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_x/hotcopy.c?rev=1498651&r1=1498650&r2=1498651&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_x/hotcopy.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_x/hotcopy.c Mon Jul 1 20:00:36 2013
@@ -783,9 +783,8 @@ hotcopy_body(void *baton, apr_pool_t *po
}
/* Copy the txn-current file. */
- if (dst_ffd->format >= SVN_FS_FS__MIN_TXN_CURRENT_FORMAT)
- SVN_ERR(svn_io_dir_file_copy(src_fs->path, dst_fs->path,
- PATH_TXN_CURRENT, pool));
+ SVN_ERR(svn_io_dir_file_copy(src_fs->path, dst_fs->path,
+ PATH_TXN_CURRENT, pool));
/* If a revprop generation file exists in the source filesystem,
* reset it to zero (since this is on a different path, it will not
Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_x/low_level.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_x/low_level.c?rev=1498651&r1=1498650&r2=1498651&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_x/low_level.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_x/low_level.c Mon Jul 1 20:00:36 2013
@@ -895,7 +895,6 @@ static svn_error_t *
write_change_entry(svn_stream_t *stream,
const char *path,
svn_fs_path_change2_t *change,
- svn_boolean_t include_node_kind,
apr_pool_t *pool)
{
const char *idstr, *buf;
@@ -930,15 +929,12 @@ write_change_entry(svn_stream_t *stream,
else
idstr = ACTION_RESET;
- if (include_node_kind)
- {
- SVN_ERR_ASSERT(change->node_kind == svn_node_dir
- || change->node_kind == svn_node_file);
- kind_string = apr_psprintf(pool, "-%s",
- change->node_kind == svn_node_dir
- ? SVN_FS_FS__KIND_DIR
- : SVN_FS_FS__KIND_FILE);
- }
+ SVN_ERR_ASSERT(change->node_kind == svn_node_dir
+ || change->node_kind == svn_node_file);
+ kind_string = apr_psprintf(pool, "-%s",
+ change->node_kind == svn_node_dir
+ ? SVN_FS_FS__KIND_DIR
+ : SVN_FS_FS__KIND_FILE);
buf = apr_psprintf(pool, "%s %s%s %s %s %s\n",
idstr, change_string, kind_string,
change->text_mod ? FLAG_TRUE : FLAG_FALSE,
@@ -965,9 +961,6 @@ svn_fs_x__write_changes(svn_stream_t *st
apr_pool_t *pool)
{
apr_pool_t *iterpool = svn_pool_create(pool);
- fs_x_data_t *ffd = fs->fsap_data;
- svn_boolean_t include_node_kinds =
- ffd->format >= SVN_FS_FS__MIN_KIND_IN_CHANGED_FORMAT;
apr_array_header_t *sorted_changed_paths;
int i;
@@ -1007,8 +1000,7 @@ svn_fs_x__write_changes(svn_stream_t *st
}
/* Write out the new entry into the final rev-file. */
- SVN_ERR(write_change_entry(stream, path, change, include_node_kinds,
- iterpool));
+ SVN_ERR(write_change_entry(stream, path, change, iterpool));
}
if (terminate_list)
Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_x/transaction.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_x/transaction.c?rev=1498651&r1=1498650&r2=1498651&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_x/transaction.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_x/transaction.c Mon Jul 1 20:00:36 2013
@@ -1025,65 +1025,12 @@ create_txn_dir(const char **id_p,
return svn_io_dir_make(txn_dir, APR_OS_DEFAULT, pool);
}
-/* Create a unique directory for a transaction in FS based on revision
- REV. Return the ID for this transaction in *ID_P and *TXN_ID. This
- implementation is used in svn 1.4 and earlier repositories and is
- kept in 1.5 and greater to support the --pre-1.4-compatible and
- --pre-1.5-compatible repository creation options. Reused
- transaction IDs are possible with this implementation. */
-static svn_error_t *
-create_txn_dir_pre_1_5(const char **id_p,
- svn_fs_x__id_part_t *txn_id,
- svn_fs_t *fs,
- svn_revnum_t rev,
- apr_pool_t *pool)
-{
- unsigned int i;
- apr_pool_t *subpool;
- const char *unique_path, *prefix;
-
- /* Try to create directories named "<txndir>/<rev>-<uniqueifier>.txn". */
- prefix = svn_dirent_join_many(pool, fs->path, PATH_TXNS_DIR,
- apr_psprintf(pool, "%ld", rev), NULL);
-
- subpool = svn_pool_create(pool);
- for (i = 1; i <= 99999; i++)
- {
- svn_error_t *err;
-
- svn_pool_clear(subpool);
- unique_path = apr_psprintf(subpool, "%s-%u" PATH_EXT_TXN, prefix, i);
- err = svn_io_dir_make(unique_path, APR_OS_DEFAULT, subpool);
- if (! err)
- {
- /* We succeeded. Return the basename minus the ".txn" extension. */
- const char *name = svn_dirent_basename(unique_path, subpool);
- *id_p = apr_pstrndup(pool, name,
- strlen(name) - strlen(PATH_EXT_TXN));
- SVN_ERR(svn_fs_x__id_txn_parse(txn_id, *id_p));
- svn_pool_destroy(subpool);
- return SVN_NO_ERROR;
- }
- if (! APR_STATUS_IS_EEXIST(err->apr_err))
- return svn_error_trace(err);
- svn_error_clear(err);
- }
-
- return svn_error_createf(SVN_ERR_IO_UNIQUE_NAMES_EXHAUSTED,
- NULL,
- _("Unable to create transaction directory "
- "in '%s' for revision %ld"),
- svn_dirent_local_style(fs->path, pool),
- rev);
-}
-
svn_error_t *
svn_fs_x__create_txn(svn_fs_txn_t **txn_p,
svn_fs_t *fs,
svn_revnum_t rev,
apr_pool_t *pool)
{
- fs_x_data_t *ffd = fs->fsap_data;
svn_fs_txn_t *txn;
fs_txn_data_t *ftd;
svn_fs_id_t *root_id;
@@ -1092,10 +1039,7 @@ svn_fs_x__create_txn(svn_fs_txn_t **txn_
ftd = apr_pcalloc(pool, sizeof(*ftd));
/* Get the txn_id. */
- if (ffd->format >= SVN_FS_FS__MIN_TXN_CURRENT_FORMAT)
- SVN_ERR(create_txn_dir(&txn->id, &ftd->txn_id, fs, rev, pool));
- else
- SVN_ERR(create_txn_dir_pre_1_5(&txn->id, &ftd->txn_id, fs, rev, pool));
+ SVN_ERR(create_txn_dir(&txn->id, &ftd->txn_id, fs, rev, pool));
txn->fs = fs;
txn->base_rev = rev;
@@ -1876,8 +1820,7 @@ rep_write_get_baton(struct rep_write_bat
svn_stream_t *source;
svn_txdelta_window_handler_t wh;
void *whb;
- fs_x_data_t *ffd = fs->fsap_data;
- int diff_version = ffd->format >= SVN_FS_FS__MIN_SVNDIFF1_FORMAT ? 1 : 0;
+ int diff_version = 1;
svn_fs_x__rep_header_t header = { TRUE };
b = apr_pcalloc(pool, sizeof(*b));
@@ -2400,8 +2343,7 @@ write_hash_delta_rep(representation_t *r
apr_off_t offset = 0;
struct write_hash_baton *whb;
- fs_x_data_t *ffd = fs->fsap_data;
- int diff_version = ffd->format >= SVN_FS_FS__MIN_SVNDIFF1_FORMAT ? 1 : 0;
+ int diff_version = 1;
svn_boolean_t is_props = (item_type == SVN_FS_FS__ITEM_TYPE_FILE_PROPS)
|| (item_type == SVN_FS_FS__ITEM_TYPE_DIR_PROPS);