You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2012/12/13 21:39:32 UTC

svn commit: r1421507 [1/6] - in /subversion/branches/ev2-export: ./ build/ contrib/server-side/svncutter/ subversion/bindings/swig/ subversion/bindings/swig/python/tests/ subversion/include/ subversion/include/private/ subversion/libsvn_auth_kwallet/ s...

Author: hwright
Date: Thu Dec 13 20:39:17 2012
New Revision: 1421507

URL: http://svn.apache.org/viewvc?rev=1421507&view=rev
Log:
On the ev2-export branch:
Bring up-to-date with trunk@1421407.

Added:
    subversion/branches/ev2-export/subversion/bindings/swig/python/tests/checksum.py
      - copied unchanged from r1421407, subversion/trunk/subversion/bindings/swig/python/tests/checksum.py
    subversion/branches/ev2-export/subversion/libsvn_wc/token-map.h
      - copied unchanged from r1421407, subversion/trunk/subversion/libsvn_wc/token-map.h
    subversion/branches/ev2-export/subversion/tests/libsvn_ra/   (props changed)
      - copied from r1421407, subversion/trunk/subversion/tests/libsvn_ra/
Modified:
    subversion/branches/ev2-export/   (props changed)
    subversion/branches/ev2-export/CHANGES
    subversion/branches/ev2-export/COMMITTERS
    subversion/branches/ev2-export/build.conf
    subversion/branches/ev2-export/build/run_tests.py
    subversion/branches/ev2-export/build/transform_sql.py
    subversion/branches/ev2-export/configure.ac
    subversion/branches/ev2-export/contrib/server-side/svncutter/svncutter
    subversion/branches/ev2-export/subversion/bindings/swig/core.i
    subversion/branches/ev2-export/subversion/bindings/swig/python/tests/run_all.py
    subversion/branches/ev2-export/subversion/include/private/svn_skel.h
    subversion/branches/ev2-export/subversion/include/private/svn_sqlite.h
    subversion/branches/ev2-export/subversion/include/private/svn_wc_private.h
    subversion/branches/ev2-export/subversion/include/svn_client.h
    subversion/branches/ev2-export/subversion/include/svn_config.h
    subversion/branches/ev2-export/subversion/include/svn_dav.h
    subversion/branches/ev2-export/subversion/include/svn_repos.h
    subversion/branches/ev2-export/subversion/include/svn_wc.h
    subversion/branches/ev2-export/subversion/libsvn_auth_kwallet/kwallet.cpp
    subversion/branches/ev2-export/subversion/libsvn_client/add.c
    subversion/branches/ev2-export/subversion/libsvn_client/client.h
    subversion/branches/ev2-export/subversion/libsvn_client/merge.c
    subversion/branches/ev2-export/subversion/libsvn_fs/fs-loader.c
    subversion/branches/ev2-export/subversion/libsvn_fs_base/dag.c
    subversion/branches/ev2-export/subversion/libsvn_fs_base/dag.h
    subversion/branches/ev2-export/subversion/libsvn_fs_fs/fs_fs.c
    subversion/branches/ev2-export/subversion/libsvn_ra/compat.c
    subversion/branches/ev2-export/subversion/libsvn_ra/ra_loader.c
    subversion/branches/ev2-export/subversion/libsvn_ra_serf/commit.c
    subversion/branches/ev2-export/subversion/libsvn_ra_serf/options.c
    subversion/branches/ev2-export/subversion/libsvn_ra_serf/ra_serf.h
    subversion/branches/ev2-export/subversion/libsvn_ra_serf/replay.c
    subversion/branches/ev2-export/subversion/libsvn_ra_serf/serf.c
    subversion/branches/ev2-export/subversion/libsvn_ra_serf/update.c
    subversion/branches/ev2-export/subversion/libsvn_ra_svn/cyrus_auth.c
    subversion/branches/ev2-export/subversion/libsvn_subr/auth.c
    subversion/branches/ev2-export/subversion/libsvn_subr/config_file.c
    subversion/branches/ev2-export/subversion/libsvn_subr/skel.c
    subversion/branches/ev2-export/subversion/libsvn_subr/sqlite.c
    subversion/branches/ev2-export/subversion/libsvn_wc/adm_crawler.c
    subversion/branches/ev2-export/subversion/libsvn_wc/adm_files.c
    subversion/branches/ev2-export/subversion/libsvn_wc/adm_ops.c
    subversion/branches/ev2-export/subversion/libsvn_wc/ambient_depth_filter_editor.c
    subversion/branches/ev2-export/subversion/libsvn_wc/cleanup.c
    subversion/branches/ev2-export/subversion/libsvn_wc/conflicts.c
    subversion/branches/ev2-export/subversion/libsvn_wc/conflicts.h
    subversion/branches/ev2-export/subversion/libsvn_wc/deprecated.c
    subversion/branches/ev2-export/subversion/libsvn_wc/diff_editor.c
    subversion/branches/ev2-export/subversion/libsvn_wc/diff_local.c
    subversion/branches/ev2-export/subversion/libsvn_wc/entries.c
    subversion/branches/ev2-export/subversion/libsvn_wc/externals.c
    subversion/branches/ev2-export/subversion/libsvn_wc/info.c
    subversion/branches/ev2-export/subversion/libsvn_wc/merge.c
    subversion/branches/ev2-export/subversion/libsvn_wc/node.c
    subversion/branches/ev2-export/subversion/libsvn_wc/props.c
    subversion/branches/ev2-export/subversion/libsvn_wc/props.h
    subversion/branches/ev2-export/subversion/libsvn_wc/status.c
    subversion/branches/ev2-export/subversion/libsvn_wc/update_editor.c
    subversion/branches/ev2-export/subversion/libsvn_wc/upgrade.c
    subversion/branches/ev2-export/subversion/libsvn_wc/util.c
    subversion/branches/ev2-export/subversion/libsvn_wc/wc-metadata.sql
    subversion/branches/ev2-export/subversion/libsvn_wc/wc-queries.sql
    subversion/branches/ev2-export/subversion/libsvn_wc/wc.h
    subversion/branches/ev2-export/subversion/libsvn_wc/wc_db.c
    subversion/branches/ev2-export/subversion/libsvn_wc/wc_db.h
    subversion/branches/ev2-export/subversion/libsvn_wc/wc_db_private.h
    subversion/branches/ev2-export/subversion/libsvn_wc/wc_db_update_move.c
    subversion/branches/ev2-export/subversion/libsvn_wc/workqueue.c
    subversion/branches/ev2-export/subversion/libsvn_wc/workqueue.h
    subversion/branches/ev2-export/subversion/mod_dav_svn/dav_svn.h
    subversion/branches/ev2-export/subversion/mod_dav_svn/mirror.c
    subversion/branches/ev2-export/subversion/mod_dav_svn/mod_dav_svn.c
    subversion/branches/ev2-export/subversion/mod_dav_svn/reports/update.c
    subversion/branches/ev2-export/subversion/mod_dav_svn/version.c
    subversion/branches/ev2-export/subversion/tests/README
    subversion/branches/ev2-export/subversion/tests/cmdline/README
    subversion/branches/ev2-export/subversion/tests/cmdline/merge_automatic_tests.py
    subversion/branches/ev2-export/subversion/tests/cmdline/prop_tests.py
    subversion/branches/ev2-export/subversion/tests/cmdline/svnrdump_tests.py
    subversion/branches/ev2-export/subversion/tests/libsvn_wc/db-test.c
    subversion/branches/ev2-export/subversion/tests/libsvn_wc/op-depth-test.c
    subversion/branches/ev2-export/subversion/tests/libsvn_wc/utils.c
    subversion/branches/ev2-export/subversion/tests/libsvn_wc/utils.h
    subversion/branches/ev2-export/subversion/tests/libsvn_wc/wc-queries-test.c
    subversion/branches/ev2-export/tools/dev/contribulyze.py
    subversion/branches/ev2-export/tools/dist/backport.pl
    subversion/branches/ev2-export/tools/dist/release.py

Propchange: subversion/branches/ev2-export/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1417272-1421407

Modified: subversion/branches/ev2-export/CHANGES
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/CHANGES?rev=1421507&r1=1421506&r2=1421507&view=diff
==============================================================================
--- subversion/branches/ev2-export/CHANGES (original)
+++ subversion/branches/ev2-export/CHANGES Thu Dec 13 20:39:17 2012
@@ -55,6 +55,37 @@ http://svn.apache.org/repos/asf/subversi
     * star-imports in swig-py only import 'svn_*' symbols (r1303375)
 
 
