Author: julianfoad
Date: Tue Jul 29 15:38:32 2014
New Revision: 1614389
URL: http://svn.apache.org/r1614389
Log:
On the 'moves-tracking-2' branch: Add commit editor shims into the
repository layer commit code path.
* subversion/libsvn_repos/commit.c
(fetch_props_func): Use the correct base revision, as in the other two
'fetch' functions.
(fetch_base_func): Fix the lifetime of the created file: don't let it be
deleted on pool cleanup, especially not cleanup of the scratch pool.
(svn_repos_get_commit_editor5): Insert Ev3 shims.
Modified:
subversion/branches/move-tracking-2/subversion/libsvn_repos/commit.c
Modified: subversion/branches/move-tracking-2/subversion/libsvn_repos/commit.c
URL:
http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_repos/commit.c?rev=1614389&r1=1614388&r2=1614389&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_repos/commit.c
(original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_repos/commit.c Tue
Jul 29 15:38:32 2014
@@ -46,7 +46,7 @@
#include "private/svn_fspath.h"
#include "private/svn_fs_private.h"
#include "private/svn_repos_private.h"
-#include "private/svn_editor.h"
+#include "private/svn_delta_private.h"
@@ -848,9 +848,11 @@ fetch_props_func(apr_hash_t **props,
svn_fs_root_t *fs_root;
svn_error_t *err;
- SVN_ERR(svn_fs_revision_root(&fs_root, eb->fs,
- svn_fs_txn_base_revision(eb->txn),
- scratch_pool));
+ if (!SVN_IS_VALID_REVNUM(base_revision))
+ base_revision = svn_fs_txn_base_revision(eb->txn);
+
+ SVN_ERR(svn_fs_revision_root(&fs_root, eb->fs, base_revision, scratch_pool));
+
err = svn_fs_node_proplist(props, fs_root, path, result_pool);
if (err && err->apr_err == SVN_ERR_FS_NOT_FOUND)
{
@@ -914,7 +916,7 @@ fetch_base_func(const char **filename,
else if (err)
return svn_error_trace(err);
SVN_ERR(svn_stream_open_unique(&file_stream, &tmp_filename, NULL,
- svn_io_file_del_on_pool_cleanup,
+ svn_io_file_del_none,
scratch_pool, scratch_pool));
SVN_ERR(svn_stream_copy3(contents, file_stream, NULL, NULL, scratch_pool));
@@ -1002,9 +1004,10 @@ svn_repos_get_commit_editor5(const svn_d
shim_callbacks->fetch_base_func = fetch_base_func;
shim_callbacks->fetch_baton = eb;
- SVN_ERR(svn_editor__insert_shims(editor, edit_baton, *editor, *edit_baton,
- eb->repos_url, eb->base_path,
- shim_callbacks, pool, pool));
+ SVN_ERR(svn_editor3__insert_shims(editor, edit_baton, *editor, *edit_baton,
+ eb->repos_url,
+ svn_relpath_canonicalize(eb->base_path,
pool),
+ shim_callbacks, pool, pool));
return SVN_NO_ERROR;
}