You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2012/11/28 19:33:00 UTC
svn commit: r1414855 - in /subversion/branches/in-repo-authz: ./ Makefile.in
build.conf build/generator/gen_make.py configure.ac
subversion/bindings/cxxhl/ subversion/libsvn_client/merge.c
tools/client-side/svn-bench/null-list-cmd.c
Author: breser
Date: Wed Nov 28 18:32:58 2012
New Revision: 1414855
URL: http://svn.apache.org/viewvc?rev=1414855&view=rev
Log:
Sync the 'in-repo-authz' branch with recent trunk changes.
(Merged /subversion/trunk:r1414342-r1414853.)
Added:
subversion/branches/in-repo-authz/subversion/bindings/cxxhl/
- copied from r1414853, subversion/trunk/subversion/bindings/cxxhl/
Modified:
subversion/branches/in-repo-authz/ (props changed)
subversion/branches/in-repo-authz/Makefile.in
subversion/branches/in-repo-authz/build.conf
subversion/branches/in-repo-authz/build/generator/gen_make.py
subversion/branches/in-repo-authz/configure.ac
subversion/branches/in-repo-authz/subversion/libsvn_client/merge.c
subversion/branches/in-repo-authz/tools/client-side/svn-bench/null-list-cmd.c
Propchange: subversion/branches/in-repo-authz/
------------------------------------------------------------------------------
Merged /subversion/trunk:r1414569-1414853
Modified: subversion/branches/in-repo-authz/Makefile.in
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/Makefile.in?rev=1414855&r1=1414854&r2=1414855&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/Makefile.in (original)
+++ subversion/branches/in-repo-authz/Makefile.in Wed Nov 28 18:32:58 2012
@@ -156,6 +156,8 @@ CTYPES_PYTHON_SRC_DIR = $(abs_srcdir)/su
JAVAHL_JAR=subversion/bindings/javahl/svn-javahl.jar
JAVAHL_INCLUDES= @JNI_INCLUDES@ -I$(abs_builddir)/subversion/bindings/javahl/include
+CXXHL_INCLUDES = -I$(abs_srcdir)/subversion/bindings/cxxhl/include
+
SVN_APR_CONFIG = @SVN_APR_CONFIG@
SVN_APR_INCLUDES = @SVN_APR_INCLUDES@
SVN_APRUTIL_CONFIG = @SVN_APRUTIL_CONFIG@
@@ -196,6 +198,9 @@ COMPILE_JAVAHL_CXX = $(LIBTOOL) $(LTCXXF
COMPILE_JAVAHL_JAVAC = $(JAVAC) $(JAVAC_FLAGS)
COMPILE_JAVAHL_JAVAH = $(JAVAH)
+# special compilation for files destined for cxxhl
+COMPILE_CXXHL_CXX = $(LIBTOOL) $(LTCXXFLAGS) --mode=compile $(COMPILE_CXX) $(LT_CFLAGS) $(CXXHL_INCLUDES) -o $@ -c
+
LINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) $(LDFLAGS) -rpath $(libdir)
LINK_LIB = $(LINK) $(LT_SO_VERSION)
LINK_CXX = $(LIBTOOL) $(LTCXXFLAGS) --mode=link $(CXX) $(LT_LDFLAGS) $(CXXFLAGS) $(LDFLAGS) -rpath $(libdir)
Modified: subversion/branches/in-repo-authz/build.conf
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/build.conf?rev=1414855&r1=1414854&r2=1414855&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/build.conf (original)
+++ subversion/branches/in-repo-authz/build.conf Wed Nov 28 18:32:58 2012
@@ -38,6 +38,8 @@ private-includes =
subversion/include/private/*.h
subversion/bindings/swig/include/*.swg
subversion/libsvn_delta/compose_delta.c
+ subversion/bindings/cxxhl/include/*.h
+ subversion/bindings/cxxhl/include/types/*.h
private-built-includes =
subversion/svn_private_config.h
subversion/libsvn_fs_fs/rep-cache-db.h
@@ -623,6 +625,22 @@ link-cmd = $(LINK_JAVAHL_CXX)
# ----------------------------------------------------------------------------
#
+# C++HL targets
+#
+
+[libsvncxxhl]
+description = Subversion C++ HighLevel binding
+type = lib
+path = subversion/bindings/cxxhl
+libs = libsvn_repos libsvn_client libsvn_wc libsvn_ra libsvn_delta libsvn_diff
+ libsvn_subr libsvn_fs aprutil apriconv apr
+sources = src/*.cpp src/types/*.cpp
+install = cxxhl-lib
+compile-cmd = $(COMPILE_CXXHL_CXX)
+link-cmd = $(LINK_CXX_LIB)
+
+# ----------------------------------------------------------------------------
+#
# TESTING TARGETS
#
Modified: subversion/branches/in-repo-authz/build/generator/gen_make.py
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/build/generator/gen_make.py?rev=1414855&r1=1414854&r2=1414855&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/build/generator/gen_make.py (original)
+++ subversion/branches/in-repo-authz/build/generator/gen_make.py Wed Nov 28 18:32:58 2012
@@ -423,8 +423,9 @@ class Generator(gen_base.GeneratorBase):
# certain areas require hooks for extra install rules defined
# in Makefile.in
### we should turn AREA into an object, then test it instead of this
- if area[:5] == 'swig-' and area[-4:] != '-lib' or \
- area[:7] == 'javahl-' \
+ if area[:5] == 'swig-' and area[-4:] != '-lib' \
+ or area[:7] == 'javahl-' \
+ or area[:6] == 'cxxhl-' \
or area == 'tools':
ezt_area.extra_install = 'yes'
Modified: subversion/branches/in-repo-authz/configure.ac
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/configure.ac?rev=1414855&r1=1414854&r2=1414855&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/configure.ac (original)
+++ subversion/branches/in-repo-authz/configure.ac Wed Nov 28 18:32:58 2012
@@ -988,7 +988,7 @@ AS_HELP_STRING([--enable-maintainer-mode
dnl Enable some extra warnings. Put these before the user's flags
dnl so the user can specify flags that override these.
CFLAGS="-Wpointer-arith -Wwrite-strings -Wshadow -ansi -Wall -Wformat=2 -Wunused -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wno-multichar -Wredundant-decls -Wnested-externs -Wunreachable-code -Winline -Wno-long-long $CFLAGS"
- CXXFLAGS="-Wpointer-arith -Wwrite-strings -Wshadow $CXXFLAGS"
+ CXXFLAGS="-Wpointer-arith -Wwrite-strings -Wshadow -ansi -Wall $CXXFLAGS"
dnl some additional flags that can be handy for an occasional review,
dnl but throw too many warnings in svn code, of too little importance,
@@ -996,7 +996,7 @@ AS_HELP_STRING([--enable-maintainer-mode
dnl switches enabled.
dnl CFLAGS="-Wswitch-enum -Wswitch-default $CFLAGS"
- dnl Add each of the following flags only if the compiler accepts it.
+ dnl Add each of the following flags only if the C compiler accepts it.
CFLAGS_KEEP="$CFLAGS"
AC_LANG_PUSH([C])
@@ -1026,6 +1026,23 @@ AS_HELP_STRING([--enable-maintainer-mode
AC_LANG_POP([C])
CFLAGS="$CFLAGS_KEEP"
+
+ dnl Add each of the following flags only if the C++ compiler accepts it.
+
+ CXXFLAGS_KEEP="$CXXFLAGS"
+ AC_LANG_PUSH([C++])
+
+ CXXFLAGS="-Wextra-tokens $CXXFLAGS_KEEP"
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[]])], [CXXFLAGS_KEEP="$CXXFLAGS"])
+
+ CXXFLAGS="-Wshorten-64-to-32 $CXXFLAGS_KEEP"
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[]])], [CXXFLAGS_KEEP="$CXXFLAGS"])
+
+ CXXFLAGS="-Wno-system-headers $CXXFLAGS_KEEP"
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[]])], [CXXFLAGS_KEEP="$CXXFLAGS"])
+
+ AC_LANG_POP([C++])
+ CXXFLAGS="$CXXFLAGS_KEEP"
fi
fi
])
Modified: subversion/branches/in-repo-authz/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/subversion/libsvn_client/merge.c?rev=1414855&r1=1414854&r2=1414855&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/subversion/libsvn_client/merge.c (original)
+++ subversion/branches/in-repo-authz/subversion/libsvn_client/merge.c Wed Nov 28 18:32:58 2012
@@ -260,9 +260,6 @@ typedef struct merge_cmd_baton_t {
SOURCES_ANCESTRAL is FALSE. */
svn_boolean_t reintegrate_merge; /* Whether this is a --reintegrate
merge or not. */
- const char *added_path; /* Set to the dir path whenever the
- dir is added as a child of a
- versioned dir (dry-run only) */
const merge_target_t *target; /* Description of merge target node */
/* The left and right URLs and revs. The value of this field changes to
@@ -490,6 +487,35 @@ dry_run_added_p(const merge_cmd_baton_t
APR_HASH_KEY_STRING) != NULL);
}
+/* Return true iff we're in dry-run mode and a parent of EDIT_RELPATH
+ would have been added by now if we weren't in dry-run mode.
+ Used to avoid spurious notifications (e.g. conflicts) from a merge
+ attempt into an existing target which would have been deleted if we
+ weren't in dry_run mode (issue #2584). Assumes that WCPATH is
+ still versioned (e.g. has an associated entry). */
+static svn_boolean_t
+dry_run_added_parent_p(const merge_cmd_baton_t *merge_b,
+ const char *edit_relpath,
+ apr_pool_t *scratch_pool)
+{
+ int i;
+ const char *abspath;
+
+ if (!merge_b->dry_run)
+ return FALSE;
+
+ abspath = svn_dirent_join(merge_b->target->abspath, edit_relpath,
+ scratch_pool);
+ for (i = 0; i < (svn_path_component_count(edit_relpath) - 1); i++)
+ {
+ abspath = svn_dirent_dirname(abspath, scratch_pool);
+ if (apr_hash_get(merge_b->dry_run_added, abspath,
+ APR_HASH_KEY_STRING))
+ return TRUE;
+ }
+ return FALSE;
+}
+
/* Return whether any WC path was put in conflict by the merge
operation corresponding to MERGE_B. */
static APR_INLINE svn_boolean_t
@@ -1857,8 +1883,8 @@ merge_file_added(svn_wc_notify_state_t *
if (obstr_state != svn_wc_notify_state_inapplicable)
{
- if (merge_b->dry_run && merge_b->added_path
- && svn_dirent_is_child(merge_b->added_path, mine_abspath, NULL))
+ if (merge_b->dry_run
+ && dry_run_added_parent_p(merge_b, mine_relpath, scratch_pool))
{
if (content_state)
*content_state = svn_wc_notify_state_changed;
@@ -2337,13 +2363,15 @@ merge_dir_added(svn_wc_notify_state_t *s
if (obstr_state != svn_wc_notify_state_inapplicable)
{
- if (state && merge_b->dry_run && merge_b->added_path
- && svn_dirent_is_child(merge_b->added_path, local_abspath, NULL))
+ if (state && merge_b->dry_run
+ && dry_run_added_parent_p(merge_b, local_relpath, scratch_pool))
{
*state = svn_wc_notify_state_changed;
}
else if (state)
- *state = obstr_state;
+ {
+ *state = obstr_state;
+ }
return SVN_NO_ERROR;
}
@@ -2358,9 +2386,10 @@ merge_dir_added(svn_wc_notify_state_t *s
/* Unversioned or schedule-delete */
if (merge_b->dry_run)
{
- merge_b->added_path = apr_pstrdup(merge_b->pool, local_abspath);
- apr_hash_set(merge_b->dry_run_added, merge_b->added_path,
- APR_HASH_KEY_STRING, merge_b->added_path);
+ const char *added_path = apr_pstrdup(merge_b->pool,
+ local_abspath);
+ apr_hash_set(merge_b->dry_run_added, added_path,
+ APR_HASH_KEY_STRING, added_path);
}
else
{
@@ -2385,15 +2414,22 @@ merge_dir_added(svn_wc_notify_state_t *s
/* The dir is not known to Subversion, or is schedule-delete.
* We will make it schedule-add. */
if (!merge_b->dry_run)
- SVN_ERR(svn_wc_add4(merge_b->ctx->wc_ctx, local_abspath,
- svn_depth_infinity,
- copyfrom_url, copyfrom_rev,
- merge_b->ctx->cancel_func,
- merge_b->ctx->cancel_baton,
- NULL, NULL, /* no notification func! */
- scratch_pool));
+ {
+ SVN_ERR(svn_wc_add4(merge_b->ctx->wc_ctx, local_abspath,
+ svn_depth_infinity,
+ copyfrom_url, copyfrom_rev,
+ merge_b->ctx->cancel_func,
+ merge_b->ctx->cancel_baton,
+ NULL, NULL, /* no notification func! */
+ scratch_pool));
+ }
else
- merge_b->added_path = apr_pstrdup(merge_b->pool, local_abspath);
+ {
+ const char *added_path = apr_pstrdup(merge_b->pool,
+ local_abspath);
+ apr_hash_set(merge_b->dry_run_added, added_path,
+ APR_HASH_KEY_STRING, added_path);
+ }
if (state)
*state = svn_wc_notify_state_changed;
}
@@ -2431,9 +2467,6 @@ merge_dir_added(svn_wc_notify_state_t *s
}
break;
case svn_node_file:
- if (merge_b->dry_run)
- merge_b->added_path = NULL;
-
if (is_versioned && dry_run_deleted_p(merge_b, local_abspath))
{
/* ### TODO: Retain record of this dir being added to
@@ -2455,8 +2488,6 @@ merge_dir_added(svn_wc_notify_state_t *s
}
break;
default:
- if (merge_b->dry_run)
- merge_b->added_path = NULL;
if (state)
*state = svn_wc_notify_state_unknown;
break;
@@ -9163,7 +9194,6 @@ do_merge(apr_hash_t **modified_subtrees,
be reset for each merge source iteration. */
merge_cmd_baton.merge_source = *source;
merge_cmd_baton.implicit_src_gap = NULL;
- merge_cmd_baton.added_path = NULL;
merge_cmd_baton.add_necessitated_merge = FALSE;
merge_cmd_baton.dry_run_deletions =
dry_run ? apr_hash_make(iterpool) : NULL;
Modified: subversion/branches/in-repo-authz/tools/client-side/svn-bench/null-list-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/in-repo-authz/tools/client-side/svn-bench/null-list-cmd.c?rev=1414855&r1=1414854&r2=1414855&view=diff
==============================================================================
--- subversion/branches/in-repo-authz/tools/client-side/svn-bench/null-list-cmd.c (original)
+++ subversion/branches/in-repo-authz/tools/client-side/svn-bench/null-list-cmd.c Wed Nov 28 18:32:58 2012
@@ -48,7 +48,7 @@ struct print_baton {
svn_client_ctx_t *ctx;
};
-/* This implements the svn_client_list_func_t API, printing a single
+/* This implements the svn_client_list_func2_t API, printing a single
directory entry in text format. */
static svn_error_t *
print_dirent(void *baton,
@@ -56,6 +56,8 @@ print_dirent(void *baton,
const svn_dirent_t *dirent,
const svn_lock_t *lock,
const char *abs_path,
+ const char *external_parent_url,
+ const char *external_target,
apr_pool_t *pool)
{
struct print_baton *pb = baton;
@@ -123,11 +125,12 @@ svn_cl__null_list(apr_getopt_t *os,
SVN_ERR(svn_opt_parse_path(&peg_revision, &truepath, target,
subpool));
- err = svn_client_list2(truepath, &peg_revision,
+ err = svn_client_list3(truepath, &peg_revision,
&(opt_state->start_revision),
opt_state->depth,
dirent_fields,
opt_state->verbose,
+ FALSE, /* include externals */
print_dirent,
&pb, ctx, subpool);