You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/03/06 12:10:05 UTC
svn commit: r1453290 [2/15] - in /subversion/branches/fsfs-format7: ./
build/ build/ac-macros/ build/generator/ build/generator/templates/
subversion/bindings/javahl/native/
subversion/bindings/javahl/src/org/apache/subversion/javahl/
subversion/bindin...
Modified: subversion/branches/fsfs-format7/subversion/bindings/swig/ruby/test/test_wc.rb
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/bindings/swig/ruby/test/test_wc.rb?rev=1453290&r1=1453289&r2=1453290&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/bindings/swig/ruby/test/test_wc.rb (original)
+++ subversion/branches/fsfs-format7/subversion/bindings/swig/ruby/test/test_wc.rb Wed Mar 6 11:10:01 2013
@@ -742,20 +742,13 @@ EOE
adm.crawl_revisions(dir_path, reporter)
property_info = {
- :dir_changed_prop_names => [
- "svn:entry:committed-date",
- "svn:entry:uuid",
- "svn:entry:last-author",
- "svn:entry:committed-rev"
- ],
:file_changed_prop_name => prop_name,
:file_changed_prop_value => prop_value,
}
sorted_result = callbacks.result.sort_by {|r| r.first.to_s}
expected_props, actual_result = yield(property_info, sorted_result)
- dir_changed_props, file_changed_props, empty_changed_props = expected_props
+ file_changed_props, empty_changed_props = expected_props
assert_equal([
- [:dir_props_changed, @wc_path, dir_changed_props],
[:file_added, path2, empty_changed_props],
[:file_changed, path1, file_changed_props],
],
@@ -767,35 +760,25 @@ EOE
def test_diff_callbacks_for_backward_compatibility
assert_diff_callbacks(:diff_editor) do |property_info, result|
- dir_changed_prop_names = property_info[:dir_changed_prop_names]
- dir_changed_props = dir_changed_prop_names.sort.collect do |name|
- Svn::Core::Prop.new(name, nil)
- end
prop_name = property_info[:file_changed_prop_name]
prop_value = property_info[:file_changed_prop_value]
file_changed_props = [Svn::Core::Prop.new(prop_name, prop_value)]
empty_changed_props = []
sorted_result = result.dup
- dir_prop_changed = sorted_result.assoc(:dir_props_changed)
- dir_prop_changed[2] = dir_prop_changed[2].sort_by {|prop| prop.name}
- [[dir_changed_props, file_changed_props, empty_changed_props],
+ [[file_changed_props, empty_changed_props],
sorted_result]
end
end
def test_diff_callbacks
assert_diff_callbacks(:diff_editor2) do |property_info, result|
- dir_changed_props = {}
- property_info[:dir_changed_prop_names].each do |name|
- dir_changed_props[name] = nil
- end
prop_name = property_info[:file_changed_prop_name]
prop_value = property_info[:file_changed_prop_value]
file_changed_props = {prop_name => prop_value}
empty_changed_props = {}
- [[dir_changed_props, file_changed_props, empty_changed_props],
+ [[file_changed_props, empty_changed_props],
result]
end
end
Modified: subversion/branches/fsfs-format7/subversion/include/private/svn_client_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/include/private/svn_client_private.h?rev=1453290&r1=1453289&r2=1453290&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/include/private/svn_client_private.h (original)
+++ subversion/branches/fsfs-format7/subversion/include/private/svn_client_private.h Wed Mar 6 11:10:01 2013
@@ -121,9 +121,9 @@ svn_client__pathrev_fspath(const svn_cli
that it is the same node in both PEG_REVISION and REVISION. If it
is not, then @c SVN_ERR_CLIENT_UNRELATED_RESOURCES is returned.
- BASE_DIR_ABSPATH is the working copy path the ra_session corresponds to,
- and should only be used if PATH_OR_URL is a url
- ### else NULL? what's it for?
+ BASE_DIR_ABSPATH is the working copy path the ra_session corresponds
+ to. If provided it will be used to read and dav props. So if provided
+ this directory MUST match the session anchor.
If PEG_REVISION->kind is 'unspecified', the peg revision is 'head'
for a URL or 'working' for a WC path. If REVISION->kind is
Modified: subversion/branches/fsfs-format7/subversion/include/private/svn_diff_tree.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/include/private/svn_diff_tree.h?rev=1453290&r1=1453289&r2=1453290&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/include/private/svn_diff_tree.h (original)
+++ subversion/branches/fsfs-format7/subversion/include/private/svn_diff_tree.h Wed Mar 6 11:10:01 2013
@@ -34,14 +34,88 @@
extern "C" {
#endif /* __cplusplus */
+/*
+ * About the diff tree processor.
+ *
+ * Subversion uses two kinds of editors to describe changes. One to
+ * describe changes on how to *exactly* transform one tree to another tree,
+ * as efficiently as possible and one to describe the difference between trees
+ * in order to review the changes, or to allow applying them on a third tree
+ * which is similar to those other trees.
+ *
+ * The first case was originally handled by svn_delta_editor_t and might be
+ * replaced by svn_editor_t in a future version. This diff processor handles
+ * the other case and as such forms the layer below our diff and merge
+ * handling.
+ *
+ * The major difference between this and the other editors is that this diff
+ * always provides access to the full text and/or properties in the left and
+ * right tree when applicable to allow processor implementers to decide how
+ * to interpret changes.
+ *
+ * Originally this diff processor was not formalized explicitly, but
+ * informally handled by the working copy diff callbacks. These callbacks just
+ * provided the information to drive a unified diff and a textual merge. To go
+ * one step further and allow full tree conflict detection we needed a better
+ * defined diff handling. Instead of adding yet a few more functions and
+ * arguments to the already overloaded diff callbacks the api was completely
+ * redesigned with a few points in mind.
+ *
+ * * It must be able to drive the old callbacks interface without users
+ * noticing the difference (100% compatible).
+ * (Implemented as svn_wc__wrap_diff_callbacks())
+ *
+ * * It should provide the information that was missing in the old interface,
+ * but required to close existing issues.
+ *
+ * E.g. - properties and children on deleted directories.
+ * - revision numbers and copyfrom information on directories.
+ *
+ * To cleanup the implementation and make it easier on diff processors to
+ * handle the results I also added the following constraints.
+ *
+ * * Diffs should be fully reversable: anything that is deleted should be
+ * available, just like something that is added.
+ * (Proven via svn_diff__tree_processor_reverse_create)
+ * ### Still in doubt if *_deleted() needs a copy_to argument, for the
+ * ### 99% -> 100%.
+ *
+ * * Diff processors should have an easy way to communicate that they are
+ * not interrested in certain expensive to obtain results.
+ *
+ * * Directories should have clear open and close events to allow adding them
+ * before their children, but still allowing property changes to have
+ * defined behavior.
+ *
+ * * Files and directories should be handled as similar as possible as in
+ * many cases they are just nodes in a tree.
+ *
+ * * It should be easy to create diff wrappers to apply certain transforms.
+ *
+ * During the creation an additional requirement of knowing about 'some
+ * absent' nodes was added, to allow the merge to work on just this processor
+ * api.
+ *
+ * The api describes a clean open-close walk through a tree, depending on the
+ * driver multiple siblings can be described at the same time, but when a
+ * directory is closed all descendants are done.
+ *
+ * Note that it is possible for nodes to be described as a delete followed by
+ * an add at the same place within one parent. (Iff the diff is reversed you
+ * can see an add followed by a delete!)
+ *
+ * The directory batons live between the open and close events of a directory
+ * and are thereby guaranteed to outlive the batons of their descendants.
+ */
+
+/* Describes the source of a merge */
typedef struct svn_diff_source_t
{
/* Always available */
svn_revnum_t revision;
- /* Depending on the driver */
+ /* Depending on the driver available for copyfrom */
const char *repos_relpath;
- const char *local_abspath;
} svn_diff_source_t;
/**
Modified: subversion/branches/fsfs-format7/subversion/include/private/svn_fs_util.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/include/private/svn_fs_util.h?rev=1453290&r1=1453289&r2=1453290&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/include/private/svn_fs_util.h (original)
+++ subversion/branches/fsfs-format7/subversion/include/private/svn_fs_util.h Wed Mar 6 11:10:01 2013
@@ -30,21 +30,25 @@
#include "svn_types.h"
#include "svn_error.h"
#include "svn_fs.h"
-#include "svn_dirent_uri.h"
-#include "svn_path.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
-/* Return a canonicalized version of a filesystem PATH, allocated in
- POOL. While the filesystem API is pretty flexible about the
- incoming paths (they must be UTF-8 with '/' as separators, but they
- don't have to begin with '/', and multiple contiguous '/'s are
- ignored) we want any paths that are physically stored in the
- underlying database to look consistent. Specifically, absolute
- filesystem paths should begin with '/', and all redundant and trailing '/'
- characters be removed.
+/* Returns whether PATH is in canonical form as defined by
+ svn_fs__canonicalize_abspath().
+ */
+svn_boolean_t
+svn_fs__is_canonical_abspath(const char *path);
+
+/* Return a canonicalized version of a filesystem PATH, allocated in POOL.
+
+ While the filesystem API is pretty flexible about the incoming paths
+ (they must be UTF-8 with '/' as separators, but they don't have to
+ begin with '/', and multiple contiguous '/'s are ignored) we want any
+ paths that are physically stored in the underlying database to look
+ consistent. Specifically, absolute filesystem paths should begin with
+ '/', and all redundant and trailing '/' characters be removed.
This is similar to svn_fspath__canonicalize() but doesn't treat "."
segments as special.
@@ -52,12 +56,6 @@ extern "C" {
const char *
svn_fs__canonicalize_abspath(const char *path, apr_pool_t *pool);
-/* Return FALSE, if a svn_fs__canonicalize_abspath will return a
- different value than PATH (despite creating a copy).
-*/
-svn_boolean_t
-svn_fs__is_canonical_abspath(const char *path);
-
/* If EXPECT_OPEN, verify that FS refers to an open database;
otherwise, verify that FS refers to an unopened database. Return
an appropriate error if the expectation fails to match the
Modified: subversion/branches/fsfs-format7/subversion/include/private/svn_temp_serializer.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/include/private/svn_temp_serializer.h?rev=1453290&r1=1453289&r2=1453290&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/include/private/svn_temp_serializer.h (original)
+++ subversion/branches/fsfs-format7/subversion/include/private/svn_temp_serializer.h Wed Mar 6 11:10:01 2013
@@ -31,8 +31,7 @@
#ifndef SVN_TEMP_SERIALIZER_H
#define SVN_TEMP_SERIALIZER_H
-#include <apr.h>
-#include "svn_types.h"
+#include "svn_string.h"
#ifdef __cplusplus
extern "C" {
@@ -42,6 +41,14 @@ extern "C" {
struct svn_stringbuf_t;
/**
+ * The amount of extra memory allocated by #svn_temp_serializer__init for
+ * the internal buffer in addition to its suggested_buffer_size parameter.
+ * To allocate a 512 buffer, including overhead, just specify a size of
+ * 512 - SVN_TEMP_SERIALIZER__OVERHEAD.
+ */
+#define SVN_TEMP_SERIALIZER__OVERHEAD (sizeof(svn_stringbuf_t) + 1)
+
+/**
* Opaque structure controlling the serialization process and holding the
* intermediate as well as final results.
*/
@@ -68,7 +75,7 @@ typedef struct svn_temp_serializer__cont
* serialized. This scheme allows only for tree-like, i.e. non-circular
* data structures.
*
- * @return the serization context.
+ * @return the serialization context.
*/
svn_temp_serializer__context_t *
svn_temp_serializer__init(const void *source_struct,
@@ -94,7 +101,7 @@ svn_temp_serializer__init(const void *so
* @a source_struct first, get the result from svn_temp_serializer__get()
* and call svn_temp_serializer__init_append for the next part.
*
- * @return the serization context.
+ * @return the serialization context.
*/
svn_temp_serializer__context_t *
svn_temp_serializer__init_append(void *buffer,
@@ -126,7 +133,7 @@ svn_temp_serializer__push(svn_temp_seria
/**
* End the serialization of the current sub-structure. The serialization
- * @a context will be focussed back on the parent structure. You may then
+ * @a context will be focused back on the parent structure. You may then
* add further sub-structures starting from that level.
*
* It is not necessary to call this function just for symmetry at the end
@@ -195,7 +202,7 @@ svn_temp_serializer__get(svn_temp_serial
* automatically) and resolve all pointers to sub-structures.
*
* To do the latter, call this function for each of these pointers, giving
- * the start address of the copyied buffer in @a buffer and a reference to
+ * the start address of the copied buffer in @a buffer and a reference to
* the pointer to resolve in @a ptr.
*/
void
Modified: subversion/branches/fsfs-format7/subversion/include/private/svn_wc_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/include/private/svn_wc_private.h?rev=1453290&r1=1453289&r2=1453290&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/include/private/svn_wc_private.h (original)
+++ subversion/branches/fsfs-format7/subversion/include/private/svn_wc_private.h Wed Mar 6 11:10:01 2013
@@ -564,6 +564,8 @@ svn_wc__node_get_deleted_ancestor(const
* @a local_abspath has status svn_wc__db_status_excluded. Set
* @a *server_excluded to TRUE when @a local_abspath has status
* svn_wc__db_status_server_excluded. Otherwise set these values to FALSE.
+ * If @a base_only is TRUE then only the base node will be examined,
+ * otherwise the current base or working node will be examined.
*
* If a value is not interesting you can pass #NULL.
*
@@ -577,6 +579,7 @@ svn_wc__node_is_not_present(svn_boolean_
svn_boolean_t *server_excluded,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
+ svn_boolean_t base_only,
apr_pool_t *scratch_pool);
/**
@@ -618,9 +621,10 @@ svn_wc__node_has_working(svn_boolean_t *
* to, regardless of any uncommitted changes (delete, replace and/or copy-here/
* move-here).
*
- * If there is no base node at @a local_abspath (such as when there is a
- * locally added/copied/moved-here node that is not part of a replace),
- * return @c SVN_INVALID_REVNUM/NULL/NULL/NULL/NULL.
+ * If there is no BASE node at @a local_abspath or if @a show_hidden is FALSE,
+ * no status 'normal' or 'incomplete' BASE node report
+ * SVN_ERR_WC_PATH_NOT_FOUND, or if @a ignore_enoent is TRUE, @a kind
+ * svn_node_unknown, @a revision SVN_INVALID_REVNUM and all other values NULL.
*
* All output arguments may be NULL.
*
@@ -628,13 +632,16 @@ svn_wc__node_has_working(svn_boolean_t *
* @a scratch_pool.
*/
svn_error_t *
-svn_wc__node_get_base(svn_revnum_t *revision,
+svn_wc__node_get_base(svn_node_kind_t *kind,
+ svn_revnum_t *revision,
const char **repos_relpath,
const char **repos_root_url,
const char **repos_uuid,
const char **lock_token,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
+ svn_boolean_t ignore_enoent,
+ svn_boolean_t show_hidden,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
@@ -1186,34 +1193,13 @@ svn_wc__get_info(svn_wc_context_t *wc_ct
void *cancel_baton,
apr_pool_t *scratch_pool);
-/* Internal version of svn_wc_delete4(). It has one additional parameter,
- * MOVED_TO_ABSPATH. If not NULL, this parameter indicates that the
- * delete operation is the delete-half of a move.
- *
- * ### Inconsistency: if DELETE_UNVERSIONED_TARGET is FALSE and a target is
- * unversioned, svn_wc__delete_many() will continue whereas
- * svn_wc__delete_internal() will throw an error.
- */
-svn_error_t *
-svn_wc__delete_internal(svn_wc_context_t *wc_ctx,
- const char *local_abspath,
- svn_boolean_t keep_local,
- svn_boolean_t delete_unversioned_target,
- const char *moved_to_abspath,
- svn_cancel_func_t cancel_func,
- void *cancel_baton,
- svn_wc_notify_func2_t notify_func,
- void *notify_baton,
- apr_pool_t *scratch_pool);
-
-
/* Alternative version of svn_wc_delete4().
* It can delete multiple TARGETS more efficiently (within a single sqlite
* transaction per working copy), but lacks support for moves.
*
* ### Inconsistency: if DELETE_UNVERSIONED_TARGET is FALSE and a target is
* unversioned, svn_wc__delete_many() will continue whereas
- * svn_wc__delete_internal() will throw an error.
+ * svn_wc_delete4() will throw an error.
*/
svn_error_t *
svn_wc__delete_many(svn_wc_context_t *wc_ctx,
@@ -1838,6 +1824,17 @@ svn_wc__complete_directory_add(svn_wc_co
svn_revnum_t copyfrom_rev,
apr_pool_t *scratch_pool);
+
+/* Acquire a write lock on LOCAL_ABSPATH or an ancestor that covers
+ all possible paths affected by resolving the conflicts in the tree
+ LOCAL_ABSPATH. Set *LOCK_ROOT_ABSPATH to the path of the lock
+ obtained. */
+svn_error_t *
+svn_wc__acquire_write_lock_for_resolve(const char **lock_root_abspath,
+ svn_wc_context_t *wc_ctx,
+ const char *local_abspath,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
#ifdef __cplusplus
}
#endif /* __cplusplus */
Modified: subversion/branches/fsfs-format7/subversion/include/svn_auth.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/include/svn_auth.h?rev=1453290&r1=1453289&r2=1453290&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/include/svn_auth.h (original)
+++ subversion/branches/fsfs-format7/subversion/include/svn_auth.h Wed Mar 6 11:10:01 2013
@@ -785,7 +785,8 @@ svn_auth_get_simple_provider2(
* @a provider specifies which provider currently holds the credential.
*
* Before returning set @a *delete_cred to TRUE to remove the credential from
- * the cache.
+ * the cache; leave @a *delete_cred unchanged or set it to FALSE to keep the
+ * credential.
*
* @since New in 1.8.
*/
Modified: subversion/branches/fsfs-format7/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/include/svn_client.h?rev=1453290&r1=1453289&r2=1453290&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/include/svn_client.h (original)
+++ subversion/branches/fsfs-format7/subversion/include/svn_client.h Wed Mar 6 11:10:01 2013
@@ -441,6 +441,8 @@ typedef struct svn_client_commit_info_t
#define SVN_CLIENT_COMMIT_ITEM_IS_COPY 0x10
/** @since New in 1.2. */
#define SVN_CLIENT_COMMIT_ITEM_LOCK_TOKEN 0x20
+/** @since New in 1.8. */
+#define SVN_CLIENT_COMMIT_ITEM_MOVED_HERE 0x40
/** @} */
/** The commit candidate structure.
@@ -508,6 +510,15 @@ typedef struct svn_client_commit_item3_t
* @since New in 1.7.
*/
const char *session_relpath;
+
+ /**
+ * When committing a move, this contains the absolute path where
+ * the node was directly moved from. (If an ancestor at the original
+ * location was moved then it points to where the node itself was
+ * moved, from. Not the original location)
+ * @since New in 1.8.
+ */
+ const char *moved_from_abspath;
} svn_client_commit_item3_t;
/** The commit candidate structure.
@@ -1562,7 +1573,7 @@ svn_client_add5(const char *path,
apr_pool_t *scratch_pool);
/**
- * Similar to svn_client_add3(), but with @a no_autoprops always set to
+ * Similar to svn_client_add5(), but with @a no_autoprops always set to
* FALSE.
*
* @deprecated Provided for backward compatibility with the 1.7 API.
@@ -4276,6 +4287,7 @@ svn_client_resolved(const char *path,
* If @a path is not in a state of conflict to begin with, do nothing.
* If @a path's conflict state is removed and @a ctx->notify_func2 is non-NULL,
* call @a ctx->notify_func2 with @a ctx->notify_baton2 and @a path.
+ * ### with what notification parameters?
*
* If @a depth is #svn_depth_empty, act only on @a path; if
* #svn_depth_files, resolve @a path and its conflicted file
@@ -5182,7 +5194,6 @@ svn_client_proplist4(const char *target,
svn_proplist_receiver2_t receiver,
void *receiver_baton,
svn_client_ctx_t *ctx,
- apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/**
@@ -6486,14 +6497,31 @@ svn_client_uuid_from_path(const char **u
/** Open an RA session rooted at @a url, and return it in @a *session.
*
* Use the authentication baton stored in @a ctx for authentication.
- * @a *session is allocated in @a pool.
+ * @a *session is allocated in @a result_pool.
*
- * @since New in 1.3.
+ * If @a wri_abspath is not NULL, use the working copy identified by @a
+ * wri_abspath to potentially avoid transferring unneeded data.
*
* @note This function is similar to svn_ra_open3(), but the caller avoids
* having to providing its own callback functions.
+ * @since New in 1.8.
*/
svn_error_t *
+svn_client_open_ra_session2(svn_ra_session_t **session,
+ const char *url,
+ const char *wri_abspath,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
+/** Similar to svn_client_open_ra_session(), but doesn't allow passing a
+ * working copy path.
+ *
+ * @since New in 1.3.
+ * @deprecated Provided for backward compatibility with the 1.7 API.
+ */
+SVN_DEPRECATED
+svn_error_t *
svn_client_open_ra_session(svn_ra_session_t **session,
const char *url,
svn_client_ctx_t *ctx,
Modified: subversion/branches/fsfs-format7/subversion/include/svn_cmdline.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/include/svn_cmdline.h?rev=1453290&r1=1453289&r2=1453290&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/include/svn_cmdline.h (original)
+++ subversion/branches/fsfs-format7/subversion/include/svn_cmdline.h Wed Mar 6 11:10:01 2013
@@ -159,7 +159,7 @@ svn_cmdline_handle_exit_error(svn_error_
apr_pool_t *pool,
const char *prefix);
-/** A cancellation function/baton pair, and the path to the configuration
+/** A prompt function/baton pair, and the path to the configuration
* directory. To be passed as the baton argument to the
* @c svn_cmdline_*_prompt functions.
*
Modified: subversion/branches/fsfs-format7/subversion/include/svn_config.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/include/svn_config.h?rev=1453290&r1=1453289&r2=1453290&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/include/svn_config.h (original)
+++ subversion/branches/fsfs-format7/subversion/include/svn_config.h Wed Mar 6 11:10:01 2013
@@ -127,6 +127,7 @@ typedef struct svn_config_t svn_config_t
#define SVN_CONFIG_SECTION_WORKING_COPY "working-copy"
/** @since New in 1.8. */
#define SVN_CONFIG_OPTION_SQLITE_EXCLUSIVE "exclusive-locking"
+#define SVN_CONFIG_OPTION_SQLITE_EXCLUSIVE_CLIENTS "exclusive-locking-clients"
/** @} */
/** @name Repository conf directory configuration files strings
Modified: subversion/branches/fsfs-format7/subversion/include/svn_dav.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/include/svn_dav.h?rev=1453290&r1=1453289&r2=1453290&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/include/svn_dav.h (original)
+++ subversion/branches/fsfs-format7/subversion/include/svn_dav.h Wed Mar 6 11:10:01 2013
@@ -198,6 +198,13 @@ extern "C" {
* @since New in 1.8. */
#define SVN_DAV_ALLOW_BULK_UPDATES "SVN-Allow-Bulk-Updates"
+/** Assuming the request target is a Subversion repository resource,
+ * this header is returned in the OPTIONS response to indicate whether
+ * the repository supports the merge tracking feature ("yes") or not
+ * ("no").
+ * @since New in 1.8. */
+#define SVN_DAV_REPOSITORY_MERGEINFO "SVN-Repository-MergeInfo"
+
/**
* @name Fulltext MD5 headers
*
@@ -293,33 +300,37 @@ extern "C" {
#define SVN_DAV_NS_DAV_SVN_LOG_REVPROPS SVN_DAV_PROP_NS_DAV "svn/log-revprops"
/** Presence of this in a DAV header in an OPTIONS response indicates
- * that the transmitter (in this case, the server) knows how to enforce
- * old-value atomicity in PROPPATCH (for editing revprops). */
-#define SVN_DAV_NS_DAV_SVN_ATOMIC_REVPROPS\
- SVN_DAV_PROP_NS_DAV "svn/atomic-revprops"
-
-/** Presence of this in a DAV header in an OPTIONS response indicates
* that the transmitter (in this case, the server) knows how to handle
* a replay of a directory in the repository (not root). */
#define SVN_DAV_NS_DAV_SVN_PARTIAL_REPLAY\
SVN_DAV_PROP_NS_DAV "svn/partial-replay"
/** Presence of this in a DAV header in an OPTIONS response indicates
+ * that the transmitter (in this case, the server) knows how to enforce
+ * old-value atomicity in PROPPATCH (for editing revprops).
+ * @since New in 1.7 */
+#define SVN_DAV_NS_DAV_SVN_ATOMIC_REVPROPS\
+ SVN_DAV_PROP_NS_DAV "svn/atomic-revprops"
+
+/** Presence of this in a DAV header in an OPTIONS response indicates
* that the transmitter (in this case, the server) knows how to get
- * inherited properties. */
+ * inherited properties.
+ * @since New in 1.8. */
#define SVN_DAV_NS_DAV_SVN_INHERITED_PROPS \
SVN_DAV_PROP_NS_DAV "svn/inherited-props"
/** Presence of this in a DAV header in an OPTIONS response indicates
* that the transmitter (in this case, the server) knows how to
* properly handle ephemeral (that is, deleted-just-before-commit) FS
- * transaction properties. */
+ * transaction properties.
+ * @since New in 1.8. */
#define SVN_DAV_NS_DAV_SVN_EPHEMERAL_TXNPROPS\
SVN_DAV_PROP_NS_DAV "svn/ephemeral-txnprops"
/** Presence of this in a DAV header in an OPTIONS response indicates
* that the transmitter (in this case, the server) supports serving properties
- * inline in update editor when 'send-all' is 'false'. */
+ * inline in update editor when 'send-all' is 'false'.
+ * @since New in 1.8. */
#define SVN_DAV_NS_DAV_SVN_INLINE_PROPS\
SVN_DAV_PROP_NS_DAV "svn/inline-props"
@@ -330,6 +341,13 @@ extern "C" {
#define SVN_DAV_NS_DAV_SVN_REPLAY_REV_RESOURCE\
SVN_DAV_PROP_NS_DAV "svn/replay-rev-resource"
+/** Presence of this in a DAV header in an OPTIONS response indicates
+ * that the transmitter (in this case, the server) knows how to handle
+ * a reversed fetch of file versions.
+ * @since New in 1.8. */
+#define SVN_DAV_NS_DAV_SVN_GET_FILE_REVS_REVERSE\
+ SVN_DAV_PROP_NS_DAV "svn/get-file-revs-rvrs"
+
/** @} */
Modified: subversion/branches/fsfs-format7/subversion/include/svn_props.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/include/svn_props.h?rev=1453290&r1=1453289&r2=1453290&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/include/svn_props.h (original)
+++ subversion/branches/fsfs-format7/subversion/include/svn_props.h Wed Mar 6 11:10:01 2013
@@ -661,18 +661,20 @@ svn_prop_name_is_valid(const char *prop_
* @{
*/
-/** The prefix used for all (ephemeral) transaction properties. */
+/** The prefix used for all (ephemeral) transaction properties.
+ * @since New in 1.8. */
#define SVN_PROP_TXN_PREFIX SVN_PROP_PREFIX "txn-"
/** Identifies the client version compability level. For clients
* compiled against Subversion libraries, this is @c SVN_VER_NUMBER.
* Third-party implementations are advised to use similar formatting
* for values of this property.
- */
+ * @since New in 1.8. */
#define SVN_PROP_TXN_CLIENT_COMPAT_VERSION \
SVN_PROP_TXN_PREFIX "client-compat-version"
-/** Identifies the client's user agent string, if any. */
+/** Identifies the client's user agent string, if any.
+ * @since New in 1.8. */
#define SVN_PROP_TXN_USER_AGENT \
SVN_PROP_TXN_PREFIX "user-agent"
@@ -683,7 +685,7 @@ svn_prop_name_is_valid(const char *prop_
* to new properties named @c SVN_PROP_REVISION_PREFIX + "something",
* allowing that information to survive the commit-time removal of
* ephemeral transaction properties.
- */
+ * @since New in 1.8. */
#define SVN_PROP_REVISION_PREFIX SVN_PROP_PREFIX "revision-"
Modified: subversion/branches/fsfs-format7/subversion/include/svn_ra.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/include/svn_ra.h?rev=1453290&r1=1453289&r2=1453290&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/include/svn_ra.h (original)
+++ subversion/branches/fsfs-format7/subversion/include/svn_ra.h Wed Mar 6 11:10:01 2013
@@ -1181,12 +1181,24 @@ svn_ra_do_update(svn_ra_session_t *sessi
* The working copy will be switched to @a revision_to_switch_to, or the
* "latest" revision if this arg is invalid.
*
+ * If @a send_copyfrom_args is TRUE, then ask the server to send
+ * copyfrom arguments to add_file() and add_directory() when possible.
+ * (Note: this means that any subsequent txdeltas coming from the
+ * server are presumed to apply against the copied file!)
+ *
+ * Use @a ignore_ancestry to control whether or not items being
+ * switched will be checked for relatedness first. Unrelated items
+ * are typically transmitted to the editor as a deletion of one thing
+ * and the addition of another, but if this flag is @c TRUE,
+ * unrelated items will be diffed as if they were related.
+ *
* The caller may not perform any RA operations using
* @a session before finishing the report, and may not perform
* any RA operations using @a session from within the editing
* operations of @a switch_editor.
*
- * Use @a pool for memory allocation.
+ * Use @a result_pool for memory allocation and @a scratch_pool for
+ * temporary work.
*
* @note The reporter provided by this function does NOT supply copy-
* from information to the diff editor callbacks.
@@ -1195,8 +1207,34 @@ svn_ra_do_update(svn_ra_session_t *sessi
* needed, and sending too much data back, a pre-1.5 'recurse'
* directive may be sent to the server, based on @a depth.
*
+ * @note Pre Subversion 1.8 svnserve based servers always ignore ancestry
+ * and never send copyfrom data.
+ *
+ * @since New in 1.8.
+ */
+svn_error_t *
+svn_ra_do_switch3(svn_ra_session_t *session,
+ const svn_ra_reporter3_t **reporter,
+ void **report_baton,
+ svn_revnum_t revision_to_switch_to,
+ const char *switch_target,
+ svn_depth_t depth,
+ const char *switch_url,
+ svn_boolean_t send_copyfrom_args,
+ svn_boolean_t ignore_ancestry,
+ const svn_delta_editor_t *switch_editor,
+ void *switch_baton,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
+/**
+ * Similar to svn_ra_do_switch3(), but always ignoring ancestry and
+ * never sending copyfrom_args.
+ *
* @since New in 1.5.
+ * @deprecated Provided for compatibility with the 1.7 API.
*/
+SVN_DEPRECATED
svn_error_t *
svn_ra_do_switch2(svn_ra_session_t *session,
const svn_ra_reporter3_t **reporter,
@@ -1675,6 +1713,10 @@ svn_ra_get_location_segments(svn_ra_sess
* server doesn't implement it, an alternative (but much slower)
* implementation based on svn_ra_get_log2() is used.
*
+ * On subversion 1.8 and newer servers this function has been enabled
+ * to support reversion of the revision range for @a include_merged_revision
+ * @c FALSE reporting by switching @a end with @a start.
+ *
* @since New in 1.5.
*/
svn_error_t *
@@ -2035,6 +2077,15 @@ svn_ra_has_capability(svn_ra_session_t *
*/
#define SVN_RA_CAPABILITY_EPHEMERAL_TXNPROPS "ephemeral-txnprops"
+/**
+ * The capability of a server to walk revisions backwards in
+ * svn_ra_get_file_revs2
+ *
+ * @since New in 1.8.
+ */
+#define SVN_RA_CAPABILITY_GET_FILE_REVS_REVERSE "get-file-revs-reversed"
+
+
/* *** PLEASE READ THIS IF YOU ADD A NEW CAPABILITY ***
*
* RA layers generally fetch all capabilities when asked about any
Modified: subversion/branches/fsfs-format7/subversion/include/svn_ra_svn.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/include/svn_ra_svn.h?rev=1453290&r1=1453289&r2=1453290&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/include/svn_ra_svn.h (original)
+++ subversion/branches/fsfs-format7/subversion/include/svn_ra_svn.h Wed Mar 6 11:10:01 2013
@@ -66,6 +66,9 @@ extern "C" {
#define SVN_RA_SVN_CAP_INHERITED_PROPS "inherited-props"
/* maps to SVN_RA_CAPABILITY_EPHEMERAL_TXNPROPS */
#define SVN_RA_SVN_CAP_EPHEMERAL_TXNPROPS "ephemeral-txnprops"
+/* maps to SVN_RA_CAPABILITY_GET_FILE_REVS_REVERSE */
+#define SVN_RA_SVN_CAP_GET_FILE_REVS_REVERSE "file-revs-reverse"
+
/** ra_svn passes @c svn_dirent_t fields over the wire as a list of
* words, these are the values used to represent each field.
Modified: subversion/branches/fsfs-format7/subversion/include/svn_repos.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/include/svn_repos.h?rev=1453290&r1=1453289&r2=1453290&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/include/svn_repos.h (original)
+++ subversion/branches/fsfs-format7/subversion/include/svn_repos.h Wed Mar 6 11:10:01 2013
@@ -657,15 +657,17 @@ svn_repos_recover(const char *path,
apr_pool_t *pool);
/**
- * Take an exclusive lock on @a path to prevent commits and then
- * invoke @a freeze_body passing @a baton. The repository may be
- * readable by Subversion while frozen, or it may be unreadable,
- * depending on which FS backend the repository uses.
+ * Take an exclusive lock on each of the repositories in @a paths to
+ * prevent commits and then while holding all the locks invoke
+ * @a freeze_body passing @a baton. The repositories may be readable
+ * by Subversion while frozen, or it may be unreadable, depending on
+ * which FS backend the repository uses. Repositories are locked
+ * in array order from zero.
*
* @since New in 1.8.
*/
svn_error_t *
-svn_repos_freeze(const char *path,
+svn_repos_freeze(apr_array_header_t *paths,
svn_error_t *(*freeze_body)(void *baton, apr_pool_t *pool),
void *baton,
apr_pool_t *pool);
@@ -1909,6 +1911,10 @@ svn_repos_fs_get_mergeinfo(svn_mergeinfo
* If @a include_merged_revisions is TRUE, revisions which a included as a
* result of a merge between @a start and @a end will be included.
*
+ * Since Subversion 1.8 this function has been enabled to support reversion
+ * the revision range for @a include_merged_revision @c FALSE reporting by
+ * switching @a start with @a end.
+ *
* @since New in 1.5.
*/
svn_error_t *
Modified: subversion/branches/fsfs-format7/subversion/include/svn_sorts.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/include/svn_sorts.h?rev=1453290&r1=1453289&r2=1453290&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/include/svn_sorts.h (original)
+++ subversion/branches/fsfs-format7/subversion/include/svn_sorts.h Wed Mar 6 11:10:01 2013
@@ -208,6 +208,12 @@ svn_sort__array_delete(apr_array_header_
int delete_index,
int elements_to_delete);
+/* Reverse the order of elements in @a array, in place.
+ */
+void
+svn_sort__array_reverse(apr_array_header_t *array,
+ apr_pool_t *scratch_pool);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
Modified: subversion/branches/fsfs-format7/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/include/svn_wc.h?rev=1453290&r1=1453289&r2=1453290&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/include/svn_wc.h (original)
+++ subversion/branches/fsfs-format7/subversion/include/svn_wc.h Wed Mar 6 11:10:01 2013
@@ -1249,7 +1249,13 @@ typedef enum svn_wc_notify_action_t
/** A copy from a foreign repository has started
* @since New in 1.8. */
- svn_wc_notify_foreign_copy_begin
+ svn_wc_notify_foreign_copy_begin,
+
+ /** A move in the working copy has been broken, i.e. degraded into a
+ * copy + delete. The notified path is the move source (the deleted path).
+ * ### Provide path to move destination as well?
+ * @since New in 1.8. */
+ svn_wc_notify_move_broken
} svn_wc_notify_action_t;
@@ -6336,10 +6342,13 @@ svn_wc_canonicalize_svn_prop(const svn_s
* @a show_copies_as_adds determines whether paths added with history will
* appear as a diff against their copy source, or whether such paths will
* appear as if they were newly added in their entirety.
+ * @a show_copies_as_adds implies not @a ignore_ancestry.
*
* If @a use_git_diff_format is TRUE, copied paths will be treated as added
* if they weren't modified after being copied. This allows the callbacks
* to generate appropriate --git diff headers for such files.
+ * @a use_git_diff_format implies @a show_copies_as_adds, and as such implies
+ * not @a ignore_ancestry.
*
* Normally, the difference from repository->working_copy is shown.
* If @a reverse_order is TRUE, then show working_copy->repository diffs.
@@ -8101,23 +8110,46 @@ svn_wc_exclude(svn_wc_context_t *wc_ctx,
/** @} */
/**
- * Set @a kind to the #svn_node_kind_t of @a abspath. Use @a wc_ctx
- * to access the working copy, and @a scratch_pool for all temporary
- * allocations.
+ * Set @a kind to the #svn_node_kind_t of @a abspath. Use @a wc_ctx to access
+ * the working copy, and @a scratch_pool for all temporary allocations.
+ *
+ * If @a abspath is not under version control, set @a kind to #svn_kind_none.
*
- * If @a abspath is not under version control, set @a kind to #svn_node_none.
- * If it is versioned but hidden and @a show_hidden is @c FALSE, also return
- * #svn_node_none.
- *
- * ### What does hidden really mean?
- * ### What happens when show_hidden is TRUE?
- *
- * If the node's info is incomplete, it may or may not have a known node kind
- * set. If the kind is not known (yet), set @a kind to #svn_node_unknown.
- * Otherwise return the node kind even though the node is marked incomplete.
+ * If @a show_hidden and @a show_deleted are both @c FALSE, the kind of
+ * scheduled for delete, administrative only 'not present' and excluded
+ * nodes is reported as #svn_node_kind_node. This is recommended as a check
+ * for 'is there a versioned file or directory here?'
+ *
+ * If @a show_deleted is FALSE, but @a show_hidden is @c TRUE then only
+ * scheduled for delete and administrative only 'not present' nodes are
+ * reported as #svn_node_kind_none. This is recommended as check for
+ * 'Can I add a node here?'
+ *
+ * If @a show_deleted is TRUE, but @a show_hidden is FALSE, then only
+ * administrative only 'not present' nodes and excluded nodes are reported as
+ * #svn_node_kind_none. This behavior is the behavior bescribed as 'hidden'
+ * before Subversion 1.7.
+ *
+ * If @a show_hidden and @a show_deleted are both @c TRUE all nodes are
+ * reported.
+ *
+ * @since New in 1.8.
+ */
+svn_error_t *
+svn_wc_read_kind2(svn_node_kind_t *kind,
+ svn_wc_context_t *wc_ctx,
+ const char *local_abspath,
+ svn_boolean_t show_deleted,
+ svn_boolean_t show_hidden,
+ apr_pool_t *scratch_pool);
+
+/** Similar to svn_wc_read_kind2() but always shows deleted nodes and returns
+ * the result as a #svn_node_kind_t.
*
* @since New in 1.7.
+ * @deprecated Provided for backward compatibility with the 1.7 API.
*/
+SVN_DEPRECATED
svn_error_t *
svn_wc_read_kind(svn_node_kind_t *kind,
svn_wc_context_t *wc_ctx,
Modified: subversion/branches/fsfs-format7/subversion/libsvn_client/add.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_client/add.c?rev=1453290&r1=1453289&r2=1453290&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_client/add.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_client/add.c Wed Mar 6 11:10:01 2013
@@ -587,20 +587,13 @@ find_existing_parent(const char **existi
const char *parent_abspath;
svn_wc_context_t *wc_ctx = ctx->wc_ctx;
- SVN_ERR(svn_wc_read_kind(&kind, wc_ctx, local_abspath, FALSE, scratch_pool));
+ SVN_ERR(svn_wc_read_kind2(&kind, wc_ctx, local_abspath,
+ FALSE, FALSE, scratch_pool));
if (kind == svn_node_dir)
{
- svn_boolean_t is_deleted;
-
- SVN_ERR(svn_wc__node_is_status_deleted(&is_deleted,
- wc_ctx, local_abspath,
- scratch_pool));
- if (!is_deleted)
- {
- *existing_parent_abspath = apr_pstrdup(result_pool, local_abspath);
- return SVN_NO_ERROR;
- }
+ *existing_parent_abspath = apr_pstrdup(result_pool, local_abspath);
+ return SVN_NO_ERROR;
}
if (svn_dirent_is_root(local_abspath, strlen(local_abspath)))
@@ -1189,9 +1182,8 @@ mkdir_urls(const apr_array_header_t *url
const char *first_url = APR_ARRAY_IDX(urls, 0, const char *);
apr_pool_t *iterpool = svn_pool_create(pool);
- SVN_ERR(svn_client__open_ra_session_internal(&ra_session, NULL,
- first_url, NULL, NULL,
- FALSE, TRUE, ctx, pool));
+ SVN_ERR(svn_client_open_ra_session2(&ra_session, first_url, NULL,
+ ctx, pool, iterpool));
for (i = 0; i < urls->nelts; i++)
{
@@ -1301,9 +1293,11 @@ mkdir_urls(const apr_array_header_t *url
/* Open an RA session for the URL. Note that we don't have a local
directory, nor a place to put temp files. */
if (!ra_session)
- SVN_ERR(svn_client__open_ra_session_internal(&ra_session, NULL, common,
- NULL, NULL, FALSE, TRUE,
- ctx, pool));
+ SVN_ERR(svn_client_open_ra_session2(&ra_session, common, NULL, ctx,
+ pool, pool));
+ else
+ SVN_ERR(svn_ra_reparent(ra_session, common, pool));
+
/* Fetch RA commit editor */
SVN_ERR(svn_ra__register_editor_shim_callbacks(ra_session,
Modified: subversion/branches/fsfs-format7/subversion/libsvn_client/blame.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_client/blame.c?rev=1453290&r1=1453289&r2=1453290&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_client/blame.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_client/blame.c Wed Mar 6 11:10:01 2013
@@ -79,7 +79,6 @@ struct file_rev_baton {
const char *target;
svn_client_ctx_t *ctx;
const svn_diff_file_options_t *diff_options;
- svn_boolean_t ignore_mime_type;
/* name of file containing the previous revision of the file */
const char *last_filename;
struct rev *rev; /* the rev for which blame is being assigned
@@ -107,7 +106,6 @@ struct delta_baton {
svn_txdelta_window_handler_t wrapped_handler;
void *wrapped_baton;
struct file_rev_baton *file_rev_baton;
- svn_stream_t *source_stream; /* the delta source */
const char *filename;
};
@@ -327,13 +325,6 @@ window_handler(svn_txdelta_window_t *win
if (window)
return SVN_NO_ERROR;
- /* Close the source file used for the delta.
- It is important to do this early, since otherwise, they will be deleted
- before all handles are closed, which leads to failures on some platforms
- when new tempfiles are to be created. */
- if (dbaton->source_stream)
- SVN_ERR(svn_stream_close(dbaton->source_stream));
-
/* If we are including merged revisions, we need to add each rev to the
merged chain. */
if (frb->include_merged_revisions)
@@ -383,27 +374,6 @@ window_handler(svn_txdelta_window_t *win
return SVN_NO_ERROR;
}
-/* Throw an SVN_ERR_CLIENT_IS_BINARY_FILE error if PROP_DIFFS indicates a
- binary MIME type. Else, return SVN_NO_ERROR. */
-static svn_error_t *
-check_mimetype(const apr_array_header_t *prop_diffs, const char *target,
- apr_pool_t *pool)
-{
- int i;
-
- for (i = 0; i < prop_diffs->nelts; ++i)
- {
- const svn_prop_t *prop = &APR_ARRAY_IDX(prop_diffs, i, svn_prop_t);
- if (strcmp(prop->name, SVN_PROP_MIME_TYPE) == 0
- && prop->value
- && svn_mime_type_is_binary(prop->value->data))
- return svn_error_createf
- (SVN_ERR_CLIENT_IS_BINARY_FILE, 0,
- _("Cannot calculate blame information for binary file '%s'"),
- svn_dirent_local_style(target, pool));
- }
- return SVN_NO_ERROR;
-}
/* Calculate and record blame information for one revision of the file,
* by comparing the file content against the previously seen revision.
@@ -432,10 +402,6 @@ file_rev_handler(void *baton, const char
/* Clear the current pool. */
svn_pool_clear(frb->currpool);
- /* If this file has a non-textual mime-type, bail out. */
- if (! frb->ignore_mime_type)
- SVN_ERR(check_mimetype(prop_diffs, frb->target, frb->currpool));
-
if (frb->ctx->notify_func2)
{
svn_wc_notify_t *notify
@@ -472,12 +438,10 @@ file_rev_handler(void *baton, const char
/* Prepare the text delta window handler. */
if (frb->last_filename)
- SVN_ERR(svn_stream_open_readonly(&delta_baton->source_stream, frb->last_filename,
+ SVN_ERR(svn_stream_open_readonly(&last_stream, frb->last_filename,
frb->currpool, pool));
else
- /* Means empty stream below. */
- delta_baton->source_stream = NULL;
- last_stream = svn_stream_disown(delta_baton->source_stream, pool);
+ last_stream = svn_stream_empty(frb->currpool);
if (frb->include_merged_revisions && !frb->merged_revision)
filepool = frb->filepool;
@@ -486,7 +450,7 @@ file_rev_handler(void *baton, const char
SVN_ERR(svn_stream_open_unique(&cur_stream, &delta_baton->filename, NULL,
svn_io_file_del_on_pool_cleanup,
- filepool, filepool));
+ filepool, pool));
/* Get window handler for applying delta. */
svn_txdelta_apply(last_stream, cur_stream, NULL, NULL,
@@ -640,12 +604,43 @@ svn_client_blame5(const char *target,
(SVN_ERR_CLIENT_BAD_REVISION, NULL,
_("Start revision must precede end revision"));
+ /* We check the mime-type of the yougest revision before getting all
+ the older revisions. */
+ if (!ignore_mime_type)
+ {
+ apr_hash_t *props;
+ apr_hash_index_t *hi;
+
+ SVN_ERR(svn_client_propget5(&props, NULL, SVN_PROP_MIME_TYPE,
+ target_abspath_or_url, peg_revision,
+ end, NULL, svn_depth_empty, NULL, ctx,
+ pool, pool));
+
+ /* props could be keyed on URLs or paths depending on the
+ peg_revision and end values so avoid using the key. */
+ hi = apr_hash_first(pool, props);
+ if (hi)
+ {
+ svn_string_t *value;
+
+ /* Should only be one value */
+ SVN_ERR_ASSERT(apr_hash_count(props) == 1);
+
+ value = svn__apr_hash_index_val(hi);
+ if (value && svn_mime_type_is_binary(value->data))
+ return svn_error_createf
+ (SVN_ERR_CLIENT_IS_BINARY_FILE, 0,
+ _("Cannot calculate blame information for binary file '%s'"),
+ (svn_path_is_url(target)
+ ? target : svn_dirent_local_style(target, pool)));
+ }
+ }
+
frb.start_rev = start_revnum;
frb.end_rev = end_revnum;
frb.target = target;
frb.ctx = ctx;
frb.diff_options = diff_options;
- frb.ignore_mime_type = ignore_mime_type;
frb.include_merged_revisions = include_merged_revisions;
frb.last_filename = NULL;
frb.last_original_filename = NULL;
Modified: subversion/branches/fsfs-format7/subversion/libsvn_client/cat.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_client/cat.c?rev=1453290&r1=1453289&r2=1453290&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_client/cat.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_client/cat.c Wed Mar 6 11:10:01 2013
@@ -67,7 +67,9 @@ svn_client__get_normalized_stream(svn_st
SVN_ERR_ASSERT(SVN_CLIENT__REVKIND_IS_LOCAL_TO_WC(revision->kind));
- SVN_ERR(svn_wc_read_kind(&kind, wc_ctx, local_abspath, FALSE, scratch_pool));
+ SVN_ERR(svn_wc_read_kind2(&kind, wc_ctx, local_abspath,
+ (revision->kind != svn_opt_revision_working),
+ FALSE, scratch_pool));
if (kind == svn_node_unknown || kind == svn_node_none)
return svn_error_createf(SVN_ERR_UNVERSIONED_RESOURCE, NULL,
@@ -86,7 +88,7 @@ svn_client__get_normalized_stream(svn_st
result_pool, scratch_pool));
if (input == NULL)
return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
- _("'%s' has no base revision until it is committed"),
+ _("'%s' has no pristine version until it is committed"),
svn_dirent_local_style(local_abspath, scratch_pool));
SVN_ERR(svn_wc_get_pristine_props(&props, wc_ctx, local_abspath,
Modified: subversion/branches/fsfs-format7/subversion/libsvn_client/client.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_client/client.h?rev=1453290&r1=1453289&r2=1453290&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_client/client.h (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_client/client.h Wed Mar 6 11:10:01 2013
@@ -265,15 +265,18 @@ svn_client__ensure_ra_session_url(const
- COMMIT_ITEMS is an array of svn_client_commit_item_t *
structures, present only for working copy commits, NULL otherwise.
- - USE_ADMIN indicates that the RA layer should create tempfiles
- in the administrative area instead of in the working copy itself,
- and read properties from the administrative area.
+ - WRITE_DAV_PROPS indicates that the RA layer can clear and write
+ the DAV properties in the working copy of BASE_DIR_ABSPATH.
- - READ_ONLY_WC indicates that the RA layer should not attempt to
- modify the WC props directly.
+ - READ_DAV_PROPS indicates that the RA layer should not attempt to
+ modify the WC props directly, but is still allowed to read them.
BASE_DIR_ABSPATH may be NULL if the RA operation does not correspond to a
- working copy (in which case, USE_ADMIN should be FALSE).
+ working copy (in which case, WRITE_DAV_PROPS and READ_DAV_PROPS must be
+ FALSE.
+
+ If WRITE_DAV_PROPS and READ_DAV_PROPS are both FALSE the working copy may
+ still be used for locating pristine files via their SHA1.
The calling application's authentication baton is provided in CTX,
and allocations related to this session are performed in POOL.
@@ -286,10 +289,11 @@ svn_client__open_ra_session_internal(svn
const char *base_url,
const char *base_dir_abspath,
const apr_array_header_t *commit_items,
- svn_boolean_t use_admin,
- svn_boolean_t read_only_wc,
+ svn_boolean_t write_dav_props,
+ svn_boolean_t read_dav_props,
svn_client_ctx_t *ctx,
- apr_pool_t *pool);
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
svn_error_t *
@@ -597,58 +601,6 @@ svn_client__switch_internal(svn_revnum_t
/* ---------------------------------------------------------------- */
-/*** List ***/
-
-/* List the file/directory entries for PATH_OR_URL at REVISION.
- The actual node revision selected is determined by the path as
- it exists in PEG_REVISION.
-
- If DEPTH is svn_depth_infinity, then list all file and directory entries
- recursively. Else if DEPTH is svn_depth_files, list all files under
- PATH_OR_URL (if any), but not subdirectories. Else if DEPTH is
- svn_depth_immediates, list all files and include immediate
- subdirectories (at svn_depth_empty). Else if DEPTH is
- svn_depth_empty, just list PATH_OR_URL with none of its entries.
-
- DIRENT_FIELDS controls which fields in the svn_dirent_t's are
- filled in. To have them totally filled in use SVN_DIRENT_ALL,
- otherwise simply bitwise OR together the combination of SVN_DIRENT_*
- fields you care about.
-
- If FETCH_LOCKS is TRUE, include locks when reporting directory entries.
-
- If INCLUDE_EXTERNALS is TRUE, also list all external items
- reached by recursion. DEPTH value passed to the original list target
- applies for the externals also. EXTERNAL_PARENT_URL is url of the
- directory which has the externals definitions. EXTERNAL_TARGET is the
- target subdirectory of externals definitions.
-
- Report directory entries by invoking LIST_FUNC/BATON.
- Pass EXTERNAL_PARENT_URL and EXTERNAL_TARGET to LIST_FUNC when external
- items are listed, otherwise both are set to NULL.
-
- Use authentication baton cached in CTX to authenticate against the
- repository.
-
- Use POOL for all allocations.
-*/
-svn_error_t *
-svn_client__list_internal(const char *path_or_url,
- const svn_opt_revision_t *peg_revision,
- const svn_opt_revision_t *revision,
- svn_depth_t depth,
- apr_uint32_t dirent_fields,
- svn_boolean_t fetch_locks,
- svn_boolean_t include_externals,
- const char *external_parent_url,
- const char *external_target,
- svn_client_list_func2_t list_func,
- void *baton,
- svn_client_ctx_t *ctx,
- apr_pool_t *pool);
-
-/* ---------------------------------------------------------------- */
-
/*** Inheritable Properties ***/
/* Convert any svn_prop_inherited_item_t elements in INHERITED_PROPS which
@@ -1086,43 +1038,6 @@ svn_client__export_externals(apr_hash_t
svn_client_ctx_t *ctx,
apr_pool_t *pool);
-
-/* Perform status operations on each external in EXTERNAL_MAP, a const char *
- local_abspath of all externals mapping to the const char* defining_abspath.
- All other options are the same as those passed to svn_client_status().
-
- If ANCHOR_ABSPATH and ANCHOR-RELPATH are not null, use them to provide
- properly formatted relative paths
- */
-svn_error_t *
-svn_client__do_external_status(svn_client_ctx_t *ctx,
- apr_hash_t *external_map,
- svn_depth_t depth,
- svn_boolean_t get_all,
- svn_boolean_t update,
- svn_boolean_t no_ignore,
- const char *anchor_abspath,
- const char *anchor_relpath,
- svn_client_status_func_t status_func,
- void *status_baton,
- apr_pool_t *scratch_pool);
-
-
-/* List external items defined on each external in EXTERNALS, a const char *
- externals_parent_url(url of the directory which has the externals
- definitions) of all externals mapping to the svn_string_t * externals_desc
- (externals description text). All other options are the same as those
- passed to svn_client_list(). */
-svn_error_t *
-svn_client__list_externals(apr_hash_t *externals,
- svn_depth_t depth,
- apr_uint32_t dirent_fields,
- svn_boolean_t fetch_locks,
- svn_client_list_func2_t list_func,
- void *baton,
- svn_client_ctx_t *ctx,
- apr_pool_t *scratch_pool);
-
/* Baton for svn_client__dirent_fetcher */
struct svn_client__dirent_fetcher_baton_t
{
Modified: subversion/branches/fsfs-format7/subversion/libsvn_client/cmdline.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_client/cmdline.c?rev=1453290&r1=1453289&r2=1453290&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_client/cmdline.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_client/cmdline.c Wed Mar 6 11:10:01 2013
@@ -244,8 +244,8 @@ svn_client_args_to_target_array2(apr_arr
SVN_ERR(svn_dirent_get_absolute(&target_abspath,
original_target, pool));
- err2 = svn_wc_read_kind(&kind, ctx->wc_ctx, target_abspath,
- FALSE, pool);
+ err2 = svn_wc_read_kind2(&kind, ctx->wc_ctx, target_abspath,
+ TRUE, FALSE, pool);
if (err2
&& (err2->apr_err == SVN_ERR_WC_NOT_WORKING_COPY
|| err2->apr_err == SVN_ERR_WC_UPGRADE_REQUIRED))
Modified: subversion/branches/fsfs-format7/subversion/libsvn_client/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_client/commit.c?rev=1453290&r1=1453289&r2=1453290&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_client/commit.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_client/commit.c Wed Mar 6 11:10:01 2013
@@ -256,8 +256,8 @@ check_nonrecursive_dir_delete(svn_wc_con
SVN_ERR_ASSERT(depth != svn_depth_infinity);
- SVN_ERR(svn_wc_read_kind(&kind, wc_ctx, target_abspath, FALSE,
- scratch_pool));
+ SVN_ERR(svn_wc_read_kind2(&kind, wc_ctx, target_abspath,
+ TRUE, FALSE, scratch_pool));
/* ### TODO(sd): This check is slightly too strict. It should be
@@ -457,8 +457,8 @@ check_url_kind(void *baton,
/* If we don't have a session or can't use the session, get one */
if (!cukb->session || !svn_uri__is_ancestor(cukb->repos_root_url, url))
{
- SVN_ERR(svn_client_open_ra_session(&cukb->session, url, cukb->ctx,
- cukb->pool));
+ SVN_ERR(svn_client_open_ra_session2(&cukb->session, url, NULL, cukb->ctx,
+ cukb->pool, scratch_pool));
SVN_ERR(svn_ra_get_repos_root2(cukb->session, &cukb->repos_root_url,
cukb->pool));
}
@@ -766,8 +766,9 @@ svn_client_commit6(const apr_array_heade
svn_pool_clear(iterpool);
- if (item->state_flags & SVN_CLIENT_COMMIT_ITEM_IS_COPY)
+ if (item->state_flags & SVN_CLIENT_COMMIT_ITEM_MOVED_HERE)
{
+ /* ### item->moved_from_abspath contains the move origin */
const char *moved_from_abspath;
const char *delete_op_root_abspath;
@@ -848,7 +849,8 @@ svn_client_commit6(const apr_array_heade
}
}
}
- else if (item->state_flags & SVN_CLIENT_COMMIT_ITEM_DELETE)
+
+ if (item->state_flags & SVN_CLIENT_COMMIT_ITEM_DELETE)
{
const char *moved_to_abspath;
const char *copy_op_root_abspath;
@@ -924,7 +926,8 @@ svn_client_commit6(const apr_array_heade
0,
const char *),
commit_items,
- TRUE, FALSE, ctx, pool));
+ TRUE, TRUE, ctx,
+ pool, pool));
if (cmt_err)
goto cleanup;
Modified: subversion/branches/fsfs-format7/subversion/libsvn_client/commit_util.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_client/commit_util.c?rev=1453290&r1=1453289&r2=1453290&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_client/commit_util.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_client/commit_util.c Wed Mar 6 11:10:01 2013
@@ -196,6 +196,7 @@ add_committable(svn_client__committables
svn_revnum_t revision,
const char *copyfrom_relpath,
svn_revnum_t copyfrom_rev,
+ const char *moved_from_abspath,
apr_byte_t state_flags,
apr_hash_t *lock_tokens,
const svn_lock_t *lock,
@@ -245,6 +246,10 @@ add_committable(svn_client__committables
new_item->incoming_prop_changes = apr_array_make(result_pool, 1,
sizeof(svn_prop_t *));
+ if (moved_from_abspath)
+ new_item->moved_from_abspath = apr_pstrdup(result_pool,
+ moved_from_abspath);
+
/* Now, add the commit item to the array. */
APR_ARRAY_PUSH(array, svn_client_commit_item3_t *) = new_item;
@@ -483,7 +488,7 @@ harvest_not_present_for_copy(svn_wc_cont
svn_pool_clear(iterpool);
SVN_ERR(svn_wc__node_is_not_present(¬_present, NULL, NULL, wc_ctx,
- this_abspath, scratch_pool));
+ this_abspath, FALSE, scratch_pool));
if (!not_present)
continue;
@@ -525,8 +530,8 @@ harvest_not_present_for_copy(svn_wc_cont
continue; /* This node can't be deleted */
}
else
- SVN_ERR(svn_wc_read_kind(&kind, wc_ctx, this_abspath, TRUE,
- scratch_pool));
+ SVN_ERR(svn_wc_read_kind2(&kind, wc_ctx, this_abspath,
+ TRUE, TRUE, scratch_pool));
SVN_ERR(add_committable(committables, this_abspath, kind,
repos_root_url,
@@ -534,6 +539,7 @@ harvest_not_present_for_copy(svn_wc_cont
SVN_INVALID_REVNUM,
NULL /* copyfrom_relpath */,
SVN_INVALID_REVNUM /* copyfrom_rev */,
+ NULL /* moved_from_abspath */,
SVN_CLIENT_COMMIT_ITEM_DELETE,
NULL, NULL,
result_pool, scratch_pool));
@@ -576,6 +582,7 @@ harvest_status_callback(void *status_bat
void *notify_baton = baton->notify_baton;
svn_wc_context_t *wc_ctx = baton->wc_ctx;
apr_pool_t *result_pool = baton->result_pool;
+ const char *moved_from_abspath = NULL;
if (baton->commit_relpath)
commit_relpath = svn_relpath_join(
@@ -755,6 +762,12 @@ harvest_status_callback(void *status_bat
state_flags |= SVN_CLIENT_COMMIT_ITEM_IS_COPY;
cf_relpath = original_relpath;
cf_rev = original_rev;
+
+ if (status->moved_from_abspath && !copy_mode)
+ {
+ state_flags |= SVN_CLIENT_COMMIT_ITEM_MOVED_HERE;
+ moved_from_abspath = status->moved_from_abspath;
+ }
}
}
@@ -762,12 +775,14 @@ harvest_status_callback(void *status_bat
else if (copy_mode
&& !(state_flags & SVN_CLIENT_COMMIT_ITEM_DELETE))
{
- svn_revnum_t dir_rev;
+ svn_revnum_t dir_rev = SVN_INVALID_REVNUM;
- if (!copy_mode_root && !status->switched)
- SVN_ERR(svn_wc__node_get_base(&dir_rev, NULL, NULL, NULL, NULL, wc_ctx,
- svn_dirent_dirname(local_abspath,
- scratch_pool),
+ if (!copy_mode_root && !status->switched && !is_added)
+ SVN_ERR(svn_wc__node_get_base(NULL, &dir_rev, NULL, NULL, NULL, NULL,
+ wc_ctx, svn_dirent_dirname(local_abspath,
+ scratch_pool),
+ FALSE /* ignore_enoent */,
+ FALSE /* show_hidden */,
scratch_pool, scratch_pool));
if (copy_mode_root || status->switched || node_rev != dir_rev)
@@ -842,6 +857,7 @@ harvest_status_callback(void *status_bat
: node_rev,
cf_relpath,
cf_rev,
+ moved_from_abspath,
state_flags,
baton->lock_tokens, status->lock,
result_pool, scratch_pool));
Modified: subversion/branches/fsfs-format7/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_client/copy.c?rev=1453290&r1=1453289&r2=1453290&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_client/copy.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_client/copy.c Wed Mar 6 11:10:01 2013
@@ -399,18 +399,19 @@ verify_wc_dsts(const apr_array_header_t
/* If DST_PATH does not exist, then its basename will become a new
file or dir added to its parent (possibly an implicit '.').
Else, just error out. */
- SVN_ERR(svn_wc_read_kind(&dst_kind, ctx->wc_ctx,
- pair->dst_abspath_or_url, TRUE /* show_hidden */,
- iterpool));
+ SVN_ERR(svn_wc_read_kind2(&dst_kind, ctx->wc_ctx,
+ pair->dst_abspath_or_url,
+ FALSE /* show_deleted */,
+ TRUE /* show_hidden */,
+ iterpool));
if (dst_kind != svn_node_none)
{
- svn_boolean_t is_not_present;
svn_boolean_t is_excluded;
svn_boolean_t is_server_excluded;
- SVN_ERR(svn_wc__node_is_not_present(&is_not_present, &is_excluded,
+ SVN_ERR(svn_wc__node_is_not_present(NULL, &is_excluded,
&is_server_excluded, ctx->wc_ctx,
- pair->dst_abspath_or_url,
+ pair->dst_abspath_or_url, FALSE,
iterpool));
if (is_excluded || is_server_excluded)
@@ -420,22 +421,12 @@ verify_wc_dsts(const apr_array_header_t
NULL, _("Path '%s' exists, but is excluded"),
svn_dirent_local_style(pair->dst_abspath_or_url, iterpool));
}
-
- if (! is_not_present)
- {
- svn_boolean_t is_deleted;
-
- SVN_ERR(svn_wc__node_is_status_deleted(&is_deleted, ctx->wc_ctx,
- pair->dst_abspath_or_url,
- scratch_pool));
-
- if (! is_deleted)
- return svn_error_createf(
+ else
+ return svn_error_createf(
SVN_ERR_ENTRY_EXISTS, NULL,
_("Path '%s' already exists"),
svn_dirent_local_style(pair->dst_abspath_or_url,
scratch_pool));
- }
}
/* Check that there is no unversioned obstruction */
@@ -495,30 +486,31 @@ verify_wc_dsts(const apr_array_header_t
/* Make sure the destination parent is a directory and produce a clear
error message if it is not. */
- SVN_ERR(svn_io_check_path(pair->dst_parent_abspath, &dst_parent_kind,
+ SVN_ERR(svn_wc_read_kind2(&dst_parent_kind,
+ ctx->wc_ctx, pair->dst_parent_abspath,
+ FALSE, TRUE,
iterpool));
if (make_parents && dst_parent_kind == svn_node_none)
{
SVN_ERR(svn_client__make_local_parents(pair->dst_parent_abspath,
TRUE, ctx, iterpool));
}
- else if (make_parents && dst_parent_kind == svn_node_dir)
- {
- /* Check if parent is already versioned */
- SVN_ERR(svn_wc_read_kind(&dst_parent_kind, ctx->wc_ctx,
- pair->dst_parent_abspath, FALSE, iterpool));
-
- if (dst_parent_kind == svn_node_none)
- SVN_ERR(svn_client__make_local_parents(pair->dst_parent_abspath,
- TRUE, ctx, iterpool));
- }
else if (dst_parent_kind != svn_node_dir)
{
- return svn_error_createf(SVN_ERR_WC_NOT_WORKING_COPY, NULL,
+ return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
_("Path '%s' is not a directory"),
svn_dirent_local_style(
pair->dst_parent_abspath, scratch_pool));
}
+
+ SVN_ERR(svn_io_check_path(pair->dst_parent_abspath,
+ &dst_parent_kind, scratch_pool));
+
+ if (dst_parent_kind != svn_node_dir)
+ return svn_error_createf(SVN_ERR_WC_MISSING, NULL,
+ _("Path '%s' is not a directory"),
+ svn_dirent_local_style(
+ pair->dst_parent_abspath, scratch_pool));
}
svn_pool_destroy(iterpool);
@@ -540,13 +532,18 @@ verify_wc_srcs_and_dsts(const apr_array_
/* Check that all of our SRCs exist. */
for (i = 0; i < copy_pairs->nelts; i++)
{
+ svn_boolean_t deleted_ok;
svn_client__copy_pair_t *pair = APR_ARRAY_IDX(copy_pairs, i,
svn_client__copy_pair_t *);
svn_pool_clear(iterpool);
+ deleted_ok = (pair->src_peg_revision.kind == svn_opt_revision_base
+ || pair->src_op_revision.kind == svn_opt_revision_base);
+
/* Verify that SRC_PATH exists. */
- SVN_ERR(svn_wc_read_kind(&pair->src_kind, ctx->wc_ctx,
- pair->src_abspath_or_url, FALSE, iterpool));
+ SVN_ERR(svn_wc_read_kind2(&pair->src_kind, ctx->wc_ctx,
+ pair->src_abspath_or_url,
+ deleted_ok, FALSE, iterpool));
if (pair->src_kind == svn_node_none)
return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
_("Path '%s' does not exist"),
@@ -800,10 +797,9 @@ repos_to_repos_copy(const apr_array_head
be verifying that every one of our copy source and destination
URLs is or is beneath this sucker's repository root URL as a form
of a cheap(ish) sanity check. */
- SVN_ERR(svn_client__open_ra_session_internal(&ra_session, NULL,
- first_pair->src_abspath_or_url,
- NULL, NULL, FALSE, TRUE,
- ctx, pool));
+ SVN_ERR(svn_client_open_ra_session2(&ra_session,
+ first_pair->src_abspath_or_url, NULL,
+ ctx, pool, pool));
SVN_ERR(svn_ra_get_repos_root2(ra_session, &repos_root, pool));
/* Verify that sources and destinations are all at or under
@@ -1217,7 +1213,7 @@ wc_to_repos_copy(const apr_array_header_
svn_commit_callback2_t commit_callback,
void *commit_baton,
svn_client_ctx_t *ctx,
- apr_pool_t *pool)
+ apr_pool_t *scratch_pool)
{
const char *message;
const char *top_src_path, *top_dst_url;
@@ -1233,16 +1229,18 @@ wc_to_repos_copy(const apr_array_header_
apr_array_header_t *new_dirs = NULL;
apr_hash_t *commit_revprops;
svn_client__copy_pair_t *first_pair;
+ apr_pool_t *session_pool = svn_pool_create(scratch_pool);
int i;
/* Find the common root of all the source paths */
- SVN_ERR(get_copy_pair_ancestors(copy_pairs, &top_src_path, NULL, NULL, pool));
+ SVN_ERR(get_copy_pair_ancestors(copy_pairs, &top_src_path, NULL, NULL,
+ scratch_pool));
/* Do we need to lock the working copy? 1.6 didn't take a write
lock, but what happens if the working copy changes during the copy
operation? */
- iterpool = svn_pool_create(pool);
+ iterpool = svn_pool_create(scratch_pool);
/* Determine the longest common ancestor for the destinations, and open an RA
session to that location. */
@@ -1254,27 +1252,33 @@ wc_to_repos_copy(const apr_array_header_
* It looks like the entire block of code hanging off this comment
* is redundant. */
first_pair = APR_ARRAY_IDX(copy_pairs, 0, svn_client__copy_pair_t *);
- top_dst_url = svn_uri_dirname(first_pair->dst_abspath_or_url, pool);
+ top_dst_url = svn_uri_dirname(first_pair->dst_abspath_or_url, scratch_pool);
for (i = 1; i < copy_pairs->nelts; i++)
{
svn_client__copy_pair_t *pair = APR_ARRAY_IDX(copy_pairs, i,
svn_client__copy_pair_t *);
top_dst_url = svn_uri_get_longest_ancestor(top_dst_url,
pair->dst_abspath_or_url,
- pool);
+ scratch_pool);
}
- SVN_ERR(svn_dirent_get_absolute(&top_src_abspath, top_src_path, pool));
+ SVN_ERR(svn_dirent_get_absolute(&top_src_abspath, top_src_path, scratch_pool));
+
+ /* Open a session to help while determining the exact targets */
SVN_ERR(svn_client__open_ra_session_internal(&ra_session, NULL, top_dst_url,
- top_src_abspath, NULL, TRUE,
- TRUE, ctx, pool));
+ top_src_abspath, NULL,
+ FALSE /* write_dav_props */,
+ TRUE /* read_dav_props */,
+ ctx,
+ session_pool, session_pool));
/* If requested, determine the nearest existing parent of the destination,
and reparent the ra session there. */
if (make_parents)
{
- new_dirs = apr_array_make(pool, 0, sizeof(const char *));
- SVN_ERR(find_absent_parents2(ra_session, &top_dst_url, new_dirs, pool));
+ new_dirs = apr_array_make(scratch_pool, 0, sizeof(const char *));
+ SVN_ERR(find_absent_parents2(ra_session, &top_dst_url, new_dirs,
+ scratch_pool));
}
/* Figure out the basename that will result from each copy and check to make
@@ -1305,7 +1309,8 @@ wc_to_repos_copy(const apr_array_header_
mechanism used to acquire a log message. */
svn_client_commit_item3_t *item;
const char *tmp_file;
- commit_items = apr_array_make(pool, copy_pairs->nelts, sizeof(item));
+ commit_items = apr_array_make(scratch_pool, copy_pairs->nelts,
+ sizeof(item));
/* Add any intermediate directories to the message */
if (make_parents)
@@ -1314,7 +1319,7 @@ wc_to_repos_copy(const apr_array_header_
{
const char *url = APR_ARRAY_IDX(new_dirs, i, const char *);
- item = svn_client_commit_item3_create(pool);
+ item = svn_client_commit_item3_create(scratch_pool);
item->url = url;
item->state_flags = SVN_CLIENT_COMMIT_ITEM_ADD;
APR_ARRAY_PUSH(commit_items, svn_client_commit_item3_t *) = item;
@@ -1326,28 +1331,26 @@ wc_to_repos_copy(const apr_array_header_
svn_client__copy_pair_t *pair = APR_ARRAY_IDX(copy_pairs, i,
svn_client__copy_pair_t *);
- item = svn_client_commit_item3_create(pool);
+ item = svn_client_commit_item3_create(scratch_pool);
item->url = pair->dst_abspath_or_url;
item->state_flags = SVN_CLIENT_COMMIT_ITEM_ADD;
APR_ARRAY_PUSH(commit_items, svn_client_commit_item3_t *) = item;
}
SVN_ERR(svn_client__get_log_msg(&message, &tmp_file, commit_items,
- ctx, pool));
+ ctx, scratch_pool));
if (! message)
{
svn_pool_destroy(iterpool);
+ svn_pool_destroy(session_pool);
return SVN_NO_ERROR;
}
}
else
message = "";
- SVN_ERR(svn_client__ensure_revprop_table(&commit_revprops, revprop_table,
- message, ctx, pool));
-
cukb.session = ra_session;
- SVN_ERR(svn_ra_get_repos_root2(ra_session, &cukb.repos_root_url, pool));
+ SVN_ERR(svn_ra_get_repos_root2(ra_session, &cukb.repos_root_url, session_pool));
cukb.should_reparent = FALSE;
/* Crawl the working copy for commit items. */
@@ -1355,7 +1358,7 @@ wc_to_repos_copy(const apr_array_header_
SVN_ERR(svn_client__get_copy_committables(&committables,
copy_pairs,
check_url_kind, &cukb,
- ctx, pool, pool));
+ ctx, scratch_pool, iterpool));
/* The committables are keyed by the repository root */
commit_items = apr_hash_get(committables->by_repository,
@@ -1364,7 +1367,7 @@ wc_to_repos_copy(const apr_array_header_
SVN_ERR_ASSERT(commit_items != NULL);
if (cukb.should_reparent)
- SVN_ERR(svn_ra_reparent(ra_session, top_dst_url, pool));
+ SVN_ERR(svn_ra_reparent(ra_session, top_dst_url, session_pool));
/* If we are creating intermediate directories, tack them onto the list
of committables. */
@@ -1375,10 +1378,10 @@ wc_to_repos_copy(const apr_array_header_
const char *url = APR_ARRAY_IDX(new_dirs, i, const char *);
svn_client_commit_item3_t *item;
- item = svn_client_commit_item3_create(pool);
+ item = svn_client_commit_item3_create(scratch_pool);
item->url = url;
item->state_flags = SVN_CLIENT_COMMIT_ITEM_ADD;
- item->incoming_prop_changes = apr_array_make(pool, 1,
+ item->incoming_prop_changes = apr_array_make(scratch_pool, 1,
sizeof(svn_prop_t *));
APR_ARRAY_PUSH(commit_items, svn_client_commit_item3_t *) = item;
}
@@ -1404,7 +1407,7 @@ wc_to_repos_copy(const apr_array_header_
/* Set the mergeinfo for the destination to the combined merge
info known to the WC and the repository. */
- item->outgoing_prop_changes = apr_array_make(pool, 1,
+ item->outgoing_prop_changes = apr_array_make(scratch_pool, 1,
sizeof(svn_prop_t *));
/* Repository mergeinfo (or NULL if it's locally added)... */
if (src_origin)
@@ -1444,7 +1447,7 @@ wc_to_repos_copy(const apr_array_header_
/* Sort and condense our COMMIT_ITEMS. */
SVN_ERR(svn_client__condense_commit_items(&top_dst_url,
- commit_items, pool));
+ commit_items, scratch_pool));
#ifdef ENABLE_EV2_SHIMS
if (commit_items)
@@ -1461,41 +1464,46 @@ wc_to_repos_copy(const apr_array_header_
svn_pool_clear(iterpool);
SVN_ERR(svn_wc__node_get_origin(NULL, NULL, &relpath, NULL, NULL, NULL,
- ctx->wc_ctx, item->path, FALSE, pool,
- iterpool));
+ ctx->wc_ctx, item->path, FALSE,
+ scratch_pool, iterpool));
if (relpath)
apr_hash_set(relpath_map, relpath, APR_HASH_KEY_STRING, item->path);
}
}
#endif
- /* Open an RA session to DST_URL. */
+ /* Close the initial session, to reopen a new session with commit handling */
+ svn_pool_clear(session_pool);
+
+ /* Open a new RA session to DST_URL. */
SVN_ERR(svn_client__open_ra_session_internal(&ra_session, NULL, top_dst_url,
NULL, commit_items,
- FALSE, FALSE, ctx, pool));
+ FALSE, FALSE, ctx,
+ session_pool, session_pool));
+
+ SVN_ERR(svn_client__ensure_revprop_table(&commit_revprops, revprop_table,
+ message, ctx, session_pool));
/* Fetch RA commit editor. */
SVN_ERR(svn_ra__register_editor_shim_callbacks(ra_session,
svn_client__get_shim_callbacks(ctx->wc_ctx, relpath_map,
- pool)));
+ session_pool)));
SVN_ERR(svn_ra_get_commit_editor3(ra_session, &editor, &edit_baton,
commit_revprops,
commit_callback,
commit_baton, NULL,
TRUE, /* No lock tokens */
- pool));
+ session_pool));
/* Perform the commit. */
SVN_ERR_W(svn_client__do_commit(top_dst_url, commit_items,
editor, edit_baton,
0, /* ### any notify_path_offset needed? */
- NULL, ctx, pool, pool),
+ NULL, ctx, session_pool, session_pool),
_("Commit failed (details follow):"));
- /* Sleep to ensure timestamp integrity. */
- svn_io_sleep_for_timestamps(top_src_path, pool);
-
svn_pool_destroy(iterpool);
+ svn_pool_destroy(session_pool);
return SVN_NO_ERROR;
}
@@ -1816,9 +1824,8 @@ repos_to_wc_copy(const apr_array_header_
/* Open a repository session to the longest common src ancestor. We do not
(yet) have a working copy, so we don't have a corresponding path and
tempfiles cannot go into the admin area. */
- SVN_ERR(svn_client__open_ra_session_internal(&ra_session, NULL, top_src_url,
- NULL, NULL, FALSE, TRUE,
- ctx, pool));
+ SVN_ERR(svn_client_open_ra_session2(&ra_session, top_src_url, lock_abspath,
+ ctx, pool, pool));
/* Get the correct src path for the peg revision used, and verify that we
aren't overwriting an existing path. */
Modified: subversion/branches/fsfs-format7/subversion/libsvn_client/copy_foreign.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_client/copy_foreign.c?rev=1453290&r1=1453289&r2=1453290&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_client/copy_foreign.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_client/copy_foreign.c Wed Mar 6 11:10:01 2013
@@ -480,25 +480,20 @@ svn_client__copy_foreign(const char *url
_("'%s' is not a valid location inside a repository"),
url);
- SVN_ERR(svn_wc_read_kind(&wc_kind, ctx->wc_ctx, dst_abspath, FALSE,
- scratch_pool));
+ SVN_ERR(svn_wc_read_kind2(&wc_kind, ctx->wc_ctx, dst_abspath, FALSE, TRUE,
+ scratch_pool));
if (wc_kind != svn_node_none)
{
- svn_boolean_t deleted;
- SVN_ERR(svn_wc__node_is_status_deleted(&deleted, ctx->wc_ctx,
- dst_abspath, scratch_pool));
-
- if (! deleted)
- return svn_error_createf(
+ return svn_error_createf(
SVN_ERR_ENTRY_EXISTS, NULL,
_("'%s' is already under version control"),
svn_dirent_local_style(dst_abspath, scratch_pool));
}
dir_abspath = svn_dirent_dirname(dst_abspath, scratch_pool);
- SVN_ERR(svn_wc_read_kind(&wc_kind, ctx->wc_ctx, dir_abspath, FALSE,
- scratch_pool));
+ SVN_ERR(svn_wc_read_kind2(&wc_kind, ctx->wc_ctx, dir_abspath,
+ FALSE, FALSE, scratch_pool));
if (wc_kind == svn_node_none)
{
@@ -506,8 +501,8 @@ svn_client__copy_foreign(const char *url
SVN_ERR(svn_client__make_local_parents(dir_abspath, make_parents, ctx,
scratch_pool));
- SVN_ERR(svn_wc_read_kind(&wc_kind, ctx->wc_ctx, dir_abspath, FALSE,
- scratch_pool));
+ SVN_ERR(svn_wc_read_kind2(&wc_kind, ctx->wc_ctx, dir_abspath,
+ FALSE, FALSE, scratch_pool));
}
if (wc_kind != svn_node_dir)