You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2010/11/26 19:55:54 UTC

svn commit: r1039511 [1/5] - in /subversion/branches/performance: ./ build/ subversion/bindings/swig/perl/native/ subversion/bindings/swig/ruby/test/ subversion/include/ subversion/include/private/ subversion/libsvn_client/ subversion/libsvn_delta/ sub...

Author: stefan2
Date: Fri Nov 26 18:55:51 2010
New Revision: 1039511

URL: http://svn.apache.org/viewvc?rev=1039511&view=rev
Log:
On the performance branch:
Bring up-to-date with trunk.

Added:
    subversion/branches/performance/subversion/tests/cmdline/dav-mirror-autocheck.sh
      - copied unchanged from r1039497, subversion/trunk/subversion/tests/cmdline/dav-mirror-autocheck.sh
    subversion/branches/performance/tools/buildbot/slaves/svn-openbsd-i386/
      - copied from r1039497, subversion/trunk/tools/buildbot/slaves/svn-openbsd-i386/
Modified:
    subversion/branches/performance/   (props changed)
    subversion/branches/performance/CHANGES
    subversion/branches/performance/Makefile.in
    subversion/branches/performance/build/run_tests.py
    subversion/branches/performance/gen-make.py
    subversion/branches/performance/subversion/bindings/swig/perl/native/Makefile.PL.in
    subversion/branches/performance/subversion/bindings/swig/ruby/test/util.rb
    subversion/branches/performance/subversion/include/private/svn_dav_protocol.h
    subversion/branches/performance/subversion/include/private/svn_mergeinfo_private.h
    subversion/branches/performance/subversion/include/svn_client.h
    subversion/branches/performance/subversion/include/svn_dirent_uri.h
    subversion/branches/performance/subversion/include/svn_fs.h
    subversion/branches/performance/subversion/include/svn_ra.h
    subversion/branches/performance/subversion/include/svn_repos.h
    subversion/branches/performance/subversion/include/svn_types.h
    subversion/branches/performance/subversion/include/svn_wc.h
    subversion/branches/performance/subversion/libsvn_client/add.c
    subversion/branches/performance/subversion/libsvn_client/changelist.c
    subversion/branches/performance/subversion/libsvn_client/cleanup.c
    subversion/branches/performance/subversion/libsvn_client/commit.c
    subversion/branches/performance/subversion/libsvn_client/copy.c
    subversion/branches/performance/subversion/libsvn_client/export.c
    subversion/branches/performance/subversion/libsvn_client/info.c
    subversion/branches/performance/subversion/libsvn_client/list.c
    subversion/branches/performance/subversion/libsvn_client/log.c
    subversion/branches/performance/subversion/libsvn_client/merge.c
    subversion/branches/performance/subversion/libsvn_client/mergeinfo.c
    subversion/branches/performance/subversion/libsvn_client/mergeinfo.h
    subversion/branches/performance/subversion/libsvn_client/patch.c
    subversion/branches/performance/subversion/libsvn_client/relocate.c
    subversion/branches/performance/subversion/libsvn_client/resolved.c
    subversion/branches/performance/subversion/libsvn_client/revert.c
    subversion/branches/performance/subversion/libsvn_client/status.c
    subversion/branches/performance/subversion/libsvn_client/switch.c
    subversion/branches/performance/subversion/libsvn_client/update.c
    subversion/branches/performance/subversion/libsvn_delta/path_driver.c
    subversion/branches/performance/subversion/libsvn_diff/parse-diff.c
    subversion/branches/performance/subversion/libsvn_fs/fs-loader.c
    subversion/branches/performance/subversion/libsvn_fs/fs-loader.h
    subversion/branches/performance/subversion/libsvn_fs_base/dag.c
    subversion/branches/performance/subversion/libsvn_fs_base/fs.c
    subversion/branches/performance/subversion/libsvn_fs_base/tree.c
    subversion/branches/performance/subversion/libsvn_fs_base/tree.h
    subversion/branches/performance/subversion/libsvn_fs_fs/dag.c
    subversion/branches/performance/subversion/libsvn_fs_fs/fs.c
    subversion/branches/performance/subversion/libsvn_fs_fs/fs_fs.c
    subversion/branches/performance/subversion/libsvn_fs_fs/lock.c
    subversion/branches/performance/subversion/libsvn_fs_fs/tree.c
    subversion/branches/performance/subversion/libsvn_fs_fs/tree.h
    subversion/branches/performance/subversion/libsvn_ra/deprecated.c
    subversion/branches/performance/subversion/libsvn_ra/ra_loader.c
    subversion/branches/performance/subversion/libsvn_ra/ra_loader.h
    subversion/branches/performance/subversion/libsvn_ra_local/ra_plugin.c
    subversion/branches/performance/subversion/libsvn_ra_neon/mergeinfo.c
    subversion/branches/performance/subversion/libsvn_ra_neon/options.c
    subversion/branches/performance/subversion/libsvn_ra_neon/ra_neon.h
    subversion/branches/performance/subversion/libsvn_ra_serf/mergeinfo.c
    subversion/branches/performance/subversion/libsvn_ra_serf/options.c
    subversion/branches/performance/subversion/libsvn_ra_serf/ra_serf.h
    subversion/branches/performance/subversion/libsvn_ra_svn/client.c
    subversion/branches/performance/subversion/libsvn_repos/fs-wrap.c
    subversion/branches/performance/subversion/libsvn_repos/replay.c
    subversion/branches/performance/subversion/libsvn_repos/reporter.c
    subversion/branches/performance/subversion/libsvn_subr/constructors.c
    subversion/branches/performance/subversion/libsvn_subr/dirent_uri.c
    subversion/branches/performance/subversion/libsvn_subr/mergeinfo.c
    subversion/branches/performance/subversion/libsvn_wc/copy.c
    subversion/branches/performance/subversion/libsvn_wc/entries.c
    subversion/branches/performance/subversion/libsvn_wc/entries.h
    subversion/branches/performance/subversion/libsvn_wc/status.c
    subversion/branches/performance/subversion/libsvn_wc/upgrade.c
    subversion/branches/performance/subversion/libsvn_wc/wc-queries.sql
    subversion/branches/performance/subversion/libsvn_wc/wc_db.c
    subversion/branches/performance/subversion/libsvn_wc/wc_db.h
    subversion/branches/performance/subversion/libsvn_wc/workqueue.c
    subversion/branches/performance/subversion/mod_dav_svn/reports/mergeinfo.c
    subversion/branches/performance/subversion/mod_dav_svn/repos.c
    subversion/branches/performance/subversion/svn/add-cmd.c
    subversion/branches/performance/subversion/svn/changelist-cmd.c
    subversion/branches/performance/subversion/svn/cleanup-cmd.c
    subversion/branches/performance/subversion/svn/export-cmd.c
    subversion/branches/performance/subversion/svn/import-cmd.c
    subversion/branches/performance/subversion/svn/log-cmd.c
    subversion/branches/performance/subversion/svn/main.c
    subversion/branches/performance/subversion/svn/notify.c
    subversion/branches/performance/subversion/svn/patch-cmd.c
    subversion/branches/performance/subversion/svn/relocate-cmd.c
    subversion/branches/performance/subversion/svn/resolve-cmd.c
    subversion/branches/performance/subversion/svn/resolved-cmd.c
    subversion/branches/performance/subversion/svn/revert-cmd.c
    subversion/branches/performance/subversion/svn/status-cmd.c
    subversion/branches/performance/subversion/svn/switch-cmd.c
    subversion/branches/performance/subversion/svn/update-cmd.c
    subversion/branches/performance/subversion/svn/upgrade-cmd.c
    subversion/branches/performance/subversion/svndumpfilter/main.c
    subversion/branches/performance/subversion/svnlook/main.c
    subversion/branches/performance/subversion/svnrdump/dump_editor.c
    subversion/branches/performance/subversion/svnrdump/load_editor.c
    subversion/branches/performance/subversion/svnserve/main.c
    subversion/branches/performance/subversion/svnserve/serve.c
    subversion/branches/performance/subversion/tests/cmdline/authz_tests.py
    subversion/branches/performance/subversion/tests/cmdline/copy_tests.py
    subversion/branches/performance/subversion/tests/cmdline/export_tests.py
    subversion/branches/performance/subversion/tests/cmdline/import_tests.py
    subversion/branches/performance/subversion/tests/cmdline/input_validation_tests.py
    subversion/branches/performance/subversion/tests/cmdline/log_tests.py
    subversion/branches/performance/subversion/tests/cmdline/merge_reintegrate_tests.py
    subversion/branches/performance/subversion/tests/cmdline/merge_tests.py
    subversion/branches/performance/subversion/tests/cmdline/mergeinfo_tests.py
    subversion/branches/performance/subversion/tests/cmdline/redirect_tests.py
    subversion/branches/performance/subversion/tests/cmdline/schedule_tests.py
    subversion/branches/performance/subversion/tests/cmdline/svnsync_tests.py
    subversion/branches/performance/subversion/tests/cmdline/svnsync_tests_data/descend_into_replace.dump
    subversion/branches/performance/subversion/tests/cmdline/svnsync_tests_data/descend_into_replace.expected.dump
    subversion/branches/performance/subversion/tests/cmdline/svntest/actions.py
    subversion/branches/performance/subversion/tests/cmdline/svntest/main.py
    subversion/branches/performance/subversion/tests/cmdline/update_tests.py
    subversion/branches/performance/subversion/tests/cmdline/upgrade_tests.py
    subversion/branches/performance/subversion/tests/cmdline/upgrade_tests_data/delete-in-copy.tar.bz2
    subversion/branches/performance/subversion/tests/libsvn_subr/dirent_uri-test.c
    subversion/branches/performance/subversion/tests/libsvn_wc/op-depth-test.c
    subversion/branches/performance/tools/dev/unix-build/Makefile.svn
    subversion/branches/performance/tools/dist/collect_sigs.py
    subversion/branches/performance/tools/dist/dist.sh

Propchange: subversion/branches/performance/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Nov 26 18:55:51 2010
@@ -19,6 +19,7 @@
 /subversion/branches/issue-3220-dev:872210-872226
 /subversion/branches/issue-3242-dev:879653-896436
 /subversion/branches/issue-3334-dirs:875156-875867
+/subversion/branches/issue-3668-3669:1031000-1035744
 /subversion/branches/kwallet:870785-871314
 /subversion/branches/log-g-performance:870941-871032
 /subversion/branches/merge-skips-obstructions:874525-874615
@@ -38,4 +39,4 @@
 /subversion/branches/tc_url_rev:874351-874483
 /subversion/branches/tree-conflicts:868291-873154
 /subversion/branches/tree-conflicts-notify:873926-874008
-/subversion/trunk:962911-1035839
+/subversion/trunk:962911-1039497

