You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by jc...@apache.org on 2010/12/29 01:10:29 UTC

svn commit: r1053489 [1/7] - in /subversion/branches/diff-optimizations-bytes: ./ build/ build/ac-macros/ build/generator/ build/generator/swig/ contrib/client-side/svn_load_dirs/ notes/ subversion/bindings/javahl/native/ subversion/bindings/swig/ subv...

Author: jcorvel
Date: Wed Dec 29 00:10:25 2010
New Revision: 1053489

URL: http://svn.apache.org/viewvc?rev=1053489&view=rev
Log:
On the diff-optimizations-bytes branch: sync with trunk

Added:
    subversion/branches/diff-optimizations-bytes/subversion/include/private/svn_error_private.h
      - copied unchanged from r1053483, subversion/trunk/subversion/include/private/svn_error_private.h
    subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/upgrade_tests_data/replaced-files.tar.bz2
      - copied unchanged from r1053483, subversion/trunk/subversion/tests/cmdline/upgrade_tests_data/replaced-files.tar.bz2
    subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_subr/subst_translate-test.c
      - copied unchanged from r1053483, subversion/trunk/subversion/tests/libsvn_subr/subst_translate-test.c
Removed:
    subversion/branches/diff-optimizations-bytes/build/transform_libtool_scripts.sh
Modified:
    subversion/branches/diff-optimizations-bytes/   (props changed)
    subversion/branches/diff-optimizations-bytes/Makefile.in
    subversion/branches/diff-optimizations-bytes/build/   (props changed)
    subversion/branches/diff-optimizations-bytes/build.conf
    subversion/branches/diff-optimizations-bytes/build/ac-macros/swig.m4
    subversion/branches/diff-optimizations-bytes/build/generator/gen_make.py
    subversion/branches/diff-optimizations-bytes/build/generator/swig/__init__.py
    subversion/branches/diff-optimizations-bytes/build/generator/swig/checkout_swig_header.py
    subversion/branches/diff-optimizations-bytes/build/generator/swig/external_runtime.py
    subversion/branches/diff-optimizations-bytes/configure.ac
    subversion/branches/diff-optimizations-bytes/contrib/client-side/svn_load_dirs/svn_load_dirs.pl.in
    subversion/branches/diff-optimizations-bytes/notes/fsfs-improvements.txt
    subversion/branches/diff-optimizations-bytes/subversion/bindings/javahl/native/SVNRepos.cpp
    subversion/branches/diff-optimizations-bytes/subversion/bindings/swig/INSTALL
    subversion/branches/diff-optimizations-bytes/subversion/include/private/svn_ra_private.h
    subversion/branches/diff-optimizations-bytes/subversion/include/private/svn_repos_private.h
    subversion/branches/diff-optimizations-bytes/subversion/include/private/svn_wc_private.h
    subversion/branches/diff-optimizations-bytes/subversion/include/svn_error.h
    subversion/branches/diff-optimizations-bytes/subversion/include/svn_fs.h
    subversion/branches/diff-optimizations-bytes/subversion/include/svn_io.h
    subversion/branches/diff-optimizations-bytes/subversion/include/svn_ra.h
    subversion/branches/diff-optimizations-bytes/subversion/include/svn_repos.h
    subversion/branches/diff-optimizations-bytes/subversion/include/svn_subst.h
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/changelist.c
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/checkout.c
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/commit_util.c
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/copy.c
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/info.c
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/log.c
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/merge.c
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/mergeinfo.c
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/patch.c
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/prop_commands.c
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/ra.c
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/status.c
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_fs/fs-loader.c
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_fs_fs/fs_fs.c
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_fs_fs/lock.c
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_fs_fs/rep-cache.c
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_fs_fs/tree.c
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_ra/util.c
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_ra_local/ra_plugin.c
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_ra_serf/ra_serf.h
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_ra_serf/util.c
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_ra_serf/xml.c
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_repos/commit.c
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_repos/deprecated.c
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_repos/fs-wrap.c
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_repos/hooks.c
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_repos/load-fs-vtable.c
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_subr/deprecated.c
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_subr/dirent_uri.c
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_subr/error.c
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_subr/io.c
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_subr/prompt.c
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_subr/subst.c
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_wc/entries.c
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_wc/entries.h
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_wc/lock.c
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_wc/node.c
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_wc/revision_status.c
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_wc/status.c
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_wc/update_editor.c
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_wc/upgrade.c
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_wc/wc-metadata.sql
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_wc/wc-queries.sql
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_wc/wc.h
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_wc/wc_db.c
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_wc/wc_db.h
    subversion/branches/diff-optimizations-bytes/subversion/libsvn_wc/workqueue.c
    subversion/branches/diff-optimizations-bytes/subversion/mod_authz_svn/mod_authz_svn.c
    subversion/branches/diff-optimizations-bytes/subversion/mod_dav_svn/dav_svn.h
    subversion/branches/diff-optimizations-bytes/subversion/mod_dav_svn/deadprops.c
    subversion/branches/diff-optimizations-bytes/subversion/mod_dav_svn/lock.c
    subversion/branches/diff-optimizations-bytes/subversion/mod_dav_svn/merge.c
    subversion/branches/diff-optimizations-bytes/subversion/mod_dav_svn/repos.c
    subversion/branches/diff-optimizations-bytes/subversion/mod_dav_svn/util.c
    subversion/branches/diff-optimizations-bytes/subversion/mod_dav_svn/version.c
    subversion/branches/diff-optimizations-bytes/subversion/po/zh_CN.po
    subversion/branches/diff-optimizations-bytes/subversion/svn/commit-cmd.c
    subversion/branches/diff-optimizations-bytes/subversion/svn/main.c
    subversion/branches/diff-optimizations-bytes/subversion/svn/util.c
    subversion/branches/diff-optimizations-bytes/subversion/svnadmin/main.c
    subversion/branches/diff-optimizations-bytes/subversion/svnrdump/load_editor.c
    subversion/branches/diff-optimizations-bytes/subversion/svnrdump/svnrdump.c
    subversion/branches/diff-optimizations-bytes/subversion/svnsync/main.c
    subversion/branches/diff-optimizations-bytes/subversion/svnversion/main.c
    subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/atomic-ra-revprop-change.c
    subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/copy_tests.py
    subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/entries-dump.c
    subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/stat_tests.py
    subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/svnadmin_tests.py
    subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/svnlook_tests.py
    subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/svnrdump_tests.py
    subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/svnsync_tests.py
    subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/svntest/actions.py
    subversion/branches/diff-optimizations-bytes/subversion/tests/cmdline/upgrade_tests.py
    subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_client/client-test.c
    subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_fs/fs-test.c
    subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_fs/locks-test.c
    subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_fs_base/changes-test.c
    subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_fs_base/fs-base-test.c
    subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_fs_fs/fs-pack-test.c
    subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_repos/repos-test.c
    subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_subr/   (props changed)
    subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_subr/eol-test.c
    subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_subr/error-test.c
    subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_wc/db-test.c
    subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_wc/entries-compat.c
    subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_wc/pristine-store-test.c
    subversion/branches/diff-optimizations-bytes/subversion/tests/svn_test_fs.c
    subversion/branches/diff-optimizations-bytes/subversion/tests/svn_test_main.c
    subversion/branches/diff-optimizations-bytes/tools/dev/svn-dev.el
    subversion/branches/diff-optimizations-bytes/tools/dev/unix-build/Makefile.svn
    subversion/branches/diff-optimizations-bytes/tools/po/l10n-report.py
    subversion/branches/diff-optimizations-bytes/tools/server-side/svn-populate-node-origins-index.c

Propchange: subversion/branches/diff-optimizations-bytes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Dec 29 00:10:25 2010
@@ -40,4 +40,4 @@
 /subversion/branches/tc_url_rev:874351-874483
 /subversion/branches/tree-conflicts:868291-873154
 /subversion/branches/tree-conflicts-notify:873926-874008
-/subversion/trunk:1031270-1044833
+/subversion/trunk:1031270-1053483

Modified: subversion/branches/diff-optimizations-bytes/Makefile.in
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/Makefile.in?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/Makefile.in (original)
+++ subversion/branches/diff-optimizations-bytes/Makefile.in Wed Dec 29 00:10:25 2010
@@ -351,17 +351,17 @@ install: external-install local-install 
 local-all: @BUILD_RULES@ @TRANSFORM_LIBTOOL_SCRIPTS@
 
 transform-libtool-scripts: @BUILD_RULES@
-	@$(top_srcdir)/build/transform_libtool_scripts.sh
+	@$(SHELL) $(top_srcdir)/build/transform_libtool_scripts.sh
 
 locale-gnu-pot:
 	cd $(abs_srcdir) && XGETTEXT="$(XGETTEXT)" MSGMERGE="$(MSGMERGE)" \
-	  tools/po/po-update.sh pot
+	  $(SHELL) tools/po/po-update.sh pot
 
 # "make locale-gnu-po-update" updates all translations.
 # "make locale-gnu-po-update PO=ll" updates only the ll.po file.
 locale-gnu-po-update:
 	cd $(abs_srcdir) && XGETTEXT="$(XGETTEXT)" MSGMERGE="$(MSGMERGE)" \
-	  tools/po/po-update.sh $(PO)
+	  $(SHELL) tools/po/po-update.sh $(PO)
 
 # clean everything but the bulky test output, returning the system back
 # to before 'make' was run.
