You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2010/09/15 09:44:05 UTC
svn commit: r997216 [5/6] - in /subversion/branches/javahl-ra: ./
subversion/include/ subversion/include/private/ subversion/libsvn_client/
subversion/libsvn_diff/ subversion/libsvn_fs_base/util/
subversion/libsvn_fs_fs/ subversion/libsvn_ra_neon/ subv...
Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db.h
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db.h?rev=997216&r1=997215&r2=997216&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db.h Wed Sep 15 07:44:02 2010
@@ -2206,24 +2206,6 @@ svn_wc__db_temp_is_dir_deleted(svn_boole
const char *local_abspath,
apr_pool_t *scratch_pool);
-#ifndef SVN_WC__SINGLE_DB
-/* For a deleted node, determine its keep_local flag. (This flag will
- go away once we have a consolidated administrative area) */
-svn_error_t *
-svn_wc__db_temp_determine_keep_local(svn_boolean_t *keep_local,
- svn_wc__db_t *db,
- const char *local_abspath,
- apr_pool_t *scratch_pool);
-
-/* For a deleted directory, set its keep_local flag. (This flag will
- go away once we have a consolidated administrative area) */
-svn_error_t *
-svn_wc__db_temp_set_keep_local(svn_wc__db_t *db,
- const char *local_abspath,
- svn_boolean_t keep_local,
- apr_pool_t *scratch_pool);
-#endif
-
/* Removes all references of LOCAL_ABSPATH from its working copy
using DB. */
svn_error_t *
@@ -2367,14 +2349,6 @@ svn_wc__db_temp_get_file_external(const
apr_pool_t *scratch_pool);
-#ifndef SVN_WC__SINGLE_DB
-/* Remove a stray "subdir" record in the BASE_NODE table. */
-svn_error_t *
-svn_wc__db_temp_remove_subdir_record(svn_wc__db_t *db,
- const char *local_abspath,
- apr_pool_t *scratch_pool);
-#endif
-
/* Set file external information on LOCAL_ABSPATH to REPOS_RELPATH
at PEG_REV with revision REV*/
svn_error_t *
@@ -2403,28 +2377,10 @@ svn_wc__db_temp_op_set_property_conflict
const char *prej_basename,
apr_pool_t *scratch_pool);
-#ifndef SVN_WC__SINGLE_DB
-/* Ensure that the parent stub of LOCAL_ABSPATH contains a BASE_NODE record with
- a normal status and optionally remove the WORKING_NODE record for the node;
- this assumes that the parent directory is in the incomplete state, or the
- node already exists (either as working or as base node).
-
- ### This function is a HACK with assumptions that aren't completely checked.
- ### Don't add new callers unless you exactly know what
- ### you are doing! This call is never needed once we get to a central db. */
-svn_error_t *
-svn_wc__db_temp_set_parent_stub_to_normal(svn_wc__db_t *db,
- const char *local_abspath,
- svn_boolean_t delete_working,
- apr_pool_t *scratch_pool);
-#endif
-
/* Sets a base nodes revision and/or repository relative path. If
LOCAL_ABSPATH's rev (REV) is valid, set is revision and if SET_REPOS_RELPATH
is TRUE set its repository relative path to REPOS_RELPATH (and make sure its
REPOS_ROOT_URL and REPOS_ROOT_UUID are still valid).
-
- ### TODO(SINGLE_DB): Remove the 'update_stub' argument.
*/
svn_error_t *
svn_wc__db_temp_op_set_rev_and_repos_relpath(svn_wc__db_t *db,
@@ -2434,7 +2390,6 @@ svn_wc__db_temp_op_set_rev_and_repos_rel
const char *repos_relpath,
const char *repos_root_url,
const char *repos_uuid,
- svn_boolean_t update_stub,
apr_pool_t *scratch_pool);
/* Tweak a locally added existing directory LOCAL_ABSPATH to have a base
Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db_pdh.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db_pdh.c?rev=997216&r1=997215&r2=997216&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db_pdh.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db_pdh.c Wed Sep 15 07:44:02 2010
@@ -85,52 +85,6 @@ get_old_version(int *version,
return SVN_NO_ERROR;
}
-#ifndef SVN_WC__SINGLE_DB
-/* The filesystem has a directory at LOCAL_RELPATH. Examine the metadata
- to determine if a *file* was supposed to be there.
-
- ### this function is only required for per-dir .svn support. once all
- ### metadata is collected in a single wcroot, then we won't need to
- ### look in subdirs for other metadata. */
-static svn_error_t *
-determine_obstructed_file(svn_boolean_t *obstructed_file,
- const svn_wc__db_wcroot_t *wcroot,
- const char *local_relpath,
- apr_pool_t *scratch_pool)
-{
- svn_sqlite__stmt_t *stmt;
- svn_boolean_t have_row;
-
- SVN_ERR_ASSERT(wcroot->sdb != NULL && wcroot->wc_id != UNKNOWN_WC_ID);
-
- SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
- STMT_SELECT_WORKING_IS_FILE));
- SVN_ERR(svn_sqlite__bindf(stmt, "is",
- wcroot->wc_id,
- local_relpath));
- SVN_ERR(svn_sqlite__step(&have_row, stmt));
- if (have_row)
- {
- *obstructed_file = svn_sqlite__column_boolean(stmt, 0);
- }
- else
- {
- SVN_ERR(svn_sqlite__reset(stmt));
-
- SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
- STMT_SELECT_BASE_IS_FILE));
- SVN_ERR(svn_sqlite__bindf(stmt, "is",
- wcroot->wc_id,
- local_relpath));
- SVN_ERR(svn_sqlite__step(&have_row, stmt));
- if (have_row)
- *obstructed_file = svn_sqlite__column_boolean(stmt, 0);
- }
-
- return svn_sqlite__reset(stmt);
-}
-#endif
-
/* */
static svn_error_t *
@@ -326,12 +280,10 @@ svn_wc__db_pdh_create_wcroot(svn_wc__db_
(*wcroot)->sdb = sdb;
(*wcroot)->wc_id = wc_id;
(*wcroot)->format = format;
-#ifdef SVN_WC__SINGLE_DB
/* 8 concurrent locks is probably more than a typical wc_ng based svn client
uses. */
(*wcroot)->owned_locks = apr_array_make(result_pool, 8,
sizeof(svn_wc__db_wclock_t));
-#endif
/* SDB will be NULL for pre-NG working copies. We only need to run a
cleanup when the SDB is present. */
@@ -392,7 +344,6 @@ svn_wc__db_pdh_parse_local_abspath(svn_w
const char *build_relpath;
svn_wc__db_pdh_t *found_pdh = NULL;
svn_wc__db_pdh_t *child_pdh;
- svn_boolean_t obstruction_possible = FALSE;
svn_sqlite__db_t *sdb;
svn_boolean_t moved_upwards = FALSE;
svn_boolean_t always_check = FALSE;
@@ -473,14 +424,6 @@ svn_wc__db_pdh_parse_local_abspath(svn_w
/* Start the local_relpath empty. If *this* directory contains the
wc.db, then relpath will be the empty string. */
build_relpath = "";
-
- /* It is possible that LOCAL_ABSPATH was *intended* to be a file,
- but we just found a directory in its place. After we build
- the PDH, then we'll examine the parent to see how it describes
- this particular path.
-
- ### this is only possible with per-dir wc.db databases. */
- obstruction_possible = TRUE;
}
/* LOCAL_ABSPATH refers to a directory at this point. The PDH corresponding
@@ -548,16 +491,6 @@ svn_wc__db_pdh_parse_local_abspath(svn_w
moved_upwards = TRUE;
- /* An obstruction is no longer possible.
-
- Example: we were given "/some/file" and "file" turned out to be
- a directory. We did not find an SDB at "/some/file/.svn/wc.db",
- so we are now going to look at "/some/.svn/wc.db". That SDB will
- contain the correct information for "file".
-
- ### obstruction is only possible with per-dir wc.db databases. */
- obstruction_possible = FALSE;
-
/* Is the parent directory recorded in our hash? */
found_pdh = apr_hash_get(db->dir_data,
local_abspath, APR_HASH_KEY_STRING);
@@ -614,10 +547,6 @@ svn_wc__db_pdh_parse_local_abspath(svn_w
NULL, UNKNOWN_WC_ID, wc_format,
db->auto_upgrade, db->enforce_empty_wq,
db->state_pool, scratch_pool));
-
- /* Don't test for a directory obstructing a versioned file. The wc-1
- code can manage that itself. */
- obstruction_possible = FALSE;
}
{
@@ -631,96 +560,6 @@ svn_wc__db_pdh_parse_local_abspath(svn_w
*local_relpath = svn_relpath_join(dir_relpath, build_relpath, result_pool);
}
- /* Check to see if this (versioned) directory is obstructing what should
- be a file in the parent directory.
-
- ### obstruction is only possible with per-dir wc.db databases. */
- if (obstruction_possible)
- {
- const char *parent_dir;
- svn_wc__db_pdh_t *parent_pdh;
-
- /* We should NOT have moved up a directory. */
- assert(!moved_upwards);
-
- /* Get/make a PDH for the parent. */
- parent_dir = svn_dirent_dirname(local_abspath, scratch_pool);
- parent_pdh = apr_hash_get(db->dir_data, parent_dir, APR_HASH_KEY_STRING);
- if (parent_pdh == NULL || parent_pdh->wcroot == NULL)
- {
- svn_error_t *err = svn_wc__db_util_open_db(&sdb, parent_dir,
- SDB_FILE, smode,
- db->state_pool,
- scratch_pool);
- if (err)
- {
- if (err->apr_err != SVN_ERR_SQLITE_ERROR
- && !APR_STATUS_IS_ENOENT(err->apr_err))
- return svn_error_return(err);
- svn_error_clear(err);
-
- /* No parent, so we're at a wcroot apparently. An obstruction
- is (therefore) not possible. */
- parent_pdh = NULL;
- }
- else
- {
- /* ### construct this according to per-dir semantics. */
- if (parent_pdh == NULL)
- {
- parent_pdh = apr_pcalloc(db->state_pool,
- sizeof(*parent_pdh));
- parent_pdh->local_abspath = apr_pstrdup(db->state_pool,
- parent_dir);
- }
- else
- {
- /* The PDH should have been built correctly (so far). */
- SVN_ERR_ASSERT(strcmp(parent_pdh->local_abspath,
- parent_dir) == 0);
- }
-
- SVN_ERR(svn_wc__db_pdh_create_wcroot(&parent_pdh->wcroot,
- parent_pdh->local_abspath,
- sdb,
- 1 /* ### hack. */,
- FORMAT_FROM_SDB,
- db->auto_upgrade, db->enforce_empty_wq,
- db->state_pool, scratch_pool));
-
- apr_hash_set(db->dir_data,
- parent_pdh->local_abspath, APR_HASH_KEY_STRING,
- parent_pdh);
-
- (*pdh)->parent = parent_pdh;
- }
- }
-
-#ifndef SVN_WC__SINGLE_DB
- if (parent_pdh)
- {
- const char *lookfor_relpath = svn_dirent_basename(local_abspath,
- scratch_pool);
-
- /* Was there supposed to be a file sitting here? */
- SVN_ERR(determine_obstructed_file(&(*pdh)->obstructed_file,
- parent_pdh->wcroot,
- lookfor_relpath,
- scratch_pool));
-
- /* If we determined that a file was supposed to be at the
- LOCAL_ABSPATH requested, then return the PDH and LOCAL_RELPATH
- which describes that file. */
- if ((*pdh)->obstructed_file)
- {
- *pdh = parent_pdh;
- *local_relpath = apr_pstrdup(result_pool, lookfor_relpath);
- return SVN_NO_ERROR;
- }
- }
-#endif
- }
-
/* The PDH is complete. Stash it into DB. */
apr_hash_set(db->dir_data,
(*pdh)->local_abspath, APR_HASH_KEY_STRING,
Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db_private.h?rev=997216&r1=997215&r2=997216&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db_private.h (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db_private.h Wed Sep 15 07:44:02 2010
@@ -84,11 +84,9 @@ typedef struct svn_wc__db_wcroot_t {
format has not (yet) been determined, this will be UNKNOWN_FORMAT. */
int format;
-#ifdef SVN_WC__SINGLE_DB
/* Array of svn_wc__db_wclock_t fields (not pointers!).
Typically just one or two locks maximum. */
apr_array_header_t *owned_locks;
-#endif
} svn_wc__db_wcroot_t;
@@ -98,15 +96,6 @@ typedef struct svn_wc__db_wcroot_t {
* a given working copy directory.
*/
typedef struct svn_wc__db_pdh_t {
-#ifndef SVN_WC__SINGLE_DB
- /* This (versioned) working copy directory is obstructing what *should*
- be a file in the parent directory (according to its metadata).
-
- Note: this PDH should probably be ignored (or not created).
-
- ### obstruction is only possible with per-dir wc.db databases. */
- svn_boolean_t obstructed_file;
-#endif
/* The absolute path to this working copy directory. */
const char *local_abspath;
@@ -117,11 +106,6 @@ typedef struct svn_wc__db_pdh_t {
/* The parent directory's per-dir information. */
struct svn_wc__db_pdh_t *parent;
-#ifndef SVN_WC__SINGLE_DB
- /* Whether this process owns a write-lock on this directory. */
- svn_boolean_t locked;
-#endif
-
/* Hold onto the old-style access baton that corresponds to this PDH. */
svn_wc_adm_access_t *adm_access;
} svn_wc__db_pdh_t;
Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/workqueue.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/workqueue.c?rev=997216&r1=997215&r2=997216&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/workqueue.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/workqueue.c Wed Sep 15 07:44:02 2010
@@ -42,7 +42,6 @@
/* Workqueue operation names. */
#define OP_REVERT "revert"
-#define OP_KILLME "killme"
#define OP_BASE_REMOVE "base-remove"
#define OP_DELETION_POSTCOMMIT "deletion-postcommit"
/* Arguments of OP_POSTCOMMIT:
@@ -59,6 +58,7 @@
#define OP_TMP_SET_TEXT_CONFLICT_MARKERS "tmp-set-text-conflict-markers"
#define OP_TMP_SET_PROPERTY_CONFLICT_MARKER "tmp-set-property-conflict-marker"
#define OP_PRISTINE_GET_TRANSLATED "pristine-get-translated"
+#define OP_POSTUPGRADE "postupgrade"
/* For work queue debugging. Generates output about its operation. */
/* #define DEBUG_WORK_QUEUE */
@@ -186,10 +186,12 @@ run_revert(svn_wc__db_t *db,
svn_wc__db_status_t status;
const char *parent_abspath;
svn_boolean_t conflicted;
+ apr_int64_t val;
/* We need a NUL-terminated path, so copy it out of the skel. */
local_abspath = apr_pstrmemdup(scratch_pool, arg1->data, arg1->len);
- replaced = svn_skel__parse_int(arg1->next, scratch_pool) != 0;
+ SVN_ERR(svn_skel__parse_int(&val, arg1->next, scratch_pool));
+ replaced = (val != 0);
/* magic_changed is extracted further below. */
/* use_commit_times is extracted further below. */
@@ -213,7 +215,8 @@ run_revert(svn_wc__db_t *db,
svn_boolean_t magic_changed;
svn_boolean_t reinstall_working;
- magic_changed = svn_skel__parse_int(arg1->next->next, scratch_pool) != 0;
+ SVN_ERR(svn_skel__parse_int(&val, arg1->next->next, scratch_pool));
+ magic_changed = (val != 0);
/* If there was a magic property change, then we'll reinstall the
working-file to pick up any/all appropriate changes. If there was
@@ -275,8 +278,9 @@ run_revert(svn_wc__db_t *db,
svn_boolean_t use_commit_times;
svn_skel_t *wi_file_install;
- use_commit_times = svn_skel__parse_int(arg1->next->next->next,
- scratch_pool) != 0;
+ SVN_ERR(svn_skel__parse_int(&val, arg1->next->next->next,
+ scratch_pool));
+ use_commit_times = (val != 0);
SVN_ERR(svn_wc__wq_build_file_install(&wi_file_install,
db, local_abspath,
@@ -292,7 +296,6 @@ run_revert(svn_wc__db_t *db,
{
SVN__NOT_IMPLEMENTED();
}
-#ifdef SVN_WC__SINGLE_DB
else if (kind == svn_wc__db_kind_dir)
{
svn_node_kind_t disk_kind;
@@ -301,7 +304,6 @@ run_revert(svn_wc__db_t *db,
if (disk_kind == svn_node_none)
SVN_ERR(svn_io_dir_make(local_abspath, APR_OS_DEFAULT, scratch_pool));
}
-#endif
if (kind == svn_wc__db_kind_dir)
parent_abspath = local_abspath;
@@ -527,132 +529,6 @@ svn_wc__wq_add_revert(svn_boolean_t *wil
}
/* ------------------------------------------------------------------------ */
-#ifndef SVN_WC__SINGLE_DB
-/* OP_KILLME */
-
-/* Process the OP_KILLME work item WORK_ITEM.
- * See svn_wc__wq_add_killme() which generates this work item.
- * Implements (struct work_item_dispatch).func. */
-static svn_error_t *
-run_killme(svn_wc__db_t *db,
- const svn_skel_t *work_item,
- const char *wri_abspath,
- svn_cancel_func_t cancel_func,
- void *cancel_baton,
- apr_pool_t *scratch_pool)
-{
- const svn_skel_t *arg1 = work_item->children->next;
- const char *dir_abspath;
- svn_boolean_t adm_only;
- svn_wc__db_status_t status;
- svn_revnum_t original_revision;
- svn_revnum_t parent_revision;
- const char *repos_relpath;
- const char *repos_root_url;
- const char *repos_uuid;
- svn_error_t *err;
-
- /* We need a NUL-terminated path, so copy it out of the skel. */
- dir_abspath = apr_pstrmemdup(scratch_pool, arg1->data, arg1->len);
- adm_only = svn_skel__parse_int(arg1->next, scratch_pool) != 0;
-
- err = svn_wc__db_base_get_info(&status, NULL, &original_revision,
- NULL, NULL, NULL,
- NULL, NULL, NULL,
- NULL, NULL, NULL,
- NULL, NULL, NULL,
- db, dir_abspath,
- scratch_pool, scratch_pool);
- if (err)
- {
- if (err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND)
- return svn_error_return(err);
-
- /* The administrative area in the subdir is gone, and the subdir
- is also removed from its parent's record. */
- svn_error_clear(err);
-
- /* When we removed the directory, if ADM_ONLY was TRUE, then that
- has definitely been done and there is nothing left to do.
-
- If ADM_ONLY was FALSE, then the subdir and its contents were
- removed *before* the administrative was removed. Anything that
- may be left are unversioned nodes. We don't want to do anything
- to those, so we're done for this case, too. */
- return SVN_NO_ERROR;
- }
- if (status == svn_wc__db_status_obstructed)
- {
- /* The subdir's administrative area has already been removed, but
- there was still an entry in the parent. Whatever is in that
- record, it doesn't matter. The subdir has been handled already. */
- return SVN_NO_ERROR;
- }
-
- SVN_ERR(svn_wc__db_read_info(NULL, NULL, &parent_revision,
- NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL,
- db, svn_dirent_dirname(dir_abspath,
- scratch_pool),
- scratch_pool, scratch_pool));
-
- /* Remember the repository this node is associated with. */
- SVN_ERR(svn_wc__db_scan_base_repos(&repos_relpath, &repos_root_url,
- &repos_uuid,
- db, dir_abspath,
- scratch_pool, scratch_pool));
-
- /* Blow away the administrative directories, and possibly the working
- copy tree too. */
- err = svn_wc__internal_remove_from_revision_control(
- db, dir_abspath,
- !adm_only /* destroy_wf */, FALSE /* instant_error */,
- cancel_func, cancel_baton,
- scratch_pool);
- if (err && err->apr_err != SVN_ERR_WC_LEFT_LOCAL_MOD)
- return svn_error_return(err);
- svn_error_clear(err);
-
- /* If revnum of this dir is greater than parent's revnum, then
- recreate 'deleted' entry in parent. */
- if (original_revision > parent_revision)
- {
- SVN_ERR(svn_wc__db_base_add_absent_node(
- db, dir_abspath,
- repos_relpath, repos_root_url, repos_uuid,
- original_revision, svn_wc__db_kind_dir,
- svn_wc__db_status_not_present,
- NULL, NULL,
- scratch_pool));
- }
-
- return SVN_NO_ERROR;
-}
-
-
-svn_error_t *
-svn_wc__wq_add_killme(svn_wc__db_t *db,
- const char *dir_abspath,
- svn_boolean_t adm_only,
- apr_pool_t *scratch_pool)
-{
- svn_skel_t *work_item = svn_skel__make_empty_list(scratch_pool);
-
- /* The skel still points at DIR_ABSPATH, but the skel will be serialized
- just below in the wq_add call. */
- svn_skel__prepend_int(adm_only, work_item, scratch_pool);
- svn_skel__prepend_str(dir_abspath, work_item, scratch_pool);
- svn_skel__prepend_str(OP_KILLME, work_item, scratch_pool);
-
- SVN_ERR(svn_wc__db_wq_add(db, dir_abspath, work_item, scratch_pool));
-
- return SVN_NO_ERROR;
-}
-#endif
-
-/* ------------------------------------------------------------------------ */
/* OP_REMOVE_BASE */
/* Removes a BASE_NODE and all it's data, leaving any adds and copies as is.
@@ -680,15 +556,7 @@ remove_base_node(svn_wc__db_t *db,
&have_work, NULL, NULL,
db, local_abspath, scratch_pool, scratch_pool));
-#ifndef SVN_WC__SINGLE_DB
- if (!have_base)
- return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
- _("Node '%s' not found."),
- svn_dirent_local_style(local_abspath,
- scratch_pool));
-#else
SVN_ERR_ASSERT(have_base); /* Verified in caller and _base_get_children() */
-#endif
if (wrk_status == svn_wc__db_status_normal
|| wrk_status == svn_wc__db_status_not_present
@@ -733,17 +601,8 @@ remove_base_node(svn_wc__db_t *db,
if (base_status == svn_wc__db_status_normal
&& wrk_status != svn_wc__db_status_added
-#ifndef SVN_WC__SINGLE_DB
- && wrk_status != svn_wc__db_status_obstructed_add
-#endif
&& wrk_status != svn_wc__db_status_excluded)
{
-#ifndef SVN_WC__SINGLE_DB
- if (base_kind == svn_wc__db_kind_dir)
- SVN_ERR(svn_wc__adm_destroy(db, local_abspath, cancel_func, cancel_baton,
- scratch_pool));
-#endif
-
if (wrk_status != svn_wc__db_status_deleted
&& (base_kind == svn_wc__db_kind_file
|| base_kind == svn_wc__db_kind_symlink))
@@ -751,10 +610,7 @@ remove_base_node(svn_wc__db_t *db,
SVN_ERR(svn_io_remove_file2(local_abspath, TRUE, scratch_pool));
}
else if (base_kind == svn_wc__db_kind_dir
-#ifdef SVN_WC__SINGLE_DB
- && wrk_status != svn_wc__db_status_deleted
-#endif
- )
+ && wrk_status != svn_wc__db_status_deleted)
{
svn_error_t *err = svn_io_dir_remove_nonrecursive(local_abspath,
scratch_pool);
@@ -772,9 +628,6 @@ remove_base_node(svn_wc__db_t *db,
SVN_ERR(svn_wc__db_temp_op_remove_entry(db, local_abspath, scratch_pool));
}
else if (wrk_status == svn_wc__db_status_added
-#ifndef SVN_WC__SINGLE_DB
- || wrk_status == svn_wc__db_status_obstructed_add
-#endif
|| (have_work && wrk_status == svn_wc__db_status_excluded))
/* ### deletes of working additions should fall in this case, but
### we can't express these without the 4th tree */
@@ -806,9 +659,11 @@ run_base_remove(svn_wc__db_t *db,
svn_revnum_t revision;
const char *repos_relpath, *repos_root_url, *repos_uuid;
svn_wc__db_kind_t kind;
+ apr_int64_t val;
local_abspath = apr_pstrmemdup(scratch_pool, arg1->data, arg1->len);
- keep_not_present = svn_skel__parse_int(arg1->next, scratch_pool) != 0;
+ SVN_ERR(svn_skel__parse_int(&val, arg1->next, scratch_pool));
+ keep_not_present = (val != 0);
if (keep_not_present)
{
@@ -824,18 +679,6 @@ run_base_remove(svn_wc__db_t *db,
&repos_uuid,
db, local_abspath, scratch_pool,
scratch_pool));
-
-#ifndef SVN_WC__SINGLE_DB
- /* ### When LOCAL_ABSPATH is obstructed, we might not receive a valid
- ### revision here. For the small time that is left until Single-DB
- ### just mark the not-present node as revision 0, as we are not
- ### interested in the revision of not-present nodes anyway.
-
- ### Triggered by update_tests.py 15: issue #919, updates that delete
- */
- if (!SVN_IS_VALID_REVNUM(revision))
- revision = 0;
-#endif
}
SVN_ERR(remove_base_node(db, local_abspath,
@@ -900,13 +743,16 @@ run_deletion_postcommit(svn_wc__db_t *db
svn_revnum_t new_revision;
svn_boolean_t no_unlock;
svn_wc__db_kind_t kind;
+ apr_int64_t val;
/* ### warning: this code has not been vetted for running multiple times */
/* We need a NUL-terminated path, so copy it out of the skel. */
local_abspath = apr_pstrmemdup(scratch_pool, arg1->data, arg1->len);
- new_revision = (svn_revnum_t)svn_skel__parse_int(arg1->next, scratch_pool);
- no_unlock = svn_skel__parse_int(arg1->next->next, scratch_pool) != 0;
+ SVN_ERR(svn_skel__parse_int(&val, arg1->next, scratch_pool));
+ new_revision = (svn_revnum_t)val;
+ SVN_ERR(svn_skel__parse_int(&val, arg1->next->next, scratch_pool));
+ no_unlock = (val != 0);
SVN_ERR(svn_wc__db_read_kind(&kind, db, local_abspath, FALSE, scratch_pool));
@@ -919,40 +765,6 @@ run_deletion_postcommit(svn_wc__db_t *db
const char *repos_uuid;
svn_revnum_t parent_revision;
-#ifndef SVN_WC__SINGLE_DB
- /* If we are suppose to delete "this dir", drop a 'killme' file
- into my own administrative dir as a signal for svn_wc__run_log()
- to blow away the administrative area after it is finished
- processing this logfile. */
- if (kind == svn_wc__db_kind_dir)
- {
- svn_boolean_t keep_local;
-
- /* Bump the revision number of this_dir anyway, so that it
- might be higher than its parent's revnum. If it's
- higher, then the process that sees KILLME and destroys
- the directory can also place a 'deleted' dir entry in the
- parent. */
- SVN_ERR(svn_wc__db_temp_op_set_rev_and_repos_relpath(db,
- local_abspath,
- new_revision,
- FALSE,
- NULL, NULL,
- NULL, FALSE,
- scratch_pool));
-
- SVN_ERR(svn_wc__db_temp_determine_keep_local(&keep_local, db,
- local_abspath,
- scratch_pool));
-
- /* Ensure the directory is deleted later. */
- return svn_error_return(svn_wc__wq_add_killme(
- db, local_abspath,
- keep_local /* adm_only */,
- scratch_pool));
- }
-#endif
-
/* Get hold of repository info, if we are going to need it,
before deleting the file, */
SVN_ERR(svn_wc__db_base_get_info(NULL, NULL, &parent_revision, NULL,
@@ -1296,11 +1108,7 @@ log_do_committed(svn_wc__db_t *db,
db, child_abspath, iterpool, iterpool));
/* Committing a deletion should remove the local nodes. */
- if (child_status == svn_wc__db_status_deleted
-#ifndef SVN_WC__SINGLE_DB
- || child_status == svn_wc__db_status_obstructed_delete
-#endif
- )
+ if (child_status == svn_wc__db_status_deleted)
{
SVN_ERR(svn_wc__internal_remove_from_revision_control(
db, child_abspath,
@@ -1463,12 +1271,6 @@ log_do_committed(svn_wc__db_t *db,
return SVN_NO_ERROR;
}
-#ifndef SVN_WC__SINGLE_DB
- /* Make sure we have a parent stub in a clean/unmodified state. */
- SVN_ERR(svn_wc__db_temp_set_parent_stub_to_normal(db, local_abspath,
- TRUE, scratch_pool));
-#endif
-
return SVN_NO_ERROR;
}
@@ -1495,10 +1297,13 @@ run_postcommit(svn_wc__db_t *db,
svn_boolean_t keep_changelist, no_unlock;
const char *tmp_text_base_abspath;
svn_error_t *err;
+ apr_int64_t val;
local_abspath = apr_pstrmemdup(scratch_pool, arg1->data, arg1->len);
- new_revision = (svn_revnum_t)svn_skel__parse_int(arg1->next, scratch_pool);
- changed_date = svn_skel__parse_int(arg1->next->next, scratch_pool);
+ SVN_ERR(svn_skel__parse_int(&val, arg1->next, scratch_pool));
+ new_revision = (svn_revnum_t)val;
+ SVN_ERR(svn_skel__parse_int(&val, arg1->next->next, scratch_pool));
+ changed_date = (apr_time_t)val;
if (arg1->next->next->next->len == 0)
changed_author = NULL;
else
@@ -1520,7 +1325,8 @@ run_postcommit(svn_wc__db_t *db,
else
SVN_ERR(svn_skel__parse_proplist(&new_dav_cache, arg5->next,
scratch_pool));
- keep_changelist = svn_skel__parse_int(arg5->next->next, scratch_pool) != 0;
+ SVN_ERR(svn_skel__parse_int(&val, arg5->next->next, scratch_pool));
+ keep_changelist = (val != 0);
/* Before r927056, this WQ item didn't have this next field. Catch any
* attempt to run this code on a WC having a stale WQ item in it. */
@@ -1533,14 +1339,20 @@ run_postcommit(svn_wc__db_t *db,
arg5->next->next->next->len);
if (arg5->next->next->next->next)
- no_unlock = svn_skel__parse_int(arg5->next->next->next->next,
- scratch_pool) != 0;
+ {
+ SVN_ERR(svn_skel__parse_int(&val, arg5->next->next->next->next,
+ scratch_pool));
+ no_unlock = (val != 0);
+ }
else
no_unlock = TRUE;
if (arg5->next->next->next->next->next)
- changed_rev = svn_skel__parse_int(arg5->next->next->next->next->next,
- scratch_pool);
+ {
+ SVN_ERR(svn_skel__parse_int(&val, arg5->next->next->next->next->next,
+ scratch_pool));
+ changed_rev = (svn_revnum_t)val;
+ }
else
changed_rev = new_revision; /* Behavior before fixing issue #3676 */
@@ -1610,6 +1422,34 @@ svn_wc__wq_add_postcommit(svn_wc__db_t *
}
/* ------------------------------------------------------------------------ */
+/* OP_POSTUPGRADE */
+
+static svn_error_t *
+run_postupgrade(svn_wc__db_t *db,
+ const svn_skel_t *work_item,
+ const char *wri_abspath,
+ svn_cancel_func_t cancel_func,
+ void *cancel_baton,
+ apr_pool_t *scratch_pool)
+{
+ SVN_ERR(svn_wc__wipe_postupgrade(wri_abspath, FALSE,
+ cancel_func, cancel_baton, scratch_pool));
+
+ return SVN_NO_ERROR;
+}
+
+svn_error_t *
+svn_wc__wq_build_postupgrade(svn_skel_t **work_item,
+ apr_pool_t *result_pool)
+{
+ *work_item = svn_skel__make_empty_list(result_pool);
+
+ svn_skel__prepend_str(OP_POSTUPGRADE, *work_item, result_pool);
+
+ return SVN_NO_ERROR;
+}
+
+/* ------------------------------------------------------------------------ */
/* OP_FILE_INSTALL */
@@ -1637,10 +1477,13 @@ run_file_install(svn_wc__db_t *db,
const char *temp_dir_abspath;
svn_stream_t *dst_stream;
const char *dst_abspath;
+ apr_int64_t val;
local_abspath = apr_pstrmemdup(scratch_pool, arg1->data, arg1->len);
- use_commit_times = svn_skel__parse_int(arg1->next, scratch_pool) != 0;
- record_fileinfo = svn_skel__parse_int(arg1->next->next, scratch_pool) != 0;
+ SVN_ERR(svn_skel__parse_int(&val, arg1->next, scratch_pool));
+ use_commit_times = (val != 0);
+ SVN_ERR(svn_skel__parse_int(&val, arg1->next->next, scratch_pool));
+ record_fileinfo = (val != 0);
if (arg4 == NULL)
{
@@ -2116,7 +1959,12 @@ run_record_fileinfo(svn_wc__db_t *db,
local_abspath = apr_pstrmemdup(scratch_pool, arg1->data, arg1->len);
if (arg1->next)
- set_time = svn_skel__parse_int(arg1->next, scratch_pool);
+ {
+ apr_int64_t val;
+
+ SVN_ERR(svn_skel__parse_int(&val, arg1->next, scratch_pool));
+ set_time = (apr_time_t)val;
+ }
if (set_time != 0)
{
@@ -2393,10 +2241,7 @@ static const struct work_item_dispatch d
{ OP_TMP_SET_TEXT_CONFLICT_MARKERS, run_set_text_conflict_markers },
{ OP_TMP_SET_PROPERTY_CONFLICT_MARKER, run_set_property_conflict_marker },
{ OP_PRISTINE_GET_TRANSLATED, run_pristine_get_translated },
-
-#ifndef SVN_WC__SINGLE_DB
- { OP_KILLME, run_killme },
-#endif
+ { OP_POSTUPGRADE, run_postupgrade },
/* Sentinel. */
{ NULL }
Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/workqueue.h
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/workqueue.h?rev=997216&r1=997215&r2=997216&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/workqueue.h (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/workqueue.h Wed Sep 15 07:44:02 2010
@@ -213,17 +213,6 @@ svn_wc__wq_build_base_remove(svn_skel_t
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
-#ifndef SVN_WC__SINGLE_DB
-/* Handle the old "KILLME" concept -- perform the actual deletion of a
- subdir (or just its admin area) during post-commit processing of a
- deleted subdir. */
-svn_error_t *
-svn_wc__wq_add_killme(svn_wc__db_t *db,
- const char *adm_abspath,
- svn_boolean_t adm_only,
- apr_pool_t *scratch_pool);
-#endif
-
/* ### Temporary helper to store text conflict marker locations as a wq
### operation. Eventually the data must be stored in the pristine store+db
@@ -301,6 +290,10 @@ svn_wc__wq_add_postcommit(svn_wc__db_t *
svn_boolean_t no_unlock,
apr_pool_t *scratch_pool);
+svn_error_t *
+svn_wc__wq_build_postupgrade(svn_skel_t **work_item,
+ apr_pool_t *scratch_pool);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
Modified: subversion/branches/javahl-ra/subversion/mod_dav_svn/authz.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/mod_dav_svn/authz.c?rev=997216&r1=997215&r2=997216&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/mod_dav_svn/authz.c (original)
+++ subversion/branches/javahl-ra/subversion/mod_dav_svn/authz.c Wed Sep 15 07:44:02 2010
@@ -32,17 +32,12 @@
#include "dav_svn.h"
-/* Convert incoming REV and PATH from request R into a version-resource URI
- for REPOS and perform a GET subrequest on it. This will invoke any authz
- modules loaded into apache. Return TRUE if the subrequest succeeds, FALSE
- otherwise. If REV is SVN_INVALID_REVNUM, then we look at HEAD.
-*/
-static svn_boolean_t
-allow_read(request_rec *r,
- const dav_svn_repos *repos,
- const char *path,
- svn_revnum_t rev,
- apr_pool_t *pool)
+svn_boolean_t
+dav_svn__allow_read(request_rec *r,
+ const dav_svn_repos *repos,
+ const char *path,
+ svn_revnum_t rev,
+ apr_pool_t *pool)
{
const char *uri;
request_rec *subreq;
@@ -176,7 +171,7 @@ authz_read(svn_boolean_t *allowed,
}
/* We have a (rev, path) pair to check authorization on. */
- *allowed = allow_read(arb->r, arb->repos, revpath, rev, pool);
+ *allowed = dav_svn__allow_read(arb->r, arb->repos, revpath, rev, pool);
return SVN_NO_ERROR;
}
@@ -195,10 +190,10 @@ dav_svn__authz_read_func(dav_svn__authz_
svn_boolean_t
-dav_svn__allow_read(const dav_resource *resource,
- svn_revnum_t rev,
- apr_pool_t *pool)
+dav_svn__allow_read_resource(const dav_resource *resource,
+ svn_revnum_t rev,
+ apr_pool_t *pool)
{
- return allow_read(resource->info->r, resource->info->repos,
- resource->info->repos_path, rev, pool);
+ return dav_svn__allow_read(resource->info->r, resource->info->repos,
+ resource->info->repos_path, rev, pool);
}
Modified: subversion/branches/javahl-ra/subversion/mod_dav_svn/dav_svn.h
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/mod_dav_svn/dav_svn.h?rev=997216&r1=997215&r2=997216&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/mod_dav_svn/dav_svn.h (original)
+++ subversion/branches/javahl-ra/subversion/mod_dav_svn/dav_svn.h Wed Sep 15 07:44:02 2010
@@ -672,17 +672,32 @@ typedef struct
} dav_svn__authz_read_baton;
-/* Convert incoming RESOURCE and revision REV into a version-resource URI and
- perform a GET subrequest on it. This will invoke any authz modules loaded
- into apache. Return TRUE if the subrequest succeeds, FALSE otherwise.
+/* Return TRUE iff the current user (as determined by Apache's
+ authentication system) has permission to read PATH in REPOS at REV
+ (where an invalid REV means "HEAD"). This will invoke any authz
+ modules loaded into Apache unless this Subversion location has been
+ configured to bypass those in favor of a direct lookup in the
+ Subversion authz subsystem. Use POOL for any temporary allocation.
+*/
+svn_boolean_t
+dav_svn__allow_read(request_rec *r,
+ const dav_svn_repos *repos,
+ const char *path,
+ svn_revnum_t rev,
+ apr_pool_t *pool);
- If REV is SVN_INVALID_REVNUM, then we look at HEAD.
- Use POOL for any temporary allocation.
+/* Return TRUE iff the current user (as determined by Apache's
+ authentication system) has permission to read RESOURCE in REV
+ (where an invalid REV means "HEAD"). This will invoke any authz
+ modules loaded into Apache unless this Subversion location has been
+ configured to bypass those in favor of a direct lookup in the
+ Subversion authz subsystem. Use POOL for any temporary allocation.
*/
svn_boolean_t
-dav_svn__allow_read(const dav_resource *resource,
- svn_revnum_t rev,
- apr_pool_t *pool);
+dav_svn__allow_read_resource(const dav_resource *resource,
+ svn_revnum_t rev,
+ apr_pool_t *pool);
+
/* If authz is enabled in the specified BATON, return a read authorization
function. Otherwise, return NULL. */
Modified: subversion/branches/javahl-ra/subversion/mod_dav_svn/liveprops.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/mod_dav_svn/liveprops.c?rev=997216&r1=997215&r2=997216&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/mod_dav_svn/liveprops.c (original)
+++ subversion/branches/javahl-ra/subversion/mod_dav_svn/liveprops.c Wed Sep 15 07:44:02 2010
@@ -144,7 +144,7 @@ get_path_revprop(svn_string_t **propval,
{
*propval = NULL;
- if (! dav_svn__allow_read(resource, committed_rev, pool))
+ if (! dav_svn__allow_read_resource(resource, committed_rev, pool))
return SVN_NO_ERROR;
/* Get the property of the created revision. The authz is already
Modified: subversion/branches/javahl-ra/subversion/mod_dav_svn/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/mod_dav_svn/lock.c?rev=997216&r1=997215&r2=997216&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/mod_dav_svn/lock.c (original)
+++ subversion/branches/javahl-ra/subversion/mod_dav_svn/lock.c Wed Sep 15 07:44:02 2010
@@ -458,7 +458,8 @@ get_locks(dav_lockdb *lockdb,
/* If the resource's fs path is unreadable, we don't want to say
anything about locks attached to it.*/
- if (! dav_svn__allow_read(resource, SVN_INVALID_REVNUM, resource->pool))
+ if (! dav_svn__allow_read_resource(resource, SVN_INVALID_REVNUM,
+ resource->pool))
return dav_new_error(resource->pool, HTTP_FORBIDDEN,
DAV_ERR_LOCK_SAVE_LOCK,
"Path is not accessible.");
@@ -518,7 +519,8 @@ find_lock(dav_lockdb *lockdb,
/* If the resource's fs path is unreadable, we don't want to say
anything about locks attached to it.*/
- if (! dav_svn__allow_read(resource, SVN_INVALID_REVNUM, resource->pool))
+ if (! dav_svn__allow_read_resource(resource, SVN_INVALID_REVNUM,
+ resource->pool))
return dav_new_error(resource->pool, HTTP_FORBIDDEN,
DAV_ERR_LOCK_SAVE_LOCK,
"Path is not accessible.");
@@ -596,7 +598,8 @@ has_locks(dav_lockdb *lockdb, const dav_
/* If the resource's fs path is unreadable, we don't want to say
anything about locks attached to it.*/
- if (! dav_svn__allow_read(resource, SVN_INVALID_REVNUM, resource->pool))
+ if (! dav_svn__allow_read_resource(resource, SVN_INVALID_REVNUM,
+ resource->pool))
return dav_new_error(resource->pool, HTTP_FORBIDDEN,
DAV_ERR_LOCK_SAVE_LOCK,
"Path is not accessible.");
@@ -639,7 +642,8 @@ append_locks(dav_lockdb *lockdb,
/* If the resource's fs path is unreadable, we don't allow a lock to
be created on it. */
- if (! dav_svn__allow_read(resource, SVN_INVALID_REVNUM, resource->pool))
+ if (! dav_svn__allow_read_resource(resource, SVN_INVALID_REVNUM,
+ resource->pool))
return dav_new_error(resource->pool, HTTP_FORBIDDEN,
DAV_ERR_LOCK_SAVE_LOCK,
"Path is not accessible.");
@@ -806,7 +810,8 @@ remove_lock(dav_lockdb *lockdb,
/* If the resource's fs path is unreadable, we don't allow a lock to
be removed from it. */
- if (! dav_svn__allow_read(resource, SVN_INVALID_REVNUM, resource->pool))
+ if (! dav_svn__allow_read_resource(resource, SVN_INVALID_REVNUM,
+ resource->pool))
return dav_new_error(resource->pool, HTTP_FORBIDDEN,
DAV_ERR_LOCK_SAVE_LOCK,
"Path is not accessible.");
@@ -891,7 +896,8 @@ refresh_locks(dav_lockdb *lockdb,
/* If the resource's fs path is unreadable, we don't want to say
anything about locks attached to it.*/
- if (! dav_svn__allow_read(resource, SVN_INVALID_REVNUM, resource->pool))
+ if (! dav_svn__allow_read_resource(resource, SVN_INVALID_REVNUM,
+ resource->pool))
return dav_new_error(resource->pool, HTTP_FORBIDDEN,
DAV_ERR_LOCK_SAVE_LOCK,
"Path is not accessible.");
Modified: subversion/branches/javahl-ra/subversion/mod_dav_svn/repos.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/mod_dav_svn/repos.c?rev=997216&r1=997215&r2=997216&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/mod_dav_svn/repos.c (original)
+++ subversion/branches/javahl-ra/subversion/mod_dav_svn/repos.c Wed Sep 15 07:44:02 2010
@@ -44,6 +44,7 @@
#include "svn_sorts.h"
#include "svn_version.h"
#include "svn_props.h"
+#include "svn_ctype.h"
#include "mod_dav_svn.h"
#include "svn_ra.h" /* for SVN_RA_CAPABILITY_* */
#include "svn_dirent_uri.h"
@@ -1519,7 +1520,7 @@ static const char *get_entry(apr_pool_t
/* Look for 'var = value' --- and make sure the var is in lcase. */
- for (cp = parm; (*cp && !apr_isspace(*cp) && *cp != '='); ++cp)
+ for (cp = parm; (*cp && !svn_ctype_isspace(*cp) && *cp != '='); ++cp)
{
*cp = apr_tolower(*cp);
}
@@ -1530,7 +1531,7 @@ static const char *get_entry(apr_pool_t
}
*cp++ = '\0'; /* Delimit var */
- while (*cp && (apr_isspace(*cp) || *cp == '='))
+ while (*cp && (svn_ctype_isspace(*cp) || *cp == '='))
{
++cp;
}
@@ -1544,7 +1545,7 @@ static const char *get_entry(apr_pool_t
}
else
{
- for (end = cp; (*end && !apr_isspace(*end)); end++);
+ for (end = cp; (*end && !svn_ctype_isspace(*end)); end++);
}
if (*end)
{
@@ -3119,6 +3120,7 @@ deliver(const dav_resource *resource, ap
apr_hash_t *entries;
apr_pool_t *entry_pool;
apr_array_header_t *sorted;
+ svn_revnum_t dir_rev = SVN_INVALID_REVNUM;
int i;
/* XML schema for the directory index if xslt_uri is set:
@@ -3196,6 +3198,7 @@ deliver(const dav_resource *resource, ap
}
else
{
+ dir_rev = svn_fs_revision_root_revision(resource->info->root.root);
serr = svn_fs_dir_entries(&entries, resource->info->root.root,
resource->info->repos_path, resource->pool);
if (serr != NULL)
@@ -3304,9 +3307,31 @@ deliver(const dav_resource *resource, ap
const char *name = item->key;
const char *href = name;
svn_boolean_t is_dir = (entry->kind == svn_node_dir);
+ const char *repos_relpath = NULL;
svn_pool_clear(entry_pool);
+ /* DIR_REV is set to a valid revision if we're looking at
+ the entries of a versioned directory. Otherwise, we're
+ looking at a parent-path listing. */
+ if (SVN_IS_VALID_REVNUM(dir_rev))
+ {
+ repos_relpath = svn_path_join(resource->info->repos_path,
+ name, entry_pool);
+ if (! dav_svn__allow_read(resource->info->r,
+ resource->info->repos,
+ repos_relpath,
+ dir_rev,
+ entry_pool))
+ continue;
+ }
+ else
+ {
+ /* ### TODO: We could test for readability of the root
+ directory of each repository and hide those that
+ the user can't see. */
+ }
+
/* append a trailing slash onto the name for directories. we NEED
this for the href portion so that the relative reference will
descend properly. for the visible portion, it is just nice. */
@@ -3932,6 +3957,7 @@ do_walk(walker_ctx_t *ctx, int depth)
apr_size_t uri_len;
apr_size_t repos_len;
apr_hash_t *children;
+ apr_pool_t *iterpool;
/* Clear the temporary pool. */
svn_pool_clear(ctx->info.pool);
@@ -4007,6 +4033,7 @@ do_walk(walker_ctx_t *ctx, int depth)
params->pool);
/* iterate over the children in this collection */
+ iterpool = svn_pool_create(params->pool);
for (hi = apr_hash_first(params->pool, children); hi; hi = apr_hash_next(hi))
{
const void *key;
@@ -4014,6 +4041,8 @@ do_walk(walker_ctx_t *ctx, int depth)
void *val;
svn_fs_dirent_t *dirent;
+ svn_pool_clear(iterpool);
+
/* fetch one of the children */
apr_hash_this(hi, &key, &klen, &val);
dirent = val;
@@ -4021,7 +4050,16 @@ do_walk(walker_ctx_t *ctx, int depth)
/* authorize access to this resource, if applicable */
if (params->walk_type & DAV_WALKTYPE_AUTH)
{
- /* ### how/what to do? */
+ const char *repos_relpath =
+ apr_pstrcat(iterpool,
+ apr_pstrmemdup(iterpool,
+ ctx->repos_path->data,
+ ctx->repos_path->len),
+ key, NULL);
+ if (! dav_svn__allow_read(ctx->info.r, ctx->info.repos,
+ repos_relpath, ctx->info.root.rev,
+ iterpool))
+ continue;
}
/* append this child to our buffers */
@@ -4062,6 +4100,9 @@ do_walk(walker_ctx_t *ctx, int depth)
ctx->uri->len = uri_len;
ctx->repos_path->len = repos_len;
}
+
+ svn_pool_destroy(iterpool);
+
return NULL;
}
Modified: subversion/branches/javahl-ra/subversion/svn/conflict-callbacks.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svn/conflict-callbacks.c?rev=997216&r1=997215&r2=997216&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svn/conflict-callbacks.c (original)
+++ subversion/branches/javahl-ra/subversion/svn/conflict-callbacks.c Wed Sep 15 07:44:02 2010
@@ -59,23 +59,33 @@ svn_cl__conflict_baton_make(svn_cl__acce
svn_cl__accept_t
svn_cl__accept_from_word(const char *word)
{
- if (strcmp(word, SVN_CL__ACCEPT_POSTPONE) == 0)
+ /* Shorthand options are consistent with svn_cl__conflict_handler(). */
+ if (strcmp(word, SVN_CL__ACCEPT_POSTPONE) == 0
+ || strcmp(word, "p") == 0)
return svn_cl__accept_postpone;
if (strcmp(word, SVN_CL__ACCEPT_BASE) == 0)
+ /* ### shorthand? */
return svn_cl__accept_base;
if (strcmp(word, SVN_CL__ACCEPT_WORKING) == 0)
+ /* ### shorthand? */
return svn_cl__accept_working;
- if (strcmp(word, SVN_CL__ACCEPT_MINE_CONFLICT) == 0)
+ if (strcmp(word, SVN_CL__ACCEPT_MINE_CONFLICT) == 0
+ || strcmp(word, "mc") == 0)
return svn_cl__accept_mine_conflict;
- if (strcmp(word, SVN_CL__ACCEPT_THEIRS_CONFLICT) == 0)
+ if (strcmp(word, SVN_CL__ACCEPT_THEIRS_CONFLICT) == 0
+ || strcmp(word, "tc") == 0)
return svn_cl__accept_theirs_conflict;
- if (strcmp(word, SVN_CL__ACCEPT_MINE_FULL) == 0)
+ if (strcmp(word, SVN_CL__ACCEPT_MINE_FULL) == 0
+ || strcmp(word, "mf") == 0)
return svn_cl__accept_mine_full;
- if (strcmp(word, SVN_CL__ACCEPT_THEIRS_FULL) == 0)
+ if (strcmp(word, SVN_CL__ACCEPT_THEIRS_FULL) == 0
+ || strcmp(word, "tf") == 0)
return svn_cl__accept_theirs_full;
- if (strcmp(word, SVN_CL__ACCEPT_EDIT) == 0)
+ if (strcmp(word, SVN_CL__ACCEPT_EDIT) == 0
+ || strcmp(word, "e") == 0)
return svn_cl__accept_edit;
- if (strcmp(word, SVN_CL__ACCEPT_LAUNCH) == 0)
+ if (strcmp(word, SVN_CL__ACCEPT_LAUNCH) == 0
+ || strcmp(word, "l") == 0)
return svn_cl__accept_launch;
/* word is an invalid action. */
return svn_cl__accept_invalid;
@@ -493,6 +503,7 @@ svn_cl__conflict_handler(svn_wc_conflict
if (strcmp(answer, "s") == 0)
{
+ /* These are used in svn_cl__accept_from_word(). */
SVN_ERR(svn_cmdline_fprintf(stderr, subpool,
_("\n"
" (e) edit - change merged file in an editor\n"
Modified: subversion/branches/javahl-ra/subversion/svn/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svn/main.c?rev=997216&r1=997215&r2=997216&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svn/main.c (original)
+++ subversion/branches/javahl-ra/subversion/svn/main.c Wed Sep 15 07:44:02 2010
@@ -283,7 +283,9 @@ const apr_getopt_option_t svn_cl__option
" "
"ARG may be one of 'LF', 'CR', 'CRLF'")},
{"limit", 'l', 1, N_("maximum number of log entries")},
- {"no-unlock", opt_no_unlock, 0, N_("don't unlock the targets")},
+ {"no-unlock", opt_no_unlock, 0, N_("don't unlock the targets\n"
+ " "
+ "[aliases: --nul, --keep-lock]")},
{"summarize", opt_summarize, 0, N_("show a summary of the results")},
{"remove", opt_remove, 0, N_("remove changelist association")},
{"changelist", opt_changelist, 1,
@@ -399,6 +401,8 @@ const apr_getopt_option_t svn_cl__option
{"iw", opt_ignore_whitespace, 0, NULL},
{"diff", opt_show_diff, 0, NULL},
{"idiff", opt_internal_diff, 0, NULL},
+ {"nul", opt_no_unlock, 0, NULL},
+ {"keep-lock", opt_no_unlock, 0, NULL},
{0, 0, 0, 0},
};
Modified: subversion/branches/javahl-ra/subversion/svn/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svn/util.c?rev=997216&r1=997215&r2=997216&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svn/util.c (original)
+++ subversion/branches/javahl-ra/subversion/svn/util.c Wed Sep 15 07:44:02 2010
@@ -764,9 +764,9 @@ svn_cl__get_log_message(const char **log
&& item->state_flags & SVN_CLIENT_COMMIT_ITEM_LOCK_TOKEN)
unlock = 'U';
- svn_stringbuf_appendbytes(tmp_message, &text_mod, 1);
- svn_stringbuf_appendbytes(tmp_message, &prop_mod, 1);
- svn_stringbuf_appendbytes(tmp_message, &unlock, 1);
+ svn_stringbuf_appendbyte(tmp_message, text_mod);
+ svn_stringbuf_appendbyte(tmp_message, prop_mod);
+ svn_stringbuf_appendbyte(tmp_message, unlock);
if (item->state_flags & SVN_CLIENT_COMMIT_ITEM_IS_COPY)
/* History included via copy/move. */
svn_stringbuf_appendcstr(tmp_message, "+ ");
@@ -829,8 +829,8 @@ svn_cl__get_log_message(const char **log
for (len = message->len - 1; len >= 0; len--)
{
/* FIXME: should really use an UTF-8 whitespace test
- rather than apr_isspace, which is locale dependant */
- if (! apr_isspace(message->data[len]))
+ rather than svn_ctype_isspace, which is ASCII only */
+ if (! svn_ctype_isspace(message->data[len]))
break;
}
if (len < 0)
Modified: subversion/branches/javahl-ra/subversion/svndumpfilter/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svndumpfilter/main.c?rev=997216&r1=997215&r2=997216&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svndumpfilter/main.c (original)
+++ subversion/branches/javahl-ra/subversion/svndumpfilter/main.c Wed Sep 15 07:44:02 2010
@@ -91,20 +91,20 @@ write_prop_to_stringbuf(svn_stringbuf_t
bytes_used = apr_snprintf(buf, sizeof(buf), "%d", namelen);
svn_stringbuf_appendbytes(*strbuf, buf, bytes_used);
- svn_stringbuf_appendbytes(*strbuf, "\n", 1);
+ svn_stringbuf_appendbyte(*strbuf, '\n');
svn_stringbuf_appendbytes(*strbuf, name, namelen);
- svn_stringbuf_appendbytes(*strbuf, "\n", 1);
+ svn_stringbuf_appendbyte(*strbuf, '\n');
/* Output value length, then value. */
svn_stringbuf_appendbytes(*strbuf, "V ", 2);
bytes_used = apr_snprintf(buf, sizeof(buf), "%" APR_SIZE_T_FMT, value->len);
svn_stringbuf_appendbytes(*strbuf, buf, bytes_used);
- svn_stringbuf_appendbytes(*strbuf, "\n", 1);
+ svn_stringbuf_appendbyte(*strbuf, '\n');
svn_stringbuf_appendbytes(*strbuf, value->data, value->len);
- svn_stringbuf_appendbytes(*strbuf, "\n", 1);
+ svn_stringbuf_appendbyte(*strbuf, '\n');
}
@@ -365,19 +365,19 @@ output_revision(struct revision_baton_t
bytes_used = apr_snprintf(buf, sizeof(buf), ": %" APR_SIZE_T_FMT,
props->len);
svn_stringbuf_appendbytes(rb->header, buf, bytes_used);
- svn_stringbuf_appendbytes(rb->header, "\n", 1);
+ svn_stringbuf_appendbyte(rb->header, '\n');
}
svn_stringbuf_appendcstr(rb->header, SVN_REPOS_DUMPFILE_CONTENT_LENGTH);
bytes_used = apr_snprintf(buf, sizeof(buf), ": %" APR_SIZE_T_FMT, props->len);
svn_stringbuf_appendbytes(rb->header, buf, bytes_used);
- svn_stringbuf_appendbytes(rb->header, "\n", 1);
+ svn_stringbuf_appendbyte(rb->header, '\n');
/* put an end to headers */
- svn_stringbuf_appendbytes(rb->header, "\n", 1);
+ svn_stringbuf_appendbyte(rb->header, '\n');
/* put an end to revision */
- svn_stringbuf_appendbytes(props, "\n", 1);
+ svn_stringbuf_appendbyte(props, '\n');
/* write out the revision */
/* Revision is written out in the following cases:
@@ -633,7 +633,7 @@ output_node(struct node_baton_t *nb)
bytes_used = apr_snprintf(buf, sizeof(buf), ": %" APR_SIZE_T_FMT,
nb->props->len);
svn_stringbuf_appendbytes(nb->header, buf, bytes_used);
- svn_stringbuf_appendbytes(nb->header, "\n", 1);
+ svn_stringbuf_appendbyte(nb->header, '\n');
}
if (nb->has_text)
{
@@ -642,16 +642,16 @@ output_node(struct node_baton_t *nb)
bytes_used = apr_snprintf(buf, sizeof(buf), ": %" SVN_FILESIZE_T_FMT,
nb->tcl);
svn_stringbuf_appendbytes(nb->header, buf, bytes_used);
- svn_stringbuf_appendbytes(nb->header, "\n", 1);
+ svn_stringbuf_appendbyte(nb->header, '\n');
}
svn_stringbuf_appendcstr(nb->header, SVN_REPOS_DUMPFILE_CONTENT_LENGTH);
bytes_used = apr_snprintf(buf, sizeof(buf), ": %" SVN_FILESIZE_T_FMT,
(svn_filesize_t) (nb->props->len + nb->tcl));
svn_stringbuf_appendbytes(nb->header, buf, bytes_used);
- svn_stringbuf_appendbytes(nb->header, "\n", 1);
+ svn_stringbuf_appendbyte(nb->header, '\n');
/* put an end to headers */
- svn_stringbuf_appendbytes(nb->header, "\n", 1);
+ svn_stringbuf_appendbyte(nb->header, '\n');
/* 3. output all the stuff */
Modified: subversion/branches/javahl-ra/subversion/svnserve/cyrus_auth.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svnserve/cyrus_auth.c?rev=997216&r1=997215&r2=997216&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svnserve/cyrus_auth.c (original)
+++ subversion/branches/javahl-ra/subversion/svnserve/cyrus_auth.c Wed Sep 15 07:44:02 2010
@@ -297,13 +297,13 @@ svn_error_t *cyrus_auth_request(svn_ra_s
SVN_CONFIG_SECTION_SASL,
SVN_CONFIG_OPTION_MIN_SSF,
"0");
- secprops.min_ssf = atoi(val);
+ SVN_ERR(svn_cstring_atoui(&secprops.min_ssf, val));
svn_config_get(b->cfg, &val,
SVN_CONFIG_SECTION_SASL,
SVN_CONFIG_OPTION_MAX_SSF,
"256");
- secprops.max_ssf = atoi(val);
+ SVN_ERR(svn_cstring_atoui(&secprops.max_ssf, val));
/* Set security properties. */
result = sasl_setprop(sasl_ctx, SASL_SEC_PROPS, &secprops);
Modified: subversion/branches/javahl-ra/subversion/svnserve/log-escape.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svnserve/log-escape.c?rev=997216&r1=997215&r2=997216&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svnserve/log-escape.c (original)
+++ subversion/branches/javahl-ra/subversion/svnserve/log-escape.c Wed Sep 15 07:44:02 2010
@@ -40,10 +40,10 @@
#include <apr.h>
-#include <apr_lib.h>
#define APR_WANT_STRFUNC
#include <apr_want.h>
#include "server.h"
+#include "svn_ctype.h"
/* copied from httpd-2.2.4/server/util.c */
/* c2x takes an unsigned, and expects the caller has guaranteed that
@@ -93,7 +93,9 @@ apr_size_t escape_errorlog_item(char *de
which does this same check with a fast lookup table. Well,
mostly the same; we don't escape quotes, as that does.
*/
- if (*s && (!apr_isprint(*s) || *s == '\\' || apr_iscntrl(*s))) {
+ if (*s && ( !svn_ctype_isprint(*s)
+ || *s == '\\'
+ || svn_ctype_iscntrl(*s))) {
*d++ = '\\';
if (d >= ep) {
--d;
Modified: subversion/branches/javahl-ra/subversion/svnserve/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svnserve/main.c?rev=997216&r1=997215&r2=997216&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svnserve/main.c (original)
+++ subversion/branches/javahl-ra/subversion/svnserve/main.c Wed Sep 15 07:44:02 2010
@@ -44,11 +44,13 @@
#include "svn_path.h"
#include "svn_opt.h"
#include "svn_repos.h"
+#include "svn_string.h"
#include "svn_fs.h"
#include "svn_version.h"
#include "svn_io.h"
#include "svn_private_config.h"
+#include "private/svn_dep_compat.h"
#include "winservice.h"
#ifdef HAVE_UNISTD_H
@@ -473,7 +475,17 @@ int main(int argc, const char *argv[])
break;
case SVNSERVE_OPT_LISTEN_PORT:
- port = atoi(arg);
+ {
+ apr_uint64_t val;
+
+ err = svn_cstring_strtoui64(&val, arg, 0, APR_UINT16_MAX, 10);
+ if (err)
+ return svn_cmdline_handle_exit_error(
+ svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, err,
+ _("Invalid port '%s'"), arg),
+ pool, "svnserve: ");
+ port = (apr_uint16_t)val;
+ }
break;
case SVNSERVE_OPT_LISTEN_HOST:
Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/authz_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/authz_tests.py?rev=997216&r1=997215&r2=997216&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/authz_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/authz_tests.py Wed Sep 15 07:44:02 2010
@@ -1026,6 +1026,40 @@ def wc_wc_copy_revert(sbox):
expected_status.remove('A/B/E', 'A/B/E/alpha', 'A/B/E/beta')
svntest.actions.run_and_verify_status(sbox.wc_dir, expected_status)
+def authz_recursive_ls(sbox):
+ "recursive ls with private subtrees"
+
+ sbox.build(create_wc = False)
+ local_dir = sbox.wc_dir
+ write_restrictive_svnserve_conf(sbox.repo_dir)
+
+ write_authz_file(sbox, {'/' : '* = r',
+ '/A/B/E' : '* =',
+ '/A/mu' : '* =',
+ })
+ expected_entries = [
+ 'A/',
+ 'A/B/',
+ 'A/B/F/',
+ 'A/B/lambda',
+ 'A/C/',
+ 'A/D/',
+ 'A/D/G/',
+ 'A/D/G/pi',
+ 'A/D/G/rho',
+ 'A/D/G/tau',
+ 'A/D/H/',
+ 'A/D/H/chi',
+ 'A/D/H/omega',
+ 'A/D/H/psi',
+ 'A/D/gamma',
+ 'iota',
+ ]
+ svntest.actions.run_and_verify_svn('recursive ls from /',
+ map(lambda x: x + '\n', expected_entries),
+ [], 'ls', '-R',
+ sbox.repo_url)
+
########################################################################
# Run the tests
@@ -1057,6 +1091,9 @@ test_list = [ None,
Skip(wc_wc_copy, svntest.main.is_ra_type_file),
Skip(wc_wc_copy_revert,
svntest.main.is_ra_type_file),
+ XFail(Skip(authz_recursive_ls,
+ svntest.main.is_ra_type_file),
+ svntest.main.is_ra_type_svn),
]
if __name__ == '__main__':
Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/copy_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/copy_tests.py?rev=997216&r1=997215&r2=997216&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/copy_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/copy_tests.py Wed Sep 15 07:44:02 2010
@@ -4701,6 +4701,7 @@ def changed_data_should_match_checkout(s
os.chdir(was_cwd)
os.chdir(wc_dir)
+ verify_out = svntest.verify.UnorderedOutput(verify_out)
svntest.actions.run_and_verify_svn(None, verify_out, [], 'status', '-v')
os.chdir(was_cwd)
Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/externals_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/externals_tests.py?rev=997216&r1=997215&r2=997216&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/externals_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/externals_tests.py Wed Sep 15 07:44:02 2010
@@ -1554,7 +1554,7 @@ def update_modify_file_external(sbox):
# Update to modify the file external, this asserts in update_editor.c
expected_output = svntest.wc.State(wc_dir, {
- 'A/external' : Item(status='E '),
+ 'A/external' : Item(status='U '),
})
expected_disk.tweak('A/mu', 'A/external',
contents=expected_disk.desc['A/mu'].contents
@@ -1600,7 +1600,7 @@ test_list = [ None,
relegate_external,
wc_repos_file_externals,
merge_target_with_externals,
- XFail(update_modify_file_external),
+ update_modify_file_external,
]
if __name__ == '__main__':
Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/merge_tests.py?rev=997216&r1=997215&r2=997216&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/merge_tests.py Wed Sep 15 07:44:02 2010
@@ -14922,32 +14922,6 @@ def merge_automatic_conflict_resolution(
A_COPY_path)
svntest.actions.run_and_verify_svn(None, None, [],
'revert', '--recursive', wc_dir)
- # Issue #3514 fails here with an error similar to:
- #
- # ..\..\..\subversion\svn\util.c:900: (apr_err=125007)
- #..\..\..\subversion\libsvn_client\merge.c:9408: (apr_err=125007)
- #..\..\..\subversion\libsvn_client\merge.c:8054: (apr_err=125007)
- #..\..\..\subversion\libsvn_client\merge.c:7733: (apr_err=125007)
- #..\..\..\subversion\libsvn_client\merge.c:4870: (apr_err=125007)
- #..\..\..\subversion\libsvn_repos\reporter.c:1266: (apr_err=125007)
- #..\..\..\subversion\libsvn_repos\reporter.c:1197: (apr_err=125007)
- #..\..\..\subversion\libsvn_repos\reporter.c:1135: (apr_err=125007)
- #..\..\..\subversion\libsvn_repos\reporter.c:854: (apr_err=125007)
- #..\..\..\subversion\libsvn_repos\reporter.c:1135: (apr_err=125007)
- #..\..\..\subversion\libsvn_repos\reporter.c:854: (apr_err=125007)
- #..\..\..\subversion\libsvn_repos\reporter.c:1135: (apr_err=125007)
- #..\..\..\subversion\libsvn_client\repos_diff.c:861: (apr_err=125007)
- #..\..\..\subversion\libsvn_client\merge.c:1511: (apr_err=125007)
- #..\..\..\subversion\libsvn_wc\merge.c:1309: (apr_err=125007)
- #..\..\..\subversion\libsvn_wc\merge.c:1252: (apr_err=125007)
- #..\..\..\subversion\libsvn_wc\merge.c:914: (apr_err=125007)
- #..\..\..\subversion\libsvn_wc\merge.c:794: (apr_err=125007)
- #..\..\..\subversion\libsvn_wc\merge.c:460: (apr_err=125007)
- #..\..\..\subversion\libsvn_wc\log.c:921: (apr_err=125007)
- #..\..\..\subversion\libsvn_wc\log.c:878: (apr_err=125007)
- #svn: Path 'C:\DOCUME~1\pburba\LOCALS~1\Temp\tempfile.149.tmp' is not a
- # child of 'C:\SVN\src-trunk\Debug\subversion\tests\cmdline\svn-test-work\
- # working_copies\merge_tests-137\A_COPY\D\H'
svntest.actions.run_and_verify_merge(A_COPY_path, '2', '3',
sbox.repo_url + '/A', None,
expected_output,
@@ -14963,16 +14937,11 @@ def merge_automatic_conflict_resolution(
svntest.actions.run_and_verify_svn(None, None, [],
'revert', '--recursive', wc_dir)
# Test --accept base
- #
- # Make a working change to A_COPY/D/H/psi.
- svntest.main.file_write(psi_COPY_path, "WORKING.\n")
expected_output = wc.State(A_COPY_path, {'D/H/psi' : Item(status='U ')})
expected_elision_output = wc.State(A_COPY_path, {
})
- expected_disk.tweak('D/H/psi', contents="BASE")
+ expected_disk.tweak('D/H/psi', contents="This is the file 'psi'.\n")
expected_status.tweak('D/H/psi', status='M ')
- # Issue #3514 fails here with an error similar to the one above for
- # --accept theirs-full.
svntest.actions.run_and_verify_merge(A_COPY_path, '2', '3',
sbox.repo_url + '/A', None,
expected_output,
@@ -16101,7 +16070,7 @@ test_list = [ None,
copy_then_replace_via_merge,
SkipUnless(record_only_merge,
server_has_mergeinfo),
- XFail(merge_automatic_conflict_resolution),
+ merge_automatic_conflict_resolution,
skipped_files_get_correct_mergeinfo,
committed_case_only_move_and_revert,
merge_into_wc_for_deleted_branch,
Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/patch_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/patch_tests.py?rev=997216&r1=997215&r2=997216&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/patch_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/patch_tests.py Wed Sep 15 07:44:02 2010
@@ -2976,6 +2976,43 @@ def patch_prop_with_fuzz(sbox):
1, # check-props
1) # dry-run
+def patch_git_add_file(sbox):
+ "patch that contains empty files"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+ patch_file_path = make_patch_path(sbox)
+
+ new_path = os.path.join(wc_dir, 'new')
+
+ unidiff_patch = [
+ "Index: new\n",
+ "===================================================================\n",
+ "diff --git a/new b/new\n",
+ "new file mode 10644\n",
+ ]
+
+ svntest.main.file_write(patch_file_path, ''.join(unidiff_patch))
+
+ expected_output = [
+ 'A %s\n' % os.path.join(wc_dir, 'new'),
+ ]
+ expected_disk = svntest.main.greek_state.copy()
+ expected_disk.add({'new' : Item(contents="")})
+
+ expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+ expected_status.add({'new' : Item(status='A ', wc_rev=0)})
+
+ expected_skip = wc.State('', { })
+
+ svntest.actions.run_and_verify_patch(wc_dir, os.path.abspath(patch_file_path),
+ expected_output,
+ expected_disk,
+ expected_status,
+ expected_skip,
+ None, # expected err
+ 1, # check-props
+ 1) # dry-run
########################################################################
#Run the tests
@@ -3005,6 +3042,7 @@ test_list = [ None,
patch_add_path_with_props,
patch_prop_offset,
patch_prop_with_fuzz,
+ patch_git_add_file,
]
if __name__ == '__main__':
Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/resolve_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/resolve_tests.py?rev=997216&r1=997215&r2=997216&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/resolve_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/resolve_tests.py Wed Sep 15 07:44:02 2010
@@ -95,17 +95,97 @@ def automatic_conflict_resolution(sbox):
# Test 'svn resolve -R --accept theirs-full'
do_text_conflicting_merge()
svntest.actions.run_and_verify_resolve([psi_COPY_path],
- '-R', '--accept', 'theirs-full',
+ '-R', '--accept', 'tf',
A_COPY_path)
wc_disk.tweak('A_COPY/D/H/psi', contents="New content")
svntest.actions.verify_disk(wc_dir, wc_disk)
+#----------------------------------------------------------------------
+# Test for issue #3707 'property conflicts not handled correctly by
+# svn resolve'.
+def prop_conflict_resolution(sbox):
+ "resolving prop conflicts"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+
+ # Some paths we'll care about
+ iota_path = os.path.join(wc_dir, "iota")
+ mu_path = os.path.join(wc_dir, "A", "mu")
+
+ # r2 - Set property 'propname:propval' on iota and A/mu.
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'ps', 'propname', 'propval',
+ iota_path, mu_path)
+ svntest.actions.run_and_verify_svn(None, None, [], 'commit',
+ '-m', 'create some new properties',
+ wc_dir)
+
+ # r3 - Delete property 'propname' from iota and change the property value
+ # of 'propname' on A/mu to 'incoming'.
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'pd', 'propname', iota_path)
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'ps', 'propname', 'incoming', mu_path)
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'commit', '-m', 'delete a property',
+ wc_dir)
+
+ def do_prop_conflicting_up_and_resolve(resolve_accept,
+ resolved_deleted_prop_val_output,
+ resolved_edited_prop_val_output):
+
+ """Revert the WC, update it to r2, set the property 'propname:local_edit'
+ on iota and A/mu. Update the WC, postponing conflicts, then run svn
+ resolve -R --accept=RESOLVE_ACCEPT and check that the property on iota
+ (using svn pg), is RESOLVED_PROP_VAL_OUTPUT and property on A/mu is
+ RESOLVED_EDITED_PROP_VAL_OUTPUT. Both output arguments follow the rules
+ for the expected_stdout arg to run_and_verify_svn2()"""
+
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'revert', '--recursive', wc_dir)
+ svntest.actions.run_and_verify_svn(None, None, [], 'up', '-r2', wc_dir)
+ svntest.actions.run_and_verify_svn(None, None, [], 'ps',
+ 'propname', 'local_edit',
+ iota_path, mu_path)
+ svntest.actions.run_and_verify_svn(None, None, [], 'up',
+ '--accept=postpone', wc_dir)
+ svntest.actions.run_and_verify_resolve([iota_path, mu_path], '-R',
+ '--accept', resolve_accept, wc_dir)
+ svntest.actions.run_and_verify_svn(
+ 'svn revolve -R --accept=' + resolve_accept + ' of prop conflict '
+ 'not resolved as expected;',
+ resolved_deleted_prop_val_output, [], 'pg', 'propname', iota_path)
+ svntest.actions.run_and_verify_svn(
+ 'svn revolve -R --accept=' + resolve_accept + ' of prop conflict '
+ 'not resolved as expected;',
+ resolved_edited_prop_val_output, [], 'pg', 'propname', mu_path)
+
+ # Test how svn resolve deals with prop conflicts resulting from:
+ #
+ # 1) 'iota' - An incoming prop delete on a local prop modification.
+ # 2) 'A/mu' - An incoming prop edit on a local prop modification.
+ #
+ # This currently fails because svn resolve --accept=[theirs-conflict |
+ # theirs-full] does not delete the locally modified property.
+ do_prop_conflicting_up_and_resolve('mine-full',
+ ['local_edit\n'], ['local_edit\n'])
+ do_prop_conflicting_up_and_resolve('mine-conflict',
+ ['local_edit\n'], ['local_edit\n'])
+ do_prop_conflicting_up_and_resolve('working',
+ ['local_edit\n'], ['local_edit\n'])
+ do_prop_conflicting_up_and_resolve('theirs-conflict',
+ [], ['incoming\n'])
+ do_prop_conflicting_up_and_resolve('theirs-full',
+ [], ['incoming\n'])
+
########################################################################
# Run the tests
# list all tests here, starting with None:
test_list = [ None,
automatic_conflict_resolution,
+ XFail(prop_conflict_resolution),
]
if __name__ == '__main__':
Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/update_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/update_tests.py?rev=997216&r1=997215&r2=997216&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/update_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/update_tests.py Wed Sep 15 07:44:02 2010
@@ -26,6 +26,7 @@
# General modules
import sys, re, os, subprocess
+import time
# Our testing module
import svntest
@@ -5720,6 +5721,33 @@ def update_with_excluded_subdir(sbox):
svntest.actions.run_and_verify_update(wc_dir, expected_output,
expected_disk, expected_status)
+#----------------------------------------------------------------------
+# Test for issue #3471 'svn up touches file w/ lock & svn:keywords property'
+#
+# Marked as XFail until the issue is fixed.
+def update_with_file_lock_and_keywords_property_set(sbox):
+ """update with file lock & keywords property set"""
+ sbox.build()
+
+ wc_dir = sbox.wc_dir
+
+ mu_path = os.path.join(wc_dir, 'A', 'mu')
+ svntest.main.file_append(mu_path, '$Id$')
+ svntest.main.run_svn(None, 'ps', 'svn:keywords', 'Id', mu_path)
+ svntest.main.run_svn(None, 'lock', mu_path)
+ mu_ts_before_update = os.path.getmtime(mu_path)
+
+ # Make sure we are at a different timestamp to really notice a mtime change
+ time.sleep(1)
+
+ # Issue #3471 manifests itself here; The timestamp of 'mu' gets updated
+ # to the time of the last "svn up".
+ sbox.simple_update()
+ mu_ts_after_update = os.path.getmtime(mu_path)
+ if (mu_ts_before_update != mu_ts_after_update):
+ print("The timestamp of 'mu' before and after update does not match.")
+ raise svntest.Failure
+
#######################################################################
# Run the tests
@@ -5792,6 +5820,7 @@ test_list = [ None,
add_moved_file_has_props,
XFail(add_moved_file_has_props2),
update_with_excluded_subdir,
+ XFail(update_with_file_lock_and_keywords_property_set)
]
if __name__ == '__main__':
Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/upgrade_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/upgrade_tests.py?rev=997216&r1=997215&r2=997216&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/upgrade_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/upgrade_tests.py Wed Sep 15 07:44:02 2010
@@ -594,6 +594,26 @@ def missing_dirs2(sbox):
os.mkdir(sbox.ospath('A/B_new/F'))
svntest.actions.run_and_verify_svn(None, None, [],
'upgrade', sbox.wc_dir)
+ expected_status = svntest.wc.State(sbox.wc_dir,
+ {
+ '' : Item(status=' ', wc_rev='1'),
+ 'A' : Item(status=' ', wc_rev='1'),
+ 'A/mu' : Item(status=' ', wc_rev='1'),
+ 'A/C' : Item(status=' ', wc_rev='1'),
+ 'A/D' : Item(status='~ ', wc_rev='?'),
+ 'A/B' : Item(status=' ', wc_rev='1'),
+ 'A/B/F' : Item(status=' ', wc_rev='1'),
+ 'A/B/E' : Item(status='! ', wc_rev='?'),
+ 'A/B/lambda' : Item(status=' ', wc_rev='1'),
+ 'iota' : Item(status=' ', wc_rev='1'),
+ 'A/B_new' : Item(status='A ', wc_rev='-', copied='+'),
+ 'A/B_new/E' : Item(status='! ', wc_rev='?'),
+ 'A/B_new/F' : Item(status='~ ', wc_rev='?'),
+ 'A/B_new/lambda' : Item(status=' ', wc_rev='-', copied='+'),
+ })
+ if svntest.main.wc_is_singledb(sbox.wc_dir):
+ expected_status.tweak('A/D', 'A/B_new/F', status='! ')
+ run_and_verify_status_no_server(sbox.wc_dir, expected_status)
def delete_and_keep_local(sbox):
"check status delete and delete --keep-local"
@@ -643,7 +663,7 @@ test_list = [ None,
x3_1_4_6,
x3_1_6_12,
missing_dirs,
- XFail(missing_dirs2),
+ missing_dirs2,
XFail(delete_and_keep_local),
]
Propchange: subversion/branches/javahl-ra/subversion/tests/libsvn_client/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Sep 15 07:44:02 2010
@@ -2,3 +2,4 @@
client-test
*.lo
test-patch*
+test-wc*
Modified: subversion/branches/javahl-ra/subversion/tests/libsvn_delta/delta-window-test.h
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/libsvn_delta/delta-window-test.h?rev=997216&r1=997215&r2=997216&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/libsvn_delta/delta-window-test.h (original)
+++ subversion/branches/javahl-ra/subversion/tests/libsvn_delta/delta-window-test.h Wed Sep 15 07:44:02 2010
@@ -26,9 +26,9 @@
#define APR_WANT_STDIO
#define APR_WANT_STRFUNC
#include <apr_want.h>
-#include <apr_lib.h>
#include "svn_delta.h"
+#include "svn_ctype.h"
static apr_off_t
delta_window_size_estimate(const svn_txdelta_window_t *window)
@@ -99,7 +99,7 @@ delta_window_print(const svn_txdelta_win
for (tmp = offset; tmp < offset + length; ++tmp)
{
int const dat = window->new_data->data[tmp];
- if (apr_iscntrl(dat) || !apr_isascii(dat))
+ if (svn_ctype_iscntrl(dat) || !svn_ctype_isascii(dat))
fprintf(stream, "\\%3.3o", dat & 0xff);
else if (dat == '\\')
fputs("\\\\", stream);
Modified: subversion/branches/javahl-ra/subversion/tests/libsvn_subr/skel-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/libsvn_subr/skel-test.c?rev=997216&r1=997215&r2=997216&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/libsvn_subr/skel-test.c (original)
+++ subversion/branches/javahl-ra/subversion/tests/libsvn_subr/skel-test.c Wed Sep 15 07:44:02 2010
@@ -184,9 +184,9 @@ put_implicit_length_byte(svn_stringbuf_t
&& ! skel_is_space(term)
&& ! skel_is_paren(term))
abort();
- svn_stringbuf_appendbytes(str, &byte, 1);
+ svn_stringbuf_appendbyte(str, byte);
if (term != '\0')
- svn_stringbuf_appendbytes(str, &term, 1);
+ svn_stringbuf_appendbyte(str, term);
}
@@ -239,7 +239,7 @@ put_implicit_length_all_chars(svn_string
svn_stringbuf_appendbytes(str, name, len);
if (term != '\0')
- svn_stringbuf_appendbytes(str, &term, 1);
+ svn_stringbuf_appendbyte(str, term);
}
@@ -461,7 +461,7 @@ put_list_start(svn_stringbuf_t *str, cha
svn_stringbuf_appendcstr(str, "(");
for (i = 0; i < len; i++)
- svn_stringbuf_appendbytes(str, &space, 1);
+ svn_stringbuf_appendbyte(str, space);
}
@@ -476,7 +476,7 @@ put_list_end(svn_stringbuf_t *str, char
abort();
for (i = 0; i < len; i++)
- svn_stringbuf_appendbytes(str, &space, 1);
+ svn_stringbuf_appendbyte(str, space);
svn_stringbuf_appendcstr(str, ")");
}
Modified: subversion/branches/javahl-ra/subversion/tests/libsvn_subr/stream-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/libsvn_subr/stream-test.c?rev=997216&r1=997215&r2=997216&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/libsvn_subr/stream-test.c (original)
+++ subversion/branches/javahl-ra/subversion/tests/libsvn_subr/stream-test.c Wed Sep 15 07:44:02 2010
@@ -128,7 +128,7 @@ generate_test_bytes(int num_bytes, apr_p
for (total = 0, repeat = repeat_iter = 1, c = 0; total < num_bytes; total++)
{
- svn_stringbuf_appendbytes(buffer, &c, 1);
+ svn_stringbuf_appendbyte(buffer, c);
repeat_iter--;
if (repeat_iter == 0)