You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2010/08/07 20:13:12 UTC
svn commit: r983275 [1/2] - in /subversion/branches/atomic-revprop: ./
notes/ subversion/bindings/swig/
subversion/bindings/swig/python/libsvn_swig_py/
subversion/bindings/swig/python/tests/ subversion/include/
subversion/libsvn_ra_neon/ subversion/lib...
Author: danielsh
Date: Sat Aug 7 18:13:11 2010
New Revision: 983275
URL: http://svn.apache.org/viewvc?rev=983275&view=rev
Log:
On the 'atomic-revprop' branch, merge r982781 through r983273.
Modified:
subversion/branches/atomic-revprop/ (props changed)
subversion/branches/atomic-revprop/notes/ (props changed)
subversion/branches/atomic-revprop/notes/unicode-composition-for-filenames
subversion/branches/atomic-revprop/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
subversion/branches/atomic-revprop/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h
subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/delta.py
subversion/branches/atomic-revprop/subversion/bindings/swig/svn_delta.i
subversion/branches/atomic-revprop/subversion/include/svn_error_codes.h
subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/commit.c
subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/fetch.c
subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/lock.c
subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/options.c
subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/ra_neon.h
subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/session.c
subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/util.c
subversion/branches/atomic-revprop/subversion/libsvn_ra_serf/blame.c
subversion/branches/atomic-revprop/subversion/libsvn_ra_serf/commit.c
subversion/branches/atomic-revprop/subversion/libsvn_ra_serf/replay.c
subversion/branches/atomic-revprop/subversion/libsvn_ra_serf/update.c
subversion/branches/atomic-revprop/subversion/libsvn_wc/adm_ops.c
subversion/branches/atomic-revprop/subversion/libsvn_wc/lock.c
subversion/branches/atomic-revprop/subversion/libsvn_wc/log.c
subversion/branches/atomic-revprop/subversion/libsvn_wc/log.h
subversion/branches/atomic-revprop/subversion/libsvn_wc/status.c
subversion/branches/atomic-revprop/subversion/libsvn_wc/update_editor.c
subversion/branches/atomic-revprop/subversion/libsvn_wc/wc_db.c
subversion/branches/atomic-revprop/subversion/svnrdump/load_editor.c
subversion/branches/atomic-revprop/subversion/svnrdump/load_editor.h
subversion/branches/atomic-revprop/subversion/tests/cmdline/merge_tests.py
subversion/branches/atomic-revprop/subversion/tests/cmdline/patch_tests.py
subversion/branches/atomic-revprop/subversion/tests/cmdline/schedule_tests.py
subversion/branches/atomic-revprop/subversion/tests/cmdline/svnrdump_tests.py
subversion/branches/atomic-revprop/subversion/tests/cmdline/svntest/actions.py
subversion/branches/atomic-revprop/subversion/tests/cmdline/svntest/main.py
subversion/branches/atomic-revprop/subversion/tests/cmdline/svntest/sandbox.py
subversion/branches/atomic-revprop/subversion/tests/cmdline/switch_tests.py
subversion/branches/atomic-revprop/subversion/tests/cmdline/update_tests.py
Propchange: subversion/branches/atomic-revprop/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Aug 7 18:13:11 2010
@@ -34,4 +34,4 @@
/subversion/branches/tc_url_rev:874351-874483
/subversion/branches/tree-conflicts:868291-873154
/subversion/branches/tree-conflicts-notify:873926-874008
-/subversion/trunk:965046-982780
+/subversion/trunk:965046-983273
Propchange: subversion/branches/atomic-revprop/notes/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Sat Aug 7 18:13:11 2010
@@ -0,0 +1,38 @@
+/subversion/branches/1.5.x-r30215/notes:870312
+/subversion/branches/bdb-reverse-deltas/notes:872050-872529
+/subversion/branches/diff-callbacks3/notes:870059-870761
+/subversion/branches/dont-save-plaintext-passwords-by-default/notes:870728-871118
+/subversion/branches/double-delete/notes:870511-872970
+/subversion/branches/explore-wc/notes:875486,875493,875497,875507,875511,875514,875559,875580-875581,875584,875587,875611,875627,875647,875667-875668,875711-875712,875733-875734,875736,875744-875748,875751,875758,875782,875795-875796,875830,875836,875838,875842,875852,875855,875864,875870,875873,875880,875885-875888,875890,875897-875898,875905,875907-875909,875935,875943-875944,875946,875979,875982-875983,875985-875986,875990,875997
+/subversion/branches/file-externals/notes:871779-873302
+/subversion/branches/fs-rep-sharing/notes:869036-873803
+/subversion/branches/fsfs-pack/notes:873717-874575
+/subversion/branches/gnome-keyring/notes:870558-871410
+/subversion/branches/http-protocol-v2/notes:874395-876041
+/subversion/branches/in-memory-cache/notes:869829-871452
+/subversion/branches/issue-2843-dev/notes:871432-874179
+/subversion/branches/issue-3000/notes:871713,871716-871719,871721-871726,871728,871734
+/subversion/branches/issue-3067-deleted-subtrees/notes:873375-874084
+/subversion/branches/issue-3148-dev/notes:875193-875204
+/subversion/branches/issue-3220-dev/notes:872210-872226
+/subversion/branches/issue-3242-dev/notes:879653-896436
+/subversion/branches/issue-3334-dirs/notes:875156-875867
+/subversion/branches/kwallet/notes:870785-871314
+/subversion/branches/log-g-performance/notes:870941-871032
+/subversion/branches/merge-skips-obstructions/notes:874525-874615
+/subversion/branches/nfc-nfd-aware-client/notes:870276,870376
+/subversion/branches/ra_serf-digest-authn/notes:875693-876404
+/subversion/branches/reintegrate-improvements/notes:873853-874164
+/subversion/branches/subtree-mergeinfo/notes:876734-878766
+/subversion/branches/svn-mergeinfo-enhancements/notes:870119-870195,870197-870288
+/subversion/branches/svn-patch-improvements/notes:918519-934609
+/subversion/branches/svnpatch-diff/notes:865738-876477
+/subversion/branches/svnraisetc/notes:874709-875149
+/subversion/branches/svnserve-logging/notes:869828-870893
+/subversion/branches/tc-issue-3334/notes:874697-874773
+/subversion/branches/tc-merge-notify/notes:874017-874062
+/subversion/branches/tc-resolve/notes:874191-874239
+/subversion/branches/tc_url_rev/notes:874351-874483
+/subversion/branches/tree-conflicts/notes:868291-873154
+/subversion/branches/tree-conflicts-notify/notes:873926-874008
+/subversion/trunk/notes:965046-983273
Modified: subversion/branches/atomic-revprop/notes/unicode-composition-for-filenames
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/notes/unicode-composition-for-filenames?rev=983275&r1=983274&r2=983275&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/notes/unicode-composition-for-filenames (original)
+++ subversion/branches/atomic-revprop/notes/unicode-composition-for-filenames Sat Aug 7 18:13:11 2010
@@ -251,6 +251,32 @@ Implementing option (4) means:
communicate with the server.
+The above means the client has to be very carefull to preserve the
+encoding from the server and use that when talking to the server
+otherwise the server may not recognize the path as a versioned entity.
+
+Locally however, we can't be sure the filesystem enforces the encoding
+the server sent to the client, meaning there are (contrived) cases where
+a file exists in a different encoding locally than in the repository.
+Which means we have to be very carefull about how we find our files and
+to use the encoding we got from the local filesystem.
+
+Implementation details:
+
+ * The hash keys in svn_wc_adm_access_t's are hashed on the normalized
+ path encoding, not the repository path, in order to be able to
+ calculate the hash key from both the wc path as well as the repo path
+ * The same line of reasoning applies to the hash keys in the entries hash
+
+New conventions:
+ * variables containing a path as encoded in the local filesystem
+ should contain the (sub)string 'wc_path'
+ * variables containing a path as encoded in the repository should
+ contain the (sub)string 'repo_path'
+
+
+
+
References
==========
Modified: subversion/branches/atomic-revprop/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c?rev=983275&r1=983274&r2=983275&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c Sat Aug 7 18:13:11 2010
@@ -4073,14 +4073,16 @@ svn_swig_py_setup_wc_diff_callbacks2(voi
PyObject *
svn_swig_py_txdelta_window_t_ops_get(svn_txdelta_window_t *window,
- swig_type_info * op_type_info)
+ swig_type_info * op_type_info,
+ PyObject *window_pool)
{
PyObject *result = PyList_New(window->num_ops);
int i;
for (i = 0; i < window->num_ops; ++i)
PyList_SET_ITEM(result, i,
- SWIG_NewPointerObj(window->ops + i, op_type_info, 0));
+ svn_swig_NewPointerObj(window->ops + i, op_type_info,
+ window_pool, NULL));
return result;
}
Modified: subversion/branches/atomic-revprop/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h?rev=983275&r1=983274&r2=983275&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h Sat Aug 7 18:13:11 2010
@@ -510,11 +510,14 @@ extern const svn_ra_reporter2_t swig_py_
/* Get a list of ops from a window. Used to replace the naive
svn_txdelta_window_t.ops accessor. op_type_info is supposed to be
- the SWIG descriptor of "svn_txdelta_op_t *". */
+ the SWIG descriptor of "svn_txdelta_op_t *". window_pool is supposed
+ to be the pool associated with the window proxy and used for wrapping
+ the op objects. */
SVN_SWIG_SWIGUTIL_EXPORT
PyObject *
svn_swig_py_txdelta_window_t_ops_get(svn_txdelta_window_t *window,
- swig_type_info * op_type_info);
+ swig_type_info * op_type_info,
+ PyObject *window_pool);
#ifdef __cplusplus
}
Modified: subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/delta.py
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/delta.py?rev=983275&r1=983274&r2=983275&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/delta.py (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/swig/python/tests/delta.py Sat Aug 7 18:13:11 2010
@@ -62,6 +62,9 @@ class DeltaTestCase(unittest.TestCase):
self.assertEqual(window.src_ops, len([op for op in window.ops
if op.action_code == svn.delta.svn_txdelta_source]))
+ # Check that the ops inherit the window's pool
+ self.assertEqual(window.ops[0]._parent_pool, window._parent_pool)
+
def suite():
return unittest.defaultTestLoader.loadTestsFromTestCase(DeltaTestCase)
Modified: subversion/branches/atomic-revprop/subversion/bindings/swig/svn_delta.i
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/bindings/swig/svn_delta.i?rev=983275&r1=983274&r2=983275&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/bindings/swig/svn_delta.i (original)
+++ subversion/branches/atomic-revprop/subversion/bindings/swig/svn_delta.i Sat Aug 7 18:13:11 2010
@@ -176,10 +176,53 @@ svn_txdelta_window_t_ops_get(svn_txdelta
%ignore svn_txdelta_window_t::ops;
%inline %{
static PyObject *
-svn_txdelta_window_t_ops_get(svn_txdelta_window_t *window)
+svn_txdelta_window_t_ops_get(PyObject *window_ob)
{
- return svn_swig_py_txdelta_window_t_ops_get(window,
- SWIG_TypeQuery("svn_txdelta_op_t *"));
+ void *window;
+ PyObject *ops_list, *window_pool;
+ int status;
+
+ /* Kludge alert!
+ Normally, these kinds of conversions would belong in a typemap.
+ However, typemaps won't allow us to change the result type to an array,
+ so we have to make this custom accessor function.
+ A cleaner approach would be to use something like:
+
+ %extend svn_txdelta_window_t { void get_ops(apr_array_header_t ** ops); }
+
+ But that means unnecessary copying, plus more hacks to get the pool for the
+ array and for wrapping the individual op objects. So we just don't bother.
+ */
+
+ /* Note: the standard svn-python typemap releases the GIL while calling the
+ wrapped function, but this function does Python stuff, so we have to
+ reacquire it again. */
+ svn_swig_py_acquire_py_lock();
+ status = svn_swig_ConvertPtr(window_ob, &window,
+ SWIG_TypeQuery("svn_txdelta_window_t *"));
+
+ if (status != 0)
+ {
+ PyErr_SetString(PyExc_TypeError,
+ "expected an svn_txdelta_window_t* proxy");
+ svn_swig_py_release_py_lock();
+ return NULL;
+ }
+
+ window_pool = PyObject_GetAttrString(window_ob, "_parent_pool");
+
+ if (window_pool == NULL)
+ {
+ svn_swig_py_release_py_lock();
+ return NULL;
+ }
+
+ ops_list = svn_swig_py_txdelta_window_t_ops_get(window,
+ SWIG_TypeQuery("svn_txdelta_op_t *"), window_pool);
+
+ svn_swig_py_release_py_lock();
+
+ return ops_list;
}
%}
#endif
Modified: subversion/branches/atomic-revprop/subversion/include/svn_error_codes.h
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/include/svn_error_codes.h?rev=983275&r1=983274&r2=983275&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/include/svn_error_codes.h (original)
+++ subversion/branches/atomic-revprop/subversion/include/svn_error_codes.h Sat Aug 7 18:13:11 2010
@@ -969,6 +969,11 @@ SVN_ERROR_START
SVN_ERR_RA_SERF_CATEGORY_START + 2,
"Initialization of the GSSAPI context failed")
+ /** @since New in 1.7. */
+ SVN_ERRDEF(SVN_ERR_RA_SERF_WRAPPED_ERROR,
+ SVN_ERR_RA_SERF_CATEGORY_START + 3,
+ "While handling serf response:")
+
/* libsvn_auth errors */
/* this error can be used when an auth provider doesn't have
Modified: subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/commit.c?rev=983275&r1=983274&r2=983275&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/commit.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/commit.c Sat Aug 7 18:13:11 2010
@@ -416,8 +416,8 @@ static svn_error_t * do_checkout(commit_
### place result into res->wr_url and return it */
/* create/prep the request */
- request =
- svn_ra_neon__request_create(cc->ras, "CHECKOUT", vsn_url, pool);
+ SVN_ERR(svn_ra_neon__request_create(&request, cc->ras, "CHECKOUT", vsn_url,
+ pool));
/* ### store this into cc to avoid pool growth */
body = apr_psprintf(request->pool,
@@ -808,9 +808,8 @@ static svn_error_t * commit_delete_entry
APR_HASH_KEY_STRING)))
apr_hash_set(child_tokens, path, APR_HASH_KEY_STRING, token);
-
- request =
- svn_ra_neon__request_create(parent->cc->ras, "DELETE", child, pool);
+ SVN_ERR(svn_ra_neon__request_create(&request, parent->cc->ras, "DELETE",
+ child, pool));
err = svn_ra_neon__assemble_locktoken_body(&locks_list,
child_tokens, request->pool);
@@ -1275,7 +1274,8 @@ static svn_error_t * commit_close_file(v
svn_error_t *err = SVN_NO_ERROR;
/* create/prep the request */
- request = svn_ra_neon__request_create(cc->ras, "PUT", url, pool);
+ SVN_ERR(svn_ra_neon__request_create(&request, cc->ras, "PUT", url,
+ pool));
extra_headers = apr_hash_make(request->pool);
@@ -1356,7 +1356,6 @@ static svn_error_t * commit_close_edit(v
cc->disable_merge_response,
pool));
SVN_ERR(delete_activity(edit_baton, pool));
- SVN_ERR(svn_ra_neon__maybe_store_auth_info(cc->ras, pool));
if (cc->callback && commit_info->revision != SVN_INVALID_REVNUM)
SVN_ERR(cc->callback(commit_info, cc->callback_baton, pool));
Modified: subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/fetch.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/fetch.c?rev=983275&r1=983274&r2=983275&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/fetch.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/fetch.c Sat Aug 7 18:13:11 2010
@@ -394,7 +394,7 @@ static svn_error_t *custom_get_request(s
delta_base = NULL;
}
- request = svn_ra_neon__request_create(ras, "GET", url, pool);
+ SVN_ERR(svn_ra_neon__request_create(&request, ras, "GET", url, pool));
if (delta_base)
{
@@ -1111,7 +1111,6 @@ svn_error_t *svn_ra_neon__get_latest_rev
ras, ras->root.path,
SVN_INVALID_REVNUM, pool));
}
- SVN_ERR(svn_ra_neon__maybe_store_auth_info(ras, pool));
return NULL;
}
@@ -2468,8 +2467,7 @@ static svn_error_t * reporter_finish_rep
_("REPORT response handling failed to complete the editor drive"));
}
- /* store auth info if we can. */
- return svn_ra_neon__maybe_store_auth_info(rb->ras, pool);
+ return SVN_NO_ERROR;
}
static const svn_ra_reporter3_t ra_neon_reporter = {
Modified: subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/lock.c?rev=983275&r1=983274&r2=983275&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/lock.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/lock.c Sat Aug 7 18:13:11 2010
@@ -259,7 +259,7 @@ do_lock(svn_lock_t **lock,
_("Failed to parse URI '%s'"), url);
}
- req = svn_ra_neon__request_create(ras, "LOCK", uri.path, pool);
+ SVN_ERR(svn_ra_neon__request_create(&req, ras, "LOCK", uri.path, pool));
ne_uri_free(&uri);
lrb->pool = pool;
@@ -532,7 +532,7 @@ svn_ra_neon__get_lock_internal(svn_ra_ne
url = apr_pstrdup(pool, uri.path);
ne_uri_free(&uri);
- req = svn_ra_neon__request_create(ras, "PROPFIND", url, pool);
+ SVN_ERR(svn_ra_neon__request_create(&req, ras, "PROPFIND", url, pool));
lrb->pool = pool;
lrb->xml_table = lock_elements;
Modified: subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/options.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/options.c?rev=983275&r1=983274&r2=983275&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/options.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/options.c Sat Aug 7 18:13:11 2010
@@ -269,7 +269,8 @@ svn_ra_neon__exchange_capabilities(svn_r
*youngest_rev = SVN_INVALID_REVNUM;
- req = svn_ra_neon__request_create(ras, "OPTIONS", ras->url->data, pool);
+ SVN_ERR(svn_ra_neon__request_create(&req, ras, "OPTIONS", ras->url->data,
+ pool));
/* ### Use a symbolic name somewhere for this MIME type? */
ne_add_request_header(req->ne_req, "Content-Type", "text/xml");
Modified: subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/ra_neon.h
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/ra_neon.h?rev=983275&r1=983274&r2=983275&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/ra_neon.h (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/ra_neon.h Sat Aug 7 18:13:11 2010
@@ -98,7 +98,8 @@ typedef struct svn_ra_neon__session_t {
void *callback_baton;
svn_auth_iterstate_t *auth_iterstate; /* state of authentication retries */
- const char *auth_username; /* last authenticated username used */
+ svn_boolean_t auth_used; /* Save authorization state after
+ successful usage */
svn_auth_iterstate_t *p11pin_iterstate; /* state of PKCS#11 pin retries */
@@ -200,8 +201,9 @@ typedef struct {
*
* Register a pool cleanup for any allocated Neon resources.
*/
-svn_ra_neon__request_t *
-svn_ra_neon__request_create(svn_ra_neon__session_t *sess,
+svn_error_t *
+svn_ra_neon__request_create(svn_ra_neon__request_t **request,
+ svn_ra_neon__session_t *sess,
const char *method, const char *url,
apr_pool_t *pool);
Modified: subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/session.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/session.c?rev=983275&r1=983274&r2=983275&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/session.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/session.c Sat Aug 7 18:13:11 2010
@@ -94,8 +94,8 @@ static int request_auth(void *userdata,
void *creds;
svn_auth_cred_simple_t *simple_creds;
- /* Start by clearing the cache of any previously-fetched username. */
- ras->auth_username = NULL;
+ /* Start by marking the current credentials invalid. */
+ ras->auth_used = FALSE;
/* No auth_baton? Give up. */
if (! ras->callbacks->auth_baton)
@@ -135,13 +135,14 @@ static int request_auth(void *userdata,
}
simple_creds = creds;
+ /* Make svn_ra_neon__request_dispatch store the credentials after it
+ sees a succesful response */
+ ras->auth_used = TRUE;
+
/* ### silently truncates username/password to 256 chars. */
apr_cpystrn(username, simple_creds->username, NE_ABUFSIZ);
apr_cpystrn(password, simple_creds->password, NE_ABUFSIZ);
- /* Cache the fetched username in ra_session. */
- ras->auth_username = apr_pstrdup(ras->pool, simple_creds->username);
-
return 0;
}
@@ -1170,7 +1171,6 @@ static svn_error_t *svn_ra_neon__do_get_
SVN_ERR(svn_ra_neon__search_for_starting_props(&rsrc, &lopped_path,
ras, ras->url->data,
pool));
- SVN_ERR(svn_ra_neon__maybe_store_auth_info(ras, pool));
if (! ras->uuid)
{
Modified: subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/util.c?rev=983275&r1=983274&r2=983275&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/util.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_ra_neon/util.c Sat Aug 7 18:13:11 2010
@@ -354,21 +354,24 @@ path_from_url(const char *url)
return *p == '\0' ? "/" : p;
}
-svn_ra_neon__request_t *
-svn_ra_neon__request_create(svn_ra_neon__session_t *sess,
+svn_error_t *
+svn_ra_neon__request_create(svn_ra_neon__request_t **request,
+ svn_ra_neon__session_t *sess,
const char *method, const char *url,
apr_pool_t *pool)
{
apr_pool_t *reqpool = svn_pool_create(pool);
- svn_ra_neon__request_t *req = apr_pcalloc(reqpool, sizeof(*req));
+ svn_ra_neon__request_t *req;
+ const char *path;
/* We never want to send Neon an absolute URL, since that can cause
problems with some servers (for example, those that may be accessed
using different server names from different locations, or those that
want to rewrite the incoming URL). If the URL passed in is absolute,
convert it to a path-absolute relative URL. */
- const char *path = path_from_url(url);
+ path = path_from_url(url);
+ req = apr_pcalloc(reqpool, sizeof(*req));
req->ne_sess = sess->main_session_busy ? sess->ne_sess2 : sess->ne_sess;
req->ne_req = ne_request_create(req->ne_sess, method, path);
req->sess = sess;
@@ -387,7 +390,8 @@ svn_ra_neon__request_create(svn_ra_neon_
dav_request_cleanup,
apr_pool_cleanup_null);
- return req;
+ *request = req;
+ return SVN_NO_ERROR;
}
static apr_status_t
@@ -1309,14 +1313,16 @@ svn_ra_neon__parsed_request(svn_ra_neon_
apr_pool_t *pool)
{
/* create/prep the request */
- svn_ra_neon__request_t* req = svn_ra_neon__request_create(sess, method, url,
- pool);
- svn_error_t *err = parsed_request(req,
- sess, method, url, body, body_file,
- set_parser,
- startelm_cb, cdata_cb, endelm_cb,
- baton, extra_headers, status_code,
- spool_response, pool);
+ svn_ra_neon__request_t* req;
+ svn_error_t *err;
+
+ SVN_ERR(svn_ra_neon__request_create(&req, sess, method, url, pool));
+
+ err = parsed_request(req, sess, method, url, body, body_file,
+ set_parser, startelm_cb, cdata_cb, endelm_cb,
+ baton, extra_headers, status_code, spool_response,
+ pool);
+
svn_ra_neon__request_destroy(req);
return err;
}
@@ -1331,10 +1337,11 @@ svn_ra_neon__simple_request(int *code,
const char *body,
int okay_1, int okay_2, apr_pool_t *pool)
{
- svn_ra_neon__request_t *req =
- svn_ra_neon__request_create(ras, method, url, pool);
+ svn_ra_neon__request_t *req;
svn_error_t *err;
+ SVN_ERR(svn_ra_neon__request_create(&req, ras, method, url, pool));
+
/* we don't need the status parser: it's attached to the request
and detected errors will be returned there... */
(void) multistatus_parser_create(req);
@@ -1483,6 +1490,15 @@ svn_ra_neon__request_dispatch(int *code_
req->code_desc = apr_pstrdup(pool, statstruct->reason_phrase);
req->code = statstruct->code;
+ /* If we see a successful request that used authentication, we should store
+ the credentials for future use. */
+ if (req->sess->auth_used
+ && statstruct->code < 400)
+ {
+ req->sess->auth_used = FALSE;
+ SVN_ERR(svn_ra_neon__maybe_store_auth_info(req->sess, pool));
+ }
+
if (code_p)
*code_p = req->code;
Modified: subversion/branches/atomic-revprop/subversion/libsvn_ra_serf/blame.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_ra_serf/blame.c?rev=983275&r1=983274&r2=983275&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_ra_serf/blame.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_ra_serf/blame.c Sat Aug 7 18:13:11 2010
@@ -330,7 +330,7 @@ end_blame(svn_ra_serf__xml_parser_t *par
else if (state == TXDELTA &&
strcmp(name.name, "txdelta") == 0)
{
- svn_stream_close(info->stream);
+ SVN_ERR(svn_stream_close(info->stream));
svn_ra_serf__xml_pop_state(parser);
}
Modified: subversion/branches/atomic-revprop/subversion/libsvn_ra_serf/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_ra_serf/commit.c?rev=983275&r1=983274&r2=983275&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_ra_serf/commit.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_ra_serf/commit.c Sat Aug 7 18:13:11 2010
@@ -803,7 +803,6 @@ create_proppatch_body(serf_bucket_t **bk
{
proppatch_context_t *ctx = baton;
serf_bucket_t *body_bkt;
- svn_error_t *err;
body_bkt = serf_bucket_aggregate_create(alloc);
Modified: subversion/branches/atomic-revprop/subversion/libsvn_ra_serf/replay.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_ra_serf/replay.c?rev=983275&r1=983274&r2=983275&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_ra_serf/replay.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_ra_serf/replay.c Sat Aug 7 18:13:11 2010
@@ -720,6 +720,7 @@ svn_ra_serf__replay_range(svn_ra_session
while (active_reports || rev <= end_revision)
{
apr_status_t status;
+ svn_error_t *err;
svn_ra_serf__list_t *done_list;
svn_ra_serf__list_t *done_reports = NULL;
replay_context_t *replay_ctx;
@@ -804,8 +805,12 @@ svn_ra_serf__replay_range(svn_ra_session
status = serf_context_run(session->context, session->timeout,
pool);
+ err = session->pending_error;
+ session->pending_error = NULL;
+
if (APR_STATUS_IS_TIMEUP(status))
{
+ svn_error_clear(err);
return svn_error_create(SVN_ERR_RA_DAV_CONN_TIMEOUT,
NULL,
_("Connection timed out"));
@@ -824,10 +829,9 @@ svn_ra_serf__replay_range(svn_ra_session
active_reports--;
}
+ SVN_ERR(err);
if (status)
{
- SVN_ERR(session->pending_error);
-
return svn_error_wrap_apr(status,
_("Error retrieving replay REPORT (%d)"),
status);
Modified: subversion/branches/atomic-revprop/subversion/libsvn_ra_serf/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_ra_serf/update.c?rev=983275&r1=983274&r2=983275&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_ra_serf/update.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_ra_serf/update.c Sat Aug 7 18:13:11 2010
@@ -239,9 +239,6 @@ typedef struct report_fetch_t {
/* Our pool. */
apr_pool_t *pool;
- /* Non-NULL if we received an error during processing. */
- svn_error_t *err;
-
/* The session we should use to fetch the file. */
svn_ra_serf__session_t *sess;
@@ -725,7 +722,7 @@ cancel_fetch(serf_request_t *request,
fetch_ctx->read_size = 0;
}
- return APR_SUCCESS;
+ return SVN_NO_ERROR;
}
/* We have no idea what went wrong. */
@@ -737,8 +734,6 @@ error_fetch(serf_request_t *request,
report_fetch_t *fetch_ctx,
svn_error_t *err)
{
- fetch_ctx->err = err;
-
fetch_ctx->done = TRUE;
fetch_ctx->done_item.data = fetch_ctx;
@@ -750,7 +745,12 @@ error_fetch(serf_request_t *request,
serf_request_set_handler(request,
svn_ra_serf__response_discard_handler, NULL);
- return SVN_NO_ERROR;
+ /* Some errors would be handled by serf; make sure they really make
+ the update fail by wrapping it in a different error. */
+ if (!SERF_BUCKET_READ_ERROR(err->apr_err))
+ return svn_error_create(SVN_ERR_RA_SERF_WRAPPED_ERROR, err, NULL);
+
+ return err;
}
/* Implements svn_ra_serf__response_handler_t */
@@ -1010,19 +1010,25 @@ handle_stream(serf_request_t *request,
report_fetch_t *fetch_ctx = handler_baton;
serf_status_line sl;
const char *location;
+ svn_error_t *err;
serf_bucket_response_status(response, &sl);
/* Woo-hoo. Nothing here to see. */
location = svn_ra_serf__response_get_location(response, pool);
- fetch_ctx->err = svn_ra_serf__error_on_status(sl.code,
- fetch_ctx->info->name,
- location);
- if (fetch_ctx->err)
+
+ err = svn_ra_serf__error_on_status(sl.code,
+ fetch_ctx->info->name,
+ location);
+ if (err)
{
fetch_ctx->done = TRUE;
- return svn_ra_serf__handle_discard_body(request, response, NULL, pool);
+ err = svn_error_compose_create(
+ err,
+ svn_ra_serf__handle_discard_body(request, response, NULL, pool));
+
+ return svn_error_return(err);
}
while (1)
@@ -1072,7 +1078,8 @@ handle_stream(serf_request_t *request,
written_len = len;
- svn_stream_write(fetch_ctx->target_stream, data, &written_len);
+ SVN_ERR(svn_stream_write(fetch_ctx->target_stream, data,
+ &written_len));
}
if (APR_STATUS_IS_EOF(status))
@@ -1280,9 +1287,9 @@ start_report(svn_ra_serf__xml_parser_t *
_("Missing revision attr in target-revision element"));
}
- ctx->update_editor->set_target_revision(ctx->update_baton,
- SVN_STR_TO_REV(rev),
- ctx->sess->pool);
+ SVN_ERR(ctx->update_editor->set_target_revision(ctx->update_baton,
+ SVN_STR_TO_REV(rev),
+ ctx->sess->pool));
}
else if (state == NONE && strcmp(name.name, "open-directory") == 0)
{
@@ -1518,9 +1525,9 @@ start_report(svn_ra_serf__xml_parser_t *
SVN_ERR(open_dir(info->dir));
- ctx->update_editor->absent_directory(file_name,
- info->dir->dir_baton,
- info->dir->pool);
+ SVN_ERR(ctx->update_editor->absent_directory(file_name,
+ info->dir->dir_baton,
+ info->dir->pool));
}
else if ((state == OPEN_DIR || state == ADD_DIR) &&
strcmp(name.name, "absent-file") == 0)
@@ -1541,9 +1548,9 @@ start_report(svn_ra_serf__xml_parser_t *
SVN_ERR(open_dir(info->dir));
- ctx->update_editor->absent_file(file_name,
- info->dir->dir_baton,
- info->dir->pool);
+ SVN_ERR(ctx->update_editor->absent_file(file_name,
+ info->dir->dir_baton,
+ info->dir->pool));
}
else if (state == OPEN_DIR || state == ADD_DIR)
{
@@ -2212,10 +2219,12 @@ open_connection_if_needed(svn_ra_serf__s
/* Authentication protocol specific initalization. */
if (sess->auth_protocol)
- sess->auth_protocol->init_conn_func(sess, sess->conns[cur], sess->pool);
+ SVN_ERR(sess->auth_protocol->init_conn_func(sess, sess->conns[cur],
+ sess->pool));
if (sess->proxy_auth_protocol)
- sess->proxy_auth_protocol->init_conn_func(sess, sess->conns[cur],
- sess->pool);
+ SVN_ERR(sess->proxy_auth_protocol->init_conn_func(sess,
+ sess->conns[cur],
+ sess->pool));
}
return SVN_NO_ERROR;
@@ -2312,17 +2321,23 @@ finish_report(void *report_baton,
while (!report->done || report->active_fetches || report->active_propfinds)
{
+ svn_error_t *err;
status = serf_context_run(sess->context, sess->timeout, pool);
+
+ err = sess->pending_error;
+ sess->pending_error = SVN_NO_ERROR;
+
if (APR_STATUS_IS_TIMEUP(status))
{
+ svn_error_clear(err);
return svn_error_create(SVN_ERR_RA_DAV_CONN_TIMEOUT,
NULL,
_("Connection timed out"));
}
+
+ SVN_ERR(err);
if (status)
{
- SVN_ERR(sess->pending_error);
-
return svn_error_wrap_apr(status, _("Error retrieving REPORT (%d)"),
status);
}
@@ -2395,21 +2410,6 @@ finish_report(void *report_baton,
report_fetch_t *done_fetch = done_list->data;
report_dir_t *cur_dir;
- if (done_fetch->err)
- {
- svn_error_t *err = done_fetch->err;
- /* Error found. There might be more, clear those first. */
- done_list = done_list->next;
- while (done_list)
- {
- done_fetch = done_list->data;
- if (done_fetch->err)
- svn_error_clear(done_fetch->err);
- done_list = done_list->next;
- }
- return err;
- }
-
/* decrease our parent's directory refcount. */
cur_dir = done_fetch->info->dir;
cur_dir->ref_count--;
@@ -2772,7 +2772,6 @@ svn_ra_serf__get_file(svn_ra_session_t *
svn_ra_serf__request_create(handler);
SVN_ERR(svn_ra_serf__context_run_wait(&stream_ctx->done, session, pool));
- SVN_ERR(stream_ctx->err);
}
return SVN_NO_ERROR;
Modified: subversion/branches/atomic-revprop/subversion/libsvn_wc/adm_ops.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_wc/adm_ops.c?rev=983275&r1=983274&r2=983275&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_wc/adm_ops.c Sat Aug 7 18:13:11 2010
@@ -2155,7 +2155,8 @@ svn_wc__internal_remove_from_revision_co
err = svn_io_dir_remove_nonrecursive(local_abspath, iterpool);
if (err)
{
- left_something = TRUE;
+ if (!APR_STATUS_IS_ENOENT(err->apr_err))
+ left_something = TRUE;
svn_error_clear(err);
}
}
Modified: subversion/branches/atomic-revprop/subversion/libsvn_wc/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_wc/lock.c?rev=983275&r1=983274&r2=983275&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_wc/lock.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_wc/lock.c Sat Aug 7 18:13:11 2010
@@ -147,7 +147,6 @@ svn_wc__internal_check_wc(int *wc_format
#ifdef SVN_WC__SINGLE_DB
if (*wc_format >= SVN_WC__WC_NG_VERSION)
{
- svn_error_t *err;
svn_wc__db_status_t db_status;
svn_wc__db_kind_t db_kind;
Modified: subversion/branches/atomic-revprop/subversion/libsvn_wc/log.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_wc/log.c?rev=983275&r1=983274&r2=983275&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_wc/log.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_wc/log.c Sat Aug 7 18:13:11 2010
@@ -74,11 +74,6 @@
#define SVN_WC__LOG_ATTR_REVISION "revision"
#define SVN_WC__LOG_ATTR_KIND "kind"
-/* Add a new tree conflict to the parent entry's tree-conflict-data. */
-/* ### rev'd to -2 because we changed the params. developers better not
- ### update across this change if they have stale logs :-) */
-#define SVN_WC__LOG_ADD_TREE_CONFLICT "add-tree-conflict-2"
-
/** Log attributes. See the documentation above for log actions for
how these are used. **/
@@ -242,37 +237,6 @@ log_do_delete_entry(struct log_runner *l
}
/* */
-static svn_error_t *
-log_do_add_tree_conflict(struct log_runner *loggy,
- const char *victim_basename,
- const char **atts)
-{
- svn_skel_t *skel;
- const char *raw_conflict;
- const svn_wc_conflict_description2_t *new_conflict;
- svn_error_t *err;
-
- /* Convert the text data to a conflict. */
- raw_conflict = svn_xml_get_attr_value(SVN_WC__LOG_ATTR_DATA, atts);
- skel = svn_skel__parse(raw_conflict, strlen(raw_conflict), loggy->pool);
- SVN_ERR(svn_wc__deserialize_conflict(&new_conflict,
- skel,
- loggy->adm_abspath,
- loggy->pool, loggy->pool));
-
- err = svn_wc__db_op_set_tree_conflict(loggy->db,
- new_conflict->local_abspath,
- new_conflict,
- loggy->pool);
- if (err)
- return svn_error_createf(SVN_ERR_WC_BAD_ADM_LOG, err,
- _("Error recording tree conflict on '%s'"),
- new_conflict->local_abspath);
-
- return SVN_NO_ERROR;
-}
-
-/* */
static void
start_handler(void *userData, const char *eltname, const char **atts)
{
@@ -310,9 +274,6 @@ start_handler(void *userData, const char
kind = svn_node_file;
err = log_do_delete_entry(loggy, name, revision, kind);
}
- else if (strcmp(eltname, SVN_WC__LOG_ADD_TREE_CONFLICT) == 0) {
- err = log_do_add_tree_conflict(loggy, name, atts);
- }
else
{
SIGNAL_ERROR
@@ -427,37 +388,6 @@ svn_wc__loggy_delete_entry(svn_skel_t **
db, adm_abspath, log_accum,
result_pool));
}
-
-svn_error_t *
-svn_wc__loggy_add_tree_conflict(svn_skel_t **work_item,
- svn_wc__db_t *db,
- const char *adm_abspath,
- const svn_wc_conflict_description2_t *conflict,
- apr_pool_t *result_pool)
-{
- svn_stringbuf_t *log_accum = NULL;
- const char *victim_basename;
- svn_skel_t *skel;
- const char *conflict_data;
-
- victim_basename = svn_dirent_basename(conflict->local_abspath, result_pool);
- SVN_ERR(svn_wc__serialize_conflict(&skel, conflict,
- result_pool, result_pool));
- conflict_data = svn_skel__unparse(skel, result_pool)->data,
-
- svn_xml_make_open_tag(&log_accum, result_pool, svn_xml_self_closing,
- SVN_WC__LOG_ADD_TREE_CONFLICT,
- SVN_WC__LOG_ATTR_NAME,
- victim_basename,
- SVN_WC__LOG_ATTR_DATA,
- conflict_data,
- NULL);
-
- return svn_error_return(svn_wc__wq_build_loggy(work_item,
- db, adm_abspath, log_accum,
- result_pool));
-}
-
/*** Recursively do log things. ***/
Modified: subversion/branches/atomic-revprop/subversion/libsvn_wc/log.h
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_wc/log.h?rev=983275&r1=983274&r2=983275&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_wc/log.h (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_wc/log.h Sat Aug 7 18:13:11 2010
@@ -65,19 +65,6 @@ svn_wc__loggy_delete_entry(svn_skel_t **
svn_wc__db_kind_t kind,
apr_pool_t *result_pool);
-/* Set *WORK_ITEM to a work queue instruction to
- ### ...
-
- ADM_ABSPATH is described above.
-*/
-svn_error_t *
-svn_wc__loggy_add_tree_conflict(svn_skel_t **work_item,
- svn_wc__db_t *db,
- const char *adm_abspath,
- const svn_wc_conflict_description2_t *conflict,
- apr_pool_t *result_pool);
-
-
/* TODO ###
Use SCRATCH_POOL for temporary allocations.
Modified: subversion/branches/atomic-revprop/subversion/libsvn_wc/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_wc/status.c?rev=983275&r1=983274&r2=983275&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_wc/status.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_wc/status.c Sat Aug 7 18:13:11 2010
@@ -1280,7 +1280,6 @@ get_dir_status(const struct walk_status_
/* Versioned node */
svn_wc__db_status_t node_status;
svn_wc__db_kind_t node_kind;
- svn_boolean_t hidden;
SVN_ERR(svn_wc__db_read_info(&node_status, &node_kind, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL,
Modified: subversion/branches/atomic-revprop/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_wc/update_editor.c?rev=983275&r1=983274&r2=983275&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_wc/update_editor.c Sat Aug 7 18:13:11 2010
@@ -2143,12 +2143,19 @@ do_entry_deletion(struct edit_baton *eb,
if (tree_conflict != NULL)
{
- /* When we raise a tree conflict on a directory, we want to avoid
+ /* When we raise a tree conflict on a node, we want to avoid
* making any changes inside it. (Will an update ever try to make
- * further changes to or inside a directory it's just deleted?) */
- SVN_ERR(svn_wc__loggy_add_tree_conflict(&work_item, eb->db, dir_abspath,
- tree_conflict, pool));
- SVN_ERR(svn_wc__db_wq_add(eb->db, dir_abspath, work_item, pool));
+ * further changes to or inside a directory it's just deleted?)
+ *
+ * ### BH: Only if a new node is added in it's place.
+ * See svn_delta.h for further details. */
+
+ /* ### Note that we still add this on the parent of a node, so it is
+ ### safe to add it now, while we remove the node later */
+ SVN_ERR(svn_wc__db_op_set_tree_conflict(eb->db,
+ tree_conflict->local_abspath,
+ tree_conflict,
+ pool));
SVN_ERR(remember_skipped_tree(eb, local_abspath));
@@ -2165,13 +2172,6 @@ do_entry_deletion(struct edit_baton *eb,
* we must schedule the existing content for re-addition as a copy
* of what it was, but with its local modifications preserved. */
- /* Run the log in the parent dir, to record the tree conflict.
- * Do this before schedule_existing_item_for_re_add(), in case
- * that needs to modify the same entries. */
- SVN_ERR(svn_wc__wq_run(eb->db, dir_abspath,
- eb->cancel_func, eb->cancel_baton,
- pool));
-
SVN_ERR(svn_wc__db_temp_op_make_copy(eb->db, local_abspath, TRUE,
pool));
@@ -2189,19 +2189,17 @@ do_entry_deletion(struct edit_baton *eb,
else if (tree_conflict->reason == svn_wc_conflict_reason_replaced)
{
/* The item was locally replaced with something else. We should
- * keep the existing item schedule-replace, but we also need to
- * update the BASE rev of the item to the revision we are updating
- * to. Otherwise, the replace cannot be committed because the item
- * is considered out-of-date, and it cannot be updated either because
- * we're here to do just that. */
-
- /* Run the log in the parent dir, to record the tree conflict.
- * Do this before schedule_existing_item_for_re_add(), in case
- * that needs to modify the same entries. */
- SVN_ERR(svn_wc__wq_run(eb->db, dir_abspath,
- eb->cancel_func, eb->cancel_baton,
- pool));
+ * remove the BASE node below the new working node, which turns
+ * the replacement in an addition.
+ */
+
+ /* ### This does something similar, but not exactly what is
+ ### required: Copy working to working and then delete
+ ### BASE_NODE. Not exactly right, but not
+ ### completely wrong as the result is the same.
+ ### It only misses the explicit target check for adding
+ ### back a not-present node. */
SVN_ERR(svn_wc__db_temp_op_make_copy(eb->db, local_abspath, TRUE,
pool));
@@ -2677,17 +2675,10 @@ add_directory(const char *path,
if (tree_conflict != NULL)
{
- svn_skel_t *work_item;
-
/* Queue this conflict in the parent so that its descendants
are skipped silently. */
- SVN_ERR(svn_wc__loggy_add_tree_conflict(&work_item,
- eb->db,
- pb->local_abspath,
- tree_conflict,
- pool));
- SVN_ERR(svn_wc__db_wq_add(eb->db, pb->local_abspath,
- work_item, pool));
+ SVN_ERR(svn_wc__db_op_set_tree_conflict(eb->db, db->local_abspath,
+ tree_conflict, pool));
SVN_ERR(remember_skipped_tree(eb, db->local_abspath));
@@ -2876,13 +2867,9 @@ open_directory(const char *path,
/* Remember the roots of any locally deleted trees. */
if (tree_conflict != NULL)
{
- svn_skel_t *work_item;
-
/* Place a tree conflict into the parent work queue. */
- SVN_ERR(svn_wc__loggy_add_tree_conflict(&work_item,
- eb->db, pb->local_abspath,
+ SVN_ERR(svn_wc__db_op_set_tree_conflict(eb->db, db->local_abspath,
tree_conflict, pool));
- SVN_ERR(svn_wc__db_wq_add(eb->db, pb->local_abspath, work_item, pool));
do_notification(eb, db->local_abspath, svn_node_dir,
svn_wc_notify_tree_conflict, pool);
@@ -4167,17 +4154,12 @@ add_file(const char *path,
if (tree_conflict != NULL)
{
- svn_skel_t *work_item;
-
fb->obstruction_found = TRUE;
- SVN_ERR(svn_wc__loggy_add_tree_conflict(&work_item,
- eb->db,
- pb->local_abspath,
+ SVN_ERR(svn_wc__db_op_set_tree_conflict(eb->db,
+ fb->local_abspath,
tree_conflict,
subpool));
- SVN_ERR(svn_wc__db_wq_add(eb->db, pb->local_abspath,
- work_item, pool));
fb->already_notified = TRUE;
do_notification(eb, fb->local_abspath, svn_node_unknown,
@@ -4268,17 +4250,14 @@ open_file(const char *path,
if (!pb->in_deleted_and_tree_conflicted_subtree)
SVN_ERR(check_tree_conflict(&tree_conflict, eb, fb->local_abspath,
svn_wc_conflict_action_edit, svn_node_file,
- fb->new_relpath, pool));
+ fb->new_relpath, subpool));
/* Is this path the victim of a newly-discovered tree conflict? */
if (tree_conflict)
{
- svn_skel_t *work_item;
-
- SVN_ERR(svn_wc__loggy_add_tree_conflict(&work_item,
- eb->db, pb->local_abspath,
- tree_conflict, pool));
- SVN_ERR(svn_wc__db_wq_add(eb->db, pb->local_abspath, work_item, pool));
+ SVN_ERR(svn_wc__db_op_set_tree_conflict(eb->db,
+ fb->local_abspath,
+ tree_conflict, subpool));
if (tree_conflict->reason == svn_wc_conflict_reason_deleted ||
tree_conflict->reason == svn_wc_conflict_reason_replaced)
@@ -4293,7 +4272,7 @@ open_file(const char *path,
fb->already_notified = TRUE;
do_notification(eb, fb->local_abspath, svn_node_unknown,
- svn_wc_notify_tree_conflict, pool);
+ svn_wc_notify_tree_conflict, subpool);
}
svn_pool_destroy(subpool);
@@ -5180,13 +5159,10 @@ close_file(void *file_baton,
svn_wc_conflict_action_add, svn_node_file,
fb->new_relpath, pool));
SVN_ERR_ASSERT(tree_conflict != NULL);
- SVN_ERR(svn_wc__loggy_add_tree_conflict(&work_item,
- eb->db,
- fb->dir_baton->local_abspath,
+ SVN_ERR(svn_wc__db_op_set_tree_conflict(eb->db,
+ fb->local_abspath,
tree_conflict,
- pool));
- SVN_ERR(svn_wc__db_wq_add(eb->db, fb->dir_baton->local_abspath,
- work_item, pool));
+ scratch_pool));
fb->already_notified = TRUE;
do_notification(eb, fb->local_abspath, svn_node_unknown,
Modified: subversion/branches/atomic-revprop/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_wc/wc_db.c?rev=983275&r1=983274&r2=983275&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_wc/wc_db.c Sat Aug 7 18:13:11 2010
@@ -8912,9 +8912,6 @@ make_copy_txn(void *baton,
/* Remove the BASE_NODE if the caller asked us to do that */
if (mcb->remove_base)
{
- const char *local_relpath;
- svn_wc__db_pdh_t *pdh;
-
SVN_ERR(svn_sqlite__get_statement(&stmt, sdb,
STMT_DELETE_BASE_NODE));
SVN_ERR(svn_sqlite__bindf(stmt, "is",
@@ -8935,6 +8932,9 @@ make_copy_txn(void *baton,
/* Remove BASE_NODE_STUB */
if (*mcb->local_relpath == '\0')
{
+ const char *local_relpath;
+ svn_wc__db_pdh_t *pdh;
+
SVN_ERR(navigate_to_parent(&pdh, mcb->db, mcb->pdh,
svn_sqlite__mode_readwrite,
FALSE, iterpool));
Modified: subversion/branches/atomic-revprop/subversion/svnrdump/load_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/svnrdump/load_editor.c?rev=983275&r1=983274&r2=983275&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/svnrdump/load_editor.c (original)
+++ subversion/branches/atomic-revprop/subversion/svnrdump/load_editor.c Sat Aug 7 18:13:11 2010
@@ -33,6 +33,12 @@
#include "load_editor.h"
+#ifdef SVN_DEBUG
+#define LDR_DBG(x) SVN_DBG(x)
+#else
+#define LDR_DBG(x) while(0)
+#endif
+
static svn_error_t *
commit_callback(const svn_commit_info_t *commit_info,
void *baton,
@@ -56,7 +62,7 @@ new_revision_record(void **revision_bato
rb = apr_pcalloc(pool, sizeof(*rb));
pb = parse_baton;
- pb->pool = svn_pool_create(pool);
+ rb->pool = svn_pool_create(pool);
rb->pb = pb;
for (hi = apr_hash_first(pool, headers); hi; hi = apr_hash_next(hi))
@@ -72,12 +78,12 @@ new_revision_record(void **revision_bato
if (strcmp(hname, SVN_REPOS_DUMPFILE_REVISION_NUMBER) == 0)
rb->rev = atoi(hval);
}
+
/* Set the commit_editor/ commit_edit_baton to NULL and wait for
them to be created in new_node_record */
-
rb->pb->commit_editor = NULL;
rb->pb->commit_edit_baton = NULL;
- rb->revprop_table = apr_hash_make(pb->pool);
+ rb->revprop_table = apr_hash_make(rb->pool);
*revision_baton = rb;
return SVN_NO_ERROR;
@@ -100,17 +106,21 @@ new_node_record(void **node_baton,
void *revision_baton,
apr_pool_t *pool)
{
+ const struct svn_delta_editor_t *commit_editor;
struct node_baton *nb;
struct revision_baton *rb;
+ struct directory_baton *child_db;
apr_hash_index_t *hi;
- void *file_baton;
void *child_baton;
- const struct svn_delta_editor_t *commit_editor;
void *commit_edit_baton;
- void *root_baton;
+ char *ancestor_path;
+ apr_array_header_t *residual_open_path;
+ const char *nb_dirname;
+ apr_size_t residual_close_count;
+ int i;
rb = revision_baton;
- nb = apr_pcalloc(rb->pb->pool, sizeof(*nb));
+ nb = apr_pcalloc(rb->pool, sizeof(*nb));
nb->rb = rb;
nb->copyfrom_path = NULL;
@@ -120,23 +130,41 @@ new_node_record(void **node_baton,
commit_edit_baton = rb->pb->commit_edit_baton;
/* If the creation of commit_editor is pending, create it now and
- open_root on it */
+ open_root on it; also create a top-level directory baton. */
if (!commit_editor) {
+
+ if (rb->revprop_table)
+ {
+ /* Clear revprops that we aren't allowed to set with the commit */
+ apr_hash_set(rb->revprop_table, SVN_PROP_REVISION_AUTHOR,
+ APR_HASH_KEY_STRING, NULL);
+ apr_hash_set(rb->revprop_table, SVN_PROP_REVISION_DATE,
+ APR_HASH_KEY_STRING, NULL);
+ }
+
SVN_ERR(svn_ra_get_commit_editor3(rb->pb->session, &commit_editor,
&commit_edit_baton, rb->revprop_table,
commit_callback, NULL, NULL, FALSE,
- rb->pb->pool));
+ rb->pool));
rb->pb->commit_editor = commit_editor;
rb->pb->commit_edit_baton = commit_edit_baton;
SVN_ERR(commit_editor->open_root(commit_edit_baton, rb->rev - 1,
- rb->pb->pool, &root_baton));
- rb->dir_baton = root_baton;
+ rb->pool, &child_baton));
+
+ LDR_DBG(("Opened root %p\n", child_baton));
+ /* child_db corresponds to the root directory baton here */
+ child_db = apr_pcalloc(rb->pool, sizeof(*child_db));
+ child_db->baton = child_baton;
+ child_db->depth = 0;
+ child_db->relpath = svn_relpath_canonicalize("/", rb->pool);
+ child_db->parent = NULL;
+ rb->db = child_db;
}
- for (hi = apr_hash_first(rb->pb->pool, headers); hi; hi = apr_hash_next(hi))
+ for (hi = apr_hash_first(rb->pool, headers); hi; hi = apr_hash_next(hi))
{
const void *key;
void *val;
@@ -149,7 +177,7 @@ new_node_record(void **node_baton,
/* Parse the different kinds of headers we can encounter and
stuff them into the node_baton for writing later */
if (strcmp(hname, SVN_REPOS_DUMPFILE_NODE_PATH) == 0)
- nb->path = apr_pstrdup(rb->pb->pool, hval);
+ nb->path = apr_pstrdup(rb->pool, hval);
if (strcmp(hname, SVN_REPOS_DUMPFILE_NODE_KIND) == 0)
nb->kind = strcmp(hval, "file") == 0 ? svn_node_file : svn_node_dir;
if (strcmp(hname, SVN_REPOS_DUMPFILE_NODE_ACTION) == 0)
@@ -163,40 +191,117 @@ new_node_record(void **node_baton,
if (strcmp(hval, "replace") == 0)
nb->action = svn_node_action_replace;
}
+ if (strcmp(hname, SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_MD5) == 0)
+ nb->base_checksum = apr_pstrdup(rb->pool, hval);
if (strcmp(hname, SVN_REPOS_DUMPFILE_NODE_COPYFROM_REV) == 0)
nb->copyfrom_rev = atoi(hval);
if (strcmp(hname, SVN_REPOS_DUMPFILE_NODE_COPYFROM_PATH) == 0)
+ nb->copyfrom_path =
+ svn_path_url_add_component2(rb->pb->root_url,
+ apr_pstrdup(rb->pool, hval),
+ rb->pool);
+ }
+
+ nb_dirname = svn_relpath_dirname(nb->path, pool);
+ if (svn_path_compare_paths(nb_dirname,
+ rb->db->relpath) != 0)
+ {
+ /* Before attempting to handle the action, call open_directory
+ for all the path components and set the directory baton
+ accordingly */
+ ancestor_path =
+ svn_relpath_get_longest_ancestor(nb_dirname,
+ rb->db->relpath, pool);
+ residual_close_count =
+ svn_path_component_count(svn_relpath_skip_ancestor(ancestor_path,
+ rb->db->relpath));
+ residual_open_path =
+ svn_path_decompose(svn_relpath_skip_ancestor(ancestor_path,
+ nb_dirname), pool);
+
+ /* First close all as many directories as there are after
+ skip_ancestor, and then open fresh directories */
+ for (i = 0; i < residual_close_count; i ++)
+ {
+ /* Don't worry about destroying the actual rb->db object,
+ since the pool we're using has the lifetime of one
+ revision anyway */
+ LDR_DBG(("Closing dir %p\n", rb->db->baton));
+ SVN_ERR(commit_editor->close_directory(rb->db->baton, rb->pool));
+ rb->db = rb->db->parent;
+ }
+
+ for (i = 0; i < residual_open_path->nelts; i ++)
{
- /* Due to a historical detail in the commit editor, it
- demands that the copyfrom_path includes the URI to the
- repository; to implement this, the edit_baton structure
- from commit.c had to be imported as a commit_edit_baton
- structure in load_editor.h */
- nb->copyfrom_path = svn_path_url_add_component2(rb->pb->root_url,
- apr_pstrdup(rb->pb->pool, hval),
- rb->pb->pool);
+ SVN_ERR(commit_editor->open_directory(APR_ARRAY_IDX(residual_open_path,
+ i, const char *),
+ rb->db->baton,
+ rb->rev - 1,
+ rb->pool, &child_baton));
+ LDR_DBG(("Opened dir %p\n", child_baton));
+ child_db = apr_pcalloc(rb->pool, sizeof(*child_db));
+ child_db->baton = child_baton;
+ child_db->depth = rb->db->depth + 1;
+ child_db->relpath = svn_relpath_join(rb->db->relpath,
+ APR_ARRAY_IDX(residual_open_path,
+ i, const char *),
+ rb->pool);
+ child_db->parent = rb->db;
+ rb->db = child_db;
}
}
switch (nb->action)
{
case svn_node_action_add:
- if (nb->kind == svn_node_file)
+ switch (nb->kind)
{
- SVN_ERR(commit_editor->add_file(nb->path, nb->rb->dir_baton,
- nb->copyfrom_path, nb->copyfrom_rev,
- rb->pb->pool, &file_baton));
- nb->file_baton = file_baton;
+ case svn_node_file:
+ SVN_ERR(commit_editor->add_file(nb->path, rb->db->baton,
+ nb->copyfrom_path,
+ nb->copyfrom_rev,
+ rb->pool, &(nb->file_baton)));
+ LDR_DBG(("Added file %s to dir %p as %p\n", nb->path, rb->db->baton, nb->file_baton));
+ break;
+ case svn_node_dir:
+ SVN_ERR(commit_editor->add_directory(nb->path, rb->db->baton,
+ nb->copyfrom_path,
+ nb->copyfrom_rev,
+ rb->pool, &child_baton));
+ LDR_DBG(("Added dir %s to dir %p as %p\n", nb->path, rb->db->baton, child_baton));
+ child_db = apr_pcalloc(rb->pool, sizeof(*child_db));
+ child_db->baton = child_baton;
+ child_db->depth = rb->db->depth + 1;
+ child_db->relpath = apr_pstrdup(rb->pool, nb->path);
+ child_db->parent = rb->db;
+ rb->db = child_db;
+ break;
+ default:
+ break;
}
- else if(nb->kind == svn_node_dir)
+ break;
+ case svn_node_action_change:
+ switch (nb->kind)
{
- SVN_ERR(commit_editor->add_directory(nb->path, nb->rb->dir_baton,
- nb->copyfrom_path, nb->copyfrom_rev,
- rb->pb->pool, &child_baton));
- nb->rb->dir_baton = child_baton;
+ case svn_node_file:
+ /* open_file to set the file_baton so we can apply props,
+ txdelta to it */
+ SVN_ERR(commit_editor->open_file(nb->path, rb->db->baton,
+ SVN_INVALID_REVNUM, rb->pool,
+ &(nb->file_baton)));
+ break;
+ default:
+ /* The directory baton has already been set */
+ break;
}
break;
- default:
+ case svn_node_action_delete:
+ LDR_DBG(("Deleting entry %s in %p\n", nb->path, rb->db->baton));
+ SVN_ERR(commit_editor->delete_entry(nb->path, rb->rev,
+ rb->db->baton, rb->pool));
+ break;
+ case svn_node_action_replace:
+ /* Absent in dumpstream; represented as a delete + add */
break;
}
@@ -213,22 +318,20 @@ set_revision_property(void *baton,
rb = baton;
if (rb->rev > 0)
- {
- apr_hash_set(rb->revprop_table, apr_pstrdup(rb->pb->pool, name),
- APR_HASH_KEY_STRING, svn_string_dup(value, rb->pb->pool));
- }
+ apr_hash_set(rb->revprop_table, apr_pstrdup(rb->pool, name),
+ APR_HASH_KEY_STRING, svn_string_dup(value, rb->pool));
else
/* Special handling for revision 0; this is safe because the
commit_editor hasn't been created yet. */
- svn_ra_change_rev_prop2(rb->pb->session, rb->rev, name, NULL, value,
- rb->pb->pool);
+ SVN_ERR(svn_ra_change_rev_prop2(rb->pb->session, rb->rev,
+ name, NULL, value, rb->pool));
/* Remember any datestamp/ author that passes through (see comment
in close_revision). */
if (!strcmp(name, SVN_PROP_REVISION_DATE))
- rb->datestamp = svn_string_dup(value, rb->pb->pool);
+ rb->datestamp = svn_string_dup(value, rb->pool);
if (!strcmp(name, SVN_PROP_REVISION_AUTHOR))
- rb->author = svn_string_dup(value, rb->pb->pool);
+ rb->author = svn_string_dup(value, rb->pool);
return SVN_NO_ERROR;
}
@@ -243,13 +346,14 @@ set_node_property(void *baton,
apr_pool_t *pool;
nb = baton;
commit_editor = nb->rb->pb->commit_editor;
- pool = nb->rb->pb->pool;
+ pool = nb->rb->pool;
+ LDR_DBG(("Applying properties on %p\n", nb->file_baton));
if (nb->kind == svn_node_file)
SVN_ERR(commit_editor->change_file_prop(nb->file_baton, name,
value, pool));
else
- SVN_ERR(commit_editor->change_dir_prop(nb->rb->dir_baton, name,
+ SVN_ERR(commit_editor->change_dir_prop(nb->rb->db->baton, name,
value, pool));
return SVN_NO_ERROR;
@@ -264,13 +368,13 @@ delete_node_property(void *baton,
apr_pool_t *pool;
nb = baton;
commit_editor = nb->rb->pb->commit_editor;
- pool = nb->rb->pb->pool;
+ pool = nb->rb->pool;
if (nb->kind == svn_node_file)
SVN_ERR(commit_editor->change_file_prop(nb->file_baton, name,
NULL, pool));
else
- SVN_ERR(commit_editor->change_dir_prop(nb->rb->dir_baton, name,
+ SVN_ERR(commit_editor->change_dir_prop(nb->rb->db->baton, name,
NULL, pool));
return SVN_NO_ERROR;
@@ -279,6 +383,7 @@ delete_node_property(void *baton,
static svn_error_t *
remove_node_props(void *baton)
{
+ /* ### Not implemented */
return SVN_NO_ERROR;
}
@@ -298,11 +403,15 @@ apply_textdelta(svn_txdelta_window_handl
struct node_baton *nb;
const struct svn_delta_editor_t *commit_editor;
apr_pool_t *pool;
+
nb = node_baton;
commit_editor = nb->rb->pb->commit_editor;
- pool = nb->rb->pb->pool;
- return commit_editor->apply_textdelta(nb->file_baton, NULL, pool,
- handler, handler_baton);
+ pool = nb->rb->pool;
+ LDR_DBG(("Applying textdelta to %p\n", nb->file_baton));
+ SVN_ERR(commit_editor->apply_textdelta(nb->file_baton, nb->base_checksum,
+ pool, handler, handler_baton));
+
+ return SVN_NO_ERROR;
}
static svn_error_t *
@@ -310,16 +419,18 @@ close_node(void *baton)
{
struct node_baton *nb;
const struct svn_delta_editor_t *commit_editor;
- apr_pool_t * pool;
+
nb = baton;
- pool = nb->rb->pb->pool;
commit_editor = nb->rb->pb->commit_editor;
+
if (nb->kind == svn_node_file)
- SVN_ERR(commit_editor->close_file(nb->file_baton, NULL,
- pool));
- else if (nb->kind == svn_node_dir)
- SVN_ERR(commit_editor->close_directory(nb->rb->dir_baton,
- pool));
+ {
+ LDR_DBG(("Closing file %p\n", nb->file_baton));
+ SVN_ERR(commit_editor->close_file(nb->file_baton, NULL, nb->rb->pool));
+ }
+
+ /* The svn_node_dir case is handled in close_revision */
+
return SVN_NO_ERROR;
}
@@ -329,27 +440,54 @@ close_revision(void *baton)
struct revision_baton *rb;
const svn_delta_editor_t *commit_editor;
void *commit_edit_baton;
+ void *child_baton;
rb = baton;
commit_editor = rb->pb->commit_editor;
commit_edit_baton = rb->pb->commit_edit_baton;
- /* r0 doesn't have a corresponding commit_editor; we fake it */
+ /* Fake revision 0 */
if (rb->rev == 0)
- SVN_ERR(svn_cmdline_printf(rb->pb->pool, "* Loaded revision 0\n"));
+ SVN_ERR(svn_cmdline_printf(rb->pool, "* Loaded revision 0\n"));
+ else if (commit_editor)
+ {
+ /* Close all pending open directories, and then close the edit
+ session itself */
+ while (rb->db && rb->db->parent)
+ {
+ LDR_DBG(("Closing dir %p\n", rb->db->baton));
+ SVN_ERR(commit_editor->close_directory(rb->db->baton, rb->pool));
+ rb->db = rb->db->parent;
+ }
+ LDR_DBG(("Closing edit on %p\n", commit_edit_baton));
+ SVN_ERR(commit_editor->close_edit(commit_edit_baton, rb->pool));
+ }
else
- SVN_ERR(commit_editor->close_edit(commit_edit_baton, rb->pb->pool));
+ {
+ /* Legitimate revision with no node information */
+ SVN_ERR(svn_ra_get_commit_editor3(rb->pb->session, &commit_editor,
+ &commit_edit_baton, rb->revprop_table,
+ commit_callback, NULL, NULL, FALSE,
+ rb->pool));
+
+ SVN_ERR(commit_editor->open_root(commit_edit_baton, rb->rev - 1,
+ rb->pool, &child_baton));
+
+ LDR_DBG(("Opened root %p\n", child_baton));
+ LDR_DBG(("Closing edit on %p\n", commit_edit_baton));
+ SVN_ERR(commit_editor->close_edit(commit_edit_baton, rb->pool));
+ }
/* svn_fs_commit_txn rewrites the datestamp/ author property-
rewrite it by hand after closing the commit_editor. */
SVN_ERR(svn_ra_change_rev_prop2(rb->pb->session, rb->rev,
SVN_PROP_REVISION_DATE,
- NULL, rb->datestamp, rb->pb->pool));
+ NULL, rb->datestamp, rb->pool));
SVN_ERR(svn_ra_change_rev_prop2(rb->pb->session, rb->rev,
SVN_PROP_REVISION_AUTHOR,
- NULL, rb->author, rb->pb->pool));
+ NULL, rb->author, rb->pool));
- svn_pool_destroy(rb->pb->pool);
+ svn_pool_destroy(rb->pool);
return SVN_NO_ERROR;
}
Modified: subversion/branches/atomic-revprop/subversion/svnrdump/load_editor.h
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/svnrdump/load_editor.h?rev=983275&r1=983274&r2=983275&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/svnrdump/load_editor.h (original)
+++ subversion/branches/atomic-revprop/subversion/svnrdump/load_editor.h Sat Aug 7 18:13:11 2010
@@ -38,7 +38,18 @@ struct parse_baton
svn_ra_session_t *session;
const char *uuid;
const char *root_url;
- apr_pool_t *pool;
+};
+
+/**
+ * Use to wrap the dir_context_t in commit.c so we can keep track of
+ * depth, relpath and parent for open_directory and close_directory.
+ */
+struct directory_baton
+{
+ void *baton;
+ const char *relpath;
+ int depth;
+ struct directory_baton *parent;
};
/**
@@ -55,6 +66,8 @@ struct node_baton
const char *copyfrom_path;
void *file_baton;
+ const char *base_checksum;
+
struct revision_baton *rb;
};
@@ -71,8 +84,8 @@ struct revision_baton
const svn_string_t *author;
struct parse_baton *pb;
+ struct directory_baton *db;
apr_pool_t *pool;
- void *dir_baton; /* Keep track of dirs */
};
/**
Modified: subversion/branches/atomic-revprop/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/tests/cmdline/merge_tests.py?rev=983275&r1=983274&r2=983275&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/branches/atomic-revprop/subversion/tests/cmdline/merge_tests.py Sat Aug 7 18:13:11 2010
@@ -6788,6 +6788,8 @@ def merge_loses_mergeinfo(sbox):
'' : Item(status=' U'),
})
expected_disk = wc.State('', {'J': Item()})
+ if svntest.main.wc_is_singledb(wc_dir):
+ expected_disk.remove('J')
expected_status = wc.State(A_C_wc_dir,
{ '' : Item(wc_rev=4, status=' M'),
'J' : Item(wc_rev=4, status='D ')
@@ -6809,6 +6811,8 @@ def merge_loses_mergeinfo(sbox):
'J' : Item(),
'' : Item(props={SVN_PROP_MERGEINFO : '/A/B:3'}),
})
+ if svntest.main.wc_is_singledb(wc_dir):
+ expected_disk.remove('J')
expected_status = wc.State(A_C_wc_dir,
{ '' : Item(wc_rev=4, status=' M'),
'K' : Item(status='A ',
@@ -13775,6 +13779,8 @@ def no_self_referential_filtering_on_add
'D/H/psi' : Item("New content"),
'D/H/omega' : Item("New content"),
})
+ if svntest.main.wc_is_singledb(wc_dir):
+ expected_A_COPY_2_disk.remove('C')
expected_A_COPY_2_skip = wc.State(A_COPY_2_path, { })
svntest.actions.run_and_verify_merge(A_COPY_2_path, None, None,
sbox.repo_url + '/A', None,
Modified: subversion/branches/atomic-revprop/subversion/tests/cmdline/patch_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/tests/cmdline/patch_tests.py?rev=983275&r1=983274&r2=983275&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/tests/cmdline/patch_tests.py (original)
+++ subversion/branches/atomic-revprop/subversion/tests/cmdline/patch_tests.py Sat Aug 7 18:13:11 2010
@@ -998,6 +998,9 @@ def patch_add_new_dir(sbox):
})
expected_disk.remove('A/B/E/alpha')
expected_disk.remove('A/B/E/beta')
+ if svntest.main.wc_is_singledb(wc_dir):
+ expected_disk.remove('A/B/E')
+ expected_disk.remove('A/C')
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
expected_status.add({
Modified: subversion/branches/atomic-revprop/subversion/tests/cmdline/schedule_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/tests/cmdline/schedule_tests.py?rev=983275&r1=983274&r2=983275&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/tests/cmdline/schedule_tests.py (original)
+++ subversion/branches/atomic-revprop/subversion/tests/cmdline/schedule_tests.py Sat Aug 7 18:13:11 2010
@@ -35,6 +35,7 @@ import svntest
Skip = svntest.testcase.Skip
SkipUnless = svntest.testcase.SkipUnless
XFail = svntest.testcase.XFail
+Wimp = svntest.testcase.Wimp
Item = svntest.wc.StateItem
@@ -575,8 +576,7 @@ def add_recursive_already_versioned(sbox
wc_dir = sbox.wc_dir
- if svntest.actions.make_repo_and_wc(sbox):
- return 1
+ svntest.actions.make_repo_and_wc(sbox)
# Create some files, then schedule them for addition
delta_path = sbox.ospath('delta')
@@ -706,7 +706,7 @@ test_list = [ None,
SkipUnless(revert_add_executable, svntest.main.is_posix_os),
revert_delete_files,
revert_delete_dirs,
- XFail(unschedule_missing_added),
+ Wimp('Needs single-db', unschedule_missing_added),
delete_missing,
revert_inside_newly_added_dir,
status_add_deleted_directory,
Modified: subversion/branches/atomic-revprop/subversion/tests/cmdline/svnrdump_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/tests/cmdline/svnrdump_tests.py?rev=983275&r1=983274&r2=983275&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/tests/cmdline/svnrdump_tests.py (original)
+++ subversion/branches/atomic-revprop/subversion/tests/cmdline/svnrdump_tests.py Sat Aug 7 18:13:11 2010
@@ -175,10 +175,8 @@ test_list = [ None,
basic_dump,
revision_0_dump,
revision_0_load,
- XFail(XFail(skeleton_load, svntest.main.is_ra_type_dav),
- svntest.main.is_ra_type_svn),
- Wimp("Need to interpret response 501", copy_and_modify_load,
- svntest.main.is_ra_type_dav),
+ skeleton_load,
+ copy_and_modify_load,
Wimp("Need to fix headers in RA layer", copy_and_modify_dump),
]
Modified: subversion/branches/atomic-revprop/subversion/tests/cmdline/svntest/actions.py
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/tests/cmdline/svntest/actions.py?rev=983275&r1=983274&r2=983275&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/tests/cmdline/svntest/actions.py (original)
+++ subversion/branches/atomic-revprop/subversion/tests/cmdline/svntest/actions.py Sat Aug 7 18:13:11 2010
@@ -38,7 +38,7 @@ def no_sleep_for_timestamps():
def do_sleep_for_timestamps():
os.environ['SVN_I_LOVE_CORRUPTED_WORKING_COPIES_SO_DISABLE_SLEEP_FOR_TIMESTAMPS'] = 'no'
-def setup_pristine_repository():
+def setup_pristine_greek_repository():
"""Create the pristine repository and 'svn import' the greek tree"""
# these directories don't exist out of the box, so we may have to create them
@@ -49,8 +49,8 @@ def setup_pristine_repository():
os.makedirs(main.general_repo_dir) # this also creates all the intermediate dirs
# If there's no pristine repos, create one.
- if not os.path.exists(main.pristine_dir):
- main.create_repos(main.pristine_dir)
+ if not os.path.exists(main.pristine_greek_repos_dir):
+ main.create_repos(main.pristine_greek_repos_dir)
# if this is dav, gives us access rights to import the greek tree.
if main.is_ra_type_dav():
@@ -66,7 +66,7 @@ def setup_pristine_repository():
exit_code, output, errput = main.run_svn(None, 'import', '-m',
'Log message for revision 1.',
main.greek_dump_dir,
- main.pristine_url)
+ main.pristine_greek_repos_url)
# check for any errors from the import
if len(errput):
@@ -99,9 +99,9 @@ def setup_pristine_repository():
# Finally, disallow any changes to the "pristine" repos.
error_msg = "Don't modify the pristine repository"
- create_failing_hook(main.pristine_dir, 'start-commit', error_msg)
- create_failing_hook(main.pristine_dir, 'pre-lock', error_msg)
- create_failing_hook(main.pristine_dir, 'pre-revprop-change', error_msg)
+ create_failing_hook(main.pristine_greek_repos_dir, 'start-commit', error_msg)
+ create_failing_hook(main.pristine_greek_repos_dir, 'pre-lock', error_msg)
+ create_failing_hook(main.pristine_greek_repos_dir, 'pre-revprop-change', error_msg)
######################################################################
@@ -110,7 +110,7 @@ def guarantee_empty_repository(path):
"""Guarantee that a local svn repository exists at PATH, containing
nothing."""
- if path == main.pristine_dir:
+ if path == main.pristine_greek_repos_dir:
print("ERROR: attempt to overwrite the pristine repos! Aborting.")
sys.exit(1)
@@ -121,19 +121,19 @@ def guarantee_empty_repository(path):
# Used by every test, so that they can run independently of one
# another. Every time this routine is called, it recursively copies
# the `pristine repos' to a new location.
-# Note: make sure setup_pristine_repository was called once before
+# Note: make sure setup_pristine_greek_repository was called once before
# using this function.
def guarantee_greek_repository(path):
"""Guarantee that a local svn repository exists at PATH, containing
nothing but the greek-tree at revision 1."""
- if path == main.pristine_dir:
+ if path == main.pristine_greek_repos_dir:
print("ERROR: attempt to overwrite the pristine repos! Aborting.")
sys.exit(1)
# copy the pristine repository to PATH.
main.safe_rmtree(path)
- if main.copy_repos(main.pristine_dir, path, 1):
+ if main.copy_repos(main.pristine_greek_repos_dir, path, 1):
print("ERROR: copying repository failed.")
sys.exit(1)
@@ -1586,16 +1586,15 @@ def run_and_verify_resolved(expected_pat
def make_repo_and_wc(sbox, create_wc = True, read_only = False):
"""Create a fresh 'Greek Tree' repository and check out a WC from it.
- If read_only is False, a dedicated repository will be created, named
- TEST_NAME. The repository will live in the global dir 'general_repo_dir'.
- If read_only is True the pristine repository will be used.
+ If READ_ONLY is False, a dedicated repository will be created, at the path
+ SBOX.repo_dir. If READ_ONLY is True, the pristine repository will be used.
+ In either case, SBOX.repo_url is assumed to point to the repository that
+ will be used.
If create_wc is True, a dedicated working copy will be checked out from
- the repository, named TEST_NAME. The wc directory will live in the global
- dir 'general_wc_dir'.
+ the repository, at the path SBOX.wc_dir.
- Both variables 'general_repo_dir' and 'general_wc_dir' are defined at the
- top of this test suite.) Returns on success, raises on failure."""
+ Returns on success, raises on failure."""
# Create (or copy afresh) a new repos with a greek tree in it.
if not read_only:
@@ -2346,7 +2345,8 @@ def deep_trees_run_tests_scheme_for_upda
j = os.path.join
- sbox.build()
+ if not sbox.is_built():
+ sbox.build()
wc_dir = sbox.wc_dir
@@ -2587,7 +2587,8 @@ def deep_trees_run_tests_scheme_for_swit
j = os.path.join
- sbox.build()
+ if not sbox.is_built():
+ sbox.build()
wc_dir = sbox.wc_dir
Modified: subversion/branches/atomic-revprop/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/tests/cmdline/svntest/main.py?rev=983275&r1=983274&r2=983275&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/atomic-revprop/subversion/tests/cmdline/svntest/main.py Sat Aug 7 18:13:11 2010
@@ -163,7 +163,7 @@ atomic_ra_revprop_change_binary = os.pat
# Location to the pristine repository, will be calculated from test_area_url
# when we know what the user specified for --url.
-pristine_url = None
+pristine_greek_repos_url = None
# Global variable to track all of our options
options = None
@@ -189,7 +189,7 @@ general_wc_dir = os.path.join(work_dir,
temp_dir = os.path.join(work_dir, 'local_tmp')
# (derivatives of the tmp dir.)
-pristine_dir = os.path.join(temp_dir, "repos")
+pristine_greek_repos_dir = os.path.join(temp_dir, "repos")
greek_dump_dir = os.path.join(temp_dir, "greekfiles")
default_config_dir = os.path.abspath(os.path.join(temp_dir, "config"))
@@ -1437,7 +1437,7 @@ def run_tests(test_list, serial_only = F
appropriate exit code.
"""
- global pristine_url
+ global pristine_greek_repos_url
global svn_binary
global svnadmin_binary
global svnlook_binary
@@ -1501,8 +1501,8 @@ def run_tests(test_list, serial_only = F
parser.error("invalid test number, range of numbers, " +
"or function '%s'\n" % arg)
- # Calculate pristine_url from test_area_url.
- pristine_url = options.test_area_url + '/' + pathname2url(pristine_dir)
+ # Calculate pristine_greek_repos_url from test_area_url.
+ pristine_greek_repos_url = options.test_area_url + '/' + pathname2url(pristine_greek_repos_dir)
if options.use_jsvn:
if options.svn_bin is None:
@@ -1555,7 +1555,7 @@ def run_tests(test_list, serial_only = F
create_config_dir(default_config_dir)
# Setup the pristine repository
- svntest.actions.setup_pristine_repository()
+ svntest.actions.setup_pristine_greek_repository()
# Run the tests.
exit_code = _internal_run_tests(test_list, testnums, options.parallel)