You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2012/11/19 16:40:45 UTC
svn commit: r1411252 [1/3] - in /subversion/branches/tree-read-api: ./
build/ build/ac-macros/ contrib/client-side/svnmerge/
contrib/server-side/svncutter/ subversion/bindings/javahl/native/
subversion/bindings/swig/perl/native/ subversion/include/ sub...
Author: julianfoad
Date: Mon Nov 19 15:40:39 2012
New Revision: 1411252
URL: http://svn.apache.org/viewvc?rev=1411252&view=rev
Log:
On the 'tree-read-api' branch: catch up to trunk@1411250.
Added:
subversion/branches/tree-read-api/subversion/tests/libsvn_wc/wc-test.c
- copied unchanged from r1411250, subversion/trunk/subversion/tests/libsvn_wc/wc-test.c
subversion/branches/tree-read-api/tools/server-side/fsfs-stats.c
- copied unchanged from r1411250, subversion/trunk/tools/server-side/fsfs-stats.c
Removed:
subversion/branches/tree-read-api/subversion/tests/libsvn_subr/target-test.c
Modified:
subversion/branches/tree-read-api/ (props changed)
subversion/branches/tree-read-api/CHANGES
subversion/branches/tree-read-api/Makefile.in
subversion/branches/tree-read-api/build.conf
subversion/branches/tree-read-api/build/ac-macros/serf.m4
subversion/branches/tree-read-api/build/run_tests.py
subversion/branches/tree-read-api/contrib/client-side/svnmerge/svnmerge_test.py
subversion/branches/tree-read-api/contrib/server-side/svncutter/svncutter
subversion/branches/tree-read-api/subversion/bindings/javahl/native/Path.cpp
subversion/branches/tree-read-api/subversion/bindings/javahl/native/Path.h
subversion/branches/tree-read-api/subversion/bindings/javahl/native/SVNClient.cpp
subversion/branches/tree-read-api/subversion/bindings/javahl/native/Targets.cpp
subversion/branches/tree-read-api/subversion/bindings/javahl/native/Targets.h
subversion/branches/tree-read-api/subversion/bindings/swig/perl/native/Repos.pm
subversion/branches/tree-read-api/subversion/include/private/svn_named_atomic.h
subversion/branches/tree-read-api/subversion/include/private/svn_wc_private.h
subversion/branches/tree-read-api/subversion/include/svn_client.h
subversion/branches/tree-read-api/subversion/include/svn_wc.h
subversion/branches/tree-read-api/subversion/libsvn_client/add.c
subversion/branches/tree-read-api/subversion/libsvn_client/client.h
subversion/branches/tree-read-api/subversion/libsvn_client/commit.c
subversion/branches/tree-read-api/subversion/libsvn_client/copy.c
subversion/branches/tree-read-api/subversion/libsvn_client/export.c
subversion/branches/tree-read-api/subversion/libsvn_client/info.c
subversion/branches/tree-read-api/subversion/libsvn_client/list.c
subversion/branches/tree-read-api/subversion/libsvn_client/prop_commands.c
subversion/branches/tree-read-api/subversion/libsvn_delta/svndiff.c
subversion/branches/tree-read-api/subversion/libsvn_delta/text_delta.c
subversion/branches/tree-read-api/subversion/libsvn_fs_fs/fs.h
subversion/branches/tree-read-api/subversion/libsvn_fs_fs/fs_fs.c
subversion/branches/tree-read-api/subversion/libsvn_fs_fs/structure
subversion/branches/tree-read-api/subversion/libsvn_ra_serf/update.c
subversion/branches/tree-read-api/subversion/libsvn_ra_serf/util.c
subversion/branches/tree-read-api/subversion/libsvn_subr/cache_config.c
subversion/branches/tree-read-api/subversion/libsvn_subr/error.c
subversion/branches/tree-read-api/subversion/libsvn_subr/named_atomic.c
subversion/branches/tree-read-api/subversion/libsvn_wc/adm_ops.c
subversion/branches/tree-read-api/subversion/libsvn_wc/copy.c
subversion/branches/tree-read-api/subversion/libsvn_wc/externals.c
subversion/branches/tree-read-api/subversion/libsvn_wc/wc_db.h
subversion/branches/tree-read-api/subversion/svn/main.c
subversion/branches/tree-read-api/subversion/svnrdump/dump_editor.c
subversion/branches/tree-read-api/subversion/tests/cmdline/autoprop_tests.py
subversion/branches/tree-read-api/subversion/tests/cmdline/copy_tests.py
subversion/branches/tree-read-api/subversion/tests/cmdline/externals_tests.py
subversion/branches/tree-read-api/subversion/tests/cmdline/merge_automatic_tests.py
subversion/branches/tree-read-api/subversion/tests/cmdline/patch_tests.py
subversion/branches/tree-read-api/subversion/tests/cmdline/svnadmin_tests.py
subversion/branches/tree-read-api/subversion/tests/cmdline/svnrdump_tests.py
subversion/branches/tree-read-api/subversion/tests/cmdline/svntest/factory.py
subversion/branches/tree-read-api/subversion/tests/cmdline/svntest/main.py
subversion/branches/tree-read-api/subversion/tests/cmdline/switch_tests.py
subversion/branches/tree-read-api/subversion/tests/libsvn_client/client-test.c
subversion/branches/tree-read-api/subversion/tests/libsvn_fs/fs-test.c
subversion/branches/tree-read-api/subversion/tests/libsvn_subr/path-test.c
subversion/branches/tree-read-api/subversion/tests/libsvn_subr/stream-test.c
subversion/branches/tree-read-api/subversion/tests/libsvn_wc/op-depth-test.c
subversion/branches/tree-read-api/subversion/tests/libsvn_wc/utils.c
subversion/branches/tree-read-api/subversion/tests/libsvn_wc/utils.h
subversion/branches/tree-read-api/tools/server-side/svn-backup-dumps.py
Propchange: subversion/branches/tree-read-api/
------------------------------------------------------------------------------
Merged /subversion/trunk:r1409189-1411250
Modified: subversion/branches/tree-read-api/CHANGES
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/CHANGES?rev=1411252&r1=1411251&r2=1411252&view=diff
==============================================================================
--- subversion/branches/tree-read-api/CHANGES (original)
+++ subversion/branches/tree-read-api/CHANGES Mon Nov 19 15:40:39 2012
@@ -104,7 +104,7 @@ http://svn.apache.org/repos/asf/subversi
- Client-side bugfixes:
* Fix "svn status -u --depth empty FILE" (r1348822, r1349215)
* Fix example output of 'svn help status' (issue #3962)
- * svn propset of svn:eol-style might not notice related text changes (r1353572)
+ * propset of svn:eol-style might not notice related text changes (r1353572)
* sort output of 'svn propget -R' (r1355699)
* sort output of 'svn proplist' (r1355698)
* sort output of 'svn status' (r1341012)
Modified: subversion/branches/tree-read-api/Makefile.in
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/Makefile.in?rev=1411252&r1=1411251&r2=1411252&view=diff
==============================================================================
--- subversion/branches/tree-read-api/Makefile.in (original)
+++ subversion/branches/tree-read-api/Makefile.in Mon Nov 19 15:40:39 2012
@@ -517,6 +517,9 @@ check: bin @TRANSFORM_LIBTOOL_SCRIPTS@ $
if test "$(SSL_CERT)" != ""; then \
flags="--ssl-cert $(SSL_CERT) $$flags"; \
fi; \
+ if test "$(HTTP_PROXY)" != ""; then \
+ flags="--http-proxy $(HTTP_PROXY) $$flags"; \
+ fi; \
LD_LIBRARY_PATH='$(auth_plugin_dirs):$(LD_LIBRARY_PATH)' \
$(PYTHON) $(top_srcdir)/build/run_tests.py \
--config-file $(top_srcdir)/subversion/tests/tests.conf \
Modified: subversion/branches/tree-read-api/build.conf
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/build.conf?rev=1411252&r1=1411251&r2=1411252&view=diff
==============================================================================
--- subversion/branches/tree-read-api/build.conf (original)
+++ subversion/branches/tree-read-api/build.conf Mon Nov 19 15:40:39 2012
@@ -886,14 +886,6 @@ sources = utf-test.c
install = test
libs = libsvn_test libsvn_subr apriconv apr
-[target-test]
-description = Test the condense_targets functions
-type = exe
-path = subversion/tests/libsvn_subr
-sources = target-test.c
-install = test
-libs = libsvn_test libsvn_subr apriconv apr
-
[subst_translate-test]
description = Test the svn_subst_translate* functions
type = exe
@@ -1022,6 +1014,14 @@ sources = wc-queries-test.c
install = test
libs = libsvn_test libsvn_subr apriconv apr sqlite
+[wc-test]
+description = Test the main WC API functions
+type = exe
+path = subversion/tests/libsvn_wc
+sources = wc-test.c utils.c
+install = test
+libs = libsvn_client libsvn_test libsvn_wc libsvn_subr apriconv apr
+
# ----------------------------------------------------------------------------
# These are not unit tests at all, they are small programs that exercise
# parts of the libsvn_delta API from the command line. They are stuck here
@@ -1171,7 +1171,7 @@ libs = __ALL__
strings-reps-test changes-test locks-test repos-test
checksum-test compat-test config-test hashdump-test mergeinfo-test
opt-test path-test stream-test string-test time-test utf-test
- target-test error-test cache-test spillbuf-test crypto-test
+ error-test cache-test spillbuf-test crypto-test
named_atomic-test named_atomic-proc-test revision-test
subst_translate-test io-test
translate-test
@@ -1180,10 +1180,10 @@ libs = __ALL__
ra-local-test
svndiff-test vdelta-test
entries-dump atomic-ra-revprop-change wc-lock-tester wc-incomplete-tester
- diff diff3 diff4 fsfs-reorg svn-bench
+ diff diff3 diff4 fsfs-reorg fsfs-stats svn-bench
client-test
conflict-data-test db-test pristine-store-test entries-compat-test
- op-depth-test dirent_uri-test wc-queries-test
+ op-depth-test dirent_uri-test wc-queries-test wc-test
auth-test
parse-diff-test
svn-rep-sharing-stats svn-populate-node-origins-index
@@ -1236,6 +1236,13 @@ sources = fsfs-reorg.c
install = tools
libs = libsvn_delta libsvn_subr apr
+[fsfs-stats]
+type = exe
+path = tools/server-side
+sources = fsfs-stats.c
+install = tools
+libs = libsvn_delta libsvn_subr apr
+
[diff]
type = exe
path = tools/diff
Modified: subversion/branches/tree-read-api/build/ac-macros/serf.m4
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/build/ac-macros/serf.m4?rev=1411252&r1=1411251&r2=1411252&view=diff
==============================================================================
--- subversion/branches/tree-read-api/build/ac-macros/serf.m4 (original)
+++ subversion/branches/tree-read-api/build/ac-macros/serf.m4 Mon Nov 19 15:40:39 2012
@@ -145,6 +145,7 @@ AC_DEFUN(SVN_SERF_PKG_CONFIG,
serf_found=yes
SVN_SERF_INCLUDES=[`$PKG_CONFIG $serf_major --cflags | $SED -e 's/-D[^ ]*//g'`]
SVN_SERF_LIBS=`$PKG_CONFIG $serf_major --libs`
+ break
else
AC_MSG_RESULT([no])
AC_MSG_WARN([Serf version too old: need $serf_check_version])
Modified: subversion/branches/tree-read-api/build/run_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/build/run_tests.py?rev=1411252&r1=1411251&r2=1411252&view=diff
==============================================================================
--- subversion/branches/tree-read-api/build/run_tests.py (original)
+++ subversion/branches/tree-read-api/build/run_tests.py Mon Nov 19 15:40:39 2012
@@ -28,7 +28,7 @@
[--url=<base-url>] [--http-library=<http-library>] [--enable-sasl]
[--fs-type=<fs-type>] [--fsfs-packing] [--fsfs-sharding=<n>]
[--list] [--milestone-filter=<regex>] [--mode-filter=<type>]
- [--server-minor-version=<version>]
+ [--server-minor-version=<version>] [--http-proxy=<host>:<port>]
[--config-file=<file>] [--ssl-cert=<file>]
<abs_srcdir> <abs_builddir>
<prog ...>
@@ -124,7 +124,8 @@ class TestHarness:
cleanup=None, enable_sasl=None, parallel=None, config_file=None,
fsfs_sharding=None, fsfs_packing=None,
list_tests=None, svn_bin=None, mode_filter=None,
- milestone_filter=None, set_log_level=None, ssl_cert=None):
+ milestone_filter=None, set_log_level=None, ssl_cert=None,
+ http_proxy=None):
'''Construct a TestHarness instance.
ABS_SRCDIR and ABS_BUILDDIR are the source and build directories.
@@ -176,6 +177,7 @@ class TestHarness:
self.mode_filter = mode_filter
self.log = None
self.ssl_cert = ssl_cert
+ self.http_proxy = http_proxy
if not sys.stdout.isatty() or sys.platform == 'win32':
TextColors.disable()
@@ -477,6 +479,8 @@ class TestHarness:
svntest.main.options.mode_filter = self.mode_filter
if self.ssl_cert is not None:
svntest.main.options.ssl_cert = self.ssl_cert
+ if self.http_proxy is not None:
+ svntest.main.options.http_proxy = self.http_proxy
svntest.main.options.srcdir = self.srcdir
@@ -640,7 +644,8 @@ def main():
'fsfs-packing', 'fsfs-sharding=',
'enable-sasl', 'parallel', 'config-file=',
'log-to-stdout', 'list', 'milestone-filter=',
- 'mode-filter=', 'set-log-level=', 'ssl-cert='])
+ 'mode-filter=', 'set-log-level=', 'ssl-cert=',
+ 'http-proxy='])
except getopt.GetoptError:
args = []
@@ -651,9 +656,9 @@ def main():
base_url, fs_type, verbose, cleanup, enable_sasl, http_library, \
server_minor_version, fsfs_sharding, fsfs_packing, parallel, \
config_file, log_to_stdout, list_tests, mode_filter, milestone_filter, \
- set_log_level, ssl_cert = \
+ set_log_level, ssl_cert, http_proxy = \
None, None, None, None, None, None, None, None, None, None, None, \
- None, None, None, None, None, None
+ None, None, None, None, None, None, None
for opt, val in opts:
if opt in ['-u', '--url']:
base_url = val
@@ -689,6 +694,8 @@ def main():
set_log_level = val
elif opt in ['--ssl-cert']:
ssl_cert = val
+ elif opt in ['--http-proxy']:
+ http_proxy = val
else:
raise getopt.GetoptError
@@ -704,7 +711,8 @@ def main():
verbose, cleanup, enable_sasl, parallel, config_file,
fsfs_sharding, fsfs_packing, list_tests,
mode_filter=mode_filter, milestone_filter=milestone_filter,
- set_log_level=set_log_level, ssl_cert=ssl_cert)
+ set_log_level=set_log_level, ssl_cert=ssl_cert,
+ http_proxy=http_proxy)
failed = th.run(args[2:])
if failed:
Modified: subversion/branches/tree-read-api/contrib/client-side/svnmerge/svnmerge_test.py
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/contrib/client-side/svnmerge/svnmerge_test.py?rev=1411252&r1=1411251&r2=1411252&view=diff
==============================================================================
--- subversion/branches/tree-read-api/contrib/client-side/svnmerge/svnmerge_test.py (original)
+++ subversion/branches/tree-read-api/contrib/client-side/svnmerge/svnmerge_test.py Mon Nov 19 15:40:39 2012
@@ -1139,7 +1139,7 @@ D test3"""
def testMergeAndRollbackEmptyRevisionRange(self):
"""Init svnmerge, modify source head, merge, rollback where no merge
- occured."""
+ occurred."""
# Initialize svnmerge
self.svnmerge2(["init", self.test_repo_url + "/trunk"])
Modified: subversion/branches/tree-read-api/contrib/server-side/svncutter/svncutter
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/contrib/server-side/svncutter/svncutter?rev=1411252&r1=1411251&r2=1411252&view=diff
==============================================================================
--- subversion/branches/tree-read-api/contrib/server-side/svncutter/svncutter (original)
+++ subversion/branches/tree-read-api/contrib/server-side/svncutter/svncutter Mon Nov 19 15:40:39 2012
@@ -5,14 +5,14 @@
# under the prevailing license of their project.
"""
-svncutter - clique-squash, range-selection, and property mutations on SVN dump files
+svncutter - clique-squash, range-selection, property mutations, and skeletonization on SVN dump files
general usage: svncutter [-q] [-r SELECTION] SUBCOMMAND
In all commands, the -r (or --range) option limits the selection of revisions
over which an operation will be performed. A selection consists of
one or more comma-separated ranges. A range may consist of an integer
revision number or the special name HEAD for the head revision. Or it
-may be a colon-separated pair of integers, ir an integer followed by a
+may be a colon-separated pair of integers, or an integer followed by a
colon followed by HEAD.
Normally, each subcommand produces a progress spinner on standard
@@ -29,6 +29,7 @@ Available subcommands:
proprename
log
setlog
+ skeleton
"""
oneliners = {
@@ -39,6 +40,7 @@ oneliners = {
"proprename": "Renaming revision properties",
"log": "Extracting log entries",
"setlog": "Mutating log entries",
+ "skeleton": "strip content, leave only headers",
}
helpdict = {
@@ -51,7 +53,7 @@ This can be helpful in cleaning up after
revision control systems, or if a developer has been using a pre-2006
version of Emacs VC.
-With the -m (or --mapfile) option, squash emits a map to tne named
+With the -m (or --mapfile) option, squash emits a map to the named
file showing how old revision numbers map into new ones.
With the -e (or --excise) option, the specified set of revisions in
@@ -68,7 +70,7 @@ anything that looks like the regular exp
a comment reference (this is the same format that Subversion uses
in log headers).
-Every revision in the file after the first omiited onf gets the property
+Every revision in the file after the first omitted one gets the property
'svncutter:original' set to the revision number it had before the
squash operation.
@@ -121,6 +123,12 @@ Replace the log entries in the input dum
in the LOGFILE, which should be in the format of an svn log output.
Replacements may be restricted to a specified range.
""",
+ "skeleton": """\
+skeleton: usage: svncutter [-r SELECTION] skeleton
+
+Strip out all content. Does not produce a valid dumpfile, but may be useful
+when you need to examine a particularly complex node structure.
+""",
}
import os, sys, calendar, time, getopt, re
@@ -177,7 +185,7 @@ class LineBufferedSource:
"Read a line, require it to have a specified prefix."
line = self.readline()
if not line:
- sys.stderr.write("svncutter: unexpected end of input." + os.linesep)
+ sys.stderr.write("svncutter: unexpected end of input while requiring '%s' input." % prefix + os.linesep)
sys.exit(1)
assert line.startswith(prefix)
return line
@@ -211,7 +219,7 @@ class DumpfileSource(LineBufferedSource)
LineBufferedSource.__init__(self, infile)
self.baton = baton
def read_revision_header(self, property_hook=None):
- "Read a revision header, parsing its proprties."
+ "Read a revision header, parsing its properties."
properties = {}
propkeys = []
stash = self.require("Revision-number:")
@@ -241,6 +249,43 @@ class DumpfileSource(LineBufferedSource)
if self.baton:
self.baton.twirl()
return (revision, stash, properties)
+ def read_node(self):
+ "Read a node header and body."
+ #print "READ NODE BEGINS"
+ header = self.require("Node-path:")
+ while True:
+ line = self.readline()
+ #print "I see header line", repr(line)
+ if not line:
+ sys.stderr.write('unexpected EOF in node header' + os.linesep)
+ sys.exit(1)
+ header += line
+ if line == '\n':
+ break
+ properties = ""
+ if "Prop-content-length" in header:
+ while True:
+ line = self.readline()
+ #print "I see property line", repr(line)
+ if not line:
+ sys.stderr.write('unexpected EOF in node properties' + os.linesep)
+ sys.exit(1)
+ properties += line
+ if line == 'PROPS-END\n':
+ break
+ content = ""
+ if "Text-content-length" in header:
+ while True:
+ line = self.readline()
+ #print "I see contents line", repr(line)
+ if not line:
+ break
+ content += line
+ if line.startswith("Node-path:") or line.startswith("Revision-number"):
+ self.push(line)
+ break
+ #print "READ NODE ENDS"
+ return (header, properties, content)
def read_until_next(self, prefix, revmap=None):
"Accumulate lines until the next matches a specified prefix."
stash = ""
@@ -312,7 +357,7 @@ class SubversionRange:
return self.txt
class Logfile:
- "Represent the state of a lofile"
+ "Represent the state of a logfile"
def __init__(self, readable, restriction=None):
self.comments = {}
self.source = LineBufferedSource(readable)
@@ -610,12 +655,49 @@ def setlog(source, logpatch, selection):
return (propkeys, propdict)
source.apply_property_hook(selection, loghook)
+def skeletonize(source, selection):
+ "Skeletonize a portion of the dump file defined by a revision selection."
+ emit = 0 in selection
+ stash = source.read_until_next("Revision-number:")
+ if emit:
+ sys.stdout.write(stash)
+ if not source.has_line_buffered():
+ return
+ while True:
+ (revision,stash,properties) = source.read_revision_header()
+ if revision in selection:
+ sys.stdout.write(stash)
+ emit = True
+ elif revision == selection.upperbound()+1:
+ return
+ else:
+ source.read_until_next("Revision-number:")
+ continue
+ while True:
+ line = source.readline()
+ if not line:
+ return
+ elif line == '\n':
+ sys.stdout.write(line)
+ continue
+ elif line.startswith("Revision-number:"):
+ source.push(line)
+ break
+ elif line.startswith("Node-path:"):
+ source.push(line)
+ (header, properties, content) = source.read_node()
+ sys.stdout.write(header + properties)
+ continue
+ else:
+ sys.stderr.write("svncutter: parse at %s doesn't look right (%s), aborting!\n" % (revision, repr(line)))
+ sys.exit(1)
+
if __name__ == '__main__':
try:
- (options, arguments) = getopt.getopt(sys.argv[1:], "ce:fl:m:p:qr:",
+ (options, arguments) = getopt.getopt(sys.argv[1:], "ce:fl:m:p:qr:s",
["excise", "flagrefs", "revprop=",
"logpatch=", "map=",
- "quiet", "range="])
+ "quiet", "range=", "skeleton"])
selection = SubversionRange("0:HEAD")
timefuzz = 300 # 5 minute fuzz
compressmap = False
@@ -646,11 +728,11 @@ if __name__ == '__main__':
sys.stderr.write("Type 'svncutter help' for usage." + os.linesep)
sys.exit(1)
baton = None
- #if arguments[0] != 'help':
- # if progress:
- # baton = Baton(oneliners[arguments[0]], "done")
- # else:
- # baton = None
+ if arguments[0] != 'help':
+ if progress:
+ baton = Baton(oneliners[arguments[0]], "done")
+ else:
+ baton = None
if arguments[0] == "squash":
squash(DumpfileSource(sys.stdin, baton),
timefuzz, mapto, selection, excise, flagrefs, compressmap)
@@ -678,6 +760,8 @@ if __name__ == '__main__':
if not logpatch:
sys.stderr.write("svncutter: setlog requires a log entries file.\n")
setlog(DumpfileSource(sys.stdin, baton), logpatch, selection)
+ elif arguments[0] == "skeleton":
+ skeletonize(DumpfileSource(sys.stdin, baton), selection)
elif arguments[0] == "help":
if len(arguments) == 1:
sys.stdout.write(__doc__)
Modified: subversion/branches/tree-read-api/subversion/bindings/javahl/native/Path.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/bindings/javahl/native/Path.cpp?rev=1411252&r1=1411251&r2=1411252&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/bindings/javahl/native/Path.cpp (original)
+++ subversion/branches/tree-read-api/subversion/bindings/javahl/native/Path.cpp Mon Nov 19 15:40:39 2012
@@ -73,12 +73,12 @@ Path::init(const char *pi_path, SVN::Poo
{
if (*pi_path == 0)
{
- m_error_occured = NULL;
+ m_error_occurred = NULL;
m_path = "";
}
else
{
- m_error_occured = JNIUtil::preprocessPath(pi_path, in_pool.getPool());
+ m_error_occurred = JNIUtil::preprocessPath(pi_path, in_pool.getPool());
m_path = pi_path;
}
@@ -108,15 +108,15 @@ Path::c_str() const
Path&
Path::operator=(const Path &pi_path)
{
- m_error_occured = NULL;
+ m_error_occurred = NULL;
m_path = pi_path.m_path;
return *this;
}
- svn_error_t *Path::error_occured() const
+ svn_error_t *Path::error_occurred() const
{
- return m_error_occured;
+ return m_error_occurred;
}
jboolean Path::isValid(const char *p)
Modified: subversion/branches/tree-read-api/subversion/bindings/javahl/native/Path.h
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/bindings/javahl/native/Path.h?rev=1411252&r1=1411251&r2=1411252&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/bindings/javahl/native/Path.h (original)
+++ subversion/branches/tree-read-api/subversion/bindings/javahl/native/Path.h Mon Nov 19 15:40:39 2012
@@ -41,7 +41,7 @@ class Path
// The path to be stored.
std::string m_path;
- svn_error_t *m_error_occured;
+ svn_error_t *m_error_occurred;
/**
* Initialize the class.
@@ -90,7 +90,7 @@ class Path
*/
const char *c_str() const;
- svn_error_t *error_occured() const;
+ svn_error_t *error_occurred() const;
/**
* Returns whether @a path is non-NULL and passes the @c
Modified: subversion/branches/tree-read-api/subversion/bindings/javahl/native/SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/bindings/javahl/native/SVNClient.cpp?rev=1411252&r1=1411251&r2=1411252&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/bindings/javahl/native/SVNClient.cpp (original)
+++ subversion/branches/tree-read-api/subversion/bindings/javahl/native/SVNClient.cpp Mon Nov 19 15:40:39 2012
@@ -131,7 +131,7 @@ void SVNClient::list(const char *url, Re
SVN_JNI_NULL_PTR_EX(url, "path or url", );
Path urlPath(url, subPool);
- SVN_JNI_ERR(urlPath.error_occured(), );
+ SVN_JNI_ERR(urlPath.error_occurred(), );
SVN_JNI_ERR(svn_client_list2(urlPath.c_str(),
pegRevision.revision(),
@@ -162,7 +162,7 @@ SVNClient::status(const char *path, svn_
callback->setWcCtx(ctx->wc_ctx);
Path checkedPath(path, subPool);
- SVN_JNI_ERR(checkedPath.error_occured(), );
+ SVN_JNI_ERR(checkedPath.error_occurred(), );
rev.kind = svn_opt_revision_unspecified;
@@ -229,7 +229,7 @@ void SVNClient::logMessages(const char *
Targets target(path, subPool);
const apr_array_header_t *targets = target.array(subPool);
- SVN_JNI_ERR(target.error_occured(), );
+ SVN_JNI_ERR(target.error_occurred(), );
apr_array_header_t *ranges =
rev_range_vector_to_apr_array(logRanges, subPool);
@@ -256,8 +256,8 @@ jlong SVNClient::checkout(const char *mo
Path url(moduleName, subPool);
Path path(destPath, subPool);
- SVN_JNI_ERR(url.error_occured(), -1);
- SVN_JNI_ERR(path.error_occured(), -1);
+ SVN_JNI_ERR(url.error_occurred(), -1);
+ SVN_JNI_ERR(path.error_occurred(), -1);
svn_revnum_t rev;
svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
@@ -288,7 +288,7 @@ void SVNClient::remove(Targets &targets,
return;
const apr_array_header_t *targets2 = targets.array(subPool);
- SVN_JNI_ERR(targets.error_occured(), );
+ SVN_JNI_ERR(targets.error_occurred(), );
SVN_JNI_ERR(svn_client_delete4(targets2, force, keep_local,
revprops.hash(subPool),
@@ -309,7 +309,7 @@ void SVNClient::revert(const char *path,
Targets target(path, subPool);
const apr_array_header_t *targets = target.array(subPool);
- SVN_JNI_ERR(target.error_occured(), );
+ SVN_JNI_ERR(target.error_occurred(), );
SVN_JNI_ERR(svn_client_revert2(targets, depth,
changelists.array(subPool), ctx,
subPool.getPool()), );
@@ -324,7 +324,7 @@ void SVNClient::add(const char *path,
SVN_JNI_NULL_PTR_EX(path, "path", );
Path intPath(path, subPool);
- SVN_JNI_ERR(intPath.error_occured(), );
+ SVN_JNI_ERR(intPath.error_occurred(), );
svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
if (ctx == NULL)
return;
@@ -347,7 +347,7 @@ jlongArray SVNClient::update(Targets &ta
return NULL;
const apr_array_header_t *array = targets.array(subPool);
- SVN_JNI_ERR(targets.error_occured(), NULL);
+ SVN_JNI_ERR(targets.error_occurred(), NULL);
SVN_JNI_ERR(svn_client_update4(&revs, array,
revision.revision(),
depth,
@@ -383,7 +383,7 @@ void SVNClient::commit(Targets &targets,
{
SVN::Pool subPool(pool);
const apr_array_header_t *targets2 = targets.array(subPool);
- SVN_JNI_ERR(targets.error_occured(), );
+ SVN_JNI_ERR(targets.error_occurred(), );
svn_client_ctx_t *ctx = context.getContext(message, subPool);
if (ctx == NULL)
return;
@@ -413,7 +413,7 @@ void SVNClient::copy(CopySources ©So
}
SVN_JNI_NULL_PTR_EX(destPath, "destPath", );
Path destinationPath(destPath, subPool);
- SVN_JNI_ERR(destinationPath.error_occured(), );
+ SVN_JNI_ERR(destinationPath.error_occurred(), );
svn_client_ctx_t *ctx = context.getContext(message, subPool);
if (ctx == NULL)
@@ -434,10 +434,10 @@ void SVNClient::move(Targets &srcPaths,
SVN::Pool subPool(pool);
const apr_array_header_t *srcs = srcPaths.array(subPool);
- SVN_JNI_ERR(srcPaths.error_occured(), );
+ SVN_JNI_ERR(srcPaths.error_occurred(), );
SVN_JNI_NULL_PTR_EX(destPath, "destPath", );
Path destinationPath(destPath, subPool);
- SVN_JNI_ERR(destinationPath.error_occured(), );
+ SVN_JNI_ERR(destinationPath.error_occurred(), );
svn_client_ctx_t *ctx = context.getContext(message, subPool);
if (ctx == NULL)
@@ -460,7 +460,7 @@ void SVNClient::mkdir(Targets &targets,
return;
const apr_array_header_t *targets2 = targets.array(subPool);
- SVN_JNI_ERR(targets.error_occured(), );
+ SVN_JNI_ERR(targets.error_occurred(), );
SVN_JNI_ERR(svn_client_mkdir4(targets2, makeParents,
revprops.hash(subPool),
@@ -473,7 +473,7 @@ void SVNClient::cleanup(const char *path
SVN::Pool subPool(pool);
SVN_JNI_NULL_PTR_EX(path, "path", );
Path intPath(path, subPool);
- SVN_JNI_ERR(intPath.error_occured(), );
+ SVN_JNI_ERR(intPath.error_occurred(), );
svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
if (ctx == NULL)
@@ -488,7 +488,7 @@ void SVNClient::resolve(const char *path
SVN::Pool subPool(pool);
SVN_JNI_NULL_PTR_EX(path, "path", );
Path intPath(path, subPool);
- SVN_JNI_ERR(intPath.error_occured(), );
+ SVN_JNI_ERR(intPath.error_occurred(), );
svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
if (ctx == NULL)
return;
@@ -506,9 +506,9 @@ jlong SVNClient::doExport(const char *sr
SVN_JNI_NULL_PTR_EX(srcPath, "srcPath", -1);
SVN_JNI_NULL_PTR_EX(destPath, "destPath", -1);
Path sourcePath(srcPath, subPool);
- SVN_JNI_ERR(sourcePath.error_occured(), -1);
+ SVN_JNI_ERR(sourcePath.error_occurred(), -1);
Path destinationPath(destPath, subPool);
- SVN_JNI_ERR(destinationPath.error_occured(), -1);
+ SVN_JNI_ERR(destinationPath.error_occurred(), -1);
svn_revnum_t rev;
svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
if (ctx == NULL)
@@ -539,9 +539,9 @@ jlong SVNClient::doSwitch(const char *pa
SVN_JNI_NULL_PTR_EX(path, "path", -1);
SVN_JNI_NULL_PTR_EX(url, "url", -1);
Path intUrl(url, subPool);
- SVN_JNI_ERR(intUrl.error_occured(), -1);
+ SVN_JNI_ERR(intUrl.error_occurred(), -1);
Path intPath(path, subPool);
- SVN_JNI_ERR(intPath.error_occured(), -1);
+ SVN_JNI_ERR(intPath.error_occurred(), -1);
svn_revnum_t rev;
svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
@@ -575,9 +575,9 @@ void SVNClient::doImport(const char *pat
SVN_JNI_NULL_PTR_EX(path, "path", );
SVN_JNI_NULL_PTR_EX(url, "url", );
Path intPath(path, subPool);
- SVN_JNI_ERR(intPath.error_occured(), );
+ SVN_JNI_ERR(intPath.error_occurred(), );
Path intUrl(url, subPool);
- SVN_JNI_ERR(intUrl.error_occured(), );
+ SVN_JNI_ERR(intUrl.error_occurred(), );
svn_client_ctx_t *ctx = context.getContext(message, subPool);
if (ctx == NULL)
@@ -618,13 +618,13 @@ void SVNClient::merge(const char *path1,
SVN_JNI_NULL_PTR_EX(path2, "path2", );
SVN_JNI_NULL_PTR_EX(localPath, "localPath", );
Path intLocalPath(localPath, subPool);
- SVN_JNI_ERR(intLocalPath.error_occured(), );
+ SVN_JNI_ERR(intLocalPath.error_occurred(), );
Path srcPath1(path1, subPool);
- SVN_JNI_ERR(srcPath1.error_occured(), );
+ SVN_JNI_ERR(srcPath1.error_occurred(), );
Path srcPath2(path2, subPool);
- SVN_JNI_ERR(srcPath2.error_occured(), );
+ SVN_JNI_ERR(srcPath2.error_occurred(), );
svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
if (ctx == NULL)
@@ -647,10 +647,10 @@ void SVNClient::merge(const char *path,
SVN_JNI_NULL_PTR_EX(path, "path", );
SVN_JNI_NULL_PTR_EX(localPath, "localPath", );
Path intLocalPath(localPath, subPool);
- SVN_JNI_ERR(intLocalPath.error_occured(), );
+ SVN_JNI_ERR(intLocalPath.error_occurred(), );
Path srcPath(path, subPool);
- SVN_JNI_ERR(srcPath.error_occured(), );
+ SVN_JNI_ERR(srcPath.error_occurred(), );
svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
if (ctx == NULL)
@@ -678,10 +678,10 @@ void SVNClient::mergeReintegrate(const c
SVN_JNI_NULL_PTR_EX(path, "path", );
SVN_JNI_NULL_PTR_EX(localPath, "localPath", );
Path intLocalPath(localPath, subPool);
- SVN_JNI_ERR(intLocalPath.error_occured(), );
+ SVN_JNI_ERR(intLocalPath.error_occurred(), );
Path srcPath(path, subPool);
- SVN_JNI_ERR(srcPath.error_occured(), );
+ SVN_JNI_ERR(srcPath.error_occurred(), );
svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
if (ctx == NULL)
@@ -706,7 +706,7 @@ SVNClient::getMergeinfo(const char *targ
svn_mergeinfo_t mergeinfo;
Path intLocalTarget(target, subPool);
- SVN_JNI_ERR(intLocalTarget.error_occured(), NULL);
+ SVN_JNI_ERR(intLocalTarget.error_occurred(), NULL);
SVN_JNI_ERR(svn_client_mergeinfo_get_merged(&mergeinfo,
intLocalTarget.c_str(),
pegRevision.revision(), ctx,
@@ -784,11 +784,11 @@ void SVNClient::getMergeinfoLog(int type
SVN_JNI_NULL_PTR_EX(pathOrURL, "path or url", );
Path urlPath(pathOrURL, subPool);
- SVN_JNI_ERR(urlPath.error_occured(), );
+ SVN_JNI_ERR(urlPath.error_occurred(), );
SVN_JNI_NULL_PTR_EX(mergeSourceURL, "merge source url", );
Path srcURL(mergeSourceURL, subPool);
- SVN_JNI_ERR(srcURL.error_occured(), );
+ SVN_JNI_ERR(srcURL.error_occurred(), );
SVN_JNI_ERR(svn_client_mergeinfo_log((type == 1),
urlPath.c_str(),
@@ -817,7 +817,7 @@ jbyteArray SVNClient::propertyGet(const
SVN_JNI_NULL_PTR_EX(path, "path", NULL);
SVN_JNI_NULL_PTR_EX(name, "name", NULL);
Path intPath(path, subPool);
- SVN_JNI_ERR(intPath.error_occured(), NULL);
+ SVN_JNI_ERR(intPath.error_occurred(), NULL);
svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
if (ctx == NULL)
@@ -853,7 +853,7 @@ void SVNClient::properties(const char *p
SVN::Pool subPool(pool);
SVN_JNI_NULL_PTR_EX(path, "path", );
Path intPath(path, subPool);
- SVN_JNI_ERR(intPath.error_occured(), );
+ SVN_JNI_ERR(intPath.error_occurred(), );
svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
if (ctx == NULL)
@@ -915,7 +915,7 @@ void SVNClient::propertySetRemote(const
subPool.getPool());
Path intPath(path, subPool);
- SVN_JNI_ERR(intPath.error_occured(), );
+ SVN_JNI_ERR(intPath.error_occurred(), );
svn_client_ctx_t *ctx = context.getContext(message, subPool);
if (ctx == NULL)
@@ -951,7 +951,7 @@ void SVNClient::diff(const char *target1
return;
Path path1(target1, subPool);
- SVN_JNI_ERR(path1.error_occured(), );
+ SVN_JNI_ERR(path1.error_occurred(), );
// We don't use any options to diff.
apr_array_header_t *diffOptions = apr_array_make(subPool.getPool(),
@@ -985,7 +985,7 @@ void SVNClient::diff(const char *target1
{
// "Regular" diff (without a peg revision).
Path path2(target2, subPool);
- SVN_JNI_ERR(path2.error_occured(), );
+ SVN_JNI_ERR(path2.error_occurred(), );
SVN_JNI_ERR(svn_client_diff6(diffOptions,
path1.c_str(),
@@ -1053,9 +1053,9 @@ SVNClient::diffSummarize(const char *tar
return;
Path path1(target1, subPool);
- SVN_JNI_ERR(path1.error_occured(), );
+ SVN_JNI_ERR(path1.error_occurred(), );
Path path2(target2, subPool);
- SVN_JNI_ERR(path2.error_occured(), );
+ SVN_JNI_ERR(path2.error_occurred(), );
SVN_JNI_ERR(svn_client_diff_summarize2(path1.c_str(), revision1.revision(),
path2.c_str(), revision2.revision(),
@@ -1082,7 +1082,7 @@ SVNClient::diffSummarize(const char *tar
return;
Path path(target, subPool);
- SVN_JNI_ERR(path.error_occured(), );
+ SVN_JNI_ERR(path.error_occurred(), );
SVN_JNI_ERR(svn_client_diff_summarize_peg2(path.c_str(),
pegRevision.revision(),
@@ -1103,7 +1103,7 @@ void SVNClient::streamFileContent(const
SVN::Pool subPool(pool);
SVN_JNI_NULL_PTR_EX(path, "path", );
Path intPath(path, subPool);
- SVN_JNI_ERR(intPath.error_occured(), );
+ SVN_JNI_ERR(intPath.error_occurred(), );
svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
if (ctx == NULL)
@@ -1122,7 +1122,7 @@ jbyteArray SVNClient::revProperty(const
SVN_JNI_NULL_PTR_EX(path, "path", NULL);
SVN_JNI_NULL_PTR_EX(name, "name", NULL);
Path intPath(path, subPool);
- SVN_JNI_ERR(intPath.error_occured(), NULL);
+ SVN_JNI_ERR(intPath.error_occurred(), NULL);
svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
if (ctx == NULL)
@@ -1160,13 +1160,13 @@ void SVNClient::relocate(const char *fro
SVN_JNI_NULL_PTR_EX(from, "from", );
SVN_JNI_NULL_PTR_EX(to, "to", );
Path intPath(path, subPool);
- SVN_JNI_ERR(intPath.error_occured(), );
+ SVN_JNI_ERR(intPath.error_occurred(), );
Path intFrom(from, subPool);
- SVN_JNI_ERR(intFrom.error_occured(), );
+ SVN_JNI_ERR(intFrom.error_occurred(), );
Path intTo(to, subPool);
- SVN_JNI_ERR(intTo.error_occured(), );
+ SVN_JNI_ERR(intTo.error_occurred(), );
svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
if (ctx == NULL)
@@ -1185,7 +1185,7 @@ void SVNClient::blame(const char *path,
SVN::Pool subPool(pool);
SVN_JNI_NULL_PTR_EX(path, "path", );
Path intPath(path, subPool);
- SVN_JNI_ERR(intPath.error_occured(), );
+ SVN_JNI_ERR(intPath.error_occurred(), );
svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
if (ctx == NULL)
@@ -1207,7 +1207,7 @@ void SVNClient::addToChangelist(Targets
svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
const apr_array_header_t *srcs = srcPaths.array(subPool);
- SVN_JNI_ERR(srcPaths.error_occured(), );
+ SVN_JNI_ERR(srcPaths.error_occurred(), );
SVN_JNI_ERR(svn_client_add_to_changelist(srcs, changelist, depth,
changelists.array(subPool),
@@ -1221,7 +1221,7 @@ void SVNClient::removeFromChangelists(Ta
svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
const apr_array_header_t *srcs = srcPaths.array(subPool);
- SVN_JNI_ERR(srcPaths.error_occured(), );
+ SVN_JNI_ERR(srcPaths.error_occurred(), );
SVN_JNI_ERR(svn_client_remove_from_changelists(srcs, depth,
changelists.array(subPool),
@@ -1247,7 +1247,7 @@ void SVNClient::lock(Targets &targets, c
{
SVN::Pool subPool(pool);
const apr_array_header_t *targetsApr = targets.array(subPool);
- SVN_JNI_ERR(targets.error_occured(), );
+ SVN_JNI_ERR(targets.error_occurred(), );
svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
SVN_JNI_ERR(svn_client_lock(targetsApr, comment, force, ctx,
@@ -1259,7 +1259,7 @@ void SVNClient::unlock(Targets &targets,
SVN::Pool subPool(pool);
const apr_array_header_t *targetsApr = targets.array(subPool);
- SVN_JNI_ERR(targets.error_occured(), );
+ SVN_JNI_ERR(targets.error_occurred(), );
svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
SVN_JNI_ERR(svn_client_unlock(
targetsApr, force, ctx, subPool.getPool()), );
@@ -1273,7 +1273,7 @@ void SVNClient::setRevProperty(const cha
SVN_JNI_NULL_PTR_EX(path, "path", );
SVN_JNI_NULL_PTR_EX(name, "name", );
Path intPath(path, subPool);
- SVN_JNI_ERR(intPath.error_occured(), );
+ SVN_JNI_ERR(intPath.error_occurred(), );
svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
if (ctx == NULL)
@@ -1311,7 +1311,7 @@ jstring SVNClient::getVersionInfo(const
SVN_JNI_NULL_PTR_EX(path, "path", NULL);
Path intPath(path, subPool);
- SVN_JNI_ERR(intPath.error_occured(), NULL);
+ SVN_JNI_ERR(intPath.error_occurred(), NULL);
int wc_format;
svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
@@ -1378,7 +1378,7 @@ void SVNClient::upgrade(const char *path
return;
Path checkedPath(path, subPool);
- SVN_JNI_ERR(checkedPath.error_occured(), );
+ SVN_JNI_ERR(checkedPath.error_occurred(), );
SVN_JNI_ERR(svn_client_upgrade(path, ctx, subPool.getPool()), );
}
@@ -1389,7 +1389,7 @@ jobject SVNClient::revProperties(const c
SVN::Pool subPool(pool);
SVN_JNI_NULL_PTR_EX(path, "path", NULL);
Path intPath(path, subPool);
- SVN_JNI_ERR(intPath.error_occured(), NULL);
+ SVN_JNI_ERR(intPath.error_occurred(), NULL);
svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
const char *URL;
@@ -1428,7 +1428,7 @@ SVNClient::info2(const char *path, Revis
return;
Path checkedPath(path, subPool);
- SVN_JNI_ERR(checkedPath.error_occured(), );
+ SVN_JNI_ERR(checkedPath.error_occurred(), );
SVN_JNI_ERR(svn_client_info3(checkedPath.c_str(),
pegRevision.revision(),
@@ -1453,9 +1453,9 @@ SVNClient::patch(const char *patchPath,
return;
Path checkedPatchPath(patchPath, subPool);
- SVN_JNI_ERR(checkedPatchPath.error_occured(), );
+ SVN_JNI_ERR(checkedPatchPath.error_occurred(), );
Path checkedTargetPath(targetPath, subPool);
- SVN_JNI_ERR(checkedTargetPath.error_occured(), );
+ SVN_JNI_ERR(checkedTargetPath.error_occurred(), );
// Should parameterize the following, instead of defaulting to FALSE
SVN_JNI_ERR(svn_client_patch(checkedPatchPath.c_str(),
Modified: subversion/branches/tree-read-api/subversion/bindings/javahl/native/Targets.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/bindings/javahl/native/Targets.cpp?rev=1411252&r1=1411251&r2=1411252&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/bindings/javahl/native/Targets.cpp (original)
+++ subversion/branches/tree-read-api/subversion/bindings/javahl/native/Targets.cpp Mon Nov 19 15:40:39 2012
@@ -41,7 +41,7 @@ Targets::Targets(const char *path, SVN::
{
m_strArray = NULL;
m_targets.push_back(apr_pstrdup(m_subpool.getPool(), path));
- m_error_occured = NULL;
+ m_error_occurred = NULL;
}
void Targets::add(const char *path)
@@ -62,7 +62,7 @@ const apr_array_header_t *Targets::array
svn_error_t *err = JNIUtil::preprocessPath(tt, pool.getPool());
if (err != NULL)
{
- m_error_occured = err;
+ m_error_occurred = err;
break;
}
m_targets.push_back(tt);
@@ -83,7 +83,7 @@ const apr_array_header_t *Targets::array
svn_error_t *err = JNIUtil::preprocessPath(target, pool.getPool());
if (err != NULL)
{
- m_error_occured = err;
+ m_error_occurred = err;
break;
}
APR_ARRAY_PUSH(apr_targets, const char *) = target;
@@ -96,10 +96,10 @@ Targets::Targets(StringArray &strArray,
: m_subpool(in_pool)
{
m_strArray = &strArray;
- m_error_occured = NULL;
+ m_error_occurred = NULL;
}
-svn_error_t *Targets::error_occured()
+svn_error_t *Targets::error_occurred()
{
- return m_error_occured;
+ return m_error_occurred;
}
Modified: subversion/branches/tree-read-api/subversion/bindings/javahl/native/Targets.h
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/bindings/javahl/native/Targets.h?rev=1411252&r1=1411251&r2=1411252&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/bindings/javahl/native/Targets.h (original)
+++ subversion/branches/tree-read-api/subversion/bindings/javahl/native/Targets.h Mon Nov 19 15:40:39 2012
@@ -43,14 +43,14 @@ class Targets
SVN::Pool m_subpool;
std::vector<const char*> m_targets;
StringArray *m_strArray;
- svn_error_t *m_error_occured;
+ svn_error_t *m_error_occurred;
public:
Targets(StringArray &strArray, SVN::Pool &in_pool);
Targets(const char *path, SVN::Pool &in_pool);
void add(const char *path);
~Targets();
const apr_array_header_t *array(const SVN::Pool &pool);
- svn_error_t *error_occured();
+ svn_error_t *error_occurred();
};
#endif // TARGETS_H
Modified: subversion/branches/tree-read-api/subversion/bindings/swig/perl/native/Repos.pm
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/bindings/swig/perl/native/Repos.pm?rev=1411252&r1=1411251&r2=1411252&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/bindings/swig/perl/native/Repos.pm (original)
+++ subversion/branches/tree-read-api/subversion/bindings/swig/perl/native/Repos.pm Mon Nov 19 15:40:39 2012
@@ -183,11 +183,11 @@ of paths that have changed in this revis
=item $rev
-The revision this change occured in.
+The revision this change occurred in.
=item $date
-The date and time the revision occured.
+The date and time the revision occurred.
=item $msg
Modified: subversion/branches/tree-read-api/subversion/include/private/svn_named_atomic.h
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/include/private/svn_named_atomic.h?rev=1411252&r1=1411251&r2=1411252&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/include/private/svn_named_atomic.h (original)
+++ subversion/branches/tree-read-api/subversion/include/private/svn_named_atomic.h Mon Nov 19 15:40:39 2012
@@ -54,7 +54,7 @@ typedef struct svn_named_atomic__t svn_n
/** Returns #FALSE when named atomics are not available to our process
* and svn_atomic_namespace__create is likely to fail.
*
- * Please note that the actual check will be performed only once and later
+ * @note The actual check will be performed only once and later
* changes in process privileges will not reflect in the outcome of future
* calls to this function.
*/
@@ -76,7 +76,7 @@ svn_named_atomic__is_efficient(void);
* the same shared memory region but have independent lifetimes.
*
* The access object will be allocated in @a result_pool and atomics gotten
- * from this object will become invalid when the pool is being cleaned.
+ * from this object will become invalid when the pool is being cleared.
*/
svn_error_t *
svn_atomic_namespace__create(svn_atomic_namespace__t **ns,
@@ -104,7 +104,7 @@ svn_atomic_namespace__cleanup(const char
* characters and an error will be returned if the specified name is longer
* than supported.
*
- * Please note that the lifetime of the atomic is bound to the lifetime
+ * @note The lifetime of the atomic is bound to the lifetime
* of the @a ns object, i.e. the pool the latter was created in.
*/
svn_error_t *
@@ -120,8 +120,8 @@ svn_error_t *
svn_named_atomic__read(apr_int64_t *value,
svn_named_atomic__t *atomic);
-/** Set the data in @a atomic to @a NEW_VALUE and return its old content
- * in @a OLD_VALUE. @a OLD_VALUE may be NULL.
+/** Set the data in @a atomic to @a new_value and return its old content
+ * in @a *old_value. @a old_value may be NULL.
*
* An error will be returned if @a atomic is @c NULL.
*/
@@ -131,7 +131,7 @@ svn_named_atomic__write(apr_int64_t *old
svn_named_atomic__t *atomic);
/** Add @a delta to the data in @a atomic and return its new value in
- * @a NEW_VALUE. @a NEW_VALUE may be NULL.
+ * @a *new_value. @a new_value may be null.
*
* An error will be returned if @a atomic is @c NULL.
*/
@@ -141,8 +141,8 @@ svn_named_atomic__add(apr_int64_t *new_v
svn_named_atomic__t *atomic);
/** If the current data in @a atomic equals @a comperand, set it to
- * @a NEW_VALUE. Return the initial value in @a OLD_VALUE.
- * @a OLD_VALUE may be NULL.
+ * @a new_value. Return the initial value in @a *old_value.
+ * @a old_value may be NULL.
*
* An error will be returned if @a atomic is @c NULL.
*/
Modified: subversion/branches/tree-read-api/subversion/include/private/svn_wc_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/include/private/svn_wc_private.h?rev=1411252&r1=1411251&r2=1411252&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/include/private/svn_wc_private.h (original)
+++ subversion/branches/tree-read-api/subversion/include/private/svn_wc_private.h Mon Nov 19 15:40:39 2012
@@ -546,6 +546,10 @@ svn_wc__node_is_status_deleted(svn_boole
* and has no deleted ancestor, @a *deleted_ancestor_abspath will equal
* @a local_abspath. If @a local_abspath was not deleted,
* set @a *deleted_ancestor_abspath to @c NULL.
+ *
+ * A node is considered 'deleted' if it is deleted or moved-away, and is
+ * not replaced.
+ *
* @a *deleted_ancestor_abspath is allocated in @a result_pool.
* Use @a scratch_pool for all temporary allocations.
*/
Modified: subversion/branches/tree-read-api/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/include/svn_client.h?rev=1411252&r1=1411251&r2=1411252&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/include/svn_client.h (original)
+++ subversion/branches/tree-read-api/subversion/include/svn_client.h Mon Nov 19 15:40:39 2012
@@ -2900,8 +2900,8 @@ svn_client_blame(const char *path_or_url
* errstream. @a path_or_url1 and @a path_or_url2 can be either
* working-copy paths or URLs.
*
- * If @a relative_to_dir is not @c NULL, the @a original_path and
- * @a modified_path will have the @a relative_to_dir stripped from the
+ * If @a relative_to_dir is not @c NULL, the original path and
+ * modified path will have the @a relative_to_dir stripped from the
* front of the respective paths. If @a relative_to_dir is @c NULL,
* paths will not be modified. If @a relative_to_dir is not
* @c NULL but @a relative_to_dir is not a parent path of the target,
Modified: subversion/branches/tree-read-api/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/include/svn_wc.h?rev=1411252&r1=1411251&r2=1411252&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/include/svn_wc.h (original)
+++ subversion/branches/tree-read-api/subversion/include/svn_wc.h Mon Nov 19 15:40:39 2012
@@ -899,8 +899,8 @@ svn_wc_external_item_dup(const svn_wc_ex
* of those objects. If the @a url member refers to an absolute URL,
* it will be canonicalized as URL consistent with the way URLs are
* canonicalized throughout the Subversion API. If, however, the
- * @a url member makes use of the recognized (and proprietary)
- * relative URL syntax, "canonicalization" is a less easily-defined
+ * @a url member makes use of the recognized (SVN-specific) relative
+ * URL syntax for svn:externals, "canonicalization" is an ill-defined
* concept which may even result in munging the relative URL syntax
* beyond recognition. You've been warned.
*
@@ -4774,7 +4774,8 @@ svn_wc_add_repos_file(const char *dst_pa
/** Remove @a local_abspath from revision control. @a wc_ctx must
- * hold a write lock.
+ * hold a write lock on the parent of @a local_abspath, or if that is a
+ * WC root then on @a local_abspath itself.
*
* If @a local_abspath is a file, all its info will be removed from the
* administrative area. If @a local_abspath is a directory, then the
Modified: subversion/branches/tree-read-api/subversion/libsvn_client/add.c
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_client/add.c?rev=1411252&r1=1411251&r2=1411252&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_client/add.c (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_client/add.c Mon Nov 19 15:40:39 2012
@@ -737,7 +737,7 @@ svn_client__get_all_auto_props(apr_hash_
err = svn_client_propget5(&props, &inherited_config_auto_props,
SVN_PROP_INHERITABLE_AUTO_PROPS, path_or_url,
&rev, &rev, NULL, svn_depth_empty, NULL, ctx,
- scratch_pool, scratch_pool);
+ scratch_pool, iterpool);
if (err)
{
if (target_is_url || err->apr_err != SVN_ERR_UNVERSIONED_RESOURCE)
@@ -746,7 +746,7 @@ svn_client__get_all_auto_props(apr_hash_
svn_error_clear(err);
err = NULL;
SVN_ERR(find_existing_parent(&path_or_url, ctx, path_or_url,
- scratch_pool, scratch_pool));
+ scratch_pool, iterpool));
}
else
{
@@ -1384,11 +1384,13 @@ mkdir_urls(const apr_array_header_t *url
/* Call the path-based editor driver. */
err = svn_delta_path_driver2(editor, edit_baton, targets, TRUE,
path_driver_cb_func, (void *)editor, pool);
+
if (err)
{
/* At least try to abort the edit (and fs txn) before throwing err. */
- svn_error_clear(editor->abort_edit(edit_baton, pool));
- return svn_error_trace(err);
+ return svn_error_compose_create(
+ err,
+ editor->abort_edit(edit_baton, pool));
}
/* Close the edit. */
Modified: subversion/branches/tree-read-api/subversion/libsvn_client/client.h
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_client/client.h?rev=1411252&r1=1411251&r2=1411252&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_client/client.h (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_client/client.h Mon Nov 19 15:40:39 2012
@@ -901,6 +901,17 @@ svn_client__condense_commit_items(const
apr_pool_t *pool);
+/* Like svn_ra_stat() on the ra session root, but with a compatibility
+ hack for pre-1.2 svnserve that don't support this api. */
+svn_error_t *
+svn_client__ra_stat_compatible(svn_ra_session_t *ra_session,
+ svn_revnum_t rev,
+ svn_dirent_t **dirent_p,
+ apr_uint32_t dirent_fields,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *result_pool);
+
+
/* Commit the items in the COMMIT_ITEMS array using EDITOR/EDIT_BATON
to describe the committed local mods. Prior to this call,
COMMIT_ITEMS should have been run through (and BASE_URL generated
Modified: subversion/branches/tree-read-api/subversion/libsvn_client/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_client/commit.c?rev=1411252&r1=1411251&r2=1411252&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_client/commit.c (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_client/commit.c Mon Nov 19 15:40:39 2012
@@ -1058,8 +1058,9 @@ svn_client_import5(const char *path,
ignore_unknown_node_types, filter_callback,
filter_baton, ctx, iterpool)))
{
- svn_error_clear(editor->abort_edit(edit_baton, iterpool));
- return svn_error_trace(err);
+ return svn_error_compose_create(
+ err,
+ editor->abort_edit(edit_baton, iterpool));
}
svn_pool_destroy(iterpool);
Modified: subversion/branches/tree-read-api/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_client/copy.c?rev=1411252&r1=1411251&r2=1411252&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_client/copy.c (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_client/copy.c Mon Nov 19 15:40:39 2012
@@ -1152,8 +1152,9 @@ repos_to_repos_copy(const apr_array_head
if (err)
{
/* At least try to abort the edit (and fs txn) before throwing err. */
- svn_error_clear(editor->abort_edit(edit_baton, pool));
- return svn_error_trace(err);
+ return svn_error_compose_create(
+ err,
+ editor->abort_edit(edit_baton, pool));
}
/* Close the edit. */
Modified: subversion/branches/tree-read-api/subversion/libsvn_client/export.c
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_client/export.c?rev=1411252&r1=1411251&r2=1411252&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_client/export.c (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_client/export.c Mon Nov 19 15:40:39 2012
@@ -677,7 +677,9 @@ window_handler(svn_txdelta_window_t *win
if (err)
{
/* We failed to apply the patch; clean up the temporary file. */
- svn_error_clear(svn_io_remove_file2(hb->tmppath, TRUE, hb->pool));
+ err = svn_error_compose_create(
+ err,
+ svn_io_remove_file2(hb->tmppath, TRUE, hb->pool));
}
return svn_error_trace(err);
Modified: subversion/branches/tree-read-api/subversion/libsvn_client/info.c
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_client/info.c?rev=1411252&r1=1411251&r2=1411252&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_client/info.c (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_client/info.c Mon Nov 19 15:40:39 2012
@@ -248,75 +248,6 @@ wc_info_receiver(void *baton,
abspath_or_url, &client_info, scratch_pool);
}
-/* Like svn_ra_stat() but with a compatibility hack for pre-1.2 svnserve. */
-static svn_error_t *
-ra_stat_compatible(svn_ra_session_t *ra_session,
- svn_revnum_t rev,
- svn_dirent_t **dirent_p,
- apr_uint32_t dirent_fields,
- svn_client_ctx_t *ctx,
- apr_pool_t *pool)
-{
- const char *repos_root_URL, *url;
- svn_error_t *err;
- svn_dirent_t *the_ent;
-
- SVN_ERR(svn_ra_get_repos_root2(ra_session, &repos_root_URL, pool));
- SVN_ERR(svn_ra_get_session_url(ra_session, &url, pool));
-
- err = svn_ra_stat(ra_session, "", rev, &the_ent, pool);
-
- /* svn_ra_stat() will work against old versions of mod_dav_svn, but
- not old versions of svnserve. In the case of a pre-1.2 svnserve,
- catch the specific error it throws:*/
- if (err && err->apr_err == SVN_ERR_RA_NOT_IMPLEMENTED)
- {
- /* Fall back to pre-1.2 strategy for fetching dirent's URL. */
- svn_node_kind_t url_kind;
- svn_ra_session_t *parent_ra_session;
- apr_hash_t *parent_ents;
- const char *parent_url, *base_name;
-
- if (strcmp(url, repos_root_URL) == 0)
- {
- /* In this universe, there's simply no way to fetch
- information about the repository's root directory! */
- return err;
- }
-
- svn_error_clear(err);
-
- SVN_ERR(svn_ra_check_path(ra_session, "", rev, &url_kind, pool));
- if (url_kind == svn_node_none)
- return svn_error_createf(SVN_ERR_RA_ILLEGAL_URL, NULL,
- _("URL '%s' non-existent in revision %ld"),
- url, rev);
-
- /* Open a new RA session to the item's parent. */
- svn_uri_split(&parent_url, &base_name, url, pool);
- SVN_ERR(svn_client__open_ra_session_internal(&parent_ra_session, NULL,
- parent_url, NULL,
- NULL, FALSE, TRUE,
- ctx, pool));
-
- /* Get all parent's entries, and find the item's dirent in the hash. */
- SVN_ERR(svn_ra_get_dir2(parent_ra_session, &parent_ents, NULL, NULL,
- "", rev, dirent_fields, pool));
- the_ent = apr_hash_get(parent_ents, base_name, APR_HASH_KEY_STRING);
- if (the_ent == NULL)
- return svn_error_createf(SVN_ERR_RA_ILLEGAL_URL, NULL,
- _("URL '%s' non-existent in revision %ld"),
- url, rev);
- }
- else if (err)
- {
- return svn_error_trace(err);
- }
-
- *dirent_p = the_ent;
- return SVN_NO_ERROR;
-}
-
svn_error_t *
svn_client_info3(const char *abspath_or_url,
const svn_opt_revision_t *peg_revision,
@@ -371,28 +302,8 @@ svn_client_info3(const char *abspath_or_
svn_uri_split(NULL, &base_name, pathrev->url, pool);
/* Get the dirent for the URL itself. */
- err = ra_stat_compatible(ra_session, pathrev->rev, &the_ent, DIRENT_FIELDS,
- ctx, pool);
- if (err && err->apr_err == SVN_ERR_RA_NOT_IMPLEMENTED)
- {
- svn_error_clear(err);
-
- /* If we're recursing, degrade gracefully: rather than
- throw an error, return no information about the
- repos root. */
- if (depth > svn_depth_empty)
- goto pre_1_2_recurse;
-
- /* Otherwise, we really are stuck. Better tell the user
- what's going on. */
- return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
- _("Server does not support retrieving "
- "information about the repository root"));
- }
- else if (err)
- {
- return svn_error_trace(err);
- }
+ SVN_ERR(svn_client__ra_stat_compatible(ra_session, pathrev->rev, &the_ent,
+ DIRENT_FIELDS, ctx, pool));
if (! the_ent)
return svn_error_createf(SVN_ERR_RA_ILLEGAL_URL, NULL,
@@ -436,7 +347,6 @@ svn_client_info3(const char *abspath_or_
{
apr_hash_t *locks;
-pre_1_2_recurse:
if (peg_revision->kind == svn_opt_revision_head)
{
err = svn_ra_get_locks2(ra_session, &locks, "", depth,
Modified: subversion/branches/tree-read-api/subversion/libsvn_client/list.c
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_client/list.c?rev=1411252&r1=1411251&r2=1411252&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_client/list.c (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_client/list.c Mon Nov 19 15:40:39 2012
@@ -123,57 +123,67 @@ get_dir_contents(apr_uint32_t dirent_fie
}
/* Like svn_ra_stat() but with a compatibility hack for pre-1.2 svnserve. */
-static svn_error_t *
-ra_stat_compatible(svn_ra_session_t *ra_session,
- svn_revnum_t rev,
- svn_dirent_t **dirent_p,
- apr_uint32_t dirent_fields,
- svn_client_ctx_t *ctx,
- apr_pool_t *pool)
+/* ### Maybe we should move this behavior into the svn_ra_stat wrapper? */
+svn_error_t *
+svn_client__ra_stat_compatible(svn_ra_session_t *ra_session,
+ svn_revnum_t rev,
+ svn_dirent_t **dirent_p,
+ apr_uint32_t dirent_fields,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *pool)
{
- const char *repos_root, *url;
svn_error_t *err;
- svn_dirent_t *dirent;
- SVN_ERR(svn_ra_get_repos_root2(ra_session, &repos_root, pool));
- SVN_ERR(svn_ra_get_session_url(ra_session, &url, pool));
-
- err = svn_ra_stat(ra_session, "", rev, &dirent, pool);
+ err = svn_ra_stat(ra_session, "", rev, dirent_p, pool);
/* svnserve before 1.2 doesn't support the above, so fall back on
a less efficient method. */
if (err && err->apr_err == SVN_ERR_RA_NOT_IMPLEMENTED)
{
+ const char *repos_root_url;
+ const char *session_url;
svn_node_kind_t kind;
+ svn_dirent_t *dirent;
svn_error_clear(err);
+ SVN_ERR(svn_ra_get_repos_root2(ra_session, &repos_root_url, pool));
+ SVN_ERR(svn_ra_get_session_url(ra_session, &session_url, pool));
+
SVN_ERR(svn_ra_check_path(ra_session, "", rev, &kind, pool));
if (kind != svn_node_none)
{
- if (strcmp(url, repos_root) != 0)
+ if (strcmp(session_url, repos_root_url) != 0)
{
svn_ra_session_t *parent_session;
apr_hash_t *parent_ents;
const char *parent_url, *base_name;
+ apr_pool_t *subpool = svn_pool_create(pool);
/* Open another session to the path's parent. This server
doesn't support svn_ra_reparent anyway, so don't try it. */
- svn_uri_split(&parent_url, &base_name, url, pool);
+ svn_uri_split(&parent_url, &base_name, session_url, subpool);
SVN_ERR(svn_client__open_ra_session_internal(&parent_session,
NULL, parent_url,
NULL, NULL, FALSE,
- TRUE, ctx, pool));
+ TRUE, ctx, subpool));
/* Get all parent's entries, no props. */
SVN_ERR(svn_ra_get_dir2(parent_session, &parent_ents, NULL,
- NULL, "", rev, dirent_fields, pool));
+ NULL, "", rev, dirent_fields, subpool));
/* Get the relevant entry. */
dirent = apr_hash_get(parent_ents, base_name,
APR_HASH_KEY_STRING);
+
+ if (dirent)
+ *dirent_p = svn_dirent_dup(dirent, pool);
+ else
+ *dirent_p = NULL;
+
+ svn_pool_destroy(subpool); /* Close RA session */
}
else
{
@@ -183,7 +193,7 @@ ra_stat_compatible(svn_ra_session_t *ra_
be rev. */
dirent = apr_palloc(pool, sizeof(*dirent));
dirent->kind = kind;
- dirent->size = 0;
+ dirent->size = SVN_INVALID_FILESIZE;
if (dirent_fields & SVN_DIRENT_HAS_PROPS)
{
apr_hash_t *props;
@@ -212,15 +222,16 @@ ra_stat_compatible(svn_ra_session_t *ra_
APR_HASH_KEY_STRING);
dirent->last_author = val ? val->data : NULL;
}
+
+ *dirent_p = dirent;
}
}
else
- dirent = NULL;
+ *dirent_p = NULL;
}
- else if (err)
- return svn_error_trace(err);
+ else
+ SVN_ERR(err);
- *dirent_p = dirent;
return SVN_NO_ERROR;
}
@@ -255,8 +266,8 @@ svn_client_list2(const char *path_or_url
fs_path = svn_client__pathrev_fspath(loc, pool);
- SVN_ERR(ra_stat_compatible(ra_session, loc->rev, &dirent, dirent_fields,
- ctx, pool));
+ SVN_ERR(svn_client__ra_stat_compatible(ra_session, loc->rev, &dirent,
+ dirent_fields, ctx, pool));
if (! dirent)
return svn_error_createf(SVN_ERR_FS_NOT_FOUND, NULL,
_("URL '%s' non-existent in revision %ld"),
Modified: subversion/branches/tree-read-api/subversion/libsvn_client/prop_commands.c
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_client/prop_commands.c?rev=1411252&r1=1411251&r2=1411252&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_client/prop_commands.c (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_client/prop_commands.c Mon Nov 19 15:40:39 2012
@@ -915,12 +915,12 @@ svn_client_propget5(apr_hash_t **props,
if (inherited_props && local_iprops)
SVN_ERR(svn_wc__get_iprops(inherited_props, ctx->wc_ctx,
target, propname,
- scratch_pool, scratch_pool));
+ result_pool, scratch_pool));
SVN_ERR(get_prop_from_wc(props, propname, target,
pristine, kind,
- depth, changelists, ctx, scratch_pool,
- result_pool));
+ depth, changelists, ctx, result_pool,
+ scratch_pool));
}
if ((inherited_props && !local_iprops)
Modified: subversion/branches/tree-read-api/subversion/libsvn_delta/svndiff.c
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_delta/svndiff.c?rev=1411252&r1=1411251&r2=1411252&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_delta/svndiff.c (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_delta/svndiff.c Mon Nov 19 15:40:39 2012
@@ -181,6 +181,7 @@ zlib_encode(const char *data,
return SVN_NO_ERROR;
}
out->len = endlen + intlen;
+ out->data[out->len] = 0;
}
return SVN_NO_ERROR;
}
@@ -569,6 +570,7 @@ zlib_decode(const unsigned char *in, apr
NULL,
_("Size of uncompressed data "
"does not match stored original length"));
+ out->data[zlen] = 0;
out->len = zlen;
}
return SVN_NO_ERROR;
Modified: subversion/branches/tree-read-api/subversion/libsvn_delta/text_delta.c
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_delta/text_delta.c?rev=1411252&r1=1411251&r2=1411252&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_delta/text_delta.c (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_delta/text_delta.c Mon Nov 19 15:40:39 2012
@@ -709,6 +709,7 @@ svn_txdelta_apply_instructions(svn_txdel
{
case svn_txdelta_source:
/* Copy from source area. */
+ assert(sbuf);
assert(op->offset + op->length <= window->sview_len);
fast_memcpy(tbuf + tpos, sbuf + op->offset, buf_len);
break;
Modified: subversion/branches/tree-read-api/subversion/libsvn_fs_fs/fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_fs_fs/fs.h?rev=1411252&r1=1411251&r2=1411252&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_fs_fs/fs.h (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_fs_fs/fs.h Mon Nov 19 15:40:39 2012
@@ -180,6 +180,7 @@ typedef struct fs_fs_shared_txn_data_t
per file. On Windows apr implements the locking as per file handle
locks, so we don't have to add our own mutex for just in-process
synchronization. */
+/* Compare ../libsvn_subr/named_atomic.c:USE_THREAD_MUTEX */
#if APR_HAS_THREADS && !defined(WIN32)
#define SVN_FS_FS__USE_LOCK_MUTEX 1
#else
Modified: subversion/branches/tree-read-api/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_fs_fs/fs_fs.c?rev=1411252&r1=1411251&r2=1411252&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_fs_fs/fs_fs.c Mon Nov 19 15:40:39 2012
@@ -360,6 +360,18 @@ path_txn_dir(svn_fs_t *fs, const char *t
NULL);
}
+/* Return the name of the sha1->rep mapping file in transaction TXN_ID
+ * within FS for the given SHA1 checksum. Use POOL for allocations.
+ */
+static APR_INLINE const char *
+path_txn_sha1(svn_fs_t *fs, const char *txn_id, svn_checksum_t *sha1,
+ apr_pool_t *pool)
+{
+ return svn_dirent_join(path_txn_dir(fs, txn_id, pool),
+ svn_checksum_to_cstring(sha1, pool),
+ pool);
+}
+
static APR_INLINE const char *
path_txn_changes(svn_fs_t *fs, const char *txn_id, apr_pool_t *pool)
{
@@ -2613,10 +2625,6 @@ svn_fs_fs__put_node_revision(svn_fs_t *f
fs_fs_data_t *ffd = fs->fsap_data;
apr_file_t *noderev_file;
const char *txn_id = svn_fs_fs__id_txn_id(id);
- const char *sha1 = ffd->rep_sharing_allowed && noderev->data_rep
- ? svn_checksum_to_cstring(noderev->data_rep->sha1_checksum,
- pool)
- : NULL;
noderev->is_fresh_txn_root = fresh_txn_root;
@@ -2637,13 +2645,31 @@ svn_fs_fs__put_node_revision(svn_fs_t *f
SVN_ERR(svn_io_file_close(noderev_file, pool));
+ return SVN_NO_ERROR;
+}
+
+/* For the in-transaction NODEREV within FS, write the sha1->rep mapping
+ * file in the respective transaction, if rep sharing has been enabled etc.
+ * Use POOL for temporary allocations.
+ */
+static svn_error_t *
+store_sha1_rep_mapping(svn_fs_t *fs,
+ node_revision_t *noderev,
+ apr_pool_t *pool)
+{
+ fs_fs_data_t *ffd = fs->fsap_data;
+
/* if rep sharing has been enabled and the noderev has a data rep and
* its SHA-1 is known, store the rep struct under its SHA1. */
- if (sha1)
+ if ( ffd->rep_sharing_allowed
+ && noderev->data_rep
+ && noderev->data_rep->sha1_checksum)
{
apr_file_t *rep_file;
- const char *file_name = svn_dirent_join(path_txn_dir(fs, txn_id, pool),
- sha1, pool);
+ const char *file_name = path_txn_sha1(fs,
+ svn_fs_fs__id_txn_id(noderev->id),
+ noderev->data_rep->sha1_checksum,
+ pool);
const char *rep_string = representation_string(noderev->data_rep,
ffd->format,
(noderev->kind
@@ -4822,8 +4848,8 @@ rep_read_get_baton(struct rep_read_baton
/* Skip forwards to THIS_CHUNK in REP_STATE and then read the next delta
window into *NWIN. */
static svn_error_t *
-read_window(svn_txdelta_window_t **nwin, int this_chunk, struct rep_state *rs,
- apr_pool_t *pool)
+read_delta_window(svn_txdelta_window_t **nwin, int this_chunk,
+ struct rep_state *rs, apr_pool_t *pool)
{
svn_stream_t *stream;
svn_boolean_t is_cached;
@@ -4870,6 +4896,27 @@ read_window(svn_txdelta_window_t **nwin,
return set_cached_window(*nwin, rs, old_offset, pool);
}
+/* Read SIZE bytes from the representation RS and return it in *NWIN. */
+static svn_error_t *
+read_plain_window(svn_stringbuf_t **nwin, struct rep_state *rs,
+ apr_size_t size, apr_pool_t *pool)
+{
+ /* RS->FILE may be shared between RS instances -> make sure we point
+ * to the right data. */
+ SVN_ERR(svn_io_file_seek(rs->file, APR_SET, &rs->off, pool));
+
+ /* Read the plain data. */
+ *nwin = svn_stringbuf_create_ensure(size, pool);
+ SVN_ERR(svn_io_file_read_full2(rs->file, (*nwin)->data, size, NULL, NULL,
+ pool));
+ (*nwin)->data[size] = 0;
+
+ /* Update RS. */
+ rs->off += (apr_off_t)size;
+
+ return SVN_NO_ERROR;
+}
+
/* Get the undeltified window that is a result of combining all deltas
from the current desired representation identified in *RB with its
base representation. Store the window in *RESULT. */
@@ -4893,7 +4940,7 @@ get_combined_window(svn_stringbuf_t **re
for (i = 0; i < rb->rs_list->nelts; ++i)
{
rs = APR_ARRAY_IDX(rb->rs_list, i, struct rep_state *);
- SVN_ERR(read_window(&window, rb->chunk_index, rs, window_pool));
+ SVN_ERR(read_delta_window(&window, rb->chunk_index, rs, window_pool));
APR_ARRAY_PUSH(windows, svn_txdelta_window_t *) = window;
if (window->src_ops == 0)
@@ -4907,11 +4954,20 @@ get_combined_window(svn_stringbuf_t **re
pool = svn_pool_create(rb->pool);
for (--i; i >= 0; --i)
{
+
rs = APR_ARRAY_IDX(rb->rs_list, i, struct rep_state *);
window = APR_ARRAY_IDX(windows, i, svn_txdelta_window_t *);
- /* Combine this window with the current one. */
+ /* Maybe, we've got a PLAIN start representation. If we do, read
+ as much data from it as the needed for the txdelta window's source
+ view.
+ Note that BUF / SOURCE may only be NULL in the first iteration. */
source = buf;
+ if (source == NULL && rb->src_state != NULL)
+ SVN_ERR(read_plain_window(&source, rb->src_state, window->sview_len,
+ pool));
+
+ /* Combine this window with the current one. */
new_pool = svn_pool_create(rb->pool);
buf = svn_stringbuf_create_ensure(window->tview_len, new_pool);
buf->len = window->tview_len;
@@ -5187,7 +5243,7 @@ delta_read_next_window(svn_txdelta_windo
return SVN_NO_ERROR;
}
- return read_window(window, drb->rs->chunk_index, drb->rs, pool);
+ return read_delta_window(window, drb->rs->chunk_index, drb->rs, pool);
}
/* This implements the svn_txdelta_md5_digest_fn_t interface. */
@@ -7100,22 +7156,14 @@ rep_write_cleanup(void *data)
/* Truncate and close the protorevfile. */
err = svn_io_file_trunc(b->file, b->rep_offset, b->pool);
- if (err)
- {
- apr_status_t rc = err->apr_err;
- svn_error_clear(err);
- return rc;
- }
- err = svn_io_file_close(b->file, b->pool);
- if (err)
- {
- apr_status_t rc = err->apr_err;
- svn_error_clear(err);
- return rc;
- }
+ err = svn_error_compose_create(err, svn_io_file_close(b->file, b->pool));
- /* Remove our lock */
- err = unlock_proto_rev(b->fs, txn_id, b->lockcookie, b->pool);
+ /* Remove our lock regardless of any preceeding errors so that the
+ being_written flag is always removed and stays consistent with the
+ file lock which will be removed no matter what since the pool is
+ going away. */
+ err = svn_error_compose_create(err, unlock_proto_rev(b->fs, txn_id,
+ b->lockcookie, b->pool));
if (err)
{
apr_status_t rc = err->apr_err;
@@ -7279,9 +7327,7 @@ get_shared_rep(representation_t **old_re
{
svn_node_kind_t kind;
const char *file_name
- = svn_dirent_join(path_txn_dir(fs, rep->txn_id, pool),
- svn_checksum_to_cstring(rep->sha1_checksum, pool),
- pool);
+ = path_txn_sha1(fs, rep->txn_id, rep->sha1_checksum, pool);
/* in our txn, is there a rep file named with the wanted SHA1?
If so, read it and use that rep.
@@ -7371,6 +7417,8 @@ rep_write_contents_close(void *baton)
/* Write out the new node-rev information. */
SVN_ERR(svn_fs_fs__put_node_revision(b->fs, b->noderev->id, b->noderev, FALSE,
b->pool));
+ if (!old_rep)
+ SVN_ERR(store_sha1_rep_mapping(b->fs, b->noderev, b->pool));
SVN_ERR(svn_io_file_close(b->file, b->pool));
SVN_ERR(unlock_proto_rev(b->fs, rep->txn_id, b->lockcookie, b->pool));
Modified: subversion/branches/tree-read-api/subversion/libsvn_fs_fs/structure
URL: http://svn.apache.org/viewvc/subversion/branches/tree-read-api/subversion/libsvn_fs_fs/structure?rev=1411252&r1=1411251&r2=1411252&view=diff
==============================================================================
--- subversion/branches/tree-read-api/subversion/libsvn_fs_fs/structure (original)
+++ subversion/branches/tree-read-api/subversion/libsvn_fs_fs/structure Mon Nov 19 15:40:39 2012
@@ -526,6 +526,7 @@ A transaction directory has the followin
node.<nid>.<cid> New node-rev data for node
node.<nid>.<cid>.props Props for new node-rev, if changed
node.<nid>.<cid>.children Directory contents for node-rev
+ <sha1> Text representation of that sha1
In FS formats 1 and 2, it also contains:
@@ -543,6 +544,11 @@ The two kinds of props files are all in
file will always be present. The "node.<nid>.<cid>.props" file will
only be present if the node-rev properties have been changed.
+The <sha1> files have been introduced in FS format 6. Their content
+is that of text rep references: "<rev> <offset> <length> <size> <digest>"
+They will be written for text reps in the current transaction and be
+used to eliminate duplicate reps within that transaction.
+
The "next-ids" file contains a single line "<next-temp-node-id>
<next-temp-copy-id>\n" giving the next temporary node-ID and copy-ID
assignments (without the leading underscores). The next node-ID is