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/07/25 16:57:23 UTC
svn commit: r1506999 [2/2] - in /subversion/branches/fsfs-improvements: ./
build/generator/ contrib/client-side/emacs/
subversion/bindings/cxxhl/src/aprwrap/ subversion/bindings/javahl/native/
subversion/bindings/swig/ subversion/bindings/swig/include/...
Modified: subversion/branches/fsfs-improvements/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.h?rev=1506999&r1=1506998&r2=1506999&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.h (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.h Thu Jul 25 14:57:22 2013
@@ -51,17 +51,6 @@
#include "svn_client.h"
#include "svn_repos.h"
-/* Define DLL export magic on Windows. */
-#ifdef WIN32
-# ifdef SVN_SWIG_SWIGUTIL_RB_C
-# define SVN_RB_SWIG_SWIGUTIL_EXPORT __declspec(dllexport)
-# else
-# define SVN_RB_SWIG_SWIGUTIL_EXPORT __declspec(dllimport)
-# endif
-#else
-# define SVN_RB_SWIG_SWIGUTIL_EXPORT
-#endif
-
/* Ruby <=1.8.5 compatibility */
#ifndef RARRAY_LEN
#define RARRAY_LEN(x) RARRAY(x)->len
@@ -95,152 +84,98 @@ typedef struct apr_pool_wrapper_t
apr_array_header_t *children;
} apr_pool_wrapper_t;
-SVN_RB_SWIG_SWIGUTIL_EXPORT
void svn_swig_rb_initialize(void);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
apr_pool_t *svn_swig_rb_pool(void);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
apr_allocator_t *svn_swig_rb_allocator(void);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_svn_delta_editor(void);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_svn_delta_text_delta_window_handler(void);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
void svn_swig_rb_raise_svn_fs_already_close(void);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
void svn_swig_rb_raise_svn_repos_already_close(void);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_svn_error_new(VALUE code, VALUE message,
VALUE file, VALUE line, VALUE child);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_svn_error_to_rb_error(svn_error_t *error);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
void svn_swig_rb_handle_svn_error(svn_error_t *error);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
void *svn_swig_rb_to_swig_type(VALUE value, const void *ctx, apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_from_swig_type(void *value, void *ctx);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_depth_t svn_swig_rb_to_depth(VALUE value);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_mergeinfo_inheritance_t svn_swig_rb_to_mergeinfo_inheritance(VALUE value);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_svn_date_string_to_time(const char *date);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_apr_hash_to_hash_string(apr_hash_t *hash);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_apr_hash_to_hash_svn_string(apr_hash_t *hash);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_apr_hash_to_hash_swig_type(apr_hash_t *hash,
const char *type_name);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_apr_hash_to_hash_merge_range(apr_hash_t *hash);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_apr_hash_to_hash_merge_range_hash(apr_hash_t *hash);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_prop_hash_to_hash(apr_hash_t *prop_hash);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_apr_revnum_key_hash_to_hash_string(apr_hash_t *hash);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_apr_array_to_array_string(const apr_array_header_t *ary);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_apr_array_to_array_svn_string(const apr_array_header_t *ary);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_apr_array_to_array_svn_rev(const apr_array_header_t *ary);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_apr_array_to_array_proplist_item(const apr_array_header_t *ary);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_apr_array_to_array_external_item2(const apr_array_header_t *ary);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_apr_array_to_array_merge_range(const apr_array_header_t *ary);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_apr_array_to_array_auth_provider_object(const apr_array_header_t *ary);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_prop_apr_array_to_hash_prop(const apr_array_header_t *ary);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
apr_hash_t *svn_swig_rb_hash_to_apr_hash_string(VALUE hash, apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
apr_hash_t *svn_swig_rb_hash_to_apr_hash_svn_string(VALUE hash,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
apr_hash_t *svn_swig_rb_hash_to_apr_hash_swig_type(VALUE hash,
const char *typename,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
apr_hash_t *svn_swig_rb_hash_to_apr_hash_revnum(VALUE hash,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
apr_hash_t *svn_swig_rb_hash_to_apr_hash_merge_range(VALUE hash,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
apr_array_header_t *svn_swig_rb_strings_to_apr_array(VALUE strings,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
apr_array_header_t *
svn_swig_rb_array_to_auth_provider_object_apr_array(VALUE array,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
apr_array_header_t *svn_swig_rb_array_to_apr_array_revnum(VALUE array,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
apr_array_header_t *svn_swig_rb_array_to_apr_array_merge_range(VALUE array,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
apr_array_header_t *svn_swig_rb_array_to_apr_array_copy_source(VALUE array,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
apr_array_header_t *svn_swig_rb_array_to_apr_array_revision_range(VALUE array,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
apr_array_header_t *svn_swig_rb_to_apr_array_prop(VALUE array_or_hash,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
apr_array_header_t *svn_swig_rb_to_apr_array_row_prop(VALUE array_or_hash,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
void svn_swig_rb_get_pool(int argc, VALUE *argv, VALUE self, VALUE *rb_pool, apr_pool_t **pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_boolean_t svn_swig_rb_set_pool(VALUE target, VALUE pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
void svn_swig_rb_set_pool_for_no_swig_type(VALUE target, VALUE pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
void svn_swig_rb_push_pool(VALUE pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
void svn_swig_rb_pop_pool(VALUE pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
void svn_swig_rb_destroy_pool(VALUE pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
void svn_swig_rb_destroy_internal_pool(VALUE pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
void svn_swig_rb_make_delta_editor(svn_delta_editor_t **editor,
void **edit_baton,
VALUE rb_editor,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_make_baton(VALUE proc, VALUE pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
void svn_swig_rb_set_baton(VALUE target, VALUE baton);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_log_receiver(void *baton,
apr_hash_t *changed_paths,
svn_revnum_t revision,
@@ -249,19 +184,16 @@ svn_error_t *svn_swig_rb_log_receiver(vo
const char *message,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_log_entry_receiver(void *baton,
svn_log_entry_t *entry,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_repos_authz_func(svn_boolean_t *allowed,
svn_fs_root_t *root,
const char *path,
void *baton,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_repos_authz_callback(svn_repos_authz_access_t required,
svn_boolean_t *allowed,
svn_fs_root_t *root,
@@ -270,7 +202,6 @@ svn_error_t *svn_swig_rb_repos_authz_cal
apr_pool_t *pool);
/* Implements the svn_client_get_commit_log3_t API. */
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_get_commit_log_func(const char **log_msg,
const char **tmp_file,
const apr_array_header_t *
@@ -278,76 +209,60 @@ svn_error_t *svn_swig_rb_get_commit_log_
void *baton,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
void svn_swig_rb_notify_func2(void *baton,
const svn_wc_notify_t *notify,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_conflict_resolver_func
(svn_wc_conflict_result_t **result,
const svn_wc_conflict_description_t *description,
void *baton,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_commit_callback(svn_revnum_t new_revision,
const char *date,
const char *author,
void *baton);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_commit_callback2(const svn_commit_info_t *commit_info,
void *baton,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_cancel_func(void *cancel_baton);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_info_receiver(void *baton,
const char *path,
const svn_info_t *info,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_boolean_t svn_swig_rb_config_enumerator(const char *name,
const char *value,
void *baton,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_boolean_t svn_swig_rb_config_section_enumerator(const char *name,
void *baton,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_delta_path_driver_cb_func(void **dir_baton,
void *parent_baton,
void *callback_baton,
const char *path,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_txdelta_window_handler(svn_txdelta_window_t *window,
void *baton);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
void svn_swig_rb_fs_warning_callback(void *baton, svn_error_t *err);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
void svn_swig_rb_fs_warning_callback_baton_register(VALUE baton,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_fs_get_locks_callback(void *baton,
svn_lock_t *lock,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_just_call(void *baton);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
void svn_swig_rb_setup_ra_callbacks(svn_ra_callbacks2_t **callbacks,
void **baton,
VALUE rb_callbacks,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_ra_lock_callback(void *baton,
const char *path,
svn_boolean_t do_lock,
@@ -355,7 +270,6 @@ svn_error_t *svn_swig_rb_ra_lock_callbac
svn_error_t *ra_err,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_ra_file_rev_handler(void *baton,
const char *path,
svn_revnum_t rev,
@@ -365,13 +279,11 @@ svn_error_t *svn_swig_rb_ra_file_rev_han
apr_array_header_t *prop_diffs,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_repos_history_func(void *baton,
const char *path,
svn_revnum_t revision,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_repos_file_rev_handler(void *baton,
const char *path,
svn_revnum_t rev,
@@ -381,7 +293,6 @@ svn_error_t *svn_swig_rb_repos_file_rev_
apr_array_header_t *prop_diffs,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_wc_relocation_validator3(void *baton,
const char *uuid,
const char *url,
@@ -390,14 +301,12 @@ svn_error_t *svn_swig_rb_wc_relocation_v
/* auth provider callbacks */
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t * svn_swig_rb_auth_gnome_keyring_unlock_prompt_func(
char **keyring_passwd,
const char *keyring_name,
void *baton,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_auth_simple_prompt_func(
svn_auth_cred_simple_t **cred,
void *baton,
@@ -406,7 +315,6 @@ svn_error_t *svn_swig_rb_auth_simple_pro
svn_boolean_t may_save,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_auth_username_prompt_func(
svn_auth_cred_username_t **cred,
void *baton,
@@ -414,7 +322,6 @@ svn_error_t *svn_swig_rb_auth_username_p
svn_boolean_t may_save,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_auth_ssl_server_trust_prompt_func(
svn_auth_cred_ssl_server_trust_t **cred,
void *baton,
@@ -424,7 +331,6 @@ svn_error_t *svn_swig_rb_auth_ssl_server
svn_boolean_t may_save,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_auth_ssl_client_cert_prompt_func(
svn_auth_cred_ssl_client_cert_t **cred,
void *baton,
@@ -432,7 +338,6 @@ svn_error_t *svn_swig_rb_auth_ssl_client
svn_boolean_t may_save,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_auth_ssl_client_cert_pw_prompt_func(
svn_auth_cred_ssl_client_cert_pw_t **cred,
void *baton,
@@ -440,27 +345,20 @@ svn_error_t *svn_swig_rb_auth_ssl_client
svn_boolean_t may_save,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
apr_file_t *svn_swig_rb_make_file(VALUE file, apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_stream_t *svn_swig_rb_make_stream(VALUE io);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_filename_to_temp_file(const char *file_name);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
void svn_swig_rb_set_revision(svn_opt_revision_t *rev, VALUE value);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
void svn_swig_rb_adjust_arg_for_client_ctx_and_pool(int *argc, VALUE **argv);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
void svn_swig_rb_wc_status_func(void *baton,
const char *path,
svn_wc_status2_t *status);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_client_blame_receiver_func(void *baton,
apr_int64_t line_no,
svn_revnum_t revision,
@@ -470,39 +368,27 @@ svn_error_t *svn_swig_rb_client_blame_re
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_wc_entry_callbacks2_t *svn_swig_rb_wc_entry_callbacks2(void);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_wc_diff_callbacks2_t *svn_swig_rb_wc_diff_callbacks2(void);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_make_txdelta_window_handler_wrapper(VALUE *rb_handler_pool,
apr_pool_t **handler_pool,
svn_txdelta_window_handler_t **handler,
void ***handler_baton);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_setup_txdelta_window_handler_wrapper(VALUE obj,
svn_txdelta_window_handler_t handler,
void *handler_baton);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
-svn_error_t *svn_swig_rb_invoke_txdelta_window_handler(VALUE window_handler,
- svn_txdelta_window_t *window,
- apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_invoke_txdelta_window_handler_wrapper(VALUE obj,
svn_txdelta_window_t *window,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
VALUE svn_swig_rb_txdelta_window_t_ops_get(svn_txdelta_window_t *window);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_client_diff_summarize_func(const svn_client_diff_summarize_t *diff,
void *baton,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_client_list_func(void *baton,
const char *path,
const svn_dirent_t *dirent,
@@ -510,20 +396,17 @@ svn_error_t *svn_swig_rb_client_list_fun
const char *abs_path,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_proplist_receiver(void *baton,
const char *path,
apr_hash_t *prop_hash,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_rb_changelist_receiver(void *baton,
const char *path,
const char *changelist,
apr_pool_t *pool);
-SVN_RB_SWIG_SWIGUTIL_EXPORT
-extern svn_ra_reporter3_t *svn_swig_rb_ra_reporter3;
+svn_ra_reporter3_t *svn_swig_rb_get_ra_reporter3();
#ifdef __cplusplus
}
Modified: subversion/branches/fsfs-improvements/subversion/bindings/swig/svn_delta.i
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/swig/svn_delta.i?rev=1506999&r1=1506998&r2=1506999&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/swig/svn_delta.i (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/swig/svn_delta.i Thu Jul 25 14:57:22 2013
@@ -63,6 +63,9 @@
*/
#ifdef SWIGPYTHON
+/* Make swig wrap this function for us, to allow making an editor in python
+ ### There must be a cleaner way to implement this?
+ ### Maybe follow Ruby by wrapping it where passing an editor? */
void svn_swig_py_make_editor(const svn_delta_editor_t **editor,
void **edit_baton,
PyObject *py_editor,
@@ -71,14 +74,8 @@ void svn_swig_py_make_editor(const svn_d
#ifdef SWIGPERL
%typemap(in) (const svn_delta_editor_t *EDITOR, void *BATON) {
- svn_delta_make_editor(&$1, &$2, $input, _global_pool);
+ svn_swig_pl_make_editor(&$1, &$2, $input, _global_pool);
}
-
-void svn_delta_wrap_window_handler(svn_txdelta_window_handler_t *handler,
- void **handler_baton,
- SV *callback,
- apr_pool_t *pool);
-
#endif
#ifdef SWIGRUBY
Modified: subversion/branches/fsfs-improvements/subversion/bindings/swig/svn_ra.i
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/swig/svn_ra.i?rev=1506999&r1=1506998&r2=1506999&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/swig/svn_ra.i (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/swig/svn_ra.i Thu Jul 25 14:57:22 2013
@@ -65,7 +65,7 @@
#ifdef SWIGPERL
/* FIXME: svn_ra_callbacks2_t ? */
%typemap(in) (const svn_ra_callbacks_t *callbacks, void *callback_baton) {
- svn_ra_make_callbacks(&$1, &$2, $input, _global_pool);
+ svn_swig_pl_make_callbacks(&$1, &$2, $input, _global_pool);
}
#endif
#ifdef SWIGRUBY
@@ -77,7 +77,7 @@
#ifdef SWIGPYTHON
%callback_typemap(const svn_ra_reporter2_t *reporter, void *report_baton,
- (svn_ra_reporter2_t *)&swig_py_ra_reporter2,
+ svn_swig_py_get_ra_reporter2(),
,
)
%callback_typemap(svn_location_segment_receiver_t receiver, void *receiver_baton,
@@ -90,7 +90,7 @@
%callback_typemap(const svn_ra_reporter3_t *reporter, void *report_baton,
,
,
- svn_swig_rb_ra_reporter3)
+ svn_swig_rb_get_ra_reporter3())
#endif
#ifndef SWIGPERL
Modified: subversion/branches/fsfs-improvements/subversion/include/svn_fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/include/svn_fs.h?rev=1506999&r1=1506998&r2=1506999&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/include/svn_fs.h (original)
+++ subversion/branches/fsfs-improvements/subversion/include/svn_fs.h Thu Jul 25 14:57:22 2013
@@ -45,8 +45,7 @@
extern "C" {
#endif /* __cplusplus */
-
-
+
/**
* Get libsvn_fs version information.
*
@@ -176,8 +175,7 @@ typedef struct svn_fs_t svn_fs_t;
*/
svn_error_t *
svn_fs_initialize(apr_pool_t *pool);
-
-
+
/** The type of a warning callback function. @a baton is the value specified
* in the call to svn_fs_set_warning_func(); the filesystem passes it through
@@ -203,8 +201,7 @@ svn_fs_set_warning_func(svn_fs_t *fs,
svn_fs_warning_callback_t warning,
void *warning_baton);
-
-
+
/**
* Create a new, empty Subversion filesystem, stored in the directory
@@ -638,8 +635,7 @@ svn_fs_berkeley_recover(const char *path
/** @} */
-
-
+
/** Filesystem Access Contexts.
*
* @since New in 1.2.
@@ -726,8 +722,7 @@ svn_fs_access_add_lock_token(svn_fs_acce
/** @} */
-
-
+
/** Filesystem Nodes and Node-Revisions.
*
* In a Subversion filesystem, a `node' corresponds roughly to an
@@ -818,8 +813,7 @@ svn_fs_unparse_id(const svn_fs_id_t *id,
/** @} */
-
-
+
/** Filesystem Transactions.
*
* To make a change to a Subversion filesystem:
@@ -995,9 +989,6 @@ svn_fs_begin_txn(svn_fs_txn_t **txn_p,
* the conflict in @a txn, allocated within @a pool;
* otherwise, set @a *conflict_p to NULL.
*
- * If @ set_timestamp is non-zero 'svn:date' revision property will be updated
- * to current time to ensure that svn:date revprops remain ordered.
- *
* If the commit succeeds, @a txn is invalid.
*
* If the commit fails for any reason, @a *new_rev is an invalid
@@ -1168,8 +1159,7 @@ svn_fs_change_txn_props(svn_fs_txn_t *tx
/** @} */
-
-
+
/** Roots.
*
* An #svn_fs_root_t object represents the root directory of some
@@ -1253,8 +1243,7 @@ svn_fs_revision_root_revision(svn_fs_roo
/** @} */
-
-
+
/** Directory entry names and directory paths.
*
* Here are the rules for directory entry names, and directory paths:
@@ -1282,8 +1271,7 @@ svn_fs_revision_root_revision(svn_fs_roo
*/
-
-
+
/** The kind of change that occurred on the path. */
typedef enum svn_fs_path_change_kind_t
{
@@ -1412,8 +1400,7 @@ svn_fs_paths_changed(apr_hash_t **change
/** @} */
-
-
+
/* Operations appropriate to all kinds of nodes. */
/** Set @a *kind_p to the type of node present at @a path under @a
@@ -1790,8 +1777,7 @@ svn_fs_merge(const char **conflict_p,
apr_pool_t *pool);
-
-
+
/* Directories. */
@@ -1909,8 +1895,7 @@ svn_fs_revision_link(svn_fs_root_t *from
svn_fs_root_t *to_root,
const char *path,
apr_pool_t *pool);
-
-
+
/* Files. */
/** Set @a *length_p to the length of the file @a path in @a root, in bytes.
@@ -2144,8 +2129,7 @@ svn_fs_contents_changed(svn_boolean_t *c
apr_pool_t *pool);
-
-
+
/* Filesystem revisions. */
@@ -2278,8 +2262,7 @@ svn_fs_change_rev_prop(svn_fs_t *fs,
apr_pool_t *pool);
-
-
+
/* Computing deltas. */
@@ -2301,8 +2284,7 @@ svn_fs_get_file_delta_stream(svn_txdelta
apr_pool_t *pool);
-
-
+
/* UUID manipulation. */
/** Populate @a *uuid with the UUID associated with @a fs. Allocate
@@ -2322,15 +2304,13 @@ svn_fs_set_uuid(svn_fs_t *fs,
const char *uuid,
apr_pool_t *pool);
-
-
+
/* Non-historical properties. */
/* [[Yes, do tell.]] */
-
-
+
/** @defgroup svn_fs_locks Filesystem locks
* @{
* @since New in 1.2. */
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_fs_base/dag.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_fs_base/dag.c?rev=1506999&r1=1506998&r2=1506999&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_fs_base/dag.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_fs_base/dag.c Thu Jul 25 14:57:22 2013
@@ -59,8 +59,7 @@
#include "svn_private_config.h"
-
-
+
/* Initializing a filesystem. */
struct dag_node_t
@@ -91,8 +90,7 @@ struct dag_node_t
};
-
-
+
/* Trivial helper/accessor functions. */
svn_node_kind_t svn_fs_base__dag_node_kind(dag_node_t *node)
{
@@ -267,8 +265,7 @@ svn_fs_base__dag_init_fs(svn_fs_t *fs)
}
-
-
+
/*** Directory node functions ***/
/* Some of these are helpers for functions outside this section. */
@@ -541,8 +538,7 @@ svn_fs_base__dag_set_entry(dag_node_t *n
}
-
-
+
/*** Proplists. ***/
svn_error_t *
@@ -673,8 +669,7 @@ svn_fs_base__dag_set_proplist(dag_node_t
}
-
-
+
/*** Roots. ***/
svn_error_t *
@@ -1455,8 +1450,7 @@ svn_fs_base__dag_copy(dag_node_t *to_nod
}
-
-
+
/*** Deltification ***/
/* Maybe change the representation identified by TARGET_REP_KEY to be
@@ -1575,8 +1569,7 @@ svn_fs_base__dag_index_checksums(dag_nod
}
-
-
+
/*** Committing ***/
svn_error_t *
@@ -1626,8 +1619,7 @@ svn_fs_base__dag_commit_txn(svn_revnum_t
return SVN_NO_ERROR;
}
-
-
+
/*** Comparison. ***/
svn_error_t *
@@ -1671,8 +1663,7 @@ svn_fs_base__things_different(svn_boolea
}
-
-
+
/*** Mergeinfo tracking stuff ***/
svn_error_t *
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_repos/dump.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_repos/dump.c?rev=1506999&r1=1506998&r2=1506999&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_repos/dump.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_repos/dump.c Thu Jul 25 14:57:22 2013
@@ -1384,6 +1384,7 @@ verify_one_revision(svn_fs_t *fs,
&cancel_edit_baton,
scratch_pool));
SVN_ERR(svn_fs_revision_root(&to_root, fs, rev, scratch_pool));
+ SVN_ERR(svn_fs_verify_root(to_root, scratch_pool));
SVN_ERR(svn_repos_replay2(to_root, "", SVN_INVALID_REVNUM, FALSE,
cancel_editor, cancel_edit_baton,
NULL, NULL, scratch_pool));
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_subr/cmdline.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_subr/cmdline.c?rev=1506999&r1=1506998&r2=1506999&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_subr/cmdline.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_subr/cmdline.c Thu Jul 25 14:57:22 2013
@@ -131,30 +131,32 @@ svn_cmdline_init(const char *progname, F
#endif /* _MSC_VER < 1400 */
#ifdef SVN_USE_WIN32_CRASHHANDLER
- /* Attach (but don't load) the crash handler */
- SetUnhandledExceptionFilter(svn__unhandled_exception_filter);
+ if (!getenv("SVN_CMDLINE_DISABLE_CRASH_HANDLER"))
+ {
+ /* Attach (but don't load) the crash handler */
+ SetUnhandledExceptionFilter(svn__unhandled_exception_filter);
#if _MSC_VER >= 1400
- /* ### This should work for VC++ 2002 (=1300) and later */
- /* Show the abort message on STDERR instead of a dialog to allow
- scripts (e.g. our testsuite) to continue after an abort without
- user intervention. Allow overriding for easier debugging. */
- if (!getenv("SVN_CMDLINE_USE_DIALOG_FOR_ABORT"))
- {
- /* In release mode: Redirect abort() errors to stderr */
- _set_error_mode(_OUT_TO_STDERR);
-
- /* In _DEBUG mode: Redirect all debug output (E.g. assert() to stderr.
- (Ignored in release builds) */
- _CrtSetReportFile( _CRT_WARN, _CRTDBG_FILE_STDERR);
- _CrtSetReportFile( _CRT_ERROR, _CRTDBG_FILE_STDERR);
- _CrtSetReportFile( _CRT_ASSERT, _CRTDBG_FILE_STDERR);
- _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
- _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
- _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
- }
-#endif /* _MSC_VER >= 1400 */
+ /* ### This should work for VC++ 2002 (=1300) and later */
+ /* Show the abort message on STDERR instead of a dialog to allow
+ scripts (e.g. our testsuite) to continue after an abort without
+ user intervention. Allow overriding for easier debugging. */
+ if (!getenv("SVN_CMDLINE_USE_DIALOG_FOR_ABORT"))
+ {
+ /* In release mode: Redirect abort() errors to stderr */
+ _set_error_mode(_OUT_TO_STDERR);
+ /* In _DEBUG mode: Redirect all debug output (E.g. assert() to stderr.
+ (Ignored in release builds) */
+ _CrtSetReportFile( _CRT_WARN, _CRTDBG_FILE_STDERR);
+ _CrtSetReportFile( _CRT_ERROR, _CRTDBG_FILE_STDERR);
+ _CrtSetReportFile( _CRT_ASSERT, _CRTDBG_FILE_STDERR);
+ _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
+ _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
+ _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
+ }
+#endif /* _MSC_VER >= 1400 */
+ }
#endif /* SVN_USE_WIN32_CRASHHANDLER */
#endif /* WIN32 */
Modified: subversion/branches/fsfs-improvements/subversion/svn/cl.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/svn/cl.h?rev=1506999&r1=1506998&r2=1506999&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/svn/cl.h (original)
+++ subversion/branches/fsfs-improvements/subversion/svn/cl.h Thu Jul 25 14:57:22 2013
@@ -242,6 +242,7 @@ typedef struct svn_cl__opt_state_t
svn_boolean_t mergeinfo_log; /* show log message in mergeinfo command */
svn_boolean_t remove_unversioned;/* remove unversioned items */
svn_boolean_t remove_ignored; /* remove ignored items */
+ svn_boolean_t no_newline; /* do not output the trailing newline */
} svn_cl__opt_state_t;
@@ -289,7 +290,8 @@ svn_opt_subcommand_t
svn_cl__switch,
svn_cl__unlock,
svn_cl__update,
- svn_cl__upgrade;
+ svn_cl__upgrade,
+ svn_cl__youngest;
/* See definition in svn.c for documentation. */
@@ -439,12 +441,12 @@ svn_cl__time_cstring_to_human_cstring(co
Increment *TEXT_CONFLICTS, *PROP_CONFLICTS, or *TREE_CONFLICTS if
a conflict was encountered.
- Use CWD_ABSPATH -- the absolute path of the current working
- directory -- to shorten PATH into something relative to that
- directory as necessary.
+ Use TARGET_ABSPATH and TARGET_PATH to shorten PATH into something
+ relative to the target as necessary.
*/
svn_error_t *
-svn_cl__print_status(const char *cwd_abspath,
+svn_cl__print_status(const char *target_abspath,
+ const char *target_path,
const char *path,
const svn_client_status_t *status,
svn_boolean_t suppress_externals_placeholders,
@@ -462,12 +464,12 @@ svn_cl__print_status(const char *cwd_abs
/* Print STATUS for PATH in XML to stdout. Use POOL for temporary
allocations.
- Use CWD_ABSPATH -- the absolute path of the current working
- directory -- to shorten PATH into something relative to that
- directory as necessary.
+ Use TARGET_ABSPATH and TARGET_PATH to shorten PATH into something
+ relative to the target as necessary.
*/
svn_error_t *
-svn_cl__print_status_xml(const char *cwd_abspath,
+svn_cl__print_status_xml(const char *target_abspath,
+ const char *target_path,
const char *path,
const svn_client_status_t *status,
svn_client_ctx_t *ctx,
Modified: subversion/branches/fsfs-improvements/subversion/svn/status-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/svn/status-cmd.c?rev=1506999&r1=1506998&r2=1506999&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/svn/status-cmd.c (original)
+++ subversion/branches/fsfs-improvements/subversion/svn/status-cmd.c Thu Jul 25 14:57:22 2013
@@ -51,7 +51,8 @@ struct status_baton
{
/* These fields all correspond to the ones in the
svn_cl__print_status() interface. */
- const char *cwd_abspath;
+ const char *target_abspath;
+ const char *target_path;
svn_boolean_t suppress_externals_placeholders;
svn_boolean_t detailed;
svn_boolean_t show_last_committed;
@@ -77,6 +78,8 @@ struct status_baton
struct status_cache
{
const char *path;
+ const char *target_abspath;
+ const char *target_path;
svn_client_status_t *status;
};
@@ -152,10 +155,11 @@ print_status_normal_or_xml(void *baton,
struct status_baton *sb = baton;
if (sb->xml_mode)
- return svn_cl__print_status_xml(sb->cwd_abspath, path, status,
- sb->ctx, pool);
+ return svn_cl__print_status_xml(sb->target_abspath, sb->target_path,
+ path, status, sb->ctx, pool);
else
- return svn_cl__print_status(sb->cwd_abspath, path, status,
+ return svn_cl__print_status(sb->target_abspath, sb->target_path,
+ path, status,
sb->suppress_externals_placeholders,
sb->detailed,
sb->show_last_committed,
@@ -239,6 +243,8 @@ print_status(void *baton,
const char *cl_key = apr_pstrdup(sb->cl_pool, status->changelist);
struct status_cache *scache = apr_pcalloc(sb->cl_pool, sizeof(*scache));
scache->path = apr_pstrdup(sb->cl_pool, path);
+ scache->target_abspath = apr_pstrdup(sb->cl_pool, sb->target_abspath);
+ scache->target_path = apr_pstrdup(sb->cl_pool, sb->target_path);
scache->status = svn_client_status_dup(status, sb->cl_pool);
path_array =
@@ -303,7 +309,6 @@ svn_cl__status(apr_getopt_t *os,
"mode"));
}
- SVN_ERR(svn_dirent_get_absolute(&(sb.cwd_abspath), "", scratch_pool));
sb.suppress_externals_placeholders = (opt_state->quiet
&& (! opt_state->verbose));
sb.detailed = (opt_state->verbose || opt_state->update);
@@ -328,6 +333,10 @@ svn_cl__status(apr_getopt_t *os,
svn_pool_clear(iterpool);
+ SVN_ERR(svn_dirent_get_absolute(&(sb.target_abspath), target,
+ scratch_pool));
+ sb.target_path = target;
+
SVN_ERR(svn_cl__check_cancel(ctx->cancel_baton));
if (opt_state->xml)
@@ -392,6 +401,8 @@ svn_cl__status(apr_getopt_t *os,
{
struct status_cache *scache =
APR_ARRAY_IDX(path_array, j, struct status_cache *);
+ sb.target_abspath = scache->target_abspath;
+ sb.target_path = scache->target_path;
SVN_ERR(print_status_normal_or_xml(&sb, scache->path,
scache->status, scratch_pool));
}
Modified: subversion/branches/fsfs-improvements/subversion/svn/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/svn/status.c?rev=1506999&r1=1506998&r2=1506999&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/svn/status.c (original)
+++ subversion/branches/fsfs-improvements/subversion/svn/status.c Thu Jul 25 14:57:22 2013
@@ -137,69 +137,84 @@ generate_status_desc(enum svn_wc_status_
}
/* Make a relative path containing '..' elements as needed.
- RELATIVE_TO_PATH must be the path to a directory (not a file!) and
- TARGET_PATH must be the path to any file or directory. Both
- RELATIVE_TO_PATH and TARGET_PATH must be based on the same parent path,
- i.e. they can either both be absolute or they can both be relative to the
- same parent directory. Both paths are expected to be canonical.
+ TARGET_ABSPATH shall be the absolute version of TARGET_PATH.
+ TARGET_ABSPATH, TARGET_PATH and PATH shall be canonical.
- If above conditions are met, a relative path that leads to TARGET_ABSPATH
- from RELATIVE_TO_PATH is returned, but there is no error checking involved.
+ If above conditions are met, a relative path that leads to PATH
+ from TARGET_PATH is returned, but there is no error checking involved.
- The returned path is allocated from RESULT_POOL, all other allocations are
- made in SCRATCH_POOL. */
+ The returned path is allocated from RESULT_POOL, all other
+ allocations are made in SCRATCH_POOL. */
static const char *
-make_relpath(const char *relative_to_path,
+make_relpath(const char *target_abspath,
const char *target_path,
+ const char *path,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
const char *la;
const char *parent_dir_els = "";
+ const char *abspath, *relative;
+ svn_error_t *err = svn_dirent_get_absolute(&abspath, path, scratch_pool);
+
+ if (err)
+ {
+ /* We probably got passed some invalid path. */
+ svn_error_clear(err);
+ return apr_pstrdup(result_pool, path);
+ }
+
+ relative = svn_dirent_skip_ancestor(target_abspath, abspath);
+ if (relative)
+ {
+ return svn_dirent_join(target_path, relative, result_pool);
+ }
/* An example:
* relative_to_path = /a/b/c
- * target_path = /a/x/y/z
+ * path = /a/x/y/z
* result = ../../x/y/z
*
* Another example (Windows specific):
* relative_to_path = F:/wc
- * target_path = C:/wc
+ * path = C:/wc
* result = C:/wc
*/
/* Skip the common ancestor of both paths, here '/a'. */
- la = svn_dirent_get_longest_ancestor(relative_to_path, target_path,
+ la = svn_dirent_get_longest_ancestor(target_abspath, abspath,
scratch_pool);
if (*la == '\0')
{
/* Nothing in common: E.g. C:/ vs F:/ on Windows */
- return apr_pstrdup(result_pool, target_path);
+ return apr_pstrdup(result_pool, path);
}
- relative_to_path = svn_dirent_skip_ancestor(la, relative_to_path);
- target_path = svn_dirent_skip_ancestor(la, target_path);
+ relative = svn_dirent_skip_ancestor(la, target_abspath);
+ path = svn_dirent_skip_ancestor(la, path);
/* In above example, we'd now have:
* relative_to_path = b/c
- * target_path = x/y/z */
+ * path = x/y/z */
/* Count the elements of relative_to_path and prepend as many '..' elements
- * to target_path. */
- while (*relative_to_path)
+ * to path. */
+ while (*relative)
{
- svn_dirent_split(&relative_to_path, NULL, relative_to_path,
+ svn_dirent_split(&relative, NULL, relative,
scratch_pool);
parent_dir_els = svn_dirent_join(parent_dir_els, "..", scratch_pool);
}
- return svn_dirent_join(parent_dir_els, target_path, result_pool);
+ return svn_dirent_join(parent_dir_els, path, result_pool);
}
/* Print STATUS and PATH in a format determined by DETAILED and
SHOW_LAST_COMMITTED. */
static svn_error_t *
-print_status(const char *cwd_abspath, const char *path,
+print_status(const char *target_abspath,
+ const char *target_path,
+ const char *path,
svn_boolean_t detailed,
svn_boolean_t show_last_committed,
svn_boolean_t repos_locks,
@@ -217,7 +232,7 @@ print_status(const char *cwd_abspath, co
const char *moved_from_line = "";
const char *moved_to_line = "";
- path = make_relpath(cwd_abspath, path, pool, pool);
+ path = make_relpath(target_abspath, target_path, path, pool, pool);
/* For historic reasons svn ignores the property status for added nodes, even
if these nodes were copied and have local property changes.
@@ -295,7 +310,8 @@ print_status(const char *cwd_abspath, co
{
const char *relpath;
- relpath = make_relpath(cwd_abspath, status->moved_from_abspath,
+ relpath = make_relpath(target_abspath, target_path,
+ status->moved_from_abspath,
pool, pool);
relpath = svn_dirent_local_style(relpath, pool);
moved_from_line = apr_pstrcat(pool, "\n > ",
@@ -310,7 +326,8 @@ print_status(const char *cwd_abspath, co
if (status->moved_from_abspath)
{
- relpath = make_relpath(cwd_abspath, status->moved_from_abspath,
+ relpath = make_relpath(target_abspath, target_path,
+ status->moved_from_abspath,
pool, pool);
relpath = svn_dirent_local_style(relpath, pool);
moved_from_line = apr_pstrcat(pool, "\n > ",
@@ -321,7 +338,8 @@ print_status(const char *cwd_abspath, co
if (status->moved_to_abspath)
{
- relpath = make_relpath(cwd_abspath, status->moved_to_abspath,
+ relpath = make_relpath(target_abspath, target_path,
+ status->moved_to_abspath,
pool, pool);
relpath = svn_dirent_local_style(relpath, pool);
moved_to_line = apr_pstrcat(pool, "\n > ",
@@ -331,6 +349,8 @@ print_status(const char *cwd_abspath, co
}
}
+ path = svn_dirent_local_style(path, pool);
+
if (detailed)
{
char ood_status, lock_status;
@@ -448,7 +468,8 @@ print_status(const char *cwd_abspath, co
svn_error_t *
-svn_cl__print_status_xml(const char *cwd_abspath,
+svn_cl__print_status_xml(const char *target_abspath,
+ const char *target_path,
const char *path,
const svn_client_status_t *status,
svn_client_ctx_t *ctx,
@@ -467,7 +488,7 @@ svn_cl__print_status_xml(const char *cwd
SVN_ERR(svn_wc_conflicted_p3(NULL, NULL, &tree_conflicted,
ctx->wc_ctx, local_abspath, pool));
- path = make_relpath(cwd_abspath, path, pool, pool);
+ path = make_relpath(target_abspath, target_path, path, pool, pool);
svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "entry",
"path", svn_dirent_local_style(path, pool), NULL);
@@ -500,14 +521,16 @@ svn_cl__print_status_xml(const char *cwd
if (status->moved_from_abspath)
{
- relpath = make_relpath(cwd_abspath, status->moved_from_abspath,
+ relpath = make_relpath(target_abspath, target_path,
+ status->moved_from_abspath,
pool, pool);
relpath = svn_dirent_local_style(relpath, pool);
svn_hash_sets(att_hash, "moved-from", relpath);
}
if (status->moved_to_abspath)
{
- relpath = make_relpath(cwd_abspath, status->moved_to_abspath,
+ relpath = make_relpath(target_abspath, target_path,
+ status->moved_to_abspath,
pool, pool);
relpath = svn_dirent_local_style(relpath, pool);
svn_hash_sets(att_hash, "moved-to", relpath);
@@ -552,7 +575,8 @@ svn_cl__print_status_xml(const char *cwd
/* Called by status-cmd.c */
svn_error_t *
-svn_cl__print_status(const char *cwd_abspath,
+svn_cl__print_status(const char *target_abspath,
+ const char *target_path,
const char *path,
const svn_client_status_t *status,
svn_boolean_t suppress_externals_placeholders,
@@ -601,7 +625,7 @@ svn_cl__print_status(const char *cwd_abs
return SVN_NO_ERROR;
}
- return print_status(cwd_abspath, svn_dirent_local_style(path, pool),
+ return print_status(target_abspath, target_path, path,
detailed, show_last_committed, repos_locks, status,
text_conflicts, prop_conflicts, tree_conflicts,
ctx, pool);
Modified: subversion/branches/fsfs-improvements/subversion/svn/svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/svn/svn.c?rev=1506999&r1=1506998&r2=1506999&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/svn/svn.c (original)
+++ subversion/branches/fsfs-improvements/subversion/svn/svn.c Thu Jul 25 14:57:22 2013
@@ -136,7 +136,8 @@ typedef enum svn_cl__longopt_t {
opt_search_and,
opt_mergeinfo_log,
opt_remove_unversioned,
- opt_remove_ignored
+ opt_remove_ignored,
+ opt_no_newline
} svn_cl__longopt_t;
@@ -385,6 +386,7 @@ const apr_getopt_option_t svn_cl__option
{"remove-unversioned", opt_remove_unversioned, 0,
N_("remove unversioned items")},
{"remove-ignored", opt_remove_ignored, 0, N_("remove ignored items")},
+ {"no-newline", opt_no_newline, 0, N_("do not output trailing newline")},
/* Long-opt Aliases
*
@@ -1638,6 +1640,14 @@ const svn_opt_subcommand_desc2_t svn_cl_
" Local modifications are preserved.\n"),
{ 'q' } },
+ { "youngest", svn_cl__youngest, {0}, N_
+ ("Print the youngest revision number of a target's repository.\n"
+ "usage: youngest [TARGET]\n"
+ "\n"
+ " Print the revision number of the youngest revision in the repository\n"
+ " with which TARGET is associated.\n"),
+ { opt_no_newline } },
+
{ NULL, NULL, {0}, NULL, {0} }
};
@@ -2314,6 +2324,9 @@ sub_main(int argc, const char *argv[], a
case opt_remove_ignored:
opt_state.remove_ignored = TRUE;
break;
+ case opt_no_newline:
+ opt_state.no_newline = TRUE;
+ break;
default:
/* Hmmm. Perhaps this would be a good place to squirrel away
opts that commands like svn diff might need. Hmmm indeed. */
Modified: subversion/branches/fsfs-improvements/subversion/svnadmin/svnadmin.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/svnadmin/svnadmin.c?rev=1506999&r1=1506998&r2=1506999&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/svnadmin/svnadmin.c (original)
+++ subversion/branches/fsfs-improvements/subversion/svnadmin/svnadmin.c Thu Jul 25 14:57:22 2013
@@ -772,39 +772,6 @@ subcommand_deltify(apr_getopt_t *os, voi
return SVN_NO_ERROR;
}
-static void
-cmdline_stream_printf(svn_stream_t *stream,
- apr_pool_t *pool,
- const char *fmt,
- ...)
- __attribute__((format(printf, 3, 4)));
-
-static void
-cmdline_stream_printf(svn_stream_t *stream,
- apr_pool_t *pool,
- const char *fmt,
- ...)
-{
- const char *message;
- va_list ap;
- svn_error_t *err;
- const char *out;
-
- va_start(ap, fmt);
- message = apr_pvsprintf(pool, fmt, ap);
- va_end(ap);
-
- err = svn_cmdline_cstring_from_utf8(&out, message, pool);
-
- if (err)
- {
- svn_error_clear(err);
- out = svn_cmdline_cstring_from_utf8_fuzzy(message, pool);
- }
-
- svn_error_clear(svn_stream_puts(stream, out));
-}
-
/* Implementation of svn_repos_notify_func_t to wrap the output to a
response stream for svn_repos_dump_fs2() and svn_repos_verify_fs() */
@@ -814,45 +781,46 @@ repos_notify_handler(void *baton,
apr_pool_t *scratch_pool)
{
svn_stream_t *feedback_stream = baton;
+ apr_size_t len;
switch (notify->action)
{
case svn_repos_notify_warning:
- cmdline_stream_printf(feedback_stream, scratch_pool,
- "WARNING 0x%04x: %s\n", notify->warning,
- notify->warning_str);
+ svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+ "WARNING 0x%04x: %s\n", notify->warning,
+ notify->warning_str));
return;
case svn_repos_notify_failure:
if (notify->revision != SVN_INVALID_REVNUM)
- cmdline_stream_printf(feedback_stream, scratch_pool,
- _("* Error verifying revision %ld.\n"),
- notify->revision);
+ svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+ _("* Error verifying revision %ld.\n"),
+ notify->revision));
if (notify->err)
svn_handle_error2(notify->err, stderr, FALSE /* non-fatal */,
"svnadmin: ");
return;
case svn_repos_notify_dump_rev_end:
- cmdline_stream_printf(feedback_stream, scratch_pool,
- _("* Dumped revision %ld.\n"),
- notify->revision);
+ svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+ _("* Dumped revision %ld.\n"),
+ notify->revision));
return;
case svn_repos_notify_verify_rev_end:
- cmdline_stream_printf(feedback_stream, scratch_pool,
- _("* Verified revision %ld.\n"),
- notify->revision);
+ svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+ _("* Verified revision %ld.\n"),
+ notify->revision));
return;
case svn_repos_notify_verify_rev_structure:
if (notify->revision == SVN_INVALID_REVNUM)
- cmdline_stream_printf(feedback_stream, scratch_pool,
- _("* Verifying repository metadata ...\n"));
+ svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+ _("* Verifying repository metadata ...\n")));
else
- cmdline_stream_printf(feedback_stream, scratch_pool,
- _("* Verifying metadata at revision %ld ...\n"),
- notify->revision);
+ svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+ _("* Verifying metadata at revision %ld ...\n"),
+ notify->revision));
return;
case svn_repos_notify_pack_shard_start:
@@ -860,14 +828,14 @@ repos_notify_handler(void *baton,
const char *shardstr = apr_psprintf(scratch_pool,
"%" APR_INT64_T_FMT,
notify->shard);
- cmdline_stream_printf(feedback_stream, scratch_pool,
- _("Packing revisions in shard %s..."),
- shardstr);
+ svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+ _("Packing revisions in shard %s..."),
+ shardstr));
}
return;
case svn_repos_notify_pack_shard_end:
- cmdline_stream_printf(feedback_stream, scratch_pool, _("done.\n"));
+ svn_error_clear(svn_stream_puts(feedback_stream, _("done.\n")));
return;
case svn_repos_notify_pack_shard_start_revprop:
@@ -875,30 +843,30 @@ repos_notify_handler(void *baton,
const char *shardstr = apr_psprintf(scratch_pool,
"%" APR_INT64_T_FMT,
notify->shard);
- cmdline_stream_printf(feedback_stream, scratch_pool,
- _("Packing revprops in shard %s..."),
- shardstr);
+ svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+ _("Packing revprops in shard %s..."),
+ shardstr));
}
return;
case svn_repos_notify_pack_shard_end_revprop:
- cmdline_stream_printf(feedback_stream, scratch_pool, _("done.\n"));
+ svn_error_clear(svn_stream_puts(feedback_stream, _("done.\n")));
return;
case svn_repos_notify_load_txn_committed:
if (notify->old_revision == SVN_INVALID_REVNUM)
{
- cmdline_stream_printf(feedback_stream, scratch_pool,
- _("\n------- Committed revision %ld >>>\n\n"),
- notify->new_revision);
+ svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+ _("\n------- Committed revision %ld >>>\n\n"),
+ notify->new_revision));
}
else
{
- cmdline_stream_printf(feedback_stream, scratch_pool,
- _("\n------- Committed new rev %ld"
- " (loaded from original rev %ld"
- ") >>>\n\n"), notify->new_revision,
- notify->old_revision);
+ svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+ _("\n------- Committed new rev %ld"
+ " (loaded from original rev %ld"
+ ") >>>\n\n"), notify->new_revision,
+ notify->old_revision));
}
return;
@@ -907,27 +875,27 @@ repos_notify_handler(void *baton,
switch (notify->node_action)
{
case svn_node_action_change:
- cmdline_stream_printf(feedback_stream, scratch_pool,
+ svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
_(" * editing path : %s ..."),
- notify->path);
+ notify->path));
break;
case svn_node_action_delete:
- cmdline_stream_printf(feedback_stream, scratch_pool,
+ svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
_(" * deleting path : %s ..."),
- notify->path);
+ notify->path));
break;
case svn_node_action_add:
- cmdline_stream_printf(feedback_stream, scratch_pool,
+ svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
_(" * adding path : %s ..."),
- notify->path);
+ notify->path));
break;
case svn_node_action_replace:
- cmdline_stream_printf(feedback_stream, scratch_pool,
+ svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
_(" * replacing path : %s ..."),
- notify->path);
+ notify->path));
break;
}
@@ -935,30 +903,32 @@ repos_notify_handler(void *baton,
return;
case svn_repos_notify_load_node_done:
- cmdline_stream_printf(feedback_stream, scratch_pool, _(" done.\n"));
+ len = 7;
+ svn_error_clear(svn_stream_write(feedback_stream, _(" done.\n"), &len));
return;
case svn_repos_notify_load_copied_node:
- cmdline_stream_printf(feedback_stream, scratch_pool, "COPIED...");
+ len = 9;
+ svn_error_clear(svn_stream_write(feedback_stream, "COPIED...", &len));
return;
case svn_repos_notify_load_txn_start:
- cmdline_stream_printf(feedback_stream, scratch_pool,
- _("<<< Started new transaction, based on "
- "original revision %ld\n"),
- notify->old_revision);
+ svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+ _("<<< Started new transaction, based on "
+ "original revision %ld\n"),
+ notify->old_revision));
return;
case svn_repos_notify_load_skipped_rev:
- cmdline_stream_printf(feedback_stream, scratch_pool,
- _("<<< Skipped original revision %ld\n"),
- notify->old_revision);
+ svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+ _("<<< Skipped original revision %ld\n"),
+ notify->old_revision));
return;
case svn_repos_notify_load_normalized_mergeinfo:
- cmdline_stream_printf(feedback_stream, scratch_pool,
- _(" removing '\\r' from %s ..."),
- SVN_PROP_MERGEINFO);
+ svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+ _(" removing '\\r' from %s ..."),
+ SVN_PROP_MERGEINFO));
return;
case svn_repos_notify_mutex_acquired:
@@ -967,17 +937,17 @@ repos_notify_handler(void *baton,
return;
case svn_repos_notify_recover_start:
- cmdline_stream_printf(feedback_stream, scratch_pool,
- _("Repository lock acquired.\n"
- "Please wait; recovering the"
- " repository may take some time...\n"));
+ svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+ _("Repository lock acquired.\n"
+ "Please wait; recovering the"
+ " repository may take some time...\n")));
return;
case svn_repos_notify_upgrade_start:
- cmdline_stream_printf(feedback_stream, scratch_pool,
- _("Repository lock acquired.\n"
- "Please wait; upgrading the"
- " repository may take some time...\n"));
+ svn_error_clear(svn_stream_puts(feedback_stream,
+ _("Repository lock acquired.\n"
+ "Please wait; upgrading the"
+ " repository may take some time...\n")));
return;
case svn_repos_notify_pack_revprops:
@@ -985,10 +955,10 @@ repos_notify_handler(void *baton,
const char *shardstr = apr_psprintf(scratch_pool,
"%" APR_INT64_T_FMT,
notify->shard);
- cmdline_stream_printf(feedback_stream, scratch_pool,
+ svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
_("Packing revision properties"
" in shard %s..."),
- shardstr);
+ shardstr));
return;
}
@@ -997,17 +967,17 @@ repos_notify_handler(void *baton,
const char *shardstr = apr_psprintf(scratch_pool,
"%" APR_INT64_T_FMT,
notify->shard);
- cmdline_stream_printf(feedback_stream, scratch_pool,
+ svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
_("Removing non-packed revision properties"
" in shard %s..."),
- shardstr);
+ shardstr));
return;
}
case svn_repos_notify_format_bumped:
- cmdline_stream_printf(feedback_stream, scratch_pool,
+ svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
_("Bumped repository format to %ld\n"),
- notify->revision);
+ notify->revision));
default:
return;
Modified: subversion/branches/fsfs-improvements/subversion/tests/cmdline/basic_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/cmdline/basic_tests.py?rev=1506999&r1=1506998&r2=1506999&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/cmdline/basic_tests.py (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/cmdline/basic_tests.py Thu Jul 25 14:57:22 2013
@@ -3049,6 +3049,34 @@ def peg_rev_on_non_existent_wc_path(sbox
svntest.actions.run_and_verify_svn(None, ['r2\n'], [],
'cat', '-r2', sbox.ospath('mu3') + '@3')
+
+@Issue(4299)
+def basic_youngest(sbox):
+ 'basic youngest'
+
+ sbox.build(read_only=True)
+
+ repos_url = sbox.repo_url
+ deep_repos_url = repos_url + '/A/D/G'
+
+ wc_dir = sbox.wc_dir
+ deep_wc_dir = os.path.join(wc_dir, 'A', 'B', 'E', 'alpha')
+ bad_wc_dir = os.path.join(wc_dir, 'Z')
+
+ svntest.actions.run_and_verify_svn("'svn youngest' on bad WC path",
+ None, svntest.verify.AnyOutput,
+ 'youngest', bad_wc_dir)
+
+ for flag, output in [(False, "1\n"), (True, "1")]:
+ for path in [repos_url, deep_repos_url, wc_dir, deep_wc_dir]:
+ if flag:
+ svntest.actions.run_and_verify_svn("svn youngest", [output], [],
+ 'youngest', '--no-newline', path)
+ else:
+ svntest.actions.run_and_verify_svn("svn youngest", [output], [],
+ 'youngest', path)
+
+
########################################################################
# Run the tests
@@ -3117,6 +3145,7 @@ test_list = [ None,
rm_missing_with_case_clashing_ondisk_item,
delete_conflicts_one_of_many,
peg_rev_on_non_existent_wc_path,
+ basic_youngest,
]
if __name__ == '__main__':
Modified: subversion/branches/fsfs-improvements/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout?rev=1506999&r1=1506998&r2=1506999&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout Thu Jul 25 14:57:22 2013
@@ -45,6 +45,7 @@ Available subcommands:
unlock
update (up)
upgrade
+ youngest
Subversion is a tool for version control.
For additional information, see http://subversion.apache.org/
Modified: subversion/branches/fsfs-improvements/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout?rev=1506999&r1=1506998&r2=1506999&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout Thu Jul 25 14:57:22 2013
@@ -45,6 +45,7 @@ Available subcommands:
unlock
update (up)
upgrade
+ youngest
Subversion is a tool for version control.
For additional information, see http://subversion.apache.org/
Modified: subversion/branches/fsfs-improvements/subversion/tests/cmdline/stat_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/tests/cmdline/stat_tests.py?rev=1506999&r1=1506998&r2=1506999&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/tests/cmdline/stat_tests.py (original)
+++ subversion/branches/fsfs-improvements/subversion/tests/cmdline/stat_tests.py Thu Jul 25 14:57:22 2013
@@ -2092,6 +2092,33 @@ def move_update_timestamps(sbox):
# beta is modified so timestamp is removed
no_text_timestamp(sbox.ospath('A/B/E2/beta'))
+@Issue(4398)
+def status_path_handling(sbox):
+ "relative/absolute path handling"
+
+ sbox.build(read_only=True)
+
+ # target is a relative path to a subdir
+ wc_dir = sbox.wc_dir
+ expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+ svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+ # target is an absolute path to a subdir
+ cwd = os.getcwd()
+ abs_wc_dir = os.path.join(cwd, wc_dir)
+ expected_status = svntest.actions.get_virginal_state(abs_wc_dir, 1)
+ svntest.actions.run_and_verify_status(abs_wc_dir, expected_status)
+
+ # target is an absolute path to a parent dir
+ os.chdir(sbox.ospath('A/B'))
+ expected_status = svntest.actions.get_virginal_state(abs_wc_dir, 1)
+ svntest.actions.run_and_verify_status(abs_wc_dir, expected_status)
+
+ # target is a relative path to a parent dir
+ rel_wc_dir = os.path.join('..', '..')
+ expected_status = svntest.actions.get_virginal_state(rel_wc_dir, 1)
+ svntest.actions.run_and_verify_status(rel_wc_dir, expected_status)
+
########################################################################
# Run the tests
@@ -2139,6 +2166,7 @@ test_list = [ None,
status_unversioned_dir,
status_case_changed,
move_update_timestamps,
+ status_path_handling,
]
if __name__ == '__main__':
Modified: subversion/branches/fsfs-improvements/tools/buildbot/slaves/win32-SharpSvn/svn-config.cmd.template
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/tools/buildbot/slaves/win32-SharpSvn/svn-config.cmd.template?rev=1506999&r1=1506998&r2=1506999&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/tools/buildbot/slaves/win32-SharpSvn/svn-config.cmd.template (original)
+++ subversion/branches/fsfs-improvements/tools/buildbot/slaves/win32-SharpSvn/svn-config.cmd.template Thu Jul 25 14:57:22 2013
@@ -36,7 +36,7 @@ IF NOT EXIST "%TEMP%\" MKDIR "%TEMP%"
SET SVN_URL=
SET SVN_RELURL=
-for /F "usebackq tokens=1,* delims=:" %%i IN (`svn info build`) do (
+for /F "usebackq tokens=1,* delims=:" %%i IN (`svn info .`) do (
IF "%%i" == "URL" (
SET SVN_URL=%%j
Modified: subversion/branches/fsfs-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd?rev=1506999&r1=1506998&r2=1506999&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd (original)
+++ subversion/branches/fsfs-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd Thu Jul 25 14:57:22 2013
@@ -22,8 +22,9 @@ SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDE
CALL ..\svn-config.cmd
IF ERRORLEVEL 1 EXIT /B 1
+ECHO ON
-IF "%SVN_BRANCH% LEQ "1.6.x" (
+IF "%SVN_BRANCH%" LEQ "1.6.x" (
ECHO --- Building 1.6.x or older: Skipping bindings ---
EXIT /B 0
)
@@ -33,59 +34,79 @@ SET result=0
python win-tests.py -d -f fsfs --javahl "%TESTDIR%\tests"
IF ERRORLEVEL 1 (
- echo [python reported error %ERRORLEVEL%]
+ echo [python reported error !ERRORLEVEL!]
SET result=1
)
-IF EXIST "%TESTDIR%\swig" rmdir /s /q "%TESTDIR%\swig"
-mkdir "%TESTDIR%\swig\py-release\libsvn"
-mkdir "%TESTDIR%\swig\py-release\svn"
-
-xcopy "release\subversion\bindings\swig\python\*.pyd" "%TESTDIR%\swig\py-release\libsvn\*.pyd" > nul:
-xcopy "release\subversion\bindings\swig\python\libsvn_swig_py\*.dll" "%TESTDIR%\swig\py-release\libsvn\*.dll" > nul:
-xcopy "subversion\bindings\swig\python\*.py" "%TESTDIR%\swig\py-release\libsvn\*.py" > nul:
-xcopy "subversion\bindings\swig\python\svn\*.py" "%TESTDIR%\swig\py-release\svn\*.py" > nul:
+if "%SVN_BRANCH%" GTR "1.9." (
-SET PYTHONPATH=%TESTDIR%\swig\py-release
+ python win-tests.py -r -f fsfs --swig=python "%TESTDIR%\tests"
-python subversion\bindings\swig\python\tests\run_all.py
-IF ERRORLEVEL 1 (
- echo [Python reported error %ERRORLEVEL%]
- SET result=1
-)
-
-mkdir "%TESTDIR%\swig\pl-release\SVN"
-mkdir "%TESTDIR%\swig\pl-release\auto\SVN"
-xcopy subversion\bindings\swig\perl\native\*.pm "%TESTDIR%\swig\pl-release\SVN" > nul:
-pushd release\subversion\bindings\swig\perl\native
-for %%i in (*.dll) do (
- set name=%%i
- mkdir "%TESTDIR%\swig\pl-release\auto\SVN\!name:~0,-4!"
- xcopy "!name:~0,-4!.*" "%TESTDIR%\swig\pl-release\auto\SVN\!name:~0,-4!" > nul:
- xcopy /y "_Core.dll" "%TESTDIR%\swig\pl-release\auto\SVN\!name:~0,-4!" > nul:
-)
-popd
-
-IF "%SVN_BRANCH% LSS "1.8." (
- ECHO --- Building 1.7.x: Skipping perl and ruby tests ---
- EXIT /B %result%
-)
-
-SET PERL5LIB=%PERL5LIB%;%TESTDIR%\swig\pl-release;
-pushd subversion\bindings\swig\perl\native
-perl -MExtUtils::Command::MM -e test_harness() t\*.t
-IF ERRORLEVEL 1 (
- echo [Perl reported error %ERRORLEVEL%]
- SET result=1
+ IF ERRORLEVEL 1 (
+ echo [Python tests exited with error !ERRORLEVEL!]
+ SET result=1
+ )
+
+) ELSE (
+ IF EXIST "%TESTDIR%\swig" rmdir /s /q "%TESTDIR%\swig"
+ mkdir "%TESTDIR%\swig\py-release\libsvn"
+ mkdir "%TESTDIR%\swig\py-release\svn"
+
+ xcopy "release\subversion\bindings\swig\python\*.pyd" "%TESTDIR%\swig\py-release\libsvn\*.pyd" > nul:
+ xcopy "release\subversion\bindings\swig\python\libsvn_swig_py\*.dll" "%TESTDIR%\swig\py-release\libsvn\*.dll" > nul:
+ xcopy "subversion\bindings\swig\python\*.py" "%TESTDIR%\swig\py-release\libsvn\*.py" > nul:
+ xcopy "subversion\bindings\swig\python\svn\*.py" "%TESTDIR%\swig\py-release\svn\*.py" > nul:
+
+ SET PYTHONPATH=%TESTDIR%\swig\py-release
+
+ python subversion\bindings\swig\python\tests\run_all.py
+ IF ERRORLEVEL 1 (
+ echo [Python tests exited with error !ERRORLEVEL!]
+ SET result=1
+ )
+)
+
+if "%SVN_BRANCH%" GTR "1.9." (
+
+ python win-tests.py -d -f fsfs --swig=perl "%TESTDIR%\tests"
+
+ IF ERRORLEVEL 1 (
+ echo [Perl tests exited with error !ERRORLEVEL!]
+ SET result=1
+ )
+
+) ELSE IF "%SVN_BRANCH%" GTR "1.8." (
+
+ mkdir "%TESTDIR%\swig\pl-debug\SVN"
+ mkdir "%TESTDIR%\swig\pl-debug\auto\SVN"
+ xcopy subversion\bindings\swig\perl\native\*.pm "%TESTDIR%\swig\pl-debug\SVN" > nul:
+ pushd debug\subversion\bindings\swig\perl\native
+ for %%i in (*.dll) do (
+ set name=%%i
+ mkdir "%TESTDIR%\swig\pl-debug\auto\SVN\!name:~0,-4!"
+ xcopy "!name:~0,-4!.*" "%TESTDIR%\swig\pl-debug\auto\SVN\!name:~0,-4!" > nul:
+ xcopy /y "_Core.dll" "%TESTDIR%\swig\pl-debug\auto\SVN\!name:~0,-4!" > nul:
+ )
+ popd
+
+
+ SET PERL5LIB=%PERL5LIB%;%TESTDIR%\swig\pl-debug;
+ pushd subversion\bindings\swig\perl\native
+ perl -MExtUtils::Command::MM -e "test_harness()" t\*.t
+ IF ERRORLEVEL 1 (
+ echo [Perl reported error !ERRORLEVEL!]
+ SET result=1
+ )
+ popd
+)
+
+if "%SVN_BRANCH%" GTR "1.9." (
+ python win-tests.py -d -f fsfs --swig=ruby "%TESTDIR%\tests"
+
+ IF ERRORLEVEL 1 (
+ echo [Ruby tests reported error !ERRORLEVEL!] (not fatal)
+ REM SET result=1
+ )
)
-popd
-
-IF "%SVN_BRANCH% LSS "1.9." (
- ECHO --- Building 1.8.x: Skipping ruby tests ---
- EXIT /B %result%
-)
-
-echo Not running ruby tests yet
-
exit /b %result%
Modified: subversion/branches/fsfs-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-build-bindings.cmd
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-build-bindings.cmd?rev=1506999&r1=1506998&r2=1506999&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-build-bindings.cmd (original)
+++ subversion/branches/fsfs-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-build-bindings.cmd Thu Jul 25 14:57:22 2013
@@ -23,17 +23,26 @@ SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDE
CALL ..\svn-config.cmd
IF ERRORLEVEL 1 EXIT /B 1
-IF "%SVN_BRANCH% LEQ "1.6.x" (
+IF "%SVN_BRANCH%" LEQ "1.6.x" (
ECHO --- Building 1.6.x: Skipping bindings ---
EXIT /B 0
)
-msbuild subversion_vcnet.sln /p:Configuration=Debug /p:Platform=win32 /t:__JAVAHL__ /t:__JAVAHL_TESTS__
-IF ERRORLEVEL 1 EXIT /B 1
+SET DEBUG_TARGETS=/t:__JAVAHL__ /t:__JAVAHL_TESTS__
+SET RELEASE_TARGETS=/t:__SWIG_PYTHON__
+
+if "%SVN_BRANCH%" GTR "1.8." (
+ SET DEBUG_TARGETS=%DEBUG_TARGETS% /t:__SWIG_PERL__
+)
-IF "%SVN_BRANCH%" GTR "1.9." (
- msbuild subversion_vcnet.sln /p:Configuration=Release /p:Platform=win32 /t:__SWIG_PYTHON__ /t:__SWIG_PERL__ /t:__SWIG_RUBY__
-) ELSE (
- msbuild subversion_vcnet.sln /p:Configuration=Release /p:Platform=win32 /t:__SWIG_PYTHON__ /t:__SWIG_PERL__
+if "%SVN_BRANCH%" GTR "1.9." (
+ SET DEBUG_TARGETS=%DEBUG_TARGETS% /t:__SWIG_RUBY__
)
+
+msbuild subversion_vcnet.sln /m /p:Configuration=Debug /p:Platform=win32 %DEBUG_TARGETS%
IF ERRORLEVEL 1 EXIT /B 1
+
+msbuild subversion_vcnet.sln /p:Configuration=Release /p:Platform=win32 %RELEASE_TARGETS%
+IF ERRORLEVEL 1 EXIT /B 1
+
+EXIT /B 0
\ No newline at end of file
Modified: subversion/branches/fsfs-improvements/win-tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/win-tests.py?rev=1506999&r1=1506998&r2=1506999&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/win-tests.py (original)
+++ subversion/branches/fsfs-improvements/win-tests.py Thu Jul 25 14:57:22 2013
@@ -111,6 +111,7 @@ sys.path.insert(0, os.path.join('build',
sys.path.insert(1, 'build')
import gen_win_dependencies
+import gen_base
version_header = os.path.join('subversion', 'include', 'svn_version.h')
cp = configparser.ConfigParser()
cp.read('gen-make.opts')
@@ -120,12 +121,6 @@ all_tests = gen_obj.test_progs + gen_obj
+ gen_obj.scripts + gen_obj.bdb_scripts
client_tests = [x for x in all_tests if x.startswith(CMDLINE_TEST_SCRIPT_PATH)]
-svn_dlls = []
-for section in gen_obj.sections.values():
- if section.options.get("msvc-export"):
- dll_basename = section.name + "-" + str(gen_obj.version) + ".dll"
- svn_dlls.append(os.path.join("subversion", section.name, dll_basename))
-
opts, args = my_getopt(sys.argv[1:], 'hrdvqct:pu:f:',
['release', 'debug', 'verbose', 'quiet', 'cleanup',
'test=', 'url=', 'svnserve-args=', 'fs-type=', 'asp.net-hack',
@@ -220,7 +215,7 @@ for opt, val in opts:
elif opt == '--javahl':
test_javahl = 1
elif opt == '--swig':
- if val not in ['ruby']:
+ if val not in ['perl', 'python', 'ruby']:
sys.stderr.write('Running \'%s\' swig tests not supported (yet).\n'
% (val,))
test_swig = val
@@ -297,12 +292,18 @@ def create_target_dir(dirname):
print("mkdir: %s" % tgt_dir)
os.makedirs(tgt_dir)
-def copy_changed_file(src, tgt):
+def copy_changed_file(src, tgt=None, to_dir=None, cleanup=True):
if not os.path.isfile(src):
print('Could not find ' + src)
sys.exit(1)
- if os.path.isdir(tgt):
- tgt = os.path.join(tgt, os.path.basename(src))
+
+ if to_dir and not tgt:
+ tgt = os.path.join(to_dir, os.path.basename(src))
+ elif not tgt or (tgt and to_dir):
+ raise RuntimeError("Using 'tgt' *or* 'to_dir' is required" % (tgt,))
+ elif tgt and os.path.isdir(tgt):
+ raise RuntimeError("'%s' is a directory. Use to_dir=" % (tgt,))
+
if os.path.exists(tgt):
assert os.path.isfile(tgt)
if filecmp.cmp(src, tgt):
@@ -314,24 +315,13 @@ def copy_changed_file(src, tgt):
print("copy: %s" % src)
print(" to: %s" % tgt)
shutil.copy(src, tgt)
- return 1
-def copy_execs(baton, dirname, names):
- copied_execs = baton
- for name in names:
- if not name.endswith('.exe'):
- continue
- src = os.path.join(dirname, name)
- tgt = os.path.join(abs_builddir, dirname, name)
- create_target_dir(dirname)
- if copy_changed_file(src, tgt):
- copied_execs.append(tgt)
+ if cleanup:
+ copied_execs.append(tgt)
def locate_libs():
"Move DLLs to a known location and set env vars"
- dlls = []
-
debug = (objdir == 'Debug')
for lib in gen_obj._libraries.values():
@@ -342,15 +332,18 @@ def locate_libs():
name, dir = lib.dll_name, lib.dll_dir
if name and dir:
- dlls.append(os.path.join(dir, name))
+ src = os.path.join(dir, name)
+ if os.path.exists(src):
+ copy_changed_file(src, to_dir=abs_builddir, cleanup=False)
- for dll in dlls:
- copy_changed_file(dll, abs_builddir)
# Copy the Subversion library DLLs
- if not cp.has_option('options', '--disable-shared'):
- for svn_dll in svn_dlls:
- copy_changed_file(os.path.join(abs_objdir, svn_dll), abs_builddir)
+ for i in gen_obj.graph.get_all_sources(gen_base.DT_INSTALL):
+ if isinstance(i, gen_base.TargetLib) and i.msvc_export:
+ src = os.path.join(abs_objdir, i.filename)
+ if os.path.isfile(src):
+ copy_changed_file(src, to_dir=abs_builddir,
+ cleanup=False)
# Copy the Apache modules
if run_httpd and cp.has_option('options', '--with-httpd'):
@@ -361,9 +354,9 @@ def locate_libs():
mod_dontdothat_path = os.path.join(abs_objdir, 'tools', 'server-side',
'mod_dontdothat', 'mod_dontdothat.so')
- copy_changed_file(mod_dav_svn_path, abs_builddir)
- copy_changed_file(mod_authz_svn_path, abs_builddir)
- copy_changed_file(mod_dontdothat_path, abs_builddir)
+ copy_changed_file(mod_dav_svn_path, to_dir=abs_builddir, cleanup=False)
+ copy_changed_file(mod_authz_svn_path, to_dir=abs_builddir, cleanup=False)
+ copy_changed_file(mod_dontdothat_path, to_dir=abs_builddir, cleanup=False)
os.environ['PATH'] = abs_builddir + os.pathsep + os.environ['PATH']
@@ -682,21 +675,17 @@ class Httpd:
print('Httpd.stop_daemon not implemented')
# Move the binaries to the test directory
+create_target_dir(abs_builddir)
locate_libs()
if create_dirs:
- old_cwd = os.getcwd()
- try:
- os.chdir(abs_objdir)
- baton = copied_execs
- for dirpath, dirs, files in os.walk('subversion'):
- copy_execs(baton, dirpath, files)
- for dirpath, dirs, files in os.walk('tools/server-side'):
- copy_execs(baton, dirpath, files)
- except:
- os.chdir(old_cwd)
- raise
- else:
- os.chdir(old_cwd)
+ for i in gen_obj.graph.get_all_sources(gen_base.DT_INSTALL):
+ if isinstance(i, gen_base.TargetExe):
+ src = os.path.join(abs_objdir, i.filename)
+
+ if os.path.isfile(src):
+ dst = os.path.join(abs_builddir, i.filename)
+ create_target_dir(os.path.dirname(dst))
+ copy_changed_file(src, dst)
# Create the base directory for Python tests
create_target_dir(CMDLINE_TEST_SCRIPT_NATIVE_PATH)
@@ -821,62 +810,121 @@ elif test_javahl:
print('[Test runner reported failure]')
failed = True
elif test_swig == 'perl':
- print('Running Swig Perl tests not supported yet')
+ failed = False
+ swig_dir = os.path.join(abs_builddir, 'swig')
+ swig_pl_dir = os.path.join(swig_dir, 'p5lib')
+ swig_pl_svn = os.path.join(swig_pl_dir, 'SVN')
+ swig_pl_auto_svn = os.path.join(swig_pl_dir, 'auto', 'SVN')
+
+ create_target_dir(swig_pl_svn)
+
+ for i in gen_obj.graph.get_all_sources(gen_base.DT_INSTALL):
+ if isinstance(i, gen_base.TargetSWIG) and i.lang == 'perl':
+ mod_dir = os.path.join(swig_pl_auto_svn, '_' + i.name[5:].capitalize())
+ create_target_dir(mod_dir)
+ copy_changed_file(os.path.join(abs_objdir, i.filename), to_dir=mod_dir)
+
+ elif isinstance(i, gen_base.TargetSWIGLib) and i.lang == 'perl':
+ copy_changed_file(os.path.join(abs_objdir, i.filename),
+ to_dir=abs_builddir)
- # TODO: Implement something like
-
- # mkdir "%TESTDIR%\swig\pl-release\SVN"
- # mkdir "%TESTDIR%\swig\pl-release\auto\SVN"
- # xcopy subversion\bindings\swig\perl\native\*.pm "%TESTDIR%\swig\pl-release\SVN" > nul:
- # pushd release\subversion\bindings\swig\perl\native
- # for %%i in (*.dll) do (
- # set name=%%i
- # mkdir "%TESTDIR%\swig\pl-release\auto\SVN\!name:~0,-4!"
- # xcopy "!name:~0,-4!.*" "%TESTDIR%\swig\pl-release\auto\SVN\!name:~0,-4!" > nul:
- # xcopy /y "_Core.dll" "%TESTDIR%\swig\pl-release\auto\SVN\!name:~0,-4!" > nul:
- # )
- # popd
- #
- # SET PERL5LIB=%PERL5LIB%;%TESTDIR%\swig\pl-release;
- # pushd subversion\bindings\swig\perl\native
- # perl -MExtUtils::Command::MM -e test_harness() t\*.t
- # IF ERRORLEVEL 1 (
- # echo [Perl reported error %ERRORLEVEL%]
- # SET result=1
- # )
- # popd
+ pm_src = os.path.join(abs_srcdir, 'subversion', 'bindings', 'swig', 'perl',
+ 'native')
+
+ tests = []
+
+ for root, dirs, files in os.walk(pm_src):
+ for name in files:
+ if name.endswith('.pm'):
+ fn = os.path.join(root, name)
+ copy_changed_file(fn, to_dir=swig_pl_svn)
+ elif name.endswith('.t'):
+ tests.append(os.path.relpath(os.path.join(root, name), pm_src))
+
+ perl5lib = swig_pl_dir
+ if 'PERL5LIB' in os.environ:
+ perl5lib += os.pathsep + os.environ['PERL5LIB']
+
+ perl_exe = 'perl.exe'
+
+ print('-- Running Swig Perl tests --')
+ old_cwd = os.getcwd()
+ try:
+ os.chdir(pm_src)
+
+ os.environ['PERL5LIB'] = perl5lib
+ os.environ["SVN_DBG_NO_ABORT_ON_ERROR_LEAK"] = 'YES'
+
+ r = subprocess.call([
+ perl_exe,
+ '-MExtUtils::Command::MM',
+ '-e', 'test_harness()'
+ ] + tests)
+ finally:
+ os.chdir(old_cwd)
+
+ if (r != 0):
+ print('[Test runner reported failure]')
+ failed = True
- failed = False
elif test_swig == 'python':
- print('Running Swig Python tests not supported yet')
-
- # TODO: Implement something like
-
- # IF EXIST "%TESTDIR%\swig" rmdir /s /q "%TESTDIR%\swig"
- # mkdir "%TESTDIR%\swig\py-release\libsvn"
- # mkdir "%TESTDIR%\swig\py-release\svn"
- #
- # xcopy "release\subversion\bindings\swig\python\*.pyd" "%TESTDIR%\swig\py-release\libsvn\*.pyd" > nul:
- # xcopy "release\subversion\bindings\swig\python\libsvn_swig_py\*.dll" "%TESTDIR%\swig\py-release\libsvn\*.dll" > nul:
- # xcopy "subversion\bindings\swig\python\*.py" "%TESTDIR%\swig\py-release\libsvn\*.py" > nul:
- # xcopy "subversion\bindings\swig\python\svn\*.py" "%TESTDIR%\swig\py-release\svn\*.py" > nul:
- #
- # SET PYTHONPATH=%TESTDIR%\swig\py-release
- #
- # python subversion\bindings\swig\python\tests\run_all.py
- # IF ERRORLEVEL 1 (
- # echo [Python reported error %ERRORLEVEL%]
- # SET result=1
- # )
-
failed = False
+ swig_dir = os.path.join(abs_builddir, 'swig')
+ swig_py_dir = os.path.join(swig_dir, 'pylib')
+ swig_py_libsvn = os.path.join(swig_py_dir, 'libsvn')
+ swig_py_svn = os.path.join(swig_py_dir, 'svn')
+
+ create_target_dir(swig_py_libsvn)
+ create_target_dir(swig_py_svn)
+
+ for i in gen_obj.graph.get_all_sources(gen_base.DT_INSTALL):
+ if (isinstance(i, gen_base.TargetSWIG)
+ or isinstance(i, gen_base.TargetSWIGLib)) and i.lang == 'python':
+
+ src = os.path.join(abs_objdir, i.filename)
+ copy_changed_file(src, to_dir=swig_py_libsvn)
+
+ py_src = os.path.join(abs_srcdir, 'subversion', 'bindings', 'swig', 'python')
+
+ for py_file in os.listdir(py_src):
+ if py_file.endswith('.py'):
+ copy_changed_file(os.path.join(py_src, py_file),
+ to_dir=swig_py_libsvn)
+
+ py_src_svn = os.path.join(py_src, 'svn')
+ for py_file in os.listdir(py_src_svn):
+ if py_file.endswith('.py'):
+ copy_changed_file(os.path.join(py_src_svn, py_file),
+ to_dir=swig_py_svn)
+
+ print('-- Running Swig Python tests --')
+
+ pythonpath = swig_py_dir
+ if 'PYTHONPATH' in os.environ:
+ pythonpath += os.pathsep + os.environ['PYTHONPATH']
+
+ python_exe = 'python.exe'
+ old_cwd = os.getcwd()
+ try:
+ os.environ['PYTHONPATH'] = pythonpath
+
+ r = subprocess.call([
+ python_exe,
+ os.path.join(py_src, 'tests', 'run_all.py')
+ ])
+ finally:
+ os.chdir(old_cwd)
+
+ if (r != 0):
+ print('[Test runner reported failure]')
+ failed = True
+
elif test_swig == 'ruby':
failed = False
if 'ruby' not in gen_obj._libraries:
print('Ruby not found. Skipping Ruby tests')
else:
- print('Running Swig Ruby Tests')
ruby_lib = gen_obj._libraries['ruby']
ruby_exe = 'ruby.exe'
@@ -887,11 +935,13 @@ elif test_swig == 'ruby':
'--verbose'
]
+ print('-- Running Swig Ruby tests --')
old_cwd = os.getcwd()
try:
os.chdir(ruby_subdir)
os.environ["BUILD_TYPE"] = objdir
+ os.environ["SVN_DBG_NO_ABORT_ON_ERROR_LEAK"] = 'YES'
r = subprocess.call([ruby_exe] + ruby_args)
finally:
os.chdir(old_cwd)
@@ -899,7 +949,6 @@ elif test_swig == 'ruby':
sys.stdout.flush()
sys.stderr.flush()
if (r != 0):
- print()
print('[Test runner reported failure]')
failed = True