@@ -824,7 +824,7 @@ install-swig-rb-doc:
 
 # ctypes-python make targets
 ctypes-python: local-all
-	$(abs_srcdir)/build/run_ctypesgen.sh "$(LT_EXECUTE)" "$(CPPFLAGS)" "$(EXTRA_CTYPES_LDFLAGS)" "$(PYTHON)" "$(CTYPESGEN)" "$(abs_srcdir)" "$(abs_builddir)" "$(libdir)" "$(SVN_APR_CONFIG)" "$(SVN_APRUTIL_CONFIG)"
+	$(SHELL) $(abs_srcdir)/build/run_ctypesgen.sh "$(LT_EXECUTE)" "$(CPPFLAGS)" "$(EXTRA_CTYPES_LDFLAGS)" "$(PYTHON)" "$(CTYPESGEN)" "$(abs_srcdir)" "$(abs_builddir)" "$(libdir)" "$(SVN_APR_CONFIG)" "$(SVN_APRUTIL_CONFIG)"
 
 install-ctypes-python: ctypes-python
 	cd $(CTYPES_PYTHON_SRC_DIR); \

Propchange: subversion/branches/diff-optimizations-bytes/build/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Dec 29 00:10:25 2010
@@ -6,3 +6,4 @@ ltversion.m4
 lt~obsolete.m4
 ltmain.sh
 pkg.m4
+transform_libtool_scripts.sh

Modified: subversion/branches/diff-optimizations-bytes/build.conf
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/build.conf?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/build.conf (original)
+++ subversion/branches/diff-optimizations-bytes/build.conf Wed Dec 29 00:10:25 2010
@@ -865,6 +865,14 @@ sources = target-test.c
 install = test
 libs = libsvn_test libsvn_subr apriconv apr
 
+[subst_translate-test]
+description = Test the svn_subst_translate* functions
+type = exe
+path = subversion/tests/libsvn_subr
+sources = subst_translate-test.c
+install = test
+libs = libsvn_test libsvn_subr apriconv apr
+
 [translate-test]
 description = Test eol conversion and keyword substitution routines
 type = exe
@@ -1114,6 +1122,7 @@ libs = __ALL__
        checksum-test compat-test config-test hashdump-test mergeinfo-test opt-test path-test stream-test
        string-test eol-test time-test utf-test target-test error-test cache-test
        revision-test
+       subst_translate-test
        translate-test
        random-test window-test
        diff-diff3-test

