You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by vm...@apache.org on 2012/06/07 14:57:48 UTC
svn commit: r1347595 [4/5] - in /subversion/branches/javahl-ra: ./
build/generator/ notes/ notes/directory-index/
subversion/bindings/javahl/native/ subversion/include/
subversion/include/private/ subversion/libsvn_auth_kwallet/
subversion/libsvn_clien...
Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/wc-queries.sql
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/wc-queries.sql?rev=1347595&r1=1347594&r2=1347595&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/wc-queries.sql Thu Jun 7 12:57:43 2012
@@ -279,22 +279,27 @@ WHERE wc_id = ?1 AND local_relpath = ?2
SELECT dav_cache FROM nodes
WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = 0
+-- STMT_SELECT_DELETION_INFO
+SELECT (SELECT b.presence FROM nodes AS b
+ WHERE b.wc_id = ?1 AND b.local_relpath = ?2 AND b.op_depth = 0),
+ work.presence, work.op_depth
+FROM nodes_current AS work
+WHERE work.wc_id = ?1 AND work.local_relpath = ?2 AND work.op_depth > 0
+LIMIT 1
+
+-- STMT_SELECT_DELETION_INFO_SCAN
/* ### FIXME. modes_move.moved_to IS NOT NULL works when there is
only one move but we need something else when there are several. */
--- STMT_SELECT_DELETION_INFO
-SELECT nodes_base.presence, nodes_work.presence, nodes_move.moved_to,
- nodes_work.op_depth
-FROM nodes AS nodes_work
-LEFT OUTER JOIN nodes nodes_move ON nodes_move.wc_id = nodes_work.wc_id
- AND nodes_move.local_relpath = nodes_work.local_relpath
- AND nodes_move.moved_to IS NOT NULL
-LEFT OUTER JOIN nodes nodes_base ON nodes_base.wc_id = nodes_work.wc_id
- AND nodes_base.local_relpath = nodes_work.local_relpath
- AND nodes_base.op_depth = 0
-WHERE nodes_work.wc_id = ?1 AND nodes_work.local_relpath = ?2
- AND nodes_work.op_depth = (SELECT MAX(op_depth) FROM nodes
- WHERE wc_id = ?1 AND local_relpath = ?2
- AND op_depth > 0)
+SELECT (SELECT b.presence FROM nodes AS b
+ WHERE b.wc_id = ?1 AND b.local_relpath = ?2 AND b.op_depth = 0),
+ work.presence, work.op_depth, moved.moved_to
+FROM nodes_current AS work
+LEFT OUTER JOIN nodes AS moved
+ ON moved.wc_id = work.wc_id
+ AND moved.local_relpath = work.local_relpath
+ AND moved.moved_to IS NOT NULL
+WHERE work.wc_id = ?1 AND work.local_relpath = ?2 AND work.op_depth > 0
+LIMIT 1
-- STMT_SELECT_OP_DEPTH_MOVED_TO
SELECT op_depth, moved_to, repos_path, revision
@@ -347,6 +352,10 @@ WHERE wc_id = ?1 AND local_relpath = ?2
AND op_depth = (SELECT MAX(op_depth) FROM nodes
WHERE wc_id = ?1 AND local_relpath = ?2)
+-- STMT_UPDATE_NODE_FILEINFO_OPDEPTH
+UPDATE nodes SET translated_size = ?3, last_mod_time = ?4
+WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = ?5
+
-- STMT_UPDATE_ACTUAL_TREE_CONFLICTS
UPDATE actual_node SET tree_conflict_data = ?3
WHERE wc_id = ?1 AND local_relpath = ?2
@@ -531,8 +540,9 @@ SELECT N.wc_id, N.local_relpath, N.paren
AND IS_STRICT_DESCENDANT_OF(N.local_relpath, ?2)
AND A.changelist = ?3
--- STMT_SELECT_TARGETS
-SELECT local_relpath, parent_relpath from targets_list
+/* Only used by commented dump_targets() in wc_db.c */
+/*-- STMT_SELECT_TARGETS
+SELECT local_relpath, parent_relpath from targets_list*/
-- STMT_INSERT_ACTUAL_EMPTIES
INSERT OR IGNORE INTO actual_node (
@@ -560,6 +570,7 @@ WHERE wc_id = ?1 AND local_relpath = ?2
-- STMT_DELETE_ACTUAL_EMPTIES
DELETE FROM actual_node
WHERE wc_id = ?1
+ AND IS_STRICT_DESCENDANT_OF(local_relpath, ?2)
AND properties IS NULL
AND conflict_old IS NULL
AND conflict_new IS NULL
@@ -903,7 +914,7 @@ SELECT wc_id, ?3 /*local_relpath*/, ?4 /
?7/*moved_here*/, kind, changed_revision, changed_date,
changed_author, checksum, properties, translated_size,
last_mod_time, symlink_target,
- (SELECT dst.moved_to FROM nodes_current AS dst
+ (SELECT dst.moved_to FROM nodes AS dst
WHERE dst.wc_id = ?1
AND dst.local_relpath = ?3
AND dst.op_depth = ?4)
@@ -921,7 +932,7 @@ SELECT wc_id, ?3 /*local_relpath*/, ?4 /
?7 /*moved_here*/, kind, changed_revision, changed_date,
changed_author, checksum, properties, translated_size,
last_mod_time, symlink_target,
- (SELECT dst.moved_to FROM nodes_current AS dst
+ (SELECT dst.moved_to FROM nodes AS dst
WHERE dst.wc_id = ?1
AND dst.local_relpath = ?3
AND dst.op_depth = ?4)
@@ -1039,6 +1050,16 @@ FROM nodes_current n
WHERE wc_id = ?1 AND IS_STRICT_DESCENDANT_OF(local_relpath, ?2)
AND kind = 'dir' AND presence IN ('normal', 'incomplete')
+-- STMT_SELECT_CURRENT_PROPS_RECURSIVE
+/* ### Ugly OR to make sqlite use the proper optimizations */
+SELECT IFNULL((SELECT properties FROM actual_node a
+ WHERE a.wc_id = ?1 AND A.local_relpath = n.local_relpath),
+ properties),
+ local_relpath
+FROM nodes_current n
+WHERE (wc_id = ?1 AND local_relpath = ?2)
+ OR (wc_id = ?1 AND IS_STRICT_DESCENDANT_OF(local_relpath, ?2))
+
/* ------------------------------------------------------------------------- */
/* these are used in entries.c */
@@ -1064,16 +1085,8 @@ INSERT INTO actual_node (
wc_id, local_relpath, conflict_data, parent_relpath)
VALUES (?1, ?2, ?3, ?4)
--- STMT_SELECT_OLD_TREE_CONFLICT
-SELECT wc_id, local_relpath, tree_conflict_data
-FROM actual_node
-WHERE tree_conflict_data IS NOT NULL
-
--- STMT_ERASE_OLD_CONFLICTS
-UPDATE actual_node SET tree_conflict_data = NULL
-
-- STMT_SELECT_ALL_FILES
-SELECT DISTINCT local_relpath FROM nodes
+SELECT local_relpath FROM nodes_current
WHERE wc_id = ?1 AND parent_relpath = ?2 AND kind = 'file'
-- STMT_UPDATE_NODE_PROPS
@@ -1084,13 +1097,6 @@ WHERE wc_id = ?1 AND local_relpath = ?2
SELECT 1 FROM nodes WHERE op_depth > 0
LIMIT 1
--- STMT_HAS_ACTUAL_NODES_CONFLICTS
-SELECT 1 FROM actual_node
-WHERE NOT ((prop_reject IS NULL) AND (conflict_old IS NULL)
- AND (conflict_new IS NULL) AND (conflict_working IS NULL)
- AND (tree_conflict_data IS NULL))
-LIMIT 1
-
/* --------------------------------------------------------------------------
* Complex queries for callback walks, caching results in a temporary table.
*
Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db.c?rev=1347595&r1=1347594&r2=1347595&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db.c Thu Jun 7 12:57:43 2012
@@ -109,12 +109,6 @@
#define SQLITE_PROPERTIES_AVAILABLE(stmt, i) \
(svn_sqlite__column_bytes(stmt, i) > 2)
-/* This is a character used to escape itself and the globbing character in
- globbing sql expressions below. See escape_sqlite_like().
-
- NOTE: this should match the character used within wc-metadata.sql */
-#define LIKE_ESCAPE_CHAR "#"
-
/* Calculates the depth of the relpath below "" */
APR_INLINE static int
relpath_depth(const char *relpath)
@@ -452,44 +446,6 @@ lock_from_columns(svn_sqlite__stmt_t *st
}
-/* */
-static const char *
-escape_sqlite_like(const char * const str, apr_pool_t *result_pool)
-{
- char *result;
- const char *old_ptr;
- char *new_ptr;
- int len = 0;
-
- /* Count the number of extra characters we'll need in the escaped string.
- We could just use the worst case (double) value, but we'd still need to
- iterate over the string to get it's length. So why not do something
- useful why iterating over it, and save some memory at the same time? */
- for (old_ptr = str; *old_ptr; ++old_ptr)
- {
- len++;
- if (*old_ptr == '%'
- || *old_ptr == '_'
- || *old_ptr == LIKE_ESCAPE_CHAR[0])
- len++;
- }
-
- result = apr_palloc(result_pool, len + 1);
-
- /* Now do the escaping. */
- for (old_ptr = str, new_ptr = result; *old_ptr; ++old_ptr, ++new_ptr)
- {
- if (*old_ptr == '%'
- || *old_ptr == '_'
- || *old_ptr == LIKE_ESCAPE_CHAR[0])
- *(new_ptr++) = LIKE_ESCAPE_CHAR[0];
- *new_ptr = *old_ptr;
- }
- *new_ptr = '\0';
-
- return result;
-}
-
/* Look up REPOS_ID in SDB and set *REPOS_ROOT_URL and/or *REPOS_UUID to
its root URL and UUID respectively. If REPOS_ID is INVALID_REPOS_ID,
use NULL for both URL and UUID. Either or both output parameters may be
@@ -4692,8 +4648,7 @@ svn_wc__db_global_record_fileinfo(svn_wc
rb.translated_size = translated_size;
rb.last_mod_time = last_mod_time;
- SVN_ERR(svn_wc__db_with_txn(wcroot, local_relpath, db_record_fileinfo, &rb,
- scratch_pool));
+ SVN_ERR(db_record_fileinfo(&rb, wcroot, local_relpath, scratch_pool));
/* We *totally* monkeyed the entries. Toss 'em. */
SVN_ERR(flush_entries(wcroot, local_abspath, svn_depth_empty, scratch_pool));
@@ -5111,7 +5066,7 @@ set_changelist_txn(void *baton,
{
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
STMT_DELETE_ACTUAL_EMPTIES));
- SVN_ERR(svn_sqlite__bind_int64(stmt, 1, wcroot->wc_id));
+ SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
SVN_ERR(svn_sqlite__step_done(stmt));
}
@@ -8510,6 +8465,66 @@ svn_wc__db_read_pristine_props(apr_hash_
return SVN_NO_ERROR;
}
+svn_error_t *
+svn_wc__db_prop_retrieve_recursive(apr_hash_t **values,
+ svn_wc__db_t *db,
+ const char *local_abspath,
+ const char *propname,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ svn_wc__db_wcroot_t *wcroot;
+ const char *local_relpath;
+ svn_sqlite__stmt_t *stmt;
+ svn_boolean_t have_row;
+ apr_pool_t *iterpool;
+
+ SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
+
+ SVN_ERR(svn_wc__db_wcroot_parse_local_abspath(&wcroot, &local_relpath, db,
+ local_abspath, scratch_pool, scratch_pool));
+ VERIFY_USABLE_WCROOT(wcroot);
+
+ SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
+ STMT_SELECT_CURRENT_PROPS_RECURSIVE));
+ SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
+
+ *values = apr_hash_make(result_pool);
+
+ SVN_ERR(svn_sqlite__step(&have_row, stmt));
+ iterpool = svn_pool_create(scratch_pool);
+ while (have_row)
+ {
+ apr_hash_t *node_props;
+ svn_string_t *value;
+
+ svn_pool_clear(iterpool);
+
+ SVN_ERR(svn_sqlite__column_properties(&node_props, stmt, 0,
+ iterpool, iterpool));
+
+ value = (node_props
+ ? apr_hash_get(node_props, propname, APR_HASH_KEY_STRING)
+ : NULL);
+
+ if (value)
+ {
+ apr_hash_set(*values,
+ svn_dirent_join(wcroot->abspath,
+ svn_sqlite__column_text(stmt, 1, NULL),
+ result_pool),
+ APR_HASH_KEY_STRING,
+ svn_string_dup(value, result_pool));
+ }
+
+ SVN_ERR(svn_sqlite__step(&have_row, stmt));
+ }
+
+ svn_pool_destroy(iterpool);
+
+ return svn_error_trace(svn_sqlite__reset(stmt));
+}
+
svn_error_t *
svn_wc__db_read_children_of_working_node(const apr_array_header_t **children,
@@ -10464,7 +10479,7 @@ get_moved_to(struct scan_deletion_baton_
const char *local_relpath,
apr_pool_t *scratch_pool)
{
- const char *moved_to_relpath = svn_sqlite__column_text(stmt, 2, NULL);
+ const char *moved_to_relpath = svn_sqlite__column_text(stmt, 3, NULL);
if (moved_to_relpath)
{
@@ -10530,8 +10545,11 @@ scan_deletion_txn(void *baton,
check op-roots and parents of op-roots. */
scan = (sd_baton->moved_to_op_root_relpath || sd_baton->moved_to_relpath);
- SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
- STMT_SELECT_DELETION_INFO));
+ SVN_ERR(svn_sqlite__get_statement(
+ &stmt, wcroot->sdb,
+ scan ? STMT_SELECT_DELETION_INFO_SCAN
+ : STMT_SELECT_DELETION_INFO));
+
SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, current_relpath));
SVN_ERR(svn_sqlite__step(&have_row, stmt));
if (!have_row)
@@ -10550,7 +10568,7 @@ scan_deletion_txn(void *baton,
path_for_error_message(wcroot, local_relpath,
scratch_pool));
- op_depth = svn_sqlite__column_int(stmt, 3);
+ op_depth = svn_sqlite__column_int(stmt, 2);
/* Special case: LOCAL_RELPATH not-present within a WORKING tree, we
treat this as an op-root. At commit time we need to explicitly
@@ -10604,8 +10622,6 @@ scan_deletion_txn(void *baton,
if (scan || current_depth == op_depth)
{
SVN_ERR(svn_sqlite__reset(stmt));
- SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
- STMT_SELECT_DELETION_INFO));
SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id,
current_relpath));
SVN_ERR(svn_sqlite__step(&have_row, stmt));
@@ -10619,8 +10635,6 @@ scan_deletion_txn(void *baton,
SVN_ERR_ASSERT(current_relpath[0] != '\0'); /* Catch invalid data */
parent_relpath = svn_relpath_dirname(current_relpath, scratch_pool);
- SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
- STMT_SELECT_DELETION_INFO));
SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, parent_relpath));
SVN_ERR(svn_sqlite__step(&have_row, stmt));
if (!have_row)
@@ -10646,7 +10660,7 @@ scan_deletion_txn(void *baton,
}
current_relpath = parent_relpath;
- op_depth = svn_sqlite__column_int(stmt, 3);
+ op_depth = svn_sqlite__column_int(stmt, 2);
have_base = !svn_sqlite__column_is_null(stmt, 0);
}
@@ -11624,6 +11638,7 @@ svn_wc__db_read_kind(svn_kind_t *kind,
svn_wc__db_t *db,
const char *local_abspath,
svn_boolean_t allow_missing,
+ svn_boolean_t show_hidden,
apr_pool_t *scratch_pool)
{
svn_wc__db_wcroot_t *wcroot;
@@ -11661,6 +11676,24 @@ svn_wc__db_read_kind(svn_kind_t *kind,
}
}
+ if (!show_hidden)
+ {
+ int op_depth = svn_sqlite__column_int(stmt_info, 0);
+ svn_wc__db_status_t status = svn_sqlite__column_token(stmt_info, 3,
+ presence_map);
+
+ if (op_depth > 0)
+ SVN_ERR(convert_to_working_status(&status, status));
+
+ if (status == svn_wc__db_status_not_present
+ || status == svn_wc__db_status_excluded)
+ {
+ *kind = svn_kind_none;
+ SVN_ERR(svn_sqlite__reset(stmt_info));
+ return SVN_NO_ERROR;
+ }
+ }
+
*kind = svn_sqlite__column_token(stmt_info, 4, kind_map);
return svn_error_trace(svn_sqlite__reset(stmt_info));
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=1347595&r1=1347594&r2=1347595&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db.h Thu Jun 7 12:57:43 2012
@@ -941,6 +941,18 @@ svn_wc__db_pristine_get_sha1(const svn_c
apr_pool_t *scratch_pool);
+/* If necessary transfers the PRISTINE file of SRC_LOCAL_ABSPATH to the
+ working copy identified by DST_WRI_ABSPATH. If CHECKSUM is not NULL, use
+ CHECKSUM to identify which pristine file to transfer. */
+svn_error_t *
+svn_wc__db_pristine_transfer(svn_wc__db_t *db,
+ const char *src_local_abspath,
+ const svn_checksum_t *checksum,
+ const char *dst_wri_abspath,
+ svn_cancel_func_t cancel_func,
+ void *cancel_baton,
+ apr_pool_t *scratch_pool);
+
/* Remove the pristine text with SHA-1 checksum SHA1_CHECKSUM from the
* pristine store, iff it is not referenced by any of the (other) WC DB
* tables. */
@@ -2059,6 +2071,22 @@ svn_wc__db_read_pristine_props(apr_hash_
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
+
+/** Obtain a mapping of const char * local_abspaths to const svn_string_t*
+ * property values in *VALUES, of all PROPNAME properties on LOCAL_ABSPATH
+ * and its descendants.
+ *
+ * Allocate the result in RESULT_POOL, and perform temporary allocations in
+ * SCRATCH_POOL.
+ */
+svn_error_t *
+svn_wc__db_prop_retrieve_recursive(apr_hash_t **values,
+ svn_wc__db_t *db,
+ const char *local_abspath,
+ const char *propname,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
/* Set *CHILDREN to a new array of the (const char *) basenames of the
immediate children of the working node at LOCAL_ABSPATH in DB.
@@ -2149,12 +2177,16 @@ svn_wc__db_read_conflicts(const apr_arra
If the node is missing and ALLOW_MISSING is FALSE, then it will return
SVN_ERR_WC_PATH_NOT_FOUND.
+ If SHOW_HIDDEN is FALSE and the status of LOCAL_ABSPATH is NOT_PRESENT or
+ EXCLUDED, set KIND to svn_kind_none.
+
Uses SCRATCH_POOL for temporary allocations. */
svn_error_t *
svn_wc__db_read_kind(svn_kind_t *kind,
svn_wc__db_t *db,
const char *local_abspath,
svn_boolean_t allow_missing,
+ svn_boolean_t show_hidden,
apr_pool_t *scratch_pool);
Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db_pristine.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db_pristine.c?rev=1347595&r1=1347594&r2=1347595&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db_pristine.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db_pristine.c Thu Jun 7 12:57:43 2012
@@ -523,6 +523,176 @@ svn_wc__db_pristine_get_sha1(const svn_c
return svn_error_trace(svn_sqlite__reset(stmt));
}
+/* Baton for pristine_transfer() */
+struct pristine_transfer_baton
+{
+ svn_wc__db_wcroot_t *src_wcroot;
+ svn_wc__db_wcroot_t *dst_wcroot;
+ svn_cancel_func_t cancel_func;
+ void * cancel_baton;
+
+ /* pristine install baton, filled from pristine_transfer() */
+ struct pristine_install_baton_t ib;
+};
+
+/* Transaction implementation of svn_wc__db_pristine_transfer().
+ Calls itself again to obtain locks in both working copies */
+static svn_error_t *
+pristine_transfer(void *baton, svn_wc__db_wcroot_t *wcroot,
+ const char *local_relpath, apr_pool_t *scratch_pool)
+{
+ struct pristine_transfer_baton *tb = baton;
+ svn_sqlite__stmt_t *stmt;
+ svn_boolean_t have_row;
+
+ /* Is this the initial call or the recursive call? */
+ if (wcroot == tb->dst_wcroot)
+ {
+ /* The initial call: */
+
+ /* Get all the info within a src wcroot lock */
+ SVN_ERR(svn_wc__db_with_txn(tb->src_wcroot, local_relpath,
+ pristine_transfer, tb, scratch_pool));
+
+ /* And do the final install, while we still have the dst lock */
+ if (tb->ib.tempfile_abspath)
+ SVN_ERR(pristine_install_txn(&(tb->ib), tb->dst_wcroot->sdb,
+ scratch_pool));
+ return SVN_NO_ERROR;
+ }
+
+ /* We have a lock on tb->dst_wcroot and tb->src_wcroot */
+
+ /* Get the right checksum if it wasn't passed */
+ if (!tb->ib.sha1_checksum)
+ {
+ SVN_ERR(svn_sqlite__get_statement(&stmt, tb->src_wcroot->sdb,
+ STMT_SELECT_NODE_INFO));
+
+ SVN_ERR(svn_sqlite__bindf(stmt, "is",
+ tb->src_wcroot->wc_id, local_relpath));
+
+ SVN_ERR(svn_sqlite__step(&have_row, stmt));
+
+ if (have_row)
+ SVN_ERR(svn_sqlite__column_checksum(&(tb->ib.sha1_checksum), stmt, 6,
+ scratch_pool));
+
+ SVN_ERR(svn_sqlite__reset(stmt));
+
+ if (!tb->ib.sha1_checksum)
+ return SVN_NO_ERROR; /* Nothing to transfer */
+ }
+
+ /* Check if we have the pristine in the destination wcroot */
+ SVN_ERR(svn_sqlite__get_statement(&stmt, tb->dst_wcroot->sdb,
+ STMT_SELECT_PRISTINE));
+ SVN_ERR(svn_sqlite__bind_checksum(stmt, 1, tb->ib.sha1_checksum,
+ scratch_pool));
+ SVN_ERR(svn_sqlite__step(&have_row, stmt));
+ SVN_ERR(svn_sqlite__reset(stmt));
+
+ /* Destination repository already has this pristine. We're done */
+ if (have_row)
+ return SVN_NO_ERROR;
+
+ /* Verify if the pristine actually exists and get the MD5 in one query */
+ SVN_ERR(svn_sqlite__get_statement(&stmt, tb->src_wcroot->sdb,
+ STMT_SELECT_PRISTINE));
+ SVN_ERR(svn_sqlite__bind_checksum(stmt, 1, tb->ib.sha1_checksum,
+ scratch_pool));
+ SVN_ERR(svn_sqlite__step(&have_row, stmt));
+
+ if (!have_row)
+ {
+ return svn_error_createf(SVN_ERR_WC_DB_ERROR, svn_sqlite__reset(stmt),
+ _("The pristine text with checksum '%s' was "
+ "not found"),
+ svn_checksum_to_cstring_display(
+ tb->ib.sha1_checksum, scratch_pool));
+ }
+ SVN_ERR(svn_sqlite__column_checksum(&(tb->ib.md5_checksum), stmt, 0,
+ scratch_pool));
+ SVN_ERR(svn_sqlite__reset(stmt));
+
+ /* We now have read locks in both working copies, so we can safely copy the
+ file to the temp location of the destination working copy */
+ {
+ svn_stream_t *src_stream;
+ svn_stream_t *dst_stream;
+ const char *tmp_abspath;
+ const char *src_abspath;
+
+ SVN_ERR(svn_stream_open_unique(&dst_stream, &tmp_abspath,
+ pristine_get_tempdir(tb->dst_wcroot,
+ scratch_pool,
+ scratch_pool),
+ svn_io_file_del_on_pool_cleanup,
+ scratch_pool, scratch_pool));
+
+ SVN_ERR(get_pristine_fname(&src_abspath, tb->src_wcroot->abspath,
+ tb->ib.sha1_checksum,
+ scratch_pool, scratch_pool));
+
+ SVN_ERR(svn_stream_open_readonly(&src_stream, src_abspath,
+ scratch_pool, scratch_pool));
+
+ /* ### Should we verify the SHA1 or MD5 here, or is that too expensive? */
+ SVN_ERR(svn_stream_copy3(src_stream, dst_stream,
+ tb->cancel_func, tb->cancel_baton,
+ scratch_pool));
+
+ /* And now set the right information to install once we leave the
+ src transaction */
+
+ SVN_ERR(get_pristine_fname(&(tb->ib.pristine_abspath),
+ tb->dst_wcroot->abspath,
+ tb->ib.sha1_checksum,
+ scratch_pool, scratch_pool));
+ tb->ib.tempfile_abspath = tmp_abspath;
+ }
+ return SVN_NO_ERROR;
+}
+
+svn_error_t *
+svn_wc__db_pristine_transfer(svn_wc__db_t *db,
+ const char *src_local_abspath,
+ const svn_checksum_t *checksum,
+ const char *dst_wri_abspath,
+ svn_cancel_func_t cancel_func,
+ void *cancel_baton,
+ apr_pool_t *scratch_pool)
+{
+ const char *src_relpath;
+ const char *dst_relpath;
+ struct pristine_transfer_baton tb;
+ memset(&tb, 0, sizeof(tb));
+
+ SVN_ERR(svn_wc__db_wcroot_parse_local_abspath(&tb.src_wcroot, &src_relpath,
+ db, src_local_abspath,
+ scratch_pool, scratch_pool));
+ VERIFY_USABLE_WCROOT(tb.src_wcroot);
+ SVN_ERR(svn_wc__db_wcroot_parse_local_abspath(&tb.dst_wcroot, &dst_relpath,
+ db, dst_wri_abspath,
+ scratch_pool, scratch_pool));
+ VERIFY_USABLE_WCROOT(tb.dst_wcroot);
+
+ if (tb.src_wcroot == tb.dst_wcroot
+ || tb.src_wcroot->sdb == tb.dst_wcroot->sdb)
+ {
+ return SVN_NO_ERROR; /* Nothing to transfer */
+ }
+
+ tb.cancel_func = cancel_func;
+ tb.cancel_baton = cancel_baton;
+
+ return svn_error_trace(svn_wc__db_with_txn(tb.dst_wcroot, src_relpath,
+ pristine_transfer, &tb,
+ scratch_pool));
+}
+
+
+
/* Remove the file at FILE_ABSPATH in such a way that we could re-create a
* new file of the same name at any time thereafter.
@@ -708,7 +878,6 @@ pristine_cleanup_wcroot(svn_wc__db_wcroo
return SVN_NO_ERROR;
}
-
svn_error_t *
svn_wc__db_pristine_cleanup(svn_wc__db_t *db,
const char *wri_abspath,
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=1347595&r1=1347594&r2=1347595&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/workqueue.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/workqueue.c Thu Jun 7 12:57:43 2012
@@ -715,6 +715,8 @@ run_file_install(svn_wc__db_t *db,
scratch_pool));
/* No need to set exec or read-only flags on special files. */
+
+ /* ### Shouldn't this record a timestamp and size, etc.? */
return SVN_NO_ERROR;
}
@@ -781,12 +783,27 @@ run_file_install(svn_wc__db_t *db,
}
/* Tweak the on-disk file according to its properties. */
- if (props
- && (apr_hash_get(props, SVN_PROP_NEEDS_LOCK, APR_HASH_KEY_STRING)
- || apr_hash_get(props, SVN_PROP_EXECUTABLE, APR_HASH_KEY_STRING)))
- {
- SVN_ERR(svn_wc__sync_flags_with_props(NULL, db, local_abspath,
- scratch_pool));
+#ifndef WIN32
+ if (props && apr_hash_get(props, SVN_PROP_EXECUTABLE, APR_HASH_KEY_STRING))
+ SVN_ERR(svn_io_set_file_executable(local_abspath, TRUE, FALSE,
+ scratch_pool));
+#endif
+
+ /* Note that this explicitly checks the pristine properties, to make sure
+ that when the lock is locally set (=modification) it is not read only */
+ if (props && apr_hash_get(props, SVN_PROP_NEEDS_LOCK, APR_HASH_KEY_STRING))
+ {
+ svn_wc__db_status_t status;
+ svn_wc__db_lock_t *lock;
+ SVN_ERR(svn_wc__db_read_info(&status, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, &lock, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL,
+ db, local_abspath,
+ scratch_pool, scratch_pool));
+
+ if (!lock && status != svn_wc__db_status_added)
+ SVN_ERR(svn_io_set_file_read_only(local_abspath, FALSE, scratch_pool));
}
if (use_commit_times)
@@ -1249,32 +1266,6 @@ run_record_fileinfo(svn_wc__db_t *db,
scratch_pool));
}
-
-svn_error_t *
-svn_wc__wq_build_record_fileinfo(svn_skel_t **work_item,
- svn_wc__db_t *db,
- const char *local_abspath,
- apr_time_t set_time,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool)
-{
- const char *local_relpath;
- *work_item = svn_skel__make_empty_list(result_pool);
-
- SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
-
- SVN_ERR(svn_wc__db_to_relpath(&local_relpath, db, local_abspath,
- local_abspath, result_pool, scratch_pool));
-
- if (set_time)
- svn_skel__prepend_int(set_time, *work_item, result_pool);
-
- svn_skel__prepend_str(local_relpath, *work_item, result_pool);
- svn_skel__prepend_str(OP_RECORD_FILEINFO, *work_item, result_pool);
-
- return SVN_NO_ERROR;
-}
-
/* ------------------------------------------------------------------------ */
/* OP_TMP_SET_TEXT_CONFLICT_MARKERS */
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=1347595&r1=1347594&r2=1347595&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/workqueue.h (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/workqueue.h Thu Jun 7 12:57:43 2012
@@ -182,22 +182,6 @@ svn_wc__wq_build_prej_install(svn_skel_t
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
-/* Set *WORK_ITEM to a new work item that will record file information of
- LOCAL_ABSPATH into the TRANSLATED_SIZE and LAST_MOD_TIME of the node via
- the svn_wc__db_global_record_fileinfo() function.
-
- If SET_TIME is not 0, set LOCAL_ABSPATH's last modified time to this
- time and after that record the actual file time.
-
- ### it is unclear whether this should survive. */
-svn_error_t *
-svn_wc__wq_build_record_fileinfo(svn_skel_t **work_item,
- svn_wc__db_t *db,
- const char *local_abspath,
- apr_time_t set_time,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool);
-
/* Set *WORK_ITEM to a new work item that will remove all the data of
the BASE_NODE of LOCAL_ABSPATH and all it's descendants, but keeping
any WORKING_NODE data.
Modified: subversion/branches/javahl-ra/subversion/svn/cl.h
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svn/cl.h?rev=1347595&r1=1347594&r2=1347595&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svn/cl.h (original)
+++ subversion/branches/javahl-ra/subversion/svn/cl.h Thu Jun 7 12:57:43 2012
@@ -163,7 +163,6 @@ typedef struct svn_cl__opt_state_t
svn_boolean_t no_unlock;
const char *message; /* log message */
- const char *ancestor_path; /* ### todo: who sets this? */
svn_boolean_t force; /* be more forceful, as in "svn rm -f ..." */
svn_boolean_t force_log; /* force validity of a suspect log msg file */
svn_boolean_t incremental; /* yield output suitable for concatenation */
@@ -183,16 +182,24 @@ typedef struct svn_cl__opt_state_t
svn_boolean_t xml; /* output in xml, e.g., "svn log --xml" */
svn_boolean_t no_ignore; /* disregard default ignores & svn:ignore's */
svn_boolean_t no_auth_cache; /* do not cache authentication information */
+ struct
+ {
+ const char *diff_cmd; /* the external diff command to use */
+ svn_boolean_t internal_diff; /* override diff_cmd in config file */
svn_boolean_t no_diff_deleted; /* do not show diffs for deleted files */
- svn_boolean_t ignore_properties; /* ignore properties */
svn_boolean_t show_copies_as_adds; /* do not diff copies with their source */
svn_boolean_t notice_ancestry; /* notice ancestry for diff-y operations */
+ svn_boolean_t summarize; /* create a summary of a diff */
+ svn_boolean_t use_git_diff_format; /* Use git's extended diff format */
+ svn_boolean_t ignore_properties; /* ignore properties */
+ svn_boolean_t properties_only; /* Show properties only */
+ svn_boolean_t patch_compatible; /* Output compatible with GNU patch */
+ } diff;
svn_boolean_t ignore_ancestry; /* ignore ancestry for merge-y operations */
svn_boolean_t ignore_externals;/* ignore externals definitions */
svn_boolean_t stop_on_copy; /* don't cross copies during processing */
svn_boolean_t dry_run; /* try operation but make no changes */
svn_boolean_t revprop; /* operate on a revision property */
- const char *diff_cmd; /* the external diff command to use */
const char *merge_cmd; /* the external merge command to use */
const char *editor_cmd; /* the external editor command to use */
svn_boolean_t record_only; /* whether to record mergeinfo */
@@ -205,7 +212,6 @@ typedef struct svn_cl__opt_state_t
svn_boolean_t autoprops; /* enable automatic properties */
svn_boolean_t no_autoprops; /* disable automatic properties */
const char *native_eol; /* override system standard eol marker */
- svn_boolean_t summarize; /* create a summary of a diff */
svn_boolean_t remove; /* deassociate a changelist */
apr_array_header_t *changelists; /* changelist filters */
const char *changelist; /* operate on this changelist
@@ -229,12 +235,8 @@ typedef struct svn_cl__opt_state_t
svn_boolean_t ignore_whitespace; /* don't account for whitespace when
patching */
svn_boolean_t show_diff; /* produce diff output (maps to --diff) */
- svn_boolean_t internal_diff; /* override diff_cmd in config file */
- svn_boolean_t use_git_diff_format; /* Use git's extended diff format */
- svn_boolean_t patch_compatible; /* Output compatible with GNU patch */
svn_boolean_t allow_mixed_rev; /* Allow operation on mixed-revision WC */
svn_boolean_t include_externals; /* Recurses (in)to file & dir externals */
- svn_boolean_t properties_only; /* Show properties only */
} svn_cl__opt_state_t;
Modified: subversion/branches/javahl-ra/subversion/svn/diff-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svn/diff-cmd.c?rev=1347595&r1=1347594&r2=1347595&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svn/diff-cmd.c (original)
+++ subversion/branches/javahl-ra/subversion/svn/diff-cmd.c Thu Jun 7 12:57:43 2012
@@ -172,9 +172,9 @@ svn_cl__diff(apr_getopt_t *os,
apr_pool_t *iterpool;
svn_boolean_t pegged_diff = FALSE;
svn_boolean_t show_copies_as_adds =
- opt_state->patch_compatible ? TRUE : opt_state->show_copies_as_adds;
+ opt_state->diff.patch_compatible || opt_state->diff.show_copies_as_adds;
svn_boolean_t ignore_properties =
- opt_state->patch_compatible ? TRUE : opt_state->ignore_properties;
+ opt_state->diff.patch_compatible || opt_state->diff.ignore_properties;
int i;
const svn_client_diff_summarize_func_t summarize_func =
(opt_state->xml ? summarize_xml : summarize_regular);
@@ -194,7 +194,7 @@ svn_cl__diff(apr_getopt_t *os,
svn_stringbuf_t *sb;
/* Check that the --summarize is passed as well. */
- if (!opt_state->summarize)
+ if (!opt_state->diff.summarize)
return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
_("'--xml' option only valid with "
"'--summarize' option"));
@@ -349,14 +349,14 @@ svn_cl__diff(apr_getopt_t *os,
else
target2 = svn_dirent_join(new_target, path, iterpool);
- if (opt_state->summarize)
+ if (opt_state->diff.summarize)
SVN_ERR(svn_client_diff_summarize2
(target1,
&opt_state->start_revision,
target2,
&opt_state->end_revision,
opt_state->depth,
- ! opt_state->notice_ancestry,
+ ! opt_state->diff.notice_ancestry,
opt_state->changelists,
summarize_func, &target1,
ctx, iterpool));
@@ -369,13 +369,13 @@ svn_cl__diff(apr_getopt_t *os,
&(opt_state->end_revision),
NULL,
opt_state->depth,
- ! opt_state->notice_ancestry,
- opt_state->no_diff_deleted,
+ ! opt_state->diff.notice_ancestry,
+ opt_state->diff.no_diff_deleted,
show_copies_as_adds,
opt_state->force,
ignore_properties,
- opt_state->properties_only,
- opt_state->use_git_diff_format,
+ opt_state->diff.properties_only,
+ opt_state->diff.use_git_diff_format,
svn_cmdline_output_encoding(pool),
outstream,
errstream,
@@ -396,14 +396,14 @@ svn_cl__diff(apr_getopt_t *os,
peg_revision.kind = svn_path_is_url(path)
? svn_opt_revision_head : svn_opt_revision_working;
- if (opt_state->summarize)
+ if (opt_state->diff.summarize)
SVN_ERR(svn_client_diff_summarize_peg2
(truepath,
&peg_revision,
&opt_state->start_revision,
&opt_state->end_revision,
opt_state->depth,
- ! opt_state->notice_ancestry,
+ ! opt_state->diff.notice_ancestry,
opt_state->changelists,
summarize_func, &truepath,
ctx, iterpool));
@@ -416,13 +416,13 @@ svn_cl__diff(apr_getopt_t *os,
&opt_state->end_revision,
NULL,
opt_state->depth,
- ! opt_state->notice_ancestry,
- opt_state->no_diff_deleted,
+ ! opt_state->diff.notice_ancestry,
+ opt_state->diff.no_diff_deleted,
show_copies_as_adds,
opt_state->force,
ignore_properties,
- opt_state->properties_only,
- opt_state->use_git_diff_format,
+ opt_state->diff.properties_only,
+ opt_state->diff.use_git_diff_format,
svn_cmdline_output_encoding(pool),
outstream,
errstream,
Modified: subversion/branches/javahl-ra/subversion/svn/import-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svn/import-cmd.c?rev=1347595&r1=1347594&r2=1347595&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svn/import-cmd.c (original)
+++ subversion/branches/javahl-ra/subversion/svn/import-cmd.c Thu Jun 7 12:57:43 2012
@@ -114,12 +114,13 @@ svn_cl__import(apr_getopt_t *os,
SVN_ERR(svn_cl__cleanup_log_msg
(ctx->log_msg_baton3,
- svn_client_import4(path,
+ svn_client_import5(path,
url,
opt_state->depth,
opt_state->no_ignore,
opt_state->force,
opt_state->revprop_table,
+ NULL, NULL, /* filter callback / baton */
(opt_state->quiet
? NULL : svn_cl__print_commit_info),
NULL,
Modified: subversion/branches/javahl-ra/subversion/svn/log-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svn/log-cmd.c?rev=1347595&r1=1347594&r2=1347595&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svn/log-cmd.c (original)
+++ subversion/branches/javahl-ra/subversion/svn/log-cmd.c Thu Jun 7 12:57:43 2012
@@ -80,6 +80,67 @@ struct log_receiver_baton
"------------------------------------------------------------------------\n"
+/* Display a diff of the subtree TARGET_PATH_OR_URL@TARGET_PEG_REVISION as
+ * it changed in the revision that LOG_ENTRY describes.
+ *
+ * Restrict the diff to depth DEPTH. Pass DIFF_EXTENSIONS along to the diff
+ * subroutine.
+ *
+ * Write the diff to OUTSTREAM and write any stderr output to ERRSTREAM.
+ * ### How is exit code handled? 0 and 1 -> SVN_NO_ERROR, else an svn error?
+ * ### Should we get rid of ERRSTREAM and use svn_error_t instead?
+ */
+static svn_error_t *
+display_diff(const svn_log_entry_t *log_entry,
+ const char *target_path_or_url,
+ const svn_opt_revision_t *target_peg_revision,
+ svn_depth_t depth,
+ const char *diff_extensions,
+ svn_stream_t *outstream,
+ svn_stream_t *errstream,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *pool)
+{
+ apr_array_header_t *diff_options;
+ svn_opt_revision_t start_revision;
+ svn_opt_revision_t end_revision;
+
+ /* Fall back to "" to get options initialized either way. */
+ if (diff_extensions)
+ diff_options = svn_cstring_split(diff_extensions, " \t\n\r",
+ TRUE, pool);
+ else
+ diff_options = NULL;
+
+ start_revision.kind = svn_opt_revision_number;
+ start_revision.value.number = log_entry->revision - 1;
+ end_revision.kind = svn_opt_revision_number;
+ end_revision.value.number = log_entry->revision;
+
+ SVN_ERR(svn_stream_puts(outstream, _("\n")));
+ SVN_ERR(svn_client_diff_peg6(diff_options,
+ target_path_or_url,
+ target_peg_revision,
+ &start_revision, &end_revision,
+ NULL,
+ depth,
+ FALSE, /* ignore ancestry */
+ TRUE, /* no diff deleted */
+ FALSE, /* show copies as adds */
+ FALSE, /* ignore content type */
+ FALSE, /* ignore prop diff */
+ FALSE, /* properties only */
+ FALSE, /* use git diff format */
+ svn_cmdline_output_encoding(pool),
+ outstream,
+ errstream,
+ NULL,
+ ctx, pool));
+ SVN_ERR(svn_stream_puts(outstream, _("\n")));
+ return SVN_NO_ERROR;
+}
+
+
/* Implement `svn_log_entry_receiver_t', printing the logs in
* a human-readable and machine-parseable format.
*
@@ -282,45 +343,16 @@ log_entry_receiver(void *baton,
{
svn_stream_t *outstream;
svn_stream_t *errstream;
- apr_array_header_t *diff_options;
- svn_opt_revision_t start_revision;
- svn_opt_revision_t end_revision;
SVN_ERR(svn_stream_for_stdout(&outstream, pool));
SVN_ERR(svn_stream_for_stderr(&errstream, pool));
- /* Fall back to "" to get options initialized either way. */
- if (lb->diff_extensions)
- diff_options = svn_cstring_split(lb->diff_extensions, " \t\n\r",
- TRUE, pool);
- else
- diff_options = NULL;
+ SVN_ERR(display_diff(log_entry,
+ lb->target_path_or_url, &lb->target_peg_revision,
+ lb->depth, lb->diff_extensions,
+ outstream, errstream,
+ lb->ctx, pool));
- start_revision.kind = svn_opt_revision_number;
- start_revision.value.number = log_entry->revision - 1;
- end_revision.kind = svn_opt_revision_number;
- end_revision.value.number = log_entry->revision;
-
- SVN_ERR(svn_stream_puts(outstream, _("\n")));
- SVN_ERR(svn_client_diff_peg6(diff_options,
- lb->target_path_or_url,
- &lb->target_peg_revision,
- &start_revision, &end_revision,
- NULL,
- lb->depth,
- FALSE, /* ignore ancestry */
- TRUE, /* no diff deleted */
- FALSE, /* show copies as adds */
- FALSE, /* ignore content type */
- FALSE, /* ignore prop diff */
- FALSE, /* properties only */
- FALSE, /* use git diff format */
- svn_cmdline_output_encoding(pool),
- outstream,
- errstream,
- NULL,
- lb->ctx, pool));
- SVN_ERR(svn_stream_puts(outstream, _("\n")));
SVN_ERR(svn_stream_close(outstream));
SVN_ERR(svn_stream_close(errstream));
}
@@ -545,11 +577,11 @@ svn_cl__log(apr_getopt_t *os,
return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
_("'quiet' and 'diff' options are "
"mutually exclusive"));
- if (opt_state->diff_cmd && (! opt_state->show_diff))
+ if (opt_state->diff.diff_cmd && (! opt_state->show_diff))
return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
_("'diff-cmd' option requires 'diff' "
"option"));
- if (opt_state->internal_diff && (! opt_state->show_diff))
+ if (opt_state->diff.internal_diff && (! opt_state->show_diff))
return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
_("'internal-diff' option requires "
"'diff' option"));
Modified: subversion/branches/javahl-ra/subversion/svn/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svn/main.c?rev=1347595&r1=1347594&r2=1347595&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svn/main.c (original)
+++ subversion/branches/javahl-ra/subversion/svn/main.c Thu Jun 7 12:57:43 2012
@@ -66,14 +66,24 @@
option. Options that have both long and short options should just
use the short option letter as identifier. */
typedef enum svn_cl__longopt_t {
- opt_ancestor_path = SVN_OPT_FIRST_LONGOPT_ID,
- opt_auth_password,
+ opt_auth_password = SVN_OPT_FIRST_LONGOPT_ID,
opt_auth_username,
opt_autoprops,
opt_changelist,
opt_config_dir,
opt_config_options,
+ /* diff options */
opt_diff_cmd,
+ opt_internal_diff,
+ opt_no_diff_deleted,
+ opt_show_copies_as_adds,
+ opt_notice_ancestry,
+ opt_summarize,
+ opt_use_git_diff_format,
+ opt_ignore_properties,
+ opt_properties_only,
+ opt_patch_compatible,
+ /* end of diff options */
opt_dry_run,
opt_editor_cmd,
opt_encoding,
@@ -88,12 +98,9 @@ typedef enum svn_cl__longopt_t {
opt_new_cmd,
opt_no_auth_cache,
opt_no_autoprops,
- opt_no_diff_deleted,
- opt_ignore_properties,
opt_no_ignore,
opt_no_unlock,
opt_non_interactive,
- opt_notice_ancestry,
opt_old_cmd,
opt_record_only,
opt_relocate,
@@ -101,7 +108,6 @@ typedef enum svn_cl__longopt_t {
opt_revprop,
opt_stop_on_copy,
opt_strict,
- opt_summarize,
opt_targets,
opt_depth,
opt_set_depth,
@@ -117,18 +123,13 @@ typedef enum svn_cl__longopt_t {
opt_reintegrate,
opt_trust_server_cert,
opt_strip,
- opt_show_copies_as_adds,
opt_ignore_keywords,
opt_reverse_diff,
opt_ignore_whitespace,
opt_diff,
- opt_internal_diff,
- opt_use_git_diff_format,
- opt_patch_compatible,
opt_allow_mixed_revisions,
opt_include_externals,
opt_symmetric,
- opt_properties_only,
} svn_cl__longopt_t;
@@ -241,17 +242,10 @@ const apr_getopt_option_t svn_cl__option
N_("do no interactive prompting")},
{"dry-run", opt_dry_run, 0,
N_("try operation but make no changes")},
- {"no-diff-deleted", opt_no_diff_deleted, 0,
- N_("do not print differences for deleted files")},
- {"ignore-properties", opt_ignore_properties, 0,
- N_("ignore properties during the operation")},
- {"notice-ancestry", opt_notice_ancestry, 0,
- N_("notice ancestry when calculating differences")},
{"ignore-ancestry", opt_ignore_ancestry, 0,
N_("ignore ancestry when calculating merges")},
{"ignore-externals", opt_ignore_externals, 0,
N_("ignore externals definitions")},
- {"diff-cmd", opt_diff_cmd, 1, N_("use ARG as diff command")},
{"diff3-cmd", opt_merge_cmd, 1, N_("use ARG as merge command")},
{"editor-cmd", opt_editor_cmd, 1, N_("use ARG as external editor")},
{"record-only", opt_record_only, 0,
@@ -283,7 +277,6 @@ 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")},
- {"summarize", opt_summarize, 0, N_("show a summary of the results")},
{"remove", opt_remove, 0, N_("remove changelist association")},
{"changelist", opt_changelist, 1,
N_("operate only on members of changelist ARG")},
@@ -336,8 +329,6 @@ const apr_getopt_option_t svn_cl__option
"The expected component separator is '/' on all\n"
" "
"platforms. A leading '/' counts as one component.")},
- {"show-copies-as-adds", opt_show_copies_as_adds, 0,
- N_("don't diff copied or moved files with their source")},
{"ignore-keywords", opt_ignore_keywords, 0,
N_("don't expand keywords")},
{"reverse-diff", opt_reverse_diff, 0,
@@ -345,10 +336,23 @@ const apr_getopt_option_t svn_cl__option
{"ignore-whitespace", opt_ignore_whitespace, 0,
N_("ignore whitespace during pattern matching")},
{"diff", opt_diff, 0, N_("produce diff output")}, /* maps to show_diff */
+ /* diff options */
+ {"diff-cmd", opt_diff_cmd, 1, N_("use ARG as diff command")},
{"internal-diff", opt_internal_diff, 0,
N_("override diff-cmd specified in config file")},
+ {"no-diff-deleted", opt_no_diff_deleted, 0,
+ N_("do not print differences for deleted files")},
+ {"show-copies-as-adds", opt_show_copies_as_adds, 0,
+ N_("don't diff copied or moved files with their source")},
+ {"notice-ancestry", opt_notice_ancestry, 0,
+ N_("notice ancestry when calculating differences")},
+ {"summarize", opt_summarize, 0, N_("show a summary of the results")},
{"git", opt_use_git_diff_format, 0,
N_("use git's extended diff format")},
+ {"ignore-properties", opt_ignore_properties, 0,
+ N_("ignore properties during the operation")},
+ {"properties-only", opt_properties_only, 0,
+ N_("show only properties during the operation")},
{"patch-compatible", opt_patch_compatible, 0,
N_("generate diff suitable for generic third-party\n"
" "
@@ -356,6 +360,7 @@ const apr_getopt_option_t svn_cl__option
" "
"--show-copies-as-adds --ignore-properties"
)},
+ /* end of diff options */
{"allow-mixed-revisions", opt_allow_mixed_revisions, 0,
N_("Allow merge into mixed-revision working copy.\n"
" "
@@ -370,8 +375,6 @@ const apr_getopt_option_t svn_cl__option
"fixed revision. (See the svn:externals property)")},
{"symmetric", opt_symmetric, 0,
N_("Symmetric merge")},
- {"properties-only", opt_properties_only, 0,
- N_("show only properties during the operation")},
/* Long-opt Aliases
*
@@ -1161,15 +1164,19 @@ const svn_opt_subcommand_desc2_t svn_cl_
" 2. Prints unversioned remote prop on repos revision.\n"
" TARGET only determines which repository to access.\n"
"\n"
- " By default, this subcommand will add an extra newline to the end\n"
- " of the property values so that the output looks pretty. Also,\n"
- " whenever there are multiple paths involved, each property value\n"
- " is prefixed with the path with which it is associated. Use the\n"
- " --strict option to disable these beautifications (useful when\n"
- " redirecting a binary property value to a file, but available only\n"
- " if you supply a single TARGET to a non-recursive propget operation).\n"),
+ " With --verbose, the target path and the property name are printed on\n"
+ " separate lines before each value, like 'svn proplist --verbose'.\n"
+ " Otherwise, if there is more than one TARGET or a depth other than\n"
+ " 'empty', the target path is printed on the same line before each value.\n"
+ "\n"
+ " By default, an extra newline is printed after the property value so that\n"
+ " the output looks pretty. With a single TARGET and depth 'empty', you can\n"
+ " use the --strict option to disable this (useful when redirecting a binary\n"
+ " property value to a file, for example).\n"),
{'v', 'R', opt_depth, 'r', opt_revprop, opt_strict, opt_xml,
- opt_changelist } },
+ opt_changelist },
+ {{'v', N_("print path, name and value on separate lines")},
+ {opt_strict, N_("don't print an extra newline")}} },
{ "proplist", svn_cl__proplist, {"plist", "pl"}, N_
("List all properties on files, dirs, or revisions.\n"
@@ -1179,8 +1186,13 @@ const svn_opt_subcommand_desc2_t svn_cl_
" 1. Lists versioned props. If specified, REV determines in which\n"
" revision the target is first looked up.\n"
" 2. Lists unversioned remote props on repos revision.\n"
- " TARGET only determines which repository to access.\n"),
- {'v', 'R', opt_depth, 'r', 'q', opt_revprop, opt_xml, opt_changelist } },
+ " TARGET only determines which repository to access.\n"
+ "\n"
+ " With --verbose, the property values are printed as well, like 'svn propget\n"
+ " --verbose'. With --quiet, the paths are not printed.\n"),
+ {'v', 'R', opt_depth, 'r', 'q', opt_revprop, opt_xml, opt_changelist },
+ {{'v', N_("print path, name and value on separate lines")},
+ {'q', N_("don't print the path")}} },
{ "propset", svn_cl__propset, {"pset", "ps"}, N_
("Set the value of a property on files, dirs, or revisions.\n"
@@ -1933,16 +1945,16 @@ main(int argc, const char *argv[])
opt_state.trust_server_cert = TRUE;
break;
case opt_no_diff_deleted:
- opt_state.no_diff_deleted = TRUE;
+ opt_state.diff.no_diff_deleted = TRUE;
break;
case opt_ignore_properties:
- opt_state.ignore_properties = TRUE;
+ opt_state.diff.ignore_properties = TRUE;
break;
case opt_show_copies_as_adds:
- opt_state.show_copies_as_adds = TRUE;
+ opt_state.diff.show_copies_as_adds = TRUE;
break;
case opt_notice_ancestry:
- opt_state.notice_ancestry = TRUE;
+ opt_state.diff.notice_ancestry = TRUE;
break;
case opt_ignore_ancestry:
opt_state.ignore_ancestry = TRUE;
@@ -1959,7 +1971,7 @@ main(int argc, const char *argv[])
return svn_cmdline_handle_exit_error(err, pool, "svn: ");
break;
case opt_diff_cmd:
- opt_state.diff_cmd = apr_pstrdup(pool, opt_arg);
+ opt_state.diff.diff_cmd = apr_pstrdup(pool, opt_arg);
break;
case opt_merge_cmd:
opt_state.merge_cmd = apr_pstrdup(pool, opt_arg);
@@ -2033,7 +2045,7 @@ main(int argc, const char *argv[])
opt_state.no_unlock = TRUE;
break;
case opt_summarize:
- opt_state.summarize = TRUE;
+ opt_state.diff.summarize = TRUE;
break;
case opt_remove:
opt_state.remove = TRUE;
@@ -2119,13 +2131,13 @@ main(int argc, const char *argv[])
opt_state.show_diff = TRUE;
break;
case opt_internal_diff:
- opt_state.internal_diff = TRUE;
+ opt_state.diff.internal_diff = TRUE;
break;
case opt_patch_compatible:
- opt_state.patch_compatible = TRUE;
+ opt_state.diff.patch_compatible = TRUE;
break;
case opt_use_git_diff_format:
- opt_state.use_git_diff_format = TRUE;
+ opt_state.diff.use_git_diff_format = TRUE;
break;
case opt_allow_mixed_revisions:
opt_state.allow_mixed_rev = TRUE;
@@ -2134,7 +2146,7 @@ main(int argc, const char *argv[])
opt_state.include_externals = TRUE;
break;
case opt_properties_only:
- opt_state.properties_only = TRUE;
+ opt_state.diff.properties_only = TRUE;
break;
default:
/* Hmmm. Perhaps this would be a good place to squirrel away
@@ -2320,7 +2332,7 @@ main(int argc, const char *argv[])
/* Disallow simultaneous use of both --diff-cmd and
--internal-diff. */
- if (opt_state.diff_cmd && opt_state.internal_diff)
+ if (opt_state.diff.diff_cmd && opt_state.diff.internal_diff)
{
err = svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
_("--diff-cmd and --internal-diff "
@@ -2513,13 +2525,13 @@ main(int argc, const char *argv[])
/* XXX: Only diff_cmd for now, overlay rest later and stop passing
opt_state altogether? */
- if (opt_state.diff_cmd)
+ if (opt_state.diff.diff_cmd)
svn_config_set(cfg_config, SVN_CONFIG_SECTION_HELPERS,
- SVN_CONFIG_OPTION_DIFF_CMD, opt_state.diff_cmd);
+ SVN_CONFIG_OPTION_DIFF_CMD, opt_state.diff.diff_cmd);
if (opt_state.merge_cmd)
svn_config_set(cfg_config, SVN_CONFIG_SECTION_HELPERS,
SVN_CONFIG_OPTION_DIFF3_CMD, opt_state.merge_cmd);
- if (opt_state.internal_diff)
+ if (opt_state.diff.internal_diff)
svn_config_set(cfg_config, SVN_CONFIG_SECTION_HELPERS,
SVN_CONFIG_OPTION_DIFF_CMD, NULL);
Modified: subversion/branches/javahl-ra/subversion/svnserve/serve.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svnserve/serve.c?rev=1347595&r1=1347594&r2=1347595&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svnserve/serve.c (original)
+++ subversion/branches/javahl-ra/subversion/svnserve/serve.c Thu Jun 7 12:57:43 2012
@@ -2042,9 +2042,9 @@ static svn_error_t *log_cmd(svn_ra_svn_c
SVN_ERR(log_command(b, conn, pool, "%s",
svn_log__log(full_paths, start_rev, end_rev,
- limit, send_changed_paths, strict_node,
- include_merged_revisions, revprops,
- pool)));
+ (int) limit, send_changed_paths,
+ strict_node, include_merged_revisions,
+ revprops, pool)));
/* Get logs. (Can't report errors back to the client at this point.) */
lb.fs_path = b->fs_path->data;
Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/entries-dump.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/entries-dump.c?rev=1347595&r1=1347594&r2=1347595&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/entries-dump.c (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/entries-dump.c Thu Jun 7 12:57:43 2012
@@ -30,6 +30,7 @@
#define SVN_DEPRECATED
#include "svn_types.h"
+#include "svn_cmdline.h"
#include "svn_pools.h"
#include "svn_wc.h"
#include "svn_dirent_uri.h"
@@ -266,14 +267,15 @@ main(int argc, const char *argv[])
exit(1);
}
- if (apr_initialize() != APR_SUCCESS)
+ if (svn_cmdline_init("entries-dump", stderr) != EXIT_SUCCESS)
{
- fprintf(stderr, "apr_initialize() failed.\n");
- exit(1);
+ return EXIT_FAILURE;
}
- /* set up the global pool */
- pool = svn_pool_create(NULL);
+ /* Create our top-level pool. Use a separate mutexless allocator,
+ * given this application is single threaded.
+ */
+ pool = apr_allocator_owner_get(svn_pool_create_allocator(FALSE));
path = svn_dirent_internal_style(argv[argc-1], pool);
Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/export_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/export_tests.py?rev=1347595&r1=1347594&r2=1347595&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/export_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/export_tests.py Thu Jun 7 12:57:43 2012
@@ -166,7 +166,7 @@ def export_working_copy_with_mods(sbox):
'A/D/G/tau' : Item(status='A '),
'A/mu' : Item(status='A '),
'A/B' : Item(status='A '),
- 'A/B/E' : Item(status='A '),
+ #'A/B/E' : Item(status='A '), # Used to be reported as added
'A/B/lambda' : Item(status='A '),
'A/B/F' : Item(status='A '),
'A/C' : Item(status='A '),
Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/merge_reintegrate_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/merge_reintegrate_tests.py?rev=1347595&r1=1347594&r2=1347595&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/merge_reintegrate_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/merge_reintegrate_tests.py Thu Jun 7 12:57:43 2012
@@ -963,7 +963,16 @@ def reintegrate_with_subtree_mergeinfo(s
"merge --reintegrate with subtree mergeinfo"
# Create a standard greek tree, branch A to A_COPY in r2, A to A_COPY_2 in
- # r3, A to A_COPY_3 in r3, and then make some changes under A in r5-8.
+ # r3, A to A_COPY_3 in r4, and then make some changes under A in r5-8.
+ #
+ # A_COPY_3 4---------
+ # /
+ # A -1--------5-6-7-8-
+ # \ \
+ # A_COPY 2-\-----------
+ # \
+ # A_COPY_2 3---------
+
sbox.build()
wc_dir = sbox.wc_dir
expected_disk, expected_status = set_up_branch(sbox, False, 3)
@@ -991,8 +1000,22 @@ def reintegrate_with_subtree_mergeinfo(s
# Now set up a situation where we try to reintegrate A_COPY back to A but
# both of these paths have subtree mergeinfo. Iff the mergeinfo on A_COPY
# reflects that the same revisions have been applied across all of A_COPY,
- # then the reintegrate merge should succeed.
+ # then the reintegrate merge should succeed. We'll try that case first.
+ #
+ # A_COPY_3 4--------9---
+ # / \
+ # / \c.
+ # A -1--------5-6-7-8---10-------------------WC--
+ # \ \ (D) \ /r.
+ # \ \ (mu) \s. /
+ # A_COPY 2-\--------------------12---13--14------
+ # \ /c.
+ # \ /
+ # A_COPY_2 3--------------11---
#
+ # Key: c. = cherry-pick, s. = sync, r. = reintegrate.
+ # Note: These diagrams show an overview and do not capture every detail.
+
# r9 - Make a text change to A_COPY_3/D/gamma
svntest.main.file_write(gamma_COPY_3_path, "New content")
expected_output = wc.State(wc_dir, {'A_COPY_3/D/gamma' : Item(verb='Sending')})
@@ -1166,6 +1189,17 @@ def reintegrate_with_subtree_mergeinfo(s
# merge should fail, but should provide a helpful message as to where the
# problems are.
#
+ # A_COPY_3 4--------9---
+ # / \
+ # / \c. [-8]___
+ # A -1---------5-6-7-8---10----------------\-------WC--
+ # \ \ (D) \ \ /r.
+ # \ \ (mu) \s. \c. /
+ # A_COPY 2-\--------------------12---13--14--15--------
+ # \ /c. (D)
+ # \ /
+ # A_COPY_2 3--------------11---
+
# First revert the previous reintegrate merge
svntest.actions.run_and_verify_svn(None, None, [],
'revert', '-R', wc_dir)
@@ -1233,6 +1267,18 @@ def reintegrate_with_subtree_mergeinfo(s
#
# E) Reintegrate 'branch' to 'trunk'. This fails as it appears not all
# of 'trunk' was previously merged to 'branch'
+ #
+ # Step: A B C D E
+ # A_COPY_3 ----9---
+ # / \ (D/g.->
+ # / \c. [-8]___ D/g.m.) (D/g.m.)
+ # A ------------10----------------\------16-------18--------WC
+ # \\ (D) \ \ \ \ /r.
+ # \\ (mu) \s. \c. \s. \s. /
+ # A_COPY -\--------------12---13--14--15-------17-------19------
+ # \ /c. (D)
+ # \ /
+ # A_COPY_2 ---------11---
# r16 - A) REPOS-to-REPOS rename of A/D/gamma to A/D/gamma_moved. Since
# r874258 WC-to-WC moves won't create mergeinfo on the dest if the source
Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/merge_symmetric_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/merge_symmetric_tests.py?rev=1347595&r1=1347594&r2=1347595&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/merge_symmetric_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/merge_symmetric_tests.py Thu Jun 7 12:57:43 2012
@@ -481,6 +481,7 @@ def merge_twice_same_direction_2(sbox):
# Merge to and fro
@SkipUnless(server_has_mergeinfo)
+@Wimp("needs SVN_WITH_SYMMETRIC_MERGE")
def merge_to_and_fro_1_1(sbox):
"""merge_to_and_fro_1_1"""
@@ -497,6 +498,7 @@ def merge_to_and_fro_1_1(sbox):
expect_3ways=[three_way_merge('A4', 'B7')])
@SkipUnless(server_has_mergeinfo)
+@Wimp("needs SVN_WITH_SYMMETRIC_MERGE")
def merge_to_and_fro_1_2(sbox):
"""merge_to_and_fro_1_2"""
@@ -540,6 +542,7 @@ def init_merge_to_and_fro_2(sbox, mod_9,
no_op_commit(sbox) # r10
@SkipUnless(server_has_mergeinfo)
+@Wimp("needs SVN_WITH_SYMMETRIC_MERGE")
def merge_to_and_fro_2_1(sbox):
"""merge_to_and_fro_2_1"""
@@ -556,6 +559,7 @@ def merge_to_and_fro_2_1(sbox):
expect_3ways=[three_way_merge('A7', 'B10')])
@SkipUnless(server_has_mergeinfo)
+@Wimp("needs SVN_WITH_SYMMETRIC_MERGE")
def merge_to_and_fro_2_2(sbox):
"""merge_to_and_fro_2_2"""
@@ -599,6 +603,7 @@ def init_merge_to_and_fro_3(sbox, mod_9,
no_op_commit(sbox) # r10
@SkipUnless(server_has_mergeinfo)
+@Wimp("needs SVN_WITH_SYMMETRIC_MERGE")
def merge_to_and_fro_3_1(sbox):
"""merge_to_and_fro_3_1"""
@@ -615,6 +620,7 @@ def merge_to_and_fro_3_1(sbox):
expect_3ways=[three_way_merge_no_op('B7', 'B10')])
@SkipUnless(server_has_mergeinfo)
+@Wimp("needs SVN_WITH_SYMMETRIC_MERGE")
def merge_to_and_fro_3_2(sbox):
"""merge_to_and_fro_3_2"""
@@ -631,6 +637,7 @@ def merge_to_and_fro_3_2(sbox):
expect_3ways=[three_way_merge('B7', 'B10')])
@SkipUnless(server_has_mergeinfo)
+@Wimp("needs SVN_WITH_SYMMETRIC_MERGE")
def merge_to_and_fro_4_1(sbox):
"""merge_to_and_fro_4_1"""
@@ -647,6 +654,7 @@ def merge_to_and_fro_4_1(sbox):
expect_3ways=[three_way_merge_no_op('B7', 'A10')])
@SkipUnless(server_has_mergeinfo)
+@Wimp("needs SVN_WITH_SYMMETRIC_MERGE")
def merge_to_and_fro_4_2(sbox):
"""merge_to_and_fro_4_2"""
Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/revert_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/revert_tests.py?rev=1347595&r1=1347594&r2=1347595&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/revert_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/revert_tests.py Thu Jun 7 12:57:43 2012
@@ -1208,6 +1208,17 @@ def revert_permissions_only(sbox):
'revert', sbox.ospath('A/B/E/beta'))
is_executable(sbox.ospath('A/B/E/beta'))
+ # copied file is always writeable
+ sbox.simple_update()
+ expected_output = ["A %s\n" % sbox.ospath('A/B/E2')]
+ svntest.actions.run_and_verify_svn(None, expected_output, [], 'copy',
+ sbox.ospath('A/B/E'),
+ sbox.ospath('A/B/E2'))
+ is_writable(sbox.ospath('A/B/E2/alpha'))
+ svntest.actions.run_and_verify_svn(None, [], [],
+ 'revert', sbox.ospath('A/B/E2/alpha'))
+ is_writable(sbox.ospath('A/B/E2/alpha'))
+
@XFail()
@Issue(3851)
def revert_copy_depth_files(sbox):
Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/stat_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/stat_tests.py?rev=1347595&r1=1347594&r2=1347595&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/stat_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/stat_tests.py Thu Jun 7 12:57:43 2012
@@ -993,8 +993,16 @@ def status_unversioned_dir(sbox):
dir = sbox.wc_dir
svntest.main.safe_rmtree(sbox.wc_dir)
os.mkdir(dir)
- expected_err = "svn: warning: W155007: '.*(/|\\\\)" + os.path.basename(dir) + \
- "' is not a working copy"
+
+ # Depending on whether you run the tests below a working copy
+ # or not, the error message might either be something like
+ # svn: warning: W155007: '...copies/stat_tests-19' is not a working copy
+ # or
+ # svn: warning: W155010: The node '...copies/stat_tests-19' was not found.
+
+ expected_err = "svn: warning: W1550(07|10): .*'.*(/|\\\\)" + \
+ os.path.basename(dir) + \
+ "' (is not a working copy|was not found)"
svntest.actions.run_and_verify_svn2(None, [], expected_err, 0,
"status", dir, dir)