+Version 1.7.8
+(17 Dec 2012, from /branches/1.7.x)
+http://svn.apache.org/repos/asf/subversion/tags/1.7.8
+ User-visible changes
+  - Client- and server-side bugfixes:
+    * Fix typos in pt_BR, es and zh_TW translations (r1402417, r1402421)
+
+  - Client-side bugfixes:
+    * fix crash with --username option on Windows (r1396285)
+    * add missing attributes to "svn log -v --xml" output (r1398100)
+    * fix svn patch ignoring hunks after no trailing newline (r139917)
+    * fix hang with ra_serf during error processing (r1403583)
+    * ignore file externals with mergeinfo when merging (r1401915)
+    * fix "svnmucc cp" segfault with a missing last argument (issue #4079)
+    * fix conflict handling on symlinks (issue #4091)
+    
+  - Server-side bugfixes:
+    * properly detect threading availability (r1398325)
+    * fix "svnadmin load --bypass-prop-validation" (r1237779)
+    * fix parsing of [groupsfoo] sections in authz file (issue #3531)
+    * add Vary: header to GET responses to improve cacheability (r1390653)
+    * fix fs_fs to cleanup after failed rep transmission (r1403964, et al)
+    * fix mod_dav_svn to complain about revisions > HEAD (r1403588)
+
+ Developer-visible changes:
+  - General:
+    * fix incorrect status returned by 1.6 API (r1403258)
+    * fix compilation with g++ 4.7 (r1345740)
+    * fix svn_uri_get_file_url_from_dirent on Windows (r1409146)
+
+
 Version 1.7.7
 (09 Oct 2012, from /branches/1.7.x)
 http://svn.apache.org/repos/asf/subversion/tags/1.7.7

Modified: subversion/branches/ev2-export/COMMITTERS
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/COMMITTERS?rev=1421507&r1=1421506&r2=1421507&view=diff
==============================================================================
--- subversion/branches/ev2-export/COMMITTERS [UTF-8] (original)
+++ subversion/branches/ev2-export/COMMITTERS [UTF-8] Thu Dec 13 20:39:17 2012
@@ -131,7 +131,7 @@ Commit access for specific areas:
           nori   Kobayashi Noritada <no...@dolphin.c.u-tokyo.ac.jp> (Ruby tools,
                                                               po: ja) [EMAIL IS
                                                               BOUNCING]
-            mf   Martin Furter <mf...@rola.ch>                  (svnmirror.sh
+            mf   Martin Furter <mf...@apache.org>               (svnmirror.sh
                                                           svn-backup-dumps.py)
        adejong   Arthur de Jong <ar...@ch.tudelft.nl>       (svn2cl)
       wsanchez   Wilfredo Sánchez <ws...@wsanchez.net>    (various contrib)

Modified: subversion/branches/ev2-export/build.conf
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/build.conf?rev=1421507&r1=1421506&r2=1421507&view=diff
==============================================================================
--- subversion/branches/ev2-export/build.conf (original)
+++ subversion/branches/ev2-export/build.conf Thu Dec 13 20:39:17 2012
@@ -970,6 +970,18 @@ install = test
 libs = libsvn_test libsvn_diff libsvn_subr apriconv apr
 
 # ----------------------------------------------------------------------------
+# Tests for libsvn_ra
+
+[ra-test]
+description = Test a few things in libsvn_ra
+type = exe
+path = subversion/tests/libsvn_ra
+sources = ra-test.c
+install = test
+libs = libsvn_test libsvn_ra libsvn_fs libsvn_delta libsvn_subr
+       apriconv apr
+
+# ----------------------------------------------------------------------------
 # Tests for libsvn_ra_local
 
 [ra-local-test]
@@ -1195,6 +1207,7 @@ libs = __ALL__
        translate-test
        random-test window-test
        diff-diff3-test
+       ra-test
        ra-local-test
        svndiff-test vdelta-test
        entries-dump atomic-ra-revprop-change wc-lock-tester wc-incomplete-tester

Modified: subversion/branches/ev2-export/build/run_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/build/run_tests.py?rev=1421507&r1=1421506&r2=1421507&view=diff
==============================================================================
--- subversion/branches/ev2-export/build/run_tests.py (original)
+++ subversion/branches/ev2-export/build/run_tests.py Thu Dec 13 20:39:17 2012
@@ -354,7 +354,7 @@ class TestHarness:
       if self.config_file is not None:
         cmdline.append('--config-file=' + self.config_file)
     else:
-      print('Don\'t know what to do about ' + progbase)
+      print("Don't know what to do about " + progbase)
       sys.exit(1)
 
     if self.verbose is not None:
@@ -433,8 +433,8 @@ class TestHarness:
       prog_mod = imp.load_module(progbase[:-3], open(prog, 'r'), prog,
                                  ('.py', 'U', imp.PY_SOURCE))
     except:
-      print('Don\'t know what to do about ' + progbase)
-      raise
+      print("Don't know what to do about " + progbase)
+      sys.exit(1)
 
     import svntest.main
 

Modified: subversion/branches/ev2-export/build/transform_sql.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/build/transform_sql.py?rev=1421507&r1=1421506&r2=1421507&view=diff
==============================================================================
--- subversion/branches/ev2-export/build/transform_sql.py (original)
+++ subversion/branches/ev2-export/build/transform_sql.py Thu Dec 13 20:39:17 2012
@@ -25,11 +25,19 @@
 #
 
 
+import operator
 import os
 import re
 import sys
 
 
+# operator.methodcaller doesn't exist in Python 2.5.
+if not hasattr(operator, 'methodcaller'):
+  def methodcaller(method, *args, **kwargs):
+    return lambda x: getattr(x, method)(*args, **kwargs)
+  operator.methodcaller = methodcaller
+  del methodcaller
+
 DEFINE_END = '  ""\n\n'
 
 
@@ -89,10 +97,11 @@ class Processor(object):
 
     self.output.write('  APR_STRINGIFY(%s) \\\n' % define)
 
-  def __init__(self, dirpath, output, var_name):
+  def __init__(self, dirpath, output, var_name, token_map):
     self.dirpath = dirpath
     self.output = output
     self.var_name = var_name
+    self.token_map = token_map
 
     self.stmt_count = 0
     self.var_printed = False
@@ -140,6 +149,11 @@ class Processor(object):
             r" AND ((\1) < CASE (\2) WHEN '' THEN X'FFFF' ELSE (\2) || '0' END))",
             line)
 
+      # Another preprocessing.
+      for symbol, string in self.token_map.iteritems():
+        # ### This doesn't sql-escape 'string'
+        line = re.sub(r'\b%s\b' % re.escape(symbol), "'%s'" % string, line)
+
       if line.strip():
         handled = False
 
@@ -172,10 +186,51 @@ class Processor(object):
       self.var_printed = False
 
 
+class NonRewritableDict(dict):
+  """A dictionary that does not allow self[k]=v when k in self
+  (unless v is equal to the stored value).
+
+  (An entry would have to be explicitly deleted before a new value
+  may be entered.)
+  """
+
+  def __setitem__(self, key, val):
+    if self.__contains__(key) and self.__getitem__(key) != val:
+      raise Exception("Can't re-insert key %r with value %r "
+                      "(already present with value %r)"
+                      % (key, val, self.__getitem__(key)))
+    super(NonRewritableDict, self).__setitem__(key, val)
+
+def hotspots(fd):
+  hotspot = False
+  for line in fd:
+    # hotspot is TRUE within definitions of static const svn_token_map_t[].
+    hotspot ^= int(('svn_token_map_t', '\x7d;')[hotspot] in line)
+    if hotspot:
+      yield line
+
+def extract_token_map(filename):
+  try:
+    fd = open(filename)
+  except IOError:
+    return {}
+
+  pattern = re.compile(r'"(.*?)".*?(MAP_\w*)')
+  return \
+    NonRewritableDict(
+      map(operator.itemgetter(1,0),
+        map(operator.methodcaller('groups'),
+          filter(None,
+            map(pattern.search,
+              hotspots(fd))))))
+
 def main(input_filepath, output):
   filename = os.path.basename(input_filepath)
   input = open(input_filepath, 'r').read()
 
+  token_map_filename = os.path.dirname(input_filepath) + '/token-map.h'
+  token_map = extract_token_map(token_map_filename)
+
   var_name = re.sub('[-.]', '_', filename).upper()
 
   output.write(
@@ -184,7 +239,7 @@ def main(input_filepath, output):
     '\n'
     % (filename,))
 
-  proc = Processor(os.path.dirname(input_filepath), output, var_name)
+  proc = Processor(os.path.dirname(input_filepath), output, var_name, token_map)
   proc.process_file(input)
 
   ### the STMT_%d naming precludes *multiple* transform_sql headers from

Modified: subversion/branches/ev2-export/configure.ac
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/configure.ac?rev=1421507&r1=1421506&r2=1421507&view=diff
==============================================================================
--- subversion/branches/ev2-export/configure.ac (original)
+++ subversion/branches/ev2-export/configure.ac Thu Dec 13 20:39:17 2012
@@ -99,18 +99,21 @@ SVN_LIB_APR($APR_VER_REGEXES)
 if test `expr $apr_version : 2` -ne 0; then
   dnl Bump the library so-version to 2 if using APR-2
   dnl (Debian uses so-version 1 for APR-1-with-largefile)
-  SVN_LT_SOVERSION="-version-info 2"
+  svn_lib_ver=2
   dnl APR-2 provides APRUTIL
   apu_config=$apr_config
   AC_SUBST(SVN_APRUTIL_INCLUDES)
   AC_SUBST(SVN_APRUTIL_CONFIG, ["$apu_config"])
   AC_SUBST(SVN_APRUTIL_LIBS)
 else
-  SVN_LT_SOVERSION="-version-info 0"
+  svn_lib_ver=0
   APU_VER_REGEXES=["0\.9\.[7-9] 0\.9\.1[0-9] 1\."]
   SVN_LIB_APRUTIL($APU_VER_REGEXES)
 fi
+SVN_LT_SOVERSION="-version-info $svn_lib_ver"
 AC_SUBST(SVN_LT_SOVERSION)
+AC_DEFINE_UNQUOTED(SVN_SOVERSION, $svn_lib_ver,
+                   [Subversion library major verson])
 
 dnl Search for pkg-config
 AC_PATH_PROG(PKG_CONFIG, pkg-config)

Modified: subversion/branches/ev2-export/contrib/server-side/svncutter/svncutter
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/contrib/server-side/svncutter/svncutter?rev=1421507&r1=1421506&r2=1421507&view=diff
==============================================================================
--- subversion/branches/ev2-export/contrib/server-side/svncutter/svncutter (original)
+++ subversion/branches/ev2-export/contrib/server-side/svncutter/svncutter Thu Dec 13 20:39:17 2012
@@ -30,6 +30,7 @@ Available subcommands:
    log
    setlog
    skeleton
+   branchdel
 """
 
 oneliners = {
@@ -40,7 +41,8 @@ oneliners = {
     "proprename": "Renaming revision properties",
     "log":        "Extracting log entries",
     "setlog":     "Mutating log entries",
-    "skeleton":   "strip content, leave only headers",
+    "skeleton":   "Strip content, leave only headers",
+    "branchdel":  "Delete a specified branch",
     }
 
 helpdict = {
@@ -129,6 +131,11 @@ skeleton: usage: svncutter [-r SELECTION
 Strip out all content.  Does not produce a valid dumpfile, but may be useful
 when you need to examine a particularly complex node structure.
 """,
+    "branchdel": """\
+branchdelete: usage: svncutter [-r SELECTION ] branchdel BRANCHNAME
+
+Delete all operations on the specified branch.
+""",
     }
 
 import os, sys, calendar, time, getopt, re
@@ -246,6 +253,8 @@ class DumpfileSource(LineBufferedSource)
                 stash += "V %d%s" % (len(properties[key]), os.linesep) 
                 stash += "%s%s" % (properties[key], os.linesep) 
         stash += self.flush()
+        while self.peek() == '\n':
+            stash += self.readline()
         if self.baton:
             self.baton.twirl()
         return (revision, stash, properties)
@@ -280,10 +289,10 @@ class DumpfileSource(LineBufferedSource)
                 #print "I see contents line", repr(line)
                 if not line:
                     break
-                content += line
                 if line.startswith("Node-path:") or line.startswith("Revision-number"):
                     self.push(line)
                     break
+                content += line
         #print "READ NODE ENDS"
         return (header, properties, content)
     def read_until_next(self, prefix, revmap=None):
@@ -431,6 +440,50 @@ def reference_mapper(value, mutator, fla
                 value = value[:m.start(1)] + new + value[m.end(1):]
     return value
 
+def report(source, selection, hook):
+    "Apply hook to a portion of the dump file defined by a revision selection."
+    emit = 0 in selection
+    stash = source.read_until_next("Revision-number:")
+    if emit:
+        sys.stdout.write(stash)
+    if not source.has_line_buffered():    
+        return
+    while True:
+        nodecount = 0
+        (revision,stash,properties) = source.read_revision_header()
+        if revision in selection:
+            pass
+        elif revision == selection.upperbound()+1:
+            return
+        else:
+            source.read_until_next("Revision-number:")
+            continue
+        while True:
+            line = source.readline()
+            if not line:
+                return
+            elif line == '\n':
+                sys.stdout.write(line)
+                continue
+            elif line.startswith("Revision-number:"):
+                source.push(line)
+                if stash and nodecount == 0:
+                    sys.stdout.write(stash)
+                break
+            elif line.startswith("Node-path:"):
+                nodecount += 1
+                source.push(line)
+                (header, properties, content) = source.read_node()
+                emit = hook(header, properties, content)
+                if emit and stash:
+                    emit = stash + emit
+                    stash = ""
+                sys.stdout.write(emit)
+                continue
+            else:
+                sys.stderr.write("svncutter: parse at %s doesn't look right (%s), aborting!\n" % (revision, repr(line)))
+                sys.exit(1)
+
 # Generic machinery ends here, actual command implementations begin
 
 def squash(source, timefuzz,
@@ -657,40 +710,16 @@ def setlog(source, logpatch, selection):
 
 def skeletonize(source, selection):
     "Skeletonize a portion of the dump file defined by a revision selection."
-    emit = 0 in selection
-    stash = source.read_until_next("Revision-number:")
-    if emit:
-        sys.stdout.write(stash)
-    if not source.has_line_buffered():    
-        return
-    while True:
-        (revision,stash,properties) = source.read_revision_header()
-        if revision in selection:
-            sys.stdout.write(stash)
-            emit = True
-        elif revision == selection.upperbound()+1:
-            return
+    report(source, selection, lambda h, p, c: h + p)
+
+def branchdel(source, selection, branchname):
+    "Strip out ops defined by a revision selection and a branch name."
+    def __branchdel(header, properties, content):
+        if re.search("Node-path: " + branchname, header):
+            return ""
         else:
-            source.read_until_next("Revision-number:")
-            continue
-        while True:
-            line = source.readline()
-            if not line:
-                return
-            elif line == '\n':
-                sys.stdout.write(line)
-                continue
-            elif line.startswith("Revision-number:"):
-                source.push(line)
-                break
-            elif line.startswith("Node-path:"):
-                source.push(line)
-                (header, properties, content) = source.read_node()
-                sys.stdout.write(header + properties)
-                continue
-            else:
-                sys.stderr.write("svncutter: parse at %s doesn't look right (%s), aborting!\n" % (revision, repr(line)))
-                sys.exit(1)
+            return header + properties + content
+    report(source, selection, __branchdel)
 
 if __name__ == '__main__':
     try:
@@ -761,7 +790,9 @@ if __name__ == '__main__':
                 sys.stderr.write("svncutter: setlog requires a log entries file.\n")
             setlog(DumpfileSource(sys.stdin, baton), logpatch, selection)
         elif arguments[0] == "skeleton":
-            skeletonize(DumpfileSource(sys.stdin, baton), selection)            
+            skeletonize(DumpfileSource(sys.stdin, baton), selection)
+        elif arguments[0] == "branchdel":
+            branchdel(DumpfileSource(sys.stdin, baton), selection, arguments[1])
         elif arguments[0] == "help":
             if len(arguments) == 1:
                 sys.stdout.write(__doc__)

Modified: subversion/branches/ev2-export/subversion/bindings/swig/core.i
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/bindings/swig/core.i?rev=1421507&r1=1421506&r2=1421507&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/bindings/swig/core.i (original)
+++ subversion/branches/ev2-export/subversion/bindings/swig/core.i Thu Dec 13 20:39:17 2012
@@ -786,6 +786,7 @@ svn_swig_pl_set_current_pool (apr_pool_t
 %include svn_dirent_uri_h.swg
 %include svn_mergeinfo_h.swg
 %include svn_io_h.swg
+%include svn_checksum_h.swg
 
 
 

Modified: subversion/branches/ev2-export/subversion/bindings/swig/python/tests/run_all.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/bindings/swig/python/tests/run_all.py?rev=1421507&r1=1421506&r2=1421507&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/bindings/swig/python/tests/run_all.py (original)
+++ subversion/branches/ev2-export/subversion/bindings/swig/python/tests/run_all.py Thu Dec 13 20:39:17 2012
@@ -19,8 +19,8 @@
 #
 #
 import unittest, setup_path
-import mergeinfo, core, client, delta, pool, ra, wc, repository, auth, \
-       trac.versioncontrol.tests
+import mergeinfo, core, client, delta, checksum, pool, ra, wc, repository, \
+       auth, trac.versioncontrol.tests
 
 # Run all tests
 
@@ -28,6 +28,7 @@ def suite():
   """Run all tests"""
   s = unittest.TestSuite()
   s.addTest(core.suite())
+  s.addTest(checksum.suite())
   s.addTest(mergeinfo.suite())
   s.addTest(client.suite())
   s.addTest(delta.suite())

Modified: subversion/branches/ev2-export/subversion/include/private/svn_skel.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/private/svn_skel.h?rev=1421507&r1=1421506&r2=1421507&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/include/private/svn_skel.h (original)
+++ subversion/branches/ev2-export/subversion/include/private/svn_skel.h Thu Dec 13 20:39:17 2012
@@ -213,11 +213,11 @@ svn_skel__parse_prop(svn_string_t **prop
                      apr_pool_t *result_pool);
 
 /* Unparse a PROPLIST hash (which has const char * property names and
-   svn_stringbuf_t * values) into a `PROPLIST' skel *SKEL_P.  Use POOL
+   svn_string_t * values) into a `PROPLIST' skel *SKEL_P.  Use POOL
    for all allocations.  */
 svn_error_t *
 svn_skel__unparse_proplist(svn_skel_t **skel_p,
-                           apr_hash_t *proplist,
+                           const apr_hash_t *proplist,
                            apr_pool_t *pool);
 
 /* Unparse INHERITED_PROPS, a depth-first ordered array of

Modified: subversion/branches/ev2-export/subversion/include/private/svn_sqlite.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/private/svn_sqlite.h?rev=1421507&r1=1421506&r2=1421507&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/include/private/svn_sqlite.h (original)
+++ subversion/branches/ev2-export/subversion/include/private/svn_sqlite.h Thu Dec 13 20:39:17 2012
@@ -288,6 +288,15 @@ svn_sqlite__column_token(svn_sqlite__stm
                          int column,
                          const svn_token_map_t *map);
 
+/* Fetch the word at COLUMN, look it up in the MAP, and return its value.
+   Returns NULL_VAL if the column is null. MALFUNCTION is thrown if the
+   column contains an unknown word.  */
+int
+svn_sqlite__column_token_null(svn_sqlite__stmt_t *stmt,
+                              int column,
+                              const svn_token_map_t *map,
+                              int null_val);
+
 /* Return the column as a hash of const char * => const svn_string_t *.
    If the column is null, then NULL will be stored into *PROPS. The
    results will be allocated in RESULT_POOL, and any temporary allocations
@@ -363,7 +372,10 @@ svn_sqlite__result_int64(svn_sqlite__con
 svn_error_t *
 svn_sqlite__finalize(svn_sqlite__stmt_t *stmt);
 
-/* Error-handling wrapper around sqlite3_reset. */
+/* Reset STMT by calling sqlite3_reset(), and also clear any bindings to it.
+
+   Note: svn_sqlite__get_statement() calls this function automatically if
+   the requested statement has been used and has not yet been reset. */
 svn_error_t *
 svn_sqlite__reset(svn_sqlite__stmt_t *stmt);
 

Modified: subversion/branches/ev2-export/subversion/include/private/svn_wc_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/private/svn_wc_private.h?rev=1421507&r1=1421506&r2=1421507&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/include/private/svn_wc_private.h (original)
+++ subversion/branches/ev2-export/subversion/include/private/svn_wc_private.h Thu Dec 13 20:39:17 2012
@@ -1619,7 +1619,11 @@ svn_wc__get_switch_editor(const svn_delt
  * and for top-level file entries as well (if any).  If
  * #svn_depth_immediates, do the same as #svn_depth_files but also diff
  * top-level subdirectories at #svn_depth_empty.  If #svn_depth_infinity,
- * then diff fully recursively.
+ * then diff fully recursively. If @a depth is #svn_depth_unknown, then...
+ *
+ *   ### ... then the @a server_performs_filtering option is meaningful.
+ *   ### But what does this depth mean exactly? Something about 'ambient'
+ *   ### depth? How does it compare with depth 'infinity'?
  *
  * @a ignore_ancestry determines whether paths that have discontinuous node
  * ancestry are treated as delete/add or as simple modifications.  If
@@ -1646,10 +1650,29 @@ svn_wc__get_switch_editor(const svn_delt
  * it's a member of one of those changelists.  If @a changelist_filter is
  * empty (or altogether @c NULL), no changelist filtering occurs.
  *
-  * If @a server_performs_filtering is TRUE, assume that the server handles
+ * If @a server_performs_filtering is TRUE, assume that the server handles
  * the ambient depth filtering, so this doesn't have to be handled in the
  * editor.
  *
+ *
+ * A diagram illustrating how this function is used.
+ *
+ *   Steps 1 and 2 create the chain; step 3 drives it.
+ *
+ *   1.                    svn_wc__get_diff_editor(diff_cbs)
+ *                                       |           ^
+ *   2.         svn_ra_do_diff3(editor)  |           |
+ *                    |           ^      |           |
+ *                    v           |      v           |
+ *           +----------+       +----------+       +----------+
+ *           |          |       |          |       |          |
+ *      +--> | reporter | ----> |  editor  | ----> | diff_cbs | ----> text
+ *      |    |          |       |          |       |          |       out
+ *      |    +----------+       +----------+       +----------+
+ *      |
+ *   3. svn_wc_crawl_revisions5(WC,reporter)
+ *
+ *
  * @since New in 1.8.
  */
 svn_error_t *

Modified: subversion/branches/ev2-export/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/svn_client.h?rev=1421507&r1=1421506&r2=1421507&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/include/svn_client.h (original)
+++ subversion/branches/ev2-export/subversion/include/svn_client.h Thu Dec 13 20:39:17 2012
@@ -4208,21 +4208,26 @@ svn_client_resolved(const char *path,
 
 /** Perform automatic conflict resolution on a working copy @a path.
  *
- * If @a depth is #svn_depth_empty, act only on @a path; if
- * #svn_depth_files, resolve @a path and its conflicted file
- * children (if any); if #svn_depth_immediates, resolve @a path and
- * all its immediate conflicted children (both files and directories,
- * if any); if #svn_depth_infinity, resolve @a path and every
- * conflicted file or directory anywhere beneath it.
- * Note that this operation will try to lock the parent directory of
- * @a path in order to be able to resolve tree-conflicts on @a path.
+ * If @a conflict_choice is
+ *
+ *   - #svn_wc_conflict_choose_base:
+ *     resolve the conflict with the old file contents
+ *
+ *   - #svn_wc_conflict_choose_mine_full:
+ *     use the original working contents
+ *
+ *   - #svn_wc_conflict_choose_theirs_full:
+ *     use the new contents
+ *
+ *   - #svn_wc_conflict_choose_merged:
+ *     don't change the contents at all, just remove the conflict
+ *     status, which is the pre-1.5 behavior.
  *
- * If @a conflict_choice is #svn_wc_conflict_choose_base, resolve the
- * conflict with the old file contents; if
- * #svn_wc_conflict_choose_mine_full, use the original working contents;
- * if #svn_wc_conflict_choose_theirs_full, the new contents; and if
- * #svn_wc_conflict_choose_merged, don't change the contents at all,
- * just remove the conflict status, which is the pre-1.5 behavior.
+ *   - #svn_wc_conflict_choose_theirs_conflict
+ *     ###...
+ *
+ *   - #svn_wc_conflict_choose_mine_conflict
+ *     ###...
  *
  * #svn_wc_conflict_choose_theirs_conflict and
  * #svn_wc_conflict_choose_mine_conflict are not legal for binary
@@ -4232,6 +4237,16 @@ svn_client_resolved(const char *path,
  * If @a path's conflict state is removed and @a ctx->notify_func2 is non-NULL,
  * call @a ctx->notify_func2 with @a ctx->notify_baton2 and @a path.
  *
+ * If @a depth is #svn_depth_empty, act only on @a path; if
+ * #svn_depth_files, resolve @a path and its conflicted file
+ * children (if any); if #svn_depth_immediates, resolve @a path and
+ * all its immediate conflicted children (both files and directories,
+ * if any); if #svn_depth_infinity, resolve @a path and every
+ * conflicted file or directory anywhere beneath it.
+ *
+ * Note that this operation will try to lock the parent directory of
+ * @a path in order to be able to resolve tree-conflicts on @a path.
+ *
  * @since New in 1.5.
  */
 svn_error_t *

Modified: subversion/branches/ev2-export/subversion/include/svn_config.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/svn_config.h?rev=1421507&r1=1421506&r2=1421507&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/include/svn_config.h (original)
+++ subversion/branches/ev2-export/subversion/include/svn_config.h Thu Dec 13 20:39:17 2012
@@ -86,6 +86,8 @@ typedef struct svn_config_t svn_config_t
 #define SVN_CONFIG_OPTION_STORE_SSL_CLIENT_CERT_PP_PLAINTEXT \
                                           "store-ssl-client-cert-pp-plaintext"
 #define SVN_CONFIG_OPTION_USERNAME                  "username"
+/** @since New in 1.8. */
+#define SVN_CONFIG_OPTION_BULK_UPDATES              "bulk-updates"
 
 #define SVN_CONFIG_CATEGORY_CONFIG          "config"
 #define SVN_CONFIG_SECTION_AUTH                 "auth"

Modified: subversion/branches/ev2-export/subversion/include/svn_dav.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/svn_dav.h?rev=1421507&r1=1421506&r2=1421507&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/include/svn_dav.h (original)
+++ subversion/branches/ev2-export/subversion/include/svn_dav.h Thu Dec 13 20:39:17 2012
@@ -192,6 +192,11 @@ extern "C" {
  * @since New in 1.8.   */
 #define SVN_DAV_SUPPORTED_POSTS_HEADER "SVN-Supported-Posts"
 
+/** This header is used in the OPTIONS response to indicate if the server
+ * wants bulk update requests (Prefer) or only accepts skelta requests (Off).
+ * If this value is On both options are allowed.
+ * @since New in 1.8.   */
+#define SVN_DAV_ALLOW_BULK_UPDATES "SVN-Allow-Bulk-Updates"
 
 /**
  * @name Fulltext MD5 headers

Modified: subversion/branches/ev2-export/subversion/include/svn_repos.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/svn_repos.h?rev=1421507&r1=1421506&r2=1421507&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/include/svn_repos.h (original)
+++ subversion/branches/ev2-export/subversion/include/svn_repos.h Thu Dec 13 20:39:17 2012
@@ -1321,7 +1321,8 @@ svn_repos_replay(svn_fs_root_t *root,
  *
  * @a repos is a previously opened repository.  @a repos_url is the
  * decoded URL to the base of the repository, and is used to check
- * copyfrom paths.  @a txn is a filesystem transaction object to use
+ * copyfrom paths.  copyfrom paths passed to the editor must be full,
+ * URI-encoded, URLs.  @a txn is a filesystem transaction object to use
  * during the commit, or @c NULL to indicate that this function should
  * create (and fully manage) a new transaction.
  *

Modified: subversion/branches/ev2-export/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/svn_wc.h?rev=1421507&r1=1421506&r2=1421507&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/include/svn_wc.h (original)
+++ subversion/branches/ev2-export/subversion/include/svn_wc.h Thu Dec 13 20:39:17 2012
@@ -1662,10 +1662,10 @@ typedef struct svn_wc_conflict_version_t
   const char *path_in_repos;
   /** @} */
 
-  /** Info about this node */
-  svn_node_kind_t node_kind;  /* note that 'none' is a legitimate value */
+  /** The node kind.  Can be any kind, even 'none' or 'unknown'. */
+  svn_node_kind_t node_kind;
 
-  /** UUID of the repository
+  /** UUID of the repository. Can be NULL meaning unknown.
    * @since New in 1.8. */
   const char *repos_uuid;
 
@@ -1680,11 +1680,15 @@ typedef struct svn_wc_conflict_version_t
  * Allocate an #svn_wc_conflict_version_t structure in @a pool,
  * initialize to contain a conflict origin, and return it.
  *
- * Set the @c repos_url field of the created struct to @a repos_url, the
- * @c path_in_repos field to @a path_in_repos, the @c peg_rev field to
- * @a peg_rev and the @c node_kind to @c node_kind. Make only shallow
+ * Set the @c repos_url field of the created struct to @a repos_root_url,
+ * the @c path_in_repos field to @a repos_relpath, the @c peg_rev field to
+ * @a revision and the @c node_kind to @a kind. Make only shallow
  * copies of the pointer arguments.
  *
+ * @a repos_root_url, @a repos_relpath and @a revision must be valid,
+ * non-null values. @a repos_uuid should be a valid UUID, but can be
+ * NULL if unknown. @a kind can be any kind, even 'none' or 'unknown'.
+ *
  * @since New in 1.8.
  */
 svn_wc_conflict_version_t *
@@ -6887,8 +6891,9 @@ svn_wc_merge_props3(svn_wc_notify_state_
  *
  * This function has the @a base_merge parameter which (when TRUE) will
  * apply @a propchanges to this node's pristine set of properties. This
- * functionality is not supported on newer APIs -- pristine information
- * should only be changed through an update editor drive.
+ * functionality is not supported since API version 1.7 and will give an
+ * error if requested (unless @a dry_run is TRUE). For details see
+ * 'notes/api-errata/1.7/wc006.txt'.
  *
  * Uses a svn_wc_conflict_resolver_func_t conflict resolver instead of a
  * svn_wc_conflict_resolver_func2_t.
@@ -6897,7 +6902,7 @@ svn_wc_merge_props3(svn_wc_notify_state_
  * #SVN_ERR_UNVERSIONED_RESOURCE, when svn_wc_merge_props3 would return either
  * #SVN_ERR_WC_PATH_NOT_FOUND or #SVN_ERR_WC_PATH_UNEXPECTED_STATUS.
  *
- * @since New in 1.5.
+ * @since New in 1.5. The base_merge option is not supported since 1.7.
  * @deprecated Provided for backward compatibility with the 1.6 API.
  */
 SVN_DEPRECATED
@@ -6918,6 +6923,7 @@ svn_wc_merge_props2(svn_wc_notify_state_
  * Same as svn_wc_merge_props2(), but with a @a conflict_func (and
  * baton) of NULL.
  *
+ * @since New in 1.3. The base_merge option is not supported since 1.7.
  * @deprecated Provided for backward compatibility with the 1.4 API.
  */
 SVN_DEPRECATED
@@ -6939,7 +6945,9 @@ svn_wc_merge_props(svn_wc_notify_state_t
  * correct for 'svn update', it's incorrect for 'svn merge', and can
  * cause flawed behavior.  (See issue #2035.)
  *
+ * @since The base_merge option is not supported since 1.7.
  * @deprecated Provided for backward compatibility with the 1.2 API.
+ * Replaced by svn_wc_merge_props().
  */
 SVN_DEPRECATED
 svn_error_t *

Modified: subversion/branches/ev2-export/subversion/libsvn_auth_kwallet/kwallet.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_auth_kwallet/kwallet.cpp?rev=1421507&r1=1421506&r2=1421507&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_auth_kwallet/kwallet.cpp (original)
+++ subversion/branches/ev2-export/subversion/libsvn_auth_kwallet/kwallet.cpp Thu Dec 13 20:39:17 2012
@@ -253,7 +253,8 @@ kwallet_password_get(svn_boolean_t *done
         }
     }
 
-  apr_pool_cleanup_register(pool, parameters, kwallet_terminate, NULL);
+  apr_pool_cleanup_register(pool, parameters, kwallet_terminate,
+                            apr_pool_cleanup_null);
 
   return SVN_NO_ERROR;
 }
@@ -327,7 +328,8 @@ kwallet_password_set(svn_boolean_t *done
         }
     }
 
-  apr_pool_cleanup_register(pool, parameters, kwallet_terminate, NULL);
+  apr_pool_cleanup_register(pool, parameters, kwallet_terminate,
+                            apr_pool_cleanup_null);
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/ev2-export/subversion/libsvn_client/add.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_client/add.c?rev=1421507&r1=1421506&r2=1421507&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_client/add.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_client/add.c Thu Dec 13 20:39:17 2012
@@ -274,7 +274,7 @@ add_file(const char *local_abspath,
          svn_client_ctx_t *ctx,
          apr_pool_t *pool)
 {
-  apr_hash_t* properties = NULL;
+  apr_hash_t *properties;
   apr_hash_index_t *hi;
   const char *mimetype;
   svn_node_kind_t kind;
@@ -290,6 +290,9 @@ add_file(const char *local_abspath,
   if (is_special)
     {
       mimetype = NULL;
+      properties = apr_hash_make(pool);
+      apr_hash_set(properties, SVN_PROP_SPECIAL, APR_HASH_KEY_STRING,
+                   svn_string_create(SVN_PROP_BOOLEAN_TRUE, pool));
     }
   else
     {
@@ -310,54 +313,42 @@ add_file(const char *local_abspath,
         }
 
       /* This may fail on write-only files:
-         we open them to estimate file type.
-         That's why we postpone the add until after this step. */
+         we open them to estimate file type. */
       SVN_ERR(svn_client__get_paths_auto_props(&properties, &mimetype,
                                                local_abspath, magic_cookie,
                                                file_autoprops, ctx, pool,
                                                pool));
     }
 
-  if (is_special)
-    /* This must be a special file. */
-    SVN_ERR(svn_wc_prop_set4(ctx->wc_ctx, local_abspath, SVN_PROP_SPECIAL,
-                             svn_string_create(SVN_PROP_BOOLEAN_TRUE, pool),
+  /* loop through the hashtable and add the properties */
+  for (hi = apr_hash_first(pool, properties);
+       hi != NULL; hi = apr_hash_next(hi))
+    {
+      const char *pname = svn__apr_hash_index_key(hi);
+      const svn_string_t *pval = svn__apr_hash_index_val(hi);
+      svn_error_t *err;
+
+      /* It's probably best to pass 0 for force, so that if
+         the autoprops say to set some weird combination,
+         we just error and let the user sort it out. */
+      err = svn_wc_prop_set4(ctx->wc_ctx, local_abspath, pname, pval,
                              svn_depth_empty, FALSE, NULL,
                              NULL, NULL /* cancellation */,
                              NULL, NULL /* notification */,
-                             pool));
-  else if (properties)
-    {
-      /* loop through the hashtable and add the properties */
-      for (hi = apr_hash_first(pool, properties);
-           hi != NULL; hi = apr_hash_next(hi))
-        {
-          const char *pname = svn__apr_hash_index_key(hi);
-          const svn_string_t *pval = svn__apr_hash_index_val(hi);
-          svn_error_t *err;
-
-          /* It's probably best to pass 0 for force, so that if
-             the autoprops say to set some weird combination,
-             we just error and let the user sort it out. */
-          err = svn_wc_prop_set4(ctx->wc_ctx, local_abspath, pname, pval,
-                                 svn_depth_empty, FALSE, NULL,
-                                 NULL, NULL /* cancellation */,
-                                 NULL, NULL /* notification */,
-                                 pool);
-          if (err)
-            {
-              /* Don't leave the job half-done. If we fail to set a property,
-               * (try to) un-add the file. */
-              return svn_error_compose_create(
-                              err,
-                              svn_wc_revert4(ctx->wc_ctx,
-                                             local_abspath,
-                                             svn_depth_empty,
-                                             FALSE /* use_commit_times */,
-                                             NULL /* changelists */,
-                                             NULL, NULL, NULL, NULL,
-                                             pool));
-            }
+                             pool);
+      if (err)
+        {
+          /* Don't leave the job half-done. If we fail to set a property,
+           * (try to) un-add the file. */
+          return svn_error_compose_create(
+                   err,
+                   svn_wc_revert4(ctx->wc_ctx,
+                                  local_abspath,
+                                  svn_depth_empty,
+                                  FALSE /* use_commit_times */,
+                                  NULL /* changelists */,
+                                  NULL, NULL, NULL, NULL,
+                                  pool));
         }
     }
 
@@ -381,20 +372,15 @@ add_file(const char *local_abspath,
  * If DIR_ABSPATH (or any item below DIR_ABSPATH) is already scheduled for
  * addition, add will fail and return an error unless FORCE is TRUE.
  *
- * Files and directories that match ignore patterns will not be added unless
- * NO_IGNORE is TRUE.
- *
  * Use MAGIC_COOKIE (which may be NULL) to detect the mime-type of files
  * if necessary.
  *
- * If not NULL, *CONFIG_AUTOPROPS is a hash representing the config file and
+ * If not NULL, CONFIG_AUTOPROPS is a hash representing the config file and
  * svn:auto-props autoprops which apply to DIR_ABSPATH.  It maps
  * const char * file patterns to another hash which maps const char *
- * property names to const char *property values.  If *CONFIG_AUTOPROPS is
- * NULL and DIR_ABSPATH is unversioned, then this function will populate
- * *CONFIG_AUTOPROPS (allocated in RESULT_POOL) using DIR_ABSPATH's nearest
- * versioned parent to determine the svn:auto-props which DIR_ABSPATH
- * will inherit once added.
+ * property names to const char *property values.  If CONFIG_AUTOPROPS is
+ * NULL and the config file and svn:auto-props autoprops are required by this
+ * function, then such will be obtained.
  *
  * If IGNORES is not NULL, then it is an array of const char * ignore patterns
  * that apply to any children of DIR_ABSPATH.  If REFRESH_IGNORES is TRUE, then
@@ -413,14 +399,12 @@ static svn_error_t *
 add_dir_recursive(const char *dir_abspath,
                   svn_depth_t depth,
                   svn_boolean_t force,
-                  svn_boolean_t no_ignore,
                   svn_boolean_t no_autoprops,
                   svn_magic__cookie_t *magic_cookie,
-                  apr_hash_t **config_autoprops,
+                  apr_hash_t *config_autoprops,
                   svn_boolean_t refresh_ignores,
                   apr_array_header_t *ignores,
                   svn_client_ctx_t *ctx,
-                  apr_pool_t *result_pool,
                   apr_pool_t *scratch_pool)
 {
   svn_error_t *err;
@@ -428,7 +412,6 @@ add_dir_recursive(const char *dir_abspat
   apr_hash_t *dirents;
   apr_hash_index_t *hi;
   svn_boolean_t entry_exists = FALSE;
-  svn_boolean_t found_unversioned_root = FALSE;
 
   /* Check cancellation; note that this catches recursive calls too. */
   if (ctx->cancel_func)
@@ -438,8 +421,8 @@ add_dir_recursive(const char *dir_abspat
 
   if (refresh_ignores)
     SVN_ERR(svn_client__get_all_ignores(&ignores, dir_abspath,
-                                        no_ignore, ctx, scratch_pool,
-                                        scratch_pool));
+                                        ctx, scratch_pool,
+                                        iterpool));
 
   /* Add this directory to revision control. */
   err = svn_wc_add_from_disk(ctx->wc_ctx, dir_abspath,
@@ -458,20 +441,21 @@ add_dir_recursive(const char *dir_abspat
         }
     }
 
-  /* For the root of any unversioned subtree, get some or all of the
-     following:
+  /* If DIR_ABSPATH is the root of an unversioned subtree then get the
+     following "autoprops":
 
        1) Explicit and inherited svn:auto-props properties on
           DIR_ABSPATH
-       2) Explicit and inherited svn:global-ignores properties on
-          DIR_ABSPATH
-       3) auto-props from the CTX->CONFIG hash */
-  if (!entry_exists && *config_autoprops == NULL)
+       2) auto-props from the CTX->CONFIG hash
+
+     Since this set of autoprops applies to all unversioned children of
+     DIR_ABSPATH, we will pass these along to any recursive calls to
+     add_dir_recursive() and calls to add_file() below.  Thus sparing
+     these callees from looking up the same information. */
+  if (!entry_exists && config_autoprops == NULL)
     {
-      SVN_ERR(svn_client__get_all_auto_props(config_autoprops, dir_abspath,
-                                             ctx, result_pool,
-                                             scratch_pool));
-      found_unversioned_root = TRUE;
+      SVN_ERR(svn_client__get_all_auto_props(&config_autoprops, dir_abspath,
+                                             ctx, scratch_pool, iterpool));
     }
 
   SVN_ERR(svn_io_get_dirents3(&dirents, dir_abspath, TRUE, scratch_pool,
@@ -518,15 +502,15 @@ add_dir_recursive(const char *dir_abspat
             refresh_ignores = FALSE;
 
           SVN_ERR(add_dir_recursive(abspath, depth_below_here,
-                                    force, no_ignore, no_autoprops,
+                                    force, no_autoprops,
                                     magic_cookie, config_autoprops,
                                     refresh_ignores, ignores, ctx,
-                                    iterpool, iterpool));
+                                    iterpool));
         }
       else if ((dirent->kind == svn_node_file || dirent->special)
                && depth >= svn_depth_files)
         {
-          err = add_file(abspath, magic_cookie, *config_autoprops,
+          err = add_file(abspath, magic_cookie, config_autoprops,
                          no_autoprops, ctx, iterpool);
           if (err && err->apr_err == SVN_ERR_ENTRY_EXISTS && force)
             svn_error_clear(err);
@@ -538,11 +522,6 @@ add_dir_recursive(const char *dir_abspat
   /* Destroy the per-iteration pool. */
   svn_pool_destroy(iterpool);
 
-  /* Reset CONFIG_AUTOPROPS if we just finished processing the root
-     of an unversioned subtree. */
-  if (found_unversioned_root)
-    *config_autoprops = NULL;
-
   return SVN_NO_ERROR;
 }
 
@@ -898,7 +877,6 @@ svn_error_t *svn_client__get_inherited_i
 
 svn_error_t *svn_client__get_all_ignores(apr_array_header_t **ignores,
                                          const char *local_abspath,
-                                         svn_boolean_t no_ignore,
                                          svn_client_ctx_t *ctx,
                                          apr_pool_t *result_pool,
                                          apr_pool_t *scratch_pool)
@@ -957,11 +935,8 @@ svn_error_t *svn_client__get_all_ignores
 
   /* Now that we are sure we have an existing parent, get the config ignore
      and the local ignore patterns... */
-  if (!no_ignore)
-    SVN_ERR(svn_wc_get_ignores2(ignores, ctx->wc_ctx, local_abspath,
-                                ctx->config, result_pool, scratch_pool));
-  else
-    *ignores = apr_array_make(result_pool, 16, sizeof(const char *));
+  SVN_ERR(svn_wc_get_ignores2(ignores, ctx->wc_ctx, local_abspath,
+                              ctx->config, result_pool, scratch_pool));
 
   /* ...and add the inherited ignores to it. */
   for (i = 0; i < inherited_ignores->nelts; i++)
@@ -997,7 +972,6 @@ add(const char *local_abspath,
   svn_node_kind_t kind;
   svn_error_t *err;
   svn_magic__cookie_t *magic_cookie;
-  apr_hash_t *config_autoprops = NULL;
   apr_array_header_t *ignores = NULL;
 
   svn_magic__init(&magic_cookie, scratch_pool);
@@ -1048,12 +1022,12 @@ add(const char *local_abspath,
       /* We use add_dir_recursive for all directory targets
          and pass depth along no matter what it is, so that the
          target's depth will be set correctly. */
-      err = add_dir_recursive(local_abspath, depth, force, no_ignore,
-                              no_autoprops, magic_cookie, &config_autoprops,
-                              TRUE, ignores, ctx, scratch_pool, scratch_pool);
+      err = add_dir_recursive(local_abspath, depth, force,
+                              no_autoprops, magic_cookie, NULL,
+                              !no_ignore, ignores, ctx, scratch_pool);
     }
   else if (kind == svn_node_file)
-    err = add_file(local_abspath, magic_cookie, config_autoprops,
+    err = add_file(local_abspath, magic_cookie, NULL,
                    no_autoprops, ctx, scratch_pool);
   else if (kind == svn_node_none)
     {

Modified: subversion/branches/ev2-export/subversion/libsvn_client/client.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_client/client.h?rev=1421507&r1=1421506&r2=1421507&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_client/client.h (original)
+++ subversion/branches/ev2-export/subversion/libsvn_client/client.h Thu Dec 13 20:39:17 2012
@@ -394,7 +394,6 @@ svn_error_t *svn_client__get_all_auto_pr
    RESULT_POOL.  Use SCRATCH_POOL for temporary allocations. */
 svn_error_t *svn_client__get_all_ignores(apr_array_header_t **ignores,
                                          const char *local_abspath,
-                                         svn_boolean_t no_ignore,
                                          svn_client_ctx_t *ctx,
                                          apr_pool_t *result_pool,
                                          apr_pool_t *scratch_pool);

Modified: subversion/branches/ev2-export/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_client/merge.c?rev=1421507&r1=1421506&r2=1421507&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_client/merge.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_client/merge.c Thu Dec 13 20:39:17 2012
@@ -8511,6 +8511,8 @@ remove_noop_subtree_ranges(const merge_s
   svn_merge_range_t *youngest_gap_rev;
   svn_rangelist_t *inoperative_ranges;
   apr_pool_t *iterpool;
+  const char *longest_common_subtree_ancestor = NULL;
+  svn_error_t *err;
 
   assert(session_url_is(ra_session, source->loc2->url, scratch_pool));
 
@@ -8549,6 +8551,19 @@ remove_noop_subtree_ranges(const merge_s
 
       svn_pool_clear(iterpool);
 
+      /* Issue #4269: Keep track of the longest common ancestor of all the
+         subtrees which require merges.  This may be a child of
+         TARGET->ABSPATH, which will allow us to narrow the log request
+         below. */
+      if (child->remaining_ranges && child->remaining_ranges->nelts)
+        {
+          if (longest_common_subtree_ancestor)
+            longest_common_subtree_ancestor = svn_dirent_get_longest_ancestor(
+              longest_common_subtree_ancestor, child->abspath, scratch_pool);
+          else
+            longest_common_subtree_ancestor = child->abspath;
+        }
+
       /* CHILD->REMAINING_RANGES will be NULL if child is absent. */
       if (child->remaining_ranges && child->remaining_ranges->nelts)
         SVN_ERR(svn_rangelist_merge2(subtree_remaining_ranges,
@@ -8589,24 +8604,53 @@ remove_noop_subtree_ranges(const merge_s
                                                   sizeof(svn_revnum_t *));
   log_gap_baton.pool = svn_pool_create(scratch_pool);
 
+  /* Find the longest common ancestor of all subtrees relative to
+     RA_SESSION's URL. */
+  if (longest_common_subtree_ancestor)
+    longest_common_subtree_ancestor =
+      svn_dirent_skip_ancestor(target->abspath,
+                               longest_common_subtree_ancestor);
+  else
+    longest_common_subtree_ancestor = "";
+
   /* Invoke the svn_log_entry_receiver_t receiver log_noop_revs() from
      oldest to youngest.  The receiver is optimized to add ranges to
      log_gap_baton.merged_ranges and log_gap_baton.operative_ranges, but
      requires that the revs arrive oldest to youngest -- see log_noop_revs()
      and rangelist_merge_revision(). */
-  SVN_ERR(get_log(ra_session, "", oldest_gap_rev->start + 1,
-                  youngest_gap_rev->end, TRUE,
-                  log_noop_revs, &log_gap_baton, scratch_pool));
-
-  inoperative_ranges = svn_rangelist__initialize(oldest_gap_rev->start,
-                                                 youngest_gap_rev->end,
-                                                 TRUE, scratch_pool);
-  SVN_ERR(svn_rangelist_remove(&(inoperative_ranges),
-                               log_gap_baton.operative_ranges,
-                               inoperative_ranges, FALSE, scratch_pool));
+  err = get_log(ra_session, longest_common_subtree_ancestor,
+                oldest_gap_rev->start + 1, youngest_gap_rev->end, TRUE,
+                log_noop_revs, &log_gap_baton, scratch_pool);
+
+  /* It's possible that the only subtrees with mergeinfo in TARGET don't have
+     any corresponding subtree in SOURCE between SOURCE->REV1 < SOURCE->REV2.
+     So it's also possible that we may ask for the logs of non-existent paths.
+     If we do, then assume that no subtree requires any ranges that are not
+     already required by the TARGET. */
+  if (err)
+    {
+      if (err->apr_err != SVN_ERR_FS_NOT_FOUND
+          && longest_common_subtree_ancestor[0] != '\0')
+        return svn_error_trace(err);
 
-  SVN_ERR(svn_rangelist_merge2(log_gap_baton.merged_ranges, inoperative_ranges,
-                               scratch_pool, scratch_pool));
+      /* Asked about a non-existent subtree in SOURCE. */
+      svn_error_clear(err);
+      log_gap_baton.merged_ranges =
+        svn_rangelist__initialize(oldest_gap_rev->start,
+                                  youngest_gap_rev->end,
+                                  TRUE, scratch_pool);
+    }
+  else
+    {
+      inoperative_ranges = svn_rangelist__initialize(oldest_gap_rev->start,
+                                                     youngest_gap_rev->end,
+                                                     TRUE, scratch_pool);
+      SVN_ERR(svn_rangelist_remove(&(inoperative_ranges),
+                                   log_gap_baton.operative_ranges,
+                                   inoperative_ranges, FALSE, scratch_pool));
+      SVN_ERR(svn_rangelist_merge2(log_gap_baton.merged_ranges, inoperative_ranges,
+                                   scratch_pool, scratch_pool));
+    }
 
   for (i = 1; i < children_with_mergeinfo->nelts; i++)
     {

Modified: subversion/branches/ev2-export/subversion/libsvn_fs/fs-loader.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_fs/fs-loader.c?rev=1421507&r1=1421506&r2=1421507&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_fs/fs-loader.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_fs/fs-loader.c Thu Dec 13 20:39:17 2012
@@ -120,8 +120,8 @@ load_module(fs_init_func_t *initfunc, co
                                  _("Invalid name for FS type '%s'"),
                                  name);
 
-    libname = apr_psprintf(pool, "libsvn_fs_%s-%d.so.0",
-                           name, SVN_VER_MAJOR);
+    libname = apr_psprintf(pool, "libsvn_fs_%s-%d.so.%d",
+                           name, SVN_VER_MAJOR, SVN_SOVERSION);
     funcname = apr_psprintf(pool, "svn_fs_%s__init", name);
 
     /* Find/load the specified library.  If we get an error, assume

Modified: subversion/branches/ev2-export/subversion/libsvn_fs_base/dag.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_fs_base/dag.c?rev=1421507&r1=1421506&r2=1421507&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_fs_base/dag.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_fs_base/dag.c Thu Dec 13 20:39:17 2012
@@ -579,7 +579,7 @@ svn_fs_base__dag_get_proplist(apr_hash_t
 
 svn_error_t *
 svn_fs_base__dag_set_proplist(dag_node_t *node,
-                              apr_hash_t *proplist,
+                              const apr_hash_t *proplist,
                               const char *txn_id,
                               trail_t *trail,
                               apr_pool_t *pool)

Modified: subversion/branches/ev2-export/subversion/libsvn_fs_base/dag.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_fs_base/dag.h?rev=1421507&r1=1421506&r2=1421507&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_fs_base/dag.h (original)
+++ subversion/branches/ev2-export/subversion/libsvn_fs_base/dag.h Thu Dec 13 20:39:17 2012
@@ -150,7 +150,7 @@ svn_error_t *svn_fs_base__dag_get_propli
    node being changed must be mutable.  TXN_ID is the Subversion
    transaction under which this occurs.  */
 svn_error_t *svn_fs_base__dag_set_proplist(dag_node_t *node,
-                                           apr_hash_t *proplist,
+                                           const apr_hash_t *proplist,
                                            const char *txn_id,
                                            trail_t *trail,
                                            apr_pool_t *pool);

Modified: subversion/branches/ev2-export/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_fs_fs/fs_fs.c?rev=1421507&r1=1421506&r2=1421507&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_fs_fs/fs_fs.c Thu Dec 13 20:39:17 2012
@@ -7110,6 +7110,7 @@ choose_delta_base(representation_t **rep
   int walk;
   node_revision_t *base;
   fs_fs_data_t *ffd = fs->fsap_data;
+  svn_boolean_t maybe_shared_rep = FALSE;
 
   /* If we have no predecessors, then use the empty stream as a
      base. */
@@ -7149,12 +7150,83 @@ choose_delta_base(representation_t **rep
      walk back two predecessors.) */
   base = noderev;
   while ((count++) < noderev->predecessor_count)
-    SVN_ERR(svn_fs_fs__get_node_revision(&base, fs,
-                                         base->predecessor_id, pool));
+    {
+      SVN_ERR(svn_fs_fs__get_node_revision(&base, fs,
+                                           base->predecessor_id, pool));
+
+      /* If there is a shared rep along the way, we need to limit the
+       * length of the deltification chain.
+       * 
+       * Please note that copied nodes - such as branch directories - will
+       * look the same (false positive) while reps shared within the same
+       * revision will not be caught (false negative).
+       */
+      if (props)
+        {
+          if (   base->prop_rep
+              && svn_fs_fs__id_rev(base->id) > base->prop_rep->revision)
+            maybe_shared_rep = TRUE;
+        }
+      else
+        {
+          if (   base->data_rep
+              && svn_fs_fs__id_rev(base->id) > base->data_rep->revision)
+            maybe_shared_rep = TRUE;
+        }
+    }
 
   /* return a suitable base representation */
   *rep = props ? base->prop_rep : base->data_rep;
 
+  /* if we encountered a shared rep, it's parent chain may be different
+   * from the node-rev parent chain. */
+  if (*rep && maybe_shared_rep)
+    {
+      /* Check whether the length of the deltification chain is acceptable.
+       * Otherwise, shared reps may form a non-skipping delta chain in
+       * extreme cases. */
+      apr_pool_t *sub_pool = svn_pool_create(pool);
+      representation_t base_rep = **rep;
+      
+      /* Some reasonable limit, depending on how acceptable longer linear
+       * chains are in this repo.  Also, allow for some minimal chain. */
+      int max_chain_length = 2 * (int)ffd->max_linear_deltification + 2;
+
+      /* re-use open files between iterations */
+      svn_revnum_t rev_hint = SVN_INVALID_REVNUM;
+      apr_file_t *file_hint = NULL;
+
+      /* follow the delta chain towards the end but for at most
+       * MAX_CHAIN_LENGTH steps. */
+      for (; max_chain_length; --max_chain_length)
+        {
+          struct rep_state *rep_state;
+          struct rep_args *rep_args;
+
+          SVN_ERR(create_rep_state_body(&rep_state,
+                                        &rep_args,
+                                        &file_hint,
+                                        &rev_hint,
+                                        &base_rep,
+                                        fs,
+                                        sub_pool));
+          if (!rep_args->is_delta  || !rep_args->base_revision)
+            break;
+
+          base_rep.revision = rep_args->base_revision;
+          base_rep.offset = rep_args->base_offset;
+          base_rep.size = rep_args->base_length;
+          base_rep.txn_id = NULL;
+        }
+
+      /* start new delta chain if the current one has grown too long */
+      if (max_chain_length == 0)
+        *rep = NULL;
+
+      apr_pool_destroy(sub_pool);
+    }
+
+  /* verify that the reps don't form a degenerated '*/
   return SVN_NO_ERROR;
 }
 

Modified: subversion/branches/ev2-export/subversion/libsvn_ra/compat.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_ra/compat.c?rev=1421507&r1=1421506&r2=1421507&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_ra/compat.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_ra/compat.c Thu Dec 13 20:39:17 2012
@@ -630,7 +630,6 @@ fr_log_message_receiver(void *baton,
 {
   struct fr_log_message_baton *lmb = baton;
   struct rev *rev;
-  apr_hash_index_t *hi;
 
   rev = apr_palloc(lmb->pool, sizeof(*rev));
   rev->revision = log_entry->revision;
@@ -639,17 +638,7 @@ fr_log_message_receiver(void *baton,
   lmb->eldest = rev;
 
   /* Duplicate log_entry revprops into rev->props */
-  rev->props = apr_hash_make(lmb->pool);
-  for (hi = apr_hash_first(pool, log_entry->revprops); hi;
-       hi = apr_hash_next(hi))
-    {
-      void *val;
-      const void *key;
-
-      apr_hash_this(hi, &key, NULL, &val);
-      apr_hash_set(rev->props, apr_pstrdup(lmb->pool, key), APR_HASH_KEY_STRING,
-                   svn_string_dup(val, lmb->pool));
-    }
+  rev->props = svn_prop_hash_dup(log_entry->revprops, lmb->pool);
 
   return prev_log_path(&lmb->path, &lmb->action,
                        &lmb->copyrev, log_entry->changed_paths2,

Modified: subversion/branches/ev2-export/subversion/libsvn_ra/ra_loader.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_ra/ra_loader.c?rev=1421507&r1=1421506&r2=1421507&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_ra/ra_loader.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_ra/ra_loader.c Thu Dec 13 20:39:17 2012
@@ -141,8 +141,8 @@ load_ra_module(svn_ra__init_func_t *func
     const char *compat_funcname;
     apr_status_t status;
 
-    libname = apr_psprintf(pool, "libsvn_ra_%s-%d.so.0",
-                           ra_name, SVN_VER_MAJOR);
+    libname = apr_psprintf(pool, "libsvn_ra_%s-%d.so.%d",
+                           ra_name, SVN_VER_MAJOR, SVN_SOVERSION);
     funcname = apr_psprintf(pool, "svn_ra_%s__init", ra_name);
     compat_funcname = apr_psprintf(pool, "svn_ra_%s_init", ra_name);
 

Modified: subversion/branches/ev2-export/subversion/libsvn_ra_serf/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_ra_serf/commit.c?rev=1421507&r1=1421506&r2=1421507&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_ra_serf/commit.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_ra_serf/commit.c Thu Dec 13 20:39:17 2012
@@ -1466,16 +1466,10 @@ open_root(void *edit_baton,
       for (hi = apr_hash_first(ctx->pool, ctx->revprop_table); hi;
            hi = apr_hash_next(hi))
         {
-          const void *key;
-          void *val;
-          const char *name;
-          svn_string_t *value;
+          const char *name = svn__apr_hash_index_key(hi);
+          svn_string_t *value = svn__apr_hash_index_val(hi);
           const char *ns;
 
-          apr_hash_this(hi, &key, NULL, &val);
-          name = key;
-          value = val;
-
           if (strncmp(name, SVN_PROP_PREFIX, sizeof(SVN_PROP_PREFIX) - 1) == 0)
             {
               ns = SVN_DAV_PROP_NS_SVN;
@@ -2267,7 +2261,6 @@ svn_ra_serf__get_commit_editor(svn_ra_se
   svn_ra_serf__session_t *session = ra_session->priv;
   svn_delta_editor_t *editor;
   commit_context_t *ctx;
-  apr_hash_index_t *hi;
   const char *repos_root;
   const char *base_relpath;
   svn_boolean_t supports_ephemeral_props;
@@ -2279,17 +2272,7 @@ svn_ra_serf__get_commit_editor(svn_ra_se
   ctx->session = session;
   ctx->conn = session->conns[0];
 
-  ctx->revprop_table = apr_hash_make(pool);
-  for (hi = apr_hash_first(pool, revprop_table); hi; hi = apr_hash_next(hi))
-    {
-      const void *key;
-      apr_ssize_t klen;
-      void *val;
-
-      apr_hash_this(hi, &key, &klen, &val);
-      apr_hash_set(ctx->revprop_table, apr_pstrdup(pool, key), klen,
-                   svn_string_dup(val, pool));
-    }
+  ctx->revprop_table = svn_prop_hash_dup(revprop_table, pool);
 
   /* If the server supports ephemeral properties, add some carrying
      interesting version information. */

Modified: subversion/branches/ev2-export/subversion/libsvn_ra_serf/options.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_ra_serf/options.c?rev=1421507&r1=1421506&r2=1421507&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_ra_serf/options.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_ra_serf/options.c Thu Dec 13 20:39:17 2012
@@ -280,6 +280,10 @@ capabilities_headers_iterator_callback(v
         {
           opt_ctx->youngest_rev = SVN_STR_TO_REV(val);
         }
+      else if (svn_cstring_casecmp(key, SVN_DAV_ALLOW_BULK_UPDATES) == 0)
+        {
+          session->server_allows_bulk = apr_pstrdup(session->pool, val);
+        }
       else if (svn_cstring_casecmp(key, SVN_DAV_SUPPORTED_POSTS_HEADER) == 0)
         {
           /* May contain multiple values, separated by commas. */

Modified: subversion/branches/ev2-export/subversion/libsvn_ra_serf/ra_serf.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_ra_serf/ra_serf.h?rev=1421507&r1=1421506&r2=1421507&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_ra_serf/ra_serf.h (original)
+++ subversion/branches/ev2-export/subversion/libsvn_ra_serf/ra_serf.h Thu Dec 13 20:39:17 2012
@@ -223,6 +223,16 @@ struct svn_ra_serf__session_t {
   /*** End HTTP v2 stuff ***/
 
   svn_ra_serf__blncache_t *blncache;
+
+  /* Flag that indicates if we request the server for bulk updates (TRUE) with
+     all the properties and content in the update-report response. If FALSE,
+     request a skelta update-report with inlined properties. */
+  svn_boolean_t bulk_updates;
+
+  /* Indicates if the server wants bulk update requests (Prefer) or only
+     accepts skelta requests (Off). If this value is On both options are 
+     allowed. */
+  const char *server_allows_bulk;
 };
 
 #define SVN_RA_SERF__HAVE_HTTPV2_SUPPORT(sess) ((sess)->me_resource != NULL)

Modified: subversion/branches/ev2-export/subversion/libsvn_ra_serf/replay.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_ra_serf/replay.c?rev=1421507&r1=1421506&r2=1421507&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_ra_serf/replay.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_ra_serf/replay.c Thu Dec 13 20:39:17 2012
@@ -655,7 +655,7 @@ svn_ra_serf__replay(svn_ra_session_t *ra
 
   handler->handler_pool = pool;
   handler->method = "REPORT";
-  handler->path = session->session_url_str;
+  handler->path = session->session_url.path;
   handler->body_delegate = create_replay_body;
   handler->body_delegate_baton = replay_ctx;
   handler->body_type = "text/xml";
@@ -698,8 +698,8 @@ svn_ra_serf__replay(svn_ra_session_t *ra
  * optimally. Originally we used 5 as the max. number of outstanding
  * requests, but this turned out to be too low.
  *
- * Serf doesn't exit out of the serf_context_run loop as long as it
- * has data to send or receive. With small responses (revs of a few
+ * Serf doesn't exit out of the svn_ra_serf__context_run_wait loop as long as
+ * it has data to send or receive. With small responses (revs of a few
  * kB), serf doesn't come out of this loop at all. So with
  * MAX_OUTSTANDING_REQUESTS set to a low number, there's a big chance
  * that serf handles those requests completely in its internal loop,
@@ -732,14 +732,11 @@ svn_ra_serf__replay_range(svn_ra_session
   svn_revnum_t rev = start_revision;
   const char *report_target;
   int active_reports = 0;
-  apr_interval_time_t waittime_left = session->timeout;
 
   SVN_ERR(svn_ra_serf__report_resource(&report_target, session, NULL, pool));
 
   while (active_reports || rev <= end_revision)
     {
-      apr_status_t status;
-      svn_error_t *err;
       svn_ra_serf__list_t *done_list;
       svn_ra_serf__list_t *done_reports = NULL;
       replay_context_t *replay_ctx;
@@ -798,7 +795,7 @@ svn_ra_serf__replay_range(svn_ra_session
 
           handler->handler_pool = replay_ctx->src_rev_pool;
           handler->method = "REPORT";
-          handler->path = session->session_url_str;
+          handler->path = session->session_url.path;
           handler->body_delegate = create_replay_body;
           handler->body_delegate_baton = replay_ctx;
           handler->conn = session->conns[0];
@@ -834,62 +831,8 @@ svn_ra_serf__replay_range(svn_ra_session
           active_reports++;
         }
 
-      /* Run the serf loop, send outgoing and process incoming requests.
-         This request will block when there are no more requests to send or
-         responses to receive, so we have to be careful on our bookkeeping.
-
-         ### we should probably adjust this timeout. if we get (say) 3
-         ### requests completed, then we want to exit immediately rather
-         ### than block for a few seconds. that will allow us to clear up
-         ### those 3 requests. if we have queued all of our revisions,
-         ### then we may want to block until timeout since we really don't
-         ### have much work other than destroying memory. (though that
-         ### is important, as we could end up with 50 src_rev_pool pools)
-
-         ### idea: when a revision is marked DONE, we can probably destroy
-         ### most of the memory. that will reduce pressue to have serf
-         ### return control to us, to complete the major memory disposal.
-
-         ### theoretically, we should use an iterpool here, but it turns
-         ### out that serf doesn't even use the pool param. if we grow
-         ### an iterpool in this loop for other purposes, then yeah: go
-         ### ahead and apply it here, too, in case serf eventually uses
-         ### that parameter.
-      */
-      status = serf_context_run(session->context,
-                                SVN_RA_SERF__CONTEXT_RUN_DURATION,
-                                pool);
-
-      err = session->pending_error;
-      session->pending_error = NULL;
-
-      /* If the context duration timeout is up, we'll subtract that
-         duration from the total time alloted for such things.  If
-         there's no time left, we fail with a message indicating that
-         the connection timed out.  */
-      if (APR_STATUS_IS_TIMEUP(status))
-        {
-          svn_error_clear(err);
-          err = SVN_NO_ERROR;
-          status = 0;
-
-          if (session->timeout)
-            {
-              if (waittime_left > SVN_RA_SERF__CONTEXT_RUN_DURATION)
-                {
-                  waittime_left -= SVN_RA_SERF__CONTEXT_RUN_DURATION;
-                }
-              else
-                {
-                  return svn_error_create(SVN_ERR_RA_DAV_CONN_TIMEOUT, NULL,
-                                          _("Connection timed out"));
-                }
-            }
-        }
-      else
-        {
-          waittime_left = session->timeout;
-        }
+      /* Run the serf loop. */
+      SVN_ERR(svn_ra_serf__context_run_wait(&replay_ctx->done, session, pool));
 
       /* Substract the number of completely handled responses from our
          total nr. of open requests', so we'll know when to stop this loop.
@@ -904,12 +847,6 @@ svn_ra_serf__replay_range(svn_ra_session
           active_reports--;
         }
 
-      SVN_ERR(err);
-      if (status)
-        {
-          return svn_ra_serf__wrap_err(status,
-                                       _("Error retrieving replay REPORT"));
-        }
       done_reports = NULL;
     }
 

Modified: subversion/branches/ev2-export/subversion/libsvn_ra_serf/serf.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_ra_serf/serf.c?rev=1421507&r1=1421506&r2=1421507&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_ra_serf/serf.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_ra_serf/serf.c Thu Dec 13 20:39:17 2012
@@ -218,6 +218,13 @@ load_config(svn_ra_serf__session_t *sess
   svn_config_get(config, &session->ssl_authorities, SVN_CONFIG_SECTION_GLOBAL,
                  SVN_CONFIG_OPTION_SSL_AUTHORITY_FILES, NULL);
 
+  /* If set, read the flag that tells us to do bulk updates or not. Defaults
+     to skelta updates. */
+  SVN_ERR(svn_config_get_bool(config, &session->bulk_updates,
+                              SVN_CONFIG_SECTION_GLOBAL,
+                              SVN_CONFIG_OPTION_BULK_UPDATES,
+                              FALSE));
+
   if (config)
     server_group = svn_config_find_group(config,
                                          session->session_url.hostname,
@@ -254,6 +261,12 @@ load_config(svn_ra_serf__session_t *sess
                                   TRUE));
       svn_config_get(config, &session->ssl_authorities, server_group,
                      SVN_CONFIG_OPTION_SSL_AUTHORITY_FILES, NULL);
+
+      /* Load the group bulk updates flag. */
+      SVN_ERR(svn_config_get_bool(config, &session->bulk_updates,
+                                  server_group,
+                                  SVN_CONFIG_OPTION_BULK_UPDATES,
+                                  FALSE));
     }
 
   /* Parse the connection timeout value, if any. */

Modified: subversion/branches/ev2-export/subversion/libsvn_ra_serf/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_ra_serf/update.c?rev=1421507&r1=1421506&r2=1421507&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_ra_serf/update.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_ra_serf/update.c Thu Dec 13 20:39:17 2012
@@ -3161,19 +3161,47 @@ make_update_reporter(svn_ra_session_t *r
                                    svn_io_file_del_on_pool_cleanup,
                                    report->pool, scratch_pool));
 
-#ifdef SVN_RA_SERF__UPDATES_SEND_ALL
-  svn_xml_make_open_tag(&buf, scratch_pool, svn_xml_normal, "S:update-report",
-                        "xmlns:S", SVN_XML_NAMESPACE, "send-all", "true",
-                        NULL);
-#else
-  svn_xml_make_open_tag(&buf, scratch_pool, svn_xml_normal, "S:update-report",
-                        "xmlns:S", SVN_XML_NAMESPACE,
-                        NULL);
-  /* Subversion 1.8+ servers can be told to send properties for newly
-     added items inline even when doing a skelta response. */
-  make_simple_xml_tag(&buf, "S:include-props", "yes", scratch_pool);
-#endif
+  if (sess->server_allows_bulk)
+    {
+      if (apr_strnatcasecmp(sess->server_allows_bulk, "off") == 0)
+        {
+          /* Server doesn't want bulk updates */
+          sess->bulk_updates = FALSE;
+        }
+      else if (apr_strnatcasecmp(sess->server_allows_bulk, "prefer") == 0)
+        {
+          /* Server prefers bulk updates, and we respect that */
+          sess->bulk_updates = TRUE;
+        }
+      else
+        {
+          /* Server allows bulk updates, but doesn't dictate its use. Do
+             whatever is the default or what the user defined in the config. */
+        }
+    }
+  else
+    {
+      /* Pre-1.8 server didn't send the bulk_updates header. Do
+         whatever is the default or what the user defined in the config. */
+    }
 
+  if (sess->bulk_updates)
+    {
+      svn_xml_make_open_tag(&buf, scratch_pool, svn_xml_normal,
+                            "S:update-report",
+                            "xmlns:S", SVN_XML_NAMESPACE, "send-all", "true",
+                            NULL);
+    }
+  else
+    {
+      svn_xml_make_open_tag(&buf, scratch_pool, svn_xml_normal,
+                            "S:update-report",
+                            "xmlns:S", SVN_XML_NAMESPACE,
+                            NULL);
+      /* Subversion 1.8+ servers can be told to send properties for newly
+         added items inline even when doing a skelta response. */
+      make_simple_xml_tag(&buf, "S:include-props", "yes", scratch_pool);
+    }
 
   make_simple_xml_tag(&buf, "S:src-path", report->source, scratch_pool);
 
@@ -3215,11 +3243,13 @@ make_update_reporter(svn_ra_session_t *r
   /* When in 'send-all' mode, mod_dav_svn will assume that it should
      calculate and transmit real text-deltas (instead of empty windows
      that merely indicate "text is changed") unless it finds this
-     element.  When not in 'send-all' mode, mod_dav_svn will never
-     send text-deltas at all.
+     element.
 
      NOTE: Do NOT count on servers actually obeying this, as some exist
-     which obey send-all, but do not check for this directive at all! */
+     which obey send-all, but do not check for this directive at all!
+
+     NOTE 2: When not in 'send-all' mode, mod_dav_svn can still be configured to
+     override our request and send text-deltas. */
   if (! text_deltas)
     {
       make_simple_xml_tag(&buf, "S:text-deltas", "no", scratch_pool);

Modified: subversion/branches/ev2-export/subversion/libsvn_ra_svn/cyrus_auth.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_ra_svn/cyrus_auth.c?rev=1421507&r1=1421506&r2=1421507&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_ra_svn/cyrus_auth.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_ra_svn/cyrus_auth.c Thu Dec 13 20:39:17 2012
@@ -179,7 +179,7 @@ svn_ra_svn__sasl_common_init(apr_pool_t 
                  sasl_mutex_unlock_cb,
                  sasl_mutex_free_cb);
   free_mutexes = apr_array_make(sasl_pool, 0, sizeof(svn_mutex__t *));
-  return svn_mutex__init(&array_mutex, TRUE, sasl_pool);
+  SVN_ERR(svn_mutex__init(&array_mutex, TRUE, sasl_pool));
 
 #endif /* APR_HAS_THREADS */
 

Modified: subversion/branches/ev2-export/subversion/libsvn_subr/auth.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_subr/auth.c?rev=1421507&r1=1421506&r2=1421507&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_subr/auth.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_subr/auth.c Thu Dec 13 20:39:17 2012
@@ -422,9 +422,9 @@ svn_auth_get_platform_specific_provider(
       const char *library_label, *library_name;
       const char *provider_function_name, *version_function_name;
       library_name = apr_psprintf(pool,
-                                  "libsvn_auth_%s-%d.so.0",
+                                  "libsvn_auth_%s-%d.so.%d",
                                   provider_name,
-                                  SVN_VER_MAJOR);
+                                  SVN_VER_MAJOR, SVN_SOVERSION);
       library_label = apr_psprintf(pool, "svn_%s", provider_name);
       provider_function_name = apr_psprintf(pool,
                                             "svn_auth_get_%s_%s_provider",

Modified: subversion/branches/ev2-export/subversion/libsvn_subr/config_file.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_subr/config_file.c?rev=1421507&r1=1421506&r2=1421507&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_subr/config_file.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_subr/config_file.c Thu Dec 13 20:39:17 2012
@@ -807,6 +807,10 @@ svn_config_ensure(const char *config_dir
         "###   http-library               Which library to use for http/https"
                                                                              NL
         "###                              connections."                      NL
+        "###   bulk-updates               Whether to request bulk update" NL
+        "###                              responses, or fetch each file in "
+                                                                             NL
+        "###                              an individual request. "           NL
         "###   store-passwords            Specifies whether passwords used"  NL
         "###                              to authenticate against a"         NL
         "###                              Subversion server may be cached"   NL

Modified: subversion/branches/ev2-export/subversion/libsvn_subr/skel.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_subr/skel.c?rev=1421507&r1=1421506&r2=1421507&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_subr/skel.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_subr/skel.c Thu Dec 13 20:39:17 2012
@@ -784,7 +784,7 @@ svn_skel__parse_prop(svn_string_t **prop
 
 svn_error_t *
 svn_skel__unparse_proplist(svn_skel_t **skel_p,
-                           apr_hash_t *proplist,
+                           const apr_hash_t *proplist,
                            apr_pool_t *pool)
 {
   svn_skel_t *skel = svn_skel__make_empty_list(pool);
@@ -794,7 +794,8 @@ svn_skel__unparse_proplist(svn_skel_t **
   if (proplist)
     {
       /* Loop over hash entries */
-      for (hi = apr_hash_first(pool, proplist); hi; hi = apr_hash_next(hi))
+      for (hi = apr_hash_first(pool, (apr_hash_t *)proplist); hi;
+           hi = apr_hash_next(hi))
         {
           const void *key;
           void *val;