Modified: subversion/branches/diff-optimizations-bytes/build/ac-macros/swig.m4
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/build/ac-macros/swig.m4?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/build/ac-macros/swig.m4 (original)
+++ subversion/branches/diff-optimizations-bytes/build/ac-macros/swig.m4 Wed Dec 29 00:10:25 2010
@@ -94,13 +94,13 @@ AC_DEFUN(SVN_FIND_SWIG,
     #   packages/rpm/rhel-4/subversion.spec
     if test -n "$SWIG_VERSION" &&
        test "$SWIG_VERSION" -ge "103024" &&
-       test "$SWIG_VERSION" -le "103039"; then
+       test "$SWIG_VERSION" -le "200001"; then
       SWIG_SUITABLE=yes
     else
       SWIG_SUITABLE=no
       AC_MSG_WARN([Detected SWIG version $SWIG_VERSION_RAW])
       AC_MSG_WARN([Subversion requires 1.3.24 or later, and is known to work])
-      AC_MSG_WARN([with versions up to 1.3.39])
+      AC_MSG_WARN([with versions up to 2.0.1])
     fi
   fi
  

Modified: subversion/branches/diff-optimizations-bytes/build/generator/gen_make.py
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/build/generator/gen_make.py?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/build/generator/gen_make.py (original)
+++ subversion/branches/diff-optimizations-bytes/build/generator/gen_make.py Wed Dec 29 00:10:25 2010
@@ -23,6 +23,7 @@
 #
 
 import os
+import stat
 import sys
 try:
   # Python >=3.0
@@ -453,6 +454,8 @@ class Generator(gen_base.GeneratorBase):
 
     self.write_standalone()
 
+    self.write_transform_libtool_scripts(install_sources)
+
   def write_standalone(self):
     """Write autogen-standalone.mk"""
 
@@ -468,6 +471,91 @@ class Generator(gen_base.GeneratorBase):
     standalone.write(open("build-outputs.mk","r").read())
     standalone.close()
 
+  def write_transform_libtool_scripts(self, install_sources):
+    """Write build/transform_libtool_scripts.sh"""
+    script = 'build/transform_libtool_scripts.sh'
+    fd = open(script, 'w')
+    fd.write('''#!/bin/sh
+# DO NOT EDIT -- AUTOMATICALLY GENERATED
+
+transform()
+{
+  SCRIPT="$1"
+  LIBS="$2"
+  if [ -f $SCRIPT ]; then
+    if grep LD_PRELOAD "$SCRIPT" > /dev/null; then
+      :
+    elif grep LD_LIBRARY_PATH "$SCRIPT" > /dev/null; then
+      echo "Transforming $SCRIPT"
+      EXISTINGLIBS=""
+      for LIB in $LIBS; do
+        # exclude libsvn_test since the undefined test_funcs breaks libtool
+        case $LIB in
+          *libsvn_test-*) continue ;;
+        esac
+        if [ ! -f $LIB ]; then
+          continue
+        fi
+        if [ -z "$EXISTINGLIBS" ]; then
+          EXISTINGLIBS="$LIB"
+        else
+          EXISTINGLIBS="$EXISTINGLIBS $LIB"
+        fi
+      done
+      if [ ! -z "$EXISTINGLIBS" ]; then
+        cat "$SCRIPT" |
+        (
+          read LINE
+          echo "$LINE"
+          echo "LD_PRELOAD=\\"$EXISTINGLIBS\\""
+          echo "export LD_PRELOAD"
+          cat
+        ) < "$SCRIPT" > "$SCRIPT.new"
+        mv -f "$SCRIPT.new" "$SCRIPT"
+        chmod +x "$SCRIPT"
+      fi
+    fi
+  fi
+}
+
+DIR=`pwd`
+
+''')
+    libdep_cache = {}
+    paths = {}
+    for target_ob in install_sources:
+      if not isinstance(target_ob, gen_base.TargetExe):
+        continue
+      name = target_ob.name
+      libs = self._get_all_lib_deps(target_ob.name, libdep_cache, paths)
+      path = paths[name]
+      for i in range(0, len(libs)):
+        lib = libs[i]
+        libpath = paths[libs[i]]
+        libs[i] = '$DIR/%s/.libs/%s-%s.so' % (libpath, lib, self.version)
+      fd.write('transform %s/%s "%s"\n' % (path, name, " ".join(libs)))
+    fd.close()
+    mode = stat.S_IRWXU|stat.S_IRGRP|stat.S_IXGRP|stat.S_IROTH|stat.S_IXOTH
+    os.chmod(script, mode)
+
+  def _get_all_lib_deps(self, target_name, libdep_cache, paths):
+    if not target_name in libdep_cache:
+      libs = {}
+      path = None
+      if target_name in self.sections:
+        section = self.sections[target_name]
+        opt_libs = self.sections[target_name].options.get('libs')
+        paths[target_name] = section.options.get('path')
+        if opt_libs:
+          for lib_name in opt_libs.split():
+            if lib_name.startswith('libsvn_'):
+              libs[lib_name] = True
+            for lib in self._get_all_lib_deps(lib_name, libdep_cache, paths):
+              libs[lib] = True
+      libdep_cache[target_name] = libs.keys()[:]
+      libdep_cache[target_name].sort()
+    return libdep_cache[target_name]
+
 class UnknownDependency(Exception):
   "We don't know how to deal with the dependent to link it in."
   pass

Modified: subversion/branches/diff-optimizations-bytes/build/generator/swig/__init__.py
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/build/generator/swig/__init__.py?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/build/generator/swig/__init__.py (original)
+++ subversion/branches/diff-optimizations-bytes/build/generator/swig/__init__.py Wed Dec 29 00:10:25 2010
@@ -70,9 +70,8 @@ class Generator:
       swig_version = _exec.output([self.swig_path, "-version"])
       m = re.search("Version (\d+).(\d+).(\d+)", swig_version)
       if m:
-        return int(
-          "%s0%s0%s" % (m.group(1), m.group(2), m.group(3)))
+        return (m.group(1), m.group(2), m.group(3))
     except AssertionError:
       pass
-    return 0
+    return (0, 0, 0)
 

Modified: subversion/branches/diff-optimizations-bytes/build/generator/swig/checkout_swig_header.py
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/build/generator/swig/checkout_swig_header.py?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/build/generator/swig/checkout_swig_header.py (original)
+++ subversion/branches/diff-optimizations-bytes/build/generator/swig/checkout_swig_header.py Wed Dec 29 00:10:25 2010
@@ -60,15 +60,15 @@ class Generator(generator.swig.Generator
       os.remove(out)
     if self._skip_checkout(path):
       open(out, "w")
-    elif self.version() == 103024:
+    elif self.version() == (1, 3, 24):
       shutil.copy(build_path_join(self.swig_libdir, path), out)
     else:
       run("%s -o %s -co %s" % (self.swig_path, out, path))
 
   def _skip_checkout(self, path):
     """Should we skip this checkout?"""
-    return (path == "ruby/rubytracking.swg" and self.version() < 103026 or
-            path == "common.swg" and self.version() > 103024)
+    return (path == "ruby/rubytracking.swg" and self.version() < (1, 3, 26) or
+            path == "common.swg" and self.version() > (1, 3, 24))
 
   def _output_file(self, path):
     """Get output filename"""

Modified: subversion/branches/diff-optimizations-bytes/build/generator/swig/external_runtime.py
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/build/generator/swig/external_runtime.py?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/build/generator/swig/external_runtime.py (original)
+++ subversion/branches/diff-optimizations-bytes/build/generator/swig/external_runtime.py Wed Dec 29 00:10:25 2010
@@ -65,7 +65,7 @@ class Generator(generator.swig.Generator
 
     # Build runtime files
     out = self._output_file(lang)
-    if self.version() == 103024:
+    if self.version() == (1, 3, 24):
       out_file = open(out, "w")
       out_file.write(open("%s/swigrun.swg" % self.proxy_dir).read())
       out_file.write(open("%s/common.swg" % self.proxy_dir).read())
@@ -79,12 +79,12 @@ class Generator(generator.swig.Generator
 
     # SWIG 1.3.24-27 should include rubyhead.swg in their
     # external runtime, but they don't.
-    if lang == "ruby" and self.version() < 103028:
+    if lang == "ruby" and self.version() < (1, 3, 28):
       runtime = open(out).read()
       out_file = open(out, "w")
       head = open("%s/rubyhead.swg" % self.proxy_dir).read();
       out_file.write(head)
-      if self.version() >= 103026:
+      if self.version() >= (1, 3, 26):
         # SWIG 1.3.26-27 should include rubytracking.swg in their
         # external runtime, but they don't.
         tracking = open("%s/rubytracking.swg" % self.proxy_dir).read();
@@ -94,7 +94,7 @@ class Generator(generator.swig.Generator
 
     # SWIG 1.3.25 and earlier use the wrong number of arguments in calls to
     # SWIG_GetModule. We fix this below.
-    if self.version() <= 103025:
+    if self.version() <= (1, 3, 25):
       for line in fileinput.input(out, inplace=1):
         sys.stdout.write(
           re.sub(r"SWIG_GetModule\(\)", "SWIG_GetModule(NULL)", line)

Modified: subversion/branches/diff-optimizations-bytes/configure.ac
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/configure.ac?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/configure.ac (original)
+++ subversion/branches/diff-optimizations-bytes/configure.ac Wed Dec 29 00:10:25 2010
@@ -268,8 +268,13 @@ AC_SUBST(LT_CFLAGS)
 AC_SUBST(LT_LDFLAGS)
 
 AC_ARG_ENABLE(local-library-preloading,
-  AS_HELP_STRING([--disable-local-library-preloading], 
-                 [Disable preloading of locally built libraries in locally built executables]),
+  AS_HELP_STRING([--enable-local-library-preloading], 
+                 [Enable preloading of locally built libraries in locally
+                  built executables.  This may be necessary for testing
+                  prior to installation on some platforms.  It doesn't work
+                  on some platforms (Darwin, OpenBSD, ...) and on platforms
+                  where it does work (Linux, ...) it may interfere with the
+                  installation process.]),
   [
   if test "$enableval" != "no"; then
     if test "$svn_enable_shared" = "yes"; then
@@ -281,11 +286,7 @@ AC_ARG_ENABLE(local-library-preloading,
     TRANSFORM_LIBTOOL_SCRIPTS=""
   fi
   ], [
-  if test "`uname`" != "Darwin" && test "$svn_enable_shared" = "yes"; then
-    TRANSFORM_LIBTOOL_SCRIPTS="transform-libtool-scripts"
-  else
-    TRANSFORM_LIBTOOL_SCRIPTS=""
-  fi
+  TRANSFORM_LIBTOOL_SCRIPTS=""
 ])
 AC_SUBST(TRANSFORM_LIBTOOL_SCRIPTS)
 

Modified: subversion/branches/diff-optimizations-bytes/contrib/client-side/svn_load_dirs/svn_load_dirs.pl.in
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/contrib/client-side/svn_load_dirs/svn_load_dirs.pl.in?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/contrib/client-side/svn_load_dirs/svn_load_dirs.pl.in (original)
+++ subversion/branches/diff-optimizations-bytes/contrib/client-side/svn_load_dirs/svn_load_dirs.pl.in Wed Dec 29 00:10:25 2010
@@ -1416,7 +1416,7 @@ sub make_targets_file
 
   foreach my $file (@_)
     {
-      print TARGETS "$file\n";
+      print TARGETS "$file\@\n";
     }
 
   close(TARGETS)

Modified: subversion/branches/diff-optimizations-bytes/notes/fsfs-improvements.txt
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/notes/fsfs-improvements.txt?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/notes/fsfs-improvements.txt (original)
+++ subversion/branches/diff-optimizations-bytes/notes/fsfs-improvements.txt Wed Dec 29 00:10:25 2010
@@ -54,7 +54,7 @@ reading forward through a file.
 Don't Interleave Revision and Content Data
 ------------------------------------------
 
-Format "5" keeps the each revision as a single block.  When
+Format "5" keeps each revision as a single block.  When
 re-constructing a node content from the diffs,  we jump
 through a number of distant revision blocks.  For each node.
 
@@ -164,20 +164,24 @@ against"):
 	r6->r4
 	r7->r6
 
-Default ordering r7,r6,r5,r4,r3,r2,r1,r0 requires
-3/3/2/2/2/2/1/1 seeks.  For 2^N changes (N integer > 0),
+Default ordering r0,r1,r2,r3,r4,r5,r6,r7 requires
+1/1/2/2/2/2/3/3 seeks.  For 2^N changes (N integer > 0),
 we need (N+1)/2 seeks on average.
 
-A path-optimized ordering r1,r3,r2,r5,r7,r6,r4,r0
-requires 2/2/2/2/1/1/1/1 seeks.  It's (N+3)/4 on average.
+A path-optimized ordering r0,r4,r6,r7,r5,r2,r3,r1
+requires 1/1/1/1/2/2/2/2 seeks.  It's (N+3)/4 on average.
 That optimized ordering can easily be constructed by
 
 	* select the highest rev not covered, yet
-	* prepend its diff path to the existing result
-	  (until we meet a revision at already is in
-	  in the result)
+	* add its diff path to the existing result
+	  (starting with the first revision not
+          already is in the result)
 	* repeat until all revs are covered
 
+Note that revision paths start with the low end of
+the revision range because contents gets reconstructed
+from r0 upwards.
+
 
 Move the Manifest Info into the Packed File
 -------------------------------------------

Modified: subversion/branches/diff-optimizations-bytes/subversion/bindings/javahl/native/SVNRepos.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/bindings/javahl/native/SVNRepos.cpp?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/bindings/javahl/native/SVNRepos.cpp (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/bindings/javahl/native/SVNRepos.cpp Wed Dec 29 00:10:25 2010
@@ -322,6 +322,7 @@ void SVNRepos::load(File &path,
   SVN_JNI_ERR(svn_repos_load_fs3(repos, dataIn.getStream(requestPool),
                                  uuid_action, relativePath,
                                  usePreCommitHook, usePostCommitHook,
+                                 FALSE,
                                  notifyCallback != NULL
                                     ? ReposNotifyCallback::notify
                                     : NULL,

Modified: subversion/branches/diff-optimizations-bytes/subversion/bindings/swig/INSTALL
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/bindings/swig/INSTALL?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/bindings/swig/INSTALL (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/bindings/swig/INSTALL Wed Dec 29 00:10:25 2010
@@ -65,7 +65,7 @@ BUILDING SWIG BINDINGS FOR SVN ON UNIX
 
 
 Step 1:  Install a suitable version of SWIG (which is
-         currently swig version 1.3.24 - 1.3.31).
+         currently swig version 1.3.24 - 2.0.1).
 
     * Perhaps your distribution packages a suitable version - if it does
       install it, and skip to the last bullet point in this section.
@@ -260,7 +260,7 @@ BUILDING SWIG BINDINGS FOR SVN ON WINDOW
        the --with-swig parameter to the installed location for SWIG.
        Example:
 
-        > gen-make.py -t vcproj --with-swig="C:\Program Files\SWIG-1.3.31"
+        > gen-make.py -t vcproj --with-swig="C:\Program Files\SWIG-2.0.1"
 
    4.  If you haven't already built Subversion, you should do so now.
        Instructions are in the main INSTALL file.

Modified: subversion/branches/diff-optimizations-bytes/subversion/include/private/svn_ra_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/include/private/svn_ra_private.h?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/include/private/svn_ra_private.h (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/include/private/svn_ra_private.h Wed Dec 29 00:10:25 2010
@@ -68,6 +68,72 @@ svn_ra__obliterate_path_rev(svn_ra_sessi
                             const char *path,
                             apr_pool_t *pool);
 
+
+/*** Operational Locks ***/
+
+/** This is a function type which allows svn_ra__get_operational_lock()
+ * to report lock attempt failures.  If non-NULL, @a locktoken is the
+ * preexisting lock which prevented lock acquisition.
+ *
+ * @since New in 1.7.
+ */
+typedef svn_error_t *(*svn_ra__lock_retry_func_t)(void *baton,
+                                                  const svn_string_t *locktoken,
+                                                  apr_pool_t *pool);
+
+/** Acquire a lock (of sorts) on the repository associated with the
+ * given RA @a session, retrying as necessary up to @a num_retries
+ * times, and set @a *lock_string_p to the value of the acquired lock
+ * token.  Allocate the returned token from @a pool.  (See this
+ * function's counterpart svn_ra__release_operational_lock() for your
+ * lock removal needs.)
+ *
+ * @a lock_revprop_name is the name of the revision-0 property used to
+ * store the lock.
+ *
+ * If @a steal_lock is set, then replace any pre-existing lock on the
+ * repository with our own.  Iff such a theft occurs and
+ * @a stolen_lock_p is non-NULL, set @a *stolen_lock_p to the token of
+ * the lock we stole.
+ *
+ * Call @a retry_func with @a retry_baton each time the retry loop
+ * fails to acquire a lock.
+ *
+ * Use @a cancel_func and @a cancel_baton to check for early
+ * cancellation.
+ *
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_ra__get_operational_lock(const svn_string_t **lock_string_p,
+                             const svn_string_t **stolen_lock_p,
+                             svn_ra_session_t *session,
+                             const char *lock_revprop_name,
+                             svn_boolean_t steal_lock,
+                             int num_retries,
+                             svn_ra__lock_retry_func_t retry_func,
+                             void *retry_baton,
+                             svn_cancel_func_t cancel_func,
+                             void *cancel_baton,
+                             apr_pool_t *pool);
+
+/** Release an operational lock (whose value is @a mylocktoken) on the
+ * repository associated with RA @a session.  (This is the counterpart
+ * to svn_ra__get_operational_lock().)
+ *
+ * @a lock_revprop_name is the name of the revision-0 property used to
+ * store the lock.
+ *
+ * Use @a scratch_pool for temporary allocations.
+ *
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_ra__release_operational_lock(svn_ra_session_t *session,
+                                 const char *lock_revprop_name,
+                                 const svn_string_t *mylocktoken,
+                                 apr_pool_t *scratch_pool);
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/branches/diff-optimizations-bytes/subversion/include/private/svn_repos_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/include/private/svn_repos_private.h?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/include/private/svn_repos_private.h (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/include/private/svn_repos_private.h Wed Dec 29 00:10:25 2010
@@ -70,6 +70,42 @@ svn_repos__obliterate_path_rev(svn_repos
                                apr_pool_t *pool);
 
 
+/** Validate that property @a name is valid for use in a Subversion
+ * repository; return @c SVN_ERR_REPOS_BAD_ARGS if it isn't.  For some
+ * "svn:" properties, also validate the @a value, and return
+ * @c SVN_ERR_BAD_PROPERTY_VALUE if it is not valid.
+ * 
+ * Use @a pool for temporary allocations.
+ *
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_repos__validate_prop(const char *name,
+                         const svn_string_t *value,
+                         apr_pool_t *pool);
+
+/**
+ * Given the error @a err from svn_repos_fs_commit_txn(), return an
+ * string containing either or both of the svn_fs_commit_txn() error
+ * and the SVN_ERR_REPOS_POST_COMMIT_HOOK_FAILED wrapped error from
+ * the post-commit hook.  Any error tracing placeholders in the error
+ * chain are skipped over.
+ *
+ * This function does not modify @a err.
+ *
+ * ### This method should not be necessary, but there are a few
+ * ### places, e.g. mod_dav_svn, where only a single error message
+ * ### string is returned to the caller and it is useful to have both
+ * ### error messages included in the message.
+ *
+ * Use @a pool to do any allocations in.
+ *
+ * @since New in 1.7.
+ */
+const char *
+svn_repos__post_commit_error_str(svn_error_t *err,
+                                 apr_pool_t *pool);
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/branches/diff-optimizations-bytes/subversion/include/private/svn_wc_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/include/private/svn_wc_private.h?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/include/private/svn_wc_private.h (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/include/private/svn_wc_private.h Wed Dec 29 00:10:25 2010
@@ -69,15 +69,6 @@ svn_wc__changelist_match(svn_wc_context_
                          apr_hash_t *clhash,
                          apr_pool_t *scratch_pool);
 
-/**
- * Return a boolean answer to the question "Is @a status something that
- * should be reported?".  @a no_ignore and @a get_all are the same as
- * svn_wc_get_status_editor4().
- */
-svn_boolean_t
-svn_wc__is_sendable_status(const svn_wc_status3_t *status,
-                           svn_boolean_t no_ignore,
-                           svn_boolean_t get_all);
 
 /* For the LOCAL_ABSPATH entry in WC_CTX, set the
  * file_external_path to URL, the file_external_peg_rev to *PEG_REV
@@ -168,6 +159,7 @@ svn_wc__strictly_is_wc_root(svn_boolean_
 
 /** A callback invoked by the generic node-walker function.  */
 typedef svn_error_t *(*svn_wc__node_found_func_t)(const char *local_abspath,
+                                                  svn_node_kind_t kind,
                                                   void *walk_baton,
                                                   apr_pool_t *scratch_pool);
 
@@ -722,6 +714,15 @@ svn_wc__get_mergeinfo_walk_info(svn_bool
                                 apr_pool_t *scratch_pool);
 
 
+/**
+ * For use by entries.c and entries-dump.c to read old-format working copies.
+ */
+svn_error_t *
+svn_wc__read_entries_old(apr_hash_t **entries,
+                         const char *dir_abspath,
+                         apr_pool_t *result_pool,
+                         apr_pool_t *scratch_pool);
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/branches/diff-optimizations-bytes/subversion/include/svn_error.h
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/include/svn_error.h?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/include/svn_error.h (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/include/svn_error.h Wed Dec 29 00:10:25 2010
@@ -57,12 +57,6 @@ extern "C" {
    there for the reasons why. */
 #include "svn_error_codes.h"
 
-/** Set the error location for debug mode. */
-void
-svn_error__locate(const char *file,
-                  long line);
-
-
 /** Put an English description of @a statcode into @a buf and return @a buf,
  * NULL-terminated. @a statcode is either an svn error or apr error.
  */
@@ -116,10 +110,6 @@ svn_error_create(apr_status_t apr_err,
                  svn_error_t *child,
                  const char *message);
 
-/** Wrapper macro to collect file and line information */
-#define svn_error_create \
-  (svn_error__locate(__FILE__,__LINE__), (svn_error_create))
-
 /** Create an error structure with the given @a apr_err and @a child,
  * with a printf-style error message produced by passing @a fmt, using
  * apr_psprintf().
@@ -131,10 +121,6 @@ svn_error_createf(apr_status_t apr_err,
                   ...)
   __attribute__ ((format(printf, 3, 4)));
 
-/** Wrapper macro to collect file and line information */
-#define svn_error_createf \
-  (svn_error__locate(__FILE__,__LINE__), (svn_error_createf))
-
 /** Wrap a @a status from an APR function.  If @a fmt is NULL, this is
  * equivalent to svn_error_create(status,NULL,NULL).  Otherwise,
  * the error message is constructed by formatting @a fmt and the
@@ -149,10 +135,6 @@ svn_error_wrap_apr(apr_status_t status,
                    ...)
        __attribute__((format(printf, 2, 3)));
 
-/** Wrapper macro to collect file and line information */
-#define svn_error_wrap_apr \
-  (svn_error__locate(__FILE__,__LINE__), (svn_error_wrap_apr))
-
 /** A quick n' easy way to create a wrapped exception with your own
  * message, before throwing it up the stack.  (It uses all of the
  * @a child's fields.)
@@ -161,10 +143,6 @@ svn_error_t *
 svn_error_quick_wrap(svn_error_t *child,
                      const char *new_msg);
 
-/** Wrapper macro to collect file and line information */
-#define svn_error_quick_wrap \
-  (svn_error__locate(__FILE__,__LINE__), (svn_error_quick_wrap))
-
 /** Compose two errors, returning the composition as a brand new error
  * and consuming the original errors.  Either or both of @a err1 and
  * @a err2 may be @c SVN_NO_ERROR.  If both are not @c SVN_NO_ERROR,
@@ -193,14 +171,17 @@ svn_error_compose(svn_error_t *chain,
 svn_error_t *
 svn_error_root_cause(svn_error_t *err);
 
-/** Return TRUE if @a err's chain contains the error code @a apr_err.
+/** Return the first error in @a err's chain that has an error code @a
+ * apr_err or #SVN_NO_ERROR if there is no error with that code.  @a
+ * err should *not* be cleared as the returned error shares memory
+ * with @a err.
  *
- * If @a err is #SVN_NO_ERROR, return FALSE.
+ * If @a err is #SVN_NO_ERROR, return #SVN_NO_ERROR.
  *
  * @since New in 1.7.
  */
-svn_boolean_t
-svn_error_has_cause(svn_error_t *err, apr_status_t apr_err);
+svn_error_t *
+svn_error_find_cause(svn_error_t *err, apr_status_t apr_err);
 
 /** Create a new error that is a deep copy of @a err and return it.
  *
@@ -222,6 +203,24 @@ void
 svn_error_clear(svn_error_t *error);
 
 
+#if defined(SVN_DEBUG)
+/** Set the error location for debug mode. */
+void
+svn_error__locate(const char *file,
+                  long line);
+
+/* Wrapper macros to collect file and line information */
+#define svn_error_create \
+  (svn_error__locate(__FILE__,__LINE__), (svn_error_create))
+#define svn_error_createf \
+  (svn_error__locate(__FILE__,__LINE__), (svn_error_createf))
+#define svn_error_wrap_apr \
+  (svn_error__locate(__FILE__,__LINE__), (svn_error_wrap_apr))
+#define svn_error_quick_wrap \
+  (svn_error__locate(__FILE__,__LINE__), (svn_error_quick_wrap))
+#endif
+
+
 /**
  * Very basic default error handler: print out error stack @a error to the
  * stdio stream @a stream, with each error prefixed by @a prefix; quit and
@@ -312,13 +311,22 @@ svn_handle_warning(FILE *stream,
 #endif
 
 /**
- * Purge from @a ERR and its child chain any links associated with
- * error tracing placeholders, and return the new top-level error
- * chain item.  @a ERR should be considered unusable after passing
- * through this function, but should *not* be cleared (as the returned
- * error is shares memory with @a ERR).
+ * Returns an error chain that is based on @a err's error chain but
+ * does not include any error tracing placeholders.  @a err is not
+ * modified, except for any allocations using its pool.
+ *
+ * The returned error chain is allocated from @a err's pool and shares
+ * its message and source filename character arrays.  The returned
+ * error chain should *not* be cleared because it is not a fully
+ * fledged error chain, only clearing @a err should be done to clear
+ * the returned error chain.  If @a err is cleared, then the returned
+ * error chain is unusable.
+ *
+ * @a err can be #SVN_NO_ERROR.  If @a err is not #SVN_NO_ERROR, then
+ * the last link in the error chain must be a non-tracing error, i.e,
+ * a real error.
  *
- * @since New in 1.6.
+ * @since New in 1.7.
  */
 svn_error_t *svn_error_purge_tracing(svn_error_t *err);
 

Modified: subversion/branches/diff-optimizations-bytes/subversion/include/svn_fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/include/svn_fs.h?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/include/svn_fs.h (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/include/svn_fs.h Wed Dec 29 00:10:25 2010
@@ -811,15 +811,16 @@ svn_fs_begin_txn(svn_fs_txn_t **txn_p,
  *
  * If the commit succeeds, @a txn is invalid.
  *
- * If the commit fails, @a txn is still valid; you can make more
- * operations to resolve the conflict, or call svn_fs_abort_txn() to
- * abort the transaction.
+ * If the commit fails for any reason, @a *new_rev is an invalid
+ * revision number, an error other than #SVN_NO_ERROR is returned and
+ * @a txn is still valid; you can make more operations to resolve the
+ * conflict, or call svn_fs_abort_txn() to abort the transaction.
  *
  * @note Success or failure of the commit of @a txn is determined by
  * examining the value of @a *new_rev upon this function's return.  If
  * the value is a valid revision number, the commit was successful,
  * even though a non-@c NULL function return value may indicate that
- * something else went wrong.
+ * something else went wrong in post commit FS processing.
  */
 svn_error_t *
 svn_fs_commit_txn(const char **conflict_p,

Modified: subversion/branches/diff-optimizations-bytes/subversion/include/svn_io.h
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/include/svn_io.h?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/include/svn_io.h (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/include/svn_io.h Wed Dec 29 00:10:25 2010
@@ -1484,9 +1484,17 @@ svn_io_dir_walk(const char *dirname,
 
 /**
  * Start @a cmd with @a args, using utf8-encoded @a path as working
- * directory.  Connect @a cmd's stdin, stdout, and stderr to @a infile,
- * @a outfile, and @a errfile, except where they are NULL.  Return the
- * process handle for the invoked program in @a *cmd_proc.
+ * directory.  Return the process handle for the invoked program in @a
+ * *cmd_proc.
+ *
+ * If @a infile_pipe is TRUE, connect @a cmd's stdin to a pipe;
+ * otherwise, connect it to @a infile (which may be NULL).  If
+ * @a outfile_pipe is TRUE, connect @a cmd's stdout to a pipe; otherwise,
+ * connect it to @a outfile (which may be NULL).  If @a errfile_pipe
+ * is TRUE, connect @a cmd's stderr to a pipe; otherwise, connect it
+ * to @a errfile (which may be NULL).  (Callers must pass FALSE for
+ * each of these boolean values for which the corresponding file
+ * handle is non-NULL.)
  *
  * @a args is a list of utf8-encoded <tt>const char *</tt> arguments,
  * terminated by @c NULL.  @a args[0] is the name of the program, though it
@@ -1501,8 +1509,29 @@ svn_io_dir_walk(const char *dirname,
  * will result in error output being written to @a errfile, if non-NULL, and
  * a non-zero exit status being returned to the parent process.
  *
+ * @since New in 1.7.
+ */
+svn_error_t *svn_io_start_cmd2(apr_proc_t *cmd_proc,
+                               const char *path,
+                               const char *cmd,
+                               const char *const *args,
+                               svn_boolean_t inherit,
+                               svn_boolean_t infile_pipe,
+                               apr_file_t *infile,
+                               svn_boolean_t outfile_pipe,
+                               apr_file_t *outfile,
+                               svn_boolean_t errfile_pipe,
+                               apr_file_t *errfile,
+                               apr_pool_t *pool);
+
+/**
+ * Similar to svn_io_start_cmd2() but with @a infile_pipe, @a
+ * outfile_pipe, and @a errfile_pipe always FALSE.
+ *
+ * @deprecated Provided for backward compatibility with the 1.6 API
  * @since New in 1.3.
  */
+SVN_DEPRECATED
 svn_error_t *
 svn_io_start_cmd(apr_proc_t *cmd_proc,
                  const char *path,

Modified: subversion/branches/diff-optimizations-bytes/subversion/include/svn_ra.h
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/include/svn_ra.h?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/include/svn_ra.h (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/include/svn_ra.h Wed Dec 29 00:10:25 2010
@@ -762,7 +762,7 @@ svn_ra_get_dated_revision(svn_ra_session
  *
  * Use @a pool for memory allocation.
  *
- * @see svn_fs_change_rev_prop2(), svn_error_has_cause().
+ * @see svn_fs_change_rev_prop2(), svn_error_find_cause().
  *
  * @since New in 1.7.
  */

Modified: subversion/branches/diff-optimizations-bytes/subversion/include/svn_repos.h
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/include/svn_repos.h?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/include/svn_repos.h (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/include/svn_repos.h Wed Dec 29 00:10:25 2010
@@ -1844,15 +1844,27 @@ svn_repos_get_file_revs(svn_repos_t *rep
  * @{
  */
 
-/** Like svn_fs_commit_txn(), but invoke the @a repos's pre- and
+/** Like svn_fs_commit_txn(), but invoke the @a repos' pre- and
  * post-commit hooks around the commit.  Use @a pool for any necessary
  * allocations.
  *
- * If the pre-commit hook or svn_fs_commit_txn() fails, throw the
- * original error to caller.  If an error occurs when running the
- * post-commit hook, return the original error wrapped with
- * SVN_ERR_REPOS_POST_COMMIT_HOOK_FAILED.  If the caller sees this
- * error, it knows that the commit succeeded anyway.
+ * If the pre-commit hook fails, do not attempt to commit the
+ * transaction and throw the original error to the caller.
+ *
+ * A successful commit is indicated by a valid revision value in @a
+ * *new_rev, not if svn_fs_commit_txn() returns an error, which can
+ * occur during its post commit FS processing.  If the transaction was
+ * not committed, then return the associated error and do not execute
+ * the post-commit hook.
+ *
+ * If the commit succeeds the post-commit hook is executed.  If the
+ * post-commit hook returns an error, always wrap it with
+ * SVN_ERR_REPOS_POST_COMMIT_HOOK_FAILED; this allows the caller to
+ * find the post-commit hook error in the returned error chain.  If
+ * both svn_fs_commit_txn() and the post-commit hook return errors,
+ * then svn_fs_commit_txn()'s error is the parent error and the
+ * SVN_ERR_REPOS_POST_COMMIT_HOOK_FAILED wrapped error is the child
+ * error.
  *
  * @a conflict_p, @a new_rev, and @a txn are as in svn_fs_commit_txn().
  */
@@ -2533,6 +2545,10 @@ svn_repos_dump_fs(svn_repos_t *repos,
  * If @a use_post_commit_hook is set, call the repository's
  * post-commit hook after committing each loaded revision.
  *
+ * If @a validate_props is set, then validate Subversion revision and
+ * node properties (those in the svn: namespace) against established
+ * rules for those things.
+ *
  * If non-NULL, use @a notify_func and @a notify_baton to send notification
  * of events to the caller.
  *
@@ -2549,6 +2565,7 @@ svn_repos_load_fs3(svn_repos_t *repos,
                    const char *parent_dir,
                    svn_boolean_t use_pre_commit_hook,
                    svn_boolean_t use_post_commit_hook,
+                   svn_boolean_t validate_props,
                    svn_repos_notify_func_t notify_func,
                    void *notify_baton,
                    svn_cancel_func_t cancel_func,
@@ -2556,8 +2573,9 @@ svn_repos_load_fs3(svn_repos_t *repos,
                    apr_pool_t *pool);
 
 /**
- * Similar to svn_repos_load_fs3(), but with @a feedback_stream in place of
- * the #svn_repos_notify_func_t and baton.
+ * Similar to svn_repos_load_fs3(), but with @a feedback_stream in
+ * place of the #svn_repos_notify_func_t and baton and with
+ * @a validate_props always FALSE.
  *
  * @since New in 1.2.
  * @deprecated Provided for backward compatibility with the 1.6 API.
@@ -2732,13 +2750,16 @@ svn_repos_parse_dumpstream2(svn_stream_t
  * 'copyfrom' history to exist in the repository when it encounters
  * nodes that are added-with-history.
  *
+ * If @a validate_props is set, then validate Subversion revision and
+ * node properties (those in the svn: namespace) against established
+ * rules for those things.
+ *
  * If @a parent_dir is not NULL, then the parser will reparent all the
  * loaded nodes, from root to @a parent_dir.  The directory @a parent_dir
  * must be an existing directory in the repository.
  *
  * Print all parsing feedback to @a outstream (if non-@c NULL).
  *
- *
  * @since New in 1.7.
  */
 svn_error_t *
@@ -2746,6 +2767,7 @@ svn_repos_get_fs_build_parser3(const svn
                                void **parse_baton,
                                svn_repos_t *repos,
                                svn_boolean_t use_history,
+                               svn_boolean_t validate_props,
                                enum svn_repos_load_uuid uuid_action,
                                const char *parent_dir,
                                svn_repos_notify_func_t notify_func,
@@ -2753,8 +2775,9 @@ svn_repos_get_fs_build_parser3(const svn
                                apr_pool_t *pool);
 
 /**
- * Similar to svn_repos_get_fs_build_parser3(), but with @a outstream in place
- * if a #svn_repos_notify_func_t and baton.
+ * Similar to svn_repos_get_fs_build_parser3(), but with @a outstream
+ * in place if a #svn_repos_notify_func_t and baton and with
+ * @a validate_props always FALSE.
  *
  * @since New in 1.1.
  * @deprecated Provided for backward compatibility with the 1.6 API.

Modified: subversion/branches/diff-optimizations-bytes/subversion/include/svn_subst.h
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/include/svn_subst.h?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/include/svn_subst.h (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/include/svn_subst.h Wed Dec 29 00:10:25 2010
@@ -592,19 +592,46 @@ svn_subst_stream_detranslated(svn_stream
 
 /* EOL conversion and character encodings */
 
+/** Similar to svn_subst_translate_string2(), except that the information about
+ * whether re-encoding or line ending translation were performed is discarded.
+ *
+ * @deprecated Provided for backward compatibility with the 1.6 API.
+ */
+SVN_DEPRECATED
+svn_error_t *svn_subst_translate_string(svn_string_t **new_value,
+                                        const svn_string_t *value,
+                                        const char *encoding,
+                                        apr_pool_t *pool);
+
 /** Translate the string @a value from character encoding @a encoding to
  * UTF8, and also from its current line-ending style to LF line-endings.  If
  * @a encoding is @c NULL, translate from the system-default encoding.
  *
+ * If @a translated_to_utf8 is not @c NULL, then set @a *translated_to_utf8
+ * to @c TRUE if at least one character of @a value in the source character
+ * encoding was translated to UTF-8, or to @c FALSE otherwise.
+ *
+ * If @a translated_line_endings is not @c NULL, then set @a
+ * *translated_line_endings to @c TRUE if at least one line ending was
+ * changed to LF, or to @c FALSE otherwise.
+ *
  * Recognized line endings are LF, CR, CRLF.  If @a value has inconsistent
  * line endings, return @c SVN_ERR_IO_INCONSISTENT_EOL.
  *
- * Set @a *new_value to the translated string, allocated in @a pool.
+ * Set @a *new_value to the translated string, allocated in @a result_pool.
+ *
+ * @a scratch_pool is used for temporary allocations.
+ *
+ * @since New in 1.7.
  */
-svn_error_t *svn_subst_translate_string(svn_string_t **new_value,
-                                        const svn_string_t *value,
-                                        const char *encoding,
-                                        apr_pool_t *pool);
+svn_error_t *
+svn_subst_translate_string2(svn_string_t **new_value,
+                            svn_boolean_t *translated_to_utf8,
+                            svn_boolean_t *translated_line_endings,
+                            const svn_string_t *value,
+                            const char *encoding,
+                            apr_pool_t *result_pool,
+                            apr_pool_t *scratch_pool);
 
 /** Translate the string @a value from UTF8 and LF line-endings into native
  * character encoding and native line-endings.  If @a for_output is TRUE,

Modified: subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/changelist.c
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/changelist.c?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/changelist.c (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/changelist.c Wed Dec 29 00:10:25 2010
@@ -56,19 +56,17 @@ struct set_cl_fn_baton
    as LOCAL_ABSPATH is deemed a valid target of that association.  */
 static svn_error_t *
 set_node_changelist(const char *local_abspath,
+                    svn_node_kind_t kind,
                     void *baton,
                     apr_pool_t *pool)
 {
   struct set_cl_fn_baton *b = (struct set_cl_fn_baton *)baton;
-  svn_node_kind_t kind;
 
   /* See if this entry passes our changelist filtering. */
   if (! svn_wc__changelist_match(b->ctx->wc_ctx, local_abspath,
                                  b->changelist_hash, pool))
     return SVN_NO_ERROR;
 
-  SVN_ERR(svn_wc_read_kind(&kind, b->ctx->wc_ctx, local_abspath, FALSE, pool));
-
   /* We only care about files right now. */
   if (kind != svn_node_file)
     {
@@ -213,14 +211,13 @@ struct get_cl_fn_baton
 
 static svn_error_t *
 get_node_changelist(const char *local_abspath,
+                    svn_node_kind_t kind,
                     void *baton,
                     apr_pool_t *pool)
 {
   struct get_cl_fn_baton *b = (struct get_cl_fn_baton *)baton;
-  svn_node_kind_t kind;
   const char *changelist;
 
-  SVN_ERR(svn_wc_read_kind(&kind, b->wc_ctx, local_abspath, FALSE, pool));
   SVN_ERR(svn_wc__node_get_changelist(&changelist, b->wc_ctx,
                                       local_abspath, pool, pool));
 

Modified: subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/checkout.c
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/checkout.c?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/checkout.c (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/checkout.c Wed Dec 29 00:10:25 2010
@@ -211,12 +211,15 @@ svn_client__checkout_internal(svn_revnum
     }
 
   /* Have update fix the incompleteness. */
-  err = svn_client__update_internal(result_rev, local_abspath,
-                                    revision, depth, TRUE,
-                                    ignore_externals,
-                                    allow_unver_obstructions,
-                                    use_sleep, innercheckout, FALSE,
-                                    ctx, pool);
+  if (! err)
+    {
+      err = svn_client__update_internal(result_rev, local_abspath,
+                                        revision, depth, TRUE,
+                                        ignore_externals,
+                                        allow_unver_obstructions,
+                                        use_sleep, innercheckout, FALSE,
+                                        ctx, pool);
+    }
 
   if (err)
     {

Modified: subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/commit_util.c
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/commit_util.c?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/commit_util.c (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/commit_util.c Wed Dec 29 00:10:25 2010
@@ -200,6 +200,7 @@ struct add_lock_token_baton
 /* This implements the svn_wc__node_found_func_t interface. */
 static svn_error_t *
 add_lock_token(const char *local_abspath,
+               svn_node_kind_t kind,
                void *walk_baton,
                apr_pool_t *scratch_pool)
 {

Modified: subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/copy.c?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/copy.c (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/copy.c Wed Dec 29 00:10:25 2010
@@ -983,10 +983,6 @@ repos_to_repos_copy(const apr_array_head
         }
       else if (strcmp(pair->src_abspath_or_url, top_url) == 0)
         {
-          if (is_move)
-            return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
-                                     _("Cannot move URL '%s' into itself"),
-                                     pair->src_abspath_or_url);
           src_rel = "";
           SVN_ERR(svn_ra_check_path(ra_session, src_rel, pair->src_revnum,
                                     &info->src_kind, pool));
@@ -1026,6 +1022,11 @@ repos_to_repos_copy(const apr_array_head
       /* More info for our INFO structure.  */
       info->src_path = src_rel;
       info->dst_path = dst_rel;
+
+      apr_hash_set(action_hash, info->dst_path, APR_HASH_KEY_STRING,
+                       info);
+      if (is_move && (! info->resurrection))
+        apr_hash_set(action_hash, info->src_path, APR_HASH_KEY_STRING, info);
     }
 
   if (SVN_CLIENT__HAS_LOG_MSG_FUNC(ctx))
@@ -1060,8 +1061,6 @@ repos_to_repos_copy(const apr_array_head
           item->url = svn_uri_join(top_url, info->dst_path, pool);
           item->state_flags = SVN_CLIENT_COMMIT_ITEM_ADD;
           APR_ARRAY_PUSH(commit_items, svn_client_commit_item3_t *) = item;
-          apr_hash_set(action_hash, info->dst_path, APR_HASH_KEY_STRING,
-                       info);
 
           if (is_move && (! info->resurrection))
             {
@@ -1069,8 +1068,6 @@ repos_to_repos_copy(const apr_array_head
               item->url = svn_uri_join(top_url, info->src_path, pool);
               item->state_flags = SVN_CLIENT_COMMIT_ITEM_DELETE;
               APR_ARRAY_PUSH(commit_items, svn_client_commit_item3_t *) = item;
-              apr_hash_set(action_hash, info->src_path, APR_HASH_KEY_STRING,
-                           info);
             }
         }
 
@@ -2077,7 +2074,7 @@ try_copy(const apr_array_header_t *sourc
                "supported"));
         }
 
-      /* Disallow moving any path onto or into itself. */
+      /* Disallow moving any path/URL onto or into itself. */
       for (i = 0; i < copy_pairs->nelts; i++)
         {
           svn_client__copy_pair_t *pair = APR_ARRAY_IDX(copy_pairs, i,
@@ -2085,10 +2082,14 @@ try_copy(const apr_array_header_t *sourc
 
           if (strcmp(pair->src_abspath_or_url,
                      pair->dst_abspath_or_url) == 0)
-            return svn_error_createf
-              (SVN_ERR_UNSUPPORTED_FEATURE, NULL,
-               _("Cannot move path '%s' into itself"),
-               svn_dirent_local_style(pair->src_abspath_or_url, pool));
+            return svn_error_createf(
+              SVN_ERR_UNSUPPORTED_FEATURE, NULL,
+              srcs_are_urls ?
+                _("Cannot move URL '%s' into itself") :
+                _("Cannot move path '%s' into itself"),
+              srcs_are_urls ?
+                pair->src_abspath_or_url :
+                svn_dirent_local_style(pair->src_abspath_or_url, pool));
         }
     }
   else

Modified: subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/info.c
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/info.c?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/info.c (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/info.c Wed Dec 29 00:10:25 2010
@@ -334,6 +334,7 @@ struct found_entry_baton
 /* An svn_wc__node_found_func_t callback function. */
 static svn_error_t *
 info_found_node_callback(const char *local_abspath,
+                         svn_node_kind_t kind,
                          void *walk_baton,
                          apr_pool_t *pool)
 {

Modified: subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/log.c
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/log.c?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/log.c (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/log.c Wed Dec 29 00:10:25 2010
@@ -452,15 +452,14 @@ svn_client_log5(const apr_array_header_t
           APR_ARRAY_PUSH(target_urls, const char *) = url;
           APR_ARRAY_PUSH(real_targets, const char *) = target;
         }
-      svn_pool_destroy(iterpool);
 
       /* if we have no valid target_urls, just exit. */
       if (target_urls->nelts == 0)
         return SVN_NO_ERROR;
 
       /* Find the base URL and condensed targets relative to it. */
-      SVN_ERR(svn_path_condense_targets(&url_or_path, &condensed_targets,
-                                        target_urls, TRUE, pool));
+      SVN_ERR(svn_uri_condense_targets(&url_or_path, &condensed_targets,
+                                       target_urls, TRUE, pool, iterpool));
 
       if (condensed_targets->nelts == 0)
         APR_ARRAY_PUSH(condensed_targets, const char *) = "";
@@ -468,6 +467,7 @@ svn_client_log5(const apr_array_header_t
       /* 'targets' now becomes 'real_targets', which has bogus,
          unversioned things removed from it. */
       targets = real_targets;
+      svn_pool_destroy(iterpool);
     }
 
 
@@ -476,7 +476,8 @@ svn_client_log5(const apr_array_header_t
      * we use our initial target path to figure out where to root the RA
      * session, otherwise we use our URL. */
     if (SVN_CLIENT__REVKIND_NEEDS_WC(peg_rev.kind))
-      SVN_ERR(svn_path_condense_targets(&ra_target, NULL, targets, TRUE, pool));
+      SVN_ERR(svn_dirent_condense_targets(&ra_target, NULL, targets,
+                                          TRUE, pool, pool));
     else
       ra_target = url_or_path;
 

Modified: subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/merge.c?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/merge.c (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/merge.c Wed Dec 29 00:10:25 2010
@@ -5572,6 +5572,7 @@ record_missing_subtree_roots(const char 
    WB->CHILDREN_WITH_MERGEINFO array. */
 static svn_error_t *
 get_mergeinfo_walk_cb(const char *local_abspath,
+                      svn_node_kind_t kind,
                       void *walk_baton,
                       apr_pool_t *scratch_pool)
 {
@@ -5583,7 +5584,6 @@ get_mergeinfo_walk_cb(const char *local_
     !svn_path_compare_paths(local_abspath, wb->merge_target_abspath);
   const char *abs_parent_path = svn_dirent_dirname(local_abspath,
                                                    scratch_pool);
-  svn_node_kind_t kind;
   svn_depth_t depth;
   svn_boolean_t is_present;
   svn_boolean_t deleted;
@@ -5623,9 +5623,6 @@ get_mergeinfo_walk_cb(const char *local_
                                     scratch_pool));
     }
 
-  SVN_ERR(svn_wc_read_kind(&kind, wb->ctx->wc_ctx, local_abspath, TRUE,
-                           scratch_pool));
-
   immediate_child_dir = ((wb->depth == svn_depth_immediates)
                          &&(kind == svn_node_dir)
                          && (strcmp(abs_parent_path,
@@ -10305,6 +10302,7 @@ struct get_subtree_mergeinfo_walk_baton
    POOL is used only for temporary allocations. */
 static svn_error_t *
 get_subtree_mergeinfo_walk_cb(const char *local_abspath,
+                              svn_node_kind_t kind,
                               void *walk_baton,
                               apr_pool_t *pool)
 {

Modified: subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/mergeinfo.c?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/mergeinfo.c (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/mergeinfo.c Wed Dec 29 00:10:25 2010
@@ -323,6 +323,7 @@ struct get_mergeinfo_catalog_walk_baton
 
 static svn_error_t *
 get_subtree_mergeinfo_walk_cb(const char *local_abspath,
+                              svn_node_kind_t kind,
                               void *walk_baton,
                               apr_pool_t *scratch_pool)
 {

Modified: subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/patch.c
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/patch.c?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/patch.c (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/patch.c Wed Dec 29 00:10:25 2010
@@ -2643,7 +2643,6 @@ apply_patches(void *baton,
 {
   svn_patch_t *patch;
   apr_pool_t *iterpool;
-  const char *patch_eol_str;
   apr_file_t *patch_file;
   apr_array_header_t *targets_info;
   apply_patches_baton_t *btn = baton;
@@ -2652,15 +2651,6 @@ apply_patches(void *baton,
   SVN_ERR(svn_io_file_open(&patch_file, btn->patch_abspath,
                            APR_READ | APR_BINARY, 0, scratch_pool));
 
-  SVN_ERR(svn_eol__detect_file_eol(&patch_eol_str, patch_file, scratch_pool));
-  if (patch_eol_str == NULL)
-    {
-      /* If we can't figure out the EOL scheme, just assume native.
-       * It's most likely a bad patch file anyway that will fail to
-       * apply later. */
-      patch_eol_str = APR_EOL_STR;
-    }
-
   /* Apply patches. */
   targets_info = apr_array_make(scratch_pool, 0,
                                 sizeof(patch_target_info_t *));

Modified: subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/prop_commands.c
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/prop_commands.c?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/prop_commands.c (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/prop_commands.c Wed Dec 29 00:10:25 2010
@@ -105,6 +105,7 @@ struct propset_walk_baton
  */
 static svn_error_t *
 propset_walk_cb(const char *local_abspath,
+                svn_node_kind_t kind,
                 void *walk_baton,
                 apr_pool_t *pool)
 {
@@ -679,8 +680,9 @@ struct propget_walk_baton
  */
 static svn_error_t *
 propget_walk_cb(const char *local_abspath,
-                  void *walk_baton,
-                  apr_pool_t *pool)
+                svn_node_kind_t kind,
+                void *walk_baton,
+                apr_pool_t *pool)
 {
   struct propget_walk_baton *wb = walk_baton;
   const svn_string_t *propval;
@@ -895,7 +897,7 @@ get_prop_from_wc(apr_hash_t *props,
   else if (svn_wc__changelist_match(ctx->wc_ctx, target_abspath,
                                     changelist_hash, pool))
     {
-      SVN_ERR(propget_walk_cb(target_abspath, &wb, pool));
+      SVN_ERR(propget_walk_cb(target_abspath, kind, &wb, pool));
     }
 
   return SVN_NO_ERROR;
@@ -1186,6 +1188,7 @@ struct proplist_walk_baton
  */
 static svn_error_t *
 proplist_walk_cb(const char *local_abspath,
+                 svn_node_kind_t kind,
                  void *walk_baton,
                  apr_pool_t *scratch_pool)
 {

Modified: subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/ra.c
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/ra.c?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/ra.c (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/ra.c Wed Dec 29 00:10:25 2010
@@ -215,6 +215,7 @@ struct invalidate_wcprop_walk_baton
    `svn_wc_entry_callbacks_t'. */
 static svn_error_t *
 invalidate_wcprop_for_node(const char *local_abspath,
+                           svn_node_kind_t kind,
                            void *walk_baton,
                            apr_pool_t *pool)
 {

Modified: subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/status.c?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/status.c (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/libsvn_client/status.c Wed Dec 29 00:10:25 2010
@@ -292,17 +292,16 @@ svn_client_status5(svn_revnum_t *result_
     SVN_ERR(svn_io_check_path(target_abspath, &disk_kind, pool));
     err = svn_wc_read_kind(&kind, ctx->wc_ctx, target_abspath, FALSE, pool);
 
-    if (err && ((err->apr_err == SVN_ERR_WC_MISSING) ||
-                (err->apr_err == SVN_ERR_WC_NOT_WORKING_COPY)))
-    {
-      /* This error code is checked for in svn to continue after an error */
-      svn_error_clear(err);
-      return svn_error_createf(SVN_ERR_WC_NOT_WORKING_COPY, NULL,
-                               _("'%s' is not a working copy"),
-                               svn_dirent_local_style(path, pool));
-    }
-
-    SVN_ERR(err);
+    if (err && (err->apr_err == SVN_ERR_WC_MISSING))
+      {
+        /* Calling code expects SVN_ERR_WC_NOT_WORKING_COPY. */
+        svn_error_clear(err);
+        return svn_error_createf(SVN_ERR_WC_NOT_WORKING_COPY, NULL,
+                                 _("'%s' is not a working copy"),
+                                 svn_dirent_local_style(path, pool));
+      }
+    else if (err)
+      return err;
 
     /* Dir must be an existing directory or the status editor fails */
     if (kind == svn_node_dir && disk_kind == svn_node_dir)
@@ -495,14 +494,16 @@ svn_client_status5(svn_revnum_t *result_
           SVN_ERR(svn_wc_crawl_revisions5(ctx->wc_ctx,
                                           target_abspath,
                                           &lock_fetch_reporter, &rb, FALSE,
-                                          depth, TRUE, (! server_supports_depth),
+                                          depth, TRUE,
+                                          (! server_supports_depth),
                                           FALSE, NULL, NULL, NULL, NULL, pool));
         }
 
       if (ctx->notify_func2)
         {
           svn_wc_notify_t *notify
-            = svn_wc_create_notify(target_abspath, svn_wc_notify_status_completed, pool);
+            = svn_wc_create_notify(target_abspath,
+                                   svn_wc_notify_status_completed, pool);
           notify->revision = edit_revision;
           (ctx->notify_func2)(ctx->notify_baton2, notify, pool);
         }

Modified: subversion/branches/diff-optimizations-bytes/subversion/libsvn_fs/fs-loader.c
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/libsvn_fs/fs-loader.c?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/libsvn_fs/fs-loader.c (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/libsvn_fs/fs-loader.c Wed Dec 29 00:10:25 2010
@@ -676,6 +676,7 @@ svn_fs_commit_txn(const char **conflict_
   svn_fs_t *fs;
   const char *fs_path;
 
+  *new_rev = SVN_INVALID_REVNUM;
   SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
   fs = svn_fs_root_fs(txn_root);
   fs_path = svn_fs_path(fs, pool);

Modified: subversion/branches/diff-optimizations-bytes/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/libsvn_fs_fs/fs_fs.c?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/libsvn_fs_fs/fs_fs.c Wed Dec 29 00:10:25 2010
@@ -5426,9 +5426,20 @@ rep_write_contents_close(void *baton)
   /* Check and see if we already have a representation somewhere that's
      identical to the one we just wrote out. */
   if (ffd->rep_sharing_allowed)
-    /* ### TODO: ignore errors opening the DB (issue #3506) * */
-    SVN_ERR(svn_fs_fs__get_rep_reference(&old_rep, b->fs, rep->sha1_checksum,
-                                         b->parent_pool));
+    {
+      svn_error_t *err;
+      err = svn_fs_fs__get_rep_reference(&old_rep, b->fs, rep->sha1_checksum,
+                                         b->parent_pool);
+      if (err)
+        {
+          /* Something's wrong with the rep-sharing index.  We can continue 
+             without rep-sharing, but warn.
+           */
+          (b->fs->warning)(b->fs->warning_baton, err);
+          svn_error_clear(err);
+          old_rep = NULL;
+        }
+    }
   else
     old_rep = NULL;
 
@@ -6206,13 +6217,19 @@ commit_body(void *baton, apr_pool_t *poo
   /* Update the 'current' file. */
   SVN_ERR(write_final_current(cb->fs, cb->txn->id, new_rev, start_node_id,
                               start_copy_id, pool));
+
+  /* At this point the new revision is committed and globally visible
+     so let the caller know it succeeded by giving it the new revision
+     number, which fulfills svn_fs_commit_txn() contract.  Any errors
+     after this point do not change the fact that a new revision was
+     created. */
+  *cb->new_rev_p = new_rev;
+
   ffd->youngest_rev_cache = new_rev;
 
   /* Remove this transaction directory. */
   SVN_ERR(svn_fs_fs__purge_txn(cb->fs, cb->txn->id, pool));
 
-  *cb->new_rev_p = new_rev;
-
   return SVN_NO_ERROR;
 }
 
@@ -6377,7 +6394,8 @@ svn_fs_fs__commit(svn_revnum_t *new_rev_
 
   if (ffd->rep_sharing_allowed)
     {
-      /* ### TODO: ignore errors opening the DB (issue #3506) * */
+      /* At this point, *NEW_REV_P has been set, so errors here won't affect
+         the success of the commit.  (See svn_fs_commit_txn().)  */
       SVN_ERR(svn_fs_fs__open_rep_cache(fs, pool));
       SVN_ERR(svn_sqlite__with_transaction(ffd->rep_cache_db,
                                            commit_sqlite_txn_callback,

Modified: subversion/branches/diff-optimizations-bytes/subversion/libsvn_fs_fs/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/libsvn_fs_fs/lock.c?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/libsvn_fs_fs/lock.c (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/libsvn_fs_fs/lock.c Wed Dec 29 00:10:25 2010
@@ -396,10 +396,10 @@ set_lock(const char *fs_path,
                                 digest_path, perms_reference, subpool));
 
       /* Prep for next iteration, or bail if we're done. */
-      if (svn_dirent_is_root(this_path->data, this_path->len))
+      if (svn_uri_is_root(this_path->data, this_path->len))
         break;
       svn_stringbuf_set(this_path,
-                        svn_dirent_dirname(this_path->data, subpool));
+                        svn_fspath__dirname(this_path->data, subpool));
     }
 
   svn_pool_destroy(subpool);
@@ -464,10 +464,10 @@ delete_lock(svn_fs_t *fs,
         }
 
       /* Prep for next iteration, or bail if we're done. */
-      if (svn_dirent_is_root(this_path->data, this_path->len))
+      if (svn_uri_is_root(this_path->data, this_path->len))
         break;
       svn_stringbuf_set(this_path,
-                        svn_dirent_dirname(this_path->data, subpool));
+                        svn_fspath__dirname(this_path->data, subpool));
     }
 
   svn_pool_destroy(subpool);

Modified: subversion/branches/diff-optimizations-bytes/subversion/libsvn_fs_fs/rep-cache.c
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/libsvn_fs_fs/rep-cache.c?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/libsvn_fs_fs/rep-cache.c (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/libsvn_fs_fs/rep-cache.c Wed Dec 29 00:10:25 2010
@@ -72,8 +72,9 @@ svn_fs_fs__open_rep_cache(svn_fs_t *fs,
                           apr_pool_t *pool)
 {
   fs_fs_data_t *ffd = fs->fsap_data;
-  return svn_error_return(svn_atomic__init_once(&ffd->rep_cache_db_opened,
-                                                open_rep_cache, fs, pool));
+  svn_error_t *err = svn_atomic__init_once(&ffd->rep_cache_db_opened,
+                                           open_rep_cache, fs, pool);
+  return svn_error_quick_wrap(err, _("Couldn't open rep-cache database"));
 }
 
 svn_error_t *

Modified: subversion/branches/diff-optimizations-bytes/subversion/libsvn_fs_fs/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/libsvn_fs_fs/tree.c?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/libsvn_fs_fs/tree.c (original)
+++ subversion/branches/diff-optimizations-bytes/subversion/libsvn_fs_fs/tree.c Wed Dec 29 00:10:25 2010
@@ -1446,18 +1446,18 @@ merge(svn_stringbuf_t *conflict_p,
              a modification. In any of these cases, flag a conflict. */
           if (s_entry == NULL || t_entry == NULL)
             return conflict_err(conflict_p,
-                                svn_dirent_join(target_path,
-                                                a_entry->name,
-                                                iterpool));
+                                svn_fspath__join(target_path,
+                                                 a_entry->name,
+                                                 iterpool));
 
           /* If any of the three entries is of type file, flag a conflict. */
           if (s_entry->kind == svn_node_file
               || t_entry->kind == svn_node_file
               || a_entry->kind == svn_node_file)
             return conflict_err(conflict_p,
-                                svn_dirent_join(target_path,
-                                                a_entry->name,
-                                                iterpool));
+                                svn_fspath__join(target_path,
+                                                 a_entry->name,
+                                                 iterpool));
 
           /* If either SOURCE-ENTRY or TARGET-ENTRY is not a direct
              modification of ANCESTOR-ENTRY, declare a conflict. */
@@ -1470,9 +1470,9 @@ merge(svn_stringbuf_t *conflict_p,
               || strcmp(svn_fs_fs__id_copy_id(t_entry->id),
                         svn_fs_fs__id_copy_id(a_entry->id)) != 0)
             return conflict_err(conflict_p,
-                                svn_dirent_join(target_path,
-                                                a_entry->name,
-                                                iterpool));
+                                svn_fspath__join(target_path,
+                                                 a_entry->name,
+                                                 iterpool));
 
           /* Direct modifications were made to the directory
              ANCESTOR-ENTRY in both SOURCE and TARGET.  Recursively
@@ -1483,7 +1483,7 @@ merge(svn_stringbuf_t *conflict_p,
                                           t_entry->id, iterpool));
           SVN_ERR(svn_fs_fs__dag_get_node(&a_ent_node, fs,
                                           a_entry->id, iterpool));
-          new_tpath = svn_dirent_join(target_path, t_entry->name, iterpool);
+          new_tpath = svn_fspath__join(target_path, t_entry->name, iterpool);
           SVN_ERR(merge(conflict_p, new_tpath,
                         t_ent_node, s_ent_node, a_ent_node,
                         txn_id,
@@ -1519,9 +1519,9 @@ merge(svn_stringbuf_t *conflict_p,
       /* If NAME exists in TARGET, declare a conflict. */
       if (t_entry)
         return conflict_err(conflict_p,
-                            svn_dirent_join(target_path,
-                                            t_entry->name,
-                                            iterpool));
+                            svn_fspath__join(target_path,
+                                             t_entry->name,
+                                             iterpool));
 
       SVN_ERR(svn_fs_fs__dag_get_node(&s_ent_node, fs,
                                       s_entry->id, iterpool));