Author: philip
Date: Mon Jul 5 09:41:32 2010
New Revision: 960499
URL: http://svn.apache.org/viewvc?rev=960499&view=rev
Log:
Remove more code that is obsolete now that SVN_EXPERIMENTAL_PRISTINE is defined.
* subversion/libsvn_wc/adm_files.h
(svn_wc__sync_text_base, svn_wc__text_base_path, svn_wc__text_revert_path,
svn_wc__text_revert_path_to_read): Remove.
* subversion/libsvn_wc/adm_files.c
(svn_wc__sync_text_base, svn_wc__text_base_path, svn_wc__text_revert_path,
svn_wc__text_revert_path_to_read): Remove.
(svn_wc__text_base_path_to_read, svn_wc__ultimate_base_text_path,
svn_wc__get_ultimate_base_contents, svn_wc__get_pristine_contents,
init_adm): Remove obsolete text-base code.
* subversion/tests/cmdline/svntest/wc.py
(text_base_path): Remove text-base compatibility support.
Modified:
subversion/trunk/subversion/libsvn_wc/adm_files.c
subversion/trunk/subversion/libsvn_wc/adm_files.h
subversion/trunk/subversion/tests/cmdline/svntest/wc.py
Modified: subversion/trunk/subversion/libsvn_wc/adm_files.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_files.c?rev=960499&r1=960498&r2=960499&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/adm_files.c (original)
+++ subversion/trunk/subversion/libsvn_wc/adm_files.c Mon Jul 5 09:41:32 2010
@@ -188,47 +188,6 @@ make_adm_subdir(const char *path,
/*** Syncing files in the adm area. ***/
-#ifndef SVN_EXPERIMENTAL_PRISTINE
-svn_error_t *
-svn_wc__sync_text_base(svn_wc__db_t *db,
- const char *local_abspath,
- const char *tmp_text_base_abspath,
- apr_pool_t *scratch_pool)
-{
- const char *base_path;
-
- SVN_ERR(svn_wc__text_base_path(&base_path, db, local_abspath, scratch_pool));
-
- SVN_ERR(svn_io_file_rename(tmp_text_base_abspath, base_path, scratch_pool));
- SVN_ERR(svn_io_set_file_read_only(base_path, FALSE, scratch_pool));
-
- return SVN_NO_ERROR;
-}
-#endif
-
-#ifndef SVN_EXPERIMENTAL_PRISTINE
-svn_error_t *
-svn_wc__text_base_path(const char **result_abspath,
- svn_wc__db_t *db,
- const char *local_abspath,
- apr_pool_t *pool)
-{
- const char *newpath, *base_name;
-
- SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
-
- svn_dirent_split(&newpath, &base_name, local_abspath, pool);
- *result_abspath = simple_extend(newpath,
- FALSE,
- SVN_WC__ADM_TEXT_BASE,
- base_name,
- SVN_WC__BASE_EXT,
- pool);
-
- return SVN_NO_ERROR;
-}
-#endif
-
svn_error_t *
svn_wc__text_base_deterministic_tmp_path(const char **result_abspath,
svn_wc__db_t *db,
@@ -246,29 +205,6 @@ svn_wc__text_base_deterministic_tmp_path
return SVN_NO_ERROR;
}
-#ifndef SVN_EXPERIMENTAL_PRISTINE
-svn_error_t *
-svn_wc__text_revert_path(const char **result_abspath,
- svn_wc__db_t *db,
- const char *local_abspath,
- apr_pool_t *pool)
-{
- const char *newpath, *base_name;
-
- SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
-
- svn_dirent_split(&newpath, &base_name, local_abspath, pool);
- *result_abspath = simple_extend(newpath,
- FALSE,
- SVN_WC__ADM_TEXT_BASE,
- base_name,
- SVN_WC__REVERT_EXT,
- pool);
-
- return SVN_NO_ERROR;
-}
-#endif
-
svn_error_t *
svn_wc__text_base_path_to_read(const char **result_abspath,
@@ -277,7 +213,6 @@ svn_wc__text_base_path_to_read(const cha
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
-#ifdef SVN_EXPERIMENTAL_PRISTINE
const svn_checksum_t *checksum;
SVN_ERR(svn_wc__db_read_info(NULL, NULL, NULL, NULL, NULL, NULL,
@@ -294,52 +229,10 @@ svn_wc__text_base_path_to_read(const cha
SVN_ERR(svn_wc__db_pristine_get_path(result_abspath, db, local_abspath,
checksum,
result_pool, scratch_pool));
-#else
- SVN_ERR(svn_wc__text_base_path(result_abspath, db, local_abspath,
- result_pool));
- /* Return an error if the file does not exist */
- {
- svn_node_kind_t kind;
-
- SVN_ERR(svn_io_check_path(*result_abspath, &kind, result_pool));
- if (kind != svn_node_file)
- return svn_error_createf(SVN_ERR_WC_PATH_UNEXPECTED_STATUS, NULL,
- _("File '%s' has no text base"),
- svn_dirent_local_style(local_abspath,
- result_pool));
- }
-#endif
-
return SVN_NO_ERROR;
}
-#ifndef SVN_EXPERIMENTAL_PRISTINE
-svn_error_t *
-svn_wc__text_revert_path_to_read(const char **result_abspath,
- svn_wc__db_t *db,
- const char *local_abspath,
- apr_pool_t *result_pool)
-{
- SVN_ERR(svn_wc__text_revert_path(result_abspath, db, local_abspath,
- result_pool));
- /* Return an error if the file does not exist */
- {
- svn_node_kind_t kind;
-
- SVN_ERR(svn_io_check_path(*result_abspath, &kind, result_pool));
- if (kind != svn_node_file)
- return svn_error_createf(SVN_ERR_WC_PATH_UNEXPECTED_STATUS, NULL,
- _("File '%s' has no text base"),
- svn_dirent_local_style(local_abspath,
- result_pool));
- }
-
- return SVN_NO_ERROR;
-}
-#endif
-
-
svn_error_t *
svn_wc__ultimate_base_text_path(const char **result_abspath,
svn_wc__db_t *db,
@@ -347,7 +240,6 @@ svn_wc__ultimate_base_text_path(const ch
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
-#ifdef SVN_EXPERIMENTAL_PRISTINE
const svn_checksum_t *checksum;
SVN_ERR(svn_wc__db_base_get_info(NULL, NULL, NULL, NULL, NULL, NULL,
@@ -363,28 +255,6 @@ svn_wc__ultimate_base_text_path(const ch
SVN_ERR(svn_wc__db_pristine_get_path(result_abspath, db, local_abspath,
checksum,
result_pool, scratch_pool));
-#else
- svn_error_t *err;
- svn_boolean_t replaced;
-
- err = svn_wc__internal_is_replaced(&replaced, db, local_abspath,
- scratch_pool);
- if (err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
- {
- svn_error_clear(err);
- replaced = FALSE;
- }
- else
- SVN_ERR(err);
-
- if (replaced)
- SVN_ERR(svn_wc__text_revert_path(result_abspath, db, local_abspath,
- result_pool));
- else
- SVN_ERR(svn_wc__text_base_path(result_abspath, db, local_abspath,
- result_pool));
-#endif
-
return SVN_NO_ERROR;
}
@@ -420,7 +290,6 @@ svn_wc__get_ultimate_base_contents(svn_s
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
-#ifdef SVN_EXPERIMENTAL_PRISTINE
svn_wc__db_kind_t kind;
svn_wc__db_status_t status;
const svn_checksum_t *checksum;
@@ -444,34 +313,6 @@ svn_wc__get_ultimate_base_contents(svn_s
SVN_ERR_ASSERT(checksum != NULL);
SVN_ERR(svn_wc__db_pristine_read(contents, db, local_abspath,
checksum, result_pool, scratch_pool));
-#else
- const char *revert_base;
- svn_error_t *err;
-
- SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
-
- /* If there's a WC-1 "revert base", open that. */
- err = svn_wc__text_revert_path_to_read(&revert_base, db, local_abspath,
- scratch_pool);
- if (err && err->apr_err == SVN_ERR_WC_PATH_UNEXPECTED_STATUS)
- {
- svn_error_clear(err);
-
- /* There's no "revert base", so open the "normal base". */
- err = svn_wc__text_base_path_to_read(&revert_base, db, local_abspath,
- scratch_pool, scratch_pool);
- if (err && err->apr_err == SVN_ERR_WC_PATH_UNEXPECTED_STATUS)
- {
- svn_error_clear(err);
- *contents = NULL;
- return SVN_NO_ERROR;
- }
- }
- SVN_ERR(err);
- SVN_ERR(svn_stream_open_readonly(contents, revert_base,
- result_pool, scratch_pool));
-#endif
-
return SVN_NO_ERROR;
}
@@ -542,47 +383,12 @@ svn_wc__get_pristine_contents(svn_stream
&& status != svn_wc__db_status_obstructed_delete
&& status != svn_wc__db_status_base_deleted);
-#ifdef SVN_EXPERIMENTAL_PRISTINE
if (sha1_checksum)
SVN_ERR(svn_wc__db_pristine_read(contents, db, local_abspath,
sha1_checksum,
result_pool, scratch_pool));
else
*contents = NULL;
-#else
- {
- const char *text_base;
- svn_error_t *err, *err2;
-
- err = svn_wc__text_base_path_to_read(&text_base, db, local_abspath,
- scratch_pool, scratch_pool);
- /* ### now for some ugly hackiness. right now, file externals will
- ### sometimes put their pristine contents into the revert base,
- ### because they think they're *replaced* nodes, rather than
- ### simple BASE nodes. watch out for this scenario, and
- ### compensate appropriately. */
- if (err)
- {
- svn_boolean_t file_external;
-
- if (err->apr_err != SVN_ERR_WC_PATH_UNEXPECTED_STATUS)
- return svn_error_return(err);
-
- err2 = svn_wc__internal_is_file_external(&file_external,
- db, local_abspath,
- scratch_pool);
- if (err2 || !file_external)
- return svn_error_return(svn_error_compose_create(err, err2));
-
- svn_error_clear(err);
-
- SVN_ERR(svn_wc__text_revert_path_to_read(&text_base, db, local_abspath,
- scratch_pool));
- }
- SVN_ERR(svn_stream_open_readonly(contents, text_base,
- result_pool, scratch_pool));
- }
-#endif
return SVN_NO_ERROR;
}
@@ -831,15 +637,6 @@ init_adm(svn_wc__db_t *db,
/** Make subdirectories. ***/
-#ifndef SVN_EXPERIMENTAL_PRISTINE
- /* ### The absence of this directory is used to indicate to the
- ### regression tests that SHA1 pristines are enabled. This is a
- ### temporary hack, to avoid bumping the wc format. */
-
- /* SVN_WC__ADM_TEXT_BASE */
- SVN_ERR(make_adm_subdir(local_abspath, SVN_WC__ADM_TEXT_BASE, FALSE, pool));
-#endif
-
/* SVN_WC__ADM_PROP_BASE */
SVN_ERR(make_adm_subdir(local_abspath, SVN_WC__ADM_PROP_BASE, FALSE, pool));
Modified: subversion/trunk/subversion/libsvn_wc/adm_files.h
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_files.h?rev=960499&r1=960498&r2=960499&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/adm_files.h (original)
+++ subversion/trunk/subversion/libsvn_wc/adm_files.h Mon Jul 5 09:41:32 2010
@@ -52,33 +52,6 @@ svn_boolean_t svn_wc__adm_area_exists(co
apr_pool_t *pool);
-#ifndef SVN_EXPERIMENTAL_PRISTINE
-/* Atomically rename a temporary text-base file TMP_TEXT_BASE_ABSPATH to its
- canonical location. LOCAL_ABSPATH in DB is the working file whose
- text-base is to be moved. The tmp file should be closed already. */
-svn_error_t *
-svn_wc__sync_text_base(svn_wc__db_t *db,
- const char *local_abspath,
- const char *tmp_text_base_path,
- apr_pool_t *scratch_pool);
-#endif
-
-
-#ifndef SVN_EXPERIMENTAL_PRISTINE
-/* Set *RESULT_ABSPATH to the absolute path to where LOCAL_ABSPATH's
- "normal text-base" file is or should be created. The file does not
- necessarily exist.
-
- "Normal text-base" means the base of the copied file, if copied or moved,
- else nothing if it's a simple add (even if replacing an existing node),
- else the ultimate base. */
-svn_error_t *
-svn_wc__text_base_path(const char **result_abspath,
- svn_wc__db_t *db,
- const char *local_abspath,
- apr_pool_t *pool);
-#endif
-
/* Set *RESULT_ABSPATH to the deterministic absolute path to where
LOCAL_ABSPATH's temporary text-base file is or should be created. */
svn_error_t *
@@ -125,15 +98,6 @@ svn_wc__get_ultimate_base_contents(svn_s
apr_pool_t *scratch_pool);
-#ifndef SVN_EXPERIMENTAL_PRISTINE
-/* Set *RESULT_ABSPATH to the absolute path to LOCAL_ABSPATH's revert file. */
-svn_error_t *
-svn_wc__text_revert_path(const char **result_abspath,
- svn_wc__db_t *db,
- const char *local_abspath,
- apr_pool_t *pool);
-#endif
-
/* Set *PROP_PATH to PATH's PROPS_KIND properties file.
PATH can be a directory or file, and even have changed w.r.t. the
working copy's adm knowledge. Valid values for NODE_KIND are svn_node_dir
@@ -183,19 +147,6 @@ svn_wc__get_pristine_text_status(apr_fin
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
-#ifndef SVN_EXPERIMENTAL_PRISTINE
-/* Set *RESULT_ABSPATH to the path of the WC-1 "revert-base" text of the
- versioned file LOCAL_ABSPATH in DB.
-
- If the node LOCAL_ABSPATH has no such pristine text, return an error of
- type SVN_ERR_WC_PATH_UNEXPECTED_STATUS. */
-svn_error_t *
-svn_wc__text_revert_path_to_read(const char **result_abspath,
- svn_wc__db_t *db,
- const char *local_abspath,
- apr_pool_t *result_pool);
-#endif
-
/* Set *RESULT_ABSPATH to the path of the ultimate base text of the
versioned file LOCAL_ABSPATH in DB. In WC-1 terms this means the
"normal text-base" or, if the node is replaced by a copy or move, the
Modified: subversion/trunk/subversion/tests/cmdline/svntest/wc.py
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/wc.py?rev=960499&r1=960498&r2=960499&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/wc.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/wc.py Mon Jul 5 09:41:32
2010
@@ -822,11 +822,6 @@ def text_base_path(file_path):
dot_svn = svntest.main.get_admin_name()
parent_path, file_name = os.path.split(file_path)
- ### Temporary until the wc format changes.
- text_base_path = os.path.join(parent_path, dot_svn, 'text-base')
- if os.path.exists(text_base_path):
- return os.path.join(text_base_path, file_name + '.svn-base')
-
db_path = os.path.join(parent_path, dot_svn, 'wc.db')
db = svntest.sqlite3.connect(db_path)
c = db.cursor()