From 97551b2898eb459e9b616947d87d026d27b61518 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Sun, 28 Jul 2013 05:04:41 +0000 Subject: [PATCH] Import subversion-1.8.1 into vendor staging area. --- CHANGES | 108 +- Makefile.in | 2 +- build-outputs.mk | 8 +- configure | 508 +++++++- configure.ac | 36 +- get-deps.sh | 2 +- .../include/private/svn_client_private.h | 33 + subversion/include/private/svn_io_private.h | 5 + subversion/include/private/svn_ra_private.h | 16 +- subversion/include/svn_version.h | 6 +- subversion/libsvn_client/client.h | 64 +- subversion/libsvn_client/commit.c | 7 + subversion/libsvn_client/copy.c | 17 +- subversion/libsvn_client/diff.c | 57 +- subversion/libsvn_client/diff_local.c | 12 +- subversion/libsvn_client/log.c | 45 +- subversion/libsvn_client/merge.c | 65 +- subversion/libsvn_client/mergeinfo.c | 102 +- subversion/libsvn_client/ra.c | 104 +- subversion/libsvn_client/switch.c | 2 +- subversion/libsvn_delta/compat.c | 12 +- subversion/libsvn_fs_base/bdb/env.c | 2 +- subversion/libsvn_fs_base/tree.c | 7 + subversion/libsvn_fs_fs/fs_fs.c | 57 +- subversion/libsvn_fs_fs/rep-cache-db.h | 2 +- subversion/libsvn_fs_fs/tree.c | 37 +- subversion/libsvn_ra/ra_loader.c | 7 + subversion/libsvn_ra/util.c | 62 +- subversion/libsvn_ra_serf/blame.c | 2 +- subversion/libsvn_ra_serf/commit.c | 6 +- subversion/libsvn_ra_serf/getdate.c | 13 +- subversion/libsvn_ra_serf/getlocations.c | 2 +- .../libsvn_ra_serf/getlocationsegments.c | 2 +- subversion/libsvn_ra_serf/getlocks.c | 2 +- subversion/libsvn_ra_serf/inherited_props.c | 2 +- subversion/libsvn_ra_serf/log.c | 2 +- subversion/libsvn_ra_serf/mergeinfo.c | 15 +- subversion/libsvn_ra_serf/options.c | 68 +- subversion/libsvn_ra_serf/property.c | 2 +- subversion/libsvn_ra_serf/ra_serf.h | 19 +- subversion/libsvn_ra_serf/replay.c | 4 +- subversion/libsvn_ra_serf/serf.c | 58 +- subversion/libsvn_ra_serf/update.c | 6 +- subversion/libsvn_ra_serf/util.c | 35 +- subversion/libsvn_ra_serf/xml.c | 8 + subversion/libsvn_ra_svn/client.c | 92 +- subversion/libsvn_ra_svn/protocol | 4 + subversion/libsvn_repos/fs-wrap.c | 4 + subversion/libsvn_subr/config_file.c | 36 +- subversion/libsvn_subr/gpg_agent.c | 101 +- subversion/libsvn_subr/internal_statements.h | 2 +- subversion/libsvn_subr/io.c | 3 + subversion/libsvn_subr/named_atomic.c | 18 +- subversion/libsvn_subr/sqlite.c | 20 +- subversion/libsvn_subr/stream.c | 9 + subversion/libsvn_subr/subst.c | 6 +- subversion/libsvn_subr/utf.c | 10 +- subversion/libsvn_wc/adm_ops.c | 1 + subversion/libsvn_wc/crop.c | 1 + subversion/libsvn_wc/externals.c | 1 + subversion/libsvn_wc/update_editor.c | 44 +- subversion/libsvn_wc/upgrade.c | 15 +- subversion/libsvn_wc/wc-checks.h | 2 +- subversion/libsvn_wc/wc-metadata.h | 2 +- subversion/libsvn_wc/wc-queries.h | 1053 +++++++++-------- subversion/libsvn_wc/wc-queries.sql | 4 + subversion/libsvn_wc/wc_db.c | 29 +- subversion/libsvn_wc/wc_db.h | 10 +- subversion/libsvn_wc/wc_db_update_move.c | 12 +- subversion/libsvn_wc/wc_db_wcroot.c | 22 +- subversion/libsvn_wc/workqueue.c | 1 + subversion/svn/cl.h | 17 - subversion/svn/conflict-callbacks.c | 85 +- subversion/svn/file-merge.c | 20 + subversion/svn/merge-cmd.c | 9 - subversion/svn/mergeinfo-cmd.c | 19 +- subversion/svn/svn.c | 49 +- subversion/svn/util.c | 40 - subversion/svnadmin/svnadmin.c | 12 + subversion/svnlook/svnlook.c | 54 +- subversion/svnserve/serve.c | 1 + win-tests.py | 8 +- 82 files changed, 2428 insertions(+), 1019 deletions(-) diff --git a/CHANGES b/CHANGES index b0e61f2d67df..55b1b4d9e72b 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,91 @@ +Version 1.8.1 +(23 July 2013, from /branches/1.8.x) +http://svn.apache.org/repos/asf/subversion/tags/1.8.1 + + User-visible changes: + - Client- and server-side bugfixes: + * translation updates for German and Simplified Chinese + * improve sqlite error message output (r1497804) + * support platforms lacking mmap (r1498136) + * allow configuration files to start with UTF-8 BOM (r1499100 et al) + * don't fail on UTF-8 data when encoding conversion not available (r1503009) + * improve error messages when encoding conversion fails (r1503010) + + - Client-side bugfixes: + * merge: rename 'automatic merge' to 'complete merge' (r1491432) + * mergeinfo: reduce network usage for '--show-revs' (r1492005) + * ra_serf: improve http status handling (r1495104) + * merge: avoid unneeded ra session (r1493475) + * merge: reduce network usage (r1478987) + * merge: remove duplicated ancestry check (r1493424, r1495597) + * ra_serf: fix 'Accept-Encoding' header for IIS interoperability (r1497551) + * svn status: improve documentation for lock columns (r1497318, r1497319) + * ra_serf: fix support for 'get-file-revs-reversed' capability (r1498456) + * log: reduce network usage on repository roots (r1496957) + * diff: avoid temporary files when calling external diff (issue #4382) + * upgrade: fix notification of 1.7.x working copies (r1493703, r1494171) + * fix crash during tree conflict resolution (issue #4388) + * interactive file merge: add two additional choices (r1491816, r1494089) + * diff: use local style paths in error messages (r1500680) + * resolve: improve the interactive conflict resolution menu (r1491739 et al) + * switch: use local style path in error message (r1500074) + * ra_serf: improve error output when receiving invalid XML (r1498851) + * svn cleanup: explain what the command does in help output (r1497310) + * blame: error on -r M:N where M>N unless server supports (r1498449 et al) + * gpg-agent auth: don't try to use agent when unavailable (r1500762 et al) + * gpg-agent auth: don't require GPG_TTY or TERM env vars (r1500801) + * update: fix some tree conflicts not triggering resolver (r1491868 et al) + * commit: remove stale entries from wc lock table when deleting (r1491756) + * merge: fix --record-only erroring out on renamed path (issue #4387) + * svnmucc: fix 'make install' symlink to work when DESTDIR is set (r1501072) + * wc: fix crash when target is symlink to a working copy root (issue #4383) + * ra_serf: change "internal malfunction" errors to normal errors (r1502577) + * ra_serf: handle proxies not supporting chunked requests (r1502401 et al) + + - Server-side bugfixes: + * fsfs: resolve endless loop problem when repos/db/uuid has \r\n (r1492145) + * fsfs: remove revision property buffer limit (r1491770) + * mod_dav_svn: better status codes for anonymous user errors (r1495918) + * mod_dav_svn: better status codes for commit failures (r1490684) + * fix performance regression in 'svn log' against root (r1494913) + * allow deleting non-user-visible 'svn:' properties (r1495432) + * fsfs: fix crash on strict-alignment architectures (r1495806, r1495985) + * svnadmin upgrade: fix error of non-sharded fsfs repositories (r1494287) + * svnadmin create: deny '--fs-type=fsfs --compatible-version=1.0' (r1494223) + * svnadmin upgrade: fix data loss when cancelling in last stage (r1494298) + * mod_dav_svn: fix incorrect path canonicalization (r1503528) + + - Other tool improvements and bugfixes: + * fsfs-stats (tool): resolve segfault when passing invalid path (r1492164) + * svn-bench: fix help output (r1493951) + * svnpubsub: add version header to server (r1491707) + + Developer-visible changes + - General: + * ra_serf: fix some test runner issues on Windows (r1490679) + * fix two issues in reverse svn_ra_get_file_revs() (r1492148, et al) + * handle --compatible-version=1.8 in the C tests (r1494342) + * improve clang compatibility (r1480080 et al) + * use proper cancel baton when handling conflicts (r1495850) + * fs: BDB: provide proper error value from BDB (r1495428) + * ra_serf: tweak connection failed error value (r1496132, et al) + * svn_client_log5: resolve possible segfault (r1496110) + * fix metadata_only move to work when target is unversioned node (r1498564) + * ra_svn: fix segfault with a NULL commit message (r1498550, r1499727) + * Ev2: correctly initialize node kind in shims' change table (r1501058) + * Ev2: fix copyfrom URL construction in shims (r1500226) + * fs: improve test against newlines in filenames (r1498483 et al) + * make building with BDB 6 an opt-in feature (r1499438) + * sqlite: allow placing amalgamation in build dir (r1499034, r1500175) + * ra_svn: make sessions usable after log callback early out (r1503554) + + - Bindings: + * swig-rb: fix tests with out-of-tree-builds (r1492295) + * javahl: fix encoding of error messages produced by javahl (r1492264) + * swig-pl: silence compiler warnings (r1487094) + * swig-pl: improve documentation (r1488693, r1490721, r1500904) + + Version 1.8.0 (18 Jun 2013, from /branches/1.8.x) http://svn.apache.org/repos/asf/subversion/tags/1.8.0 @@ -99,7 +187,6 @@ http://svn.apache.org/repos/asf/subversion/tags/1.8.0 * support ipv6 in URLs (e.g. http://[::1]/svn/repos) (r1454047) * conflict resolver now iterates paths in a sorted order (r1461820) * mod_dav_svn does keyword expansion with 'kw=1' query arg (r1466055) - * add support for custom keyword definitions (issue #890) - Minor new features and improvements (server-side): * improve performance of config file parsing (r1344347 et al) @@ -339,6 +426,25 @@ http://svn.apache.org/repos/asf/subversion/tags/1.8.0 * fix some reference counting bugs in swig-py bindings (r1464899, r1466524) +Version 1.7.11 +(23 Jul 2013, from /branches/1.7.x) +http://svn.apache.org/repos/asf/subversion/tags/1.7.11 + + User-visible changes: + - General + * translation updates for Simplified Chinese + + - Server-side bugfixes: + * mod_dav_svn: fix incorrect path canonicalization (r1503528) + + - Other tool improvements and bugfixes: + * fix argument processing in contrib hook scripts (r1485350) + + Developer-visible changes: + - Bindings: + * javahl: fix bug in error constructing code (r1405922) + + Version 1.7.10 (30 May 2013, from /branches/1.7.x) http://svn.apache.org/repos/asf/subversion/tags/1.7.10 diff --git a/Makefile.in b/Makefile.in index fdcd5445ede3..1b5d9d8191a0 100644 --- a/Makefile.in +++ b/Makefile.in @@ -903,5 +903,5 @@ INSTALL_EXTRA_TOOLS=\ test -n "$$SVN_SVNMUCC_IS_SVNSYITF" && \ ln -sf svnmucc$(EXEEXT) $(DESTDIR)$(bindir)/svnsyitf$(EXEEXT); \ if test "$(DESTDIR)$(bindir)" != "$(DESTDIR)$(toolsdir)"; then \ - ln -sf $(DESTDIR)$(bindir)/svnmucc$(EXEEXT) $(DESTDIR)$(toolsdir)/svnmucc$(EXEEXT); \ + ln -sf $(bindir)/svnmucc$(EXEEXT) $(DESTDIR)$(toolsdir)/svnmucc$(EXEEXT); \ fi diff --git a/build-outputs.mk b/build-outputs.mk index 7bee70d5f7c1..55bac4fb2e7d 100644 --- a/build-outputs.mk +++ b/build-outputs.mk @@ -1985,7 +1985,7 @@ subversion/libsvn_client/delete.lo: subversion/libsvn_client/delete.c subversion subversion/libsvn_client/deprecated.lo: subversion/libsvn_client/deprecated.c subversion/include/private/svn_client_private.h subversion/include/private/svn_debug.h subversion/include/private/svn_diff_tree.h subversion/include/private/svn_editor.h subversion/include/private/svn_magic.h subversion/include/private/svn_opt_private.h subversion/include/private/svn_wc_private.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_client.h subversion/include/svn_compat.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_diff.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_opt.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_ra.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_utf.h subversion/include/svn_wc.h subversion/libsvn_client/client.h subversion/libsvn_client/mergeinfo.h subversion/svn_private_config.h -subversion/libsvn_client/diff.lo: subversion/libsvn_client/diff.c subversion/include/private/svn_client_private.h subversion/include/private/svn_debug.h subversion/include/private/svn_diff_private.h subversion/include/private/svn_diff_tree.h subversion/include/private/svn_editor.h subversion/include/private/svn_magic.h subversion/include/private/svn_subr_private.h subversion/include/private/svn_wc_private.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_client.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_diff.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_opt.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_ra.h subversion/include/svn_string.h subversion/include/svn_subst.h subversion/include/svn_types.h subversion/include/svn_utf.h subversion/include/svn_wc.h subversion/libsvn_client/client.h subversion/svn_private_config.h +subversion/libsvn_client/diff.lo: subversion/libsvn_client/diff.c subversion/include/private/svn_client_private.h subversion/include/private/svn_debug.h subversion/include/private/svn_diff_private.h subversion/include/private/svn_diff_tree.h subversion/include/private/svn_editor.h subversion/include/private/svn_io_private.h subversion/include/private/svn_magic.h subversion/include/private/svn_subr_private.h subversion/include/private/svn_wc_private.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_client.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_diff.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_opt.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_ra.h subversion/include/svn_string.h subversion/include/svn_subst.h subversion/include/svn_types.h subversion/include/svn_utf.h subversion/include/svn_wc.h subversion/libsvn_client/client.h subversion/svn_private_config.h subversion/libsvn_client/diff_local.lo: subversion/libsvn_client/diff_local.c subversion/include/private/svn_client_private.h subversion/include/private/svn_debug.h subversion/include/private/svn_diff_tree.h subversion/include/private/svn_editor.h subversion/include/private/svn_magic.h subversion/include/private/svn_wc_private.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_client.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_diff.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_opt.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_ra.h subversion/include/svn_sorts.h subversion/include/svn_string.h subversion/include/svn_subst.h subversion/include/svn_types.h subversion/include/svn_wc.h subversion/libsvn_client/client.h subversion/svn_private_config.h @@ -2703,7 +2703,7 @@ subversion/svnadmin/svnadmin.lo: subversion/svnadmin/svnadmin.c subversion/inclu subversion/svndumpfilter/svndumpfilter.lo: subversion/svndumpfilter/svndumpfilter.c subversion/include/private/svn_cmdline_private.h subversion/include/private/svn_debug.h subversion/include/private/svn_mergeinfo_private.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_cmdline.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_opt.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_repos.h subversion/include/svn_sorts.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_utf.h subversion/include/svn_version.h subversion/svn_private_config.h -subversion/svnlook/svnlook.lo: subversion/svnlook/svnlook.c subversion/include/private/svn_cmdline_private.h subversion/include/private/svn_debug.h subversion/include/private/svn_diff_private.h subversion/include/private/svn_fspath.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_cmdline.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_diff.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_opt.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_repos.h subversion/include/svn_sorts.h subversion/include/svn_string.h subversion/include/svn_subst.h subversion/include/svn_time.h subversion/include/svn_types.h subversion/include/svn_utf.h subversion/include/svn_version.h subversion/include/svn_xml.h subversion/svn_private_config.h +subversion/svnlook/svnlook.lo: subversion/svnlook/svnlook.c subversion/include/private/svn_cmdline_private.h subversion/include/private/svn_debug.h subversion/include/private/svn_diff_private.h subversion/include/private/svn_fspath.h subversion/include/private/svn_io_private.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_cmdline.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_diff.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_opt.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_repos.h subversion/include/svn_sorts.h subversion/include/svn_string.h subversion/include/svn_subst.h subversion/include/svn_time.h subversion/include/svn_types.h subversion/include/svn_utf.h subversion/include/svn_version.h subversion/include/svn_xml.h subversion/svn_private_config.h subversion/svnmucc/svnmucc.lo: subversion/svnmucc/svnmucc.c subversion/include/private/svn_cmdline_private.h subversion/include/private/svn_debug.h subversion/include/private/svn_editor.h subversion/include/private/svn_ra_private.h subversion/include/private/svn_string_private.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_client.h subversion/include/svn_cmdline.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_diff.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_opt.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_ra.h subversion/include/svn_string.h subversion/include/svn_subst.h subversion/include/svn_types.h subversion/include/svn_utf.h subversion/include/svn_version.h subversion/include/svn_wc.h subversion/svn_private_config.h @@ -2749,7 +2749,7 @@ subversion/tests/libsvn_diff/diff-diff3-test.lo: subversion/tests/libsvn_diff/di subversion/tests/libsvn_diff/parse-diff-test.lo: subversion/tests/libsvn_diff/parse-diff-test.c subversion/include/private/svn_debug.h subversion/include/svn_checksum.h subversion/include/svn_delta.h subversion/include/svn_diff.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_io.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_utf.h subversion/tests/svn_test.h -subversion/tests/libsvn_fs/fs-test.lo: subversion/tests/libsvn_fs/fs-test.c subversion/include/private/svn_debug.h subversion/include/private/svn_editor.h subversion/include/private/svn_fs_private.h subversion/include/svn_checksum.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_repos.h subversion/include/svn_string.h subversion/include/svn_time.h subversion/include/svn_types.h subversion/include/svn_version.h subversion/libsvn_delta/delta.h subversion/tests/svn_test.h subversion/tests/svn_test_fs.h +subversion/tests/libsvn_fs/fs-test.lo: subversion/tests/libsvn_fs/fs-test.c subversion/include/private/svn_debug.h subversion/include/private/svn_editor.h subversion/include/private/svn_fs_private.h subversion/include/svn_checksum.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_repos.h subversion/include/svn_string.h subversion/include/svn_time.h subversion/include/svn_types.h subversion/include/svn_version.h subversion/libsvn_delta/delta.h subversion/tests/svn_test.h subversion/tests/svn_test_fs.h subversion/tests/libsvn_fs/locks-test.lo: subversion/tests/libsvn_fs/locks-test.c subversion/include/private/svn_debug.h subversion/include/svn_checksum.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_path.h subversion/include/svn_repos.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/tests/svn_test.h subversion/tests/svn_test_fs.h @@ -2849,7 +2849,7 @@ subversion/tests/libsvn_wc/wc-queries-test.lo: subversion/tests/libsvn_wc/wc-que subversion/tests/libsvn_wc/wc-test.lo: subversion/tests/libsvn_wc/wc-test.c subversion/include/private/svn_debug.h subversion/include/private/svn_dep_compat.h subversion/include/private/svn_diff_tree.h subversion/include/private/svn_skel.h subversion/include/private/svn_sqlite.h subversion/include/private/svn_token.h subversion/include/private/svn_wc_private.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_client.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_diff.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_opt.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_ra.h subversion/include/svn_repos.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_wc.h subversion/libsvn_wc/wc.h subversion/libsvn_wc/wc_db.h subversion/libsvn_wc/wc_db_private.h subversion/svn_private_config.h subversion/tests/libsvn_wc/utils.h subversion/tests/svn_test.h -subversion/tests/svn_test_fs.lo: subversion/tests/svn_test_fs.c subversion/include/private/svn_debug.h subversion/include/svn_checksum.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_repos.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_utf.h subversion/tests/svn_test.h subversion/tests/svn_test_fs.h +subversion/tests/svn_test_fs.lo: subversion/tests/svn_test_fs.c subversion/include/private/svn_debug.h subversion/include/svn_checksum.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_repos.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_utf.h subversion/tests/svn_test.h subversion/tests/svn_test_fs.h subversion/tests/svn_test_main.lo: subversion/tests/svn_test_main.c subversion/include/private/svn_cmdline_private.h subversion/include/private/svn_debug.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_cmdline.h subversion/include/svn_config.h subversion/include/svn_ctype.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_io.h subversion/include/svn_opt.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/svn_private_config.h subversion/tests/svn_test.h diff --git a/configure b/configure index 57dadd66df4d..fd905fb3a1ad 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for subversion 1.8.0. +# Generated by GNU Autoconf 2.69 for subversion 1.8.1. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='subversion' PACKAGE_TARNAME='subversion' -PACKAGE_VERSION='1.8.0' -PACKAGE_STRING='subversion 1.8.0' +PACKAGE_VERSION='1.8.1' +PACKAGE_STRING='subversion 1.8.1' PACKAGE_BUGREPORT='http://subversion.apache.org/' PACKAGE_URL='' @@ -872,6 +872,7 @@ with_trang with_doxygen with_expat with_berkeley_db +enable_bdb6 with_sasl enable_keychain with_gpg_agent @@ -1455,7 +1456,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures subversion 1.8.0 to adapt to many kinds of systems. +\`configure' configures subversion 1.8.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1521,7 +1522,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of subversion 1.8.0:";; + short | recursive ) echo "Configuration of subversion 1.8.1:";; esac cat <<\_ACEOF @@ -1547,6 +1548,10 @@ Optional Features: testing prior to installation on some platforms. It does not work on some platforms (Darwin, OpenBSD, ...). + --enable-bdb6 Allow building against BDB 6+. See + --with-berkeley-db for specifying the location of + the Berkeley DB installation. Using BDB 6 will fail + if this option is not used. --disable-keychain Disable use of Mac OS KeyChain for auth credentials --enable-ev2-impl Use Ev2 implementations, where available [EXPERIMENTAL] @@ -1609,9 +1614,9 @@ Optional Packages: Specify location of Expat --with-berkeley-db[=HEADER:INCLUDES:LIB_SEARCH_DIRS:LIBS] The Subversion Berkeley DB based filesystem library - requires Berkeley DB $db_version or newer. If you - specify `--without-berkeley-db', that library will - not be built. If you omit the argument of this + requires Berkeley DB $db_version or $db_alt_version. + If you specify `--without-berkeley-db', that library + will not be built. If you omit the argument of this option completely, the configure script will use Berkeley DB used by APR-UTIL. --with-sasl=PATH Compile with libsasl2 in PATH @@ -1731,7 +1736,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -subversion configure 1.8.0 +subversion configure 1.8.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2275,7 +2280,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by subversion $as_me 1.8.0, which was +It was created by subversion $as_me 1.8.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2655,8 +2660,8 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. -{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuring Subversion 1.8.0" >&5 -$as_echo "$as_me: Configuring Subversion 1.8.0" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuring Subversion 1.8.1" >&5 +$as_echo "$as_me: Configuring Subversion 1.8.1" >&6;} abs_srcdir="`cd $srcdir && pwd`" @@ -3612,6 +3617,44 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + _svn_xxflags__save="$CFLAGS" + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC accepts -Werror=unknown-warning-option... " >&6; } + CFLAGS="-Werror=unknown-warning-option $CFLAGS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + CFLAGS="$_svn_xxflags__save" + + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + # Look for a C++ compiler (before anything can set CXXFLAGS) CXXMAINTAINERFLAGS="$CXXUSERFLAGS" CXXUSERFLAGS="$CXXFLAGS" @@ -3921,6 +3964,44 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + _svn_xxflags__save="$CXXFLAGS" + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX accepts -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX accepts -Werror=unknown-warning-option... " >&6; } + CXXFLAGS="-Werror=unknown-warning-option $CXXFLAGS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + CXXFLAGS="$_svn_xxflags__save" + + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + # Look for a C pre-processor ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -6161,6 +6242,10 @@ $as_echo "$as_me: WARNING: no suitable sqlite found in $sqlite_dir" >&2;} echo "unpack the archive using unzip and rename the resulting" echo "directory to:" echo "$abs_srcdir/sqlite-amalgamation" + if test x"$abs_srcdir" != x"$abs_builddir"; then + echo "or to:" + echo "$abs_builddir/sqlite-amalgamation" + fi echo "" as_fn_error $? "Subversion requires SQLite" "$LINENO" 5 @@ -6461,6 +6546,299 @@ rm -f conftest* if test -z "$svn_lib_sqlite"; then + sqlite_amalg="$abs_builddir/sqlite-amalgamation/sqlite3.c" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking sqlite amalgamation" >&5 +$as_echo_n "checking sqlite amalgamation... " >&6; } + if test ! -e $sqlite_amalg; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking sqlite amalgamation file version" >&5 +$as_echo_n "checking sqlite amalgamation file version... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "$sqlite_amalg" +#if SQLITE_VERSION_NUMBER >= $sqlite_min_ver_num +SQLITE_VERSION_OKAY +#endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "SQLITE_VERSION_OKAY" >/dev/null 2>&1; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: amalgamation found and is okay" >&5 +$as_echo "amalgamation found and is okay" >&6; } + + case $host_os in + beos* | mingw* | pw32* | cegcc* | cygwin*) + svn_sqlite_dso_ldflags= + ;; + + darwin*) + # if libdl is installed we need to link against it + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" svn_sqlite_dso_ldflags="-ldl" +else + + svn_sqlite_dso_ldflags= + +fi + + ;; + + *) + ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" +if test "x$ac_cv_func_shl_load" = xyes; then : + svn_sqlite_dso_ldflags= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if ${ac_cv_lib_dld_shl_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_shl_load=yes +else + ac_cv_lib_dld_shl_load=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = xyes; then : + svn_sqlite_dso_ldflags="-ldld" +else + ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" +if test "x$ac_cv_func_dlopen" = xyes; then : + svn_sqlite_dso_ldflags= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + svn_sqlite_dso_ldflags="-ldl" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 +$as_echo_n "checking for dlopen in -lsvld... " >&6; } +if ${ac_cv_lib_svld_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_svld_dlopen=yes +else + ac_cv_lib_svld_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 +$as_echo "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = xyes; then : + svn_sqlite_dso_ldflags="-lsvld" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 +$as_echo_n "checking for dld_link in -ldld... " >&6; } +if ${ac_cv_lib_dld_dld_link+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dld_link (); +int +main () +{ +return dld_link (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_dld_link=yes +else + ac_cv_lib_dld_dld_link=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 +$as_echo "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = xyes; then : + svn_sqlite_dso_ldflags="-ldld" +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional libraries for sqlite" >&5 +$as_echo_n "checking additional libraries for sqlite... " >&6; } + if test -n "$svn_sqlite_dso_ldflags"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${svn_sqlite_dso_ldflags}" >&5 +$as_echo "${svn_sqlite_dso_ldflags}" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } + fi + + +$as_echo "#define SVN_SQLITE_INLINE 1" >>confdefs.h + + SVN_SQLITE_INCLUDES="-I`dirname $sqlite_amalg`" + if test -n "$svn_sqlite_dso_ldflags"; then + SVN_SQLITE_LIBS="$svn_sqlite_dso_ldflags -lpthread" + else + SVN_SQLITE_LIBS="-lpthread" + fi + svn_lib_sqlite="yes" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported amalgamation SQLite version" >&5 +$as_echo "unsupported amalgamation SQLite version" >&6; } +fi +rm -f conftest* + + fi + + fi + + if test -z "$svn_lib_sqlite"; then + if test -z ""; then sqlite_dir="" sqlite_include="sqlite3.h" @@ -6633,6 +7011,10 @@ $as_echo "no" >&6; } echo "unpack the archive using unzip and rename the resulting" echo "directory to:" echo "$abs_srcdir/sqlite-amalgamation" + if test x"$abs_srcdir" != x"$abs_builddir"; then + echo "or to:" + echo "$abs_builddir/sqlite-amalgamation" + fi echo "" as_fn_error $? "Subversion requires SQLite" "$LINENO" 5 @@ -17537,6 +17919,7 @@ powerpc-apple-darwin*) SVN_FS_WANT_DB_PATCH=14 ;; esac +db_alt_version="5.x" # Look for libdb4.so first: db_version=$SVN_FS_WANT_DB_MAJOR.$SVN_FS_WANT_DB_MINOR.$SVN_FS_WANT_DB_PATCH @@ -17624,6 +18007,14 @@ fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for availability of Berkeley DB" >&5 $as_echo_n "checking for availability of Berkeley DB... " >&6; } + # Check whether --enable-bdb6 was given. +if test "${enable_bdb6+set}" = set; then : + enableval=$enable_bdb6; enable_bdb6=$enableval +else + enable_bdb6=unspecified +fi + + svn_lib_berkeley_db_try_save_cppflags="$CPPFLAGS" svn_lib_berkeley_db_try_save_libs="$LIBS" @@ -17631,6 +18022,7 @@ $as_echo_n "checking for availability of Berkeley DB... " >&6; } svn_check_berkeley_db_major=$SVN_FS_WANT_DB_MAJOR svn_check_berkeley_db_minor=$SVN_FS_WANT_DB_MINOR svn_check_berkeley_db_patch=$SVN_FS_WANT_DB_PATCH + enable_bdb6=$enable_bdb6 if test -z "$SVN_DB_LIBS"; then # We pass --dbm-libs here since Debian has modified apu-config not @@ -17673,6 +18065,7 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include #include $svn_db_header @@ -17688,6 +18081,12 @@ int main () || patch != DB_VERSION_PATCH) exit (1); + /* Block Berkeley DB 6, because (a) we haven't tested with it, (b) 6.0.20 + and newer are under the AGPL, and we want use of AGPL dependencies to be + opt-in. */ + if (major >= 6 && strcmp("$enable_bdb6", "yes")) + exit(2); + /* Run-time check: ensure the library claims to be the correct version. */ if (major < $svn_check_berkeley_db_major) @@ -17710,7 +18109,11 @@ _ACEOF if ac_fn_c_try_run "$LINENO"; then : svn_have_berkeley_db=yes else - svn_have_berkeley_db=no + rc=$? + svn_have_berkeley_db=no + if test $rc = 2; then + svn_have_berkeley_db=no6 + fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -17726,11 +18129,17 @@ fi $as_echo "yes" >&6; } svn_lib_berkeley_db=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + if test "$svn_have_berkeley_db" = "no6"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (found version 6, but --enable-bdb6 not specified)" >&5 +$as_echo "no (found version 6, but --enable-bdb6 not specified)" >&6; } + # A warning will be printed at the end of configure.ac. + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + fi svn_lib_berkeley_db=no if test "$bdb_status" = "required"; then - as_fn_error $? "Berkeley DB $db_version or newer wasn't found." "$LINENO" 5 + as_fn_error $? "Berkeley DB $db_version or $db_alt_version wasn't found." "$LINENO" 5 fi fi fi @@ -21156,6 +21565,18 @@ $as_echo "$as_me: Disabling optimizations" >&6;} # # do nothing fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: C compiler flags: $CFLAGS" >&5 +$as_echo "$as_me: C compiler flags: $CFLAGS" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: user-defined: $CUSERFLAGS" >&5 +$as_echo "$as_me: user-defined: $CUSERFLAGS" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: maintainer-mode: $CMAINTAINERFLAGS" >&5 +$as_echo "$as_me: maintainer-mode: $CMAINTAINERFLAGS" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: C++ compiler flags: $CXXFLAGS" >&5 +$as_echo "$as_me: C++ compiler flags: $CXXFLAGS" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: user-defined: $CXXUSERFLAGS" >&5 +$as_echo "$as_me: user-defined: $CXXUSERFLAGS" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: maintainer-mode: $CXXMAINTAINERFLAGS" >&5 +$as_echo "$as_me: maintainer-mode: $CXXMAINTAINERFLAGS" >&6;} # Check whether --enable-full-version-match was given. if test "${enable_full_version_match+set}" = set; then : @@ -25315,7 +25736,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by subversion $as_me 1.8.0, which was +This file was extended by subversion $as_me 1.8.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -25381,7 +25802,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -subversion config.status 1.8.0 +subversion config.status 1.8.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -27295,30 +27716,51 @@ fi # ==== Print final messages to user ========================================== -if test "$svn_lib_berkeley_db" = "no" && test "$with_berkeley_db" != "no"; then - db_version="$SVN_FS_WANT_DB_MAJOR.$SVN_FS_WANT_DB_MINOR.$SVN_FS_WANT_DB_PATCH" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: we have configured without BDB filesystem support +if test "$svn_have_berkeley_db" = "no6" && test "$enable_bdb6" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: We have configured without BDB filesystem support -You don't seem to have Berkeley DB version $db_version or newer -installed and linked to APR-UTIL. We have created a Makefile which will build -Subversion without support for the Berkeley DB back-end. You can find the -latest version of Berkeley DB here: +Berkeley DB 6 was found, but not used. Please re-run configure (see +./config.nice) with the '--enable-bdb6' flag to use it, +or explicitly specify '--disable-bdb6' or '--without-berkeley-db' +to silence this warning. - http://www.oracle.com/technetwork/products/berkeleydb/downloads/index.html +Please note that some versions of Berkeley DB 6+ are under the GNU Affero +General Public License, version 3: +https://oss.oracle.com/pipermail/bdb/2013-June/000056.html -or explicitly specify --without-berkeley-db to silence this warning. +The AGPL-3.0 licence may impose special requirements for making available +source code of server-side software. The text of the licence is: +https://www.gnu.org/licenses/agpl-3.0.html +http://opensource.org/licenses/AGPL-3.0 + +The Berkeley DB backend to Subversion is deprecated; see +http://subversion.apache.org/docs/release-notes/1.8#bdb-deprecated + +The Subversion developers have not tested Subversion with Berkeley DB 6 for +technical problems or bugs. " >&5 -$as_echo "$as_me: WARNING: we have configured without BDB filesystem support +$as_echo "$as_me: WARNING: We have configured without BDB filesystem support -You don't seem to have Berkeley DB version $db_version or newer -installed and linked to APR-UTIL. We have created a Makefile which will build -Subversion without support for the Berkeley DB back-end. You can find the -latest version of Berkeley DB here: +Berkeley DB 6 was found, but not used. Please re-run configure (see +./config.nice) with the '--enable-bdb6' flag to use it, +or explicitly specify '--disable-bdb6' or '--without-berkeley-db' +to silence this warning. - http://www.oracle.com/technetwork/products/berkeleydb/downloads/index.html +Please note that some versions of Berkeley DB 6+ are under the GNU Affero +General Public License, version 3: +https://oss.oracle.com/pipermail/bdb/2013-June/000056.html -or explicitly specify --without-berkeley-db to silence this warning. +The AGPL-3.0 licence may impose special requirements for making available +source code of server-side software. The text of the licence is: +https://www.gnu.org/licenses/agpl-3.0.html +http://opensource.org/licenses/AGPL-3.0 + +The Berkeley DB backend to Subversion is deprecated; see +http://subversion.apache.org/docs/release-notes/1.8#bdb-deprecated + +The Subversion developers have not tested Subversion with Berkeley DB 6 for +technical problems or bugs. " >&2;} fi diff --git a/configure.ac b/configure.ac index b1748ce9e531..169b34bc0131 100644 --- a/configure.ac +++ b/configure.ac @@ -460,6 +460,7 @@ powerpc-apple-darwin*) SVN_FS_WANT_DB_PATCH=14 ;; esac +db_alt_version="5.x" # Look for libdb4.so first: SVN_LIB_BERKELEY_DB($SVN_FS_WANT_DB_MAJOR, $SVN_FS_WANT_DB_MINOR, $SVN_FS_WANT_DB_PATCH, [db4 db]) @@ -1117,6 +1118,13 @@ elif test "$enable_optimization" = "no"; then # # do nothing fi +dnl Dump the current compiler options +AC_MSG_NOTICE([C compiler flags: $CFLAGS]) +AC_MSG_NOTICE([ user-defined: $CUSERFLAGS]) +AC_MSG_NOTICE([ maintainer-mode: $CMAINTAINERFLAGS]) +AC_MSG_NOTICE([C++ compiler flags: $CXXFLAGS]) +AC_MSG_NOTICE([ user-defined: $CXXUSERFLAGS]) +AC_MSG_NOTICE([ maintainer-mode: $CXXMAINTAINERFLAGS]) AC_ARG_ENABLE(full-version-match, AS_HELP_STRING([--disable-full-version-match], @@ -1504,18 +1512,28 @@ dnl Configure is long - users tend to miss warnings printed during it. dnl Hence, print a warnings about what we did and didn't configure at the dnl end, where people will actually see them. -if test "$svn_lib_berkeley_db" = "no" && test "$with_berkeley_db" != "no"; then - db_version="$SVN_FS_WANT_DB_MAJOR.$SVN_FS_WANT_DB_MINOR.$SVN_FS_WANT_DB_PATCH" - AC_MSG_WARN([we have configured without BDB filesystem support +if test "$svn_have_berkeley_db" = "no6" && test "$enable_bdb6" != "no"; then + AC_MSG_WARN([We have configured without BDB filesystem support -You don't seem to have Berkeley DB version $db_version or newer -installed and linked to APR-UTIL. We have created a Makefile which will build -Subversion without support for the Berkeley DB back-end. You can find the -latest version of Berkeley DB here: +Berkeley DB 6 was found, but not used. Please re-run configure (see +./config.nice) with the '--enable-bdb6' flag to use it, +or explicitly specify '--disable-bdb6' or '--without-berkeley-db' +to silence this warning. - http://www.oracle.com/technetwork/products/berkeleydb/downloads/index.html +Please note that some versions of Berkeley DB 6+ are under the GNU Affero +General Public License, version 3: +https://oss.oracle.com/pipermail/bdb/2013-June/000056.html -or explicitly specify --without-berkeley-db to silence this warning. +The AGPL-3.0 licence may impose special requirements for making available +source code of server-side software. The text of the licence is: +https://www.gnu.org/licenses/agpl-3.0.html +http://opensource.org/licenses/AGPL-3.0 + +The Berkeley DB backend to Subversion is deprecated; see +http://subversion.apache.org/docs/release-notes/1.8#bdb-deprecated + +The Subversion developers have not tested Subversion with Berkeley DB 6 for +technical problems or bugs. ]) fi diff --git a/get-deps.sh b/get-deps.sh index 5d8f49cd8798..0c0be8cc175d 100755 --- a/get-deps.sh +++ b/get-deps.sh @@ -37,7 +37,7 @@ SERF_VERSION=${SERF_VERSION:-"1.2.1"} ZLIB_VERSION=${ZLIB_VERSION:-"1.2.8"} SQLITE_VERSION=${SQLITE_VERSION:-"3.7.15.1"} GTEST_VERSION=${GTEST_VERSION:-"1.6.0"} -HTTPD_VERSION=${HTTPD_VERSION:-"2.4.3"} +HTTPD_VERSION=${HTTPD_VERSION:-"2.4.6"} APR_ICONV_VERSION=${APR_ICONV_VERSION:-"1.2.1"} APR=apr-${APR_VERSION} diff --git a/subversion/include/private/svn_client_private.h b/subversion/include/private/svn_client_private.h index 9eebc184c187..3e6efb56dbca 100644 --- a/subversion/include/private/svn_client_private.h +++ b/subversion/include/private/svn_client_private.h @@ -291,6 +291,39 @@ svn_client__copy_foreign(const char *url, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool); +/* Same as the public svn_client_mergeinfo_log2 API, except for the addition + * of the TARGET_MERGEINFO_CATALOG and RESULT_POOL parameters. + * + * If TARGET_MERGEINFO_CATALOG is NULL then this acts exactly as the public + * API. If *TARGET_MERGEINFO_CATALOG is NULL, then *TARGET_MERGEINFO_CATALOG + * is set to the a mergeinfo catalog representing the mergeinfo on + * TARGET_PATH_OR_URL@TARGET_PEG_REVISION at DEPTH, (like the public API only + * depths of svn_depth_empty or svn_depth_infinity are supported) allocated in + * RESULT_POOL. Finally, if *TARGET_MERGEINFO_CATALOG is non-NULL, then it is + * assumed to be a mergeinfo catalog representing the mergeinfo on + * TARGET_PATH_OR_URL@TARGET_PEG_REVISION at DEPTH. + * + * The keys for the subtree mergeinfo are the repository root-relative + * paths of TARGET_PATH_OR_URL and/or its subtrees, regardless of whether + * TARGET_PATH_OR_URL is a URL or WC path. + */ +svn_error_t * +svn_client__mergeinfo_log(svn_boolean_t finding_merged, + const char *target_path_or_url, + const svn_opt_revision_t *target_peg_revision, + svn_mergeinfo_catalog_t *target_mergeinfo_catalog, + const char *source_path_or_url, + const svn_opt_revision_t *source_peg_revision, + const svn_opt_revision_t *source_start_revision, + const svn_opt_revision_t *source_end_revision, + svn_log_entry_receiver_t log_receiver, + void *log_receiver_baton, + svn_boolean_t discover_changed_paths, + svn_depth_t depth, + const apr_array_header_t *revprops, + svn_client_ctx_t *ctx, + apr_pool_t *result_pool, + apr_pool_t *scratch_pool); #ifdef __cplusplus } diff --git a/subversion/include/private/svn_io_private.h b/subversion/include/private/svn_io_private.h index 2fb4fa5b35ea..239cd6e61108 100644 --- a/subversion/include/private/svn_io_private.h +++ b/subversion/include/private/svn_io_private.h @@ -90,6 +90,11 @@ svn_stream__set_is_buffered(svn_stream_t *stream, svn_boolean_t svn_stream__is_buffered(svn_stream_t *stream); +/** Return the underlying file, if any, associated with the stream, or + * NULL if not available. Accessing the file bypasses the stream. + */ +apr_file_t * +svn_stream__aprfile(svn_stream_t *stream); #ifdef __cplusplus } diff --git a/subversion/include/private/svn_ra_private.h b/subversion/include/private/svn_ra_private.h index 4531bcb00a41..accca3d4f484 100644 --- a/subversion/include/private/svn_ra_private.h +++ b/subversion/include/private/svn_ra_private.h @@ -39,15 +39,23 @@ extern "C" { #endif /* __cplusplus */ -/* Return an error with code SVN_ERR_UNSUPPORTED_FEATURE, and an error - message referencing PATH_OR_URL, if the "server" pointed to by - RA_SESSION doesn't support Merge Tracking (e.g. is pre-1.5). - Perform temporary allocations in POOL. */ +/* Equivalent to svn_ra__assert_capable_server() + for SVN_RA_CAPABILITY_MERGEINFO. */ svn_error_t * svn_ra__assert_mergeinfo_capable_server(svn_ra_session_t *ra_session, const char *path_or_url, apr_pool_t *pool); +/* Return an error with code SVN_ERR_UNSUPPORTED_FEATURE, and an error + message referencing PATH_OR_URL, if the "server" pointed to by + RA_SESSION doesn't support CAPABILITY (an SVN_RA_CAPABILITY_* constant). + Perform temporary allocations in POOL. */ +svn_error_t * +svn_ra__assert_capable_server(svn_ra_session_t *ra_session, + const char *capability, + const char *path_or_url, + apr_pool_t *pool); + /*** Operational Locks ***/ diff --git a/subversion/include/svn_version.h b/subversion/include/svn_version.h index 1dee5b852345..d466d84e9843 100644 --- a/subversion/include/svn_version.h +++ b/subversion/include/svn_version.h @@ -72,7 +72,7 @@ extern "C" { * * @since New in 1.1. */ -#define SVN_VER_PATCH 0 +#define SVN_VER_PATCH 1 /** @deprecated Provided for backward compatibility with the 1.0 API. */ @@ -95,7 +95,7 @@ extern "C" { * * Always change this at the same time as SVN_VER_NUMTAG. */ -#define SVN_VER_TAG " (r1490375)" +#define SVN_VER_TAG " (r1503906)" /** Number tag: a string describing the version. @@ -121,7 +121,7 @@ extern "C" { * When rolling a tarball, we automatically replace it with what we * guess to be the correct revision number. */ -#define SVN_VER_REVISION 1490375 +#define SVN_VER_REVISION 1503906 /* Version strings composed from the above definitions. */ diff --git a/subversion/libsvn_client/client.h b/subversion/libsvn_client/client.h index 9ea25f270398..f13688828744 100644 --- a/subversion/libsvn_client/client.h +++ b/subversion/libsvn_client/client.h @@ -20,7 +20,8 @@ * under the License. * ==================================================================== */ - + + #ifndef SVN_LIBSVN_CLIENT_H #define SVN_LIBSVN_CLIENT_H @@ -208,6 +209,9 @@ svn_client__repos_location_segments(apr_array_header_t **segments, Use the authentication baton cached in CTX to authenticate against the repository. Use POOL for all allocations. + See also svn_client__calc_youngest_common_ancestor() to find youngest + common ancestor for already fetched history-as-mergeinfo information. + See also svn_client__youngest_common_ancestor(). */ svn_error_t * @@ -219,6 +223,34 @@ svn_client__get_youngest_common_ancestor(svn_client__pathrev_t **ancestor_p, apr_pool_t *result_pool, apr_pool_t *scratch_pool); +/* Find the common ancestor of two locations in a repository using already + fetched history-as-mergeinfo information. + + Ancestry is determined by the 'copy-from' relationship and the normal + successor relationship. + + Set *ANCESTOR_P to the location of the youngest common ancestor of + LOC1 and LOC2. If the locations have no common ancestor (including if + they don't have the same repository root URL), set *ANCESTOR_P to NULL. + + HISTORY1, HAS_REV_ZERO_HISTORY1, HISTORY2, HAS_REV_ZERO_HISTORY2 are + history-as-mergeinfo information as returned by + svn_client__get_history_as_mergeinfo() for LOC1 and LOC2 respectively. + + See also svn_client__get_youngest_common_ancestor(). + +*/ +svn_error_t * +svn_client__calc_youngest_common_ancestor(svn_client__pathrev_t **ancestor_p, + const svn_client__pathrev_t *loc1, + apr_hash_t *history1, + svn_boolean_t has_rev_zero_history1, + const svn_client__pathrev_t *loc2, + apr_hash_t *history2, + svn_boolean_t has_rev_zero_history2, + apr_pool_t *result_pool, + apr_pool_t *scratch_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 @@ -247,7 +279,8 @@ svn_client__ensure_ra_session_url(const char **old_session_url, apr_pool_t *pool); /* ---------------------------------------------------------------- */ - + + /*** RA callbacks ***/ @@ -329,7 +362,8 @@ svn_client__ra_make_cb_baton(svn_wc_context_t *wc_ctx, apr_pool_t *result_pool); /* ---------------------------------------------------------------- */ - + + /*** Add/delete ***/ /* If AUTOPROPS is not null: Then read automatic properties matching PATH @@ -442,7 +476,8 @@ svn_client__make_local_parents(const char *path, apr_pool_t *pool); /* ---------------------------------------------------------------- */ - + + /*** Checkout, update and switch ***/ /* Update a working copy LOCAL_ABSPATH to REVISION, and (if not NULL) set @@ -581,7 +616,8 @@ svn_client__switch_internal(svn_revnum_t *result_rev, apr_pool_t *pool); /* ---------------------------------------------------------------- */ - + + /*** Inheritable Properties ***/ /* Convert any svn_prop_inherited_item_t elements in INHERITED_PROPS which @@ -626,7 +662,8 @@ svn_client__get_inheritable_props(apr_hash_t **wcroot_iprops, apr_pool_t *scratch_pool); /* ---------------------------------------------------------------- */ - + + /*** Editor for repository diff ***/ /* Create an editor for a pure repository comparison, i.e. comparing one @@ -666,7 +703,8 @@ svn_client__get_diff_editor2(const svn_delta_editor_t **editor, apr_pool_t *result_pool); /* ---------------------------------------------------------------- */ - + + /*** Editor for diff summary ***/ /* Set *CALLBACKS and *CALLBACK_BATON to a set of diff callbacks that will @@ -689,7 +727,8 @@ svn_client__get_diff_summarize_callbacks( apr_pool_t *pool); /* ---------------------------------------------------------------- */ - + + /*** Copy Stuff ***/ /* This structure is used to associate a specific copy or move SRC with a @@ -730,7 +769,8 @@ typedef struct svn_client__copy_pair_t } svn_client__copy_pair_t; /* ---------------------------------------------------------------- */ - + + /*** Commit Stuff ***/ /* WARNING: This is all new, untested, un-peer-reviewed conceptual @@ -944,7 +984,8 @@ svn_client__do_commit(const char *base_url, apr_pool_t *scratch_pool); - + + /*** Externals (Modules) ***/ /* Handle changes to the svn:externals property described by EXTERNALS_NEW, @@ -1116,7 +1157,8 @@ svn_client__resolve_conflicts(svn_boolean_t *conflicts_remain, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool); - + + #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/subversion/libsvn_client/commit.c b/subversion/libsvn_client/commit.c index 3f6bfef2030a..6b3088558210 100644 --- a/subversion/libsvn_client/commit.c +++ b/subversion/libsvn_client/commit.c @@ -240,6 +240,13 @@ post_process_commit_item(svn_wc_committed_queue_t *queue, remove_lock = (! keep_locks && (item->state_flags & SVN_CLIENT_COMMIT_ITEM_LOCK_TOKEN)); + /* When the node was deleted (or replaced), we need to always remove the + locks, as they're invalidated on the server. We cannot honor the + SVN_CLIENT_COMMIT_ITEM_LOCK_TOKEN flag here because it does not tell + us whether we have locked children. */ + if (item->state_flags & SVN_CLIENT_COMMIT_ITEM_DELETE) + remove_lock = TRUE; + return svn_wc_queue_committed3(queue, wc_ctx, item->path, loop_recurse, item->incoming_prop_changes, remove_lock, !keep_changelists, diff --git a/subversion/libsvn_client/copy.c b/subversion/libsvn_client/copy.c index c0501b952a04..000ae0c2ff1c 100644 --- a/subversion/libsvn_client/copy.c +++ b/subversion/libsvn_client/copy.c @@ -385,6 +385,7 @@ static svn_error_t * verify_wc_dsts(const apr_array_header_t *copy_pairs, svn_boolean_t make_parents, svn_boolean_t is_move, + svn_boolean_t metadata_only, svn_client_ctx_t *ctx, apr_pool_t *result_pool, apr_pool_t *scratch_pool) @@ -435,8 +436,11 @@ verify_wc_dsts(const apr_array_header_t *copy_pairs, } /* Check that there is no unversioned obstruction */ - SVN_ERR(svn_io_check_path(pair->dst_abspath_or_url, &dst_kind, - iterpool)); + if (metadata_only) + dst_kind = svn_node_none; + else + SVN_ERR(svn_io_check_path(pair->dst_abspath_or_url, &dst_kind, + iterpool)); if (dst_kind != svn_node_none) { @@ -527,6 +531,7 @@ static svn_error_t * verify_wc_srcs_and_dsts(const apr_array_header_t *copy_pairs, svn_boolean_t make_parents, svn_boolean_t is_move, + svn_boolean_t metadata_only, svn_client_ctx_t *ctx, apr_pool_t *result_pool, apr_pool_t *scratch_pool) @@ -557,7 +562,7 @@ verify_wc_srcs_and_dsts(const apr_array_header_t *copy_pairs, scratch_pool)); } - SVN_ERR(verify_wc_dsts(copy_pairs, make_parents, is_move, ctx, + SVN_ERR(verify_wc_dsts(copy_pairs, make_parents, is_move, metadata_only, ctx, result_pool, iterpool)); svn_pool_destroy(iterpool); @@ -1727,8 +1732,8 @@ repos_to_wc_copy_locked(svn_boolean_t *timestamp_sleep, /* We've already checked for physical obstruction by a working file. But there could also be logical obstruction by an entry whose working file happens to be missing.*/ - SVN_ERR(verify_wc_dsts(copy_pairs, FALSE, FALSE, ctx, - scratch_pool, iterpool)); + SVN_ERR(verify_wc_dsts(copy_pairs, FALSE, FALSE, FALSE /* metadata_only */, + ctx, scratch_pool, iterpool)); /* Decide whether the two repositories are the same or not. */ { @@ -2210,7 +2215,7 @@ try_copy(svn_boolean_t *timestamp_sleep, if ((! srcs_are_urls) && (! dst_is_url)) { SVN_ERR(verify_wc_srcs_and_dsts(copy_pairs, make_parents, is_move, - ctx, pool, pool)); + metadata_only, ctx, pool, pool)); /* Copy or move all targets. */ if (is_move) diff --git a/subversion/libsvn_client/diff.c b/subversion/libsvn_client/diff.c index a5a36bd184a9..26890aec66b5 100644 --- a/subversion/libsvn_client/diff.c +++ b/subversion/libsvn_client/diff.c @@ -51,6 +51,7 @@ #include "private/svn_wc_private.h" #include "private/svn_diff_private.h" #include "private/svn_subr_private.h" +#include "private/svn_io_private.h" #include "svn_private_config.h" @@ -807,14 +808,23 @@ diff_content_changed(svn_boolean_t *wrote_header, * ### a non-git compatible diff application.*/ /* We deal in streams, but svn_io_run_diff2() deals in file handles, - unfortunately, so we need to make these temporary files, and then - copy the contents to our stream. */ - SVN_ERR(svn_io_open_unique_file3(&outfile, &outfilename, NULL, - svn_io_file_del_on_pool_cleanup, - scratch_pool, scratch_pool)); - SVN_ERR(svn_io_open_unique_file3(&errfile, &errfilename, NULL, - svn_io_file_del_on_pool_cleanup, - scratch_pool, scratch_pool)); + so we may need to make temporary files and then copy the contents + to our stream. */ + outfile = svn_stream__aprfile(outstream); + if (outfile) + outfilename = NULL; + else + SVN_ERR(svn_io_open_unique_file3(&outfile, &outfilename, NULL, + svn_io_file_del_on_pool_cleanup, + scratch_pool, scratch_pool)); + + errfile = svn_stream__aprfile(errstream); + if (errfile) + errfilename = NULL; + else + SVN_ERR(svn_io_open_unique_file3(&errfile, &errfilename, NULL, + svn_io_file_del_on_pool_cleanup, + scratch_pool, scratch_pool)); SVN_ERR(svn_io_run_diff2(".", diff_cmd_baton->options.for_external.argv, @@ -824,20 +834,25 @@ diff_content_changed(svn_boolean_t *wrote_header, &exitcode, outfile, errfile, diff_cmd_baton->diff_cmd, scratch_pool)); - SVN_ERR(svn_io_file_close(outfile, scratch_pool)); - SVN_ERR(svn_io_file_close(errfile, scratch_pool)); - /* Now, open and copy our files to our output streams. */ - SVN_ERR(svn_stream_open_readonly(&stream, outfilename, - scratch_pool, scratch_pool)); - SVN_ERR(svn_stream_copy3(stream, svn_stream_disown(outstream, - scratch_pool), - NULL, NULL, scratch_pool)); - SVN_ERR(svn_stream_open_readonly(&stream, errfilename, - scratch_pool, scratch_pool)); - SVN_ERR(svn_stream_copy3(stream, svn_stream_disown(errstream, - scratch_pool), - NULL, NULL, scratch_pool)); + if (outfilename) + { + SVN_ERR(svn_io_file_close(outfile, scratch_pool)); + SVN_ERR(svn_stream_open_readonly(&stream, outfilename, + scratch_pool, scratch_pool)); + SVN_ERR(svn_stream_copy3(stream, svn_stream_disown(outstream, + scratch_pool), + NULL, NULL, scratch_pool)); + } + if (errfilename) + { + SVN_ERR(svn_io_file_close(errfile, scratch_pool)); + SVN_ERR(svn_stream_open_readonly(&stream, errfilename, + scratch_pool, scratch_pool)); + SVN_ERR(svn_stream_copy3(stream, svn_stream_disown(errstream, + scratch_pool), + NULL, NULL, scratch_pool)); + } /* We have a printed a diff for this path, mark it as visited. */ *wrote_header = TRUE; diff --git a/subversion/libsvn_client/diff_local.c b/subversion/libsvn_client/diff_local.c index cc7184f12cba..2dd8a1b67da0 100644 --- a/subversion/libsvn_client/diff_local.c +++ b/subversion/libsvn_client/diff_local.c @@ -607,7 +607,10 @@ svn_client__arbitrary_nodes_diff(const char *local_abspath1, if (kind1 != kind2) return svn_error_createf(SVN_ERR_NODE_UNEXPECTED_KIND, NULL, _("'%s' is not the same node kind as '%s'"), - local_abspath1, local_abspath2); + svn_dirent_local_style(local_abspath1, + scratch_pool), + svn_dirent_local_style(local_abspath2, + scratch_pool)); if (depth == svn_depth_unknown) depth = svn_depth_infinity; @@ -627,7 +630,10 @@ svn_client__arbitrary_nodes_diff(const char *local_abspath1, else return svn_error_createf(SVN_ERR_NODE_UNEXPECTED_KIND, NULL, _("'%s' is not a file or directory"), - kind1 == svn_node_none ? - local_abspath1 : local_abspath2); + kind1 == svn_node_none + ? svn_dirent_local_style(local_abspath1, + scratch_pool) + : svn_dirent_local_style(local_abspath2, + scratch_pool)); return SVN_NO_ERROR; } diff --git a/subversion/libsvn_client/log.c b/subversion/libsvn_client/log.c index ca3edac4becb..73bd61211eb4 100644 --- a/subversion/libsvn_client/log.c +++ b/subversion/libsvn_client/log.c @@ -712,7 +712,17 @@ run_ra_get_log(apr_array_header_t *revision_ranges, matching_segment = bsearch(&younger_rev, log_segments->elts, log_segments->nelts, log_segments->elt_size, compare_rev_to_segment); - SVN_ERR_ASSERT(*matching_segment); + /* LOG_SEGMENTS is supposed to represent the history of PATHS from + the oldest to youngest revs in REVISION_RANGES. This function's + current sole caller svn_client_log5 *should* be providing + LOG_SEGMENTS that span the oldest to youngest revs in + REVISION_RANGES, even if one or more of the svn_location_segment_t's + returned have NULL path members indicating a gap in the history. So + MATCHING_SEGMENT should never be NULL, but clearly sometimes it is, + see http://svn.haxx.se/dev/archive-2013-06/0522.shtml + So to be safe we handle that case. */ + if (matching_segment == NULL) + continue; /* A segment with a NULL path means there is gap in the history. We'll just proceed and let svn_ra_get_log2 fail with a useful @@ -850,13 +860,32 @@ svn_client_log5(const apr_array_header_t *targets, SVN_ERR(svn_client__ensure_ra_session_url(&old_session_url, ra_session, actual_loc->url, pool)); - /* Get the svn_location_segment_t's representing the requested log ranges. */ - SVN_ERR(svn_client__repos_location_segments(&log_segments, ra_session, - actual_loc->url, - actual_loc->rev, /* peg */ - actual_loc->rev, /* start */ - oldest_rev, /* end */ - ctx, pool)); + /* Save us an RA layer round trip if we are on the repository root and + know the result in advance. All the revision data has already been + validated. + */ + if (strcmp(actual_loc->url, actual_loc->repos_root_url) == 0) + { + svn_location_segment_t *segment = apr_pcalloc(pool, sizeof(*segment)); + log_segments = apr_array_make(pool, 1, sizeof(segment)); + + segment->range_start = oldest_rev; + segment->range_end = actual_loc->rev; + segment->path = ""; + APR_ARRAY_PUSH(log_segments, svn_location_segment_t *) = segment; + } + else + { + /* Get the svn_location_segment_t's representing the requested log + * ranges. */ + SVN_ERR(svn_client__repos_location_segments(&log_segments, ra_session, + actual_loc->url, + actual_loc->rev, /* peg */ + actual_loc->rev, /* start */ + oldest_rev, /* end */ + ctx, pool)); + } + SVN_ERR(run_ra_get_log(revision_ranges, relative_targets, log_segments, actual_loc, ra_session, targets, limit, diff --git a/subversion/libsvn_client/merge.c b/subversion/libsvn_client/merge.c index 884d63d57e8e..17a5d23f5c44 100644 --- a/subversion/libsvn_client/merge.c +++ b/subversion/libsvn_client/merge.c @@ -1307,6 +1307,9 @@ record_tree_conflict(merge_cmd_baton_t *merge_b, { svn_wc_context_t *wc_ctx = merge_b->ctx->wc_ctx; + if (merge_b->record_only) + return SVN_NO_ERROR; + if (merge_b->merge_source.ancestral || merge_b->reintegrate_merge) { @@ -1316,8 +1319,7 @@ record_tree_conflict(merge_cmd_baton_t *merge_b, alloc_and_store_path(&merge_b->conflicted_paths, local_abspath, merge_b->pool); - - if (!merge_b->record_only && !merge_b->dry_run) + if (!merge_b->dry_run) { svn_wc_conflict_description2_t *conflict; const svn_wc_conflict_version_t *left; @@ -12029,16 +12031,17 @@ operative_rev_receiver(void *baton, return svn_error_create(SVN_ERR_CEASE_INVOCATION, NULL, NULL); } -/* Wrapper around svn_client_mergeinfo_log2. All arguments are as per - that API. The discover_changed_paths, depth, and revprops args to - svn_client_mergeinfo_log2 are always TRUE, svn_depth_infinity_t, - and NULL respectively. +/* Wrapper around svn_client__mergeinfo_log. All arguments are as per + that private API. The discover_changed_paths, depth, and revprops args to + svn_client__mergeinfo_log are always TRUE, svn_depth_infinity_t, + and empty array respectively. If RECEIVER raises a SVN_ERR_CEASE_INVOCATION error, but still sets *REVISION to a valid revnum, then clear the error. Otherwise return any error. */ static svn_error_t* -short_circuit_mergeinfo_log(svn_boolean_t finding_merged, +short_circuit_mergeinfo_log(svn_mergeinfo_catalog_t *target_mergeinfo_cat, + svn_boolean_t finding_merged, const char *target_path_or_url, const svn_opt_revision_t *target_peg_revision, const char *source_path_or_url, @@ -12048,18 +12051,25 @@ short_circuit_mergeinfo_log(svn_boolean_t finding_merged, svn_log_entry_receiver_t receiver, svn_revnum_t *revision, svn_client_ctx_t *ctx, + apr_pool_t *result_pool, apr_pool_t *scratch_pool) { - svn_error_t *err = svn_client_mergeinfo_log2(finding_merged, - target_path_or_url, - target_peg_revision, - source_path_or_url, - source_peg_revision, - source_start_revision, - source_end_revision, - receiver, revision, - TRUE, svn_depth_infinity, - NULL, ctx, scratch_pool); + apr_array_header_t *revprops; + svn_error_t *err; + + revprops = apr_array_make(scratch_pool, 0, sizeof(const char *)); + err = svn_client__mergeinfo_log(finding_merged, + target_path_or_url, + target_peg_revision, + target_mergeinfo_cat, + source_path_or_url, + source_peg_revision, + source_start_revision, + source_end_revision, + receiver, revision, + TRUE, svn_depth_infinity, + revprops, ctx, result_pool, + scratch_pool); if (err) { @@ -12129,6 +12139,7 @@ find_last_merged_location(svn_client__pathrev_t **base_p, svn_opt_revision_t source_peg_rev, source_start_rev, source_end_rev, target_opt_rev; svn_revnum_t youngest_merged_rev = SVN_INVALID_REVNUM; + svn_mergeinfo_catalog_t target_mergeinfo_cat = NULL; source_peg_rev.kind = svn_opt_revision_number; source_peg_rev.value.number = source_branch->tip->rev; @@ -12141,14 +12152,15 @@ find_last_merged_location(svn_client__pathrev_t **base_p, /* Find the youngest revision fully merged from SOURCE_BRANCH to TARGET, if such a revision exists. */ - SVN_ERR(short_circuit_mergeinfo_log(TRUE, /* Find merged */ + SVN_ERR(short_circuit_mergeinfo_log(&target_mergeinfo_cat, + TRUE, /* Find merged */ target->url, &target_opt_rev, source_branch->tip->url, &source_peg_rev, &source_end_rev, &source_start_rev, operative_rev_receiver, &youngest_merged_rev, - ctx, scratch_pool)); + ctx, result_pool, scratch_pool)); if (!SVN_IS_VALID_REVNUM(youngest_merged_rev)) { @@ -12175,14 +12187,15 @@ find_last_merged_location(svn_client__pathrev_t **base_p, (i.e. finding the youngest revision after the YCA where all revs have been merged) that doesn't matter. */ source_end_rev.value.number = youngest_merged_rev; - SVN_ERR(short_circuit_mergeinfo_log(FALSE, /* Find eligible */ + SVN_ERR(short_circuit_mergeinfo_log(&target_mergeinfo_cat, + FALSE, /* Find eligible */ target->url, &target_opt_rev, source_branch->tip->url, &source_peg_rev, &source_start_rev, &source_end_rev, operative_rev_receiver, &oldest_eligible_rev, - ctx, scratch_pool)); + ctx, scratch_pool, scratch_pool)); /* If there are revisions eligible for merging, use the oldest one to calculate the base. Otherwise there are no operative revisions @@ -12298,9 +12311,13 @@ find_automatic_merge(svn_client__pathrev_t **base_p, &s_t->target->loc, SVN_INVALID_REVNUM, SVN_INVALID_REVNUM, s_t->target_ra_session, ctx, scratch_pool)); - SVN_ERR(svn_client__get_youngest_common_ancestor( - &s_t->yca, s_t->source, &s_t->target->loc, s_t->source_ra_session, - ctx, result_pool, result_pool)); + SVN_ERR(svn_client__calc_youngest_common_ancestor( + &s_t->yca, s_t->source, s_t->source_branch.history, + s_t->source_branch.has_r0_history, + &s_t->target->loc, s_t->target_branch.history, + s_t->target_branch.has_r0_history, + result_pool, scratch_pool)); + if (! s_t->yca) return svn_error_createf(SVN_ERR_CLIENT_NOT_READY_TO_MERGE, NULL, _("'%s@%ld' must be ancestrally related to " diff --git a/subversion/libsvn_client/mergeinfo.c b/subversion/libsvn_client/mergeinfo.c index 453cc66a7772..6dd34343e0d1 100644 --- a/subversion/libsvn_client/mergeinfo.c +++ b/subversion/libsvn_client/mergeinfo.c @@ -1651,11 +1651,11 @@ svn_client_mergeinfo_get_merged(apr_hash_t **mergeinfo_p, return SVN_NO_ERROR; } - svn_error_t * -svn_client_mergeinfo_log2(svn_boolean_t finding_merged, +svn_client__mergeinfo_log(svn_boolean_t finding_merged, const char *target_path_or_url, const svn_opt_revision_t *target_peg_revision, + svn_mergeinfo_catalog_t *target_mergeinfo_catalog, const char *source_path_or_url, const svn_opt_revision_t *source_peg_revision, const svn_opt_revision_t *source_start_revision, @@ -1666,12 +1666,15 @@ svn_client_mergeinfo_log2(svn_boolean_t finding_merged, svn_depth_t depth, const apr_array_header_t *revprops, svn_client_ctx_t *ctx, + apr_pool_t *result_pool, apr_pool_t *scratch_pool) { const char *log_target = NULL; const char *repos_root; const char *target_repos_relpath; svn_mergeinfo_catalog_t target_mergeinfo_cat; + svn_ra_session_t *target_session = NULL; + svn_client__pathrev_t *pathrev; /* A hash of paths, at or under TARGET_PATH_OR_URL, mapped to rangelists. Not technically mergeinfo, so not using the @@ -1688,6 +1691,7 @@ svn_client_mergeinfo_log2(svn_boolean_t finding_merged, apr_hash_index_t *hi; apr_pool_t *iterpool; svn_boolean_t oldest_revs_first = TRUE; + apr_pool_t *subpool; /* We currently only support depth = empty | infinity. */ if (depth != svn_depth_infinity && depth != svn_depth_empty) @@ -1713,6 +1717,8 @@ svn_client_mergeinfo_log2(svn_boolean_t finding_merged, && (source_start_revision->kind != svn_opt_revision_unspecified)) return svn_error_create(SVN_ERR_CLIENT_BAD_REVISION, NULL, NULL); + subpool = svn_pool_create(scratch_pool); + /* We need the union of TARGET_PATH_OR_URL@TARGET_PEG_REVISION's mergeinfo and MERGE_SOURCE_URL's history. It's not enough to do path matching, because renames in the history of MERGE_SOURCE_URL @@ -1720,10 +1726,45 @@ svn_client_mergeinfo_log2(svn_boolean_t finding_merged, the target, that vastly simplifies matters (we'll have nothing to do). */ /* This get_mergeinfo() call doubles as a mergeinfo capabilities check. */ - SVN_ERR(get_mergeinfo(&target_mergeinfo_cat, &repos_root, - target_path_or_url, target_peg_revision, - depth == svn_depth_infinity, TRUE, - ctx, scratch_pool, scratch_pool)); + if (target_mergeinfo_catalog) + { + if (*target_mergeinfo_catalog) + { + /* The caller provided the mergeinfo catalog for + TARGET_PATH_OR_URL, so we don't need to accquire + it ourselves. We do need to get the repos_root + though, because get_mergeinfo() won't do it for us. */ + target_mergeinfo_cat = *target_mergeinfo_catalog; + SVN_ERR(svn_client__ra_session_from_path2(&target_session, &pathrev, + target_path_or_url, NULL, + target_peg_revision, + target_peg_revision, + ctx, subpool)); + SVN_ERR(svn_ra_get_repos_root2(target_session, &repos_root, + scratch_pool)); + } + else + { + /* The caller didn't provide the mergeinfo catalog for + TARGET_PATH_OR_URL, but wants us to pass a copy back + when we get it, so use RESULT_POOL. */ + SVN_ERR(get_mergeinfo(target_mergeinfo_catalog, &repos_root, + target_path_or_url, target_peg_revision, + depth == svn_depth_infinity, TRUE, + ctx, result_pool, scratch_pool)); + target_mergeinfo_cat = *target_mergeinfo_catalog; + } + } + else + { + /* The caller didn't provide the mergeinfo catalog for + TARGET_PATH_OR_URL, nor does it want a copy, so we can use + nothing but SCRATCH_POOL. */ + SVN_ERR(get_mergeinfo(&target_mergeinfo_cat, &repos_root, + target_path_or_url, target_peg_revision, + depth == svn_depth_infinity, TRUE, + ctx, scratch_pool, scratch_pool)); + } if (!svn_path_is_url(target_path_or_url)) { @@ -1755,6 +1796,7 @@ svn_client_mergeinfo_log2(svn_boolean_t finding_merged, history. */ if (finding_merged) { + svn_pool_destroy(subpool); return SVN_NO_ERROR; } else @@ -1772,18 +1814,17 @@ svn_client_mergeinfo_log2(svn_boolean_t finding_merged, * ### TODO: As the source and target must be in the same repository, we * should share a single session, tracking the two URLs separately. */ { - apr_pool_t *sesspool = svn_pool_create(scratch_pool); - svn_ra_session_t *source_session, *target_session; - svn_client__pathrev_t *pathrev; + svn_ra_session_t *source_session; svn_revnum_t start_rev, end_rev, youngest_rev = SVN_INVALID_REVNUM; if (! finding_merged) { - SVN_ERR(svn_client__ra_session_from_path2(&target_session, &pathrev, - target_path_or_url, NULL, - target_peg_revision, - target_peg_revision, - ctx, sesspool)); + if (!target_session) + SVN_ERR(svn_client__ra_session_from_path2(&target_session, &pathrev, + target_path_or_url, NULL, + target_peg_revision, + target_peg_revision, + ctx, subpool)); SVN_ERR(svn_client__get_history_as_mergeinfo(&target_history, NULL, pathrev, SVN_INVALID_REVNUM, @@ -1796,17 +1837,17 @@ svn_client_mergeinfo_log2(svn_boolean_t finding_merged, source_path_or_url, NULL, source_peg_revision, source_peg_revision, - ctx, sesspool)); + ctx, subpool)); SVN_ERR(svn_client__get_revision_number(&start_rev, &youngest_rev, ctx->wc_ctx, source_path_or_url, source_session, source_start_revision, - sesspool)); + subpool)); SVN_ERR(svn_client__get_revision_number(&end_rev, &youngest_rev, ctx->wc_ctx, source_path_or_url, source_session, source_end_revision, - sesspool)); + subpool)); SVN_ERR(svn_client__get_history_as_mergeinfo(&source_history, NULL, pathrev, MAX(end_rev, start_rev), @@ -1817,7 +1858,7 @@ svn_client_mergeinfo_log2(svn_boolean_t finding_merged, oldest_revs_first = FALSE; /* Close the source and target sessions. */ - svn_pool_destroy(sesspool); + svn_pool_destroy(subpool); } /* Separate the explicit or inherited mergeinfo on TARGET_PATH_OR_URL, @@ -2089,6 +2130,31 @@ svn_client_mergeinfo_log2(svn_boolean_t finding_merged, return SVN_NO_ERROR; } +svn_error_t * +svn_client_mergeinfo_log2(svn_boolean_t finding_merged, + const char *target_path_or_url, + const svn_opt_revision_t *target_peg_revision, + const char *source_path_or_url, + const svn_opt_revision_t *source_peg_revision, + const svn_opt_revision_t *source_start_revision, + const svn_opt_revision_t *source_end_revision, + svn_log_entry_receiver_t log_receiver, + void *log_receiver_baton, + svn_boolean_t discover_changed_paths, + svn_depth_t depth, + const apr_array_header_t *revprops, + svn_client_ctx_t *ctx, + apr_pool_t *scratch_pool) +{ + return svn_client__mergeinfo_log(finding_merged, target_path_or_url, + target_peg_revision, NULL, + source_path_or_url, source_peg_revision, + source_start_revision, source_end_revision, + log_receiver, log_receiver_baton, + discover_changed_paths, depth, revprops, + ctx, scratch_pool, scratch_pool); +} + svn_error_t * svn_client_suggest_merge_sources(apr_array_header_t **suggestions, const char *path_or_url, diff --git a/subversion/libsvn_client/ra.c b/subversion/libsvn_client/ra.c index 33d3de509d68..a0d4ceab5f40 100644 --- a/subversion/libsvn_client/ra.c +++ b/subversion/libsvn_client/ra.c @@ -862,23 +862,20 @@ svn_client__repos_locations(const char **start_url, return SVN_NO_ERROR; } - svn_error_t * -svn_client__get_youngest_common_ancestor(svn_client__pathrev_t **ancestor_p, - const svn_client__pathrev_t *loc1, - const svn_client__pathrev_t *loc2, - svn_ra_session_t *session, - svn_client_ctx_t *ctx, - apr_pool_t *result_pool, - apr_pool_t *scratch_pool) +svn_client__calc_youngest_common_ancestor(svn_client__pathrev_t **ancestor_p, + const svn_client__pathrev_t *loc1, + apr_hash_t *history1, + svn_boolean_t has_rev_zero_history1, + const svn_client__pathrev_t *loc2, + apr_hash_t *history2, + svn_boolean_t has_rev_zero_history2, + apr_pool_t *result_pool, + apr_pool_t *scratch_pool) { - apr_pool_t *sesspool = NULL; - apr_hash_t *history1, *history2; apr_hash_index_t *hi; svn_revnum_t yc_revision = SVN_INVALID_REVNUM; const char *yc_relpath = NULL; - svn_boolean_t has_rev_zero_history1; - svn_boolean_t has_rev_zero_history2; if (strcmp(loc1->repos_root_url, loc2->repos_root_url) != 0) { @@ -886,32 +883,6 @@ svn_client__get_youngest_common_ancestor(svn_client__pathrev_t **ancestor_p, return SVN_NO_ERROR; } - /* Open an RA session for the two locations. */ - if (session == NULL) - { - sesspool = svn_pool_create(scratch_pool); - SVN_ERR(svn_client_open_ra_session2(&session, loc1->url, NULL, ctx, - sesspool, sesspool)); - } - - /* We're going to cheat and use history-as-mergeinfo because it - saves us a bunch of annoying custom data comparisons and such. */ - SVN_ERR(svn_client__get_history_as_mergeinfo(&history1, - &has_rev_zero_history1, - loc1, - SVN_INVALID_REVNUM, - SVN_INVALID_REVNUM, - session, ctx, scratch_pool)); - SVN_ERR(svn_client__get_history_as_mergeinfo(&history2, - &has_rev_zero_history2, - loc2, - SVN_INVALID_REVNUM, - SVN_INVALID_REVNUM, - session, ctx, scratch_pool)); - /* Close the ra session if we opened one. */ - if (sesspool) - svn_pool_destroy(sesspool); - /* Loop through the first location's history, check for overlapping paths and ranges in the second location's history, and remembering the youngest matching location. */ @@ -964,6 +935,63 @@ svn_client__get_youngest_common_ancestor(svn_client__pathrev_t **ancestor_p, return SVN_NO_ERROR; } +svn_error_t * +svn_client__get_youngest_common_ancestor(svn_client__pathrev_t **ancestor_p, + const svn_client__pathrev_t *loc1, + const svn_client__pathrev_t *loc2, + svn_ra_session_t *session, + svn_client_ctx_t *ctx, + apr_pool_t *result_pool, + apr_pool_t *scratch_pool) +{ + apr_pool_t *sesspool = NULL; + apr_hash_t *history1, *history2; + svn_boolean_t has_rev_zero_history1; + svn_boolean_t has_rev_zero_history2; + + if (strcmp(loc1->repos_root_url, loc2->repos_root_url) != 0) + { + *ancestor_p = NULL; + return SVN_NO_ERROR; + } + + /* Open an RA session for the two locations. */ + if (session == NULL) + { + sesspool = svn_pool_create(scratch_pool); + SVN_ERR(svn_client_open_ra_session2(&session, loc1->url, NULL, ctx, + sesspool, sesspool)); + } + + /* We're going to cheat and use history-as-mergeinfo because it + saves us a bunch of annoying custom data comparisons and such. */ + SVN_ERR(svn_client__get_history_as_mergeinfo(&history1, + &has_rev_zero_history1, + loc1, + SVN_INVALID_REVNUM, + SVN_INVALID_REVNUM, + session, ctx, scratch_pool)); + SVN_ERR(svn_client__get_history_as_mergeinfo(&history2, + &has_rev_zero_history2, + loc2, + SVN_INVALID_REVNUM, + SVN_INVALID_REVNUM, + session, ctx, scratch_pool)); + /* Close the ra session if we opened one. */ + if (sesspool) + svn_pool_destroy(sesspool); + + SVN_ERR(svn_client__calc_youngest_common_ancestor(ancestor_p, + loc1, history1, + has_rev_zero_history1, + loc2, history2, + has_rev_zero_history2, + result_pool, + scratch_pool)); + + return SVN_NO_ERROR; +} + svn_error_t * svn_client__youngest_common_ancestor(const char **ancestor_url, svn_revnum_t *ancestor_rev, diff --git a/subversion/libsvn_client/switch.c b/subversion/libsvn_client/switch.c index fae03de09753..cd39cad936cf 100644 --- a/subversion/libsvn_client/switch.c +++ b/subversion/libsvn_client/switch.c @@ -241,7 +241,7 @@ switch_internal(svn_revnum_t *result_rev, return svn_error_createf(SVN_ERR_CLIENT_UNRELATED_RESOURCES, NULL, _("'%s' shares no common ancestry with '%s'"), switch_url, - svn_dirent_dirname(local_abspath, pool)); + svn_dirent_local_style(local_abspath, pool)); } wcroot_iprops = apr_hash_make(pool); diff --git a/subversion/libsvn_delta/compat.c b/subversion/libsvn_delta/compat.c index 8d315d194d57..470efa2a6bc1 100644 --- a/subversion/libsvn_delta/compat.c +++ b/subversion/libsvn_delta/compat.c @@ -218,6 +218,7 @@ locate_change(struct ev2_edit_baton *eb, change = apr_pcalloc(eb->edit_pool, sizeof(*change)); change->changing = SVN_INVALID_REVNUM; change->deleting = SVN_INVALID_REVNUM; + change->kind = svn_node_unknown; svn_hash_sets(eb->changes, relpath, change); @@ -1633,11 +1634,14 @@ apply_change(void **dir_baton, change->copyfrom_path, scratch_pool); else - copyfrom_url = change->copyfrom_path; + { + copyfrom_url = change->copyfrom_path; - /* Make this an FS path by prepending "/" */ - if (copyfrom_url[0] != '/') - copyfrom_url = apr_pstrcat(scratch_pool, "/", copyfrom_url, NULL); + /* Make this an FS path by prepending "/" */ + if (copyfrom_url[0] != '/') + copyfrom_url = apr_pstrcat(scratch_pool, "/", + copyfrom_url, NULL); + } copyfrom_rev = change->copyfrom_rev; } diff --git a/subversion/libsvn_fs_base/bdb/env.c b/subversion/libsvn_fs_base/bdb/env.c index 557c9dc36bb2..7309a80150dd 100644 --- a/subversion/libsvn_fs_base/bdb/env.c +++ b/subversion/libsvn_fs_base/bdb/env.c @@ -227,7 +227,7 @@ bdb_error_gatherer(const DB_ENV *dbenv, const char *baton, const char *msg) SVN_BDB_ERROR_GATHERER_IGNORE(dbenv); - new_err = svn_error_createf(APR_SUCCESS, NULL, "bdb: %s", msg); + new_err = svn_error_createf(SVN_ERR_FS_BERKELEY_DB, NULL, "bdb: %s", msg); if (error_info->pending_errors) svn_error_compose(error_info->pending_errors, new_err); else diff --git a/subversion/libsvn_fs_base/tree.c b/subversion/libsvn_fs_base/tree.c index e603af41e778..046ab5daa072 100644 --- a/subversion/libsvn_fs_base/tree.c +++ b/subversion/libsvn_fs_base/tree.c @@ -4811,6 +4811,13 @@ base_node_origin_rev(svn_revnum_t *revision, prev_location() does below will work. */ path = svn_fs__canonicalize_abspath(path, pool); + /* Special-case the root node (for performance reasons) */ + if (strcmp(path, "/") == 0) + { + *revision = 0; + return SVN_NO_ERROR; + } + /* If we have support for the node-origins table, we'll try to use it. */ if (bfd->format >= SVN_FS_BASE__MIN_NODE_ORIGINS_FORMAT) diff --git a/subversion/libsvn_fs_fs/fs_fs.c b/subversion/libsvn_fs_fs/fs_fs.c index 0354a1f5ffe9..c6074acee073 100644 --- a/subversion/libsvn_fs_fs/fs_fs.c +++ b/subversion/libsvn_fs_fs/fs_fs.c @@ -1467,6 +1467,12 @@ delete_revprops_shard(const char *shard_path, apr_pool_t *scratch_pool); /* In the filesystem FS, pack all revprop shards up to min_unpacked_rev. + * + * NOTE: Keep the old non-packed shards around until after the format bump. + * Otherwise, re-running upgrade will drop the packed revprop shard but + * have no unpacked data anymore. Call upgrade_cleanup_pack_revprops after + * the bump. + * * Use SCRATCH_POOL for temporary allocations. */ static svn_error_t * @@ -1507,6 +1513,29 @@ upgrade_pack_revprops(svn_fs_t *fs, svn_pool_clear(iterpool); } + svn_pool_destroy(iterpool); + + return SVN_NO_ERROR; +} + +/* In the filesystem FS, remove all non-packed revprop shards up to + * min_unpacked_rev. Use SCRATCH_POOL for temporary allocations. + * See upgrade_pack_revprops for more info. + */ +static svn_error_t * +upgrade_cleanup_pack_revprops(svn_fs_t *fs, + apr_pool_t *scratch_pool) +{ + fs_fs_data_t *ffd = fs->fsap_data; + const char *revprops_shard_path; + apr_int64_t shard; + apr_int64_t first_unpacked_shard + = ffd->min_unpacked_rev / ffd->max_files_per_dir; + + apr_pool_t *iterpool = svn_pool_create(scratch_pool); + const char *revsprops_dir = svn_dirent_join(fs->path, PATH_REVPROPS_DIR, + scratch_pool); + /* delete the non-packed revprops shards afterwards */ for (shard = 0; shard < first_unpacked_shard; ++shard) { @@ -1531,6 +1560,7 @@ upgrade_body(void *baton, apr_pool_t *pool) int format, max_files_per_dir; const char *format_path = path_format(fs, pool); svn_node_kind_t kind; + svn_boolean_t needs_revprop_shard_cleanup = FALSE; /* Read the FS format number and max-files-per-dir setting. */ SVN_ERR(read_format(&format, &max_files_per_dir, format_path, pool)); @@ -1582,15 +1612,28 @@ upgrade_body(void *baton, apr_pool_t *pool) if (format < SVN_FS_FS__MIN_PACKED_FORMAT) SVN_ERR(svn_io_file_create(path_min_unpacked_rev(fs, pool), "0\n", pool)); - /* If the file system supports revision packing but not revprop packing, - pack the revprops up to the point that revision data has been packed. */ + /* If the file system supports revision packing but not revprop packing + *and* the FS has been sharded, pack the revprops up to the point that + revision data has been packed. However, keep the non-packed revprop + files around until after the format bump */ if ( format >= SVN_FS_FS__MIN_PACKED_FORMAT - && format < SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT) - SVN_ERR(upgrade_pack_revprops(fs, pool)); + && format < SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT + && max_files_per_dir > 0) + { + needs_revprop_shard_cleanup = TRUE; + SVN_ERR(upgrade_pack_revprops(fs, pool)); + } /* Bump the format file. */ - return write_format(format_path, SVN_FS_FS__FORMAT_NUMBER, max_files_per_dir, - TRUE, pool); + SVN_ERR(write_format(format_path, SVN_FS_FS__FORMAT_NUMBER, + max_files_per_dir, TRUE, pool)); + + /* Now, it is safe to remove the redundant revprop files. */ + if (needs_revprop_shard_cleanup) + SVN_ERR(upgrade_cleanup_pack_revprops(fs, pool)); + + /* Done */ + return SVN_NO_ERROR; } @@ -3664,7 +3707,7 @@ parse_packed_revprops(svn_fs_t *fs, svn_string_t *compressed = svn_stringbuf__morph_into_string(revprops->packed_revprops); svn_stringbuf_t *uncompressed = svn_stringbuf_create_empty(pool); - SVN_ERR(svn__decompress(compressed, uncompressed, 0x1000000)); + SVN_ERR(svn__decompress(compressed, uncompressed, APR_SIZE_MAX)); /* read first revision number and number of revisions in the pack */ stream = svn_stream_from_stringbuf(uncompressed, scratch_pool); diff --git a/subversion/libsvn_fs_fs/rep-cache-db.h b/subversion/libsvn_fs_fs/rep-cache-db.h index fb44c617192d..9f64e8234c8f 100644 --- a/subversion/libsvn_fs_fs/rep-cache-db.h +++ b/subversion/libsvn_fs_fs/rep-cache-db.h @@ -1,4 +1,4 @@ -/* This file is automatically generated from rep-cache-db.sql and .dist_sandbox/subversion-1.8.0/subversion/libsvn_fs_fs/token-map.h. +/* This file is automatically generated from rep-cache-db.sql and .dist_sandbox/subversion-1.8.1/subversion/libsvn_fs_fs/token-map.h. * Do not edit this file -- edit the source and rerun gen-make.py */ #define STMT_CREATE_SCHEMA 0 diff --git a/subversion/libsvn_fs_fs/tree.c b/subversion/libsvn_fs_fs/tree.c index c14955d737b8..64c8395295a8 100644 --- a/subversion/libsvn_fs_fs/tree.c +++ b/subversion/libsvn_fs_fs/tree.c @@ -151,7 +151,7 @@ typedef struct cache_entry_t { /* hash value derived from PATH, REVISION. Used to short-circuit failed lookups. */ - long int hash_value; + apr_uint32_t hash_value; /* revision to which the NODE belongs */ svn_revnum_t revision; @@ -340,7 +340,12 @@ cache_lookup( fs_fs_dag_cache_t *cache { apr_size_t i, bucket_index; apr_size_t path_len = strlen(path); - long int hash_value = revision; + apr_uint32_t hash_value = (apr_uint32_t)revision; + +#if SVN_UNALIGNED_ACCESS_IS_OK + /* "randomizing" / distributing factor used in our hash function */ + const apr_uint32_t factor = 0xd1f3da69; +#endif /* optimistic lookup: hit the same bucket again? */ cache_entry_t *result = &cache->buckets[cache->last_hit]; @@ -353,11 +358,25 @@ cache_lookup( fs_fs_dag_cache_t *cache /* need to do a full lookup. Calculate the hash value (HASH_VALUE has been initialized to REVISION). */ - for (i = 0; i + 4 <= path_len; i += 4) - hash_value = hash_value * 0xd1f3da69 + *(const apr_uint32_t*)(path + i); + i = 0; +#if SVN_UNALIGNED_ACCESS_IS_OK + /* We relax the dependency chain between iterations by processing + two chunks from the input per hash_value self-multiplication. + The HASH_VALUE update latency is now 1 MUL latency + 1 ADD latency + per 2 chunks instead of 1 chunk. + */ + for (; i + 8 <= path_len; i += 8) + hash_value = hash_value * factor * factor + + ( *(const apr_uint32_t*)(path + i) * factor + + *(const apr_uint32_t*)(path + i + 4)); +#endif for (; i < path_len; ++i) - hash_value = hash_value * 33 + path[i]; + /* Help GCC to minimize the HASH_VALUE update latency by splitting the + MUL 33 of the naive implementation: h = h * 33 + path[i]. This + shortens the dependency chain from 1 shift + 2 ADDs to 1 shift + 1 ADD. + */ + hash_value = hash_value * 32 + (hash_value + (unsigned char)path[i]); bucket_index = hash_value + (hash_value >> 16); bucket_index = (bucket_index + (bucket_index >> 8)) % BUCKET_COUNT; @@ -3364,6 +3383,14 @@ fs_node_origin_rev(svn_revnum_t *revision, return SVN_NO_ERROR; } + /* The root node always has ID 0, created in revision 0 and will never + use the new-style ID format. */ + if (strcmp(node_id, "0") == 0) + { + *revision = 0; + return SVN_NO_ERROR; + } + /* OK, it's an old-style ID? Maybe it's cached. */ SVN_ERR(svn_fs_fs__get_node_origin(&cached_origin_id, fs, diff --git a/subversion/libsvn_ra/ra_loader.c b/subversion/libsvn_ra/ra_loader.c index 4afcb5969bb6..91c9cc14bcc9 100644 --- a/subversion/libsvn_ra/ra_loader.c +++ b/subversion/libsvn_ra/ra_loader.c @@ -1030,6 +1030,13 @@ svn_error_t *svn_ra_get_file_revs2(svn_ra_session_t *session, if (include_merged_revisions) SVN_ERR(svn_ra__assert_mergeinfo_capable_server(session, NULL, pool)); + if (start > end) + SVN_ERR( + svn_ra__assert_capable_server(session, + SVN_RA_CAPABILITY_GET_FILE_REVS_REVERSE, + NULL, + pool)); + err = session->vtable->get_file_revs(session, path, start, end, include_merged_revisions, handler, handler_baton, pool); diff --git a/subversion/libsvn_ra/util.c b/subversion/libsvn_ra/util.c index 47e48657c2a7..d9a4520b2e69 100644 --- a/subversion/libsvn_ra/util.c +++ b/subversion/libsvn_ra/util.c @@ -38,6 +38,26 @@ #include "svn_private_config.h" #include "private/svn_ra_private.h" +static const char * +get_path(const char *path_or_url, + svn_ra_session_t *ra_session, + apr_pool_t *pool) +{ + if (path_or_url == NULL) + { + svn_error_t *err = svn_ra_get_session_url(ra_session, &path_or_url, + pool); + if (err) + { + /* The SVN_ERR_UNSUPPORTED_FEATURE error in the caller is more + important, so dummy up the session's URL and chuck this error. */ + svn_error_clear(err); + return _(""); + } + } + return path_or_url; +} + svn_error_t * svn_ra__assert_mergeinfo_capable_server(svn_ra_session_t *ra_session, const char *path_or_url, @@ -48,18 +68,7 @@ svn_ra__assert_mergeinfo_capable_server(svn_ra_session_t *ra_session, SVN_RA_CAPABILITY_MERGEINFO, pool)); if (! mergeinfo_capable) { - if (path_or_url == NULL) - { - svn_error_t *err = svn_ra_get_session_url(ra_session, &path_or_url, - pool); - if (err) - { - /* The SVN_ERR_UNSUPPORTED_FEATURE error is more important, - so dummy up the session's URL and chuck this error. */ - svn_error_clear(err); - path_or_url = ""; - } - } + path_or_url = get_path(path_or_url, ra_session, pool); return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL, _("Retrieval of mergeinfo unsupported by '%s'"), svn_path_is_url(path_or_url) @@ -69,6 +78,35 @@ svn_ra__assert_mergeinfo_capable_server(svn_ra_session_t *ra_session, return SVN_NO_ERROR; } +svn_error_t * +svn_ra__assert_capable_server(svn_ra_session_t *ra_session, + const char *capability, + const char *path_or_url, + apr_pool_t *pool) +{ + if (!strcmp(capability, SVN_RA_CAPABILITY_MERGEINFO)) + return svn_ra__assert_mergeinfo_capable_server(ra_session, path_or_url, + pool); + + else + { + svn_boolean_t has; + SVN_ERR(svn_ra_has_capability(ra_session, &has, capability, pool)); + if (! has) + { + path_or_url = get_path(path_or_url, ra_session, pool); + return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL, + _("The '%s' feature is not supported by '%s'"), + capability, + svn_path_is_url(path_or_url) + ? path_or_url + : svn_dirent_local_style(path_or_url, + pool)); + } + } + return SVN_NO_ERROR; +} + /* Does ERR mean "the current value of the revprop isn't equal to the *OLD_VALUE_P you gave me"? */ diff --git a/subversion/libsvn_ra_serf/blame.c b/subversion/libsvn_ra_serf/blame.c index fa4243c0840b..b6f136a2bdad 100644 --- a/subversion/libsvn_ra_serf/blame.c +++ b/subversion/libsvn_ra_serf/blame.c @@ -366,7 +366,7 @@ svn_ra_serf__get_file_revs(svn_ra_session_t *ra_session, err = svn_ra_serf__context_run_one(handler, pool); err = svn_error_compose_create( - svn_ra_serf__error_on_status(handler->sline.code, + svn_ra_serf__error_on_status(handler->sline, handler->path, handler->location), err); diff --git a/subversion/libsvn_ra_serf/commit.c b/subversion/libsvn_ra_serf/commit.c index aaf17177d9d4..56a2bcea1e3b 100644 --- a/subversion/libsvn_ra_serf/commit.c +++ b/subversion/libsvn_ra_serf/commit.c @@ -223,7 +223,7 @@ return_response_err(svn_ra_serf__handler_t *handler) /* Try to return one of the standard errors for 301, 404, etc., then look for an error embedded in the response. */ return svn_error_compose_create(svn_ra_serf__error_on_status( - handler->sline.code, + handler->sline, handler->path, handler->location), err); @@ -2269,7 +2269,9 @@ abort_edit(void *edit_baton, && handler->sline.code != 404 ) { - SVN_ERR_MALFUNCTION(); + return svn_error_createf(SVN_ERR_RA_DAV_MALFORMED_DATA, NULL, + _("DELETE returned unexpected status: %d"), + handler->sline.code); } return SVN_NO_ERROR; diff --git a/subversion/libsvn_ra_serf/getdate.c b/subversion/libsvn_ra_serf/getdate.c index 867e86fbd501..cc1014ef0297 100644 --- a/subversion/libsvn_ra_serf/getdate.c +++ b/subversion/libsvn_ra_serf/getdate.c @@ -131,6 +131,7 @@ svn_ra_serf__get_dated_revision(svn_ra_session_t *ra_session, svn_ra_serf__handler_t *handler; svn_ra_serf__xml_context_t *xmlctx; const char *report_target; + svn_error_t *err; date_ctx = apr_palloc(pool, sizeof(*date_ctx)); date_ctx->time = tm; @@ -155,7 +156,15 @@ svn_ra_serf__get_dated_revision(svn_ra_session_t *ra_session, *date_ctx->revision = SVN_INVALID_REVNUM; - /* ### use svn_ra_serf__error_on_status() ? */ + err = svn_ra_serf__context_run_one(handler, pool); - return svn_error_trace(svn_ra_serf__context_run_one(handler, pool)); + SVN_ERR(svn_error_compose_create( + svn_ra_serf__error_on_status(handler->sline, + report_target, + handler->location), + err)); + + SVN_ERR_ASSERT(SVN_IS_VALID_REVNUM(*revision)); + + return SVN_NO_ERROR; } diff --git a/subversion/libsvn_ra_serf/getlocations.c b/subversion/libsvn_ra_serf/getlocations.c index d3e3175fac3d..1ae4f82dd8c8 100644 --- a/subversion/libsvn_ra_serf/getlocations.c +++ b/subversion/libsvn_ra_serf/getlocations.c @@ -192,7 +192,7 @@ svn_ra_serf__get_locations(svn_ra_session_t *ra_session, err = svn_ra_serf__context_run_one(handler, pool); SVN_ERR(svn_error_compose_create( - svn_ra_serf__error_on_status(handler->sline.code, + svn_ra_serf__error_on_status(handler->sline, req_url, handler->location), err)); diff --git a/subversion/libsvn_ra_serf/getlocationsegments.c b/subversion/libsvn_ra_serf/getlocationsegments.c index d2b69bf685c4..e5c58a90b5a7 100644 --- a/subversion/libsvn_ra_serf/getlocationsegments.c +++ b/subversion/libsvn_ra_serf/getlocationsegments.c @@ -194,7 +194,7 @@ svn_ra_serf__get_location_segments(svn_ra_session_t *ra_session, err = svn_ra_serf__context_run_one(handler, pool); err = svn_error_compose_create( - svn_ra_serf__error_on_status(handler->sline.code, + svn_ra_serf__error_on_status(handler->sline, handler->path, handler->location), err); diff --git a/subversion/libsvn_ra_serf/getlocks.c b/subversion/libsvn_ra_serf/getlocks.c index 61b8b8c7b051..04e556179936 100644 --- a/subversion/libsvn_ra_serf/getlocks.c +++ b/subversion/libsvn_ra_serf/getlocks.c @@ -266,7 +266,7 @@ svn_ra_serf__get_locks(svn_ra_session_t *ra_session, have existed earlier (E.g. 'svn ls http://s/svn/trunk/file@1' */ if (handler->sline.code != 404) { - SVN_ERR(svn_ra_serf__error_on_status(handler->sline.code, + SVN_ERR(svn_ra_serf__error_on_status(handler->sline, handler->path, handler->location)); } diff --git a/subversion/libsvn_ra_serf/inherited_props.c b/subversion/libsvn_ra_serf/inherited_props.c index 9283a5a53005..54eae0b5be7c 100644 --- a/subversion/libsvn_ra_serf/inherited_props.c +++ b/subversion/libsvn_ra_serf/inherited_props.c @@ -332,7 +332,7 @@ svn_ra_serf__get_inherited_props(svn_ra_session_t *ra_session, err = svn_ra_serf__context_run_one(handler, scratch_pool); SVN_ERR(svn_error_compose_create( - svn_ra_serf__error_on_status(handler->sline.code, + svn_ra_serf__error_on_status(handler->sline, handler->path, handler->location), err)); diff --git a/subversion/libsvn_ra_serf/log.c b/subversion/libsvn_ra_serf/log.c index e44753b07ae6..58a57d890ee4 100644 --- a/subversion/libsvn_ra_serf/log.c +++ b/subversion/libsvn_ra_serf/log.c @@ -595,7 +595,7 @@ svn_ra_serf__get_log(svn_ra_session_t *ra_session, err = svn_ra_serf__context_run_one(handler, pool); SVN_ERR(svn_error_compose_create( - svn_ra_serf__error_on_status(handler->sline.code, + svn_ra_serf__error_on_status(handler->sline, req_url, handler->location), err)); diff --git a/subversion/libsvn_ra_serf/mergeinfo.c b/subversion/libsvn_ra_serf/mergeinfo.c index b0bf8337cdfd..bd4fcbab5e7b 100644 --- a/subversion/libsvn_ra_serf/mergeinfo.c +++ b/subversion/libsvn_ra_serf/mergeinfo.c @@ -191,7 +191,7 @@ svn_ra_serf__get_mergeinfo(svn_ra_session_t *ra_session, svn_boolean_t include_descendants, apr_pool_t *pool) { - svn_error_t *err, *err2; + svn_error_t *err; mergeinfo_context_t *mergeinfo_ctx; svn_ra_serf__session_t *session = ra_session->priv; svn_ra_serf__handler_t *handler; @@ -229,15 +229,10 @@ svn_ra_serf__get_mergeinfo(svn_ra_session_t *ra_session, err = svn_ra_serf__context_run_one(handler, pool); - err2 = svn_ra_serf__error_on_status(handler->sline.code, handler->path, - handler->location); - if (err2) - { - svn_error_clear(err); - return err2; - } - - SVN_ERR(err); + SVN_ERR(svn_error_compose_create( + svn_ra_serf__error_on_status(handler->sline, handler->path, + handler->location), + err)); if (handler->done && apr_hash_count(mergeinfo_ctx->result_catalog)) *catalog = mergeinfo_ctx->result_catalog; diff --git a/subversion/libsvn_ra_serf/options.c b/subversion/libsvn_ra_serf/options.c index 0af0b1599c6d..a3c2fb95c881 100644 --- a/subversion/libsvn_ra_serf/options.c +++ b/subversion/libsvn_ra_serf/options.c @@ -362,6 +362,8 @@ options_response_handler(serf_request_t *request, capability_no); svn_hash_sets(session->capabilities, SVN_RA_CAPABILITY_EPHEMERAL_TXNPROPS, capability_no); + svn_hash_sets(session->capabilities, SVN_RA_CAPABILITY_GET_FILE_REVS_REVERSE, + capability_no); /* Then see which ones we can discover. */ serf_bucket_headers_do(hdrs, capabilities_headers_iterator_callback, @@ -436,11 +438,12 @@ svn_ra_serf__v2_get_youngest_revnum(svn_revnum_t *youngest, SVN_ERR(create_options_req(&opt_ctx, session, conn, scratch_pool)); SVN_ERR(svn_ra_serf__context_run_one(opt_ctx->handler, scratch_pool)); - SVN_ERR(svn_ra_serf__error_on_status(opt_ctx->handler->sline.code, + SVN_ERR(svn_ra_serf__error_on_status(opt_ctx->handler->sline, opt_ctx->handler->path, opt_ctx->handler->location)); *youngest = opt_ctx->youngest_rev; + SVN_ERR_ASSERT(SVN_IS_VALID_REVNUM(*youngest)); return SVN_NO_ERROR; } @@ -460,7 +463,7 @@ svn_ra_serf__v1_get_activity_collection(const char **activity_url, SVN_ERR(create_options_req(&opt_ctx, session, conn, scratch_pool)); SVN_ERR(svn_ra_serf__context_run_one(opt_ctx->handler, scratch_pool)); - SVN_ERR(svn_ra_serf__error_on_status(opt_ctx->handler->sline.code, + SVN_ERR(svn_ra_serf__error_on_status(opt_ctx->handler->sline, opt_ctx->handler->path, opt_ctx->handler->location)); @@ -499,7 +502,7 @@ svn_ra_serf__exchange_capabilities(svn_ra_serf__session_t *serf_sess, } SVN_ERR(svn_error_compose_create( - svn_ra_serf__error_on_status(opt_ctx->handler->sline.code, + svn_ra_serf__error_on_status(opt_ctx->handler->sline, serf_sess->session_url.path, opt_ctx->handler->location), err)); @@ -517,6 +520,65 @@ svn_ra_serf__exchange_capabilities(svn_ra_serf__session_t *serf_sess, } +static svn_error_t * +create_simple_options_body(serf_bucket_t **body_bkt, + void *baton, + serf_bucket_alloc_t *alloc, + apr_pool_t *pool) +{ + serf_bucket_t *body; + serf_bucket_t *s; + + body = serf_bucket_aggregate_create(alloc); + svn_ra_serf__add_xml_header_buckets(body, alloc); + + s = SERF_BUCKET_SIMPLE_STRING("", alloc); + serf_bucket_aggregate_append(body, s); + + *body_bkt = body; + return SVN_NO_ERROR; +} + + +svn_error_t * +svn_ra_serf__probe_proxy(svn_ra_serf__session_t *serf_sess, + apr_pool_t *scratch_pool) +{ + svn_ra_serf__handler_t *handler; + + handler = apr_pcalloc(scratch_pool, sizeof(*handler)); + handler->handler_pool = scratch_pool; + handler->method = "OPTIONS"; + handler->path = serf_sess->session_url.path; + handler->conn = serf_sess->conns[0]; + handler->session = serf_sess; + + /* We don't care about the response body, so discard it. */ + handler->response_handler = svn_ra_serf__handle_discard_body; + + /* We need a simple body, in order to send it in chunked format. */ + handler->body_delegate = create_simple_options_body; + + /* No special headers. */ + + SVN_ERR(svn_ra_serf__context_run_one(handler, scratch_pool)); + /* Some versions of nginx in reverse proxy mode will return 411. They want + a Content-Length header, rather than chunked requests. We can keep other + HTTP/1.1 features, but will disable the chunking. */ + if (handler->sline.code == 411) + { + serf_sess->using_chunked_requests = FALSE; + + return SVN_NO_ERROR; + } + SVN_ERR(svn_ra_serf__error_on_status(handler->sline, + handler->path, + handler->location)); + + return SVN_NO_ERROR; +} + + svn_error_t * svn_ra_serf__has_capability(svn_ra_session_t *ra_session, svn_boolean_t *has, diff --git a/subversion/libsvn_ra_serf/property.c b/subversion/libsvn_ra_serf/property.c index 63972e8597f1..586d38ff46ca 100644 --- a/subversion/libsvn_ra_serf/property.c +++ b/subversion/libsvn_ra_serf/property.c @@ -635,7 +635,7 @@ svn_ra_serf__wait_for_props(svn_ra_serf__handler_t *handler, err = svn_ra_serf__context_run_one(handler, scratch_pool); - err2 = svn_ra_serf__error_on_status(handler->sline.code, + err2 = svn_ra_serf__error_on_status(handler->sline, handler->path, handler->location); diff --git a/subversion/libsvn_ra_serf/ra_serf.h b/subversion/libsvn_ra_serf/ra_serf.h index 3f3f3ded05af..f6310b351dc7 100644 --- a/subversion/libsvn_ra_serf/ra_serf.h +++ b/subversion/libsvn_ra_serf/ra_serf.h @@ -144,6 +144,13 @@ struct svn_ra_serf__session_t { HTTP/1.0. Thus, we cannot send chunked requests. */ svn_boolean_t http10; + /* Should we use Transfer-Encoding: chunked for HTTP/1.1 servers. */ + svn_boolean_t using_chunked_requests; + + /* Do we need to detect whether the connection supports chunked requests? + i.e. is there a (reverse) proxy that does not support them? */ + svn_boolean_t detect_chunking; + /* Our Version-Controlled-Configuration; may be NULL until we know it. */ const char *vcc_url; @@ -186,7 +193,7 @@ struct svn_ra_serf__session_t { const char *activity_collection_url; /* Are we using a proxy? */ - int using_proxy; + svn_boolean_t using_proxy; const char *proxy_username; const char *proxy_password; @@ -1334,6 +1341,14 @@ svn_ra_serf__run_merge(const svn_commit_info_t **commit_info, /** OPTIONS-related functions **/ +/* When running with a proxy, we may need to detect and correct for problems. + This probing function will send a simple OPTIONS request to detect problems + with the connection. */ +svn_error_t * +svn_ra_serf__probe_proxy(svn_ra_serf__session_t *serf_sess, + apr_pool_t *scratch_pool); + + /* On HTTPv2 connections, run an OPTIONS request over CONN to fetch the current youngest revnum, returning it in *YOUNGEST. @@ -1744,7 +1759,7 @@ svn_ra_serf__credentials_callback(char **username, char **password, * where it necessary. */ svn_error_t * -svn_ra_serf__error_on_status(int status_code, +svn_ra_serf__error_on_status(serf_status_line sline, const char *path, const char *location); diff --git a/subversion/libsvn_ra_serf/replay.c b/subversion/libsvn_ra_serf/replay.c index 1fcecf43f878..2d385f345f36 100644 --- a/subversion/libsvn_ra_serf/replay.c +++ b/subversion/libsvn_ra_serf/replay.c @@ -696,7 +696,7 @@ svn_ra_serf__replay(svn_ra_session_t *ra_session, err = svn_ra_serf__context_run_wait(&replay_ctx->done, session, pool); SVN_ERR(svn_error_compose_create( - svn_ra_serf__error_on_status(handler->sline.code, + svn_ra_serf__error_on_status(handler->sline, handler->path, handler->location), err)); @@ -905,7 +905,7 @@ svn_ra_serf__replay_range(svn_ra_session_t *ra_session, svn_ra_serf__handler_t *done_handler = ctx->report_handler; done_list = done_list->next; - SVN_ERR(svn_ra_serf__error_on_status(done_handler->sline.code, + SVN_ERR(svn_ra_serf__error_on_status(done_handler->sline, done_handler->path, done_handler->location)); svn_pool_destroy(ctx->src_rev_pool); diff --git a/subversion/libsvn_ra_serf/serf.c b/subversion/libsvn_ra_serf/serf.c index 601615738043..b0b6346c5a92 100644 --- a/subversion/libsvn_ra_serf/serf.c +++ b/subversion/libsvn_ra_serf/serf.c @@ -137,6 +137,10 @@ load_http_auth_types(apr_pool_t *pool, svn_config_t *config, runtime configuration variable. */ #define DEFAULT_HTTP_TIMEOUT 600 +/* Private symbol for the 1.9-public SVN_CONFIG_OPTION_HTTP_CHUNKED_REQUESTS */ +#define OPTION_HTTP_CHUNKED_REQUESTS "http-chunked-requests" + + static svn_error_t * load_config(svn_ra_serf__session_t *session, apr_hash_t *config_hash, @@ -149,6 +153,7 @@ load_config(svn_ra_serf__session_t *session, const char *timeout_str = NULL; const char *exceptions; apr_port_t proxy_port; + svn_tristate_t chunked_requests; if (config_hash) { @@ -225,6 +230,12 @@ load_config(svn_ra_serf__session_t *session, SVN_CONFIG_OPTION_HTTP_MAX_CONNECTIONS, SVN_CONFIG_DEFAULT_OPTION_HTTP_MAX_CONNECTIONS)); + /* Should we use chunked transfer encoding. */ + SVN_ERR(svn_config_get_tristate(config, &chunked_requests, + SVN_CONFIG_SECTION_GLOBAL, + OPTION_HTTP_CHUNKED_REQUESTS, + "auto", svn_tristate_unknown)); + if (config) server_group = svn_config_find_group(config, session->session_url.hostname, @@ -281,6 +292,12 @@ load_config(svn_ra_serf__session_t *session, server_group, SVN_CONFIG_OPTION_HTTP_MAX_CONNECTIONS, session->max_connections)); + + /* Should we use chunked transfer encoding. */ + SVN_ERR(svn_config_get_tristate(config, &chunked_requests, + server_group, + OPTION_HTTP_CHUNKED_REQUESTS, + "auto", chunked_requests)); } /* Don't allow the http-max-connections value to be larger than our @@ -355,6 +372,24 @@ load_config(svn_ra_serf__session_t *session, session->using_proxy = FALSE; } + /* Setup detect_chunking and using_chunked_requests based on + * the chunked_requests tristate */ + if (chunked_requests == svn_tristate_unknown) + { + session->detect_chunking = TRUE; + session->using_chunked_requests = TRUE; + } + else if (chunked_requests == svn_tristate_true) + { + session->detect_chunking = FALSE; + session->using_chunked_requests = TRUE; + } + else /* chunked_requests == svn_tristate_false */ + { + session->detect_chunking = FALSE; + session->using_chunked_requests = FALSE; + } + /* Setup authentication. */ SVN_ERR(load_http_auth_types(pool, config, server_group, &session->authn_types)); @@ -392,6 +427,7 @@ svn_ra_serf__open(svn_ra_session_t *session, svn_ra_serf__session_t *serf_sess; apr_uri_t url; const char *client_string = NULL; + svn_error_t *err; if (corrected_url) *corrected_url = NULL; @@ -441,6 +477,10 @@ svn_ra_serf__open(svn_ra_session_t *session, HTTP/1.1 is supported, we can upgrade. */ serf_sess->http10 = TRUE; + /* If we switch to HTTP/1.1, then we will use chunked requests. We may disable + this, if we find an intervening proxy does not support chunked requests. */ + serf_sess->using_chunked_requests = TRUE; + SVN_ERR(load_config(serf_sess, config, serf_sess->pool)); serf_sess->conns[0] = apr_pcalloc(serf_sess->pool, @@ -479,7 +519,23 @@ svn_ra_serf__open(svn_ra_session_t *session, session->priv = serf_sess; - return svn_ra_serf__exchange_capabilities(serf_sess, corrected_url, pool); + err = svn_ra_serf__exchange_capabilities(serf_sess, corrected_url, pool); + + /* serf should produce a usable error code instead of APR_EGENERAL */ + if (err && err->apr_err == APR_EGENERAL) + err = svn_error_createf(SVN_ERR_RA_DAV_REQUEST_FAILED, err, + _("Connection to '%s' failed"), session_URL); + SVN_ERR(err); + + /* We have set up a useful connection (that doesn't indication a redirect). + If we've been told there is possibly a worrisome proxy in our path to the + server AND we switched to HTTP/1.1 (chunked requests), then probe for + problems in any proxy. */ + if ((corrected_url == NULL || *corrected_url == NULL) + && serf_sess->detect_chunking && !serf_sess->http10) + SVN_ERR(svn_ra_serf__probe_proxy(serf_sess, pool)); + + return SVN_NO_ERROR; } /* Implements svn_ra__vtable_t.reparent(). */ diff --git a/subversion/libsvn_ra_serf/update.c b/subversion/libsvn_ra_serf/update.c index 21ed2dfc9cd9..06a16c06effd 100644 --- a/subversion/libsvn_ra_serf/update.c +++ b/subversion/libsvn_ra_serf/update.c @@ -1268,7 +1268,7 @@ handle_stream(serf_request_t *request, /* ### new field. make sure we didn't miss some initialization. */ SVN_ERR_ASSERT(fetch_ctx->handler != NULL); - err = svn_ra_serf__error_on_status(fetch_ctx->handler->sline.code, + err = svn_ra_serf__error_on_status(fetch_ctx->handler->sline, fetch_ctx->info->name, fetch_ctx->handler->location); if (err) @@ -2739,7 +2739,7 @@ setup_update_report_headers(serf_bucket_t *headers, if (report->sess->using_compression) { serf_bucket_headers_setn(headers, "Accept-Encoding", - "gzip;svndiff1;q=0.9,svndiff;q=0.8"); + "gzip,svndiff1;q=0.9,svndiff;q=0.8"); } else { @@ -2891,7 +2891,7 @@ finish_report(void *report_baton, { return svn_error_trace( svn_error_compose_create( - svn_ra_serf__error_on_status(handler->sline.code, + svn_ra_serf__error_on_status(handler->sline, handler->path, handler->location), err)); diff --git a/subversion/libsvn_ra_serf/util.c b/subversion/libsvn_ra_serf/util.c index c7a171627e2b..ce1e31a94c8a 100644 --- a/subversion/libsvn_ra_serf/util.c +++ b/subversion/libsvn_ra_serf/util.c @@ -373,10 +373,8 @@ conn_setup(apr_socket_t *sock, { conn->ssl_context = serf_bucket_ssl_encrypt_context_get(*read_bkt); -#if SERF_VERSION_AT_LEAST(1,0,0) serf_ssl_set_hostname(conn->ssl_context, conn->session->session_url.hostname); -#endif serf_ssl_client_cert_provider_set(conn->ssl_context, svn_ra_serf__handle_client_cert, @@ -477,7 +475,7 @@ connection_closed(svn_ra_serf__connection_t *conn, { if (why) { - SVN_ERR_MALFUNCTION(); + return svn_error_wrap_apr(why, NULL); } if (conn->session->using_ssl) @@ -642,10 +640,10 @@ setup_serf_req(serf_request_t *request, { serf_bucket_alloc_t *allocator = serf_request_get_alloc(request); -#if SERF_VERSION_AT_LEAST(1, 1, 0) svn_spillbuf_t *buf; + svn_boolean_t set_CL = session->http10 || !session->using_chunked_requests; - if (session->http10 && body_bkt != NULL) + if (set_CL && body_bkt != NULL) { /* Ugh. Use HTTP/1.0 to talk to the server because we don't know if it speaks HTTP/1.1 (and thus, chunked requests), or because the @@ -665,7 +663,6 @@ setup_serf_req(serf_request_t *request, request_pool, scratch_pool); } -#endif /* Create a request bucket. Note that this sucker is kind enough to add a "Host" header for us. */ @@ -674,15 +671,13 @@ setup_serf_req(serf_request_t *request, /* Set the Content-Length value. This will also trigger an HTTP/1.0 request (rather than the default chunked request). */ -#if SERF_VERSION_AT_LEAST(1, 1, 0) - if (session->http10) + if (set_CL) { if (body_bkt == NULL) serf_bucket_request_set_CL(*req_bkt, 0); else serf_bucket_request_set_CL(*req_bkt, svn_spillbuf__get_size(buf)); } -#endif *hdrs_bkt = serf_bucket_request_get_headers(*req_bkt); @@ -696,10 +691,10 @@ setup_serf_req(serf_request_t *request, serf_bucket_headers_setn(*hdrs_bkt, "Content-Type", content_type); } -#if SERF_VERSION_AT_LEAST(1, 1, 0) if (session->http10) + { serf_bucket_headers_setn(*hdrs_bkt, "Connection", "keep-alive"); -#endif + } if (accept_encoding) { @@ -2390,17 +2385,17 @@ svn_ra_serf__report_resource(const char **report_target, } svn_error_t * -svn_ra_serf__error_on_status(int status_code, +svn_ra_serf__error_on_status(serf_status_line sline, const char *path, const char *location) { - switch(status_code) + switch(sline.code) { case 301: case 302: case 307: return svn_error_createf(SVN_ERR_RA_DAV_RELOCATED, NULL, - (status_code == 301) + (sline.code == 301) ? _("Repository moved permanently to '%s';" " please relocate") : _("Repository moved temporarily to '%s';" @@ -2415,8 +2410,20 @@ svn_ra_serf__error_on_status(int status_code, case 423: return svn_error_createf(SVN_ERR_FS_NO_LOCK_TOKEN, NULL, _("'%s': no lock token available"), path); + + case 411: + return svn_error_createf(SVN_ERR_RA_DAV_REQUEST_FAILED, NULL, + _("DAV request failed: 411 Content length required. The " + "server or an intermediate proxy does not accept " + "chunked encoding. Try setting 'http-chunked-requests' " + "to 'auto' or 'no' in your client configuration.")); } + if (sline.code >= 300) + return svn_error_createf(SVN_ERR_RA_DAV_REQUEST_FAILED, NULL, + _("Unexpected HTTP status %d '%s' on '%s'\n"), + sline.code, sline.reason, path); + return SVN_NO_ERROR; } diff --git a/subversion/libsvn_ra_serf/xml.c b/subversion/libsvn_ra_serf/xml.c index 95017d5e3be4..a95eaccd2199 100644 --- a/subversion/libsvn_ra_serf/xml.c +++ b/subversion/libsvn_ra_serf/xml.c @@ -615,6 +615,14 @@ svn_ra_serf__xml_cb_start(svn_ra_serf__xml_context_t *xmlctx, } if (scan->ns == NULL) { + if (current->state == 0) + { + return svn_error_createf( + SVN_ERR_RA_DAV_MALFORMED_DATA, NULL, + _("XML Parsing failed: Unexpected root element '%s'"), + elemname.name); + } + xmlctx->waiting = elemname; /* ### return? */ return SVN_NO_ERROR; diff --git a/subversion/libsvn_ra_svn/client.c b/subversion/libsvn_ra_svn/client.c index 4b3762c33d3d..2157e4206192 100644 --- a/subversion/libsvn_ra_svn/client.c +++ b/subversion/libsvn_ra_svn/client.c @@ -977,6 +977,28 @@ static svn_error_t *ra_svn_commit(svn_ra_session_t *session, const svn_string_t *log_msg = svn_hash_gets(revprop_table, SVN_PROP_REVISION_LOG); + if (log_msg == NULL && + ! svn_ra_svn_has_capability(conn, SVN_RA_SVN_CAP_COMMIT_REVPROPS)) + { + return svn_error_createf(SVN_ERR_BAD_PROPERTY_VALUE, NULL, + _("ra_svn does not support not specifying " + "a log message with pre-1.5 servers; " + "consider passing an empty one, or upgrading " + "the server")); + } + else if (log_msg == NULL) + /* 1.5+ server. Set LOG_MSG to something, since the 'logmsg' argument + to the 'commit' protocol command is non-optional; on the server side, + only REVPROP_TABLE will be used, and LOG_MSG will be ignored. The + "svn:log" member of REVPROP_TABLE table is NULL, therefore the commit + will have a NULL log message (not just "", really NULL). + + svnserve 1.5.x+ has always ignored LOG_MSG when REVPROP_TABLE was + present; this was elevated to a protocol promise in r1498550 (and + later documented in this comment) in order to fix the segmentation + fault bug described in the log message of r1498550.*/ + log_msg = svn_string_create("", pool); + /* If we're sending revprops other than svn:log, make sure the server won't silently ignore them. */ if (apr_hash_count(revprop_table) > 1 && @@ -1456,16 +1478,19 @@ static svn_error_t *ra_svn_diff(svn_ra_session_t *session, } -static svn_error_t *ra_svn_log(svn_ra_session_t *session, - const apr_array_header_t *paths, - svn_revnum_t start, svn_revnum_t end, - int limit, - svn_boolean_t discover_changed_paths, - svn_boolean_t strict_node_history, - svn_boolean_t include_merged_revisions, - const apr_array_header_t *revprops, - svn_log_entry_receiver_t receiver, - void *receiver_baton, apr_pool_t *pool) +static svn_error_t * +perform_ra_svn_log(svn_error_t **outer_error, + svn_ra_session_t *session, + const apr_array_header_t *paths, + svn_revnum_t start, svn_revnum_t end, + int limit, + svn_boolean_t discover_changed_paths, + svn_boolean_t strict_node_history, + svn_boolean_t include_merged_revisions, + const apr_array_header_t *revprops, + svn_log_entry_receiver_t receiver, + void *receiver_baton, + apr_pool_t *pool) { svn_ra_svn__session_baton_t *sess_baton = session->priv; svn_ra_svn_conn_t *conn = sess_baton->conn; @@ -1606,8 +1631,10 @@ static svn_error_t *ra_svn_log(svn_ra_session_t *session, cphash = NULL; nreceived = 0; - if (! (limit && (nest_level == 0) && (++nreceived > limit))) + if (! (limit && (nest_level == 0) && (++nreceived > limit)) + && ! *outer_error) { + svn_error_t *err; log_entry = svn_log_entry_create(iterpool); log_entry->changed_paths = cphash; @@ -1650,7 +1677,15 @@ static svn_error_t *ra_svn_log(svn_ra_session_t *session, SVN_PROP_REVISION_LOG, message); } } - SVN_ERR(receiver(receiver_baton, log_entry, iterpool)); + err = receiver(receiver_baton, log_entry, iterpool); + if (err && err->apr_err == SVN_ERR_CEASE_INVOCATION) + { + *outer_error = svn_error_trace( + svn_error_compose_create(*outer_error, err)); + } + else + SVN_ERR(err); + if (log_entry->has_children) { nest_level++; @@ -1665,9 +1700,40 @@ static svn_error_t *ra_svn_log(svn_ra_session_t *session, svn_pool_destroy(iterpool); /* Read the response. */ - return svn_ra_svn__read_cmd_response(conn, pool, ""); + return svn_error_trace(svn_ra_svn__read_cmd_response(conn, pool, "")); } +static svn_error_t * +ra_svn_log(svn_ra_session_t *session, + const apr_array_header_t *paths, + svn_revnum_t start, svn_revnum_t end, + int limit, + svn_boolean_t discover_changed_paths, + svn_boolean_t strict_node_history, + svn_boolean_t include_merged_revisions, + const apr_array_header_t *revprops, + svn_log_entry_receiver_t receiver, + void *receiver_baton, apr_pool_t *pool) +{ + svn_error_t *outer_error = NULL; + svn_error_t *err; + + err = svn_error_trace(perform_ra_svn_log(&outer_error, + session, paths, + start, end, + limit, + discover_changed_paths, + strict_node_history, + include_merged_revisions, + revprops, + receiver, receiver_baton, + pool)); + return svn_error_trace( + svn_error_compose_create(outer_error, + err)); +} + + static svn_error_t *ra_svn_check_path(svn_ra_session_t *session, const char *path, svn_revnum_t rev, diff --git a/subversion/libsvn_ra_svn/protocol b/subversion/libsvn_ra_svn/protocol index 059873c8365a..d056b74a5138 100644 --- a/subversion/libsvn_ra_svn/protocol +++ b/subversion/libsvn_ra_svn/protocol @@ -294,8 +294,12 @@ second place for auth-request point as noted below. Upon receiving response, client switches to editor command set. Upon successful completion of edit, server sends auth-request. After auth exchange completes, server sends commit-info. + If rev-props is present, logmsg is ignored. Only the svn:log entry in + rev-props (if any) will be used. commit-info: ( new-rev:number date:string author:string ? ( post-commit-err:string ) ) + NOTE: when revving this, make 'logmsg' optional, or delete that parameter + and have the log message specified in 'rev-props'. get-file params: ( path:string [ rev:number ] want-props:bool want-contents:bool diff --git a/subversion/libsvn_repos/fs-wrap.c b/subversion/libsvn_repos/fs-wrap.c index b759c57fe101..755fa61bbb05 100644 --- a/subversion/libsvn_repos/fs-wrap.c +++ b/subversion/libsvn_repos/fs-wrap.c @@ -172,6 +172,10 @@ svn_repos__validate_prop(const char *name, { svn_prop_kind_t kind = svn_property_kind2(name); + /* Allow deleting any property, even a property we don't allow to set. */ + if (value == NULL) + return SVN_NO_ERROR; + /* Disallow setting non-regular properties. */ if (kind != svn_prop_regular_kind) return svn_error_createf diff --git a/subversion/libsvn_subr/config_file.c b/subversion/libsvn_subr/config_file.c index 9d15f6b149f8..c705b14fd40a 100644 --- a/subversion/libsvn_subr/config_file.c +++ b/subversion/libsvn_subr/config_file.c @@ -94,7 +94,7 @@ parser_getc(parse_context_t *ctx, int *c) } else if (ctx->buffer_pos < ctx->buffer_size) { - *c = ctx->parser_buffer[ctx->buffer_pos]; + *c = (unsigned char)ctx->parser_buffer[ctx->buffer_pos]; ctx->buffer_pos++; } else @@ -107,7 +107,7 @@ parser_getc(parse_context_t *ctx, int *c) if (ctx->buffer_pos < ctx->buffer_size) { - *c = ctx->parser_buffer[ctx->buffer_pos]; + *c = (unsigned char)ctx->parser_buffer[ctx->buffer_pos]; ctx->buffer_pos++; } else @@ -131,7 +131,7 @@ parser_getc_plain(parse_context_t *ctx, int *c) { if (ctx->buffer_pos < ctx->buffer_size) { - *c = ctx->parser_buffer[ctx->buffer_pos]; + *c = (unsigned char)ctx->parser_buffer[ctx->buffer_pos]; ctx->buffer_pos++; return SVN_NO_ERROR; @@ -189,6 +189,32 @@ skip_to_eoln(parse_context_t *ctx, int *c) return SVN_NO_ERROR; } +/* Skip a UTF-8 Byte Order Mark if found. */ +static APR_INLINE svn_error_t * +skip_bom(parse_context_t *ctx) +{ + int ch; + + SVN_ERR(parser_getc(ctx, &ch)); + if (ch == 0xEF) + { + const unsigned char *buf = (unsigned char *)ctx->parser_buffer; + /* This makes assumptions about the implementation of parser_getc and + * the use of skip_bom. Specifically that parser_getc() will get all + * of the BOM characters into the parse_context_t buffer. This can + * safely be assumed as long as we only try to use skip_bom() at the + * start of the stream and the buffer is longer than 3 characters. */ + SVN_ERR_ASSERT(ctx->buffer_size > ctx->buffer_pos + 1); + if (buf[ctx->buffer_pos] == 0xBB && buf[ctx->buffer_pos + 1] == 0xBF) + ctx->buffer_pos += 2; + else + SVN_ERR(parser_ungetc(ctx, ch)); + } + else + SVN_ERR(parser_ungetc(ctx, ch)); + + return SVN_NO_ERROR; +} /* Parse a single option value */ static svn_error_t * @@ -450,6 +476,8 @@ svn_config__parse_stream(svn_config_t *cfg, svn_stream_t *stream, ctx->buffer_pos = 0; ctx->buffer_size = 0; + SVN_ERR(skip_bom(ctx)); + do { SVN_ERR(skip_whitespace(ctx, &ch, &count)); @@ -806,6 +834,8 @@ svn_config_ensure(const char *config_dir, apr_pool_t *pool) "### http-max-connections Maximum number of parallel server" NL "### connections to use for any given" NL "### HTTP operation." NL + "### http-chunked-requests Whether to use chunked transfer" NL + "### encoding for HTTP requests body." NL "### neon-debug-mask Debug mask for Neon HTTP library" NL "### ssl-authority-files List of files, each of a trusted CA" NL diff --git a/subversion/libsvn_subr/gpg_agent.c b/subversion/libsvn_subr/gpg_agent.c index f0395c00c750..e23339074a40 100644 --- a/subversion/libsvn_subr/gpg_agent.c +++ b/subversion/libsvn_subr/gpg_agent.c @@ -156,42 +156,28 @@ send_option(int sd, char *buf, size_t n, const char *option, const char *value, return (strncmp(buf, "OK", 2) == 0); } -/* Implementation of svn_auth__password_get_t that retrieves the password - from gpg-agent */ + +/* Locate a running GPG Agent, and return an open file descriptor + * for communication with the agent in *NEW_SD. If no running agent + * can be found, set *NEW_SD to -1. */ static svn_error_t * -password_get_gpg_agent(svn_boolean_t *done, - const char **password, - apr_hash_t *creds, - const char *realmstring, - const char *username, - apr_hash_t *parameters, - svn_boolean_t non_interactive, - apr_pool_t *pool) +find_running_gpg_agent(int *new_sd, apr_pool_t *pool) { - int sd; + char *buffer; char *gpg_agent_info = NULL; + const char *socket_name = NULL; + const char *request = NULL; const char *p = NULL; char *ep = NULL; - char *buffer; + int sd; - apr_array_header_t *socket_details; - const char *request = NULL; - const char *cache_id = NULL; - struct sockaddr_un addr; - const char *tty_name; - const char *tty_type; - const char *lc_ctype; - const char *display; - const char *socket_name = NULL; - svn_checksum_t *digest = NULL; - char *password_prompt; - char *realm_prompt; - - *done = FALSE; + *new_sd = -1; gpg_agent_info = getenv("GPG_AGENT_INFO"); if (gpg_agent_info != NULL) { + apr_array_header_t *socket_details; + socket_details = svn_cstring_split(gpg_agent_info, ":", TRUE, pool); socket_name = APR_ARRAY_IDX(socket_details, 0, const char *); @@ -201,6 +187,8 @@ password_get_gpg_agent(svn_boolean_t *done, if (socket_name != NULL) { + struct sockaddr_un addr; + addr.sun_family = AF_UNIX; strncpy(addr.sun_path, socket_name, sizeof(addr.sun_path) - 1); addr.sun_path[sizeof(addr.sun_path) - 1] = '\0'; @@ -273,6 +261,44 @@ password_get_gpg_agent(svn_boolean_t *done, return SVN_NO_ERROR; } + *new_sd = sd; + return SVN_NO_ERROR; +} + +/* Implementation of svn_auth__password_get_t that retrieves the password + from gpg-agent */ +static svn_error_t * +password_get_gpg_agent(svn_boolean_t *done, + const char **password, + apr_hash_t *creds, + const char *realmstring, + const char *username, + apr_hash_t *parameters, + svn_boolean_t non_interactive, + apr_pool_t *pool) +{ + int sd; + const char *p = NULL; + char *ep = NULL; + char *buffer; + const char *request = NULL; + const char *cache_id = NULL; + const char *tty_name; + const char *tty_type; + const char *lc_ctype; + const char *display; + svn_checksum_t *digest = NULL; + char *password_prompt; + char *realm_prompt; + + *done = FALSE; + + SVN_ERR(find_running_gpg_agent(&sd, pool)); + if (sd == -1) + return SVN_NO_ERROR; + + buffer = apr_palloc(pool, BUFFER_SIZE); + /* Send TTY_NAME to the gpg-agent daemon. */ tty_name = getenv("GPG_TTY"); if (tty_name != NULL) @@ -283,11 +309,6 @@ password_get_gpg_agent(svn_boolean_t *done, return SVN_NO_ERROR; } } - else - { - close(sd); - return SVN_NO_ERROR; - } /* Send TTY_TYPE to the gpg-agent daemon. */ tty_type = getenv("TERM"); @@ -299,11 +320,6 @@ password_get_gpg_agent(svn_boolean_t *done, return SVN_NO_ERROR; } } - else - { - close(sd); - return SVN_NO_ERROR; - } /* Compute LC_CTYPE. */ lc_ctype = getenv("LC_ALL"); @@ -388,8 +404,8 @@ password_get_gpg_agent(svn_boolean_t *done, password in GPG Agent if that's how this particular integration worked. But it isn't. GPG Agent stores the password provided by the user via the pinentry program immediately upon its provision - (and regardless of its accuracy as passwords go), so there's - nothing really to do here. */ + (and regardless of its accuracy as passwords go), so we just need + to check if a running GPG Agent exists. */ static svn_error_t * password_set_gpg_agent(svn_boolean_t *done, apr_hash_t *creds, @@ -400,6 +416,15 @@ password_set_gpg_agent(svn_boolean_t *done, svn_boolean_t non_interactive, apr_pool_t *pool) { + int sd; + + *done = FALSE; + + SVN_ERR(find_running_gpg_agent(&sd, pool)); + if (sd == -1) + return SVN_NO_ERROR; + + close(sd); *done = TRUE; return SVN_NO_ERROR; diff --git a/subversion/libsvn_subr/internal_statements.h b/subversion/libsvn_subr/internal_statements.h index 9e31e74badae..dd81d9fb7deb 100644 --- a/subversion/libsvn_subr/internal_statements.h +++ b/subversion/libsvn_subr/internal_statements.h @@ -1,4 +1,4 @@ -/* This file is automatically generated from internal_statements.sql and .dist_sandbox/subversion-1.8.0/subversion/libsvn_subr/token-map.h. +/* This file is automatically generated from internal_statements.sql and .dist_sandbox/subversion-1.8.1/subversion/libsvn_subr/token-map.h. * Do not edit this file -- edit the source and rerun gen-make.py */ #define STMT_INTERNAL_SAVEPOINT_SVN 0 diff --git a/subversion/libsvn_subr/io.c b/subversion/libsvn_subr/io.c index 58bc5403653b..d31819410f05 100644 --- a/subversion/libsvn_subr/io.c +++ b/subversion/libsvn_subr/io.c @@ -3533,6 +3533,9 @@ svn_io_read_length_line(apr_file_t *file, char *buf, apr_size_t *limit, apr_size_t bytes_read = 0; char *eol; + if (to_read == 0) + break; + /* read data block (or just a part of it) */ SVN_ERR(svn_io_file_read_full2(file, buf, to_read, &bytes_read, &eof, pool)); diff --git a/subversion/libsvn_subr/named_atomic.c b/subversion/libsvn_subr/named_atomic.c index d07e7424f638..cd58bbb38817 100644 --- a/subversion/libsvn_subr/named_atomic.c +++ b/subversion/libsvn_subr/named_atomic.c @@ -251,6 +251,7 @@ struct svn_atomic_namespace__t */ static svn_mutex__t *thread_mutex = NULL; +#if APR_HAS_MMAP /* Initialization flag for the above used by svn_atomic__init_once. */ static volatile svn_atomic_t mutex_initialized = FALSE; @@ -266,6 +267,7 @@ init_thread_mutex(void *baton, apr_pool_t *pool) return svn_mutex__init(&thread_mutex, USE_THREAD_MUTEX, global_pool); } +#endif /* APR_HAS_MMAP */ /* Utility that acquires our global mutex and converts error types. */ @@ -297,6 +299,7 @@ unlock(struct mutex_t *mutex, svn_error_t * outer_err) unlock_err)); } +#if APR_HAS_MMAP /* The last user to close a particular namespace should also remove the * lock file. Failure to do so, however, does not affect further uses * of the same namespace. @@ -318,6 +321,7 @@ delete_lock_file(void *arg) return status; } +#endif /* APR_HAS_MMAP */ /* Validate the ATOMIC parameter, i.e it's address. Correct code will * never need this but if someone should accidentally to use a NULL or @@ -351,7 +355,11 @@ return_atomic(svn_named_atomic__t **atomic, svn_boolean_t svn_named_atomic__is_supported(void) { -#ifdef _WIN32 +#if !APR_HAS_MMAP + return FALSE; +#elif !defined(_WIN32) + return TRUE; +#else static svn_tristate_t result = svn_tristate_unknown; if (result == svn_tristate_unknown) @@ -373,9 +381,7 @@ svn_named_atomic__is_supported(void) } return result == svn_tristate_true; -#else - return TRUE; -#endif +#endif /* _WIN32 */ } svn_boolean_t @@ -389,6 +395,9 @@ svn_atomic_namespace__create(svn_atomic_namespace__t **ns, const char *name, apr_pool_t *result_pool) { +#if !APR_HAS_MMAP + return svn_error_create(APR_ENOTIMPL, NULL, NULL); +#else apr_status_t apr_err; svn_error_t *err; apr_file_t *file; @@ -489,6 +498,7 @@ svn_atomic_namespace__create(svn_atomic_namespace__t **ns, /* Unlock to allow other processes may access the shared memory as well. */ return unlock(&new_ns->mutex, err); +#endif /* APR_HAS_MMAP */ } svn_error_t * diff --git a/subversion/libsvn_subr/sqlite.c b/subversion/libsvn_subr/sqlite.c index 0afceffe6617..149b0253be92 100644 --- a/subversion/libsvn_subr/sqlite.c +++ b/subversion/libsvn_subr/sqlite.c @@ -140,9 +140,9 @@ struct svn_sqlite__value_t int sqlite_err__temp = (x); \ if (sqlite_err__temp != SQLITE_OK) \ return svn_error_createf(SQLITE_ERROR_CODE(sqlite_err__temp), \ - NULL, "sqlite: %s (S%d)", \ - sqlite3_errmsg((db)->db3), \ - sqlite_err__temp); \ + NULL, "sqlite[S%d]: %s", \ + sqlite_err__temp, \ + sqlite3_errmsg((db)->db3)); \ } while (0) #define SQLITE_ERR_MSG(x, msg) do \ @@ -150,8 +150,8 @@ struct svn_sqlite__value_t int sqlite_err__temp = (x); \ if (sqlite_err__temp != SQLITE_OK) \ return svn_error_createf(SQLITE_ERROR_CODE(sqlite_err__temp), \ - NULL, "sqlite: %s (S%d)", (msg), \ - sqlite_err__temp); \ + NULL, "sqlite[S%d]: %s", \ + sqlite_err__temp, msg); \ } while (0) @@ -173,9 +173,9 @@ exec_sql2(svn_sqlite__db_t *db, const char *sql, int ignored_err) if (sqlite_err != SQLITE_OK && sqlite_err != ignored_err) { svn_error_t *err = svn_error_createf(SQLITE_ERROR_CODE(sqlite_err), NULL, - _("sqlite: %s (S%d)," + _("sqlite[S%d]: %s," " executing statement '%s'"), - err_msg, sqlite_err, sql); + sqlite_err, err_msg, sql); sqlite3_free(err_msg); return err; } @@ -292,8 +292,8 @@ svn_sqlite__step(svn_boolean_t *got_row, svn_sqlite__stmt_t *stmt) svn_error_t *err1, *err2; err1 = svn_error_createf(SQLITE_ERROR_CODE(sqlite_result), NULL, - "sqlite: %s (S%d)", - sqlite3_errmsg(stmt->db->db3), sqlite_result); + "sqlite[S%d]: %s", + sqlite_result, sqlite3_errmsg(stmt->db->db3)); err2 = svn_sqlite__reset(stmt); return svn_error_compose_create(err1, err2); } @@ -744,7 +744,7 @@ init_sqlite(void *baton, apr_pool_t *pool) int err = sqlite3_config(SQLITE_CONFIG_MULTITHREAD); if (err != SQLITE_OK && err != SQLITE_MISUSE) return svn_error_createf(SQLITE_ERROR_CODE(err), NULL, - _("Could not configure SQLite (S%d)"), err); + _("Could not configure SQLite [S%d]"), err); } SQLITE_ERR_MSG(sqlite3_initialize(), _("Could not initialize SQLite")); diff --git a/subversion/libsvn_subr/stream.c b/subversion/libsvn_subr/stream.c index e2529c746765..93a4c423c9a9 100644 --- a/subversion/libsvn_subr/stream.c +++ b/subversion/libsvn_subr/stream.c @@ -56,6 +56,7 @@ struct svn_stream_t { svn_stream_mark_fn_t mark_fn; svn_stream_seek_fn_t seek_fn; svn_stream__is_buffered_fn_t is_buffered_fn; + apr_file_t *file; /* Maybe NULL */ }; @@ -81,6 +82,7 @@ svn_stream_create(void *baton, apr_pool_t *pool) stream->mark_fn = NULL; stream->seek_fn = NULL; stream->is_buffered_fn = NULL; + stream->file = NULL; return stream; } @@ -913,6 +915,7 @@ svn_stream_from_aprfile2(apr_file_t *file, svn_stream_set_mark(stream, mark_handler_apr); svn_stream_set_seek(stream, seek_handler_apr); svn_stream__set_is_buffered(stream, is_buffered_handler_apr); + stream->file = file; if (! disown) svn_stream_set_close(stream, close_handler_apr); @@ -920,6 +923,12 @@ svn_stream_from_aprfile2(apr_file_t *file, return stream; } +apr_file_t * +svn_stream__aprfile(svn_stream_t *stream) +{ + return stream->file; +} + /* Compressed stream support */ diff --git a/subversion/libsvn_subr/subst.c b/subversion/libsvn_subr/subst.c index f69dcf8f2bae..3545289baf81 100644 --- a/subversion/libsvn_subr/subst.c +++ b/subversion/libsvn_subr/subst.c @@ -1944,7 +1944,11 @@ svn_subst_translate_string2(svn_string_t **new_value, return SVN_NO_ERROR; } - if (encoding) + if (encoding && !strcmp(encoding, "UTF-8")) + { + val_utf8 = value->data; + } + else if (encoding) { SVN_ERR(svn_utf_cstring_to_utf8_ex2(&val_utf8, value->data, encoding, scratch_pool)); diff --git a/subversion/libsvn_subr/utf.c b/subversion/libsvn_subr/utf.c index 355e068f5e55..535e3daf9f5c 100644 --- a/subversion/libsvn_subr/utf.c +++ b/subversion/libsvn_subr/utf.c @@ -233,6 +233,8 @@ xlate_alloc_handle(xlate_handle_node_t **ret, else if (apr_err != APR_SUCCESS) { const char *errstr; + char apr_strerr[512]; + /* Can't use svn_error_wrap_apr here because it calls functions in this file, leading to infinite recursion. */ if (frompage == SVN_APR_LOCALE_CHARSET) @@ -248,7 +250,13 @@ xlate_alloc_handle(xlate_handle_node_t **ret, _("Can't create a character converter from " "'%s' to '%s'"), frompage, topage); - return svn_error_create(apr_err, NULL, errstr); + /* Just put the error on the stack, since svn_error_create duplicates it + later. APR_STRERR will be in the local encoding, not in UTF-8, though. + */ + svn_strerror(apr_err, apr_strerr, sizeof(apr_strerr)); + return svn_error_create(apr_err, + svn_error_create(apr_err, NULL, apr_strerr), + errstr); } /* Allocate and initialize the node. */ diff --git a/subversion/libsvn_wc/adm_ops.c b/subversion/libsvn_wc/adm_ops.c index 1f391fcc372f..e1e7fe4b9104 100644 --- a/subversion/libsvn_wc/adm_ops.c +++ b/subversion/libsvn_wc/adm_ops.c @@ -148,6 +148,7 @@ process_committed_leaf(svn_wc__db_t *db, db, local_abspath, FALSE /* keep_as_working */, FALSE /* queue_deletes */, + TRUE /* remove_locks */, (! via_recurse) ? new_revnum : SVN_INVALID_REVNUM, NULL, NULL, diff --git a/subversion/libsvn_wc/crop.c b/subversion/libsvn_wc/crop.c index 2278476d2355..a8d5ce2571ad 100644 --- a/subversion/libsvn_wc/crop.c +++ b/subversion/libsvn_wc/crop.c @@ -110,6 +110,7 @@ crop_children(svn_wc__db_t *db, SVN_ERR(svn_wc__db_base_remove(db, child_abspath, FALSE /* keep_as_working */, FALSE /* queue_deletes */, + FALSE /* remove_locks */, SVN_INVALID_REVNUM, NULL, NULL, iterpool)); diff --git a/subversion/libsvn_wc/externals.c b/subversion/libsvn_wc/externals.c index 514148fe3e3f..99127304ec4c 100644 --- a/subversion/libsvn_wc/externals.c +++ b/subversion/libsvn_wc/externals.c @@ -1413,6 +1413,7 @@ svn_wc__external_remove(svn_wc_context_t *wc_ctx, SVN_ERR(svn_wc__db_base_remove(wc_ctx->db, local_abspath, FALSE /* keep_as_working */, TRUE /* queue_deletes */, + FALSE /* remove_locks */, SVN_INVALID_REVNUM, NULL, NULL, scratch_pool)); SVN_ERR(svn_wc__wq_run(wc_ctx->db, local_abspath, diff --git a/subversion/libsvn_wc/update_editor.c b/subversion/libsvn_wc/update_editor.c index 617ad4775b90..a353b1b07178 100644 --- a/subversion/libsvn_wc/update_editor.c +++ b/subversion/libsvn_wc/update_editor.c @@ -924,6 +924,7 @@ mark_directory_edited(struct dir_baton *db, apr_pool_t *scratch_pool) do_notification(db->edit_baton, db->local_abspath, svn_node_dir, svn_wc_notify_tree_conflict, scratch_pool); db->already_notified = TRUE; + } return SVN_NO_ERROR; @@ -1813,6 +1814,7 @@ delete_entry(const char *path, SVN_ERR(svn_wc__db_base_remove(eb->db, local_abspath, FALSE /* keep_as_working */, FALSE /* queue_deletes */, + FALSE /* remove_locks */, SVN_INVALID_REVNUM /* not_present_rev */, NULL, NULL, scratch_pool)); @@ -1911,7 +1913,7 @@ delete_entry(const char *path, { /* Delete, and do not leave a not-present node. */ SVN_ERR(svn_wc__db_base_remove(eb->db, local_abspath, - keep_as_working, queue_deletes, + keep_as_working, queue_deletes, FALSE, SVN_INVALID_REVNUM /* not_present_rev */, tree_conflict, NULL, scratch_pool)); @@ -1920,7 +1922,7 @@ delete_entry(const char *path, { /* Delete, leaving a not-present node. */ SVN_ERR(svn_wc__db_base_remove(eb->db, local_abspath, - keep_as_working, queue_deletes, + keep_as_working, queue_deletes, FALSE, *eb->target_revision, tree_conflict, NULL, scratch_pool)); @@ -1939,8 +1941,19 @@ delete_entry(const char *path, /* Notify. */ if (tree_conflict) - do_notification(eb, local_abspath, svn_node_unknown, - svn_wc_notify_tree_conflict, scratch_pool); + { + if (eb->conflict_func) + SVN_ERR(svn_wc__conflict_invoke_resolver(eb->db, local_abspath, + tree_conflict, + NULL /* merge_options */, + eb->conflict_func, + eb->conflict_baton, + eb->cancel_func, + eb->cancel_baton, + scratch_pool)); + do_notification(eb, local_abspath, svn_node_unknown, + svn_wc_notify_tree_conflict, scratch_pool); + } else { svn_wc_notify_action_t action = svn_wc_notify_update_delete; @@ -2289,6 +2302,16 @@ add_directory(const char *path, if (tree_conflict != NULL) { + if (eb->conflict_func) + SVN_ERR(svn_wc__conflict_invoke_resolver(eb->db, db->local_abspath, + tree_conflict, + NULL /* merge_options */, + eb->conflict_func, + eb->conflict_baton, + eb->cancel_func, + eb->cancel_baton, + pool)); + db->already_notified = TRUE; do_notification(eb, db->local_abspath, svn_node_dir, svn_wc_notify_tree_conflict, pool); @@ -2907,7 +2930,7 @@ close_directory(void *dir_baton, eb->conflict_func, eb->conflict_baton, eb->cancel_func, - eb->conflict_baton, + eb->cancel_baton, scratch_pool)); /* Notify of any prop changes on this directory -- but do nothing if @@ -3380,6 +3403,16 @@ add_file(const char *path, tree_conflict, NULL, scratch_pool)); + if (eb->conflict_func) + SVN_ERR(svn_wc__conflict_invoke_resolver(eb->db, fb->local_abspath, + tree_conflict, + NULL /* merge_options */, + eb->conflict_func, + eb->conflict_baton, + eb->cancel_func, + eb->cancel_baton, + scratch_pool)); + fb->already_notified = TRUE; do_notification(eb, fb->local_abspath, svn_node_file, svn_wc_notify_tree_conflict, scratch_pool); @@ -4703,6 +4736,7 @@ close_edit(void *edit_baton, SVN_ERR(svn_wc__db_base_remove(eb->db, eb->target_abspath, FALSE /* keep_as_working */, FALSE /* queue_deletes */, + FALSE /* remove_locks */, SVN_INVALID_REVNUM, NULL, NULL, scratch_pool)); } diff --git a/subversion/libsvn_wc/upgrade.c b/subversion/libsvn_wc/upgrade.c index 983892cc35b0..ff5543c47b6b 100644 --- a/subversion/libsvn_wc/upgrade.c +++ b/subversion/libsvn_wc/upgrade.c @@ -2196,13 +2196,15 @@ svn_wc_upgrade(svn_wc_context_t *wc_ctx, upgrade_working_copy_baton_t cb_baton; svn_error_t *err; int result_format; + svn_boolean_t bumped_format; /* Try upgrading a wc-ng-style working copy. */ SVN_ERR(svn_wc__db_open(&db, NULL /* ### config */, TRUE, FALSE, scratch_pool, scratch_pool)); - err = svn_wc__db_bump_format(&result_format, local_abspath, db, + err = svn_wc__db_bump_format(&result_format, &bumped_format, + db, local_abspath, scratch_pool); if (err) { @@ -2224,6 +2226,17 @@ svn_wc_upgrade(svn_wc_context_t *wc_ctx, SVN_ERR_ASSERT(result_format == SVN_WC__VERSION); + if (bumped_format && notify_func) + { + svn_wc_notify_t *notify; + + notify = svn_wc_create_notify(local_abspath, + svn_wc_notify_upgraded_path, + scratch_pool); + + notify_func(notify_baton, notify, scratch_pool); + } + return SVN_NO_ERROR; } diff --git a/subversion/libsvn_wc/wc-checks.h b/subversion/libsvn_wc/wc-checks.h index 3c05e61a5e45..43ab4cc18ee1 100644 --- a/subversion/libsvn_wc/wc-checks.h +++ b/subversion/libsvn_wc/wc-checks.h @@ -1,4 +1,4 @@ -/* This file is automatically generated from wc-checks.sql and .dist_sandbox/subversion-1.8.0/subversion/libsvn_wc/token-map.h. +/* This file is automatically generated from wc-checks.sql and .dist_sandbox/subversion-1.8.1/subversion/libsvn_wc/token-map.h. * Do not edit this file -- edit the source and rerun gen-make.py */ #define STMT_VERIFICATION_TRIGGERS 0 diff --git a/subversion/libsvn_wc/wc-metadata.h b/subversion/libsvn_wc/wc-metadata.h index 7925f5eb4487..d0421788d8ad 100644 --- a/subversion/libsvn_wc/wc-metadata.h +++ b/subversion/libsvn_wc/wc-metadata.h @@ -1,4 +1,4 @@ -/* This file is automatically generated from wc-metadata.sql and .dist_sandbox/subversion-1.8.0/subversion/libsvn_wc/token-map.h. +/* This file is automatically generated from wc-metadata.sql and .dist_sandbox/subversion-1.8.1/subversion/libsvn_wc/token-map.h. * Do not edit this file -- edit the source and rerun gen-make.py */ #define STMT_CREATE_SCHEMA 0 diff --git a/subversion/libsvn_wc/wc-queries.h b/subversion/libsvn_wc/wc-queries.h index 2fd8f1ac9f11..950f6257f9a2 100644 --- a/subversion/libsvn_wc/wc-queries.h +++ b/subversion/libsvn_wc/wc-queries.h @@ -1,4 +1,4 @@ -/* This file is automatically generated from wc-queries.sql and .dist_sandbox/subversion-1.8.0/subversion/libsvn_wc/token-map.h. +/* This file is automatically generated from wc-queries.sql and .dist_sandbox/subversion-1.8.1/subversion/libsvn_wc/token-map.h. * Do not edit this file -- edit the source and rerun gen-make.py */ #define STMT_SELECT_NODE_INFO 0 @@ -589,57 +589,64 @@ "WHERE repos_id = ?1 AND repos_relpath = ?2 " \ "" -#define STMT_CLEAR_BASE_NODE_RECURSIVE_DAV_CACHE 56 -#define STMT_56_INFO {"STMT_CLEAR_BASE_NODE_RECURSIVE_DAV_CACHE", NULL} +#define STMT_DELETE_LOCK_RECURSIVELY 56 +#define STMT_56_INFO {"STMT_DELETE_LOCK_RECURSIVELY", NULL} #define STMT_56 \ + "DELETE FROM lock " \ + "WHERE repos_id = ?1 AND (repos_relpath = ?2 OR (((repos_relpath) > (CASE (?2) WHEN '' THEN '' ELSE (?2) || '/' END)) AND ((repos_relpath) < CASE (?2) WHEN '' THEN X'FFFF' ELSE (?2) || '0' END))) " \ + "" + +#define STMT_CLEAR_BASE_NODE_RECURSIVE_DAV_CACHE 57 +#define STMT_57_INFO {"STMT_CLEAR_BASE_NODE_RECURSIVE_DAV_CACHE", NULL} +#define STMT_57 \ "UPDATE nodes SET dav_cache = NULL " \ "WHERE dav_cache IS NOT NULL AND wc_id = ?1 AND op_depth = 0 " \ " AND (local_relpath = ?2 " \ " OR (((local_relpath) > (CASE (?2) WHEN '' THEN '' ELSE (?2) || '/' END)) AND ((local_relpath) < CASE (?2) WHEN '' THEN X'FFFF' ELSE (?2) || '0' END))) " \ "" -#define STMT_RECURSIVE_UPDATE_NODE_REPO 57 -#define STMT_57_INFO {"STMT_RECURSIVE_UPDATE_NODE_REPO", NULL} -#define STMT_57 \ +#define STMT_RECURSIVE_UPDATE_NODE_REPO 58 +#define STMT_58_INFO {"STMT_RECURSIVE_UPDATE_NODE_REPO", NULL} +#define STMT_58 \ "UPDATE nodes SET repos_id = ?4, dav_cache = NULL " \ "WHERE (wc_id = ?1 AND local_relpath = ?2 AND repos_id = ?3) " \ " OR (wc_id = ?1 AND (((local_relpath) > (CASE (?2) WHEN '' THEN '' ELSE (?2) || '/' END)) AND ((local_relpath) < CASE (?2) WHEN '' THEN X'FFFF' ELSE (?2) || '0' END)) " \ " AND repos_id = ?3) " \ "" -#define STMT_UPDATE_LOCK_REPOS_ID 58 -#define STMT_58_INFO {"STMT_UPDATE_LOCK_REPOS_ID", NULL} -#define STMT_58 \ +#define STMT_UPDATE_LOCK_REPOS_ID 59 +#define STMT_59_INFO {"STMT_UPDATE_LOCK_REPOS_ID", NULL} +#define STMT_59 \ "UPDATE lock SET repos_id = ?2 " \ "WHERE repos_id = ?1 " \ "" -#define STMT_UPDATE_NODE_FILEINFO 59 -#define STMT_59_INFO {"STMT_UPDATE_NODE_FILEINFO", NULL} -#define STMT_59 \ +#define STMT_UPDATE_NODE_FILEINFO 60 +#define STMT_60_INFO {"STMT_UPDATE_NODE_FILEINFO", NULL} +#define STMT_60 \ "UPDATE nodes SET translated_size = ?3, last_mod_time = ?4 " \ "WHERE wc_id = ?1 AND local_relpath = ?2 " \ " AND op_depth = (SELECT MAX(op_depth) FROM nodes " \ " WHERE wc_id = ?1 AND local_relpath = ?2) " \ "" -#define STMT_INSERT_ACTUAL_CONFLICT 60 -#define STMT_60_INFO {"STMT_INSERT_ACTUAL_CONFLICT", NULL} -#define STMT_60 \ +#define STMT_INSERT_ACTUAL_CONFLICT 61 +#define STMT_61_INFO {"STMT_INSERT_ACTUAL_CONFLICT", NULL} +#define STMT_61 \ "INSERT INTO actual_node (wc_id, local_relpath, conflict_data, parent_relpath) " \ "VALUES (?1, ?2, ?3, ?4) " \ "" -#define STMT_UPDATE_ACTUAL_CONFLICT 61 -#define STMT_61_INFO {"STMT_UPDATE_ACTUAL_CONFLICT", NULL} -#define STMT_61 \ +#define STMT_UPDATE_ACTUAL_CONFLICT 62 +#define STMT_62_INFO {"STMT_UPDATE_ACTUAL_CONFLICT", NULL} +#define STMT_62 \ "UPDATE actual_node SET conflict_data = ?3 " \ "WHERE wc_id = ?1 AND local_relpath = ?2 " \ "" -#define STMT_UPDATE_ACTUAL_CHANGELISTS 62 -#define STMT_62_INFO {"STMT_UPDATE_ACTUAL_CHANGELISTS", NULL} -#define STMT_62 \ +#define STMT_UPDATE_ACTUAL_CHANGELISTS 63 +#define STMT_63_INFO {"STMT_UPDATE_ACTUAL_CHANGELISTS", NULL} +#define STMT_63 \ "UPDATE actual_node SET changelist = ?3 " \ "WHERE wc_id = ?1 " \ " AND (local_relpath = ?2 OR (((local_relpath) > (CASE (?2) WHEN '' THEN '' ELSE (?2) || '/' END)) AND ((local_relpath) < CASE (?2) WHEN '' THEN X'FFFF' ELSE (?2) || '0' END))) " \ @@ -649,16 +656,16 @@ " AND kind = 'file') " \ "" -#define STMT_UPDATE_ACTUAL_CLEAR_CHANGELIST 63 -#define STMT_63_INFO {"STMT_UPDATE_ACTUAL_CLEAR_CHANGELIST", NULL} -#define STMT_63 \ +#define STMT_UPDATE_ACTUAL_CLEAR_CHANGELIST 64 +#define STMT_64_INFO {"STMT_UPDATE_ACTUAL_CLEAR_CHANGELIST", NULL} +#define STMT_64 \ "UPDATE actual_node SET changelist = NULL " \ " WHERE wc_id = ?1 AND local_relpath = ?2 " \ "" -#define STMT_MARK_SKIPPED_CHANGELIST_DIRS 64 -#define STMT_64_INFO {"STMT_MARK_SKIPPED_CHANGELIST_DIRS", NULL} -#define STMT_64 \ +#define STMT_MARK_SKIPPED_CHANGELIST_DIRS 65 +#define STMT_65_INFO {"STMT_MARK_SKIPPED_CHANGELIST_DIRS", NULL} +#define STMT_65 \ "INSERT INTO changelist_list (wc_id, local_relpath, notify, changelist) " \ "SELECT wc_id, local_relpath, 7, ?3 " \ "FROM targets_list " \ @@ -667,17 +674,17 @@ " AND kind = 'dir' " \ "" -#define STMT_RESET_ACTUAL_WITH_CHANGELIST 65 -#define STMT_65_INFO {"STMT_RESET_ACTUAL_WITH_CHANGELIST", NULL} -#define STMT_65 \ +#define STMT_RESET_ACTUAL_WITH_CHANGELIST 66 +#define STMT_66_INFO {"STMT_RESET_ACTUAL_WITH_CHANGELIST", NULL} +#define STMT_66 \ "REPLACE INTO actual_node ( " \ " wc_id, local_relpath, parent_relpath, changelist) " \ "VALUES (?1, ?2, ?3, ?4) " \ "" -#define STMT_CREATE_CHANGELIST_LIST 66 -#define STMT_66_INFO {"STMT_CREATE_CHANGELIST_LIST", NULL} -#define STMT_66 \ +#define STMT_CREATE_CHANGELIST_LIST 67 +#define STMT_67_INFO {"STMT_CREATE_CHANGELIST_LIST", NULL} +#define STMT_67 \ "DROP TABLE IF EXISTS changelist_list; " \ "CREATE TEMPORARY TABLE changelist_list ( " \ " wc_id INTEGER NOT NULL, " \ @@ -688,9 +695,9 @@ ") " \ "" -#define STMT_CREATE_CHANGELIST_TRIGGER 67 -#define STMT_67_INFO {"STMT_CREATE_CHANGELIST_TRIGGER", NULL} -#define STMT_67 \ +#define STMT_CREATE_CHANGELIST_TRIGGER 68 +#define STMT_68_INFO {"STMT_CREATE_CHANGELIST_TRIGGER", NULL} +#define STMT_68 \ "DROP TRIGGER IF EXISTS trigger_changelist_list_change; " \ "CREATE TEMPORARY TRIGGER trigger_changelist_list_change " \ "BEFORE UPDATE ON actual_node " \ @@ -705,25 +712,25 @@ "END " \ "" -#define STMT_FINALIZE_CHANGELIST 68 -#define STMT_68_INFO {"STMT_FINALIZE_CHANGELIST", NULL} -#define STMT_68 \ +#define STMT_FINALIZE_CHANGELIST 69 +#define STMT_69_INFO {"STMT_FINALIZE_CHANGELIST", NULL} +#define STMT_69 \ "DROP TRIGGER trigger_changelist_list_change; " \ "DROP TABLE changelist_list; " \ "DROP TABLE targets_list " \ "" -#define STMT_SELECT_CHANGELIST_LIST 69 -#define STMT_69_INFO {"STMT_SELECT_CHANGELIST_LIST", NULL} -#define STMT_69 \ +#define STMT_SELECT_CHANGELIST_LIST 70 +#define STMT_70_INFO {"STMT_SELECT_CHANGELIST_LIST", NULL} +#define STMT_70 \ "SELECT wc_id, local_relpath, notify, changelist " \ "FROM changelist_list " \ "ORDER BY wc_id, local_relpath ASC, notify DESC " \ "" -#define STMT_CREATE_TARGETS_LIST 70 -#define STMT_70_INFO {"STMT_CREATE_TARGETS_LIST", NULL} -#define STMT_70 \ +#define STMT_CREATE_TARGETS_LIST 71 +#define STMT_71_INFO {"STMT_CREATE_TARGETS_LIST", NULL} +#define STMT_71 \ "DROP TABLE IF EXISTS targets_list; " \ "CREATE TEMPORARY TABLE targets_list ( " \ " wc_id INTEGER NOT NULL, " \ @@ -734,15 +741,15 @@ " ); " \ "" -#define STMT_DROP_TARGETS_LIST 71 -#define STMT_71_INFO {"STMT_DROP_TARGETS_LIST", NULL} -#define STMT_71 \ +#define STMT_DROP_TARGETS_LIST 72 +#define STMT_72_INFO {"STMT_DROP_TARGETS_LIST", NULL} +#define STMT_72 \ "DROP TABLE targets_list " \ "" -#define STMT_INSERT_TARGET 72 -#define STMT_72_INFO {"STMT_INSERT_TARGET", NULL} -#define STMT_72 \ +#define STMT_INSERT_TARGET 73 +#define STMT_73_INFO {"STMT_INSERT_TARGET", NULL} +#define STMT_73 \ "INSERT INTO targets_list(wc_id, local_relpath, parent_relpath, kind) " \ "SELECT wc_id, local_relpath, parent_relpath, kind " \ "FROM nodes_current " \ @@ -750,9 +757,9 @@ " AND local_relpath = ?2 " \ "" -#define STMT_INSERT_TARGET_DEPTH_FILES 73 -#define STMT_73_INFO {"STMT_INSERT_TARGET_DEPTH_FILES", NULL} -#define STMT_73 \ +#define STMT_INSERT_TARGET_DEPTH_FILES 74 +#define STMT_74_INFO {"STMT_INSERT_TARGET_DEPTH_FILES", NULL} +#define STMT_74 \ "INSERT INTO targets_list(wc_id, local_relpath, parent_relpath, kind) " \ "SELECT wc_id, local_relpath, parent_relpath, kind " \ "FROM nodes_current " \ @@ -761,9 +768,9 @@ " AND kind = 'file' " \ "" -#define STMT_INSERT_TARGET_DEPTH_IMMEDIATES 74 -#define STMT_74_INFO {"STMT_INSERT_TARGET_DEPTH_IMMEDIATES", NULL} -#define STMT_74 \ +#define STMT_INSERT_TARGET_DEPTH_IMMEDIATES 75 +#define STMT_75_INFO {"STMT_INSERT_TARGET_DEPTH_IMMEDIATES", NULL} +#define STMT_75 \ "INSERT INTO targets_list(wc_id, local_relpath, parent_relpath, kind) " \ "SELECT wc_id, local_relpath, parent_relpath, kind " \ "FROM nodes_current " \ @@ -771,9 +778,9 @@ " AND parent_relpath = ?2 " \ "" -#define STMT_INSERT_TARGET_DEPTH_INFINITY 75 -#define STMT_75_INFO {"STMT_INSERT_TARGET_DEPTH_INFINITY", NULL} -#define STMT_75 \ +#define STMT_INSERT_TARGET_DEPTH_INFINITY 76 +#define STMT_76_INFO {"STMT_INSERT_TARGET_DEPTH_INFINITY", NULL} +#define STMT_76 \ "INSERT INTO targets_list(wc_id, local_relpath, parent_relpath, kind) " \ "SELECT wc_id, local_relpath, parent_relpath, kind " \ "FROM nodes_current " \ @@ -781,9 +788,9 @@ " AND (((local_relpath) > (CASE (?2) WHEN '' THEN '' ELSE (?2) || '/' END)) AND ((local_relpath) < CASE (?2) WHEN '' THEN X'FFFF' ELSE (?2) || '0' END)) " \ "" -#define STMT_INSERT_TARGET_WITH_CHANGELIST 76 -#define STMT_76_INFO {"STMT_INSERT_TARGET_WITH_CHANGELIST", NULL} -#define STMT_76 \ +#define STMT_INSERT_TARGET_WITH_CHANGELIST 77 +#define STMT_77_INFO {"STMT_INSERT_TARGET_WITH_CHANGELIST", NULL} +#define STMT_77 \ "INSERT INTO targets_list(wc_id, local_relpath, parent_relpath, kind) " \ "SELECT N.wc_id, N.local_relpath, N.parent_relpath, N.kind " \ " FROM actual_node AS A JOIN nodes_current AS N " \ @@ -793,9 +800,9 @@ " AND A.changelist = ?3 " \ "" -#define STMT_INSERT_TARGET_WITH_CHANGELIST_DEPTH_FILES 77 -#define STMT_77_INFO {"STMT_INSERT_TARGET_WITH_CHANGELIST_DEPTH_FILES", NULL} -#define STMT_77 \ +#define STMT_INSERT_TARGET_WITH_CHANGELIST_DEPTH_FILES 78 +#define STMT_78_INFO {"STMT_INSERT_TARGET_WITH_CHANGELIST_DEPTH_FILES", NULL} +#define STMT_78 \ "INSERT INTO targets_list(wc_id, local_relpath, parent_relpath, kind) " \ "SELECT N.wc_id, N.local_relpath, N.parent_relpath, N.kind " \ " FROM actual_node AS A JOIN nodes_current AS N " \ @@ -806,9 +813,9 @@ " AND A.changelist = ?3 " \ "" -#define STMT_INSERT_TARGET_WITH_CHANGELIST_DEPTH_IMMEDIATES 78 -#define STMT_78_INFO {"STMT_INSERT_TARGET_WITH_CHANGELIST_DEPTH_IMMEDIATES", NULL} -#define STMT_78 \ +#define STMT_INSERT_TARGET_WITH_CHANGELIST_DEPTH_IMMEDIATES 79 +#define STMT_79_INFO {"STMT_INSERT_TARGET_WITH_CHANGELIST_DEPTH_IMMEDIATES", NULL} +#define STMT_79 \ "INSERT INTO targets_list(wc_id, local_relpath, parent_relpath, kind) " \ "SELECT N.wc_id, N.local_relpath, N.parent_relpath, N.kind " \ " FROM actual_node AS A JOIN nodes_current AS N " \ @@ -818,9 +825,9 @@ " AND A.changelist = ?3 " \ "" -#define STMT_INSERT_TARGET_WITH_CHANGELIST_DEPTH_INFINITY 79 -#define STMT_79_INFO {"STMT_INSERT_TARGET_WITH_CHANGELIST_DEPTH_INFINITY", NULL} -#define STMT_79 \ +#define STMT_INSERT_TARGET_WITH_CHANGELIST_DEPTH_INFINITY 80 +#define STMT_80_INFO {"STMT_INSERT_TARGET_WITH_CHANGELIST_DEPTH_INFINITY", NULL} +#define STMT_80 \ "INSERT INTO targets_list(wc_id, local_relpath, parent_relpath, kind) " \ "SELECT N.wc_id, N.local_relpath, N.parent_relpath, N.kind " \ " FROM actual_node AS A JOIN nodes_current AS N " \ @@ -830,18 +837,18 @@ " AND A.changelist = ?3 " \ "" -#define STMT_INSERT_ACTUAL_EMPTIES 80 -#define STMT_80_INFO {"STMT_INSERT_ACTUAL_EMPTIES", NULL} -#define STMT_80 \ +#define STMT_INSERT_ACTUAL_EMPTIES 81 +#define STMT_81_INFO {"STMT_INSERT_ACTUAL_EMPTIES", NULL} +#define STMT_81 \ "INSERT OR IGNORE INTO actual_node ( " \ " wc_id, local_relpath, parent_relpath) " \ "SELECT wc_id, local_relpath, parent_relpath " \ "FROM targets_list " \ "" -#define STMT_DELETE_ACTUAL_EMPTY 81 -#define STMT_81_INFO {"STMT_DELETE_ACTUAL_EMPTY", NULL} -#define STMT_81 \ +#define STMT_DELETE_ACTUAL_EMPTY 82 +#define STMT_82_INFO {"STMT_DELETE_ACTUAL_EMPTY", NULL} +#define STMT_82 \ "DELETE FROM actual_node " \ "WHERE wc_id = ?1 AND local_relpath = ?2 " \ " AND properties IS NULL " \ @@ -853,9 +860,9 @@ " AND left_checksum IS NULL " \ "" -#define STMT_DELETE_ACTUAL_EMPTIES 82 -#define STMT_82_INFO {"STMT_DELETE_ACTUAL_EMPTIES", NULL} -#define STMT_82 \ +#define STMT_DELETE_ACTUAL_EMPTIES 83 +#define STMT_83_INFO {"STMT_DELETE_ACTUAL_EMPTIES", NULL} +#define STMT_83 \ "DELETE FROM actual_node " \ "WHERE wc_id = ?1 " \ " AND (((local_relpath) > (CASE (?2) WHEN '' THEN '' ELSE (?2) || '/' END)) AND ((local_relpath) < CASE (?2) WHEN '' THEN X'FFFF' ELSE (?2) || '0' END)) " \ @@ -868,25 +875,25 @@ " AND left_checksum IS NULL " \ "" -#define STMT_DELETE_BASE_NODE 83 -#define STMT_83_INFO {"STMT_DELETE_BASE_NODE", NULL} -#define STMT_83 \ +#define STMT_DELETE_BASE_NODE 84 +#define STMT_84_INFO {"STMT_DELETE_BASE_NODE", NULL} +#define STMT_84 \ "DELETE FROM nodes " \ "WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = 0 " \ "" -#define STMT_DELETE_WORKING_NODE 84 -#define STMT_84_INFO {"STMT_DELETE_WORKING_NODE", NULL} -#define STMT_84 \ +#define STMT_DELETE_WORKING_NODE 85 +#define STMT_85_INFO {"STMT_DELETE_WORKING_NODE", NULL} +#define STMT_85 \ "DELETE FROM nodes " \ "WHERE wc_id = ?1 AND local_relpath = ?2 " \ " AND op_depth = (SELECT MAX(op_depth) FROM nodes " \ " WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth > 0) " \ "" -#define STMT_DELETE_LOWEST_WORKING_NODE 85 -#define STMT_85_INFO {"STMT_DELETE_LOWEST_WORKING_NODE", NULL} -#define STMT_85 \ +#define STMT_DELETE_LOWEST_WORKING_NODE 86 +#define STMT_86_INFO {"STMT_DELETE_LOWEST_WORKING_NODE", NULL} +#define STMT_86 \ "DELETE FROM nodes " \ "WHERE wc_id = ?1 AND local_relpath = ?2 " \ " AND op_depth = (SELECT MIN(op_depth) FROM nodes " \ @@ -894,16 +901,16 @@ " AND presence = 'base-deleted' " \ "" -#define STMT_DELETE_ALL_LAYERS 86 -#define STMT_86_INFO {"STMT_DELETE_ALL_LAYERS", NULL} -#define STMT_86 \ +#define STMT_DELETE_ALL_LAYERS 87 +#define STMT_87_INFO {"STMT_DELETE_ALL_LAYERS", NULL} +#define STMT_87 \ "DELETE FROM nodes " \ "WHERE wc_id = ?1 AND local_relpath = ?2 " \ "" -#define STMT_DELETE_NODES_ABOVE_DEPTH_RECURSIVE 87 -#define STMT_87_INFO {"STMT_DELETE_NODES_ABOVE_DEPTH_RECURSIVE", NULL} -#define STMT_87 \ +#define STMT_DELETE_NODES_ABOVE_DEPTH_RECURSIVE 88 +#define STMT_88_INFO {"STMT_DELETE_NODES_ABOVE_DEPTH_RECURSIVE", NULL} +#define STMT_88 \ "DELETE FROM nodes " \ "WHERE wc_id = ?1 " \ " AND (local_relpath = ?2 " \ @@ -911,25 +918,25 @@ " AND op_depth >= ?3 " \ "" -#define STMT_DELETE_ACTUAL_NODE 88 -#define STMT_88_INFO {"STMT_DELETE_ACTUAL_NODE", NULL} -#define STMT_88 \ +#define STMT_DELETE_ACTUAL_NODE 89 +#define STMT_89_INFO {"STMT_DELETE_ACTUAL_NODE", NULL} +#define STMT_89 \ "DELETE FROM actual_node " \ "WHERE wc_id = ?1 AND local_relpath = ?2 " \ "" -#define STMT_DELETE_ACTUAL_NODE_RECURSIVE 89 -#define STMT_89_INFO {"STMT_DELETE_ACTUAL_NODE_RECURSIVE", NULL} -#define STMT_89 \ +#define STMT_DELETE_ACTUAL_NODE_RECURSIVE 90 +#define STMT_90_INFO {"STMT_DELETE_ACTUAL_NODE_RECURSIVE", NULL} +#define STMT_90 \ "DELETE FROM actual_node " \ "WHERE wc_id = ?1 " \ " AND (local_relpath = ?2 " \ " OR (((local_relpath) > (CASE (?2) WHEN '' THEN '' ELSE (?2) || '/' END)) AND ((local_relpath) < CASE (?2) WHEN '' THEN X'FFFF' ELSE (?2) || '0' END))) " \ "" -#define STMT_DELETE_ACTUAL_NODE_LEAVING_CHANGELIST 90 -#define STMT_90_INFO {"STMT_DELETE_ACTUAL_NODE_LEAVING_CHANGELIST", NULL} -#define STMT_90 \ +#define STMT_DELETE_ACTUAL_NODE_LEAVING_CHANGELIST 91 +#define STMT_91_INFO {"STMT_DELETE_ACTUAL_NODE_LEAVING_CHANGELIST", NULL} +#define STMT_91 \ "DELETE FROM actual_node " \ "WHERE wc_id = ?1 " \ " AND local_relpath = ?2 " \ @@ -939,9 +946,9 @@ " AND c.kind = 'file')) " \ "" -#define STMT_DELETE_ACTUAL_NODE_LEAVING_CHANGELIST_RECURSIVE 91 -#define STMT_91_INFO {"STMT_DELETE_ACTUAL_NODE_LEAVING_CHANGELIST_RECURSIVE", NULL} -#define STMT_91 \ +#define STMT_DELETE_ACTUAL_NODE_LEAVING_CHANGELIST_RECURSIVE 92 +#define STMT_92_INFO {"STMT_DELETE_ACTUAL_NODE_LEAVING_CHANGELIST_RECURSIVE", NULL} +#define STMT_92 \ "DELETE FROM actual_node " \ "WHERE wc_id = ?1 " \ " AND (local_relpath = ?2 " \ @@ -953,9 +960,9 @@ " AND c.kind = 'file')) " \ "" -#define STMT_CLEAR_ACTUAL_NODE_LEAVING_CHANGELIST 92 -#define STMT_92_INFO {"STMT_CLEAR_ACTUAL_NODE_LEAVING_CHANGELIST", NULL} -#define STMT_92 \ +#define STMT_CLEAR_ACTUAL_NODE_LEAVING_CHANGELIST 93 +#define STMT_93_INFO {"STMT_CLEAR_ACTUAL_NODE_LEAVING_CHANGELIST", NULL} +#define STMT_93 \ "UPDATE actual_node " \ "SET properties = NULL, " \ " text_mod = NULL, " \ @@ -967,9 +974,9 @@ "WHERE wc_id = ?1 AND local_relpath = ?2 " \ "" -#define STMT_CLEAR_ACTUAL_NODE_LEAVING_CHANGELIST_RECURSIVE 93 -#define STMT_93_INFO {"STMT_CLEAR_ACTUAL_NODE_LEAVING_CHANGELIST_RECURSIVE", NULL} -#define STMT_93 \ +#define STMT_CLEAR_ACTUAL_NODE_LEAVING_CHANGELIST_RECURSIVE 94 +#define STMT_94_INFO {"STMT_CLEAR_ACTUAL_NODE_LEAVING_CHANGELIST_RECURSIVE", NULL} +#define STMT_94 \ "UPDATE actual_node " \ "SET properties = NULL, " \ " text_mod = NULL, " \ @@ -983,108 +990,108 @@ " OR (((local_relpath) > (CASE (?2) WHEN '' THEN '' ELSE (?2) || '/' END)) AND ((local_relpath) < CASE (?2) WHEN '' THEN X'FFFF' ELSE (?2) || '0' END))) " \ "" -#define STMT_UPDATE_NODE_BASE_DEPTH 94 -#define STMT_94_INFO {"STMT_UPDATE_NODE_BASE_DEPTH", NULL} -#define STMT_94 \ +#define STMT_UPDATE_NODE_BASE_DEPTH 95 +#define STMT_95_INFO {"STMT_UPDATE_NODE_BASE_DEPTH", NULL} +#define STMT_95 \ "UPDATE nodes SET depth = ?3 " \ "WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = 0 " \ " AND kind='dir' " \ "" -#define STMT_UPDATE_NODE_BASE_PRESENCE 95 -#define STMT_95_INFO {"STMT_UPDATE_NODE_BASE_PRESENCE", NULL} -#define STMT_95 \ +#define STMT_UPDATE_NODE_BASE_PRESENCE 96 +#define STMT_96_INFO {"STMT_UPDATE_NODE_BASE_PRESENCE", NULL} +#define STMT_96 \ "UPDATE nodes SET presence = ?3 " \ "WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = 0 " \ "" -#define STMT_UPDATE_BASE_NODE_PRESENCE_REVNUM_AND_REPOS_PATH 96 -#define STMT_96_INFO {"STMT_UPDATE_BASE_NODE_PRESENCE_REVNUM_AND_REPOS_PATH", NULL} -#define STMT_96 \ +#define STMT_UPDATE_BASE_NODE_PRESENCE_REVNUM_AND_REPOS_PATH 97 +#define STMT_97_INFO {"STMT_UPDATE_BASE_NODE_PRESENCE_REVNUM_AND_REPOS_PATH", NULL} +#define STMT_97 \ "UPDATE nodes SET presence = ?3, revision = ?4, repos_path = ?5 " \ "WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = 0 " \ "" -#define STMT_LOOK_FOR_WORK 97 -#define STMT_97_INFO {"STMT_LOOK_FOR_WORK", NULL} -#define STMT_97 \ +#define STMT_LOOK_FOR_WORK 98 +#define STMT_98_INFO {"STMT_LOOK_FOR_WORK", NULL} +#define STMT_98 \ "SELECT id FROM work_queue LIMIT 1 " \ "" -#define STMT_INSERT_WORK_ITEM 98 -#define STMT_98_INFO {"STMT_INSERT_WORK_ITEM", NULL} -#define STMT_98 \ +#define STMT_INSERT_WORK_ITEM 99 +#define STMT_99_INFO {"STMT_INSERT_WORK_ITEM", NULL} +#define STMT_99 \ "INSERT INTO work_queue (work) VALUES (?1) " \ "" -#define STMT_SELECT_WORK_ITEM 99 -#define STMT_99_INFO {"STMT_SELECT_WORK_ITEM", NULL} -#define STMT_99 \ +#define STMT_SELECT_WORK_ITEM 100 +#define STMT_100_INFO {"STMT_SELECT_WORK_ITEM", NULL} +#define STMT_100 \ "SELECT id, work FROM work_queue ORDER BY id LIMIT 1 " \ "" -#define STMT_DELETE_WORK_ITEM 100 -#define STMT_100_INFO {"STMT_DELETE_WORK_ITEM", NULL} -#define STMT_100 \ +#define STMT_DELETE_WORK_ITEM 101 +#define STMT_101_INFO {"STMT_DELETE_WORK_ITEM", NULL} +#define STMT_101 \ "DELETE FROM work_queue WHERE id = ?1 " \ "" -#define STMT_INSERT_OR_IGNORE_PRISTINE 101 -#define STMT_101_INFO {"STMT_INSERT_OR_IGNORE_PRISTINE", NULL} -#define STMT_101 \ +#define STMT_INSERT_OR_IGNORE_PRISTINE 102 +#define STMT_102_INFO {"STMT_INSERT_OR_IGNORE_PRISTINE", NULL} +#define STMT_102 \ "INSERT OR IGNORE INTO pristine (checksum, md5_checksum, size, refcount) " \ "VALUES (?1, ?2, ?3, 0) " \ "" -#define STMT_INSERT_PRISTINE 102 -#define STMT_102_INFO {"STMT_INSERT_PRISTINE", NULL} -#define STMT_102 \ +#define STMT_INSERT_PRISTINE 103 +#define STMT_103_INFO {"STMT_INSERT_PRISTINE", NULL} +#define STMT_103 \ "INSERT INTO pristine (checksum, md5_checksum, size, refcount) " \ "VALUES (?1, ?2, ?3, 0) " \ "" -#define STMT_SELECT_PRISTINE 103 -#define STMT_103_INFO {"STMT_SELECT_PRISTINE", NULL} -#define STMT_103 \ +#define STMT_SELECT_PRISTINE 104 +#define STMT_104_INFO {"STMT_SELECT_PRISTINE", NULL} +#define STMT_104 \ "SELECT md5_checksum " \ "FROM pristine " \ "WHERE checksum = ?1 " \ "" -#define STMT_SELECT_PRISTINE_SIZE 104 -#define STMT_104_INFO {"STMT_SELECT_PRISTINE_SIZE", NULL} -#define STMT_104 \ +#define STMT_SELECT_PRISTINE_SIZE 105 +#define STMT_105_INFO {"STMT_SELECT_PRISTINE_SIZE", NULL} +#define STMT_105 \ "SELECT size " \ "FROM pristine " \ "WHERE checksum = ?1 LIMIT 1 " \ "" -#define STMT_SELECT_PRISTINE_BY_MD5 105 -#define STMT_105_INFO {"STMT_SELECT_PRISTINE_BY_MD5", NULL} -#define STMT_105 \ +#define STMT_SELECT_PRISTINE_BY_MD5 106 +#define STMT_106_INFO {"STMT_SELECT_PRISTINE_BY_MD5", NULL} +#define STMT_106 \ "SELECT checksum " \ "FROM pristine " \ "WHERE md5_checksum = ?1 " \ "" -#define STMT_SELECT_UNREFERENCED_PRISTINES 106 -#define STMT_106_INFO {"STMT_SELECT_UNREFERENCED_PRISTINES", NULL} -#define STMT_106 \ +#define STMT_SELECT_UNREFERENCED_PRISTINES 107 +#define STMT_107_INFO {"STMT_SELECT_UNREFERENCED_PRISTINES", NULL} +#define STMT_107 \ "SELECT checksum " \ "FROM pristine " \ "WHERE refcount = 0 " \ "" -#define STMT_DELETE_PRISTINE_IF_UNREFERENCED 107 -#define STMT_107_INFO {"STMT_DELETE_PRISTINE_IF_UNREFERENCED", NULL} -#define STMT_107 \ +#define STMT_DELETE_PRISTINE_IF_UNREFERENCED 108 +#define STMT_108_INFO {"STMT_DELETE_PRISTINE_IF_UNREFERENCED", NULL} +#define STMT_108 \ "DELETE FROM pristine " \ "WHERE checksum = ?1 AND refcount = 0 " \ "" -#define STMT_SELECT_COPY_PRISTINES 108 -#define STMT_108_INFO {"STMT_SELECT_COPY_PRISTINES", NULL} -#define STMT_108 \ +#define STMT_SELECT_COPY_PRISTINES 109 +#define STMT_109_INFO {"STMT_SELECT_COPY_PRISTINES", NULL} +#define STMT_109 \ "SELECT n.checksum, md5_checksum, size " \ "FROM nodes_current n " \ "LEFT JOIN pristine p ON n.checksum = p.checksum " \ @@ -1102,62 +1109,62 @@ " AND n.checksum IS NOT NULL " \ "" -#define STMT_VACUUM 109 -#define STMT_109_INFO {"STMT_VACUUM", NULL} -#define STMT_109 \ +#define STMT_VACUUM 110 +#define STMT_110_INFO {"STMT_VACUUM", NULL} +#define STMT_110 \ "VACUUM " \ "" -#define STMT_SELECT_CONFLICT_VICTIMS 110 -#define STMT_110_INFO {"STMT_SELECT_CONFLICT_VICTIMS", NULL} -#define STMT_110 \ +#define STMT_SELECT_CONFLICT_VICTIMS 111 +#define STMT_111_INFO {"STMT_SELECT_CONFLICT_VICTIMS", NULL} +#define STMT_111 \ "SELECT local_relpath, conflict_data " \ "FROM actual_node " \ "WHERE wc_id = ?1 AND parent_relpath = ?2 AND " \ " NOT (conflict_data IS NULL) " \ "" -#define STMT_INSERT_WC_LOCK 111 -#define STMT_111_INFO {"STMT_INSERT_WC_LOCK", NULL} -#define STMT_111 \ +#define STMT_INSERT_WC_LOCK 112 +#define STMT_112_INFO {"STMT_INSERT_WC_LOCK", NULL} +#define STMT_112 \ "INSERT INTO wc_lock (wc_id, local_dir_relpath, locked_levels) " \ "VALUES (?1, ?2, ?3) " \ "" -#define STMT_SELECT_WC_LOCK 112 -#define STMT_112_INFO {"STMT_SELECT_WC_LOCK", NULL} -#define STMT_112 \ +#define STMT_SELECT_WC_LOCK 113 +#define STMT_113_INFO {"STMT_SELECT_WC_LOCK", NULL} +#define STMT_113 \ "SELECT locked_levels FROM wc_lock " \ "WHERE wc_id = ?1 AND local_dir_relpath = ?2 " \ "" -#define STMT_SELECT_ANCESTOR_WCLOCKS 113 -#define STMT_113_INFO {"STMT_SELECT_ANCESTOR_WCLOCKS", NULL} -#define STMT_113 \ +#define STMT_SELECT_ANCESTOR_WCLOCKS 114 +#define STMT_114_INFO {"STMT_SELECT_ANCESTOR_WCLOCKS", NULL} +#define STMT_114 \ "SELECT local_dir_relpath, locked_levels FROM wc_lock " \ "WHERE wc_id = ?1 " \ " AND ((local_dir_relpath >= ?3 AND local_dir_relpath <= ?2) " \ " OR local_dir_relpath = '') " \ "" -#define STMT_DELETE_WC_LOCK 114 -#define STMT_114_INFO {"STMT_DELETE_WC_LOCK", NULL} -#define STMT_114 \ +#define STMT_DELETE_WC_LOCK 115 +#define STMT_115_INFO {"STMT_DELETE_WC_LOCK", NULL} +#define STMT_115 \ "DELETE FROM wc_lock " \ "WHERE wc_id = ?1 AND local_dir_relpath = ?2 " \ "" -#define STMT_FIND_WC_LOCK 115 -#define STMT_115_INFO {"STMT_FIND_WC_LOCK", NULL} -#define STMT_115 \ +#define STMT_FIND_WC_LOCK 116 +#define STMT_116_INFO {"STMT_FIND_WC_LOCK", NULL} +#define STMT_116 \ "SELECT local_dir_relpath FROM wc_lock " \ "WHERE wc_id = ?1 " \ " AND (((local_dir_relpath) > (CASE (?2) WHEN '' THEN '' ELSE (?2) || '/' END)) AND ((local_dir_relpath) < CASE (?2) WHEN '' THEN X'FFFF' ELSE (?2) || '0' END)) " \ "" -#define STMT_DELETE_WC_LOCK_ORPHAN 116 -#define STMT_116_INFO {"STMT_DELETE_WC_LOCK_ORPHAN", NULL} -#define STMT_116 \ +#define STMT_DELETE_WC_LOCK_ORPHAN 117 +#define STMT_117_INFO {"STMT_DELETE_WC_LOCK_ORPHAN", NULL} +#define STMT_117 \ "DELETE FROM wc_lock " \ "WHERE wc_id = ?1 AND local_dir_relpath = ?2 " \ "AND NOT EXISTS (SELECT 1 FROM nodes " \ @@ -1165,9 +1172,9 @@ " AND nodes.local_relpath = wc_lock.local_dir_relpath) " \ "" -#define STMT_DELETE_WC_LOCK_ORPHAN_RECURSIVE 117 -#define STMT_117_INFO {"STMT_DELETE_WC_LOCK_ORPHAN_RECURSIVE", NULL} -#define STMT_117 \ +#define STMT_DELETE_WC_LOCK_ORPHAN_RECURSIVE 118 +#define STMT_118_INFO {"STMT_DELETE_WC_LOCK_ORPHAN_RECURSIVE", NULL} +#define STMT_118 \ "DELETE FROM wc_lock " \ "WHERE wc_id = ?1 " \ " AND (local_dir_relpath = ?2 " \ @@ -1177,9 +1184,9 @@ " AND nodes.local_relpath = wc_lock.local_dir_relpath) " \ "" -#define STMT_APPLY_CHANGES_TO_BASE_NODE 118 -#define STMT_118_INFO {"STMT_APPLY_CHANGES_TO_BASE_NODE", NULL} -#define STMT_118 \ +#define STMT_APPLY_CHANGES_TO_BASE_NODE 119 +#define STMT_119_INFO {"STMT_APPLY_CHANGES_TO_BASE_NODE", NULL} +#define STMT_119 \ "INSERT OR REPLACE INTO nodes ( " \ " wc_id, local_relpath, op_depth, parent_relpath, repos_id, repos_path, " \ " revision, presence, depth, kind, changed_revision, changed_date, " \ @@ -1193,18 +1200,18 @@ " AND op_depth = 0)) " \ "" -#define STMT_INSTALL_WORKING_NODE_FOR_DELETE 119 -#define STMT_119_INFO {"STMT_INSTALL_WORKING_NODE_FOR_DELETE", NULL} -#define STMT_119 \ +#define STMT_INSTALL_WORKING_NODE_FOR_DELETE 120 +#define STMT_120_INFO {"STMT_INSTALL_WORKING_NODE_FOR_DELETE", NULL} +#define STMT_120 \ "INSERT OR REPLACE INTO nodes ( " \ " wc_id, local_relpath, op_depth, " \ " parent_relpath, presence, kind) " \ "VALUES(?1, ?2, ?3, ?4, 'base-deleted', ?5) " \ "" -#define STMT_DELETE_NO_LOWER_LAYER 120 -#define STMT_120_INFO {"STMT_DELETE_NO_LOWER_LAYER", NULL} -#define STMT_120 \ +#define STMT_DELETE_NO_LOWER_LAYER 121 +#define STMT_121_INFO {"STMT_DELETE_NO_LOWER_LAYER", NULL} +#define STMT_121 \ "DELETE FROM nodes " \ " WHERE wc_id = ?1 " \ " AND (local_relpath = ?2 OR (((local_relpath) > (CASE (?2) WHEN '' THEN '' ELSE (?2) || '/' END)) AND ((local_relpath) < CASE (?2) WHEN '' THEN X'FFFF' ELSE (?2) || '0' END))) " \ @@ -1216,9 +1223,9 @@ " AND n.presence IN ('normal', 'incomplete')) " \ "" -#define STMT_REPLACE_WITH_BASE_DELETED 121 -#define STMT_121_INFO {"STMT_REPLACE_WITH_BASE_DELETED", NULL} -#define STMT_121 \ +#define STMT_REPLACE_WITH_BASE_DELETED 122 +#define STMT_122_INFO {"STMT_REPLACE_WITH_BASE_DELETED", NULL} +#define STMT_122 \ "INSERT OR REPLACE INTO nodes (wc_id, local_relpath, op_depth, parent_relpath, " \ " kind, moved_to, presence) " \ "SELECT wc_id, local_relpath, op_depth, parent_relpath, " \ @@ -1229,9 +1236,9 @@ " AND op_depth = ?3 " \ "" -#define STMT_INSERT_DELETE_FROM_NODE_RECURSIVE 122 -#define STMT_122_INFO {"STMT_INSERT_DELETE_FROM_NODE_RECURSIVE", NULL} -#define STMT_122 \ +#define STMT_INSERT_DELETE_FROM_NODE_RECURSIVE 123 +#define STMT_123_INFO {"STMT_INSERT_DELETE_FROM_NODE_RECURSIVE", NULL} +#define STMT_123 \ "INSERT INTO nodes ( " \ " wc_id, local_relpath, op_depth, parent_relpath, presence, kind) " \ "SELECT wc_id, local_relpath, ?4 , parent_relpath, 'base-deleted', " \ @@ -1245,9 +1252,9 @@ " AND file_external IS NULL " \ "" -#define STMT_INSERT_WORKING_NODE_FROM_BASE_COPY 123 -#define STMT_123_INFO {"STMT_INSERT_WORKING_NODE_FROM_BASE_COPY", NULL} -#define STMT_123 \ +#define STMT_INSERT_WORKING_NODE_FROM_BASE_COPY 124 +#define STMT_124_INFO {"STMT_INSERT_WORKING_NODE_FROM_BASE_COPY", NULL} +#define STMT_124 \ "INSERT INTO nodes ( " \ " wc_id, local_relpath, op_depth, parent_relpath, repos_id, repos_path, " \ " revision, presence, depth, kind, changed_revision, changed_date, " \ @@ -1261,9 +1268,9 @@ "WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = 0 " \ "" -#define STMT_INSERT_DELETE_FROM_BASE 124 -#define STMT_124_INFO {"STMT_INSERT_DELETE_FROM_BASE", NULL} -#define STMT_124 \ +#define STMT_INSERT_DELETE_FROM_BASE 125 +#define STMT_125_INFO {"STMT_INSERT_DELETE_FROM_BASE", NULL} +#define STMT_125 \ "INSERT INTO nodes ( " \ " wc_id, local_relpath, op_depth, parent_relpath, presence, kind) " \ "SELECT wc_id, local_relpath, ?3 , parent_relpath, " \ @@ -1272,34 +1279,34 @@ "WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = 0 " \ "" -#define STMT_UPDATE_OP_DEPTH_INCREASE_RECURSIVE 125 -#define STMT_125_INFO {"STMT_UPDATE_OP_DEPTH_INCREASE_RECURSIVE", NULL} -#define STMT_125 \ +#define STMT_UPDATE_OP_DEPTH_INCREASE_RECURSIVE 126 +#define STMT_126_INFO {"STMT_UPDATE_OP_DEPTH_INCREASE_RECURSIVE", NULL} +#define STMT_126 \ "UPDATE nodes SET op_depth = ?3 + 1 " \ "WHERE wc_id = ?1 " \ " AND (((local_relpath) > (CASE (?2) WHEN '' THEN '' ELSE (?2) || '/' END)) AND ((local_relpath) < CASE (?2) WHEN '' THEN X'FFFF' ELSE (?2) || '0' END)) " \ " AND op_depth = ?3 " \ "" -#define STMT_UPDATE_OP_DEPTH_RECURSIVE 126 -#define STMT_126_INFO {"STMT_UPDATE_OP_DEPTH_RECURSIVE", NULL} -#define STMT_126 \ +#define STMT_UPDATE_OP_DEPTH_RECURSIVE 127 +#define STMT_127_INFO {"STMT_UPDATE_OP_DEPTH_RECURSIVE", NULL} +#define STMT_127 \ "UPDATE nodes SET op_depth = ?4, moved_here = NULL " \ "WHERE wc_id = ?1 " \ " AND (local_relpath = ?2 OR (((local_relpath) > (CASE (?2) WHEN '' THEN '' ELSE (?2) || '/' END)) AND ((local_relpath) < CASE (?2) WHEN '' THEN X'FFFF' ELSE (?2) || '0' END))) " \ " AND op_depth = ?3 " \ "" -#define STMT_DOES_NODE_EXIST 127 -#define STMT_127_INFO {"STMT_DOES_NODE_EXIST", NULL} -#define STMT_127 \ +#define STMT_DOES_NODE_EXIST 128 +#define STMT_128_INFO {"STMT_DOES_NODE_EXIST", NULL} +#define STMT_128 \ "SELECT 1 FROM nodes WHERE wc_id = ?1 AND local_relpath = ?2 " \ "LIMIT 1 " \ "" -#define STMT_HAS_SERVER_EXCLUDED_DESCENDANTS 128 -#define STMT_128_INFO {"STMT_HAS_SERVER_EXCLUDED_DESCENDANTS", NULL} -#define STMT_128 \ +#define STMT_HAS_SERVER_EXCLUDED_DESCENDANTS 129 +#define STMT_129_INFO {"STMT_HAS_SERVER_EXCLUDED_DESCENDANTS", NULL} +#define STMT_129 \ "SELECT local_relpath FROM nodes " \ "WHERE wc_id = ?1 " \ " AND (((local_relpath) > (CASE (?2) WHEN '' THEN '' ELSE (?2) || '/' END)) AND ((local_relpath) < CASE (?2) WHEN '' THEN X'FFFF' ELSE (?2) || '0' END)) " \ @@ -1307,9 +1314,9 @@ "LIMIT 1 " \ "" -#define STMT_SELECT_ALL_EXCLUDED_DESCENDANTS 129 -#define STMT_129_INFO {"STMT_SELECT_ALL_EXCLUDED_DESCENDANTS", NULL} -#define STMT_129 \ +#define STMT_SELECT_ALL_EXCLUDED_DESCENDANTS 130 +#define STMT_130_INFO {"STMT_SELECT_ALL_EXCLUDED_DESCENDANTS", NULL} +#define STMT_130 \ "SELECT local_relpath FROM nodes " \ "WHERE wc_id = ?1 " \ " AND (((local_relpath) > (CASE (?2) WHEN '' THEN '' ELSE (?2) || '/' END)) AND ((local_relpath) < CASE (?2) WHEN '' THEN X'FFFF' ELSE (?2) || '0' END)) " \ @@ -1317,9 +1324,9 @@ " AND (presence = 'server-excluded' OR presence = 'excluded') " \ "" -#define STMT_INSERT_WORKING_NODE_COPY_FROM 130 -#define STMT_130_INFO {"STMT_INSERT_WORKING_NODE_COPY_FROM", NULL} -#define STMT_130 \ +#define STMT_INSERT_WORKING_NODE_COPY_FROM 131 +#define STMT_131_INFO {"STMT_INSERT_WORKING_NODE_COPY_FROM", NULL} +#define STMT_131 \ "INSERT OR REPLACE INTO nodes ( " \ " wc_id, local_relpath, op_depth, parent_relpath, repos_id, " \ " repos_path, revision, presence, depth, moved_here, kind, changed_revision, " \ @@ -1338,9 +1345,9 @@ "WHERE wc_id = ?1 AND local_relpath = ?2 " \ "" -#define STMT_INSERT_WORKING_NODE_COPY_FROM_DEPTH 131 -#define STMT_131_INFO {"STMT_INSERT_WORKING_NODE_COPY_FROM_DEPTH", NULL} -#define STMT_131 \ +#define STMT_INSERT_WORKING_NODE_COPY_FROM_DEPTH 132 +#define STMT_132_INFO {"STMT_INSERT_WORKING_NODE_COPY_FROM_DEPTH", NULL} +#define STMT_132 \ "INSERT OR REPLACE INTO nodes ( " \ " wc_id, local_relpath, op_depth, parent_relpath, repos_id, " \ " repos_path, revision, presence, depth, moved_here, kind, changed_revision, " \ @@ -1359,49 +1366,49 @@ "WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = ?7 " \ "" -#define STMT_UPDATE_BASE_REVISION 132 -#define STMT_132_INFO {"STMT_UPDATE_BASE_REVISION", NULL} -#define STMT_132 \ +#define STMT_UPDATE_BASE_REVISION 133 +#define STMT_133_INFO {"STMT_UPDATE_BASE_REVISION", NULL} +#define STMT_133 \ "UPDATE nodes SET revision = ?3 " \ "WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = 0 " \ "" -#define STMT_UPDATE_BASE_REPOS 133 -#define STMT_133_INFO {"STMT_UPDATE_BASE_REPOS", NULL} -#define STMT_133 \ +#define STMT_UPDATE_BASE_REPOS 134 +#define STMT_134_INFO {"STMT_UPDATE_BASE_REPOS", NULL} +#define STMT_134 \ "UPDATE nodes SET repos_id = ?3, repos_path = ?4 " \ "WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = 0 " \ "" -#define STMT_ACTUAL_HAS_CHILDREN 134 -#define STMT_134_INFO {"STMT_ACTUAL_HAS_CHILDREN", NULL} -#define STMT_134 \ +#define STMT_ACTUAL_HAS_CHILDREN 135 +#define STMT_135_INFO {"STMT_ACTUAL_HAS_CHILDREN", NULL} +#define STMT_135 \ "SELECT 1 FROM actual_node " \ "WHERE wc_id = ?1 AND parent_relpath = ?2 " \ "LIMIT 1 " \ "" -#define STMT_INSERT_EXTERNAL 135 -#define STMT_135_INFO {"STMT_INSERT_EXTERNAL", NULL} -#define STMT_135 \ +#define STMT_INSERT_EXTERNAL 136 +#define STMT_136_INFO {"STMT_INSERT_EXTERNAL", NULL} +#define STMT_136 \ "INSERT OR REPLACE INTO externals ( " \ " wc_id, local_relpath, parent_relpath, presence, kind, def_local_relpath, " \ " repos_id, def_repos_relpath, def_operational_revision, def_revision) " \ "VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9, ?10) " \ "" -#define STMT_SELECT_EXTERNAL_INFO 136 -#define STMT_136_INFO {"STMT_SELECT_EXTERNAL_INFO", NULL} -#define STMT_136 \ +#define STMT_SELECT_EXTERNAL_INFO 137 +#define STMT_137_INFO {"STMT_SELECT_EXTERNAL_INFO", NULL} +#define STMT_137 \ "SELECT presence, kind, def_local_relpath, repos_id, " \ " def_repos_relpath, def_operational_revision, def_revision " \ "FROM externals WHERE wc_id = ?1 AND local_relpath = ?2 " \ "LIMIT 1 " \ "" -#define STMT_DELETE_FILE_EXTERNALS 137 -#define STMT_137_INFO {"STMT_DELETE_FILE_EXTERNALS", NULL} -#define STMT_137 \ +#define STMT_DELETE_FILE_EXTERNALS 138 +#define STMT_138_INFO {"STMT_DELETE_FILE_EXTERNALS", NULL} +#define STMT_138 \ "DELETE FROM nodes " \ "WHERE wc_id = ?1 " \ " AND (((local_relpath) > (CASE (?2) WHEN '' THEN '' ELSE (?2) || '/' END)) AND ((local_relpath) < CASE (?2) WHEN '' THEN X'FFFF' ELSE (?2) || '0' END)) " \ @@ -1409,26 +1416,26 @@ " AND file_external IS NOT NULL " \ "" -#define STMT_DELETE_FILE_EXTERNAL_REGISTATIONS 138 -#define STMT_138_INFO {"STMT_DELETE_FILE_EXTERNAL_REGISTATIONS", NULL} -#define STMT_138 \ +#define STMT_DELETE_FILE_EXTERNAL_REGISTATIONS 139 +#define STMT_139_INFO {"STMT_DELETE_FILE_EXTERNAL_REGISTATIONS", NULL} +#define STMT_139 \ "DELETE FROM externals " \ "WHERE wc_id = ?1 " \ " AND (((local_relpath) > (CASE (?2) WHEN '' THEN '' ELSE (?2) || '/' END)) AND ((local_relpath) < CASE (?2) WHEN '' THEN X'FFFF' ELSE (?2) || '0' END)) " \ " AND kind != 'dir' " \ "" -#define STMT_DELETE_EXTERNAL_REGISTATIONS 139 -#define STMT_139_INFO {"STMT_DELETE_EXTERNAL_REGISTATIONS", NULL} -#define STMT_139 \ +#define STMT_DELETE_EXTERNAL_REGISTATIONS 140 +#define STMT_140_INFO {"STMT_DELETE_EXTERNAL_REGISTATIONS", NULL} +#define STMT_140 \ "DELETE FROM externals " \ "WHERE wc_id = ?1 " \ " AND (((local_relpath) > (CASE (?2) WHEN '' THEN '' ELSE (?2) || '/' END)) AND ((local_relpath) < CASE (?2) WHEN '' THEN X'FFFF' ELSE (?2) || '0' END)) " \ "" -#define STMT_SELECT_COMMITTABLE_EXTERNALS_BELOW 140 -#define STMT_140_INFO {"STMT_SELECT_COMMITTABLE_EXTERNALS_BELOW", NULL} -#define STMT_140 \ +#define STMT_SELECT_COMMITTABLE_EXTERNALS_BELOW 141 +#define STMT_141_INFO {"STMT_SELECT_COMMITTABLE_EXTERNALS_BELOW", NULL} +#define STMT_141 \ "SELECT local_relpath, kind, def_repos_relpath, " \ " (SELECT root FROM repository AS r WHERE r.id = e.repos_id) " \ "FROM externals e " \ @@ -1446,9 +1453,9 @@ " AND nodes.local_relpath = e.parent_relpath)) " \ "" -#define STMT_SELECT_COMMITTABLE_EXTERNALS_IMMEDIATELY_BELOW 141 -#define STMT_141_INFO {"STMT_SELECT_COMMITTABLE_EXTERNALS_IMMEDIATELY_BELOW", NULL} -#define STMT_141 \ +#define STMT_SELECT_COMMITTABLE_EXTERNALS_IMMEDIATELY_BELOW 142 +#define STMT_142_INFO {"STMT_SELECT_COMMITTABLE_EXTERNALS_IMMEDIATELY_BELOW", NULL} +#define STMT_142 \ "SELECT local_relpath, kind, def_repos_relpath, " \ " (SELECT root FROM repository AS r WHERE r.id = e.repos_id) " \ "FROM externals e " \ @@ -1467,25 +1474,25 @@ " AND nodes.local_relpath = e.parent_relpath)) " \ "" -#define STMT_SELECT_EXTERNALS_DEFINED 142 -#define STMT_142_INFO {"STMT_SELECT_EXTERNALS_DEFINED", NULL} -#define STMT_142 \ +#define STMT_SELECT_EXTERNALS_DEFINED 143 +#define STMT_143_INFO {"STMT_SELECT_EXTERNALS_DEFINED", NULL} +#define STMT_143 \ "SELECT local_relpath, def_local_relpath " \ "FROM externals " \ "WHERE (wc_id = ?1 AND def_local_relpath = ?2) " \ " OR (wc_id = ?1 AND (((def_local_relpath) > (CASE (?2) WHEN '' THEN '' ELSE (?2) || '/' END)) AND ((def_local_relpath) < CASE (?2) WHEN '' THEN X'FFFF' ELSE (?2) || '0' END))) " \ "" -#define STMT_DELETE_EXTERNAL 143 -#define STMT_143_INFO {"STMT_DELETE_EXTERNAL", NULL} -#define STMT_143 \ +#define STMT_DELETE_EXTERNAL 144 +#define STMT_144_INFO {"STMT_DELETE_EXTERNAL", NULL} +#define STMT_144 \ "DELETE FROM externals " \ "WHERE wc_id = ?1 AND local_relpath = ?2 " \ "" -#define STMT_SELECT_EXTERNAL_PROPERTIES 144 -#define STMT_144_INFO {"STMT_SELECT_EXTERNAL_PROPERTIES", NULL} -#define STMT_144 \ +#define STMT_SELECT_EXTERNAL_PROPERTIES 145 +#define STMT_145_INFO {"STMT_SELECT_EXTERNAL_PROPERTIES", NULL} +#define STMT_145 \ "SELECT IFNULL((SELECT properties FROM actual_node a " \ " WHERE a.wc_id = ?1 AND A.local_relpath = n.local_relpath), " \ " properties), " \ @@ -1503,9 +1510,9 @@ " AND kind = 'dir' AND presence IN ('normal', 'incomplete') " \ "" -#define STMT_SELECT_CURRENT_PROPS_RECURSIVE 145 -#define STMT_145_INFO {"STMT_SELECT_CURRENT_PROPS_RECURSIVE", NULL} -#define STMT_145 \ +#define STMT_SELECT_CURRENT_PROPS_RECURSIVE 146 +#define STMT_146_INFO {"STMT_SELECT_CURRENT_PROPS_RECURSIVE", NULL} +#define STMT_146 \ "SELECT IFNULL((SELECT properties FROM actual_node a " \ " WHERE a.wc_id = ?1 AND A.local_relpath = n.local_relpath), " \ " properties), " \ @@ -1515,57 +1522,57 @@ " OR (wc_id = ?1 AND (((local_relpath) > (CASE (?2) WHEN '' THEN '' ELSE (?2) || '/' END)) AND ((local_relpath) < CASE (?2) WHEN '' THEN X'FFFF' ELSE (?2) || '0' END))) " \ "" -#define STMT_PRAGMA_LOCKING_MODE 146 -#define STMT_146_INFO {"STMT_PRAGMA_LOCKING_MODE", NULL} -#define STMT_146 \ +#define STMT_PRAGMA_LOCKING_MODE 147 +#define STMT_147_INFO {"STMT_PRAGMA_LOCKING_MODE", NULL} +#define STMT_147 \ "PRAGMA locking_mode = exclusive " \ "" -#define STMT_INSERT_ACTUAL_NODE 147 -#define STMT_147_INFO {"STMT_INSERT_ACTUAL_NODE", NULL} -#define STMT_147 \ +#define STMT_INSERT_ACTUAL_NODE 148 +#define STMT_148_INFO {"STMT_INSERT_ACTUAL_NODE", NULL} +#define STMT_148 \ "INSERT OR REPLACE INTO actual_node ( " \ " wc_id, local_relpath, parent_relpath, properties, changelist, conflict_data) " \ "VALUES (?1, ?2, ?3, ?4, ?5, ?6) " \ "" -#define STMT_UPDATE_ACTUAL_CONFLICT_DATA 148 -#define STMT_148_INFO {"STMT_UPDATE_ACTUAL_CONFLICT_DATA", NULL} -#define STMT_148 \ +#define STMT_UPDATE_ACTUAL_CONFLICT_DATA 149 +#define STMT_149_INFO {"STMT_UPDATE_ACTUAL_CONFLICT_DATA", NULL} +#define STMT_149 \ "UPDATE actual_node SET conflict_data = ?3 " \ "WHERE wc_id = ?1 AND local_relpath = ?2 " \ "" -#define STMT_INSERT_ACTUAL_CONFLICT_DATA 149 -#define STMT_149_INFO {"STMT_INSERT_ACTUAL_CONFLICT_DATA", NULL} -#define STMT_149 \ +#define STMT_INSERT_ACTUAL_CONFLICT_DATA 150 +#define STMT_150_INFO {"STMT_INSERT_ACTUAL_CONFLICT_DATA", NULL} +#define STMT_150 \ "INSERT INTO actual_node (wc_id, local_relpath, conflict_data, parent_relpath) " \ "VALUES (?1, ?2, ?3, ?4) " \ "" -#define STMT_SELECT_ALL_FILES 150 -#define STMT_150_INFO {"STMT_SELECT_ALL_FILES", NULL} -#define STMT_150 \ +#define STMT_SELECT_ALL_FILES 151 +#define STMT_151_INFO {"STMT_SELECT_ALL_FILES", NULL} +#define STMT_151 \ "SELECT local_relpath FROM nodes_current " \ "WHERE wc_id = ?1 AND parent_relpath = ?2 AND kind = 'file' " \ "" -#define STMT_UPDATE_NODE_PROPS 151 -#define STMT_151_INFO {"STMT_UPDATE_NODE_PROPS", NULL} -#define STMT_151 \ +#define STMT_UPDATE_NODE_PROPS 152 +#define STMT_152_INFO {"STMT_UPDATE_NODE_PROPS", NULL} +#define STMT_152 \ "UPDATE nodes SET properties = ?4 " \ "WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = ?3 " \ "" -#define STMT_PRAGMA_TABLE_INFO_NODES 152 -#define STMT_152_INFO {"STMT_PRAGMA_TABLE_INFO_NODES", NULL} -#define STMT_152 \ +#define STMT_PRAGMA_TABLE_INFO_NODES 153 +#define STMT_153_INFO {"STMT_PRAGMA_TABLE_INFO_NODES", NULL} +#define STMT_153 \ "PRAGMA table_info(\"NODES\") " \ "" -#define STMT_CREATE_TARGET_PROP_CACHE 153 -#define STMT_153_INFO {"STMT_CREATE_TARGET_PROP_CACHE", NULL} -#define STMT_153 \ +#define STMT_CREATE_TARGET_PROP_CACHE 154 +#define STMT_154_INFO {"STMT_CREATE_TARGET_PROP_CACHE", NULL} +#define STMT_154 \ "DROP TABLE IF EXISTS target_prop_cache; " \ "CREATE TEMPORARY TABLE target_prop_cache ( " \ " local_relpath TEXT NOT NULL PRIMARY KEY, " \ @@ -1574,9 +1581,9 @@ "); " \ "" -#define STMT_CACHE_TARGET_PROPS 154 -#define STMT_154_INFO {"STMT_CACHE_TARGET_PROPS", NULL} -#define STMT_154 \ +#define STMT_CACHE_TARGET_PROPS 155 +#define STMT_155_INFO {"STMT_CACHE_TARGET_PROPS", NULL} +#define STMT_155 \ "INSERT INTO target_prop_cache(local_relpath, kind, properties) " \ " SELECT n.local_relpath, n.kind, " \ " IFNULL((SELECT properties FROM actual_node AS a " \ @@ -1595,9 +1602,9 @@ " ORDER BY t.local_relpath " \ "" -#define STMT_CACHE_TARGET_PRISTINE_PROPS 155 -#define STMT_155_INFO {"STMT_CACHE_TARGET_PRISTINE_PROPS", NULL} -#define STMT_155 \ +#define STMT_CACHE_TARGET_PRISTINE_PROPS 156 +#define STMT_156_INFO {"STMT_CACHE_TARGET_PRISTINE_PROPS", NULL} +#define STMT_156 \ "INSERT INTO target_prop_cache(local_relpath, kind, properties) " \ " SELECT n.local_relpath, n.kind, " \ " CASE n.presence " \ @@ -1622,22 +1629,22 @@ " ORDER BY t.local_relpath " \ "" -#define STMT_SELECT_ALL_TARGET_PROP_CACHE 156 -#define STMT_156_INFO {"STMT_SELECT_ALL_TARGET_PROP_CACHE", NULL} -#define STMT_156 \ +#define STMT_SELECT_ALL_TARGET_PROP_CACHE 157 +#define STMT_157_INFO {"STMT_SELECT_ALL_TARGET_PROP_CACHE", NULL} +#define STMT_157 \ "SELECT local_relpath, properties FROM target_prop_cache " \ "ORDER BY local_relpath " \ "" -#define STMT_DROP_TARGET_PROP_CACHE 157 -#define STMT_157_INFO {"STMT_DROP_TARGET_PROP_CACHE", NULL} -#define STMT_157 \ +#define STMT_DROP_TARGET_PROP_CACHE 158 +#define STMT_158_INFO {"STMT_DROP_TARGET_PROP_CACHE", NULL} +#define STMT_158 \ "DROP TABLE target_prop_cache; " \ "" -#define STMT_CREATE_REVERT_LIST 158 -#define STMT_158_INFO {"STMT_CREATE_REVERT_LIST", NULL} -#define STMT_158 \ +#define STMT_CREATE_REVERT_LIST 159 +#define STMT_159_INFO {"STMT_CREATE_REVERT_LIST", NULL} +#define STMT_159 \ "DROP TABLE IF EXISTS revert_list; " \ "CREATE TEMPORARY TABLE revert_list ( " \ " local_relpath TEXT NOT NULL, " \ @@ -1693,26 +1700,26 @@ "END " \ "" -#define STMT_DROP_REVERT_LIST_TRIGGERS 159 -#define STMT_159_INFO {"STMT_DROP_REVERT_LIST_TRIGGERS", NULL} -#define STMT_159 \ +#define STMT_DROP_REVERT_LIST_TRIGGERS 160 +#define STMT_160_INFO {"STMT_DROP_REVERT_LIST_TRIGGERS", NULL} +#define STMT_160 \ "DROP TRIGGER trigger_revert_list_nodes; " \ "DROP TRIGGER trigger_revert_list_actual_delete; " \ "DROP TRIGGER trigger_revert_list_actual_update " \ "" -#define STMT_SELECT_REVERT_LIST 160 -#define STMT_160_INFO {"STMT_SELECT_REVERT_LIST", NULL} -#define STMT_160 \ +#define STMT_SELECT_REVERT_LIST 161 +#define STMT_161_INFO {"STMT_SELECT_REVERT_LIST", NULL} +#define STMT_161 \ "SELECT actual, notify, kind, op_depth, repos_id, conflict_data " \ "FROM revert_list " \ "WHERE local_relpath = ?1 " \ "ORDER BY actual DESC " \ "" -#define STMT_SELECT_REVERT_LIST_COPIED_CHILDREN 161 -#define STMT_161_INFO {"STMT_SELECT_REVERT_LIST_COPIED_CHILDREN", NULL} -#define STMT_161 \ +#define STMT_SELECT_REVERT_LIST_COPIED_CHILDREN 162 +#define STMT_162_INFO {"STMT_SELECT_REVERT_LIST_COPIED_CHILDREN", NULL} +#define STMT_162 \ "SELECT local_relpath, kind " \ "FROM revert_list " \ "WHERE (((local_relpath) > (CASE (?1) WHEN '' THEN '' ELSE (?1) || '/' END)) AND ((local_relpath) < CASE (?1) WHEN '' THEN X'FFFF' ELSE (?1) || '0' END)) " \ @@ -1721,15 +1728,15 @@ "ORDER BY local_relpath " \ "" -#define STMT_DELETE_REVERT_LIST 162 -#define STMT_162_INFO {"STMT_DELETE_REVERT_LIST", NULL} -#define STMT_162 \ +#define STMT_DELETE_REVERT_LIST 163 +#define STMT_163_INFO {"STMT_DELETE_REVERT_LIST", NULL} +#define STMT_163 \ "DELETE FROM revert_list WHERE local_relpath = ?1 " \ "" -#define STMT_SELECT_REVERT_LIST_RECURSIVE 163 -#define STMT_163_INFO {"STMT_SELECT_REVERT_LIST_RECURSIVE", NULL} -#define STMT_163 \ +#define STMT_SELECT_REVERT_LIST_RECURSIVE 164 +#define STMT_164_INFO {"STMT_SELECT_REVERT_LIST_RECURSIVE", NULL} +#define STMT_164 \ "SELECT DISTINCT local_relpath " \ "FROM revert_list " \ "WHERE (local_relpath = ?1 " \ @@ -1738,32 +1745,32 @@ "ORDER BY local_relpath " \ "" -#define STMT_DELETE_REVERT_LIST_RECURSIVE 164 -#define STMT_164_INFO {"STMT_DELETE_REVERT_LIST_RECURSIVE", NULL} -#define STMT_164 \ +#define STMT_DELETE_REVERT_LIST_RECURSIVE 165 +#define STMT_165_INFO {"STMT_DELETE_REVERT_LIST_RECURSIVE", NULL} +#define STMT_165 \ "DELETE FROM revert_list " \ "WHERE (local_relpath = ?1 " \ " OR (((local_relpath) > (CASE (?1) WHEN '' THEN '' ELSE (?1) || '/' END)) AND ((local_relpath) < CASE (?1) WHEN '' THEN X'FFFF' ELSE (?1) || '0' END))) " \ "" -#define STMT_DROP_REVERT_LIST 165 -#define STMT_165_INFO {"STMT_DROP_REVERT_LIST", NULL} -#define STMT_165 \ +#define STMT_DROP_REVERT_LIST 166 +#define STMT_166_INFO {"STMT_DROP_REVERT_LIST", NULL} +#define STMT_166 \ "DROP TABLE IF EXISTS revert_list " \ "" -#define STMT_CREATE_DELETE_LIST 166 -#define STMT_166_INFO {"STMT_CREATE_DELETE_LIST", NULL} -#define STMT_166 \ +#define STMT_CREATE_DELETE_LIST 167 +#define STMT_167_INFO {"STMT_CREATE_DELETE_LIST", NULL} +#define STMT_167 \ "DROP TABLE IF EXISTS delete_list; " \ "CREATE TEMPORARY TABLE delete_list ( " \ " local_relpath TEXT PRIMARY KEY NOT NULL UNIQUE " \ " ) " \ "" -#define STMT_INSERT_DELETE_LIST 167 -#define STMT_167_INFO {"STMT_INSERT_DELETE_LIST", NULL} -#define STMT_167 \ +#define STMT_INSERT_DELETE_LIST 168 +#define STMT_168_INFO {"STMT_INSERT_DELETE_LIST", NULL} +#define STMT_168 \ "INSERT INTO delete_list(local_relpath) " \ "SELECT local_relpath FROM nodes AS n " \ "WHERE wc_id = ?1 " \ @@ -1777,22 +1784,22 @@ " AND file_external IS NULL " \ "" -#define STMT_SELECT_DELETE_LIST 168 -#define STMT_168_INFO {"STMT_SELECT_DELETE_LIST", NULL} -#define STMT_168 \ +#define STMT_SELECT_DELETE_LIST 169 +#define STMT_169_INFO {"STMT_SELECT_DELETE_LIST", NULL} +#define STMT_169 \ "SELECT local_relpath FROM delete_list " \ "ORDER BY local_relpath " \ "" -#define STMT_FINALIZE_DELETE 169 -#define STMT_169_INFO {"STMT_FINALIZE_DELETE", NULL} -#define STMT_169 \ +#define STMT_FINALIZE_DELETE 170 +#define STMT_170_INFO {"STMT_FINALIZE_DELETE", NULL} +#define STMT_170 \ "DROP TABLE IF EXISTS delete_list " \ "" -#define STMT_CREATE_UPDATE_MOVE_LIST 170 -#define STMT_170_INFO {"STMT_CREATE_UPDATE_MOVE_LIST", NULL} -#define STMT_170 \ +#define STMT_CREATE_UPDATE_MOVE_LIST 171 +#define STMT_171_INFO {"STMT_CREATE_UPDATE_MOVE_LIST", NULL} +#define STMT_171 \ "DROP TABLE IF EXISTS update_move_list; " \ "CREATE TEMPORARY TABLE update_move_list ( " \ " local_relpath TEXT PRIMARY KEY NOT NULL UNIQUE, " \ @@ -1803,31 +1810,31 @@ " ) " \ "" -#define STMT_INSERT_UPDATE_MOVE_LIST 171 -#define STMT_171_INFO {"STMT_INSERT_UPDATE_MOVE_LIST", NULL} -#define STMT_171 \ +#define STMT_INSERT_UPDATE_MOVE_LIST 172 +#define STMT_172_INFO {"STMT_INSERT_UPDATE_MOVE_LIST", NULL} +#define STMT_172 \ "INSERT INTO update_move_list(local_relpath, action, kind, content_state, " \ " prop_state) " \ "VALUES (?1, ?2, ?3, ?4, ?5) " \ "" -#define STMT_SELECT_UPDATE_MOVE_LIST 172 -#define STMT_172_INFO {"STMT_SELECT_UPDATE_MOVE_LIST", NULL} -#define STMT_172 \ +#define STMT_SELECT_UPDATE_MOVE_LIST 173 +#define STMT_173_INFO {"STMT_SELECT_UPDATE_MOVE_LIST", NULL} +#define STMT_173 \ "SELECT local_relpath, action, kind, content_state, prop_state " \ "FROM update_move_list " \ "ORDER BY local_relpath " \ "" -#define STMT_FINALIZE_UPDATE_MOVE 173 -#define STMT_173_INFO {"STMT_FINALIZE_UPDATE_MOVE", NULL} -#define STMT_173 \ +#define STMT_FINALIZE_UPDATE_MOVE 174 +#define STMT_174_INFO {"STMT_FINALIZE_UPDATE_MOVE", NULL} +#define STMT_174 \ "DROP TABLE IF EXISTS update_move_list " \ "" -#define STMT_SELECT_MIN_MAX_REVISIONS 174 -#define STMT_174_INFO {"STMT_SELECT_MIN_MAX_REVISIONS", NULL} -#define STMT_174 \ +#define STMT_SELECT_MIN_MAX_REVISIONS 175 +#define STMT_175_INFO {"STMT_SELECT_MIN_MAX_REVISIONS", NULL} +#define STMT_175 \ "SELECT MIN(revision), MAX(revision), " \ " MIN(changed_revision), MAX(changed_revision) FROM nodes " \ " WHERE wc_id = ?1 " \ @@ -1838,9 +1845,9 @@ " AND op_depth = 0 " \ "" -#define STMT_HAS_SPARSE_NODES 175 -#define STMT_175_INFO {"STMT_HAS_SPARSE_NODES", NULL} -#define STMT_175 \ +#define STMT_HAS_SPARSE_NODES 176 +#define STMT_176_INFO {"STMT_HAS_SPARSE_NODES", NULL} +#define STMT_176 \ "SELECT 1 FROM nodes " \ "WHERE wc_id = ?1 " \ " AND (local_relpath = ?2 " \ @@ -1852,9 +1859,9 @@ "LIMIT 1 " \ "" -#define STMT_SUBTREE_HAS_TREE_MODIFICATIONS 176 -#define STMT_176_INFO {"STMT_SUBTREE_HAS_TREE_MODIFICATIONS", NULL} -#define STMT_176 \ +#define STMT_SUBTREE_HAS_TREE_MODIFICATIONS 177 +#define STMT_177_INFO {"STMT_SUBTREE_HAS_TREE_MODIFICATIONS", NULL} +#define STMT_177 \ "SELECT 1 FROM nodes " \ "WHERE wc_id = ?1 " \ " AND (local_relpath = ?2 " \ @@ -1863,9 +1870,9 @@ "LIMIT 1 " \ "" -#define STMT_SUBTREE_HAS_PROP_MODIFICATIONS 177 -#define STMT_177_INFO {"STMT_SUBTREE_HAS_PROP_MODIFICATIONS", NULL} -#define STMT_177 \ +#define STMT_SUBTREE_HAS_PROP_MODIFICATIONS 178 +#define STMT_178_INFO {"STMT_SUBTREE_HAS_PROP_MODIFICATIONS", NULL} +#define STMT_178 \ "SELECT 1 FROM actual_node " \ "WHERE wc_id = ?1 " \ " AND (local_relpath = ?2 " \ @@ -1874,9 +1881,9 @@ "LIMIT 1 " \ "" -#define STMT_HAS_SWITCHED 178 -#define STMT_178_INFO {"STMT_HAS_SWITCHED", NULL} -#define STMT_178 \ +#define STMT_HAS_SWITCHED 179 +#define STMT_179_INFO {"STMT_HAS_SWITCHED", NULL} +#define STMT_179 \ "SELECT 1 " \ "FROM nodes " \ "WHERE wc_id = ?1 " \ @@ -1888,9 +1895,9 @@ "LIMIT 1 " \ "" -#define STMT_SELECT_BASE_FILES_RECURSIVE 179 -#define STMT_179_INFO {"STMT_SELECT_BASE_FILES_RECURSIVE", NULL} -#define STMT_179 \ +#define STMT_SELECT_BASE_FILES_RECURSIVE 180 +#define STMT_180_INFO {"STMT_SELECT_BASE_FILES_RECURSIVE", NULL} +#define STMT_180 \ "SELECT local_relpath, translated_size, last_mod_time FROM nodes AS n " \ "WHERE wc_id = ?1 " \ " AND (local_relpath = ?2 " \ @@ -1901,47 +1908,47 @@ " AND file_external IS NULL " \ "" -#define STMT_SELECT_MOVED_FROM_RELPATH 180 -#define STMT_180_INFO {"STMT_SELECT_MOVED_FROM_RELPATH", NULL} -#define STMT_180 \ +#define STMT_SELECT_MOVED_FROM_RELPATH 181 +#define STMT_181_INFO {"STMT_SELECT_MOVED_FROM_RELPATH", NULL} +#define STMT_181 \ "SELECT local_relpath, op_depth FROM nodes " \ "WHERE wc_id = ?1 AND moved_to = ?2 AND op_depth > 0 " \ "" -#define STMT_UPDATE_MOVED_TO_RELPATH 181 -#define STMT_181_INFO {"STMT_UPDATE_MOVED_TO_RELPATH", NULL} -#define STMT_181 \ +#define STMT_UPDATE_MOVED_TO_RELPATH 182 +#define STMT_182_INFO {"STMT_UPDATE_MOVED_TO_RELPATH", NULL} +#define STMT_182 \ "UPDATE nodes SET moved_to = ?4 " \ "WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = ?3 " \ "" -#define STMT_CLEAR_MOVED_TO_RELPATH 182 -#define STMT_182_INFO {"STMT_CLEAR_MOVED_TO_RELPATH", NULL} -#define STMT_182 \ +#define STMT_CLEAR_MOVED_TO_RELPATH 183 +#define STMT_183_INFO {"STMT_CLEAR_MOVED_TO_RELPATH", NULL} +#define STMT_183 \ "UPDATE nodes SET moved_to = NULL " \ "WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = ?3 " \ "" -#define STMT_CLEAR_MOVED_HERE_RECURSIVE 183 -#define STMT_183_INFO {"STMT_CLEAR_MOVED_HERE_RECURSIVE", NULL} -#define STMT_183 \ +#define STMT_CLEAR_MOVED_HERE_RECURSIVE 184 +#define STMT_184_INFO {"STMT_CLEAR_MOVED_HERE_RECURSIVE", NULL} +#define STMT_184 \ "UPDATE nodes SET moved_here = NULL " \ "WHERE wc_id = ?1 " \ " AND (local_relpath = ?2 OR (((local_relpath) > (CASE (?2) WHEN '' THEN '' ELSE (?2) || '/' END)) AND ((local_relpath) < CASE (?2) WHEN '' THEN X'FFFF' ELSE (?2) || '0' END))) " \ " AND op_depth = ?3 " \ "" -#define STMT_SELECT_MOVED_HERE_CHILDREN 184 -#define STMT_184_INFO {"STMT_SELECT_MOVED_HERE_CHILDREN", NULL} -#define STMT_184 \ +#define STMT_SELECT_MOVED_HERE_CHILDREN 185 +#define STMT_185_INFO {"STMT_SELECT_MOVED_HERE_CHILDREN", NULL} +#define STMT_185 \ "SELECT moved_to, local_relpath FROM nodes " \ "WHERE wc_id = ?1 AND op_depth > 0 " \ " AND (((moved_to) > (CASE (?2) WHEN '' THEN '' ELSE (?2) || '/' END)) AND ((moved_to) < CASE (?2) WHEN '' THEN X'FFFF' ELSE (?2) || '0' END)) " \ "" -#define STMT_SELECT_MOVED_FOR_DELETE 185 -#define STMT_185_INFO {"STMT_SELECT_MOVED_FOR_DELETE", NULL} -#define STMT_185 \ +#define STMT_SELECT_MOVED_FOR_DELETE 186 +#define STMT_186_INFO {"STMT_SELECT_MOVED_FOR_DELETE", NULL} +#define STMT_186 \ "SELECT local_relpath, moved_to, op_depth FROM nodes " \ "WHERE wc_id = ?1 " \ " AND (local_relpath = ?2 OR (((local_relpath) > (CASE (?2) WHEN '' THEN '' ELSE (?2) || '/' END)) AND ((local_relpath) < CASE (?2) WHEN '' THEN X'FFFF' ELSE (?2) || '0' END))) " \ @@ -1951,25 +1958,25 @@ " AND o.local_relpath = ?2) " \ "" -#define STMT_UPDATE_MOVED_TO_DESCENDANTS 186 -#define STMT_186_INFO {"STMT_UPDATE_MOVED_TO_DESCENDANTS", NULL} -#define STMT_186 \ +#define STMT_UPDATE_MOVED_TO_DESCENDANTS 187 +#define STMT_187_INFO {"STMT_UPDATE_MOVED_TO_DESCENDANTS", NULL} +#define STMT_187 \ "UPDATE nodes SET moved_to = (CASE WHEN (?2) = '' THEN (CASE WHEN (?3) = '' THEN (moved_to) WHEN (moved_to) = '' THEN (?3) ELSE (?3) || '/' || (moved_to) END) WHEN (?3) = '' THEN (CASE WHEN (?2) = '' THEN (moved_to) WHEN SUBSTR((moved_to), 1, LENGTH(?2)) = (?2) THEN CASE WHEN LENGTH(?2) = LENGTH(moved_to) THEN '' WHEN SUBSTR((moved_to), LENGTH(?2)+1, 1) = '/' THEN SUBSTR((moved_to), LENGTH(?2)+2) END END) WHEN SUBSTR((moved_to), 1, LENGTH(?2)) = (?2) THEN CASE WHEN LENGTH(?2) = LENGTH(moved_to) THEN (?3) WHEN SUBSTR((moved_to), LENGTH(?2)+1, 1) = '/' THEN (?3) || SUBSTR((moved_to), LENGTH(?2)+1) END END) " \ " WHERE wc_id = ?1 " \ " AND (((moved_to) > (CASE (?2) WHEN '' THEN '' ELSE (?2) || '/' END)) AND ((moved_to) < CASE (?2) WHEN '' THEN X'FFFF' ELSE (?2) || '0' END)) " \ "" -#define STMT_CLEAR_MOVED_TO_DESCENDANTS 187 -#define STMT_187_INFO {"STMT_CLEAR_MOVED_TO_DESCENDANTS", NULL} -#define STMT_187 \ +#define STMT_CLEAR_MOVED_TO_DESCENDANTS 188 +#define STMT_188_INFO {"STMT_CLEAR_MOVED_TO_DESCENDANTS", NULL} +#define STMT_188 \ "UPDATE nodes SET moved_to = NULL " \ " WHERE wc_id = ?1 " \ " AND (((moved_to) > (CASE (?2) WHEN '' THEN '' ELSE (?2) || '/' END)) AND ((moved_to) < CASE (?2) WHEN '' THEN X'FFFF' ELSE (?2) || '0' END)) " \ "" -#define STMT_SELECT_MOVED_PAIR2 188 -#define STMT_188_INFO {"STMT_SELECT_MOVED_PAIR2", NULL} -#define STMT_188 \ +#define STMT_SELECT_MOVED_PAIR2 189 +#define STMT_189_INFO {"STMT_SELECT_MOVED_PAIR2", NULL} +#define STMT_189 \ "SELECT local_relpath, moved_to, op_depth FROM nodes " \ "WHERE wc_id = ?1 " \ " AND (local_relpath = ?2 OR (((local_relpath) > (CASE (?2) WHEN '' THEN '' ELSE (?2) || '/' END)) AND ((local_relpath) < CASE (?2) WHEN '' THEN X'FFFF' ELSE (?2) || '0' END))) " \ @@ -1980,9 +1987,9 @@ " AND o.local_relpath = ?2) " \ "" -#define STMT_SELECT_MOVED_PAIR3 189 -#define STMT_189_INFO {"STMT_SELECT_MOVED_PAIR3", NULL} -#define STMT_189 \ +#define STMT_SELECT_MOVED_PAIR3 190 +#define STMT_190_INFO {"STMT_SELECT_MOVED_PAIR3", NULL} +#define STMT_190 \ "SELECT local_relpath, moved_to, op_depth, kind FROM nodes " \ "WHERE wc_id = ?1 " \ " AND (local_relpath = ?2 OR (((local_relpath) > (CASE (?2) WHEN '' THEN '' ELSE (?2) || '/' END)) AND ((local_relpath) < CASE (?2) WHEN '' THEN X'FFFF' ELSE (?2) || '0' END))) " \ @@ -1990,9 +1997,9 @@ " AND moved_to IS NOT NULL " \ "" -#define STMT_SELECT_MOVED_OUTSIDE 190 -#define STMT_190_INFO {"STMT_SELECT_MOVED_OUTSIDE", NULL} -#define STMT_190 \ +#define STMT_SELECT_MOVED_OUTSIDE 191 +#define STMT_191_INFO {"STMT_SELECT_MOVED_OUTSIDE", NULL} +#define STMT_191 \ "SELECT local_relpath, moved_to FROM nodes " \ "WHERE wc_id = ?1 " \ " AND (local_relpath = ?2 OR (((local_relpath) > (CASE (?2) WHEN '' THEN '' ELSE (?2) || '/' END)) AND ((local_relpath) < CASE (?2) WHEN '' THEN X'FFFF' ELSE (?2) || '0' END))) " \ @@ -2001,9 +2008,9 @@ " AND NOT (((moved_to) > (CASE (?2) WHEN '' THEN '' ELSE (?2) || '/' END)) AND ((moved_to) < CASE (?2) WHEN '' THEN X'FFFF' ELSE (?2) || '0' END)) " \ "" -#define STMT_SELECT_OP_DEPTH_MOVED_PAIR 191 -#define STMT_191_INFO {"STMT_SELECT_OP_DEPTH_MOVED_PAIR", NULL} -#define STMT_191 \ +#define STMT_SELECT_OP_DEPTH_MOVED_PAIR 192 +#define STMT_192_INFO {"STMT_SELECT_OP_DEPTH_MOVED_PAIR", NULL} +#define STMT_192 \ "SELECT n.local_relpath, n.moved_to, " \ " (SELECT o.repos_path FROM nodes AS o " \ " WHERE o.wc_id = n.wc_id " \ @@ -2016,9 +2023,9 @@ " AND n.moved_to IS NOT NULL " \ "" -#define STMT_SELECT_MOVED_DESCENDANTS 192 -#define STMT_192_INFO {"STMT_SELECT_MOVED_DESCENDANTS", NULL} -#define STMT_192 \ +#define STMT_SELECT_MOVED_DESCENDANTS 193 +#define STMT_193_INFO {"STMT_SELECT_MOVED_DESCENDANTS", NULL} +#define STMT_193 \ "SELECT n.local_relpath, h.moved_to " \ "FROM nodes n, nodes h " \ "WHERE n.wc_id = ?1 " \ @@ -2034,9 +2041,9 @@ " AND h.moved_to IS NOT NULL " \ "" -#define STMT_COMMIT_UPDATE_ORIGIN 193 -#define STMT_193_INFO {"STMT_COMMIT_UPDATE_ORIGIN", NULL} -#define STMT_193 \ +#define STMT_COMMIT_UPDATE_ORIGIN 194 +#define STMT_194_INFO {"STMT_COMMIT_UPDATE_ORIGIN", NULL} +#define STMT_194 \ "UPDATE nodes SET repos_id = ?4, " \ " repos_path = ?5 || SUBSTR(local_relpath, LENGTH(?2)+1), " \ " revision = ?6 " \ @@ -2046,16 +2053,16 @@ " AND op_depth = ?3 " \ "" -#define STMT_HAS_LAYER_BETWEEN 194 -#define STMT_194_INFO {"STMT_HAS_LAYER_BETWEEN", NULL} -#define STMT_194 \ +#define STMT_HAS_LAYER_BETWEEN 195 +#define STMT_195_INFO {"STMT_HAS_LAYER_BETWEEN", NULL} +#define STMT_195 \ "SELECT 1 FROM NODES " \ "WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth > ?3 AND op_depth < ?4 " \ "" -#define STMT_SELECT_REPOS_PATH_REVISION 195 -#define STMT_195_INFO {"STMT_SELECT_REPOS_PATH_REVISION", NULL} -#define STMT_195 \ +#define STMT_SELECT_REPOS_PATH_REVISION 196 +#define STMT_196_INFO {"STMT_SELECT_REPOS_PATH_REVISION", NULL} +#define STMT_196 \ "SELECT local_relpath, repos_path, revision FROM nodes " \ "WHERE wc_id = ?1 " \ " AND (((local_relpath) > (CASE (?2) WHEN '' THEN '' ELSE (?2) || '/' END)) AND ((local_relpath) < CASE (?2) WHEN '' THEN X'FFFF' ELSE (?2) || '0' END)) " \ @@ -2063,16 +2070,16 @@ "ORDER BY local_relpath " \ "" -#define STMT_SELECT_HAS_NON_FILE_CHILDREN 196 -#define STMT_196_INFO {"STMT_SELECT_HAS_NON_FILE_CHILDREN", NULL} -#define STMT_196 \ +#define STMT_SELECT_HAS_NON_FILE_CHILDREN 197 +#define STMT_197_INFO {"STMT_SELECT_HAS_NON_FILE_CHILDREN", NULL} +#define STMT_197 \ "SELECT 1 FROM nodes " \ "WHERE wc_id = ?1 AND parent_relpath = ?2 AND op_depth = 0 AND kind != 'file' " \ "" -#define STMT_SELECT_HAS_GRANDCHILDREN 197 -#define STMT_197_INFO {"STMT_SELECT_HAS_GRANDCHILDREN", NULL} -#define STMT_197 \ +#define STMT_SELECT_HAS_GRANDCHILDREN 198 +#define STMT_198_INFO {"STMT_SELECT_HAS_GRANDCHILDREN", NULL} +#define STMT_198 \ "SELECT 1 FROM nodes " \ "WHERE wc_id = ?1 " \ " AND (((parent_relpath) > (CASE (?2) WHEN '' THEN '' ELSE (?2) || '/' END)) AND ((parent_relpath) < CASE (?2) WHEN '' THEN X'FFFF' ELSE (?2) || '0' END)) " \ @@ -2080,33 +2087,33 @@ " AND file_external IS NULL " \ "" -#define STMT_SELECT_ALL_NODES 198 -#define STMT_198_INFO {"STMT_SELECT_ALL_NODES", NULL} -#define STMT_198 \ +#define STMT_SELECT_ALL_NODES 199 +#define STMT_199_INFO {"STMT_SELECT_ALL_NODES", NULL} +#define STMT_199 \ "SELECT op_depth, local_relpath, parent_relpath, file_external FROM nodes " \ "WHERE wc_id = ?1 " \ "" -#define STMT_SELECT_IPROPS 199 -#define STMT_199_INFO {"STMT_SELECT_IPROPS", NULL} -#define STMT_199 \ +#define STMT_SELECT_IPROPS 200 +#define STMT_200_INFO {"STMT_SELECT_IPROPS", NULL} +#define STMT_200 \ "SELECT inherited_props FROM nodes " \ "WHERE wc_id = ?1 " \ " AND local_relpath = ?2 " \ " AND op_depth = 0 " \ "" -#define STMT_UPDATE_IPROP 200 -#define STMT_200_INFO {"STMT_UPDATE_IPROP", NULL} -#define STMT_200 \ +#define STMT_UPDATE_IPROP 201 +#define STMT_201_INFO {"STMT_UPDATE_IPROP", NULL} +#define STMT_201 \ "UPDATE nodes " \ "SET inherited_props = ?3 " \ "WHERE (wc_id = ?1 AND local_relpath = ?2 AND op_depth = 0) " \ "" -#define STMT_SELECT_IPROPS_NODE 201 -#define STMT_201_INFO {"STMT_SELECT_IPROPS_NODE", NULL} -#define STMT_201 \ +#define STMT_SELECT_IPROPS_NODE 202 +#define STMT_202_INFO {"STMT_SELECT_IPROPS_NODE", NULL} +#define STMT_202 \ "SELECT local_relpath, repos_path FROM nodes " \ "WHERE wc_id = ?1 " \ " AND local_relpath = ?2 " \ @@ -2114,9 +2121,9 @@ " AND (inherited_props not null) " \ "" -#define STMT_SELECT_IPROPS_RECURSIVE 202 -#define STMT_202_INFO {"STMT_SELECT_IPROPS_RECURSIVE", NULL} -#define STMT_202 \ +#define STMT_SELECT_IPROPS_RECURSIVE 203 +#define STMT_203_INFO {"STMT_SELECT_IPROPS_RECURSIVE", NULL} +#define STMT_203 \ "SELECT local_relpath, repos_path FROM nodes " \ "WHERE wc_id = ?1 " \ " AND (((local_relpath) > (CASE (?2) WHEN '' THEN '' ELSE (?2) || '/' END)) AND ((local_relpath) < CASE (?2) WHEN '' THEN X'FFFF' ELSE (?2) || '0' END)) " \ @@ -2124,9 +2131,9 @@ " AND (inherited_props not null) " \ "" -#define STMT_SELECT_IPROPS_CHILDREN 203 -#define STMT_203_INFO {"STMT_SELECT_IPROPS_CHILDREN", NULL} -#define STMT_203 \ +#define STMT_SELECT_IPROPS_CHILDREN 204 +#define STMT_204_INFO {"STMT_SELECT_IPROPS_CHILDREN", NULL} +#define STMT_204 \ "SELECT local_relpath, repos_path FROM nodes " \ "WHERE wc_id = ?1 " \ " AND parent_relpath = ?2 " \ @@ -2134,9 +2141,9 @@ " AND (inherited_props not null) " \ "" -#define STMT_CREATE_SCHEMA 204 -#define STMT_204_INFO {"STMT_CREATE_SCHEMA", NULL} -#define STMT_204 \ +#define STMT_CREATE_SCHEMA 205 +#define STMT_205_INFO {"STMT_CREATE_SCHEMA", NULL} +#define STMT_205 \ "CREATE TABLE REPOSITORY ( " \ " id INTEGER PRIMARY KEY AUTOINCREMENT, " \ " root TEXT UNIQUE NOT NULL, " \ @@ -2201,9 +2208,9 @@ "; " \ "" -#define STMT_CREATE_NODES 205 -#define STMT_205_INFO {"STMT_CREATE_NODES", NULL} -#define STMT_205 \ +#define STMT_CREATE_NODES 206 +#define STMT_206_INFO {"STMT_CREATE_NODES", NULL} +#define STMT_206 \ "CREATE TABLE NODES ( " \ " wc_id INTEGER NOT NULL REFERENCES WCROOT (id), " \ " local_relpath TEXT NOT NULL, " \ @@ -2243,9 +2250,9 @@ " WHERE op_depth = 0; " \ "" -#define STMT_CREATE_NODES_TRIGGERS 206 -#define STMT_206_INFO {"STMT_CREATE_NODES_TRIGGERS", NULL} -#define STMT_206 \ +#define STMT_CREATE_NODES_TRIGGERS 207 +#define STMT_207_INFO {"STMT_CREATE_NODES_TRIGGERS", NULL} +#define STMT_207 \ "CREATE TRIGGER nodes_insert_trigger " \ "AFTER INSERT ON nodes " \ "WHEN NEW.checksum IS NOT NULL " \ @@ -2271,9 +2278,9 @@ "END; " \ "" -#define STMT_CREATE_EXTERNALS 207 -#define STMT_207_INFO {"STMT_CREATE_EXTERNALS", NULL} -#define STMT_207 \ +#define STMT_CREATE_EXTERNALS 208 +#define STMT_208_INFO {"STMT_CREATE_EXTERNALS", NULL} +#define STMT_208 \ "CREATE TABLE EXTERNALS ( " \ " wc_id INTEGER NOT NULL REFERENCES WCROOT (id), " \ " local_relpath TEXT NOT NULL, " \ @@ -2292,9 +2299,9 @@ " local_relpath); " \ "" -#define STMT_UPGRADE_TO_20 208 -#define STMT_208_INFO {"STMT_UPGRADE_TO_20", NULL} -#define STMT_208 \ +#define STMT_UPGRADE_TO_20 209 +#define STMT_209_INFO {"STMT_UPGRADE_TO_20", NULL} +#define STMT_209 \ "UPDATE BASE_NODE SET checksum = (SELECT checksum FROM pristine " \ " WHERE md5_checksum = BASE_NODE.checksum) " \ "WHERE EXISTS (SELECT 1 FROM pristine WHERE md5_checksum = BASE_NODE.checksum); " \ @@ -2335,59 +2342,59 @@ "PRAGMA user_version = 20; " \ "" -#define STMT_UPGRADE_TO_21 209 -#define STMT_209_INFO {"STMT_UPGRADE_TO_21", NULL} -#define STMT_209 \ +#define STMT_UPGRADE_TO_21 210 +#define STMT_210_INFO {"STMT_UPGRADE_TO_21", NULL} +#define STMT_210 \ "PRAGMA user_version = 21; " \ "" -#define STMT_UPGRADE_21_SELECT_OLD_TREE_CONFLICT 210 -#define STMT_210_INFO {"STMT_UPGRADE_21_SELECT_OLD_TREE_CONFLICT", NULL} -#define STMT_210 \ +#define STMT_UPGRADE_21_SELECT_OLD_TREE_CONFLICT 211 +#define STMT_211_INFO {"STMT_UPGRADE_21_SELECT_OLD_TREE_CONFLICT", NULL} +#define STMT_211 \ "SELECT wc_id, local_relpath, tree_conflict_data " \ "FROM actual_node " \ "WHERE tree_conflict_data IS NOT NULL " \ "" -#define STMT_UPGRADE_21_ERASE_OLD_CONFLICTS 211 -#define STMT_211_INFO {"STMT_UPGRADE_21_ERASE_OLD_CONFLICTS", NULL} -#define STMT_211 \ +#define STMT_UPGRADE_21_ERASE_OLD_CONFLICTS 212 +#define STMT_212_INFO {"STMT_UPGRADE_21_ERASE_OLD_CONFLICTS", NULL} +#define STMT_212 \ "UPDATE actual_node SET tree_conflict_data = NULL " \ "" -#define STMT_UPGRADE_TO_22 212 -#define STMT_212_INFO {"STMT_UPGRADE_TO_22", NULL} -#define STMT_212 \ +#define STMT_UPGRADE_TO_22 213 +#define STMT_213_INFO {"STMT_UPGRADE_TO_22", NULL} +#define STMT_213 \ "UPDATE actual_node SET tree_conflict_data = conflict_data; " \ "UPDATE actual_node SET conflict_data = NULL; " \ "PRAGMA user_version = 22; " \ "" -#define STMT_UPGRADE_TO_23 213 -#define STMT_213_INFO {"STMT_UPGRADE_TO_23", NULL} -#define STMT_213 \ +#define STMT_UPGRADE_TO_23 214 +#define STMT_214_INFO {"STMT_UPGRADE_TO_23", NULL} +#define STMT_214 \ "PRAGMA user_version = 23; " \ "" -#define STMT_UPGRADE_23_HAS_WORKING_NODES 214 -#define STMT_214_INFO {"STMT_UPGRADE_23_HAS_WORKING_NODES", NULL} -#define STMT_214 \ +#define STMT_UPGRADE_23_HAS_WORKING_NODES 215 +#define STMT_215_INFO {"STMT_UPGRADE_23_HAS_WORKING_NODES", NULL} +#define STMT_215 \ "SELECT 1 FROM nodes WHERE op_depth > 0 " \ "LIMIT 1 " \ "" -#define STMT_UPGRADE_TO_24 215 -#define STMT_215_INFO {"STMT_UPGRADE_TO_24", NULL} -#define STMT_215 \ +#define STMT_UPGRADE_TO_24 216 +#define STMT_216_INFO {"STMT_UPGRADE_TO_24", NULL} +#define STMT_216 \ "UPDATE pristine SET refcount = " \ " (SELECT COUNT(*) FROM nodes " \ " WHERE checksum = pristine.checksum ); " \ "PRAGMA user_version = 24; " \ "" -#define STMT_UPGRADE_TO_25 216 -#define STMT_216_INFO {"STMT_UPGRADE_TO_25", NULL} -#define STMT_216 \ +#define STMT_UPGRADE_TO_25 217 +#define STMT_217_INFO {"STMT_UPGRADE_TO_25", NULL} +#define STMT_217 \ "DROP VIEW IF EXISTS NODES_CURRENT; " \ "CREATE VIEW NODES_CURRENT AS " \ " SELECT * FROM nodes " \ @@ -2399,9 +2406,9 @@ "PRAGMA user_version = 25; " \ "" -#define STMT_UPGRADE_TO_26 217 -#define STMT_217_INFO {"STMT_UPGRADE_TO_26", NULL} -#define STMT_217 \ +#define STMT_UPGRADE_TO_26 218 +#define STMT_218_INFO {"STMT_UPGRADE_TO_26", NULL} +#define STMT_218 \ "DROP VIEW IF EXISTS NODES_BASE; " \ "CREATE VIEW NODES_BASE AS " \ " SELECT * FROM nodes " \ @@ -2409,15 +2416,15 @@ "PRAGMA user_version = 26; " \ "" -#define STMT_UPGRADE_TO_27 218 -#define STMT_218_INFO {"STMT_UPGRADE_TO_27", NULL} -#define STMT_218 \ +#define STMT_UPGRADE_TO_27 219 +#define STMT_219_INFO {"STMT_UPGRADE_TO_27", NULL} +#define STMT_219 \ "PRAGMA user_version = 27; " \ "" -#define STMT_UPGRADE_27_HAS_ACTUAL_NODES_CONFLICTS 219 -#define STMT_219_INFO {"STMT_UPGRADE_27_HAS_ACTUAL_NODES_CONFLICTS", NULL} -#define STMT_219 \ +#define STMT_UPGRADE_27_HAS_ACTUAL_NODES_CONFLICTS 220 +#define STMT_220_INFO {"STMT_UPGRADE_27_HAS_ACTUAL_NODES_CONFLICTS", NULL} +#define STMT_220 \ "SELECT 1 FROM actual_node " \ "WHERE NOT ((prop_reject IS NULL) AND (conflict_old IS NULL) " \ " AND (conflict_new IS NULL) AND (conflict_working IS NULL) " \ @@ -2425,18 +2432,18 @@ "LIMIT 1 " \ "" -#define STMT_UPGRADE_TO_28 220 -#define STMT_220_INFO {"STMT_UPGRADE_TO_28", NULL} -#define STMT_220 \ +#define STMT_UPGRADE_TO_28 221 +#define STMT_221_INFO {"STMT_UPGRADE_TO_28", NULL} +#define STMT_221 \ "UPDATE NODES SET checksum = (SELECT checksum FROM pristine " \ " WHERE md5_checksum = nodes.checksum) " \ "WHERE EXISTS (SELECT 1 FROM pristine WHERE md5_checksum = nodes.checksum); " \ "PRAGMA user_version = 28; " \ "" -#define STMT_UPGRADE_TO_29 221 -#define STMT_221_INFO {"STMT_UPGRADE_TO_29", NULL} -#define STMT_221 \ +#define STMT_UPGRADE_TO_29 222 +#define STMT_222_INFO {"STMT_UPGRADE_TO_29", NULL} +#define STMT_222 \ "DROP TRIGGER IF EXISTS nodes_update_checksum_trigger; " \ "DROP TRIGGER IF EXISTS nodes_insert_trigger; " \ "DROP TRIGGER IF EXISTS nodes_delete_trigger; " \ @@ -2466,9 +2473,9 @@ "PRAGMA user_version = 29; " \ "" -#define STMT_UPGRADE_TO_30 222 -#define STMT_222_INFO {"STMT_UPGRADE_TO_30", NULL} -#define STMT_222 \ +#define STMT_UPGRADE_TO_30 223 +#define STMT_223_INFO {"STMT_UPGRADE_TO_30", NULL} +#define STMT_223 \ "CREATE UNIQUE INDEX IF NOT EXISTS I_NODES_MOVED " \ "ON NODES (wc_id, moved_to, op_depth); " \ "CREATE INDEX IF NOT EXISTS I_PRISTINE_MD5 ON PRISTINE (md5_checksum); " \ @@ -2476,9 +2483,9 @@ "UPDATE nodes SET file_external=1 WHERE file_external IS NOT NULL; " \ "" -#define STMT_UPGRADE_30_SELECT_CONFLICT_SEPARATE 223 -#define STMT_223_INFO {"STMT_UPGRADE_30_SELECT_CONFLICT_SEPARATE", NULL} -#define STMT_223 \ +#define STMT_UPGRADE_30_SELECT_CONFLICT_SEPARATE 224 +#define STMT_224_INFO {"STMT_UPGRADE_30_SELECT_CONFLICT_SEPARATE", NULL} +#define STMT_224 \ "SELECT wc_id, local_relpath, " \ " conflict_old, conflict_working, conflict_new, prop_reject, tree_conflict_data " \ "FROM actual_node " \ @@ -2490,24 +2497,24 @@ "ORDER by wc_id, local_relpath " \ "" -#define STMT_UPGRADE_30_SET_CONFLICT 224 -#define STMT_224_INFO {"STMT_UPGRADE_30_SET_CONFLICT", NULL} -#define STMT_224 \ +#define STMT_UPGRADE_30_SET_CONFLICT 225 +#define STMT_225_INFO {"STMT_UPGRADE_30_SET_CONFLICT", NULL} +#define STMT_225 \ "UPDATE actual_node SET conflict_data = ?3, conflict_old = NULL, " \ " conflict_working = NULL, conflict_new = NULL, prop_reject = NULL, " \ " tree_conflict_data = NULL " \ "WHERE wc_id = ?1 and local_relpath = ?2 " \ "" -#define STMT_UPGRADE_TO_31_ALTER_TABLE 225 -#define STMT_225_INFO {"STMT_UPGRADE_TO_31_ALTER_TABLE", NULL} -#define STMT_225 \ +#define STMT_UPGRADE_TO_31_ALTER_TABLE 226 +#define STMT_226_INFO {"STMT_UPGRADE_TO_31_ALTER_TABLE", NULL} +#define STMT_226 \ "ALTER TABLE NODES ADD COLUMN inherited_props BLOB; " \ "" -#define STMT_UPGRADE_TO_31_FINALIZE 226 -#define STMT_226_INFO {"STMT_UPGRADE_TO_31_FINALIZE", NULL} -#define STMT_226 \ +#define STMT_UPGRADE_TO_31_FINALIZE 227 +#define STMT_227_INFO {"STMT_UPGRADE_TO_31_FINALIZE", NULL} +#define STMT_227 \ "DROP INDEX IF EXISTS I_ACTUAL_CHANGELIST; " \ "DROP INDEX IF EXISTS I_EXTERNALS_PARENT; " \ "DROP INDEX I_NODES_PARENT; " \ @@ -2519,9 +2526,9 @@ "PRAGMA user_version = 31; " \ "" -#define STMT_UPGRADE_31_SELECT_WCROOT_NODES 227 -#define STMT_227_INFO {"STMT_UPGRADE_31_SELECT_WCROOT_NODES", NULL} -#define STMT_227 \ +#define STMT_UPGRADE_31_SELECT_WCROOT_NODES 228 +#define STMT_228_INFO {"STMT_UPGRADE_31_SELECT_WCROOT_NODES", NULL} +#define STMT_228 \ "SELECT l.wc_id, l.local_relpath FROM nodes as l " \ "LEFT OUTER JOIN nodes as r " \ "ON l.wc_id = r.wc_id " \ @@ -2533,9 +2540,9 @@ " OR (l.repos_path IS NOT (CASE WHEN (r.local_relpath) = '' THEN (CASE WHEN (r.repos_path) = '' THEN (l.local_relpath) WHEN (l.local_relpath) = '' THEN (r.repos_path) ELSE (r.repos_path) || '/' || (l.local_relpath) END) WHEN (r.repos_path) = '' THEN (CASE WHEN (r.local_relpath) = '' THEN (l.local_relpath) WHEN SUBSTR((l.local_relpath), 1, LENGTH(r.local_relpath)) = (r.local_relpath) THEN CASE WHEN LENGTH(r.local_relpath) = LENGTH(l.local_relpath) THEN '' WHEN SUBSTR((l.local_relpath), LENGTH(r.local_relpath)+1, 1) = '/' THEN SUBSTR((l.local_relpath), LENGTH(r.local_relpath)+2) END END) WHEN SUBSTR((l.local_relpath), 1, LENGTH(r.local_relpath)) = (r.local_relpath) THEN CASE WHEN LENGTH(r.local_relpath) = LENGTH(l.local_relpath) THEN (r.repos_path) WHEN SUBSTR((l.local_relpath), LENGTH(r.local_relpath)+1, 1) = '/' THEN (r.repos_path) || SUBSTR((l.local_relpath), LENGTH(r.local_relpath)+1) END END))) " \ "" -#define STMT_UPGRADE_TO_32 228 -#define STMT_228_INFO {"STMT_UPGRADE_TO_32", NULL} -#define STMT_228 \ +#define STMT_UPGRADE_TO_32 229 +#define STMT_229_INFO {"STMT_UPGRADE_TO_32", NULL} +#define STMT_229 \ "DROP INDEX IF EXISTS I_ACTUAL_CHANGELIST; " \ "DROP INDEX IF EXISTS I_EXTERNALS_PARENT; " \ "CREATE INDEX I_EXTERNALS_PARENT ON EXTERNALS (wc_id, parent_relpath); " \ @@ -2588,9 +2595,9 @@ "DROP TABLE ACTUAL_NODE_BACKUP; " \ "" -#define STMT_VERIFICATION_TRIGGERS 229 -#define STMT_229_INFO {"STMT_VERIFICATION_TRIGGERS", NULL} -#define STMT_229 \ +#define STMT_VERIFICATION_TRIGGERS 230 +#define STMT_230_INFO {"STMT_VERIFICATION_TRIGGERS", NULL} +#define STMT_230 \ "CREATE TEMPORARY TRIGGER no_repository_updates BEFORE UPDATE ON repository " \ "BEGIN " \ " SELECT RAISE(FAIL, 'Updates to REPOSITORY are not allowed.'); " \ @@ -2861,6 +2868,7 @@ STMT_227, \ STMT_228, \ STMT_229, \ + STMT_230, \ NULL \ } @@ -3096,5 +3104,6 @@ STMT_227_INFO, \ STMT_228_INFO, \ STMT_229_INFO, \ + STMT_230_INFO, \ {NULL, NULL} \ } diff --git a/subversion/libsvn_wc/wc-queries.sql b/subversion/libsvn_wc/wc-queries.sql index 0ffe6f07d4e4..d5f7e82557f0 100644 --- a/subversion/libsvn_wc/wc-queries.sql +++ b/subversion/libsvn_wc/wc-queries.sql @@ -472,6 +472,10 @@ WHERE wc_id = ?1 DELETE FROM lock WHERE repos_id = ?1 AND repos_relpath = ?2 +-- STMT_DELETE_LOCK_RECURSIVELY +DELETE FROM lock +WHERE repos_id = ?1 AND (repos_relpath = ?2 OR IS_STRICT_DESCENDANT_OF(repos_relpath, ?2)) + -- STMT_CLEAR_BASE_NODE_RECURSIVE_DAV_CACHE UPDATE nodes SET dav_cache = NULL WHERE dav_cache IS NOT NULL AND wc_id = ?1 AND op_depth = 0 diff --git a/subversion/libsvn_wc/wc_db.c b/subversion/libsvn_wc/wc_db.c index 7e1e8777eea7..e41165765d42 100644 --- a/subversion/libsvn_wc/wc_db.c +++ b/subversion/libsvn_wc/wc_db.c @@ -2086,6 +2086,7 @@ db_base_remove(svn_wc__db_wcroot_t *wcroot, svn_wc__db_t *db, /* For checking conflicts */ svn_boolean_t keep_as_working, svn_boolean_t queue_deletes, + svn_boolean_t remove_locks, svn_revnum_t not_present_revision, svn_skel_t *conflict, svn_skel_t *work_items, @@ -2106,6 +2107,16 @@ db_base_remove(svn_wc__db_wcroot_t *wcroot, wcroot, local_relpath, scratch_pool, scratch_pool)); + if (remove_locks) + { + svn_sqlite__stmt_t *lock_stmt; + + SVN_ERR(svn_sqlite__get_statement(&lock_stmt, wcroot->sdb, + STMT_DELETE_LOCK_RECURSIVELY)); + SVN_ERR(svn_sqlite__bindf(lock_stmt, "is", repos_id, repos_relpath)); + SVN_ERR(svn_sqlite__step_done(lock_stmt)); + } + if (status == svn_wc__db_status_normal && keep_as_working) { @@ -2333,6 +2344,7 @@ svn_wc__db_base_remove(svn_wc__db_t *db, const char *local_abspath, svn_boolean_t keep_as_working, svn_boolean_t queue_deletes, + svn_boolean_t remove_locks, svn_revnum_t not_present_revision, svn_skel_t *conflict, svn_skel_t *work_items, @@ -2349,7 +2361,7 @@ svn_wc__db_base_remove(svn_wc__db_t *db, SVN_WC__DB_WITH_TXN(db_base_remove(wcroot, local_relpath, db, keep_as_working, queue_deletes, - not_present_revision, + remove_locks, not_present_revision, conflict, work_items, scratch_pool), wcroot); @@ -10814,7 +10826,7 @@ commit_node(svn_wc__db_wcroot_t *wcroot, svn_sqlite__stmt_t *lock_stmt; SVN_ERR(svn_sqlite__get_statement(&lock_stmt, wcroot->sdb, - STMT_DELETE_LOCK)); + STMT_DELETE_LOCK_RECURSIVELY)); SVN_ERR(svn_sqlite__bindf(lock_stmt, "is", repos_id, repos_relpath)); SVN_ERR(svn_sqlite__step_done(lock_stmt)); } @@ -11058,7 +11070,7 @@ bump_node_revision(svn_wc__db_wcroot_t *wcroot, revision != new_rev))) { return svn_error_trace(db_base_remove(wcroot, local_relpath, - db, FALSE, FALSE, + db, FALSE, FALSE, FALSE, SVN_INVALID_REVNUM, NULL, NULL, scratch_pool)); } @@ -14978,14 +14990,18 @@ svn_wc__db_verify(svn_wc__db_t *db, svn_error_t * svn_wc__db_bump_format(int *result_format, - const char *wcroot_abspath, + svn_boolean_t *bumped_format, svn_wc__db_t *db, + const char *wcroot_abspath, apr_pool_t *scratch_pool) { svn_sqlite__db_t *sdb; svn_error_t *err; int format; + if (bumped_format) + *bumped_format = FALSE; + /* Do not scan upwards for a working copy root here to prevent accidental * upgrades of any working copies the WCROOT might be nested in. * Just try to open a DB at the specified path instead. */ @@ -15020,7 +15036,10 @@ svn_wc__db_bump_format(int *result_format, SVN_ERR(svn_sqlite__read_schema_version(&format, sdb, scratch_pool)); err = svn_wc__upgrade_sdb(result_format, wcroot_abspath, - sdb, format, scratch_pool); + sdb, format, scratch_pool); + + if (err == SVN_NO_ERROR && bumped_format) + *bumped_format = (*result_format > format); /* Make sure we return a different error than expected for upgrades from entries */ diff --git a/subversion/libsvn_wc/wc_db.h b/subversion/libsvn_wc/wc_db.h index 154262d7d21a..88e455fb51df 100644 --- a/subversion/libsvn_wc/wc_db.h +++ b/subversion/libsvn_wc/wc_db.h @@ -702,6 +702,9 @@ svn_wc__db_base_add_not_present_node(svn_wc__db_t *db, (With KEEP_AS_WORKING TRUE, this is a no-op, as everything is automatically shadowed by the created copy) + If REMOVE_LOCKS is TRUE, all locks of this node and any subnodes + are also removed. This is to be done during commit of deleted nodes. + If NOT_PRESENT_REVISION specifies a valid revision a not-present node is installed in BASE node with kind NOT_PRESENT_KIND after deleting. @@ -715,6 +718,7 @@ svn_wc__db_base_remove(svn_wc__db_t *db, const char *local_abspath, svn_boolean_t keep_as_working, svn_boolean_t queue_deletes, + svn_boolean_t remove_locks, svn_revnum_t not_present_revision, svn_skel_t *conflict, svn_skel_t *work_items, @@ -2909,11 +2913,15 @@ svn_wc__db_upgrade_get_repos_id(apr_int64_t *repos_id, * Upgrading subdirectories of a working copy is not supported. * If WCROOT_ABSPATH is not a working copy root SVN_ERR_WC_INVALID_OP_ON_CWD * is returned. + * + * If BUMPED_FORMAT is not NULL, set *BUMPED_FORMAT to TRUE if the format + * was bumped or to FALSE if the wc was already at the resulting format. */ svn_error_t * svn_wc__db_bump_format(int *result_format, - const char *wcroot_abspath, + svn_boolean_t *bumped_format, svn_wc__db_t *db, + const char *wcroot_abspath, apr_pool_t *scratch_pool); /* @} */ diff --git a/subversion/libsvn_wc/wc_db_update_move.c b/subversion/libsvn_wc/wc_db_update_move.c index fa5afe4f70aa..a8cce76c0c0d 100644 --- a/subversion/libsvn_wc/wc_db_update_move.c +++ b/subversion/libsvn_wc/wc_db_update_move.c @@ -1988,8 +1988,12 @@ svn_wc__db_update_moved_away_conflict_victim(svn_wc__db_t *db, /* Send all queued up notifications. */ SVN_ERR(svn_wc__db_update_move_list_notify(wcroot, - old_version->peg_rev, - new_version->peg_rev, + (old_version + ? old_version->peg_rev + : SVN_INVALID_REVNUM), + (new_version + ? new_version->peg_rev + : SVN_INVALID_REVNUM), notify_func, notify_baton, scratch_pool)); if (notify_func) @@ -2395,7 +2399,9 @@ svn_wc__db_resolve_delete_raise_moved_away(svn_wc__db_t *db, wcroot); SVN_ERR(svn_wc__db_update_move_list_notify(wcroot, - old_version->peg_rev, + (old_version + ? old_version->peg_rev + : SVN_INVALID_REVNUM), (new_version ? new_version->peg_rev : SVN_INVALID_REVNUM), diff --git a/subversion/libsvn_wc/wc_db_wcroot.c b/subversion/libsvn_wc/wc_db_wcroot.c index 1091f1b5cc03..21173e50cfa2 100644 --- a/subversion/libsvn_wc/wc_db_wcroot.c +++ b/subversion/libsvn_wc/wc_db_wcroot.c @@ -434,6 +434,8 @@ svn_wc__db_wcroot_parse_local_abspath(svn_wc__db_wcroot_t **wcroot, svn_boolean_t always_check = FALSE; int wc_format = 0; const char *adm_relpath; + /* Non-NULL if WCROOT is found through a symlink: */ + const char *symlink_wcroot_abspath = NULL; /* ### we need more logic for finding the database (if it is located ### outside of the wcroot) and then managing all of that within DB. @@ -611,6 +613,7 @@ svn_wc__db_wcroot_parse_local_abspath(svn_wc__db_wcroot_t **wcroot, if (found_wcroot) break; + symlink_wcroot_abspath = local_abspath; SVN_ERR(read_link_target(&local_abspath, local_abspath, scratch_pool)); try_symlink_as_dir: @@ -632,6 +635,7 @@ svn_wc__db_wcroot_parse_local_abspath(svn_wc__db_wcroot_t **wcroot, local_abspath = svn_dirent_dirname(local_abspath, scratch_pool); moved_upwards = TRUE; + symlink_wcroot_abspath = NULL; /* Is the parent directory recorded in our hash? */ found_wcroot = svn_hash_gets(db->dir_data, local_abspath); @@ -669,7 +673,10 @@ svn_wc__db_wcroot_parse_local_abspath(svn_wc__db_wcroot_t **wcroot, (ie. where we found it). */ err = svn_wc__db_pdh_create_wcroot(wcroot, - apr_pstrdup(db->state_pool, local_abspath), + apr_pstrdup(db->state_pool, + symlink_wcroot_abspath + ? symlink_wcroot_abspath + : local_abspath), sdb, wc_id, FORMAT_FROM_SDB, db->verify_format, db->enforce_empty_wq, db->state_pool, scratch_pool); @@ -737,7 +744,10 @@ svn_wc__db_wcroot_parse_local_abspath(svn_wc__db_wcroot_t **wcroot, } SVN_ERR(svn_wc__db_pdh_create_wcroot(wcroot, - apr_pstrdup(db->state_pool, local_abspath), + apr_pstrdup(db->state_pool, + symlink_wcroot_abspath + ? symlink_wcroot_abspath + : local_abspath), NULL, UNKNOWN_WC_ID, wc_format, db->verify_format, db->enforce_empty_wq, db->state_pool, scratch_pool)); @@ -747,6 +757,13 @@ svn_wc__db_wcroot_parse_local_abspath(svn_wc__db_wcroot_t **wcroot, { const char *dir_relpath; + if (symlink_wcroot_abspath) + { + /* The WCROOT was found through a symlink pointing at the root of + * the WC. Cache the WCROOT under the symlink's path. */ + local_dir_abspath = symlink_wcroot_abspath; + } + /* The subdirectory's relpath is easily computed relative to the wcroot that we just found. */ dir_relpath = compute_relpath(*wcroot, local_dir_abspath, NULL); @@ -809,6 +826,7 @@ svn_wc__db_wcroot_parse_local_abspath(svn_wc__db_wcroot_t **wcroot, scratch_pool)); if (resolved_kind == svn_node_dir) { + symlink_wcroot_abspath = original_abspath; SVN_ERR(read_link_target(&local_abspath, original_abspath, scratch_pool)); /* This handle was opened in this function but is not going diff --git a/subversion/libsvn_wc/workqueue.c b/subversion/libsvn_wc/workqueue.c index ddbac150dcf9..b034d7d124ce 100644 --- a/subversion/libsvn_wc/workqueue.c +++ b/subversion/libsvn_wc/workqueue.c @@ -143,6 +143,7 @@ run_base_remove(work_item_baton_t *wqb, SVN_ERR(svn_wc__db_base_remove(db, local_abspath, FALSE /* keep_as_working */, TRUE /* queue_deletes */, + FALSE /* remove_locks */, not_present_rev, NULL, NULL, scratch_pool)); diff --git a/subversion/svn/cl.h b/subversion/svn/cl.h index f7ebee668290..8cc358c9822d 100644 --- a/subversion/svn/cl.h +++ b/subversion/svn/cl.h @@ -806,23 +806,6 @@ svn_cl__local_style_skip_ancestor(const char *parent_path, const char *path, apr_pool_t *pool); -/* Check that PATH_OR_URL1@REVISION1 is related to PATH_OR_URL2@REVISION2. - * Raise an error if not. - * - * ### Ideally we would also check that they are on different lines of - * history. That is easy in common cases, but to give a correct answer in - * general we need to know the operative revision(s) as well. For example, - * when one location is the branch point from which the other branch was - * copied. - */ -svn_error_t * -svn_cl__check_related_source_and_target(const char *path_or_url1, - const svn_opt_revision_t *revision1, - const char *path_or_url2, - const svn_opt_revision_t *revision2, - svn_client_ctx_t *ctx, - apr_pool_t *pool); - /* If the user is setting a mime-type to mark one of the TARGETS as binary, * as determined by property name PROPNAME and value PROPVAL, then check * whether Subversion's own binary-file detection recognizes the target as diff --git a/subversion/svn/conflict-callbacks.c b/subversion/svn/conflict-callbacks.c index 096a1892cdec..d5a98ddf6fbb 100644 --- a/subversion/svn/conflict-callbacks.c +++ b/subversion/svn/conflict-callbacks.c @@ -453,7 +453,7 @@ static const resolver_option_t text_conflict_options[] = -1 }, { "df", N_("show diff"), N_("show all changes made to merged file"), -1 }, - { "r", N_("resolved"), N_("accept merged version of file"), + { "r", N_("mark resolved"), N_("accept merged version of file"), svn_wc_conflict_choose_merged }, { "", "", "", svn_wc_conflict_choose_unspecified }, { "dc", N_("display conflict"), N_("show all conflicts " @@ -473,13 +473,13 @@ static const resolver_option_t text_conflict_options[] = "(same) [theirs-full]"), svn_wc_conflict_choose_theirs_full }, { "", "", "", svn_wc_conflict_choose_unspecified }, - { "p", N_("postpone"), N_("mark the conflict to be resolved later" - " [postpone]"), - svn_wc_conflict_choose_postpone }, { "m", N_("merge"), N_("use internal merge tool to resolve " "conflict"), -1 }, { "l", N_("launch tool"), N_("launch external tool to resolve " "conflict [launch]"), -1 }, + { "p", N_("postpone"), N_("mark the conflict to be resolved later" + " [postpone]"), + svn_wc_conflict_choose_postpone }, { "q", N_("quit resolution"), N_("postpone all remaining conflicts"), svn_wc_conflict_choose_postpone }, { "s", N_("show all options"), N_("show this list (also 'h', '?')"), -1 }, @@ -489,9 +489,6 @@ static const resolver_option_t text_conflict_options[] = /* Resolver options for a property conflict */ static const resolver_option_t prop_conflict_options[] = { - { "p", N_("postpone"), N_("mark the conflict to be resolved later" - " [postpone]"), - svn_wc_conflict_choose_postpone }, { "mf", N_("my version"), N_("accept my version of entire file (even " "non-conflicts) [mine-full]"), svn_wc_conflict_choose_mine_full }, @@ -501,8 +498,11 @@ static const resolver_option_t prop_conflict_options[] = { "dc", N_("display conflict"), N_("show conflicts in this property"), -1 }, { "e", N_("edit property"), N_("change merged property value in an editor" " [edit]"), -1 }, - { "r", N_("resolved"), N_("accept edited version of property"), + { "r", N_("mark resolved"), N_("accept edited version of property"), svn_wc_conflict_choose_merged }, + { "p", N_("postpone"), N_("mark the conflict to be resolved later" + " [postpone]"), + svn_wc_conflict_choose_postpone }, { "q", N_("quit resolution"), N_("postpone all remaining conflicts"), svn_wc_conflict_choose_postpone }, { "h", N_("help"), N_("show this help (also '?')"), -1 }, @@ -512,15 +512,15 @@ static const resolver_option_t prop_conflict_options[] = /* Resolver options for an obstructued addition */ static const resolver_option_t obstructed_add_options[] = { - { "p", N_("postpone"), N_("mark the conflict to be resolved later" - " [postpone]"), - svn_wc_conflict_choose_postpone }, { "mf", N_("my version"), N_("accept pre-existing item (ignore " "upstream addition) [mine-full]"), svn_wc_conflict_choose_mine_full }, { "tf", N_("their version"), N_("accept incoming item (overwrite " "pre-existing item) [theirs-full]"), svn_wc_conflict_choose_theirs_full }, + { "p", N_("postpone"), N_("mark the conflict to be resolved later" + " [postpone]"), + svn_wc_conflict_choose_postpone }, { "q", N_("quit resolution"), N_("postpone all remaining conflicts"), svn_wc_conflict_choose_postpone }, { "h", N_("help"), N_("show this help (also '?')"), -1 }, @@ -530,10 +530,10 @@ static const resolver_option_t obstructed_add_options[] = /* Resolver options for a tree conflict */ static const resolver_option_t tree_conflict_options[] = { + { "r", N_("mark resolved"), N_("accept current working copy state"), + svn_wc_conflict_choose_merged }, { "p", N_("postpone"), N_("resolve the conflict later [postpone]"), svn_wc_conflict_choose_postpone }, - { "r", N_("resolved"), N_("accept current working copy state"), - svn_wc_conflict_choose_merged }, { "q", N_("quit resolution"), N_("postpone all remaining conflicts"), svn_wc_conflict_choose_postpone }, { "h", N_("help"), N_("show this help (also '?')"), -1 }, @@ -542,14 +542,30 @@ static const resolver_option_t tree_conflict_options[] = static const resolver_option_t tree_conflict_options_update_moved_away[] = { + { "mc", N_("apply update (recommended)"), + N_("apply update to the move destination" + " [mine-conflict]"), + svn_wc_conflict_choose_mine_conflict }, + { "r", N_("discard update (breaks move)"), N_("discard update, mark " + "resolved, the move will " + "will become a copy"), + svn_wc_conflict_choose_merged }, { "p", N_("postpone"), N_("resolve the conflict later [postpone]"), svn_wc_conflict_choose_postpone }, - { "mc", N_("my side of conflict"), N_("apply update to the move destination" - " [mine-conflict]"), + { "q", N_("quit resolution"), N_("postpone all remaining conflicts"), + svn_wc_conflict_choose_postpone }, + { "h", N_("help"), N_("show this help (also '?')"), -1 }, + { NULL } +}; + +static const resolver_option_t tree_conflict_options_update_edit_moved_away[] = +{ + { "mc", N_("apply update to move destination"), + N_("apply incoming update to move destination" + " [mine-conflict]"), svn_wc_conflict_choose_mine_conflict }, - { "r", N_("resolved"), N_("mark resolved " - "(the move will become a copy)"), - svn_wc_conflict_choose_merged }, + { "p", N_("postpone"), N_("resolve the conflict later [postpone]"), + svn_wc_conflict_choose_postpone }, { "q", N_("quit resolution"), N_("postpone all remaining conflicts"), svn_wc_conflict_choose_postpone }, { "h", N_("help"), N_("show this help (also '?')"), -1 }, @@ -558,14 +574,14 @@ static const resolver_option_t tree_conflict_options_update_moved_away[] = static const resolver_option_t tree_conflict_options_update_deleted[] = { + { "mc", N_("keep affected local moves"), N_("keep any local moves affected " + "by this deletion [mine-conflict]"), + svn_wc_conflict_choose_mine_conflict }, + { "r", N_("mark resolved (breaks moves)"), N_("mark resolved, any affected " + "moves will become copies"), + svn_wc_conflict_choose_merged }, { "p", N_("postpone"), N_("resolve the conflict later [postpone]"), svn_wc_conflict_choose_postpone }, - { "mc", N_("my side of conflict"), N_("keep any moves affected " - "by this deletion [mine-conflict]"), - svn_wc_conflict_choose_mine_conflict }, - { "r", N_("resolved"), N_("mark resolved (any affected moves will " - "become copies)"), - svn_wc_conflict_choose_merged }, { "q", N_("quit resolution"), N_("postpone all remaining conflicts"), svn_wc_conflict_choose_postpone }, { "h", N_("help"), N_("show this help (also '?')"), -1 }, @@ -574,14 +590,14 @@ static const resolver_option_t tree_conflict_options_update_deleted[] = static const resolver_option_t tree_conflict_options_update_replaced[] = { + { "mc", N_("keep affected local moves"), N_("keep any moves affected by this " + "replacement [mine-conflict]"), + svn_wc_conflict_choose_mine_conflict }, + { "r", N_("mark resolved (breaks moves)"), N_("mark resolved (any affected " + "moves will become copies)"), + svn_wc_conflict_choose_merged }, { "p", N_("postpone"), N_("resolve the conflict later [postpone]"), svn_wc_conflict_choose_postpone }, - { "mc", N_("my side of conflict"), N_("keep any moves affected by this " - "replacement [mine-conflict]"), - svn_wc_conflict_choose_mine_conflict }, - { "r", N_("resolved"), N_("mark resolved (any affected moves will " - "become copies)"), - svn_wc_conflict_choose_merged }, { "q", N_("quit resolution"), N_("postpone all remaining conflicts"), svn_wc_conflict_choose_postpone }, { "h", N_("help"), N_("show this help (also '?')"), -1 }, @@ -925,7 +941,7 @@ handle_text_conflict(svn_wc_conflict_result_t *result, SVN_ERR(svn_cmdline_fprintf( stderr, iterpool, _("Invalid option; use diff/edit/merge/launch " - "before choosing 'resolved'.\n\n"))); + "before choosing 'mark resolved'.\n\n"))); continue; } @@ -1078,7 +1094,12 @@ handle_tree_conflict(svn_wc_conflict_result_t *result, desc->operation == svn_wc_operation_switch) { if (desc->reason == svn_wc_conflict_reason_moved_away) - tc_opts = tree_conflict_options_update_moved_away; + { + if (desc->action == svn_wc_conflict_action_edit) + tc_opts = tree_conflict_options_update_edit_moved_away; + else + tc_opts = tree_conflict_options_update_moved_away; + } else if (desc->reason == svn_wc_conflict_reason_deleted) tc_opts = tree_conflict_options_update_deleted; else if (desc->reason == svn_wc_conflict_reason_replaced) diff --git a/subversion/svn/file-merge.c b/subversion/svn/file-merge.c index 43ebba920406..c64f5772df45 100644 --- a/subversion/svn/file-merge.c +++ b/subversion/svn/file-merge.c @@ -655,6 +655,8 @@ merge_chunks(apr_array_header_t **merged_chunk, svn_stringbuf_appendcstr( prompt, _("Select: (1) use their version, (2) use your version,\n" + " (12) their version first, then yours,\n" + " (21) your version first, then theirs,\n" " (e1) edit their version and use the result,\n" " (e2) edit your version and use the result,\n" " (eb) edit both versions and use the result,\n" @@ -679,6 +681,24 @@ merge_chunks(apr_array_header_t **merged_chunk, *merged_chunk = chunk2; break; } + if (strcmp(answer, "12") == 0) + { + *merged_chunk = apr_array_make(result_pool, + chunk1->nelts + chunk2->nelts, + sizeof(svn_stringbuf_t *)); + apr_array_cat(*merged_chunk, chunk1); + apr_array_cat(*merged_chunk, chunk2); + break; + } + if (strcmp(answer, "21") == 0) + { + *merged_chunk = apr_array_make(result_pool, + chunk1->nelts + chunk2->nelts, + sizeof(svn_stringbuf_t *)); + apr_array_cat(*merged_chunk, chunk2); + apr_array_cat(*merged_chunk, chunk1); + break; + } else if (strcmp(answer, "p") == 0) { *merged_chunk = NULL; diff --git a/subversion/svn/merge-cmd.c b/subversion/svn/merge-cmd.c index c14f769a8d26..17507a2cbaee 100644 --- a/subversion/svn/merge-cmd.c +++ b/subversion/svn/merge-cmd.c @@ -101,15 +101,6 @@ run_merge(svn_boolean_t two_sources_specified, && (first_range_end.kind == svn_opt_revision_unspecified)) { ranges_to_merge = NULL; - - /* This must be a 'sync' merge so check branch relationship. */ - if (opt_state->verbose) - SVN_ERR(svn_cmdline_printf( - scratch_pool, _("--- Checking branch relationship\n"))); - SVN_ERR_W(svn_cl__check_related_source_and_target( - sourcepath1, &peg_revision1, - targetpath, &unspecified_revision, ctx, scratch_pool), - _("Source and target must be different but related branches")); } if (opt_state->verbose) diff --git a/subversion/svn/mergeinfo-cmd.c b/subversion/svn/mergeinfo-cmd.c index a78c42a6c388..41edcdafc730 100644 --- a/subversion/svn/mergeinfo-cmd.c +++ b/subversion/svn/mergeinfo-cmd.c @@ -297,11 +297,6 @@ svn_cl__mergeinfo(apr_getopt_t *os, tgt_peg_revision.kind = svn_opt_revision_base; } - SVN_ERR_W(svn_cl__check_related_source_and_target(source, &src_peg_revision, - target, &tgt_peg_revision, - ctx, pool), - _("Source and target must be different but related branches")); - src_start_revision = &(opt_state->start_revision); if (opt_state->end_revision.kind == svn_opt_revision_unspecified) src_end_revision = src_start_revision; @@ -311,22 +306,32 @@ svn_cl__mergeinfo(apr_getopt_t *os, /* Do the real work, depending on the requested data flavor. */ if (opt_state->show_revs == svn_cl__show_revs_merged) { + apr_array_header_t *revprops; + + /* We need only revisions number, not revision properties. */ + revprops = apr_array_make(pool, 0, sizeof(const char *)); + SVN_ERR(svn_client_mergeinfo_log2(TRUE, target, &tgt_peg_revision, source, &src_peg_revision, src_start_revision, src_end_revision, print_log_rev, NULL, - TRUE, depth, NULL, ctx, + TRUE, depth, revprops, ctx, pool)); } else if (opt_state->show_revs == svn_cl__show_revs_eligible) { + apr_array_header_t *revprops; + + /* We need only revisions number, not revision properties. */ + revprops = apr_array_make(pool, 0, sizeof(const char *)); + SVN_ERR(svn_client_mergeinfo_log2(FALSE, target, &tgt_peg_revision, source, &src_peg_revision, src_start_revision, src_end_revision, print_log_rev, NULL, - TRUE, depth, NULL, ctx, + TRUE, depth, revprops, ctx, pool)); } else diff --git a/subversion/svn/svn.c b/subversion/svn/svn.c index cbcec87cf07a..5432e8bac086 100644 --- a/subversion/svn/svn.c +++ b/subversion/svn/svn.c @@ -484,9 +484,19 @@ const svn_opt_subcommand_desc2_t svn_cl__cmd_table[] = {'r', 'q', 'N', opt_depth, opt_force, opt_ignore_externals} }, { "cleanup", svn_cl__cleanup, {0}, N_ - ("Recursively clean up the working copy, removing locks, resuming\n" + ("Recursively clean up the working copy, removing write locks, resuming\n" "unfinished operations, etc.\n" - "usage: cleanup [WCPATH...]\n"), + "usage: cleanup [WCPATH...]\n" + "\n" + " Finish any unfinished business in the working copy at WCPATH, and remove\n" + " write locks (shown as 'L' by the 'svn status' command) from the working\n" + " copy. Usually, this is only necessary if a Subversion client has crashed\n" + " while using the working copy, leaving it in an unusable state.\n" + "\n" + " WARNING: There is no mechanism that will protect write locks still\n" + " being used by other Subversion clients. Running this command\n" + " while another client is using the working copy can corrupt\n" + " the working copy beyond repair!\n"), {opt_merge_cmd} }, { "commit", svn_cl__commit, {"ci"}, @@ -750,18 +760,18 @@ const svn_opt_subcommand_desc2_t svn_cl__cmd_table[] = * (with quotes and newlines removed). */ "Merge changes into a working copy.\n" "usage: 1. merge SOURCE[@REV] [TARGET_WCPATH]\n" -" (the 'automatic' merge)\n" +" (the 'complete' merge)\n" " 2. merge [-c M[,N...] | -r N:M ...] SOURCE[@REV] [TARGET_WCPATH]\n" " (the 'cherry-pick' merge)\n" " 3. merge SOURCE1[@REV1] SOURCE2[@REV2] [TARGET_WCPATH]\n" " (the '2-URL' merge)\n" "\n" " 1. This form, with one source path and no revision range, is called\n" -" an 'automatic' merge:\n" +" a 'complete' merge:\n" "\n" " svn merge SOURCE[@REV] [TARGET_WCPATH]\n" "\n" -" The automatic merge is used for the 'sync' and 'reintegrate' merges\n" +" The complete merge is used for the 'sync' and 'reintegrate' merges\n" " in the 'feature branch' pattern described below. It finds all the\n" " changes on the source branch that have not already been merged to the\n" " target branch, and merges them into the working copy. Merge tracking\n" @@ -900,7 +910,7 @@ const svn_opt_subcommand_desc2_t svn_cl__cmd_table[] = " of 'REV' is the base revision (usually the revision last updated to).\n" "\n" " TARGET_WCPATH is a working copy path; if omitted, '.' is generally\n" -" assumed. The special cases noted above in the 'automatic' merge form\n" +" assumed. The special cases noted above in the 'complete' merge form\n" " also apply here.\n" "\n" " The revision ranges to be merged are specified by the '-r' and/or '-c'\n" @@ -971,7 +981,7 @@ const svn_opt_subcommand_desc2_t svn_cl__cmd_table[] = " The three branches involved can be completely unrelated.\n" "\n" " TARGET_WCPATH is a working copy path; if omitted, '.' is generally\n" -" assumed. The special cases noted above in the 'automatic' merge form\n" +" assumed. The special cases noted above in the 'complete' merge form\n" " also apply here.\n" "\n" " SOURCE1 and/or SOURCE2 can also be specified as a working copy path,\n" @@ -1088,7 +1098,7 @@ const svn_opt_subcommand_desc2_t svn_cl__cmd_table[] = " shows, from left to right:\n" " the youngest common ancestor of the branches;\n" " the latest full merge in either direction, and thus the common base\n" - " that will be used for the next automatic merge;\n" + " that will be used for the next complete merge;\n" " the repository path and revision number of the tip of each branch.\n" "\n" " 2. Print the revision numbers on SOURCE that have been merged to TARGET\n" @@ -1430,9 +1440,10 @@ const svn_opt_subcommand_desc2_t svn_cl__cmd_table[] = " ' ' no modifications\n" " 'C' Conflicted\n" " 'M' Modified\n" - " Third column: Whether the working copy directory is locked\n" - " ' ' not locked\n" - " 'L' locked\n" + " Third column: Whether the working copy is locked for writing by\n" + " another Subversion client modifying the working copy\n" + " ' ' not locked for writing\n" + " 'L' locked for writing\n" " Fourth column: Scheduled commit will contain addition-with-history\n" " ' ' no history scheduled with commit\n" " '+' history scheduled with commit\n" @@ -1440,16 +1451,16 @@ const svn_opt_subcommand_desc2_t svn_cl__cmd_table[] = " ' ' normal\n" " 'S' the item has a Switched URL relative to the parent\n" " 'X' a versioned file created by an eXternals definition\n" - " Sixth column: Repository lock token\n" + " Sixth column: Whether the item is locked in repository for exclusive commit\n" " (without -u)\n" - " ' ' no lock token\n" - " 'K' lock token present\n" + " ' ' not locked by this working copy\n" + " 'K' locked by this working copy, but lock might be stolen or broken\n" " (with -u)\n" - " ' ' not locked in repository, no lock token\n" - " 'K' locked in repository, lock toKen present\n" - " 'O' locked in repository, lock token in some Other working copy\n" - " 'T' locked in repository, lock token present but sTolen\n" - " 'B' not locked in repository, lock token present but Broken\n" + " ' ' not locked in repository, not locked by this working copy\n" + " 'K' locked in repository, lock owned by this working copy\n" + " 'O' locked in repository, lock owned by another working copy\n" + " 'T' locked in repository, lock owned by this working copy was stolen\n" + " 'B' not locked in repository, lock owned by this working copy is broken\n" " Seventh column: Whether the item is the victim of a tree conflict\n" " ' ' normal\n" " 'C' tree-Conflicted\n" diff --git a/subversion/svn/util.c b/subversion/svn/util.c index 5d386f8bdc97..092bc7e3afcf 100644 --- a/subversion/svn/util.c +++ b/subversion/svn/util.c @@ -1012,46 +1012,6 @@ svn_cl__local_style_skip_ancestor(const char *parent_path, return svn_dirent_local_style(relpath ? relpath : path, pool); } -/* Return a string of the form "PATH_OR_URL@REVISION". */ -static const char * -path_for_display(const char *path_or_url, - const svn_opt_revision_t *revision, - apr_pool_t *pool) -{ - const char *rev_str = svn_opt__revision_to_string(revision, pool); - - if (! svn_path_is_url(path_or_url)) - path_or_url = svn_dirent_local_style(path_or_url, pool); - return apr_psprintf(pool, "%s@%s", path_or_url, rev_str); -} - -svn_error_t * -svn_cl__check_related_source_and_target(const char *path_or_url1, - const svn_opt_revision_t *revision1, - const char *path_or_url2, - const svn_opt_revision_t *revision2, - svn_client_ctx_t *ctx, - apr_pool_t *pool) -{ - const char *ancestor_url; - svn_revnum_t ancestor_rev; - - SVN_ERR(svn_client__youngest_common_ancestor( - &ancestor_url, &ancestor_rev, - path_or_url1, revision1, path_or_url2, revision2, - ctx, pool, pool)); - - if (ancestor_url == NULL) - { - return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL, - _("Source and target have no common ancestor: " - "'%s' and '%s'"), - path_for_display(path_or_url1, revision1, pool), - path_for_display(path_or_url2, revision2, pool)); - } - return SVN_NO_ERROR; -} - svn_error_t * svn_cl__propset_print_binary_mime_type_warning(apr_array_header_t *targets, const char *propname, diff --git a/subversion/svnadmin/svnadmin.c b/subversion/svnadmin/svnadmin.c index 65ff9712716c..2a9d63ed65e2 100644 --- a/subversion/svnadmin/svnadmin.c +++ b/subversion/svnadmin/svnadmin.c @@ -685,6 +685,18 @@ subcommand_create(apr_getopt_t *os, void *baton, apr_pool_t *pool) svn_hash_sets(fs_config, SVN_FS_CONFIG_PRE_1_8_COMPATIBLE, "1"); } + if (opt_state->compatible_version + && ! svn_version__at_least(opt_state->compatible_version, 1, 1, 0) + /* ### TODO: this NULL check hard-codes knowledge of the library's + default fs-type value */ + && (opt_state->fs_type == NULL + || !strcmp(opt_state->fs_type, SVN_FS_TYPE_FSFS))) + { + return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL, + _("Repositories compatible with 1.0.x must use " + "--fs-type=bdb")); + } + SVN_ERR(svn_repos_create(&repos, opt_state->repository_path, NULL, NULL, NULL, fs_config, pool)); svn_fs_set_warning_func(svn_repos_fs(repos), warning_func, NULL); diff --git a/subversion/svnlook/svnlook.c b/subversion/svnlook/svnlook.c index e619450628ec..0006a8fef185 100644 --- a/subversion/svnlook/svnlook.c +++ b/subversion/svnlook/svnlook.c @@ -57,6 +57,7 @@ #include "private/svn_diff_private.h" #include "private/svn_cmdline_private.h" #include "private/svn_fspath.h" +#include "private/svn_io_private.h" #include "svn_private_config.h" @@ -983,12 +984,21 @@ print_diff_tree(svn_stream_t *out_stream, SVN_ERR(generate_label(&new_label, root, path, pool)); /* We deal in streams, but svn_io_run_diff2() deals in file - handles, unfortunately, so we need to make these temporary - files, and then copy the contents to our stream. */ - SVN_ERR(svn_io_open_unique_file3(&outfile, &outfilename, NULL, - svn_io_file_del_on_pool_cleanup, pool, pool)); - SVN_ERR(svn_io_open_unique_file3(&errfile, &errfilename, NULL, - svn_io_file_del_on_pool_cleanup, pool, pool)); + handles, so we may need to make temporary files and then + copy the contents to our stream. */ + outfile = svn_stream__aprfile(out_stream); + if (outfile) + outfilename = NULL; + else + SVN_ERR(svn_io_open_unique_file3(&outfile, &outfilename, NULL, + svn_io_file_del_on_pool_cleanup, pool, pool)); + SVN_ERR(svn_stream_for_stderr(&err_stream, pool)); + errfile = svn_stream__aprfile(err_stream); + if (errfile) + errfilename = NULL; + else + SVN_ERR(svn_io_open_unique_file3(&errfile, &errfilename, NULL, + svn_io_file_del_on_pool_cleanup, pool, pool)); SVN_ERR(svn_io_run_diff2(".", diff_cmd_argv, @@ -998,21 +1008,25 @@ print_diff_tree(svn_stream_t *out_stream, &exitcode, outfile, errfile, c->diff_cmd, pool)); - SVN_ERR(svn_io_file_close(outfile, pool)); - SVN_ERR(svn_io_file_close(errfile, pool)); - /* Now, open and copy our files to our output streams. */ - SVN_ERR(svn_stream_for_stderr(&err_stream, pool)); - SVN_ERR(svn_stream_open_readonly(&stream, outfilename, - pool, pool)); - SVN_ERR(svn_stream_copy3(stream, - svn_stream_disown(out_stream, pool), - NULL, NULL, pool)); - SVN_ERR(svn_stream_open_readonly(&stream, errfilename, - pool, pool)); - SVN_ERR(svn_stream_copy3(stream, - svn_stream_disown(err_stream, pool), - NULL, NULL, pool)); + if (outfilename) + { + SVN_ERR(svn_io_file_close(outfile, pool)); + SVN_ERR(svn_stream_open_readonly(&stream, outfilename, + pool, pool)); + SVN_ERR(svn_stream_copy3(stream, + svn_stream_disown(out_stream, pool), + NULL, NULL, pool)); + } + if (errfilename) + { + SVN_ERR(svn_io_file_close(errfile, pool)); + SVN_ERR(svn_stream_open_readonly(&stream, errfilename, + pool, pool)); + SVN_ERR(svn_stream_copy3(stream, + svn_stream_disown(err_stream, pool), + NULL, NULL, pool)); + } SVN_ERR(svn_stream_printf_from_utf8(out_stream, encoding, pool, "\n")); diff --git a/subversion/svnserve/serve.c b/subversion/svnserve/serve.c index 9e49bdded725..6b66b199f266 100644 --- a/subversion/svnserve/serve.c +++ b/subversion/svnserve/serve.c @@ -1441,6 +1441,7 @@ static svn_error_t *commit(svn_ra_svn_conn_t *conn, apr_pool_t *pool, if (lock_tokens && lock_tokens->nelts) SVN_CMD_ERR(add_lock_tokens(conn, lock_tokens, b, pool)); + /* Ignore LOG_MSG, per the protocol. See ra_svn_commit(). */ if (revprop_list) SVN_ERR(svn_ra_svn__parse_proplist(revprop_list, pool, &revprop_table)); else diff --git a/win-tests.py b/win-tests.py index 04723bdfabf4..62afe6c2c7ce 100644 --- a/win-tests.py +++ b/win-tests.py @@ -25,7 +25,7 @@ """ # $HeadURL: http://svn.apache.org/repos/asf/subversion/branches/1.8.x/win-tests.py $ -# $LastChangedRevision: 1467191 $ +# $LastChangedRevision: 1492044 $ import os, sys, subprocess import filecmp @@ -600,6 +600,12 @@ def _create_mime_types_file(self): def _create_dontdothat_file(self): "Create empty mime.types file" + # If the tests have not previously been run or were cleaned + # up, then 'svn-test-work' does not exist yet. + parent_dir = os.path.dirname(self.dontdothat_file) + if not os.path.exists(parent_dir): + os.makedirs(parent_dir) + fp = open(self.dontdothat_file, 'w') fp.write('[recursive-actions]\n') fp.write('/ = deny\n')