Modified: subversion/branches/performance/CHANGES
URL: http://svn.apache.org/viewvc/subversion/branches/performance/CHANGES?rev=1039511&r1=1039510&r2=1039511&view=diff
==============================================================================
--- subversion/branches/performance/CHANGES (original)
+++ subversion/branches/performance/CHANGES Fri Nov 26 18:55:51 2010
@@ -1,18 +1,32 @@
-Version 1.6.14
-(?? Nov 2010, from /branches/1.6.x)
-http://svn.apache.org/repos/asf/subversion/tags/1.6.14
+Version 1.6.15
+(26 Nov 2010, from /branches/1.6.x)
+http://svn.apache.org/repos/asf/subversion/tags/1.6.15
 
   User-visible changes:
-   * improve svnsync handling of dir copies (r962377, -8)
    * hide unreadable dirs in mod_dav_svn's GET response (r996884)
    * make 'svnmucc propsetf' actually work (r1005446)
    * limit memory fragmentation in svnserve (r1022675)
    * fix 'svn export' regression from 1.6.13 (r1032970)
    * fix 'svn export' mistakenly uri-encodes paths (issue #3745)
    * fix server-side memory leaks triggered by 'blame -g' (r1032808)
+   * prevent crash in mod_dav_svn when using SVNParentPath (r1033166)
+   * allow 'log -g' to continue in the face of invalid mergeinfo (r1028108)
+   * filter unreadable paths for 'svn ls' and 'svn co' (r997026, -070, -474)
+   * fix abort in 'svn blame -g' (issue #3666)
+   * fix file handle leak in ruby bindings (issue #3512)
+   * remove check for 1.7-style working copies (issue #3729)
 
   Developer-visible changes:
+   * improve some swig parameter mapping (r984565, r1035745)
    * improve test accuracy over dav (r991534, r877814)
+   * create fails.log for test runs (r964349)
+   * improve detection of 'svnversion' when buildling (r877219, et al)
+   * don't violate API layering in dumpstream logic (issue #3733)
+   * don't report working copy installs as switched (r1033921)
+
+
+Version 1.6.14
+(Not released, see changes for 1.6.15.)
 
 
 Version 1.6.13
@@ -429,6 +443,32 @@ http://svn.apache.org/repos/asf/subversi
     * fix building Ruby bindings with Ruby 1.9 (r35852, r35883)
 
 
+Version 1.5.8
+(?? ??? 2010, from /branches/1.5.x)
+http://svn.apache.org/repos/asf/subversion/tags/1.5.8
+
+ User-visible changes:
+  * fix proxying of LOCK and UNLOCK requests with WebDAV proxies (r36159)
+  * improve performance of --ignore-ancestry merges (r36256)
+  * avoid crash with when using subtree mergeinfo (r36613, -13, -31, -41)
+  * improve merge correctness with non-inheritable mergeinfo (r36789)
+  * fixed: repeated mergeinfo of conflicting properties fails (issue #3250)
+  * fix segfault in wc->URL copy (r37646, -56)
+  * make 'svn up --set-depth infinity' expand shallow subtrees (r37169)
+  * make default depth of 'svn merge' infinity (r37156)
+  * error if attempting to reintegrate to/from the repo root (r37385)
+  * improve memory performance in 'svn merge' (issue #3393)
+  * fixed: 'SVNPathAuthz short_circuit' unsolicited read access (issue #3695)
+           See CVE-2010-3315, and descriptive advisory at
+           http://subversion.apache.org/security/CVE-2010-3315-advisory.txt
+  * prevent crash in mod_dav_svn when using SVNParentPath (r1033166)
+
+ Developer-visible changes:
+  * fix pointer dereference (r36783)
+  * fix error leak (r36860)
+  * make basic_tests 12 compatible with Windows and Python 2.5+ (r35930)
+
+
 Version 1.5.7
 (06 Aug 2009, from /branches/1.5.x)
 http://svn.apache.org/repos/asf/subversion/tags/1.5.7

Modified: subversion/branches/performance/Makefile.in
URL: http://svn.apache.org/viewvc/subversion/branches/performance/Makefile.in?rev=1039511&r1=1039510&r2=1039511&view=diff
==============================================================================
--- subversion/branches/performance/Makefile.in (original)
+++ subversion/branches/performance/Makefile.in Fri Nov 26 18:55:51 2010
@@ -722,10 +722,16 @@ $(SWIG_PL_DIR)/native/Makefile.PL: $(SWI
 $(SWIG_PL_DIR)/native/Makefile: $(SWIG_PL_DIR)/native/Makefile.PL
 	cd $(SWIG_PL_DIR)/native; $(PERL) Makefile.PL
 
+# There is a "readlink -f" command on some systems for the same purpose,
+# but it's not as portable (e.g. Mac OS X doesn't have it).  These should
+# only be used where Python/Perl are known to be available.
+READLINK_PY=$(PYTHON) -c 'import sys,os; print(os.path.realpath(sys.argv[1]))'
+READLINK_PL=$(PERL) -e 'use Cwd; print Cwd::realpath(shift)'
+
 swig-pl_DEPS = autogen-swig-pl libsvn_swig_perl \
   $(SWIG_PL_DIR)/native/Makefile
 swig-pl: $(swig-pl_DEPS)
-	if test "$(SWIG_PL_DIR)" != "$(SWIG_PL_SRC_DIR)"; then \
+	if test "`$(READLINK_PL) $(SWIG_PL_DIR)`" != "`$(READLINK_PL) $(SWIG_PL_SRC_DIR)`"; then \
 	  ln -sf $(SWIG_PL_SRC_DIR)/native/*.c $(SWIG_PL_DIR)/native; \
 	fi
 	cd $(SWIG_PL_DIR)/native; $(MAKE) OPTIMIZE="" OTHERLDFLAGS="$(SWIG_LDFLAGS)"

Modified: subversion/branches/performance/build/run_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/performance/build/run_tests.py?rev=1039511&r1=1039510&r2=1039511&view=diff
==============================================================================
--- subversion/branches/performance/build/run_tests.py (original)
+++ subversion/branches/performance/build/run_tests.py Fri Nov 26 18:55:51 2010
@@ -345,9 +345,6 @@ class TestHarness:
       dots_to_write = dots - self.dots_written
       if self.log:
         os.write(old_stdout, '.' * dots_to_write)
-      else:
-        sys.stdout.write(old_stdout, '.' * dots_to_write)
-        sys.stdout.flush()
 
       self.dots_written = dots
 
@@ -390,6 +387,9 @@ class TestHarness:
       test_info = '%s [%d/%d]' % (progbase, test_nr + 1, total_tests)
       sys.stdout.write('Running tests in %s' % (test_info, ))
       sys.stdout.flush()
+    else:
+      # ### Hack for --log-to-stdout to work (but not print any dots).
+      test_info = ''
 
     log.write('START: %s\n' % progbase)
     log.flush()

Modified: subversion/branches/performance/gen-make.py
URL: http://svn.apache.org/viewvc/subversion/branches/performance/gen-make.py?rev=1039511&r1=1039510&r2=1039511&view=diff
==============================================================================
--- subversion/branches/performance/gen-make.py (original)
+++ subversion/branches/performance/gen-make.py Fri Nov 26 18:55:51 2010
@@ -93,8 +93,10 @@ def _objinfo(o):
     return "%s: %s %s" % (t,n,f)
 
 
-def _usage_exit():
-  "print usage, exit the script"
+def _usage_exit(err=None):
+  "print ERR (if any), print usage, then exit the script"
+  if err:
+    print("ERROR: %s\n" % (err))
   print("USAGE:  gen-make.py [options...] [conf-file]")
   print("  -s        skip dependency generation")
   print("  --debug   print lots of stuff only developers care about")
@@ -261,9 +263,9 @@ if __name__ == '__main__':
                             'vsnet-version=',
                             ])
     if len(args) > 1:
-      _usage_exit()
-  except getopt.GetoptError:
-    _usage_exit()
+      _usage_exit("Too many arguments")
+  except getopt.GetoptError, e:
+    _usage_exit(str(e))
 
   conf = 'build.conf'
   skip = 0
@@ -306,7 +308,7 @@ if __name__ == '__main__':
   opt_conf.close()
 
   if gentype not in gen_modules.keys():
-    _usage_exit()
+    _usage_exit("Unknown module type '%s'" % (gentype))
 
   main(conf, gentype, skip_depends=skip, other_options=rest.list)
 

Modified: subversion/branches/performance/subversion/bindings/swig/perl/native/Makefile.PL.in
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/bindings/swig/perl/native/Makefile.PL.in?rev=1039511&r1=1039510&r2=1039511&view=diff
==============================================================================
--- subversion/branches/performance/subversion/bindings/swig/perl/native/Makefile.PL.in (original)
+++ subversion/branches/performance/subversion/bindings/swig/perl/native/Makefile.PL.in Fri Nov 26 18:55:51 2010
@@ -37,15 +37,11 @@ my $swig_srcdir = "${svnlib_srcdir}/bind
 my $swig_builddir = "${svnlib_builddir}/bindings/swig";
 
 my @modules = qw/client delta fs ra repos wc/;
-my @ldpaths = ("$swig_builddir/perl/libsvn_swig_perl/.libs",
-               map {"$svnlib_builddir/libsvn_$_/.libs"} (@modules, qw/diff subr
-                                                                      ra_local
-                                                                      ra_svn
-                                                                      ra_neon
-                                                                      ra_serf
-                                                                      fs_base
-                                                                      fs_util
-                                                                      fs_fs/));
+my @ldpaths = (abs_path($swig_builddir) . "/perl/libsvn_swig_perl/.libs",
+               map { abs_path($svnlib_builddir) . "/libsvn_$_/.libs" }
+                   @modules, qw/diff subr ra_local ra_svn ra_neon
+                                ra_serf fs_base fs_util fs_fs/);
+
 my @ldmodules = map {"-lsvn_$_-1"} (@modules, qw/diff subr/);
 
 my $apr_shlib_path_var = '@SVN_APR_SHLIB_PATH_VAR@';
@@ -72,7 +68,7 @@ my %config = (
                  " -I$swig_srcdir -g"),
     OBJECT => q/$(O_FILES)/,
     LIBS => [join(' ', $apr_ldflags,
-                  (map {$_ = abs_path($_); "-L$_"} @ldpaths),
+                  (map {"-L$_"} @ldpaths),
                   @ldmodules, '-lsvn_swig_perl-1',
                   `$swig -perl -ldflags`)],
     test => { TESTS => "$swig_srcdir/perl/native/t/*.t" }
@@ -108,13 +104,12 @@ for (@modules) {
 # the dependencies need to be fixed
 
 sub MY::postamble {
-   package MY ;
-   
-   my $module_c_files = join (' ',map { "svn_$_.c"} @modules);
-   my $module_make_commands = join ('',map {"\t\$(MAKE) -f Makefile.$_\n"} @modules);
+    my $module_c_files = join (' ',map { "svn_$_.c"} @modules);
+    my $module_make_commands = join ('',map {"\t\$(MAKE) -f Makefile.$_\n"} @modules);
+
+    my $fullperlrun = "$apr_shlib_path_var=" .
+                      join(':', "\$($apr_shlib_path_var)", @ldpaths);
 
-  my $fullperlrun = "$apr_shlib_path_var=\${$apr_shlib_path_var}:" . join(':',@ldpaths);
-  
    return <<"EOPOST";
 all :: modules
 test :: modules

Modified: subversion/branches/performance/subversion/bindings/swig/ruby/test/util.rb
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/bindings/swig/ruby/test/util.rb?rev=1039511&r1=1039510&r2=1039511&view=diff
==============================================================================
--- subversion/branches/performance/subversion/bindings/swig/ruby/test/util.rb (original)
+++ subversion/branches/performance/subversion/bindings/swig/ruby/test/util.rb Fri Nov 26 18:55:51 2010
@@ -260,6 +260,9 @@ realm = #{@realm}
           @svnserve_port = port
           @repos_svnserve_uri =
             "svn://#{@svnserve_host}:#{@svnserve_port}#{@full_repos_path}"
+          # Avoid a race by waiting a short time for svnserve to start up.
+          # Without this, tests can fail with "Connection refused" errors.
+          sleep 0.1
           break
         end
       end

Modified: subversion/branches/performance/subversion/include/private/svn_dav_protocol.h
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/include/private/svn_dav_protocol.h?rev=1039511&r1=1039510&r2=1039511&view=diff
==============================================================================
--- subversion/branches/performance/subversion/include/private/svn_dav_protocol.h (original)
+++ subversion/branches/performance/subversion/include/private/svn_dav_protocol.h Fri Nov 26 18:55:51 2010
@@ -43,6 +43,7 @@ extern "C" {
 #define SVN_DAV__PATH "path"
 #define SVN_DAV__INHERIT "inherit"
 #define SVN_DAV__REVISION "revision"
+#define SVN_DAV__VALIDATE_INHERITED "validate-inherited"
 #define SVN_DAV__INCLUDE_DESCENDANTS "include-descendants"
 #define SVN_DAV__VERSION_NAME "version-name"
 

Modified: subversion/branches/performance/subversion/include/private/svn_mergeinfo_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/include/private/svn_mergeinfo_private.h?rev=1039511&r1=1039510&r2=1039511&view=diff
==============================================================================
--- subversion/branches/performance/subversion/include/private/svn_mergeinfo_private.h (original)
+++ subversion/branches/performance/subversion/include/private/svn_mergeinfo_private.h Fri Nov 26 18:55:51 2010
@@ -112,14 +112,15 @@ svn_mergeinfo__add_prefix_to_catalog(svn
                                      apr_pool_t *result_pool,
                                      apr_pool_t *scratch_pool);
 
-/* Makes a deep copy of MERGEINFO in *OUT_MERGEINFO.  If SUFFIX_REL_PATH is
-   a valid relative path then add it to the end of each key path in
-   *OUT_MERGEINFO.  *OUT_MERGEINFO is allocated in RESULT_POOL.  SCRATCH_POOL
-   is used for any temporary allocations. */
+/* Set *OUT_MERGEINFO to a deep copy of MERGEINFO with the relpath
+   SUFFIX_RELPATH added to the end of each key path.
+
+   Allocate *OUT_MERGEINFO in RESULT_POOL.  Use SCRATCH_POOL for any
+   temporary allocations. */
 svn_error_t *
 svn_mergeinfo__add_suffix_to_mergeinfo(svn_mergeinfo_t *out_mergeinfo,
                                        svn_mergeinfo_t mergeinfo,
-                                       const char *suffix,
+                                       const char *suffix_relpath,
                                        apr_pool_t *result_pool,
                                        apr_pool_t *scratch_pool);
 

Modified: subversion/branches/performance/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/include/svn_client.h?rev=1039511&r1=1039510&r2=1039511&view=diff
==============================================================================
--- subversion/branches/performance/subversion/include/svn_client.h (original)
+++ subversion/branches/performance/subversion/include/svn_client.h Fri Nov 26 18:55:51 2010
@@ -1149,10 +1149,11 @@ svn_client_checkout(svn_revnum_t *result
  * Update working trees @a paths to @a revision, authenticating with the
  * authentication baton cached in @a ctx.  @a paths is an array of const
  * char * paths to be updated.  Unversioned paths that are direct children
- * of a versioned path will cause an update that attempts to add that path,
- * other unversioned paths are skipped.  If @a result_revs is not
- * @c NULL an array of svn_revnum_t will be returned with each element set
- * to the revision to which @a revision was resolved.
+ * of a versioned path will cause an update that attempts to add that path;
+ * other unversioned paths are skipped.  If @a result_revs is not NULL,
+ * @a *result_revs will be set to an array of svn_revnum_t with each
+ * element set to the revision to which @a revision was resolved for the
+ * corresponding element of @a paths.
  *
  * @a revision must be of kind #svn_opt_revision_number,
  * #svn_opt_revision_head, or #svn_opt_revision_date.  If @a
@@ -2302,7 +2303,7 @@ svn_client_status(svn_revnum_t *result_r
 
 /**
  * Invoke @a receiver with @a receiver_baton on each log message from
- * each start/end revision pair in the @a revision_ranges in turn,
+ * each (#svn_opt_revision_range_t *) range in @a revision_ranges in turn,
  * inclusive (but never invoke @a receiver on a given log message more
  * than once).
  *
@@ -4485,11 +4486,13 @@ svn_client_revprop_list(apr_hash_t **pro
  * @a from_path_or_url is either the path the working copy on disk, or
  * a URL to the repository you wish to export.
  *
- * When exporting a directory @a to_path is the path to the directory
- * where you wish to create the exported tree, when exporting a file
- * it is the path of the file that will be created.  If @a to_path is
- * the empty path the name of the file/directory in the repository
- * will be used.
+ * When exporting a directory, @a to_path is the path to the directory
+ * where you wish to create the exported tree; when exporting a file, it
+ * is the path of the file that will be created.  If @a to_path is the
+ * empty path, then the basename of the export file/directory in the repository
+ * will be used.  If @a to_path represents an existing directory, and a
+ * file is being exported, then a file with the that basename will be
+ * created under that directory (as with 'copy' operations).
  *
  * @a peg_revision is the revision where the path is first looked up
  * when exporting from a repository.  If @a peg_revision->kind is

Modified: subversion/branches/performance/subversion/include/svn_dirent_uri.h
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/include/svn_dirent_uri.h?rev=1039511&r1=1039510&r2=1039511&view=diff
==============================================================================
--- subversion/branches/performance/subversion/include/svn_dirent_uri.h (original)
+++ subversion/branches/performance/subversion/include/svn_dirent_uri.h Fri Nov 26 18:55:51 2010
@@ -322,10 +322,10 @@ svn_relpath_dirname(const char *relpath,
  *
  * If @a dirpath or @a base_name is NULL, then don't set that one.
  *
- * Either @a dirpath or @a base_name may be @a dirent's own address, but they
+ * Either @a dirpath or @a base_name may be @a uri's own address, but they
  * may not both be the same address, or the results are undefined.
  *
- * If @a dirent has two or more components, the separator between @a dirpath
+ * If @a uri has two or more components, the separator between @a dirpath
  * and @a base_name is not included in either of the new names.
  *
  *   examples:
@@ -344,11 +344,11 @@ svn_uri_split(const char **dirpath,
               apr_pool_t *pool);
 
 /** Get the basename of the specified canonicalized @a uri.  The
- * basename is defined as the last component of the uri.  If the @a dirent
+ * basename is defined as the last component of the uri.  If the @a uri
  * is root then that is returned. Otherwise, the returned value will have no
  * slashes in it.
  *
- * Example: svn_dirent_basename("http://server/foo/bar") -> "bar"
+ * Example: svn_uri_basename("http://server/foo/bar") -> "bar"
  *
  * The returned basename will be allocated in @a pool. If @a pool is NULL
  * a pointer to the basename in @a uri is returned.
@@ -362,9 +362,9 @@ svn_uri_basename(const char *uri,
                  apr_pool_t *pool);
 
 /** Get the dirname of the specified canonicalized @a uri, defined as
- * the dirent with its basename removed.
+ * the uri with its basename removed.
  *
- * If @a dirent is root  (e.g. "http://server"), it is returned
+ * If @a uri is root (e.g. "http://server"), it is returned
  * unchanged.
  *
  * The returned dirname will be allocated in @a pool.
@@ -653,6 +653,9 @@ svn_uri_is_ancestor(const char *parent_u
  * This function assumes @a parent_dirent and @a child_dirent are both
  * absolute or relative in the same way.
  *
+ * ### Returning the child in the no-match case is a bad idea when the
+ *     paths are relative; can be useful when they are absolute.
+ *
  * @since New in 1.7.
  */
 const char *
@@ -664,6 +667,8 @@ svn_dirent_skip_ancestor(const char *par
  * @a child_relpath. If @a child_relpath is not below @a parent_relpath,
  * return @a child_relpath.
  *
+ * ### Returning the child in the no-match case is a bad idea.
+ *
  * @since New in 1.7.
  */
 const char *
@@ -677,6 +682,9 @@ svn_relpath_skip_ancestor(const char *pa
  * This function assumes @a parent_uri and @a child_uri are both absolute or
  * relative in the same way.
  *
+ * ### Returning the child in the no-match case is a bad idea when the
+ *     paths are relative; can be useful when they are absolute.
+ *
  * @since New in 1.7.
  */
 const char *
@@ -737,7 +745,7 @@ svn_dirent_condense_targets(const char *
  *     to an array of targets relative to @a *pcommon, and if @a
  *     remove_redundancies is TRUE, omit any uris that are descendants of
  *     another uri in @a targets.  If *pcommon is empty, @a
- *     *pcondensed_targets will contain absolute dirents; redundancies
+ *     *pcondensed_targets will contain absolute uris; redundancies
  *     can still be removed.  If @a pcondensed_targets is NULL, leave it
  *     alone.
  *
@@ -803,6 +811,126 @@ svn_uri_get_file_url_from_dirent(const c
                                  const char *dirent,
                                  apr_pool_t *pool);
 
+
+/**************************************************************************
+ * A private API for Subversion filesystem paths, otherwise known as paths
+ * within a repository, that start with a '/'.  The rules for a fspath are
+ * the same as for a relpath except for the leading '/'.  A fspath never
+ * ends with '/' except when the whole path is just '/'.
+ **************************************************************************/
+
+/** Return TRUE iff @a fspath is canonical.
+ * @a fspath need not be canonical, of course.
+ *
+ * @since New in 1.7.
+ */
+svn_boolean_t
+svn_fspath__is_canonical(const char *fspath);
+
+
+/** Return the dirname of @a fspath, defined as the path with its basename
+ * removed.  If @a fspath is "/", return "/".
+ *
+ * Allocate the result in @a pool.
+ *
+ * @since New in 1.7.
+ */
+const char *
+svn_fspath__dirname(const char *fspath,
+                    apr_pool_t *pool);
+
+/** Return the last component of @a fspath.  The returned value will have no
+ * slashes in it.  If @a fspath is "/", return "".
+ *
+ * If @a pool is NULL, return a pointer to within @a fspath, else allocate
+ * the result in @a pool.
+ *
+ * @since New in 1.7.
+ */
+const char *
+svn_fspath__basename(const char *fspath,
+                     apr_pool_t *pool);
+
+/** Divide the canonical @a fspath into @a *dirpath and @a
+ * *base_name, allocated in @a pool.
+ *
+ * If @a dirpath or @a base_name is NULL, then don't set that one.
+ *
+ * Either @a dirpath or @a base_name may be @a fspath's own address, but they
+ * may not both be the same address, or the results are undefined.
+ *
+ * If @a fspath has two or more components, the separator between @a dirpath
+ * and @a base_name is not included in either of the new names.
+ *
+ * @since New in 1.7.
+ */
+void
+svn_fspath__split(const char **dirpath,
+                  const char **base_name,
+                  const char *fspath,
+                  apr_pool_t *result_pool);
+
+/** Return the fspath composed of @a fspath with @a relpath appended.
+ * Allocate the result in @a result_pool.
+ *
+ * @since New in 1.7.
+ */
+char *
+svn_fspath__join(const char *fspath,
+                 const char *relpath,
+                 apr_pool_t *result_pool);
+
+
+/** Test if @a child_fspath is a child of @a parent_fspath.  If not, return
+ * NULL.  If so, return the relpath which, if joined to @a parent_fspath,
+ * would yield @a child_fspath.
+ *
+ * If @a child_fspath is the same as @a parent_fspath, it is not considered
+ * a child, so the result is NULL; an empty string is never returned.
+ *
+ * If @a pool is NULL, a pointer into @a child_fspath will be returned to
+ * identify the remainder fspath.
+ *
+ * @since New in 1.7.
+ */
+const char *
+svn_fspath__is_child(const char *parent_fspath,
+                     const char *child_fspath,
+                     apr_pool_t *pool);
+
+/** Return the relative path part of @a child_fspath that is below
+ * @a parent_fspath, or just "" if @a parent_fspath is equal to
+ * @a child_fspath. If @a child_fspath is not below @a parent_fspath,
+ * return @a child_fspath.
+ *
+ * ### Returning the child in the no-match case is a bad idea.
+ *
+ * @since New in 1.7.
+ */
+const char *
+svn_fspath__skip_ancestor(const char *parent_fspath,
+                          const char *child_fspath);
+
+/** Return TRUE if @a parent_fspath is an ancestor of @a child_fspath or
+ * the fspaths are equal, and FALSE otherwise.
+ *
+ * @since New in 1.7.
+ */
+svn_boolean_t
+svn_fspath__is_ancestor(const char *parent_fspath,
+                        const char *child_fspath);
+
+/** Return the longest common path shared by two fspaths, @a fspath1 and
+ * @a fspath2.  If there's no common ancestor, return "/".
+ *
+ * @since New in 1.7.
+ */
+char *
+svn_fspath__get_longest_ancestor(const char *fspath1,
+                                 const char *fspath2,
+                                 apr_pool_t *result_pool);
+
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/branches/performance/subversion/include/svn_fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/include/svn_fs.h?rev=1039511&r1=1039510&r2=1039511&view=diff
==============================================================================
--- subversion/branches/performance/subversion/include/svn_fs.h (original)
+++ subversion/branches/performance/subversion/include/svn_fs.h Fri Nov 26 18:55:51 2010
@@ -1477,16 +1477,36 @@ svn_fs_closest_copy(svn_fs_root_t **root
  * @a inherit indicates whether to retrieve explicit,
  * explicit-or-inherited, or only inherited mergeinfo.
  *
+ * If the mergeinfo for any path is inherited and
+ * @a validate_inherited_mergeinfo is TRUE, then the mergeinfo for
+ * that path in @a *catalog will only contain merge source
+ * path-revisions that actually exist in repository.
+ *
  * If @a include_descendants is TRUE, then additionally return the
  * mergeinfo for any descendant of any element of @a paths which has
  * the #SVN_PROP_MERGEINFO property explicitly set on it.  (Note
  * that inheritance is only taken into account for the elements in @a
  * paths; descendants of the elements in @a paths which get their
- * mergeinfo via inheritance are not included in @a *mergeoutput.)
+ * mergeinfo via inheritance are not included in @a *catalog.)
  *
  * Do any necessary temporary allocation in @a pool.
  *
- * @since New in 1.5.
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_fs_get_mergeinfo2(svn_mergeinfo_catalog_t *catalog,
+                      svn_fs_root_t *root,
+                      const apr_array_header_t *paths,
+                      svn_mergeinfo_inheritance_t inherit,
+                      svn_boolean_t validate_inherited_mergeinfo,
+                      svn_boolean_t include_descendants,
+                      apr_pool_t *pool);
+
+/**
+ * Similar to svn_fs_get_mergeinfo2(), but with
+ * @a validate_inherited_mergeinfo always passed as FALSE.
+ *
+ * @deprecated Provided for backward compatibility with the 1.7 API.
  */
 svn_error_t *
 svn_fs_get_mergeinfo(svn_mergeinfo_catalog_t *catalog,
@@ -1496,6 +1516,25 @@ svn_fs_get_mergeinfo(svn_mergeinfo_catal
                      svn_boolean_t include_descendants,
                      apr_pool_t *pool);
 
+/**
+ * Set @a *validated_mergeinfo equal to deep copy of @a mergeinfo, less
+ * any mergeinfo that describes path-revs that do not exist in @a FS.
+ * If @a mergeinfo is empty then @a *validated_mergeinfo is set to an empty
+ * mergeinfo hash.  If @a mergeinfo is NULL then @a *validated_mergeinfo is
+ * set to NULL.
+ *
+ * @a *validated_mergeinfo is allocated in @a result_pool.  All tempporary
+ * allocations are performed in @a scratch_pool.
+ *
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_fs_validate_mergeinfo(svn_mergeinfo_t *validated_mergeinfo,
+                          svn_fs_t *fs,
+                          svn_mergeinfo_t mergeinfo,
+                          apr_pool_t *result_pool,
+                          apr_pool_t *scratch_pool);
+
 /** Merge changes between two nodes into a third node.
  *
  * Given nodes @a source and @a target, and a common ancestor @a ancestor,

Modified: subversion/branches/performance/subversion/include/svn_ra.h
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/include/svn_ra.h?rev=1039511&r1=1039510&r2=1039511&view=diff
==============================================================================
--- subversion/branches/performance/subversion/include/svn_ra.h (original)
+++ subversion/branches/performance/subversion/include/svn_ra.h Fri Nov 26 18:55:51 2010
@@ -1011,6 +1011,14 @@ svn_ra_get_dir(svn_ra_session_t *session
  * @a inherit indicates whether explicit, explicit or inherited, or
  * only inherited mergeinfo for @a paths is retrieved.
  *
+ * If the mergeinfo for any path is inherited and
+ * @a *validate_inherited_mergeinfo is TRUE, then request that the server
+ * validate the mergeinfo in @a *catalog, so it contains only merge source
+ * path-revisions that actually exist in repository.  If validation is
+ * requested and the server supports it, then set
+ * @a *validate_inherited_mergeinfo to TRUE on return.  Set it to FALSE
+ * in all other cases.
+ *
  * If @a include_descendants is TRUE, then additionally return the
  * mergeinfo for any descendant of any element of @a paths which has
  * the @c SVN_PROP_MERGEINFO property explicitly set on it.  (Note
@@ -1027,7 +1035,23 @@ svn_ra_get_dir(svn_ra_session_t *session
  * upgraded), return @c SVN_ERR_UNSUPPORTED_FEATURE in preference to
  * any other error that might otherwise be returned.
  *
- * @since New in 1.5.
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_ra_get_mergeinfo2(svn_ra_session_t *session,
+                      svn_mergeinfo_catalog_t *catalog,
+                      const apr_array_header_t *paths,
+                      svn_revnum_t revision,
+                      svn_mergeinfo_inheritance_t inherit,
+                      svn_boolean_t *validate_inherited_mergeinfo,
+                      svn_boolean_t include_descendants,
+                      apr_pool_t *pool);
+
+/**
+ * Similar to svn_ra_get_mergeinfo2(), but with
+ * @a validate_inherited_mergeinfo always passed as FALSE.
+ *
+ * @deprecated Provided for backward compatibility with the 1.7 API.
  */
 svn_error_t *
 svn_ra_get_mergeinfo(svn_ra_session_t *session,

Modified: subversion/branches/performance/subversion/include/svn_repos.h
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/include/svn_repos.h?rev=1039511&r1=1039510&r2=1039511&view=diff
==============================================================================
--- subversion/branches/performance/subversion/include/svn_repos.h (original)
+++ subversion/branches/performance/subversion/include/svn_repos.h Fri Nov 26 18:55:51 2010
@@ -1715,6 +1715,11 @@ svn_repos_get_logs(svn_repos_t *repos,
  * @a inherit indicates whether explicit, explicit or inherited, or
  * only inherited mergeinfo for @a paths is fetched.
  *
+ * If the mergeinfo for any path is inherited and
+ * @a validate_inherited_mergeinfo is TRUE, then the mergeinfo for
+ * that path in @a *catalog will only contain merge source
+ * path-revisions that actually exist in repository.
+ *
  * If @a revision is #SVN_INVALID_REVNUM, it defaults to youngest.
  *
  * If @a include_descendants is TRUE, then additionally return the
@@ -1731,7 +1736,25 @@ svn_repos_get_logs(svn_repos_t *repos,
  *
  * Use @a pool for all allocations.
  *
- * @since New in 1.5.
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_repos_fs_get_mergeinfo2(svn_mergeinfo_catalog_t *catalog,
+                            svn_repos_t *repos,
+                            const apr_array_header_t *paths,
+                            svn_revnum_t revision,
+                            svn_mergeinfo_inheritance_t inherit,
+                            svn_boolean_t validate_inherited_mergeinfo,
+                            svn_boolean_t include_descendants,
+                            svn_repos_authz_func_t authz_read_func,
+                            void *authz_read_baton,
+                            apr_pool_t *pool);
+
+/**
+ * Similar to svn_repos_fs_get_mergeinfo2(), but with
+ * @a validate_inherited_mergeinfo always passed as FALSE.
+ *
+ * @deprecated Provided for backward compatibility with the 1.7 API.
  */
 svn_error_t *
 svn_repos_fs_get_mergeinfo(svn_mergeinfo_catalog_t *catalog,

Modified: subversion/branches/performance/subversion/include/svn_types.h
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/include/svn_types.h?rev=1039511&r1=1039510&r2=1039511&view=diff
==============================================================================
--- subversion/branches/performance/subversion/include/svn_types.h (original)
+++ subversion/branches/performance/subversion/include/svn_types.h Fri Nov 26 18:55:51 2010
@@ -185,6 +185,9 @@ svn_node_kind_from_word(const char *word
  * that are just like booleans.  The values have been set deliberately to
  * make tristates disjoint from #svn_boolean_t.
  *
+ * @note It is unsafe to use apr_pcalloc() to allocate these, since '0' is
+ * not a valid value.
+ *
  * @since New in 1.7. */
 typedef enum
 {

Modified: subversion/branches/performance/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/include/svn_wc.h?rev=1039511&r1=1039510&r2=1039511&view=diff
==============================================================================
--- subversion/branches/performance/subversion/include/svn_wc.h (original)
+++ subversion/branches/performance/subversion/include/svn_wc.h Fri Nov 26 18:55:51 2010
@@ -1039,6 +1039,9 @@ typedef enum svn_wc_notify_action_t
    * which is unable to be operated on.  @since New in 1.6. */
   svn_wc_notify_failed_external,
 
+  /** Starting an update operation.  @since New in 1.7. */
+  svn_wc_notify_update_started,
+
   /** An update tried to add a file or directory at path but an
    * unversioned obstruction was found.  @since New in 1.7. */
   svn_wc_notify_update_obstruction,

Modified: subversion/branches/performance/subversion/libsvn_client/add.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_client/add.c?rev=1039511&r1=1039510&r2=1039511&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_client/add.c (original)
+++ subversion/branches/performance/subversion/libsvn_client/add.c Fri Nov 26 18:55:51 2010
@@ -576,9 +576,8 @@ svn_client_add4(const char *path,
   struct add_with_write_lock_baton baton;
 
   if (svn_path_is_url(path))
-    return svn_error_return(svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
-                                              _("'%s' is not a local path"),
-                                              path));
+    return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+                             _("'%s' is not a local path"), path);
 
   SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
 

Modified: subversion/branches/performance/subversion/libsvn_client/changelist.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_client/changelist.c?rev=1039511&r1=1039510&r2=1039511&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_client/changelist.c (original)
+++ subversion/branches/performance/subversion/libsvn_client/changelist.c Fri Nov 26 18:55:51 2010
@@ -114,11 +114,10 @@ svn_client_add_to_changelist(const apr_a
   for (i = 0; i < paths->nelts; i++)
     {
       const char *path = APR_ARRAY_IDX(paths, i, const char *);
+
       if (svn_path_is_url(path))
-        return svn_error_return(svn_error_createf(SVN_ERR_ILLEGAL_TARGET,
-                                                  NULL,
-                                                  _("'%s' is not a local path"),
-                                                  path));
+        return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+                                 _("'%s' is not a local path"), path);
     }
 
   if (changelists && changelists->nelts)
@@ -166,11 +165,10 @@ svn_client_remove_from_changelists(const
   for (i = 0; i < paths->nelts; i++)
     {
       const char *path = APR_ARRAY_IDX(paths, i, const char *);
+
       if (svn_path_is_url(path))
-        return svn_error_return(svn_error_createf(SVN_ERR_ILLEGAL_TARGET,
-                                                  NULL,
-                                                  _("'%s' is not a local path"),
-                                                  path));
+        return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+                                 _("'%s' is not a local path"), path);
     }
 
   if (changelists && changelists->nelts)

Modified: subversion/branches/performance/subversion/libsvn_client/cleanup.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_client/cleanup.c?rev=1039511&r1=1039510&r2=1039511&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_client/cleanup.c (original)
+++ subversion/branches/performance/subversion/libsvn_client/cleanup.c Fri Nov 26 18:55:51 2010
@@ -52,9 +52,8 @@ svn_client_cleanup(const char *path,
   svn_error_t *err;
 
   if (svn_path_is_url(path))
-    return svn_error_return(svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
-                                              _("'%s' is not a local path"),
-                                              path));
+    return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+                             _("'%s' is not a local path"), path);
 
   SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, scratch_pool));
 
@@ -130,9 +129,8 @@ svn_client_upgrade(const char *path,
   info_baton.last_uuid = NULL;
 
   if (svn_path_is_url(path))
-    return svn_error_return(svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
-                                              _("'%s' is not a local path"),
-                                              path));
+    return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+                             _("'%s' is not a local path"), path);
 
   SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, scratch_pool));
   SVN_ERR(svn_wc_upgrade(ctx->wc_ctx, local_abspath,

Modified: subversion/branches/performance/subversion/libsvn_client/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_client/commit.c?rev=1039511&r1=1039510&r2=1039511&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_client/commit.c (original)
+++ subversion/branches/performance/subversion/libsvn_client/commit.c Fri Nov 26 18:55:51 2010
@@ -697,9 +697,8 @@ svn_client_import4(const char *path,
   apr_pool_t *subpool;
 
   if (svn_path_is_url(path))
-    return svn_error_return(svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
-                                              _("'%s' is not a local path"),
-                                              path));
+    return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+                             _("'%s' is not a local path"), path);
 
   SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
   base_dir_abspath = local_abspath;

Modified: subversion/branches/performance/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_client/copy.c?rev=1039511&r1=1039510&r2=1039511&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_client/copy.c (original)
+++ subversion/branches/performance/subversion/libsvn_client/copy.c Fri Nov 26 18:55:51 2010
@@ -118,6 +118,8 @@ calculate_target_mergeinfo(svn_ra_sessio
 
   if (! locally_added)
     {
+      svn_boolean_t validate_inherited_mergeinfo = FALSE;
+
       /* Fetch any existing (explicit) mergeinfo.  We'll temporarily
          reparent to the target URL here, just to keep the code simple.
          We could, as an alternative, first see if the target URL was a
@@ -128,8 +130,9 @@ calculate_target_mergeinfo(svn_ra_sessio
                                                 ra_session, src_url, pool));
       SVN_ERR(svn_client__get_repos_mergeinfo(ra_session, &src_mergeinfo,
                                               "", src_revnum,
-                                              svn_mergeinfo_inherited,
-                                              TRUE, pool));
+                                              svn_mergeinfo_inherited, TRUE,
+                                              &validate_inherited_mergeinfo,
+                                              pool));
       if (old_session_url)
         SVN_ERR(svn_ra_reparent(ra_session, old_session_url, pool));
     }

Modified: subversion/branches/performance/subversion/libsvn_client/export.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_client/export.c?rev=1039511&r1=1039510&r2=1039511&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_client/export.c (original)
+++ subversion/branches/performance/subversion/libsvn_client/export.c Fri Nov 26 18:55:51 2010
@@ -95,6 +95,36 @@ get_eol_style(svn_subst_eol_style_t *sty
   return SVN_NO_ERROR;
 }
 
+/* If *APPENDABLE_DIRENT_P represents an existing directory, then append
+ * to it the basename of BASENAME_OF and return the result in
+ * *APPENDABLE_DIRENT_P.  The kind of BASENAME_OF is either dirent or uri,
+ * as given by IS_URI.
+ */
+static svn_error_t *
+append_basename_if_dir(const char **appendable_dirent_p,
+                       const char *basename_of,
+                       svn_boolean_t is_uri,
+                       apr_pool_t *pool)
+{
+  svn_node_kind_t local_kind;
+  SVN_ERR(svn_io_check_resolved_path(*appendable_dirent_p, &local_kind, pool));
+  if (local_kind == svn_node_dir)
+    {
+      const char *basename2; /* _2 because it shadows basename() */
+      
+      if (is_uri)
+        basename2 = svn_path_uri_decode(svn_uri_basename(basename_of, NULL), pool);
+      else
+        basename2 = svn_dirent_basename(basename_of, NULL);
+
+      *appendable_dirent_p = svn_dirent_join(*appendable_dirent_p,
+                                             basename2,
+                                             pool);
+    }
+
+  return SVN_NO_ERROR;
+}
+
 static svn_error_t *
 copy_one_versioned_file(const char *from_abspath,
                         const char *to_abspath,
@@ -495,9 +525,19 @@ copy_versioned_files(const char *from,
     }
   else if (from_kind == svn_node_file)
     {
+      SVN_ERR(append_basename_if_dir(&to_abspath, from_abspath, FALSE, pool));
       SVN_ERR(copy_one_versioned_file(from_abspath, to_abspath, ctx->wc_ctx,
                                       revision, native_eol, ignore_keywords,
                                       pool));
+
+      /* Notify. */
+      if (ctx->notify_func2)
+        {
+          svn_wc_notify_t *notify = svn_wc_create_notify(to_abspath,
+                                          svn_wc_notify_update_add, pool);
+          notify->kind = svn_node_file;
+          (*ctx->notify_func2)(ctx->notify_baton2, notify, pool);
+        }
     }
 
   return SVN_NO_ERROR;
@@ -551,6 +591,7 @@ open_root_internal(const char *path,
 
 /* ---------------------------------------------------------------------- */
 
+
 /*** A dedicated 'export' editor, which does no .svn/ accounting.  ***/
 
 
@@ -948,10 +989,9 @@ svn_client_export5(svn_revnum_t *result_
   SVN_ERR_ASSERT(revision != NULL);
 
   if (svn_path_is_url(to_path))
-    return svn_error_return(svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
-                                              _("'%s' is not a local path"),
-                                              to_path));
-    
+    return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+                             _("'%s' is not a local path"), to_path);
+
   peg_revision = svn_cl__rev_default_to_head_or_working(peg_revision,
                                                         from_path_or_url);
   revision = svn_cl__rev_default_to_peg(revision, peg_revision);
@@ -1000,6 +1040,13 @@ svn_client_export5(svn_revnum_t *result_
                                                              NULL), pool);
               eb->root_path = to_path;
             }
+          else
+            {
+              SVN_ERR(append_basename_if_dir(&to_path, from_path_or_url, 
+                                             TRUE, pool));
+              eb->root_path = to_path;
+            }
+
           
           /* Since you cannot actually root an editor at a file, we
            * manually drive a few functions of our editor. */

Modified: subversion/branches/performance/subversion/libsvn_client/info.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_client/info.c?rev=1039511&r1=1039510&r2=1039511&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_client/info.c (original)
+++ subversion/branches/performance/subversion/libsvn_client/info.c Fri Nov 26 18:55:51 2010
@@ -253,6 +253,7 @@ build_info_for_unversioned(svn_info_t **
    RECEIVER on all children of DIR, but none of their children; if
    svn_depth_files, then invoke RECEIVER on file children of DIR but
    not on subdirectories; if svn_depth_infinity, recurse fully.
+   DIR is a relpath, relative to the root of RA_SESSION.
 */
 static svn_error_t *
 push_dir_info(svn_ra_session_t *ra_session,
@@ -288,7 +289,7 @@ push_dir_info(svn_ra_session_t *ra_sessi
       if (ctx->cancel_func)
         SVN_ERR(ctx->cancel_func(ctx->cancel_baton));
 
-      path = svn_uri_join(dir, name, subpool);
+      path = svn_relpath_join(dir, name, subpool);
       URL  = svn_path_url_add_component2(session_URL, name, subpool);
 
       fs_path = svn_uri_is_child(repos_root, URL, subpool);

Modified: subversion/branches/performance/subversion/libsvn_client/list.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_client/list.c?rev=1039511&r1=1039510&r2=1039511&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_client/list.c (original)
+++ subversion/branches/performance/subversion/libsvn_client/list.c Fri Nov 26 18:55:51 2010
@@ -99,7 +99,7 @@ get_dir_contents(apr_uint32_t dirent_fie
 
       if (locks)
         {
-          const char *abs_path = svn_uri_join(fs_path, path, iterpool);
+          const char *abs_path = svn_fspath__join(fs_path, path, iterpool);
           lock = apr_hash_get(locks, abs_path, APR_HASH_KEY_STRING);
         }
       else

Modified: subversion/branches/performance/subversion/libsvn_client/log.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_client/log.c?rev=1039511&r1=1039510&r2=1039511&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_client/log.c (original)
+++ subversion/branches/performance/subversion/libsvn_client/log.c Fri Nov 26 18:55:51 2010
@@ -395,11 +395,12 @@ svn_client_log5(const apr_array_header_t
               const char *target;
 
               target = APR_ARRAY_IDX(targets, i, const char *);
+
               if (svn_path_is_url(target) || svn_dirent_is_absolute(target))
-                return svn_error_return(svn_error_createf(
-                                          SVN_ERR_ILLEGAL_TARGET, NULL,
-                                          _("'%s' is not a relative path"),
-                                          target));
+                return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+                                         _("'%s' is not a relative path"),
+                                          target);
+
               APR_ARRAY_PUSH(condensed_targets, const char *) = target;
             }
         }

Modified: subversion/branches/performance/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_client/merge.c?rev=1039511&r1=1039510&r2=1039511&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_client/merge.c (original)
+++ subversion/branches/performance/subversion/libsvn_client/merge.c Fri Nov 26 18:55:51 2010
@@ -3290,6 +3290,110 @@ fix_deleted_subtree_ranges(const char *u
 
 /*** Determining What Remains To Be Merged ***/
 
+
+/* Attempt to determine if a working copy path inherits any invalid
+   mergeinfo.
+
+   Query the repository for the mergeinfo TARGET_ABSPATH inherits at its
+   base revision and set *VALIDATED to indicate to the caller if we can
+   determine what portions of that inherited mergeinfo are invalid.
+
+   If no mergeinfo is inherited set *INVALID_INHERITED_MERGEINFO to NULL and
+   *VALIDATED to true.
+
+   If only empty mergeinfo is inherited set *INVALID_INHERITED_MERGEINFO to
+   and empty hash and *VALIDATED to true.
+
+   If non-empty inherited mergeinfo is inherited then, if the server (1.7+)
+   supports inherited mergeinfo validation, remove all valid path-revisions
+   from the raw inherited mergeinfo, set *INVALID_INHERITED_MERGEINFO to the
+   remainder, and set *VALIDATED to true.  If the server doesn't support
+   inherited mergeinfo validation then set *INVALID_INHERITED_MERGEINFO to
+   NULL and set *VALIDATED to false.
+
+   Note that if validation occurs, but all inherited mergeinfo describes
+   non-existent paths, then *INVALID_INHERITED_MERGEINFO is set to an empty
+   hash.
+
+   RA_SESSION is an open session that points to TARGET_ABSPATH's repository
+   location or to the location of one of TARGET_ABSPATH's parents.  It may
+   be temporarily reparented.
+
+   RESULT_POOL is used to allocate *INVALID_INHERITED_MERGEINFO, SCRATCH_POOL
+   is used for any temporary allocations. */
+static svn_error_t *
+get_invalid_inherited_mergeinfo(svn_mergeinfo_t *invalid_inherited_mergeinfo,
+                                svn_boolean_t *validated,
+                                svn_ra_session_t *ra_session,
+                                const char *target_abspath,
+                                svn_client_ctx_t *ctx,
+                                apr_pool_t *result_pool,
+                                apr_pool_t *scratch_pool)
+{
+  svn_mergeinfo_t repos_raw_inherited;
+  svn_mergeinfo_t repos_validated_inherited;
+  svn_revnum_t base_revision;
+  svn_boolean_t validate_inherited_mergeinfo;
+
+  /* Our starting assumptions. */ 
+  *invalid_inherited_mergeinfo = NULL;
+  *validated = TRUE;
+
+  SVN_ERR(svn_wc__node_get_base_rev(&base_revision, ctx->wc_ctx,
+                                    target_abspath, scratch_pool));
+
+  /* If there is no base revision then TARGET_ABSPATH doesn't exist
+     in the repository yet, so we're done. */
+  if (SVN_IS_VALID_REVNUM(base_revision))
+    {
+      const char *target_url;
+      const char *session_url;
+
+      /* Reparent RA_SESSION if necessary. */
+      SVN_ERR(svn_wc__node_get_url(&target_url, ctx->wc_ctx, target_abspath,
+                                   scratch_pool, scratch_pool));
+      SVN_ERR(svn_client__ensure_ra_session_url(&session_url, ra_session,
+                                                target_url, scratch_pool));
+
+      /* Contact the repository to derive the portion of
+         TARGET_ABSPATH's inherited mergeinfo which is non-existent
+         and remove it from */
+      validate_inherited_mergeinfo = FALSE;
+      SVN_ERR(svn_client__get_repos_mergeinfo(
+        ra_session, &repos_raw_inherited, "", base_revision,
+        svn_mergeinfo_inherited, TRUE,
+        &validate_inherited_mergeinfo,
+        scratch_pool));
+
+      if (repos_raw_inherited == NULL)
+        {
+          *invalid_inherited_mergeinfo = NULL;
+        }
+      else if (apr_hash_count(repos_raw_inherited) == 0)
+        {
+          *invalid_inherited_mergeinfo = apr_hash_make(result_pool);
+        }
+      else
+        {
+          SVN_ERR(svn_client__get_repos_mergeinfo(
+            ra_session, &repos_validated_inherited, "", base_revision,
+            svn_mergeinfo_inherited, TRUE,
+            validated,
+            scratch_pool));
+          if (*validated)
+            SVN_ERR(svn_mergeinfo_remove2(invalid_inherited_mergeinfo,
+                                          repos_validated_inherited,
+                                          repos_raw_inherited, FALSE,
+                                          result_pool, scratch_pool));
+          else
+            *invalid_inherited_mergeinfo = NULL;
+        }
+      SVN_ERR(svn_client__ensure_ra_session_url(&session_url, ra_session,
+                                                session_url, scratch_pool));
+    }
+  return SVN_NO_ERROR;
+}
+
 /* Get explicit and/or implicit mergeinfo for the working copy path
    TARGET_ABSPATH.
 
@@ -3300,6 +3404,10 @@ fix_deleted_subtree_ranges(const char *u
    If IMPLICIT_MERGEINFO is not NULL then set *IMPLICIT_MERGEINFO
    to TARGET_ABSPATH's implicit mergeinfo (a.k.a. natural history).
 
+   If both RECORDED_MERGEINFO and IMPLICIT_MERGEINFO are not NULL and
+   *RECORDED_MERGEINFO is inherited, then *IMPLICIT_MERGEINFO will be
+   removed from *RECORDED_MERGEINFO.
+
    If INDIRECT is not NULL set *INDIRECT to TRUE if *RECORDED_MERGEINFO
    is inherited and not explicit.  If RECORDED_MERGEINFO is NULL then
    INDIRECT is ignored.
@@ -3310,6 +3418,9 @@ fix_deleted_subtree_ranges(const char *u
    is older than START, then the base revision is used as the younger
    bound in place of START.
 
+   RA_SESSION is an open session that may be temporarily reparented as
+   needed by this function.
+
    Allocate *RECORDED_MERGEINFO and *IMPLICIT_MERGEINFO in RESULT_POOL.
    Use SCRATCH_POOL for any temporary allocations. */
 static svn_error_t *
@@ -3325,11 +3436,14 @@ get_full_mergeinfo(svn_mergeinfo_t *reco
                    apr_pool_t *result_pool,
                    apr_pool_t *scratch_pool)
 {
-  /* First, we get the real mergeinfo. */
+  svn_boolean_t inherited = FALSE;
+  svn_boolean_t inherited_validated = FALSE;
+
+  /* First, we get the real mergeinfo.  We use SCRATCH_POOL throughout this
+     block because we'll make a final copy of *RECORDED_MERGEINFO only after
+     removing any self-referential mergeinfo. */
   if (recorded_mergeinfo)
     {
-      svn_boolean_t inherited;
-
       /* ### FIXME: There's probably an RA session we could/should be
          ### using here instead of having this function possibly spawn
          ### yet another one.  */
@@ -3337,9 +3451,29 @@ get_full_mergeinfo(svn_mergeinfo_t *reco
                                                     &inherited, FALSE,
                                                     inherit, NULL,
                                                     target_abspath,
-                                                    ctx, result_pool));
+                                                    ctx, scratch_pool));
       if (indirect)
         *indirect = inherited;
+
+      /* Issue #3669: Remove any non-existent mergeinfo sources
+         from TARGET_ABSPATH's inherited mergeinfo. */
+      if (inherited)
+        {
+          svn_mergeinfo_t invalid_inherited_mergeinfo;
+
+          SVN_ERR(get_invalid_inherited_mergeinfo(
+            &invalid_inherited_mergeinfo, &inherited_validated,
+            ra_session, target_abspath, ctx,
+            scratch_pool, scratch_pool));
+
+          if (inherited_validated
+              && invalid_inherited_mergeinfo
+              && apr_hash_count(invalid_inherited_mergeinfo))
+            SVN_ERR(svn_mergeinfo_remove2(recorded_mergeinfo,
+                                          invalid_inherited_mergeinfo,
+                                          *recorded_mergeinfo, FALSE,
+                                          scratch_pool, scratch_pool));
+        }
     }
 
   if (implicit_mergeinfo)
@@ -3347,7 +3481,6 @@ get_full_mergeinfo(svn_mergeinfo_t *reco
       const char *session_url = NULL, *url;
       svn_revnum_t target_rev;
       svn_opt_revision_t peg_revision;
-      apr_pool_t *sesspool = NULL;
       svn_error_t *err;
 
       /* Assert that we have sane input. */
@@ -3355,10 +3488,12 @@ get_full_mergeinfo(svn_mergeinfo_t *reco
                  && SVN_IS_VALID_REVNUM(end)
                  && (start > end));
 
+      *implicit_mergeinfo = NULL;
+
       peg_revision.kind = svn_opt_revision_working;
       err = svn_client__derive_location(&url, &target_rev, target_abspath,
                                         &peg_revision, ra_session,
-                                        ctx, result_pool, scratch_pool);
+                                        ctx, scratch_pool, scratch_pool);
 
       if (err)
         {
@@ -3371,7 +3506,6 @@ get_full_mergeinfo(svn_mergeinfo_t *reco
                * mergeinfo is empty. */
               svn_error_clear(err);
               *implicit_mergeinfo = apr_hash_make(result_pool);
-              return SVN_NO_ERROR;
             }
           else
             return svn_error_return(err);
@@ -3382,52 +3516,60 @@ get_full_mergeinfo(svn_mergeinfo_t *reco
           /* We're asking about a range outside our natural history
              altogether.  That means our implicit mergeinfo is empty. */
           *implicit_mergeinfo = apr_hash_make(result_pool);
-          return SVN_NO_ERROR;
         }
 
-      /* Temporarily point our RA_SESSION at our target URL so we can
-         fetch so-called "implicit mergeinfo" (that is, natural history). */
-      if (ra_session)
-        {
-          SVN_ERR(svn_client__ensure_ra_session_url(&session_url, ra_session,
-                                                    url, scratch_pool));
-        }
-      else
+      if (*implicit_mergeinfo == NULL)
         {
-          SVN_ERR(svn_client__open_ra_session_internal(&ra_session, NULL, url,
-                                                       NULL, NULL,
-                                                       FALSE, TRUE,
-                                                       ctx, scratch_pool));
-        }
-
-      /* Do not ask for implicit mergeinfo from TARGET_ABSPATH's future.
-         TARGET_ABSPATH might not even exist, and even if it does the
-         working copy is *at* TARGET_REV so its implicit history ends
-         at TARGET_REV! */
-      if (target_rev < start)
-        start = target_rev;
-
-      /* Fetch the implicit mergeinfo. */
-      peg_revision.kind = svn_opt_revision_number;
-      peg_revision.value.number = target_rev;
-      SVN_ERR(svn_client__get_history_as_mergeinfo(implicit_mergeinfo, url,
-                                                   &peg_revision, start, end,
-                                                   ra_session, ctx,
-                                                   result_pool));
+          /* Temporarily point our RA_SESSION at our target URL so we can
+             fetch so-called "implicit mergeinfo" (that is, natural
+             history). */
+          SVN_ERR(svn_client__ensure_ra_session_url(&session_url,
+                                                    ra_session, url,
+                                                    scratch_pool));
 
-      /* If we created an RA_SESSION above, destroy it.  Otherwise, if
-         reparented an existing session, point it back where it was when
-         we were called. */
-      if (sesspool)
-        {
-          svn_pool_destroy(sesspool);
-        }
-      else if (session_url)
-        {
-          SVN_ERR(svn_ra_reparent(ra_session, session_url, scratch_pool));
+          /* Do not ask for implicit mergeinfo from TARGET_ABSPATH's future.
+             TARGET_ABSPATH might not even exist, and even if it does the
+             working copy is *at* TARGET_REV so its implicit history ends
+             at TARGET_REV! */
+          if (target_rev < start)
+            start = target_rev;
+
+          /* Fetch the implicit mergeinfo. */
+          peg_revision.kind = svn_opt_revision_number;
+          peg_revision.value.number = target_rev;
+          SVN_ERR(svn_client__get_history_as_mergeinfo(implicit_mergeinfo,
+                                                       url, &peg_revision,
+                                                       start, end,
+                                                       ra_session, ctx,
+                                                       result_pool));
+
+          /* Return RA_SESSION back to where it was when we were called. */
+         SVN_ERR(svn_client__ensure_ra_session_url(&session_url,
+                                                   ra_session, session_url,
+                                                   scratch_pool)); 
         }
     } /*if (implicit_mergeinfo) */
 
+
+  if (recorded_mergeinfo && *recorded_mergeinfo)
+    {
+      /* Issue #3668: Remove any self-referential mergeinfo from that
+         which TARGET_ABSPATH inherited; but only do this if we were able to
+         validate inherited mergeinfo (issue #3669) or otherwise we end
+         up with fragmented mergeinfo, see
+         http://subversion.tigris.org/issues/show_bug.cgi?id=3668#desc5 */
+      if (implicit_mergeinfo
+          && inherited
+          && inherited_validated)
+        SVN_ERR(svn_mergeinfo_remove2(recorded_mergeinfo,
+                                      *implicit_mergeinfo,
+                                      *recorded_mergeinfo, FALSE,
+                                      result_pool, scratch_pool));
+      else
+        *recorded_mergeinfo = svn_mergeinfo_dup(*recorded_mergeinfo,
+          result_pool);
+    }
+
   return SVN_NO_ERROR;
 }
 
@@ -4258,7 +4400,7 @@ populate_remaining_ranges(apr_array_head
         svn_mergeinfo_inherited, ra_session,
         child->abspath,
         MAX(revision1, revision2),
-        MIN(revision1, revision2),
+        0, /* Get all implicit mergeinfo */
         merge_b->ctx, pool, pool));
 
       /* If CHILD isn't the merge target find its parent. */
@@ -6643,7 +6785,7 @@ do_file_merge(svn_mergeinfo_catalog_t re
                                  &indirect, svn_mergeinfo_inherited,
                                  merge_b->ra_session1, target_abspath,
                                  MAX(revision1, revision2),
-                                 MIN(revision1, revision2),
+                                 0, /* Get all implicit mergeinfo */
                                  ctx, scratch_pool, scratch_pool));
 
       SVN_ERR(svn_ra_reparent(merge_b->ra_session1, url1, scratch_pool));
@@ -7245,11 +7387,11 @@ get_inoperative_immediate_children(apr_h
         apr_hash_set(*immediate_children,
                      apr_pstrdup(result_pool, child->abspath),
                      APR_HASH_KEY_STRING,
-                     svn_uri_join(merge_source_repos_abspath,
-                                  svn_dirent_is_child(merge_target_abspath,
-                                                      child->abspath,
-                                                      iterpool),
-                                  result_pool));
+                     svn_fspath__join(merge_source_repos_abspath,
+                                      svn_dirent_is_child(merge_target_abspath,
+                                                          child->abspath,
+                                                          iterpool),
+                                      result_pool));
     }
 
   svn_pool_destroy(iterpool);
@@ -7425,9 +7567,9 @@ record_mergeinfo_for_dir_merge(svn_merge
           if (!child_repos_path)
             child_repos_path = "";
 
-          child_merge_src_canon_path = svn_uri_join(mergeinfo_path,
-                                                    child_repos_path,
-                                                    iterpool);
+          child_merge_src_canon_path = svn_fspath__join(mergeinfo_path,
+                                                        child_repos_path,
+                                                        iterpool);
           /* Filter any ranges from each child's natural history before
              setting mergeinfo describing the merge. */
           SVN_ERR(filter_natural_history_from_mergeinfo(
@@ -7735,7 +7877,7 @@ log_noop_revs(void *baton,
       /* Adjust REL_PATH so it is relative to the merge source then use it to
          calculate what path in the merge target would be affected by this
          revision. */
-      rel_path = svn_uri_skip_ancestor(log_gap_baton->source_repos_abs, path);
+      rel_path = svn_fspath__skip_ancestor(log_gap_baton->source_repos_abs, path);
       cwmi_path = svn_dirent_join(log_gap_baton->merge_b->target_abspath,
                                   rel_path, pool);
 
@@ -8516,11 +8658,11 @@ do_merge(apr_hash_t **modified_subtrees,
 
   SVN_ERR(svn_wc_read_kind(&target_kind, ctx->wc_ctx, target_abspath, FALSE,
                            pool));
+
   if (target_kind != svn_node_dir && target_kind != svn_node_file)
-    return svn_error_return(svn_error_createf(
-                              SVN_ERR_ILLEGAL_TARGET, NULL,
-                              _("Merge target '%s' does not exist in the "
-                                "working copy"), target_abspath));
+    return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+                             _("Merge target '%s' does not exist in the "
+                               "working copy"), target_abspath);
 
   /* Ensure a known depth. */
   if (depth == svn_depth_unknown)
@@ -8982,10 +9124,11 @@ merge_locked(const char *source1,
       || (revision2->kind == svn_opt_revision_unspecified))
     return svn_error_create(SVN_ERR_CLIENT_BAD_REVISION, NULL,
                             _("Not all required revisions are specified"));
+
   if (svn_path_is_url(source1) != svn_path_is_url(source2))
-    return svn_error_return(svn_error_create(SVN_ERR_ILLEGAL_TARGET, NULL,
-                                             _("Merge sources must both be "
-                                               "either paths or URLs")));
+    return svn_error_create(SVN_ERR_ILLEGAL_TARGET, NULL,
+                            _("Merge sources must both be "
+                              "either paths or URLs"));
 
   /* ### FIXME: This function really ought to do a history check on
      the left and right sides of the merge source, and -- if one is an
@@ -9015,12 +9158,11 @@ merge_locked(const char *source1,
 
   SVN_ERR(svn_wc_read_kind(&target_kind, ctx->wc_ctx, target_abspath, FALSE,
                            scratch_pool));
-  if (target_kind != svn_node_dir && target_kind != svn_node_file)
-    return svn_error_return(svn_error_createf(
-                              SVN_ERR_ILLEGAL_TARGET, NULL,
-                              _("Merge target '%s' does not exist in the "
-                                "working copy"), target_abspath));
 
+  if (target_kind != svn_node_dir && target_kind != svn_node_file)
+    return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+                             _("Merge target '%s' does not exist in the "
+                               "working copy"), target_abspath);
 
   /* Do not allow merges into mixed-revision working copies. */
   SVN_ERR(ensure_wc_is_suitable_merge_target(target_abspath, ctx,
@@ -9438,10 +9580,10 @@ log_find_operative_revs(void *baton,
       svn_mergeinfo_t log_entry_as_mergeinfo;
 
       /* Easy out: The path is not within the tree of interest. */
-      if (!svn_uri_is_ancestor(log_baton->target_abspath, path))
+      if (!svn_fspath__is_ancestor(log_baton->target_abspath, path))
         continue;
 
-      rel_path = svn_uri_skip_ancestor(log_baton->target_abspath, path);
+      rel_path = svn_fspath__skip_ancestor(log_baton->target_abspath, path);
       source_rel_path = svn_relpath_join(log_baton->source_repos_rel_path,
                                          rel_path, pool);
 
@@ -9470,8 +9612,8 @@ log_find_operative_revs(void *baton,
               && strcmp(subtree_missing_this_rev, source_rel_path))
             {
               const char *suffix =
-                svn_uri_skip_ancestor(subtree_missing_this_rev,
-                                      source_rel_path);
+                svn_relpath_skip_ancestor(subtree_missing_this_rev,
+                                          source_rel_path);
               missing_path = apr_pstrmemdup(pool, path,
                                             strlen(path) - strlen(suffix) - 1);
             }
@@ -9523,9 +9665,9 @@ log_find_operative_revs(void *baton,
    of the unmerged revisions in UNMERGED_CATALOG's mergeinfos are "phantoms",
    that is, one of the following conditions holds:
 
-     1) The revision effects no corresponding paths in SOURCE_REPOS_REL_PATH.
+     1) The revision affects no corresponding paths in SOURCE_REPOS_REL_PATH.
 
-     2) The revision effects corresponding paths in SOURCE_REPOS_REL_PATH,
+     2) The revision affects corresponding paths in SOURCE_REPOS_REL_PATH,
         but based on the mergeinfo in MERGED_CATALOG, the change was
         previously merged.
 
@@ -9576,7 +9718,7 @@ find_unsynced_ranges(const char *source_
         }
     }
 
-  /* Find any unmerged revisions which both effect the source and
+  /* Find any unmerged revisions which both affect the source and
      are not yet merged to it. */
   if (potentially_unmerged_ranges)
     {
@@ -9702,10 +9844,10 @@ find_unmerged_mergeinfo(svn_mergeinfo_ca
       svn_pool_clear(iterpool);
 
       source_path = path + strlen(target_repos_rel_path);
-      if (source_path[0] == '/') /* Remove leading '/' for svn_uri_join. */
+      if (source_path[0] == '/')  /* Remove leading '/'. */
         source_path++;
-      source_path = svn_uri_join(source_repos_rel_path, source_path,
-                                 iterpool);
+      source_path = svn_relpath_join(source_repos_rel_path, source_path,
+                                     iterpool);
       source_path_rel_to_session =
         svn_relpath_skip_ancestor(source_repos_rel_path, source_path);
 
@@ -9856,7 +9998,7 @@ find_unmerged_mergeinfo(svn_mergeinfo_ca
           svn_pool_clear(iterpool);
 
           target_path = source_path + strlen(source_repos_rel_path);
-          if (target_path[0] == '/') /* Remove leading '/' for svn_uri_join. */
+          if (target_path[0] == '/')  /* Remove leading '/'. */
             target_path++;
           err = svn_client__repos_location_segments(&segments,
                                                     target_ra_session,

Modified: subversion/branches/performance/subversion/libsvn_client/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_client/mergeinfo.c?rev=1039511&r1=1039510&r2=1039511&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_client/mergeinfo.c (original)
+++ subversion/branches/performance/subversion/libsvn_client/mergeinfo.c Fri Nov 26 18:55:51 2010
@@ -156,7 +156,7 @@ svn_client__adjust_mergeinfo_source_path
 
       /* Copy inherited mergeinfo into our output hash, adjusting the
          merge source as appropriate. */
-      path = svn_uri_join(merge_source, rel_path, pool);
+      path = svn_fspath__join(merge_source, rel_path, pool);
       copied_rangelist = svn_rangelist_dup(rangelist, pool);
       apr_hash_set(adjusted_mergeinfo, path, APR_HASH_KEY_STRING,
                    copied_rangelist);
@@ -442,17 +442,16 @@ svn_client__get_repos_mergeinfo(svn_ra_s
                                 svn_revnum_t rev,
                                 svn_mergeinfo_inheritance_t inherit,
                                 svn_boolean_t squelch_incapable,
+                                svn_boolean_t *validate_inherited_mergeinfo,
                                 apr_pool_t *pool)
 {
   svn_mergeinfo_catalog_t tgt_mergeinfo_cat;
 
   *target_mergeinfo = NULL;
 
-  SVN_ERR(svn_client__get_repos_mergeinfo_catalog(&tgt_mergeinfo_cat,
-                                                  ra_session,
-                                                  rel_path, rev, inherit,
-                                                  squelch_incapable, FALSE,
-                                                  pool, pool));
+  SVN_ERR(svn_client__get_repos_mergeinfo_catalog(
+    &tgt_mergeinfo_cat, ra_session, rel_path, rev, inherit,
+    squelch_incapable, FALSE, validate_inherited_mergeinfo, pool, pool));
 
   if (tgt_mergeinfo_cat && apr_hash_count(tgt_mergeinfo_cat))
     {
@@ -468,15 +467,17 @@ svn_client__get_repos_mergeinfo(svn_ra_s
 }
 
 svn_error_t *
-svn_client__get_repos_mergeinfo_catalog(svn_mergeinfo_catalog_t *mergeinfo_cat,
-                                        svn_ra_session_t *ra_session,
-                                        const char *rel_path,
-                                        svn_revnum_t rev,
-                                        svn_mergeinfo_inheritance_t inherit,
-                                        svn_boolean_t squelch_incapable,
-                                        svn_boolean_t include_descendants,
-                                        apr_pool_t *result_pool,
-                                        apr_pool_t *scratch_pool)
+svn_client__get_repos_mergeinfo_catalog(
+  svn_mergeinfo_catalog_t *mergeinfo_cat,
+  svn_ra_session_t *ra_session,
+  const char *rel_path,
+  svn_revnum_t rev,
+  svn_mergeinfo_inheritance_t inherit,
+  svn_boolean_t squelch_incapable,
+  svn_boolean_t include_descendants,
+  svn_boolean_t *validate_inherited_mergeinfo,
+  apr_pool_t *result_pool,
+  apr_pool_t *scratch_pool)
 {
   svn_error_t *err;
   svn_mergeinfo_t repos_mergeinfo;
@@ -486,8 +487,9 @@ svn_client__get_repos_mergeinfo_catalog(
   APR_ARRAY_PUSH(rel_paths, const char *) = rel_path;
 
   /* Fetch the mergeinfo. */
-  err = svn_ra_get_mergeinfo(ra_session, &repos_mergeinfo, rel_paths, rev,
-                             inherit, include_descendants, result_pool);
+  err = svn_ra_get_mergeinfo2(ra_session, &repos_mergeinfo, rel_paths, rev,
+                              inherit, validate_inherited_mergeinfo,
+                              include_descendants, result_pool);
   if (err)
     {
       if (squelch_incapable && err->apr_err == SVN_ERR_UNSUPPORTED_FEATURE)
@@ -606,6 +608,7 @@ svn_client__get_wc_or_repos_mergeinfo_ca
             {
               const char *session_url = NULL;
               apr_pool_t *sesspool = NULL;
+              svn_boolean_t validate_inherited_mergeinfo = FALSE;
 
               if (ra_session)
                 {
@@ -624,7 +627,8 @@ svn_client__get_wc_or_repos_mergeinfo_ca
               SVN_ERR(svn_client__get_repos_mergeinfo_catalog(
                         target_mergeinfo_catalog, ra_session,
                         "", target_rev, inherit,
-                        TRUE, FALSE, result_pool, scratch_pool));
+                        TRUE, FALSE, &validate_inherited_mergeinfo,
+                        result_pool, scratch_pool));
 
               if (*target_mergeinfo_catalog
                   && apr_hash_get(*target_mergeinfo_catalog, "",
@@ -1027,6 +1031,7 @@ get_mergeinfo(svn_mergeinfo_catalog_t *m
   if (is_url)
     {
       svn_mergeinfo_catalog_t tmp_catalog;
+      svn_boolean_t validate_inherited_mergeinfo = FALSE;
 
       SVN_ERR(svn_dirent_get_absolute(&local_abspath, "", scratch_pool));
       SVN_ERR(svn_client__open_ra_session_internal(&ra_session, NULL,
@@ -1037,14 +1042,10 @@ get_mergeinfo(svn_mergeinfo_catalog_t *m
                                               local_abspath, ra_session,
                                               &peg_rev, scratch_pool));
       SVN_ERR(svn_ra_get_repos_root2(ra_session, repos_root, scratch_pool));
-      SVN_ERR(svn_client__get_repos_mergeinfo_catalog(&tmp_catalog,
-                                                      ra_session,
-                                                      "", rev,
-                                                      svn_mergeinfo_inherited,
-                                                      FALSE,
-                                                      include_descendants,
-                                                      result_pool,
-                                                      scratch_pool));
+      SVN_ERR(svn_client__get_repos_mergeinfo_catalog(
+        &tmp_catalog, ra_session, "", rev, svn_mergeinfo_inherited,
+        FALSE, include_descendants, &validate_inherited_mergeinfo,
+        result_pool, scratch_pool));
 
       /* If we're not querying the root of the repository, the catalog
          we fetched will be keyed on paths relative to the session
@@ -1394,7 +1395,7 @@ filter_log_entry_with_rangelist(void *ba
             {
               merge_source_path =
                 APR_ARRAY_IDX(fleb->merge_source_paths, i, const char *);
-              if (svn_uri_is_ancestor(merge_source_path, path))
+              if (svn_fspath__is_ancestor(merge_source_path, path))
                 {
                   /* If MERGE_SOURCE was itself deleted, replaced, or added
                      in LOG_ENTRY->REVISION then ignore this PATH since you
@@ -1411,11 +1412,11 @@ filter_log_entry_with_rangelist(void *ba
             continue;
 
           /* Calculate the target path which PATH would affect if merged. */
-          merge_source_rel_target = svn_uri_skip_ancestor(merge_source_path,
-                                                          path);
-          target_path_affected = svn_uri_join(fleb->abs_repos_target_path,
-                                              merge_source_rel_target,
-                                              iterpool);
+          merge_source_rel_target = svn_fspath__skip_ancestor(merge_source_path,
+                                                              path);
+          target_path_affected = svn_fspath__join(fleb->abs_repos_target_path,
+                                                  merge_source_rel_target,
+                                                  iterpool);
 
           nearest_ancestor_mergeinfo =
             find_nearest_ancestor(fleb->depth_first_catalog_index,