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 2012/09/27 14:13:39 UTC
svn commit: r1390960 [1/2] - in /subversion/branches/10Gb: ./ build/
build/ac-macros/ build/generator/templates/ subversion/bindings/swig/
subversion/bindings/swig/perl/native/
subversion/bindings/swig/python/libsvn_swig_py/
subversion/bindings/swig/py...
Author: stefan2
Date: Thu Sep 27 12:13:36 2012
New Revision: 1390960
URL: http://svn.apache.org/viewvc?rev=1390960&view=rev
Log:
On the 10Gb branch: Ketchup merge from /trunk up to revision 1390956.
Added:
subversion/branches/10Gb/tools/server-side/fsfs-reorg.c
- copied unchanged from r1390956, subversion/trunk/tools/server-side/fsfs-reorg.c
Removed:
subversion/branches/10Gb/tools/fsfs/
Modified:
subversion/branches/10Gb/ (props changed)
subversion/branches/10Gb/CHANGES
subversion/branches/10Gb/COMMITTERS
subversion/branches/10Gb/build.conf
subversion/branches/10Gb/build/ac-macros/berkeley-db.m4
subversion/branches/10Gb/build/generator/templates/svn_locale.vcproj.ezt
subversion/branches/10Gb/build/generator/templates/svn_locale.vcxproj.ezt
subversion/branches/10Gb/build/run_tests.py
subversion/branches/10Gb/subversion/bindings/swig/perl/native/ (props changed)
subversion/branches/10Gb/subversion/bindings/swig/perl/native/Makefile.PL.in
subversion/branches/10Gb/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
subversion/branches/10Gb/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h
subversion/branches/10Gb/subversion/bindings/swig/python/svn/delta.py
subversion/branches/10Gb/subversion/bindings/swig/svn_delta.i
subversion/branches/10Gb/subversion/include/private/svn_client_private.h
subversion/branches/10Gb/subversion/include/svn_dav.h
subversion/branches/10Gb/subversion/libsvn_client/client.h
subversion/branches/10Gb/subversion/libsvn_client/commit.c
subversion/branches/10Gb/subversion/libsvn_client/merge.c
subversion/branches/10Gb/subversion/libsvn_client/mergeinfo.c
subversion/branches/10Gb/subversion/libsvn_fs_base/tree.c
subversion/branches/10Gb/subversion/libsvn_fs_fs/caching.c
subversion/branches/10Gb/subversion/libsvn_fs_fs/tree.c
subversion/branches/10Gb/subversion/libsvn_ra_serf/commit.c
subversion/branches/10Gb/subversion/libsvn_ra_serf/update.c
subversion/branches/10Gb/subversion/libsvn_ra_serf/util.c
subversion/branches/10Gb/subversion/libsvn_ra_svn/client.c
subversion/branches/10Gb/subversion/libsvn_ra_svn/editorp.c
subversion/branches/10Gb/subversion/libsvn_ra_svn/marshal.c
subversion/branches/10Gb/subversion/libsvn_repos/delta.c
subversion/branches/10Gb/subversion/libsvn_repos/reporter.c
subversion/branches/10Gb/subversion/libsvn_wc/conflicts.h
subversion/branches/10Gb/subversion/libsvn_wc/lock.c
subversion/branches/10Gb/subversion/libsvn_wc/update_editor.c
subversion/branches/10Gb/subversion/libsvn_wc/wc_db_wcroot.c
subversion/branches/10Gb/subversion/mod_dav_svn/repos.c
subversion/branches/10Gb/subversion/svn/cl.h
subversion/branches/10Gb/subversion/svn/conflict-callbacks.c
subversion/branches/10Gb/subversion/svn/log-cmd.c
subversion/branches/10Gb/subversion/svn/main.c
subversion/branches/10Gb/subversion/svn/merge-cmd.c
subversion/branches/10Gb/subversion/svn/mergeinfo-cmd.c
subversion/branches/10Gb/subversion/svn/notify.c
subversion/branches/10Gb/subversion/svn/resolve-cmd.c
subversion/branches/10Gb/subversion/svn/status-cmd.c
subversion/branches/10Gb/subversion/svn/switch-cmd.c
subversion/branches/10Gb/subversion/svn/update-cmd.c
subversion/branches/10Gb/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout
subversion/branches/10Gb/subversion/tests/cmdline/log_tests.py
subversion/branches/10Gb/subversion/tests/cmdline/mergeinfo_tests.py
subversion/branches/10Gb/subversion/tests/cmdline/patch_tests.py
subversion/branches/10Gb/subversion/tests/cmdline/stat_tests.py
subversion/branches/10Gb/subversion/tests/cmdline/svntest/actions.py
subversion/branches/10Gb/subversion/tests/cmdline/svntest/main.py
subversion/branches/10Gb/tools/dev/unix-build/Makefile.svn
subversion/branches/10Gb/tools/dist/make-deps-tarball.sh (props changed)
subversion/branches/10Gb/tools/server-side/ (props changed)
subversion/branches/10Gb/tools/server-side/svnpubsub/svnwcsub.py
Propchange: subversion/branches/10Gb/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Thu Sep 27 12:13:36 2012
@@ -37,6 +37,7 @@ subversion_msvc.plg
subversion_vcnet.sln
subversion_vcnet.ncb
subversion_vcnet.suo
+subversion_vcnet.v11.suo
subversion_vcnet.sdf
subversion_vcnet.opensdf
mkmf.log
Propchange: subversion/branches/10Gb/
------------------------------------------------------------------------------
Merged /subversion/trunk:r1387980-1390956
Modified: subversion/branches/10Gb/CHANGES
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/CHANGES?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/CHANGES (original)
+++ subversion/branches/10Gb/CHANGES Thu Sep 27 12:13:36 2012
@@ -25,8 +25,7 @@ http://svn.apache.org/repos/asf/subversi
* 'svn diff' can compare arbitrary files and directories (r1310291, et al)
* ra_serf avoids re-downloading content present in pristine store (r1333936)
* 'svn mergeinfo' now honors the --revision (-r) option (issue #4199)
- * new --search and --isearch options for 'svn log' (r1354666, -830)
- * new --search-and and --isearch-and options for 'svn log' (r1383518)
+ * new --search and --search-and options for 'svn log' (r1354666, -83518)
* new built-in interactive text conflict merge tool (r1357864, et al)
* new 'svn --version --verbose' option shows runtime environment info
* new 'svnadmin freeze' subcommand (r1376228)
@@ -49,7 +48,7 @@ http://svn.apache.org/repos/asf/subversi
* fix inconsistent handling of log revs without changed paths (issue #3694)
- Bindings:
- *
+ * star-imports in swig-py only import 'svn_*' symbols (r1303375)
Version 1.7.6
Modified: subversion/branches/10Gb/COMMITTERS
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/COMMITTERS?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/COMMITTERS [UTF-8] (original)
+++ subversion/branches/10Gb/COMMITTERS [UTF-8] Thu Sep 27 12:13:36 2012
@@ -55,7 +55,7 @@ Blanket commit access:
jwhitlock Jeremy Whitlock <jc...@gmail.com>
sbutler Stephen Butler <sb...@elego.de>
dannas Daniel Näslund <da...@dannas.name>
- stefan2 Stefan Fuhrmann <st...@alice-dsl.de>
+ stefan2 Stefan Fuhrmann <st...@wandisco.com>
jcorvel Johan Corveleyn <jc...@gmail.com>
trent Trent Nelson <tr...@snakebite.org>
Modified: subversion/branches/10Gb/build.conf
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/build.conf?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/build.conf (original)
+++ subversion/branches/10Gb/build.conf Thu Sep 27 12:13:36 2012
@@ -1180,7 +1180,7 @@ libs = __ALL__
ra-local-test
svndiff-test vdelta-test
entries-dump atomic-ra-revprop-change wc-lock-tester wc-incomplete-tester
- diff diff3 diff4 reorg-fsfs svn-bench
+ diff diff3 diff4 fsfs-reorg svn-bench
client-test
conflict-data-test db-test pristine-store-test entries-compat-test
op-depth-test dirent_uri-test wc-queries-test
@@ -1229,10 +1229,10 @@ libs = __JAVAHL__ javahl-tests javahl-co
# ----------------------------------------------------------------------------
# Contrib and tools
-[reorg-fsfs]
+[fsfs-reorg]
type = exe
-path = tools/fsfs
-sources = reorg.c
+path = tools/server-side
+sources = fsfs-reorg.c
install = tools
libs = libsvn_delta libsvn_subr apr
@@ -1261,7 +1261,8 @@ libs = libsvn_diff libsvn_subr apriconv
type = exe
path = tools/client-side/svn-bench
install = tools
-libs = libsvn_client libsvn_wc libsvn_ra libsvn_subr apriconv apr
+libs = libsvn_client libsvn_wc libsvn_ra libsvn_subr libsvn_delta
+ apriconv apr
[svnauthz-validate]
description = Authz config file validator
Modified: subversion/branches/10Gb/build/ac-macros/berkeley-db.m4
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/build/ac-macros/berkeley-db.m4?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/build/ac-macros/berkeley-db.m4 (original)
+++ subversion/branches/10Gb/build/ac-macros/berkeley-db.m4 Thu Sep 27 12:13:36 2012
@@ -175,13 +175,24 @@ AC_DEFUN(SVN_LIB_BERKELEY_DB_TRY,
svn_check_berkeley_db_minor=$2
svn_check_berkeley_db_patch=$3
- # Extract only the -ldb.* flag from the libs supplied by apu-config
- # Otherwise we get bit by the fact that expat might not be built yet
- # Or that it resides in a non-standard location which we would have
- # to compensate with using something like -R`$apu_config --prefix`/lib.
- #
- if test -z "$SVN_DB_LIBS"; then
- SVN_DB_LIBS=["`$apu_config --libs | $SED -e 's/.*\(-ldb[^[:space:]]*\).*/\1/' | $EGREP -- '-ldb[^[:space:]]*'`"]
+ if test -z "$SVN_DB_LIBS"; then
+ # We pass --dbm-libs here since Debian has modified apu-config not
+ # to return -ldb unless --dbm-libs is passed. This may also produce
+ # extra output beyond -ldb but since we're only filtering for -ldb
+ # it won't matter to us. However, --dbm-libs was added to apu-config
+ # in 1.3.8 so it's possible the version we have doesn't support it
+ # so fallback without it if we get an error.
+ svn_db_libs_prefiltered=["`$apu_config --libs --dbm-libs`"]
+ if test $? -ne 0; then
+ svn_db_libs_prefiltered=["`$apu_config --libs`"]
+ fi
+
+ # Extract only the -ldb.* flag from the libs supplied by apu-config
+ # Otherwise we get bit by the fact that expat might not be built yet
+ # Or that it resides in a non-standard location which we would have
+ # to compensate with using something like -R`$apu_config --prefix`/lib.
+ #
+ SVN_DB_LIBS=["`echo \"$svn_db_libs_prefiltered\" | $SED -e 's/.*\(-ldb[^[:space:]]*\).*/\1/' | $EGREP -- '-ldb[^[:space:]]*'`"]
fi
CPPFLAGS="$SVN_DB_INCLUDES $SVN_APRUTIL_INCLUDES $CPPFLAGS"
Modified: subversion/branches/10Gb/build/generator/templates/svn_locale.vcproj.ezt
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/build/generator/templates/svn_locale.vcproj.ezt?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/build/generator/templates/svn_locale.vcproj.ezt (original)
+++ subversion/branches/10Gb/build/generator/templates/svn_locale.vcproj.ezt Thu Sep 27 12:13:36 2012
@@ -31,9 +31,9 @@
<Configurations>
[for platforms][for configs] <Configuration
Name="[configs]|[platforms]"
- OutputDirectory="..\..\[configs]\mo"
+ OutputDirectory="..\..\..\[configs]\mo"
BuildLogFile="$(IntDir)\BuildLog_$(ProjectName).htm"
- IntermediateDirectory="..\..\[configs]\mo"
+ IntermediateDirectory="..\..\..\[configs]\mo"
ConfigurationType="0"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
Modified: subversion/branches/10Gb/build/generator/templates/svn_locale.vcxproj.ezt
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/build/generator/templates/svn_locale.vcxproj.ezt?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/build/generator/templates/svn_locale.vcxproj.ezt (original)
+++ subversion/branches/10Gb/build/generator/templates/svn_locale.vcxproj.ezt Thu Sep 27 12:13:36 2012
@@ -44,8 +44,8 @@
</ImportGroup>
[end][end] <PropertyGroup Label="UserMacros" />
<PropertyGroup>
-[for configs][for platforms] <OutDir Condition="'$(Configuration)|$(Platform)'=='[configs]|[platforms]'">..\..\[configs]\mo\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='[configs]|[platforms]'">..\..\[configs]\mo\</IntDir>
+[for configs][for platforms] <OutDir Condition="'$(Configuration)|$(Platform)'=='[configs]|[platforms]'">..\..\..\[configs]\mo\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='[configs]|[platforms]'">..\..\..\[configs]\mo\</IntDir>
<NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='[configs]|[platforms]'">cmd /c build_locale.bat [configs]</NMakeBuildCommandLine>
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='[configs]|[platforms]'">cmd /c build_locale.bat [configs]</NMakeReBuildCommandLine>
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='[configs]|[platforms]'">cmd /c del $(OutDir)*.mo</NMakeCleanCommandLine>
Modified: subversion/branches/10Gb/build/run_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/build/run_tests.py?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/build/run_tests.py (original)
+++ subversion/branches/10Gb/build/run_tests.py Thu Sep 27 12:13:36 2012
@@ -45,7 +45,7 @@ separated list of test numbers; the defa
# A few useful constants
SVN_VER_MINOR = 8
-import os, re, subprocess, sys, imp
+import os, re, subprocess, sys, imp, threading
from datetime import datetime
import getopt
@@ -490,17 +490,23 @@ class TestHarness:
os.dup2(self.log.fileno(), sys.stdout.fileno())
os.dup2(self.log.fileno(), sys.stderr.fileno())
- # This has to be class-scoped for use in the progress_func()
+ # These have to be class-scoped for use in the progress_func()
self.dots_written = 0
+ self.progress_lock = threading.Lock()
def progress_func(completed, total):
- if not self.log or self.dots_written >= dot_count:
+ """Report test suite progress. Can be called from multiple threads
+ in parallel mode."""
+ if not self.log:
return
dots = (completed * dot_count) / total
if dots > dot_count:
dots = dot_count
- dots_to_write = dots - self.dots_written
- os.write(old_stdout, '.' * dots_to_write)
- self.dots_written = dots
+ self.progress_lock.acquire()
+ if self.dots_written < dot_count:
+ dots_to_write = dots - self.dots_written
+ self.dots_written = dots
+ os.write(old_stdout, '.' * dots_to_write)
+ self.progress_lock.release()
serial_only = hasattr(prog_mod, 'serial_only') and prog_mod.serial_only
Propchange: subversion/branches/10Gb/subversion/bindings/swig/perl/native/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Thu Sep 27 12:13:36 2012
@@ -1,31 +1,32 @@
-ra_plugin.hi
-svn_fs.c
-_Client.bs
-ra_reporter.hi
-Makefile.wc
+MYMETA.yml
+Makefile
+Makefile.PL
Makefile.client
+Makefile.delta
+Makefile.fs
+Makefile.old
+Makefile.ra
+Makefile.repos
+Makefile.wc
+_Client.bs
_Core.bs
-_Repos.bs
-svn_repos.c
-svn_delta.c
-_Ra.bs
-modules
-core.c
+_Delta.bs
_Fs.bs
+_Ra.bs
+_Repos.bs
_Wc.bs
-Makefile
-Makefile.ra
-svn_wc.c
-Makefile.fs
-svn_client.c
-_Delta.bs
-delta_editor.hi
-Makefile.repos
-Makefile.delta
-pm_to_blib
blib
-svn_ra.c
-Makefile.old
blibdirs
-Makefile.PL
+core.c
+delta_editor.hi
+modules
+pm_to_blib
+ra_plugin.hi
+ra_reporter.hi
+svn_client.c
+svn_delta.c
svn_diff.c
+svn_fs.c
+svn_ra.c
+svn_repos.c
+svn_wc.c
Modified: subversion/branches/10Gb/subversion/bindings/swig/perl/native/Makefile.PL.in
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/subversion/bindings/swig/perl/native/Makefile.PL.in?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/subversion/bindings/swig/perl/native/Makefile.PL.in (original)
+++ subversion/branches/10Gb/subversion/bindings/swig/perl/native/Makefile.PL.in Thu Sep 27 12:13:36 2012
@@ -49,6 +49,11 @@ my $cppflags = '@CPPFLAGS@';
my $cflags = '@CFLAGS@';
my $includes = '@SVN_APR_INCLUDES@ @SVN_APRUTIL_INCLUDES@';
+# Avoid this bug in SWIG:
+# https://sourceforge.net/tracker/?func=detail&aid=3571361&group_id=1645&atid=101645
+# SWIG is using C++ style comments in an extern "C" code.
+$cflags =~ s/-ansi\s+//g;
+
# According to the log of r7937, the flags guarded by the conditional break
# the build on FreeBSD if not conditionalized.
my $apr_ldflags = '@SVN_APR_LIBS@'
Modified: subversion/branches/10Gb/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c (original)
+++ subversion/branches/10Gb/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c Thu Sep 27 12:13:36 2012
@@ -2159,6 +2159,24 @@ svn_swig_py_make_stream(PyObject *py_io,
return stream;
}
+PyObject *
+svn_swig_py_convert_txdelta_op_c_array(int num_ops,
+ svn_txdelta_op_t *ops,
+ swig_type_info *op_type_info,
+ PyObject *parent_pool)
+{
+ PyObject *result = PyList_New(num_ops);
+ int i;
+
+ if (!result) return NULL;
+
+ for (i = 0; i < num_ops; ++i)
+ PyList_SET_ITEM(result, i,
+ svn_swig_NewPointerObj(ops + i, op_type_info,
+ parent_pool, NULL));
+
+ return result;
+}
void svn_swig_py_notify_func(void *baton,
const char *path,
@@ -4173,19 +4191,3 @@ svn_swig_py_setup_wc_diff_callbacks2(voi
callbacks->dir_props_changed = wc_diff_callbacks2_dir_props_changed;
return callbacks;
}
-
-PyObject *
-svn_swig_py_txdelta_window_t_ops_get(svn_txdelta_window_t *window,
- swig_type_info * op_type_info,
- PyObject *window_pool)
-{
- PyObject *result = PyList_New(window->num_ops);
- int i;
-
- for (i = 0; i < window->num_ops; ++i)
- PyList_SET_ITEM(result, i,
- svn_swig_NewPointerObj(window->ops + i, op_type_info,
- window_pool, NULL));
-
- return result;
-}
Modified: subversion/branches/10Gb/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h (original)
+++ subversion/branches/10Gb/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h Thu Sep 27 12:13:36 2012
@@ -299,6 +299,15 @@ SVN_SWIG_SWIGUTIL_EXPORT
svn_stream_t *svn_swig_py_make_stream(PyObject *py_io,
apr_pool_t *pool);
+/* Convert ops, a C array of num_ops elements, to a Python list of SWIG
+ objects with descriptor op_type_info and pool set to parent_pool. */
+SVN_SWIG_SWIGUTIL_EXPORT
+PyObject *
+svn_swig_py_convert_txdelta_op_c_array(int num_ops,
+ svn_txdelta_op_t *ops,
+ swig_type_info * op_type_info,
+ PyObject *parent_pool);
+
/* a notify function that executes a Python function that is passed in
via the baton argument */
SVN_SWIG_SWIGUTIL_EXPORT
@@ -520,17 +529,6 @@ svn_error_t *svn_swig_py_ra_lock_callbac
SVN_SWIG_SWIGUTIL_EXPORT
extern const svn_ra_reporter2_t swig_py_ra_reporter2;
-/* Get a list of ops from a window. Used to replace the naive
- svn_txdelta_window_t.ops accessor. op_type_info is supposed to be
- the SWIG descriptor of "svn_txdelta_op_t *". window_pool is supposed
- to be the pool associated with the window proxy and used for wrapping
- the op objects. */
-SVN_SWIG_SWIGUTIL_EXPORT
-PyObject *
-svn_swig_py_txdelta_window_t_ops_get(svn_txdelta_window_t *window,
- swig_type_info * op_type_info,
- PyObject *window_pool);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
Modified: subversion/branches/10Gb/subversion/bindings/swig/python/svn/delta.py
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/subversion/bindings/swig/python/svn/delta.py?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/subversion/bindings/swig/python/svn/delta.py (original)
+++ subversion/branches/10Gb/subversion/bindings/swig/python/svn/delta.py Thu Sep 27 12:13:36 2012
@@ -30,10 +30,6 @@ _unprefix_names(locals(), 'svn_txdelta_'
__all__ = filter(lambda x: x.lower().startswith('svn_'), locals().keys())
del _unprefix_names
-# Force our accessor since it appears that there isn't a more civilized way
-# to make SWIG use it.
-svn_txdelta_window_t.ops = property(svn_txdelta_window_t_ops_get)
-
class Editor:
def set_target_revision(self, target_revision, pool=None):
Modified: subversion/branches/10Gb/subversion/bindings/swig/svn_delta.i
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/subversion/bindings/swig/svn_delta.i?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/subversion/bindings/swig/svn_delta.i (original)
+++ subversion/branches/10Gb/subversion/bindings/swig/svn_delta.i Thu Sep 27 12:13:36 2012
@@ -174,61 +174,47 @@ svn_txdelta_window_t_ops_get(svn_txdelta
#ifdef SWIGPYTHON
%ignore svn_txdelta_window_t::ops;
-%inline %{
-static PyObject *
-svn_txdelta_window_t_ops_get(PyObject *window_ob)
+%extend svn_txdelta_window_t {
+
+void _ops_get(int *num_ops, svn_txdelta_op_t **ops)
{
- void *window;
- PyObject *ops_list, *window_pool;
- int status;
-
- /* Kludge alert!
- Normally, these kinds of conversions would belong in a typemap.
- However, typemaps won't allow us to change the result type to an array,
- so we have to make this custom accessor function.
- A cleaner approach would be to use something like:
-
- %extend svn_txdelta_window_t { void get_ops(apr_array_header_t ** ops); }
-
- But that means unnecessary copying, plus more hacks to get the pool for the
- array and for wrapping the individual op objects. So we just don't bother.
- */
+ *num_ops = self->num_ops;
+ *ops = self->ops;
+}
+
+%pythoncode {
+ ops = property(_ops_get)
+}
+}
+
+%typemap(argout) (int *num_ops, svn_txdelta_op_t **ops) {
+ apr_pool_t *parent_pool;
+ PyObject *parent_py_pool;
+ PyObject *ops_list;
- /* Note: the standard svn-python typemap releases the GIL while calling the
- wrapped function, but this function does Python stuff, so we have to
- reacquire it again. */
- svn_swig_py_acquire_py_lock();
- status = svn_swig_ConvertPtr(window_ob, &window,
- SWIG_TypeQuery("svn_txdelta_window_t *"));
-
- if (status != 0)
- {
- PyErr_SetString(PyExc_TypeError,
- "expected an svn_txdelta_window_t* proxy");
- svn_swig_py_release_py_lock();
- return NULL;
- }
-
- window_pool = PyObject_GetAttrString(window_ob, "_parent_pool");
-
- if (window_pool == NULL)
- {
- svn_swig_py_release_py_lock();
- return NULL;
- }
-
- ops_list = svn_swig_py_txdelta_window_t_ops_get(window,
- SWIG_TypeQuery("svn_txdelta_op_t *"), window_pool);
-
- svn_swig_py_release_py_lock();
+ if (svn_swig_py_get_parent_pool(args, $descriptor(apr_pool_t *),
+ &parent_py_pool, &parent_pool))
+ SWIG_fail;
- return ops_list;
+ ops_list = svn_swig_py_convert_txdelta_op_c_array(*$1, *$2,
+ $descriptor(svn_txdelta_op_t *), parent_py_pool);
+
+ if (!ops_list) SWIG_fail;
+
+ %append_output(ops_list);
}
-%}
#endif
%include svn_delta_h.swg
+#ifdef SWIGPYTHON
+%pythoncode {
+# This function is for backwards compatibility only.
+# Use svn_txdelta_window_t.ops instead.
+svn_txdelta_window_t_ops_get = svn_txdelta_window_t._ops_get
+}
+#endif
+
#ifdef SWIGRUBY
%inline %{
static VALUE
Modified: subversion/branches/10Gb/subversion/include/private/svn_client_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/subversion/include/private/svn_client_private.h?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/subversion/include/private/svn_client_private.h (original)
+++ subversion/branches/10Gb/subversion/include/private/svn_client_private.h Thu Sep 27 12:13:36 2012
@@ -38,6 +38,21 @@ extern "C" {
#endif /* __cplusplus */
+/* Return true if KIND is a revision kind that is dependent on the working
+ * copy. Otherwise, return false. */
+#define SVN_CLIENT__REVKIND_NEEDS_WC(kind) \
+ ((kind) == svn_opt_revision_base || \
+ (kind) == svn_opt_revision_previous || \
+ (kind) == svn_opt_revision_working || \
+ (kind) == svn_opt_revision_committed) \
+
+/* Return true if KIND is a revision kind that the WC can supply without
+ * contacting the repository. Otherwise, return false. */
+#define SVN_CLIENT__REVKIND_IS_LOCAL_TO_WC(kind) \
+ ((kind) == svn_opt_revision_base || \
+ (kind) == svn_opt_revision_working || \
+ (kind) == svn_opt_revision_committed)
+
/* A location in a repository. */
typedef struct svn_client__pathrev_t
{
@@ -98,6 +113,39 @@ const char *
svn_client__pathrev_fspath(const svn_client__pathrev_t *pathrev,
apr_pool_t *result_pool);
+/* Given PATH_OR_URL, which contains either a working copy path or an
+ absolute URL, a peg revision PEG_REVISION, and a desired revision
+ REVISION, create an RA connection to that object as it exists in
+ that revision, following copy history if necessary. If REVISION is
+ younger than PEG_REVISION, then PATH_OR_URL will be checked to see
+ 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?
+
+ If PEG_REVISION->kind is 'unspecified', the peg revision is 'head'
+ for a URL or 'working' for a WC path. If REVISION->kind is
+ 'unspecified', the operative revision is the peg revision.
+
+ Store the resulting ra_session in *RA_SESSION_P. Store the final
+ resolved location of the object in *RESOLVED_LOC_P. RESOLVED_LOC_P
+ may be NULL if not wanted.
+
+ Use authentication baton cached in CTX to authenticate against the
+ repository.
+
+ Use POOL for all allocations. */
+svn_error_t *
+svn_client__ra_session_from_path2(svn_ra_session_t **ra_session_p,
+ svn_client__pathrev_t **resolved_loc_p,
+ const char *path_or_url,
+ const char *base_dir_abspath,
+ const svn_opt_revision_t *peg_revision,
+ const svn_opt_revision_t *revision,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *pool);
/** Return @c SVN_ERR_ILLEGAL_TARGET if TARGETS contains a mixture of
* URLs and paths; otherwise return SVN_NO_ERROR.
@@ -180,11 +228,7 @@ svn_client__wc_node_get_origin(svn_clien
/* Details of a symmetric merge. */
-typedef struct svn_client__symmetric_merge_t
-{
- svn_client__pathrev_t *yca, *base, *mid, *right;
- svn_boolean_t allow_mixed_rev, allow_local_mods, allow_switched_subtrees;
-} svn_client__symmetric_merge_t;
+typedef struct svn_client__symmetric_merge_t svn_client__symmetric_merge_t;
/* Find the information needed to merge all unmerged changes from a source
* branch into a target branch. The information is the locations of the
@@ -206,6 +250,45 @@ svn_client__find_symmetric_merge(svn_cli
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
+/* Find out what kind of symmetric merge would be needed, when the target
+ * is only known as a repository location rather than a WC.
+ *
+ * Like svn_client__find_symmetric_merge() except that SOURCE_PATH_OR_URL @
+ * SOURCE_REVISION should refer to a repository location and not a WC.
+ *
+ * ### The result, *MERGE_P, may not be suitable for passing to
+ * svn_client__do_symmetric_merge(). The target WC state would not be
+ * checked (as in the ALLOW_* flags). We should resolve this problem:
+ * perhaps add the allow_* params here, or provide another way of setting
+ * them; and perhaps ensure __do_...() will accept the result iff given a
+ * WC that matches the stored target location.
+ */
+svn_error_t *
+svn_client__find_symmetric_merge_no_wc(
+ svn_client__symmetric_merge_t **merge_p,
+ const char *source_path_or_url,
+ const svn_opt_revision_t *source_revision,
+ const char *target_path_or_url,
+ const svn_opt_revision_t *target_revision,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
+/* Set *YCA, *BASE, *RIGHT, *TARGET to the repository locations of the
+ * youngest common ancestor of the branches, the base chosen for 3-way
+ * merge, the right-hand side of the source diff, and the target WC.
+ *
+ * Any of the output pointers may be NULL if not wanted.
+ */
+svn_error_t *
+svn_client__symmetric_merge_get_locations(
+ svn_client__pathrev_t **yca,
+ svn_client__pathrev_t **base,
+ svn_client__pathrev_t **right,
+ svn_client__pathrev_t **target,
+ const svn_client__symmetric_merge_t *merge,
+ apr_pool_t *result_pool);
+
/* Perform a symmetric merge.
*
* Merge according to MERGE into the WC at TARGET_WCPATH.
@@ -231,6 +314,17 @@ svn_client__do_symmetric_merge(const svn
svn_client_ctx_t *ctx,
apr_pool_t *scratch_pool);
+/* Return TRUE iff the symmetric merge represented by MERGE is going to be
+ * a reintegrate-like merge: that is, merging in the opposite direction
+ * from the last full merge.
+ *
+ * This function exists because the merge is NOT really symmetric and the
+ * client can be more friendly if it knows something about the differences.
+ */
+svn_boolean_t
+svn_client__symmetric_merge_is_reintegrate_like(
+ const svn_client__symmetric_merge_t *merge);
+
#ifdef __cplusplus
}
Modified: subversion/branches/10Gb/subversion/include/svn_dav.h
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/subversion/include/svn_dav.h?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/subversion/include/svn_dav.h (original)
+++ subversion/branches/10Gb/subversion/include/svn_dav.h Thu Sep 27 12:13:36 2012
@@ -53,6 +53,15 @@ extern "C" {
/** This header is *TEMPORARILY* used to transmit the delta base to the
* server. It contains a version resource URL for what is on the client.
+ *
+ * @note The HTTP delta draft recommends an If-None-Match header
+ * holding an entity tag corresponding to the base copy that the
+ * client has. In Subversion, it is much more natural to use a version
+ * URL to specify that base. We'd like, then, to use the If: header
+ * to specify the URL. Unfortunately, mod_dav sees all "State-token"
+ * items as lock tokens. So we'll use this custom header until mod_dav
+ * and other backend APIs are taught to be less rigid, at which time
+ * we can switch to using an If: header to report our base version.
*/
#define SVN_DAV_DELTA_BASE_HEADER "X-SVN-VR-Base"
Modified: subversion/branches/10Gb/subversion/libsvn_client/client.h
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/subversion/libsvn_client/client.h?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/subversion/libsvn_client/client.h (original)
+++ subversion/branches/10Gb/subversion/libsvn_client/client.h Thu Sep 27 12:13:36 2012
@@ -217,40 +217,6 @@ svn_client__get_youngest_common_ancestor
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
-/* Given PATH_OR_URL, which contains either a working copy path or an
- absolute URL, a peg revision PEG_REVISION, and a desired revision
- REVISION, create an RA connection to that object as it exists in
- that revision, following copy history if necessary. If REVISION is
- younger than PEG_REVISION, then PATH_OR_URL will be checked to see
- 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?
-
- If PEG_REVISION->kind is 'unspecified', the peg revision is 'head'
- for a URL or 'working' for a WC path. If REVISION->kind is
- 'unspecified', the operative revision is the peg revision.
-
- Store the resulting ra_session in *RA_SESSION_P. Store the final
- resolved location of the object in *RESOLVED_LOC_P. RESOLVED_LOC_P
- may be NULL if not wanted.
-
- Use authentication baton cached in CTX to authenticate against the
- repository.
-
- Use POOL for all allocations. */
-svn_error_t *
-svn_client__ra_session_from_path2(svn_ra_session_t **ra_session_p,
- svn_client__pathrev_t **resolved_loc_p,
- const char *path_or_url,
- const char *base_dir_abspath,
- const svn_opt_revision_t *peg_revision,
- const svn_opt_revision_t *revision,
- svn_client_ctx_t *ctx,
- apr_pool_t *pool);
-
/* Ensure that RA_SESSION's session URL matches SESSION_URL,
reparenting that session if necessary.
Store the previous session URL in *OLD_SESSION_URL (so that if the
@@ -1033,21 +999,6 @@ svn_client__get_shim_callbacks(svn_wc_co
apr_hash_t *relpath_map,
apr_pool_t *result_pool);
-/* Return true if KIND is a revision kind that is dependent on the working
- * copy. Otherwise, return false. */
-#define SVN_CLIENT__REVKIND_NEEDS_WC(kind) \
- ((kind) == svn_opt_revision_base || \
- (kind) == svn_opt_revision_previous || \
- (kind) == svn_opt_revision_working || \
- (kind) == svn_opt_revision_committed) \
-
-/* Return true if KIND is a revision kind that the WC can supply without
- * contacting the repository. Otherwise, return false. */
-#define SVN_CLIENT__REVKIND_IS_LOCAL_TO_WC(kind) \
- ((kind) == svn_opt_revision_base || \
- (kind) == svn_opt_revision_working || \
- (kind) == svn_opt_revision_committed)
-
/* Return REVISION unless its kind is 'unspecified' in which case return
* a pointer to a statically allocated revision structure of kind 'head'
* if PATH_OR_URL is a URL or 'base' if it is a WC path. */
Modified: subversion/branches/10Gb/subversion/libsvn_client/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/subversion/libsvn_client/commit.c?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/subversion/libsvn_client/commit.c (original)
+++ subversion/branches/10Gb/subversion/libsvn_client/commit.c Thu Sep 27 12:13:36 2012
@@ -1441,6 +1441,7 @@ svn_client_commit6(const apr_array_heade
const char *log_msg;
const char *base_abspath;
const char *base_url;
+ const char *ra_session_wc;
apr_array_header_t *rel_targets;
apr_array_header_t *lock_targets;
apr_array_header_t *locks_obtained;
@@ -1770,9 +1771,19 @@ svn_client_commit6(const apr_array_heade
cb.info = &commit_info;
cb.pool = pool;
+ /* When committing from multiple WCs, get the RA editor from
+ * the first WC, rather than the BASE_ABSPATH. The BASE_ABSPATH
+ * might be an unrelated parent of nested working copies.
+ * We don't support commits to multiple repositories so using
+ * the first WC to get the RA session is safe. */
+ if (lock_targets->nelts > 1)
+ ra_session_wc = APR_ARRAY_IDX(lock_targets, 0, const char *);
+ else
+ ra_session_wc = base_abspath;
+
cmt_err = svn_error_trace(
svn_client__open_ra_session_internal(&ra_session, NULL, base_url,
- base_abspath, commit_items,
+ ra_session_wc, commit_items,
TRUE, FALSE, ctx, pool));
if (cmt_err)
Modified: subversion/branches/10Gb/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/subversion/libsvn_client/merge.c?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/subversion/libsvn_client/merge.c (original)
+++ subversion/branches/10Gb/subversion/libsvn_client/merge.c Thu Sep 27 12:13:36 2012
@@ -11159,57 +11159,6 @@ typedef struct source_and_target_t
svn_client__pathrev_t *yca;
} source_and_target_t;
-/* "Open" the source and target branches of a merge. That means:
- * - find out their exact repository locations (resolve WC paths and
- * non-numeric revision numbers),
- * - check the branches are suitably related,
- * - establish RA session(s) to the repo,
- * - check the WC for suitability (throw an error if unsuitable)
- *
- * Record this information and return it in a new "merge context" object.
- */
-static svn_error_t *
-open_source_and_target(source_and_target_t **source_and_target,
- const char *source_path_or_url,
- const svn_opt_revision_t *source_peg_revision,
- const char *target_abspath,
- svn_boolean_t allow_mixed_rev,
- svn_boolean_t allow_local_mods,
- svn_boolean_t allow_switched_subtrees,
- svn_client_ctx_t *ctx,
- apr_pool_t *session_pool,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool)
-{
- source_and_target_t *s_t = apr_palloc(result_pool, sizeof(*s_t));
-
- /* Target */
- SVN_ERR(open_target_wc(&s_t->target, target_abspath,
- allow_mixed_rev, allow_local_mods, allow_switched_subtrees,
- ctx, result_pool, scratch_pool));
- SVN_ERR(svn_client_open_ra_session(&s_t->target_ra_session,
- s_t->target->loc.url,
- ctx, session_pool));
-
- /* Source */
- SVN_ERR(svn_client__ra_session_from_path2(
- &s_t->source_ra_session, &s_t->source,
- source_path_or_url, NULL, source_peg_revision, source_peg_revision,
- ctx, result_pool));
-
- *source_and_target = s_t;
- return SVN_NO_ERROR;
-}
-
-/* "Close" any resources that were acquired in the S_T structure. */
-static svn_error_t *
-close_source_and_target(source_and_target_t *s_t,
- apr_pool_t *scratch_pool)
-{
- /* close s_t->source_/target_ra_session */
- return SVN_NO_ERROR;
-}
-
/* Set *INTERSECTION_P to the intersection of BRANCH_HISTORY with the
* revision range OLDEST_REV to YOUNGEST_REV (inclusive).
*
@@ -11494,14 +11443,23 @@ find_symmetric_merge(svn_client__pathrev
svn_mergeinfo_inherited,
FALSE /* squelch_incapable */,
scratch_pool));
- SVN_ERR(svn_client__get_wc_or_repos_mergeinfo(&s_t->target_mergeinfo,
- NULL /* inherited */,
- NULL /* from_repos */,
- FALSE /* repos_only */,
- svn_mergeinfo_inherited,
- s_t->target_ra_session,
- s_t->target->abspath,
- ctx, scratch_pool));
+ if (! s_t->target->abspath)
+ SVN_ERR(svn_client__get_repos_mergeinfo(&s_t->target_mergeinfo,
+ s_t->target_ra_session,
+ s_t->target->loc.url,
+ s_t->target->loc.rev,
+ svn_mergeinfo_inherited,
+ FALSE /* squelch_incapable */,
+ scratch_pool));
+ else
+ SVN_ERR(svn_client__get_wc_or_repos_mergeinfo(&s_t->target_mergeinfo,
+ NULL /* inherited */,
+ NULL /* from_repos */,
+ FALSE /* repos_only */,
+ svn_mergeinfo_inherited,
+ s_t->target_ra_session,
+ s_t->target->abspath,
+ ctx, scratch_pool));
/* Get the location-history of each branch. */
s_t->source_branch.tip = s_t->source;
@@ -11545,6 +11503,55 @@ find_symmetric_merge(svn_client__pathrev
return SVN_NO_ERROR;
}
+/* Details of a symmetric merge. */
+struct svn_client__symmetric_merge_t
+{
+ svn_client__pathrev_t *yca, *base, *mid, *right, *target;
+ svn_boolean_t allow_mixed_rev, allow_local_mods, allow_switched_subtrees;
+};
+
+svn_error_t *
+svn_client__find_symmetric_merge_no_wc(
+ svn_client__symmetric_merge_t **merge_p,
+ const char *source_path_or_url,
+ const svn_opt_revision_t *source_revision,
+ const char *target_path_or_url,
+ const svn_opt_revision_t *target_revision,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ source_and_target_t *s_t = apr_palloc(scratch_pool, sizeof(*s_t));
+ svn_client__pathrev_t *target_loc;
+ svn_client__symmetric_merge_t *merge = apr_palloc(result_pool, sizeof(*merge));
+
+ /* Source */
+ SVN_ERR(svn_client__ra_session_from_path2(
+ &s_t->source_ra_session, &s_t->source,
+ source_path_or_url, NULL, source_revision, source_revision,
+ ctx, result_pool));
+
+ /* Target */
+ SVN_ERR(svn_client__ra_session_from_path2(
+ &s_t->target_ra_session, &target_loc,
+ target_path_or_url, NULL, target_revision, target_revision,
+ ctx, result_pool));
+ s_t->target = apr_palloc(scratch_pool, sizeof(*s_t->target));
+ s_t->target->kind = svn_node_none;
+ s_t->target->abspath = NULL; /* indicate the target is not a WC */
+ s_t->target->loc = *target_loc;
+
+ SVN_ERR(find_symmetric_merge(&merge->base, &merge->mid, s_t,
+ ctx, result_pool, scratch_pool));
+
+ merge->right = s_t->source;
+ merge->target = &s_t->target->loc;
+ merge->yca = s_t->yca;
+ *merge_p = merge;
+
+ return SVN_NO_ERROR;
+}
+
svn_error_t *
svn_client__find_symmetric_merge(svn_client__symmetric_merge_t **merge_p,
const char *source_path_or_url,
@@ -11558,22 +11565,30 @@ svn_client__find_symmetric_merge(svn_cli
apr_pool_t *scratch_pool)
{
const char *target_abspath;
- source_and_target_t *s_t;
+ source_and_target_t *s_t = apr_palloc(result_pool, sizeof(*s_t));
svn_client__symmetric_merge_t *merge = apr_palloc(result_pool, sizeof(*merge));
SVN_ERR(svn_dirent_get_absolute(&target_abspath, target_wcpath, scratch_pool));
- /* Open RA sessions to the source and target trees. We're not going
- * to check the target WC for mixed-rev, local mods or switched
- * subtrees yet. After we find out what kind of merge is required,
- * then if a reintegrate-like merge is required we'll do the stricter
- * checks, in do_symmetric_merge_locked(). */
- SVN_ERR(open_source_and_target(&s_t, source_path_or_url, source_revision,
- target_abspath,
- TRUE /*allow_mixed_rev*/,
- TRUE /*allow_local_mods*/,
- TRUE /*allow_switched_subtrees*/,
- ctx, result_pool, result_pool, scratch_pool));
+ /* "Open" the target WC. We're not going to check the target WC for
+ * mixed-rev, local mods or switched subtrees yet. After we find out
+ * what kind of merge is required, then if a reintegrate-like merge is
+ * required we'll do the stricter checks, in do_symmetric_merge_locked(). */
+ SVN_ERR(open_target_wc(&s_t->target, target_abspath,
+ TRUE /*allow_mixed_rev*/,
+ TRUE /*allow_local_mods*/,
+ TRUE /*allow_switched_subtrees*/,
+ ctx, result_pool, scratch_pool));
+
+ /* Open RA sessions to the source and target trees. */
+ SVN_ERR(svn_client_open_ra_session(&s_t->target_ra_session,
+ s_t->target->loc.url,
+ ctx, result_pool));
+ /* ### check for null URL (i.e. added path) here, like in reintegrate? */
+ SVN_ERR(svn_client__ra_session_from_path2(
+ &s_t->source_ra_session, &s_t->source,
+ source_path_or_url, NULL, source_revision, source_revision,
+ ctx, result_pool));
/* Check source is in same repos as target. */
SVN_ERR(check_same_repos(s_t->source, source_path_or_url,
@@ -11590,7 +11605,7 @@ svn_client__find_symmetric_merge(svn_cli
*merge_p = merge;
- SVN_ERR(close_source_and_target(s_t, scratch_pool));
+ /* TODO: Close the source and target sessions here? */
return SVN_NO_ERROR;
}
@@ -11772,3 +11787,30 @@ svn_client__do_symmetric_merge(const svn
return SVN_NO_ERROR;
}
+
+svn_boolean_t
+svn_client__symmetric_merge_is_reintegrate_like(
+ const svn_client__symmetric_merge_t *merge)
+{
+ return merge->mid != NULL;
+}
+
+svn_error_t *
+svn_client__symmetric_merge_get_locations(
+ svn_client__pathrev_t **yca,
+ svn_client__pathrev_t **base,
+ svn_client__pathrev_t **right,
+ svn_client__pathrev_t **target,
+ const svn_client__symmetric_merge_t *merge,
+ apr_pool_t *result_pool)
+{
+ if (yca)
+ *yca = svn_client__pathrev_dup(merge->yca, result_pool);
+ if (base)
+ *base = svn_client__pathrev_dup(merge->base, result_pool);
+ if (right)
+ *right = svn_client__pathrev_dup(merge->right, result_pool);
+ if (target)
+ *target = svn_client__pathrev_dup(merge->target, result_pool);
+ return SVN_NO_ERROR;
+}
\ No newline at end of file
Modified: subversion/branches/10Gb/subversion/libsvn_client/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/subversion/libsvn_client/mergeinfo.c?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/subversion/libsvn_client/mergeinfo.c (original)
+++ subversion/branches/10Gb/subversion/libsvn_client/mergeinfo.c Thu Sep 27 12:13:36 2012
@@ -1729,7 +1729,10 @@ svn_client_mergeinfo_log2(svn_boolean_t
}
}
- /* Open RA sessions to the repository for the source and target.
+ /* Fetch the location history as mergeinfo, for the source branch
+ * (between the given start and end revisions), and, if we're finding
+ * merged revisions, then also for the entire target branch.
+ *
* ### TODO: As the source and target must be in the same repository, we
* should share a single session, tracking the two URLs separately. */
{
Modified: subversion/branches/10Gb/subversion/libsvn_fs_base/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/subversion/libsvn_fs_base/tree.c?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/subversion/libsvn_fs_base/tree.c (original)
+++ subversion/branches/10Gb/subversion/libsvn_fs_base/tree.c Thu Sep 27 12:13:36 2012
@@ -3676,7 +3676,7 @@ window_consumer(svn_txdelta_window_t *wi
SVN_ERR(svn_stream_write(tb->target_stream,
tb->target_string->data,
&len));
- svn_stringbuf_set(tb->target_string, "");
+ svn_stringbuf_setempty(tb->target_string);
}
/* Is the window NULL? If so, we're done. */
Modified: subversion/branches/10Gb/subversion/libsvn_fs_fs/caching.c
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/subversion/libsvn_fs_fs/caching.c?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/subversion/libsvn_fs_fs/caching.c (original)
+++ subversion/branches/10Gb/subversion/libsvn_fs_fs/caching.c Thu Sep 27 12:13:36 2012
@@ -312,7 +312,7 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
SVN_ERR(init_callbacks(ffd->rev_node_cache, fs, no_handler, pool));
/* 1st level DAG node cache */
- ffd->dag_node_cache = svn_fs_fs__create_dag_cache(svn_pool_create(pool));
+ ffd->dag_node_cache = svn_fs_fs__create_dag_cache(pool);
/* Very rough estimate: 1K per directory. */
SVN_ERR(create_cache(&(ffd->dir_cache),
Modified: subversion/branches/10Gb/subversion/libsvn_fs_fs/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/subversion/libsvn_fs_fs/tree.c?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/subversion/libsvn_fs_fs/tree.c (original)
+++ subversion/branches/10Gb/subversion/libsvn_fs_fs/tree.c Thu Sep 27 12:13:36 2012
@@ -172,6 +172,25 @@ typedef struct cache_entry_t
*/
enum { BUCKET_COUNT = 256 };
+/* Each pool that has received a DAG node, will hold at least on lock on
+ our cache to ensure that the node remains valid despite being allocated
+ in the cache's pool. This is the structure to represent the lock.
+ */
+typedef struct cache_lock_t
+{
+ /* pool holding the lock */
+ apr_pool_t *pool;
+
+ /* cache being locked */
+ fs_fs_dag_cache_t *cache;
+
+ /* next lock. NULL at EOL */
+ struct cache_lock_t *next;
+
+ /* previous lock. NULL at list head. Only then this==cache->first_lock */
+ struct cache_lock_t *prev;
+} cache_lock_t;
+
/* The actual cache structure. All nodes will be allocated in POOL.
When the number of INSERTIONS (i.e. objects created form that pool)
exceeds a certain threshold, the pool will be cleared and the cache
@@ -180,14 +199,14 @@ enum { BUCKET_COUNT = 256 };
To ensure that nodes returned from this structure remain valid, the
cache will get locked for the lifetime of the _receiving_ pools (i.e.
those in which we would allocate the node if there was no cache.).
- The cache will only be cleared LOCK_COUNT is 0.
+ The cache will only be cleared FIRST_LOCK is 0.
*/
struct fs_fs_dag_cache_t
{
/* fixed number of (possibly empty) cache entries */
cache_entry_t buckets[BUCKET_COUNT];
- /* pool used for all cache and node allocation */
+ /* pool used for all node allocation */
apr_pool_t *pool;
/* number of entries created from POOL since the last cleanup */
@@ -197,35 +216,60 @@ struct fs_fs_dag_cache_t
Thus, remember the last hit location for optimistic lookup. */
apr_size_t last_hit;
- /* receiving pool that added the latest lock. NULL if not known. */
- apr_pool_t *last_registered;
-
- /* lock counter */
- apr_size_t lock_count;
+ /* List of receiving pools that are still alive. */
+ cache_lock_t *first_lock;
};
-fs_fs_dag_cache_t*
-svn_fs_fs__create_dag_cache(apr_pool_t *pool)
+/* Cleanup function to be called when a receiving pool gets cleared.
+ Unlocks the cache once.
+ */
+static apr_status_t
+unlock_cache(void *baton_void)
{
- fs_fs_dag_cache_t *result = apr_pcalloc(pool, sizeof(*result));
- result->pool = pool;
+ cache_lock_t *lock = baton_void;
- return result;
+ /* remove lock from chain. Update the head */
+ if (lock->next)
+ lock->next->prev = lock->prev;
+ if (lock->prev)
+ lock->prev->next = lock->next;
+ else
+ lock->cache->first_lock = lock->next;
+
+ return APR_SUCCESS;
}
-/* Cleanup function to be called when a receiving pool gets cleared.
- Unlocks the cache once.
+/* Cleanup function to be called when the cache itself gets destroyed.
+ In that case, we must unregister all unlock requests.
*/
static apr_status_t
-unlock_cache(void *baton_void)
+unregister_locks(void *baton_void)
{
fs_fs_dag_cache_t *cache = baton_void;
- cache->lock_count--;
- cache->last_registered = NULL;
-
+ cache_lock_t *lock;
+
+ for (lock = cache->first_lock; lock; lock = lock->next)
+ apr_pool_cleanup_kill(lock->pool,
+ lock,
+ unlock_cache);
+
return APR_SUCCESS;
}
+fs_fs_dag_cache_t*
+svn_fs_fs__create_dag_cache(apr_pool_t *pool)
+{
+ fs_fs_dag_cache_t *result = apr_pcalloc(pool, sizeof(*result));
+ result->pool = svn_pool_create(pool);
+
+ apr_pool_cleanup_register(pool,
+ result,
+ unregister_locks,
+ apr_pool_cleanup_null);
+
+ return result;
+}
+
/* Prevent the entries in CACHE from being destroyed, for as long as the
POOL lives.
*/
@@ -238,28 +282,44 @@ lock_cache(fs_fs_dag_cache_t* cache, apr
we may lock the cache more than once for the same pool (and register
just as many cleanup actions).
*/
- if (pool != cache->last_registered)
- {
- apr_pool_cleanup_register(pool,
- cache,
- unlock_cache,
- apr_pool_cleanup_null);
- cache->lock_count++;
- cache->last_registered = pool;
- }
+ cache_lock_t *lock = cache->first_lock;
+
+ /* try to find an existing lock for POOL.
+ But limit the time spent on chasing pointers. */
+ int limiter = 8;
+ while (lock && --limiter)
+ if (lock->pool == pool)
+ return;
+
+ /* create a new lock and put it at the beginning of the lock chain */
+ lock = apr_palloc(pool, sizeof(*lock));
+ lock->cache = cache;
+ lock->pool = pool;
+ lock->next = cache->first_lock;
+ lock->prev = NULL;
+
+ if (cache->first_lock)
+ cache->first_lock->prev = lock;
+ cache->first_lock = lock;
+
+ /* instruct POOL to remove the look upon cleanup */
+ apr_pool_cleanup_register(pool,
+ lock,
+ unlock_cache,
+ apr_pool_cleanup_null);
}
-/* Clears and re-creates *CACHE at regular intervals
+/* Clears the CACHE at regular intervals (destroying all cached nodes)
*/
static void
-auto_clear_dag_cache(fs_fs_dag_cache_t** cache)
+auto_clear_dag_cache(fs_fs_dag_cache_t* cache)
{
- if ((*cache)->lock_count == 0 && (*cache)->insertions > BUCKET_COUNT)
+ if (cache->first_lock == NULL && cache->insertions > BUCKET_COUNT)
{
- apr_pool_t *pool = (*cache)->pool;
- apr_pool_clear(pool);
-
- *cache = svn_fs_fs__create_dag_cache(pool);
+ apr_pool_clear(cache->pool);
+
+ memset(cache->buckets, 0, sizeof(cache->buckets));
+ cache->insertions = 0;
}
}
@@ -349,8 +409,8 @@ locate_cache(svn_cache__t **cache,
}
/* Return NODE for PATH from ROOT's node cache, or NULL if the node
- isn't cached; read it from the FS. *NODE remains valid until POOL
- gets cleared or destroyed.*/
+ isn't cached; read it from the FS. *NODE remains valid until either
+ POOL or the FS gets cleared or destroyed (whichever comes first). */
static svn_error_t *
dag_node_cache_get(dag_node_t **node_p,
svn_fs_root_t *root,
@@ -371,7 +431,7 @@ dag_node_cache_get(dag_node_t **node_p,
fs_fs_data_t *ffd = root->fs->fsap_data;
cache_entry_t *bucket;
- auto_clear_dag_cache(&ffd->dag_node_cache);
+ auto_clear_dag_cache(ffd->dag_node_cache);
bucket = cache_lookup(ffd->dag_node_cache, root->rev, path);
if (bucket->node == NULL)
{
@@ -2612,7 +2672,7 @@ window_consumer(svn_txdelta_window_t *wi
SVN_ERR(svn_stream_write(tb->target_stream,
tb->target_string->data,
&len));
- svn_stringbuf_set(tb->target_string, "");
+ svn_stringbuf_setempty(tb->target_string);
}
/* Is the window NULL? If so, we're done. */
Modified: subversion/branches/10Gb/subversion/libsvn_ra_serf/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/subversion/libsvn_ra_serf/commit.c?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/subversion/libsvn_ra_serf/commit.c (original)
+++ subversion/branches/10Gb/subversion/libsvn_ra_serf/commit.c Thu Sep 27 12:13:36 2012
@@ -2113,7 +2113,7 @@ close_file(void *file_baton,
{
handler->body_delegate = create_put_body;
handler->body_delegate_baton = ctx;
- handler->body_type = "application/vnd.svn-svndiff";
+ handler->body_type = SVN_SVNDIFF_MIME_TYPE;
}
handler->header_delegate = setup_put_headers;
Modified: subversion/branches/10Gb/subversion/libsvn_ra_serf/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/subversion/libsvn_ra_serf/update.c?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/subversion/libsvn_ra_serf/update.c (original)
+++ subversion/branches/10Gb/subversion/libsvn_ra_serf/update.c Thu Sep 27 12:13:36 2012
@@ -933,12 +933,23 @@ handle_fetch(serf_request_t *request,
return error_fetch(request, fetch_ctx, err);
}
- if (val && svn_cstring_casecmp(val, "application/vnd.svn-svndiff") == 0)
+ if (val && svn_cstring_casecmp(val, SVN_SVNDIFF_MIME_TYPE) == 0)
{
fetch_ctx->delta_stream =
svn_txdelta_parse_svndiff(info->textdelta,
info->textdelta_baton,
TRUE, info->editor_pool);
+
+ /* Validate the delta base claimed by the server matches
+ what we asked for! */
+ val = serf_bucket_headers_get(hdrs, SVN_DAV_DELTA_BASE_HEADER);
+ if (val && (strcmp(val, info->delta_base) != 0))
+ {
+ err = svn_error_createf(SVN_ERR_RA_DAV_REQUEST_FAILED, NULL,
+ _("GET request returned unexpected "
+ "delta base: %s"), val);
+ return error_fetch(request, fetch_ctx, err);
+ }
}
else
{
Modified: subversion/branches/10Gb/subversion/libsvn_ra_serf/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/subversion/libsvn_ra_serf/util.c?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/subversion/libsvn_ra_serf/util.c (original)
+++ subversion/branches/10Gb/subversion/libsvn_ra_serf/util.c Thu Sep 27 12:13:36 2012
@@ -1986,7 +1986,8 @@ handle_response(serf_request_t *request,
if (err
&& (!SERF_BUCKET_READ_ERROR(err->apr_err)
- || APR_STATUS_IS_ECONNRESET(err->apr_err)))
+ || APR_STATUS_IS_ECONNRESET(err->apr_err)
+ || APR_STATUS_IS_ECONNABORTED(err->apr_err)))
{
/* These errors are special cased in serf
### We hope no handler returns these by accident. */
Modified: subversion/branches/10Gb/subversion/libsvn_ra_svn/client.c
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/subversion/libsvn_ra_svn/client.c?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/subversion/libsvn_ra_svn/client.c (original)
+++ subversion/branches/10Gb/subversion/libsvn_ra_svn/client.c Thu Sep 27 12:13:36 2012
@@ -258,9 +258,10 @@ static svn_error_t *ra_svn_set_path(void
{
ra_svn_reporter_baton_t *b = baton;
- SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, pool, svn_ra_svn_cmd_set_path,
- path, rev, start_empty, lock_token,
- svn_depth_to_word(depth)));
+ SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, pool,
+ svn_ra_svn_cmd_set_path,
+ path, rev, start_empty, lock_token,
+ svn_depth_to_word(depth)));
return SVN_NO_ERROR;
}
Modified: subversion/branches/10Gb/subversion/libsvn_ra_svn/editorp.c
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/subversion/libsvn_ra_svn/editorp.c?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/subversion/libsvn_ra_svn/editorp.c (original)
+++ subversion/branches/10Gb/subversion/libsvn_ra_svn/editorp.c Thu Sep 27 12:13:36 2012
@@ -160,7 +160,8 @@ static svn_error_t *ra_svn_target_rev(vo
ra_svn_edit_baton_t *eb = edit_baton;
SVN_ERR(check_for_error(eb, pool));
- SVN_ERR(svn_ra_svn_write_templated_cmd(eb->conn, pool, svn_ra_svn_cmd_target_rev, rev));
+ SVN_ERR(svn_ra_svn_write_templated_cmd(eb->conn, pool,
+ svn_ra_svn_cmd_target_rev, rev));
return SVN_NO_ERROR;
}
@@ -171,8 +172,9 @@ static svn_error_t *ra_svn_open_root(voi
const char *token = make_token('d', eb, pool);
SVN_ERR(check_for_error(eb, pool));
- SVN_ERR(svn_ra_svn_write_templated_cmd(eb->conn, pool, svn_ra_svn_cmd_open_root, rev,
- token));
+ SVN_ERR(svn_ra_svn_write_templated_cmd(eb->conn, pool,
+ svn_ra_svn_cmd_open_root, rev,
+ token));
*root_baton = ra_svn_make_baton(eb->conn, pool, eb, token);
return SVN_NO_ERROR;
}
@@ -183,8 +185,9 @@ static svn_error_t *ra_svn_delete_entry(
ra_svn_baton_t *b = parent_baton;
SVN_ERR(check_for_error(b->eb, pool));
- SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, pool, svn_ra_svn_cmd_delete_entry,
- path, rev, b->token));
+ SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, pool,
+ svn_ra_svn_cmd_delete_entry,
+ path, rev, b->token));
return SVN_NO_ERROR;
}
@@ -199,8 +202,10 @@ static svn_error_t *ra_svn_add_dir(const
SVN_ERR_ASSERT((copy_path && SVN_IS_VALID_REVNUM(copy_rev))
|| (!copy_path && !SVN_IS_VALID_REVNUM(copy_rev)));
SVN_ERR(check_for_error(b->eb, pool));
- SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, pool, svn_ra_svn_cmd_add_dir, path,
- b->token, token, copy_path, copy_rev));
+ SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, pool,
+ svn_ra_svn_cmd_add_dir, path,
+ b->token, token, copy_path,
+ copy_rev));
*child_baton = ra_svn_make_baton(b->conn, pool, b->eb, token);
return SVN_NO_ERROR;
}
@@ -213,8 +218,9 @@ static svn_error_t *ra_svn_open_dir(cons
const char *token = make_token('d', b->eb, pool);
SVN_ERR(check_for_error(b->eb, pool));
- SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, pool, svn_ra_svn_cmd_open_dir,
- path, b->token, token, rev));
+ SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, pool,
+ svn_ra_svn_cmd_open_dir,
+ path, b->token, token, rev));
*child_baton = ra_svn_make_baton(b->conn, pool, b->eb, token);
return SVN_NO_ERROR;
}
@@ -226,8 +232,9 @@ static svn_error_t *ra_svn_change_dir_pr
ra_svn_baton_t *b = dir_baton;
SVN_ERR(check_for_error(b->eb, pool));
- SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, pool, svn_ra_svn_cmd_change_dir_prop,
- b->token, name, value));
+ SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, pool,
+ svn_ra_svn_cmd_change_dir_prop,
+ b->token, name, value));
return SVN_NO_ERROR;
}
@@ -236,7 +243,9 @@ static svn_error_t *ra_svn_close_dir(voi
ra_svn_baton_t *b = dir_baton;
SVN_ERR(check_for_error(b->eb, pool));
- SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, pool, svn_ra_svn_cmd_close_dir, b->token));
+ SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, pool,
+ svn_ra_svn_cmd_close_dir,
+ b->token));
return SVN_NO_ERROR;
}
@@ -251,8 +260,9 @@ static svn_error_t *ra_svn_absent_dir(co
return SVN_NO_ERROR;
SVN_ERR(check_for_error(b->eb, pool));
- SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, pool, svn_ra_svn_cmd_absent_dir, path,
- b->token));
+ SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, pool,
+ svn_ra_svn_cmd_absent_dir, path,
+ b->token));
return SVN_NO_ERROR;
}
@@ -269,8 +279,10 @@ static svn_error_t *ra_svn_add_file(cons
SVN_ERR_ASSERT((copy_path && SVN_IS_VALID_REVNUM(copy_rev))
|| (!copy_path && !SVN_IS_VALID_REVNUM(copy_rev)));
SVN_ERR(check_for_error(b->eb, pool));
- SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, pool, svn_ra_svn_cmd_add_file, path,
- b->token, token, copy_path, copy_rev));
+ SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, pool,
+ svn_ra_svn_cmd_add_file, path,
+ b->token, token, copy_path,
+ copy_rev));
*file_baton = ra_svn_make_baton(b->conn, pool, b->eb, token);
return SVN_NO_ERROR;
}
@@ -285,8 +297,9 @@ static svn_error_t *ra_svn_open_file(con
const char *token = make_token('c', b->eb, pool);
SVN_ERR(check_for_error(b->eb, b->pool));
- SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, pool, svn_ra_svn_cmd_open_file,
- path, b->token, token, rev));
+ SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, pool,
+ svn_ra_svn_cmd_open_file,
+ path, b->token, token, rev));
*file_baton = ra_svn_make_baton(b->conn, pool, b->eb, token);
return SVN_NO_ERROR;
}
@@ -300,8 +313,9 @@ static svn_error_t *ra_svn_svndiff_handl
SVN_ERR(check_for_error(b->eb, b->pool));
str.data = data;
str.len = *len;
- return svn_ra_svn_write_templated_cmd(b->conn, b->pool, svn_ra_svn_cmd_textdelta_chunk,
- b->token, &str);
+ return svn_ra_svn_write_templated_cmd(b->conn, b->pool,
+ svn_ra_svn_cmd_textdelta_chunk,
+ b->token, &str);
}
static svn_error_t *ra_svn_svndiff_close_handler(void *baton)
@@ -309,8 +323,9 @@ static svn_error_t *ra_svn_svndiff_close
ra_svn_baton_t *b = baton;
SVN_ERR(check_for_error(b->eb, b->pool));
- SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, b->pool, svn_ra_svn_cmd_textdelta_end,
- b->token));
+ SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, b->pool,
+ svn_ra_svn_cmd_textdelta_end,
+ b->token));
return SVN_NO_ERROR;
}
@@ -325,8 +340,9 @@ static svn_error_t *ra_svn_apply_textdel
/* Tell the other side we're starting a text delta. */
SVN_ERR(check_for_error(b->eb, pool));
- SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, pool, svn_ra_svn_cmd_apply_textdelta,
- b->token, base_checksum));
+ SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, pool,
+ svn_ra_svn_cmd_apply_textdelta,
+ b->token, base_checksum));
/* Transform the window stream to an svndiff stream. Reuse the
* file baton for the stream handler, since it has all the
@@ -355,8 +371,9 @@ static svn_error_t *ra_svn_change_file_p
ra_svn_baton_t *b = file_baton;
SVN_ERR(check_for_error(b->eb, pool));
- SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, pool, svn_ra_svn_cmd_change_file_prop,
- b->token, name, value));
+ SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, pool,
+ svn_ra_svn_cmd_change_file_prop,
+ b->token, name, value));
return SVN_NO_ERROR;
}
@@ -367,8 +384,9 @@ static svn_error_t *ra_svn_close_file(vo
ra_svn_baton_t *b = file_baton;
SVN_ERR(check_for_error(b->eb, pool));
- SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, pool, svn_ra_svn_cmd_close_file,
- b->token, text_checksum));
+ SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, pool,
+ svn_ra_svn_cmd_close_file,
+ b->token, text_checksum));
return SVN_NO_ERROR;
}
@@ -383,8 +401,9 @@ static svn_error_t *ra_svn_absent_file(c
return SVN_NO_ERROR;
SVN_ERR(check_for_error(b->eb, pool));
- SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, pool, svn_ra_svn_cmd_absent_file, path,
- b->token));
+ SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, pool,
+ svn_ra_svn_cmd_absent_file, path,
+ b->token));
return SVN_NO_ERROR;
}
@@ -395,11 +414,13 @@ static svn_error_t *ra_svn_close_edit(vo
SVN_ERR_ASSERT(!eb->got_status);
eb->got_status = TRUE;
- SVN_ERR(svn_ra_svn_write_templated_cmd(eb->conn, pool, svn_ra_svn_cmd_close_edit));
+ SVN_ERR(svn_ra_svn_write_templated_cmd(eb->conn, pool,
+ svn_ra_svn_cmd_close_edit));
err = svn_ra_svn_read_cmd_response(eb->conn, pool, "");
if (err)
{
- svn_error_clear(svn_ra_svn_write_templated_cmd(eb->conn, pool, svn_ra_svn_cmd_abort_edit));
+ svn_error_clear(svn_ra_svn_write_templated_cmd(eb->conn, pool,
+ svn_ra_svn_cmd_abort_edit));
return err;
}
if (eb->callback)
@@ -413,7 +434,8 @@ static svn_error_t *ra_svn_abort_edit(vo
if (eb->got_status)
return SVN_NO_ERROR;
- SVN_ERR(svn_ra_svn_write_templated_cmd(eb->conn, pool, svn_ra_svn_cmd_abort_edit));
+ SVN_ERR(svn_ra_svn_write_templated_cmd(eb->conn, pool,
+ svn_ra_svn_cmd_abort_edit));
SVN_ERR(svn_ra_svn_read_cmd_response(eb->conn, pool, ""));
return SVN_NO_ERROR;
}
Modified: subversion/branches/10Gb/subversion/libsvn_ra_svn/marshal.c
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/subversion/libsvn_ra_svn/marshal.c?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/subversion/libsvn_ra_svn/marshal.c (original)
+++ subversion/branches/10Gb/subversion/libsvn_ra_svn/marshal.c Thu Sep 27 12:13:36 2012
@@ -355,12 +355,10 @@ static svn_error_t *readbuf_input(svn_ra
/* Treat the next LEN input bytes from CONN as "read" */
static svn_error_t *readbuf_skip(svn_ra_svn_conn_t *conn, apr_size_t len)
{
- apr_ssize_t buflen, copylen;
-
do
{
- buflen = conn->read_end - conn->read_ptr;
- copylen = (buflen < len) ? buflen : len;
+ apr_size_t buflen = conn->read_end - conn->read_ptr;
+ apr_size_t copylen = (buflen < len) ? buflen : len;
conn->read_ptr += copylen;
len -= copylen;
if (len == 0)
Modified: subversion/branches/10Gb/subversion/libsvn_repos/delta.c
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/subversion/libsvn_repos/delta.c?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/subversion/libsvn_repos/delta.c (original)
+++ subversion/branches/10Gb/subversion/libsvn_repos/delta.c Thu Sep 27 12:13:36 2012
@@ -629,12 +629,23 @@ svn_repos__compare_files(svn_boolean_t *
if (!*changed_p)
return SVN_NO_ERROR;
- /* From this point on, assume things haven't changed. */
+ /* If the SHA1 checksums match for these things, we'll claim they
+ have the same contents. (We don't give quite as much weight to
+ MD5 checksums.) */
+ SVN_ERR(svn_fs_file_checksum(&checksum1, svn_checksum_sha1,
+ root1, path1, FALSE, pool));
+ SVN_ERR(svn_fs_file_checksum(&checksum2, svn_checksum_sha1,
+ root2, path2, FALSE, pool));
+ if (checksum1 && checksum2)
+ {
+ *changed_p = !svn_checksum_match(checksum1, checksum2);
+ return SVN_NO_ERROR;
+ }
+
+ /* From this point on, our default answer is "Nothing's changed". */
*changed_p = FALSE;
- /* So, things have changed. But we need to know if the two sets of
- file contents are actually different. If they have differing
- sizes, then we know they differ. */
+ /* Different filesizes means the contents are different. */
SVN_ERR(svn_fs_file_length(&size1, root1, path1, pool));
SVN_ERR(svn_fs_file_length(&size2, root2, path2, pool));
if (size1 != size2)
@@ -643,8 +654,7 @@ svn_repos__compare_files(svn_boolean_t *
return SVN_NO_ERROR;
}
- /* Same sizes, huh? Well, if their checksums differ, we know they
- differ. */
+ /* Different MD5 checksums means the contents are different. */
SVN_ERR(svn_fs_file_checksum(&checksum1, svn_checksum_md5, root1, path1,
FALSE, pool));
SVN_ERR(svn_fs_file_checksum(&checksum2, svn_checksum_md5, root2, path2,
@@ -655,13 +665,11 @@ svn_repos__compare_files(svn_boolean_t *
return SVN_NO_ERROR;
}
- /* Same sizes, same checksums. Chances are reallllly good that they
- don't differ, but to be absolute sure, we need to compare bytes. */
+ /* And finally, different contents means the ... uh ... contents are
+ different. */
SVN_ERR(svn_fs_file_contents(&stream1, root1, path1, pool));
SVN_ERR(svn_fs_file_contents(&stream2, root2, path2, pool));
-
SVN_ERR(svn_stream_contents_same2(&same, stream1, stream2, pool));
-
*changed_p = !same;
return SVN_NO_ERROR;
Modified: subversion/branches/10Gb/subversion/libsvn_repos/reporter.c
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/subversion/libsvn_repos/reporter.c?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/subversion/libsvn_repos/reporter.c (original)
+++ subversion/branches/10Gb/subversion/libsvn_repos/reporter.c Thu Sep 27 12:13:36 2012
@@ -522,9 +522,7 @@ delta_proplists(report_baton_t *b, svn_r
apr_array_header_t *prop_diffs;
int i;
svn_revnum_t crev;
- const char *uuid;
- svn_string_t *cr_str;
- revision_info_t* revision_info;
+ revision_info_t *revision_info;
svn_boolean_t changed;
const svn_prop_t *pc;
svn_lock_t *lock;
Modified: subversion/branches/10Gb/subversion/libsvn_wc/conflicts.h
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/subversion/libsvn_wc/conflicts.h?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/subversion/libsvn_wc/conflicts.h (original)
+++ subversion/branches/10Gb/subversion/libsvn_wc/conflicts.h Thu Sep 27 12:13:36 2012
@@ -260,6 +260,8 @@ svn_wc__conflict_skel_resolve(svn_boolea
*
* Output arguments can be NULL if the value is not necessary.
*
+ * ### stsp asks: what is LOCATIONS?
+ *
* TEXT_, PROP_ and TREE_CONFLICTED (when not NULL) will be set to TRUE
* when the conflict contains the specified kind of conflict, otherwise
* to false.
Modified: subversion/branches/10Gb/subversion/libsvn_wc/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/subversion/libsvn_wc/lock.c?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/subversion/libsvn_wc/lock.c (original)
+++ subversion/branches/10Gb/subversion/libsvn_wc/lock.c Thu Sep 27 12:13:36 2012
@@ -97,7 +97,8 @@ svn_wc__internal_check_wc(int *wc_format
{
svn_node_kind_t kind;
- if (err->apr_err != SVN_ERR_WC_MISSING)
+ if (err->apr_err != SVN_ERR_WC_MISSING &&
+ err->apr_err != SVN_ERR_WC_UNSUPPORTED_FORMAT)
return svn_error_trace(err);
svn_error_clear(err);
Modified: subversion/branches/10Gb/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/subversion/libsvn_wc/update_editor.c?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/branches/10Gb/subversion/libsvn_wc/update_editor.c Thu Sep 27 12:13:36 2012
@@ -1404,7 +1404,18 @@ check_tree_conflict(svn_skel_t **pconfli
case svn_wc__db_status_deleted:
- reason = svn_wc_conflict_reason_deleted;
+ {
+ const char *moved_to_abspath;
+
+ SVN_ERR(svn_wc__db_scan_deletion(NULL, &moved_to_abspath,
+ NULL, NULL, eb->db,
+ local_abspath,
+ scratch_pool, scratch_pool));
+ if (moved_to_abspath)
+ reason = svn_wc_conflict_reason_moved_away;
+ else
+ reason = svn_wc_conflict_reason_deleted;
+ }
break;
case svn_wc__db_status_incomplete:
Modified: subversion/branches/10Gb/subversion/libsvn_wc/wc_db_wcroot.c
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/subversion/libsvn_wc/wc_db_wcroot.c?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/subversion/libsvn_wc/wc_db_wcroot.c (original)
+++ subversion/branches/10Gb/subversion/libsvn_wc/wc_db_wcroot.c Thu Sep 27 12:13:36 2012
@@ -599,11 +599,22 @@ try_symlink_as_dir:
inside the wcroot, but we know the abspath is this directory
(ie. where we found it). */
- SVN_ERR(svn_wc__db_pdh_create_wcroot(wcroot,
+ err = svn_wc__db_pdh_create_wcroot(wcroot,
apr_pstrdup(db->state_pool, local_abspath),
sdb, wc_id, FORMAT_FROM_SDB,
db->auto_upgrade, db->enforce_empty_wq,
- db->state_pool, scratch_pool));
+ db->state_pool, scratch_pool);
+ if (err && err->apr_err == SVN_ERR_WC_UNSUPPORTED_FORMAT &&
+ kind == svn_kind_symlink)
+ {
+ /* We found an unsupported WC after traversing upwards from a
+ * symlink. Fall through to code below to check if the symlink
+ * points at a supported WC. */
+ svn_error_clear(err);
+ *wcroot = NULL;
+ }
+ else
+ SVN_ERR(err);
}
else
{
@@ -615,16 +626,17 @@ try_symlink_as_dir:
db->state_pool, scratch_pool));
}
- {
- const char *dir_relpath;
+ if (*wcroot)
+ {
+ const char *dir_relpath;
+
+ /* The subdirectory's relpath is easily computed relative to the
+ wcroot that we just found. */
+ dir_relpath = compute_relpath(*wcroot, local_dir_abspath, NULL);
- /* The subdirectory's relpath is easily computed relative to the
- wcroot that we just found. */
- dir_relpath = compute_relpath(*wcroot, local_dir_abspath, NULL);
-
- /* And the result local_relpath may include a filename. */
- *local_relpath = svn_relpath_join(dir_relpath, build_relpath, result_pool);
- }
+ /* And the result local_relpath may include a filename. */
+ *local_relpath = svn_relpath_join(dir_relpath, build_relpath, result_pool);
+ }
if (kind == svn_kind_symlink)
{
@@ -638,33 +650,38 @@ try_symlink_as_dir:
* points to a directory, try to find a wcroot in that directory
* instead. */
- err = svn_wc__db_read_info_internal(&status, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, &conflicted, NULL, NULL, NULL,
- NULL, NULL, NULL,
- *wcroot, *local_relpath,
- scratch_pool, scratch_pool);
- if (err)
+ if (*wcroot)
{
- if (err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND
- && !SVN_WC__ERR_IS_NOT_CURRENT_WC(err))
- return svn_error_trace(err);
+ err = svn_wc__db_read_info_internal(&status, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, &conflicted,
+ NULL, NULL, NULL, NULL, NULL,
+ NULL, *wcroot, *local_relpath,
+ scratch_pool, scratch_pool);
+ if (err)
+ {
+ if (err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND
+ && !SVN_WC__ERR_IS_NOT_CURRENT_WC(err))
+ return svn_error_trace(err);
- svn_error_clear(err);
- retry_if_dir = TRUE; /* The symlink is unversioned. */
+ svn_error_clear(err);
+ retry_if_dir = TRUE; /* The symlink is unversioned. */
+ }
+ else
+ {
+ /* The symlink is versioned, or obstructs a versioned node.
+ * Ignore non-conflicted not-present/excluded nodes.
+ * This allows the symlink to redirect the wcroot query to a
+ * directory, regardless of 'invisible' nodes in this WC. */
+ retry_if_dir = ((status == svn_wc__db_status_not_present ||
+ status == svn_wc__db_status_excluded ||
+ status == svn_wc__db_status_server_excluded)
+ && !conflicted);
+ }
}
else
- {
- /* The symlink is versioned, or obstructs a versioned node.
- * Ignore non-conflicted not-present/excluded nodes.
- * This allows the symlink to redirect the wcroot query to a
- * directory, regardless of 'invisible' nodes in this WC. */
- retry_if_dir = ((status == svn_wc__db_status_not_present ||
- status == svn_wc__db_status_excluded ||
- status == svn_wc__db_status_server_excluded)
- && !conflicted);
- }
+ retry_if_dir = TRUE;
if (retry_if_dir)
{
Modified: subversion/branches/10Gb/subversion/mod_dav_svn/repos.c
URL: http://svn.apache.org/viewvc/subversion/branches/10Gb/subversion/mod_dav_svn/repos.c?rev=1390960&r1=1390959&r2=1390960&view=diff
==============================================================================
--- subversion/branches/10Gb/subversion/mod_dav_svn/repos.c (original)
+++ subversion/branches/10Gb/subversion/mod_dav_svn/repos.c Thu Sep 27 12:13:36 2012
@@ -3083,6 +3083,13 @@ set_headers(request_rec *r, const dav_re
if ((serr == NULL) && (info.rev != SVN_INVALID_REVNUM))
{
mimetype = SVN_SVNDIFF_MIME_TYPE;
+
+ /* Note the base that this svndiff is based on, and tell any
+ intermediate caching proxies that this header is
+ significant. */
+ apr_table_setn(r->headers_out, "Vary", SVN_DAV_DELTA_BASE_HEADER);
+ apr_table_setn(r->headers_out, SVN_DAV_DELTA_BASE_HEADER,
+ resource->info->delta_base);
}
svn_error_clear(serr);
}