You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by cm...@apache.org on 2012/11/20 20:39:44 UTC

svn commit: r1411814 [1/3] - in /subversion/branches/issue-4194-dev: ./ build/ac-macros/ contrib/server-side/svncutter/ notes/ subversion/include/ subversion/include/private/ subversion/libsvn_client/ subversion/libsvn_diff/ subversion/libsvn_fs_fs/ su...

Author: cmpilato
Date: Tue Nov 20 19:39:39 2012
New Revision: 1411814

URL: http://svn.apache.org/viewvc?rev=1411814&view=rev
Log:
On the 'issue-4194-dev' branch, sync with recent trunk changes.
(Merged ^/subversion/trunk:1410507-1411795.)

Added:
    subversion/branches/issue-4194-dev/subversion/tests/libsvn_wc/wc-test.c
      - copied unchanged from r1411795, subversion/trunk/subversion/tests/libsvn_wc/wc-test.c
    subversion/branches/issue-4194-dev/tools/server-side/fsfs-stats.c
      - copied unchanged from r1411795, subversion/trunk/tools/server-side/fsfs-stats.c
Removed:
    subversion/branches/issue-4194-dev/subversion/tests/libsvn_subr/target-test.c
Modified:
    subversion/branches/issue-4194-dev/   (props changed)
    subversion/branches/issue-4194-dev/build.conf
    subversion/branches/issue-4194-dev/build/ac-macros/serf.m4
    subversion/branches/issue-4194-dev/contrib/server-side/svncutter/svncutter
    subversion/branches/issue-4194-dev/notes/dump-load-format.txt
    subversion/branches/issue-4194-dev/subversion/include/private/svn_named_atomic.h
    subversion/branches/issue-4194-dev/subversion/include/private/svn_wc_private.h
    subversion/branches/issue-4194-dev/subversion/include/svn_error_codes.h
    subversion/branches/issue-4194-dev/subversion/include/svn_wc.h
    subversion/branches/issue-4194-dev/subversion/libsvn_client/diff.c
    subversion/branches/issue-4194-dev/subversion/libsvn_diff/diff_file.c
    subversion/branches/issue-4194-dev/subversion/libsvn_diff/diff_memory.c
    subversion/branches/issue-4194-dev/subversion/libsvn_diff/parse-diff.c
    subversion/branches/issue-4194-dev/subversion/libsvn_fs_fs/fs.h
    subversion/branches/issue-4194-dev/subversion/libsvn_fs_fs/fs_fs.c
    subversion/branches/issue-4194-dev/subversion/libsvn_fs_fs/structure
    subversion/branches/issue-4194-dev/subversion/libsvn_ra_serf/ra_serf.h
    subversion/branches/issue-4194-dev/subversion/libsvn_ra_serf/replay.c
    subversion/branches/issue-4194-dev/subversion/libsvn_ra_serf/serf.c
    subversion/branches/issue-4194-dev/subversion/libsvn_ra_serf/update.c
    subversion/branches/issue-4194-dev/subversion/libsvn_ra_serf/util.c
    subversion/branches/issue-4194-dev/subversion/libsvn_subr/named_atomic.c
    subversion/branches/issue-4194-dev/subversion/libsvn_wc/adm_ops.c
    subversion/branches/issue-4194-dev/subversion/libsvn_wc/externals.c
    subversion/branches/issue-4194-dev/subversion/libsvn_wc/wc-metadata.sql
    subversion/branches/issue-4194-dev/subversion/libsvn_wc/wc_db.h
    subversion/branches/issue-4194-dev/subversion/svn/main.c
    subversion/branches/issue-4194-dev/subversion/svn/propget-cmd.c
    subversion/branches/issue-4194-dev/subversion/svnlook/main.c
    subversion/branches/issue-4194-dev/subversion/svnrdump/dump_editor.c
    subversion/branches/issue-4194-dev/subversion/tests/cmdline/svnadmin_tests.py
    subversion/branches/issue-4194-dev/subversion/tests/cmdline/svnrdump_tests.py
    subversion/branches/issue-4194-dev/subversion/tests/cmdline/switch_tests.py
    subversion/branches/issue-4194-dev/subversion/tests/libsvn_client/client-test.c
    subversion/branches/issue-4194-dev/subversion/tests/libsvn_fs/fs-test.c
    subversion/branches/issue-4194-dev/subversion/tests/libsvn_subr/path-test.c
    subversion/branches/issue-4194-dev/subversion/tests/libsvn_wc/op-depth-test.c
    subversion/branches/issue-4194-dev/subversion/tests/libsvn_wc/utils.c
    subversion/branches/issue-4194-dev/subversion/tests/libsvn_wc/utils.h
    subversion/branches/issue-4194-dev/subversion/tests/svn_test_fs.c

Propchange: subversion/branches/issue-4194-dev/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1410507-1411795

Modified: subversion/branches/issue-4194-dev/build.conf
URL: http://svn.apache.org/viewvc/subversion/branches/issue-4194-dev/build.conf?rev=1411814&r1=1411813&r2=1411814&view=diff
==============================================================================
--- subversion/branches/issue-4194-dev/build.conf (original)
+++ subversion/branches/issue-4194-dev/build.conf Tue Nov 20 19:39:39 2012
@@ -886,14 +886,6 @@ sources = utf-test.c
 install = test
 libs = libsvn_test libsvn_subr apriconv apr
 
-[target-test]
-description = Test the condense_targets functions
-type = exe
-path = subversion/tests/libsvn_subr
-sources = target-test.c
-install = test
-libs = libsvn_test libsvn_subr apriconv apr
-
 [subst_translate-test]
 description = Test the svn_subst_translate* functions
 type = exe
@@ -1022,6 +1014,14 @@ sources = wc-queries-test.c
 install = test
 libs = libsvn_test libsvn_subr apriconv apr sqlite
 
+[wc-test]
+description = Test the main WC API functions
+type = exe
+path = subversion/tests/libsvn_wc
+sources = wc-test.c utils.c
+install = test
+libs = libsvn_client libsvn_test libsvn_wc libsvn_subr apriconv apr
+
 # ----------------------------------------------------------------------------
 # These are not unit tests at all, they are small programs that exercise
 # parts of the libsvn_delta API from the command line.  They are stuck here
@@ -1171,7 +1171,7 @@ libs = __ALL__
        strings-reps-test changes-test locks-test repos-test
        checksum-test compat-test config-test hashdump-test mergeinfo-test
        opt-test path-test stream-test string-test time-test utf-test
-       target-test error-test cache-test spillbuf-test crypto-test
+       error-test cache-test spillbuf-test crypto-test
        named_atomic-test named_atomic-proc-test revision-test
        subst_translate-test io-test
        translate-test
@@ -1180,10 +1180,10 @@ libs = __ALL__
        ra-local-test
        svndiff-test vdelta-test
        entries-dump atomic-ra-revprop-change wc-lock-tester wc-incomplete-tester
-       diff diff3 diff4 fsfs-reorg svn-bench
+       diff diff3 diff4 fsfs-reorg fsfs-stats svn-bench
        client-test
        conflict-data-test db-test pristine-store-test entries-compat-test
-       op-depth-test dirent_uri-test wc-queries-test
+       op-depth-test dirent_uri-test wc-queries-test wc-test
        auth-test
        parse-diff-test
        svn-rep-sharing-stats svn-populate-node-origins-index
@@ -1236,6 +1236,13 @@ sources = fsfs-reorg.c
 install = tools
 libs = libsvn_delta libsvn_subr apr
 
+[fsfs-stats]
+type = exe
+path = tools/server-side
+sources = fsfs-stats.c
+install = tools
+libs = libsvn_delta libsvn_subr apr
+
 [diff]
 type = exe
 path = tools/diff

Modified: subversion/branches/issue-4194-dev/build/ac-macros/serf.m4
URL: http://svn.apache.org/viewvc/subversion/branches/issue-4194-dev/build/ac-macros/serf.m4?rev=1411814&r1=1411813&r2=1411814&view=diff
==============================================================================
--- subversion/branches/issue-4194-dev/build/ac-macros/serf.m4 (original)
+++ subversion/branches/issue-4194-dev/build/ac-macros/serf.m4 Tue Nov 20 19:39:39 2012
@@ -145,6 +145,7 @@ AC_DEFUN(SVN_SERF_PKG_CONFIG,
           serf_found=yes
           SVN_SERF_INCLUDES=[`$PKG_CONFIG $serf_major --cflags | $SED -e 's/-D[^ ]*//g'`]
           SVN_SERF_LIBS=`$PKG_CONFIG $serf_major --libs` 
+          break
         else
           AC_MSG_RESULT([no])
           AC_MSG_WARN([Serf version too old: need $serf_check_version])

Modified: subversion/branches/issue-4194-dev/contrib/server-side/svncutter/svncutter
URL: http://svn.apache.org/viewvc/subversion/branches/issue-4194-dev/contrib/server-side/svncutter/svncutter?rev=1411814&r1=1411813&r2=1411814&view=diff
==============================================================================
--- subversion/branches/issue-4194-dev/contrib/server-side/svncutter/svncutter (original)
+++ subversion/branches/issue-4194-dev/contrib/server-side/svncutter/svncutter Tue Nov 20 19:39:39 2012
@@ -5,14 +5,14 @@
 # under the prevailing license of their project.
 
 """
-svncutter - clique-squash, range-selection, and property mutations on SVN dump files 
+svncutter - clique-squash, range-selection, property mutations, and skeletonization on SVN dump files 
 general usage: svncutter [-q] [-r SELECTION] SUBCOMMAND
 
 In all commands, the -r (or --range) option limits the selection of revisions
 over which an operation will be performed. A selection consists of
 one or more comma-separated ranges. A range may consist of an integer
 revision number or the special name HEAD for the head revision. Or it
-may be a colon-separated pair of integers, ir an integer followed by a
+may be a colon-separated pair of integers, or an integer followed by a
 colon followed by HEAD.
 
 Normally, each subcommand produces a progress spinner on standard
@@ -29,6 +29,7 @@ Available subcommands:
    proprename
    log
    setlog
+   skeleton
 """
 
 oneliners = {
@@ -39,6 +40,7 @@ oneliners = {
     "proprename": "Renaming revision properties",
     "log":        "Extracting log entries",
     "setlog":     "Mutating log entries",
+    "skeleton":   "strip content, leave only headers",
     }
 
 helpdict = {
@@ -51,7 +53,7 @@ This can be helpful in cleaning up after
 revision control systems, or if a developer has been using a pre-2006
 version of Emacs VC.
 
-With the -m (or --mapfile) option, squash emits a map to tne named
+With the -m (or --mapfile) option, squash emits a map to the named
 file showing how old revision numbers map into new ones.
 
 With the -e (or --excise) option, the specified set of revisions in
@@ -68,7 +70,7 @@ anything that looks like the regular exp
 a comment reference (this is the same format that Subversion uses
 in log headers).
 
-Every revision in the file after the first omiited onf gets the property
+Every revision in the file after the first omitted one gets the property
 'svncutter:original' set to the revision number it had before the
 squash operation.
 
@@ -121,6 +123,12 @@ Replace the log entries in the input dum
 in the LOGFILE, which should be in the format of an svn log output.
 Replacements may be restricted to a specified range.
 """,
+    "skeleton": """\
+skeleton: usage: svncutter [-r SELECTION] skeleton
+
+Strip out all content.  Does not produce a valid dumpfile, but may be useful
+when you need to examine a particularly complex node structure.
+""",
     }
 
 import os, sys, calendar, time, getopt, re
@@ -177,7 +185,7 @@ class LineBufferedSource:
         "Read a line, require it to have a specified prefix."
         line = self.readline()
         if not line:
-            sys.stderr.write("svncutter: unexpected end of input." + os.linesep)
+            sys.stderr.write("svncutter: unexpected end of input while requiring '%s' input." % prefix + os.linesep)
             sys.exit(1)
         assert line.startswith(prefix)
         return line
@@ -211,7 +219,7 @@ class DumpfileSource(LineBufferedSource)
         LineBufferedSource.__init__(self, infile)
         self.baton = baton
     def read_revision_header(self, property_hook=None):
-        "Read a revision header, parsing its proprties."
+        "Read a revision header, parsing its properties."
         properties = {}
         propkeys = []
         stash = self.require("Revision-number:")
@@ -241,6 +249,43 @@ class DumpfileSource(LineBufferedSource)
         if self.baton:
             self.baton.twirl()
         return (revision, stash, properties)
+    def read_node(self):
+        "Read a node header and body."
+        #print "READ NODE BEGINS"
+        header = self.require("Node-path:")
+        while True:
+            line = self.readline()
+            #print "I see header line", repr(line)
+            if not line:
+                sys.stderr.write('unexpected EOF in node header' + os.linesep)
+                sys.exit(1)
+            header += line
+            if line == '\n':
+                break
+        properties = ""
+        if "Prop-content-length" in header:
+            while True:
+                line = self.readline()
+                #print "I see property line", repr(line)
+                if not line:
+                    sys.stderr.write('unexpected EOF in node properties' + os.linesep)
+                    sys.exit(1)
+                properties += line
+                if line == 'PROPS-END\n':
+                    break
+        content = ""
+        if "Text-content-length" in header:
+            while True:
+                line = self.readline()
+                #print "I see contents line", repr(line)
+                if not line:
+                    break
+                content += line
+                if line.startswith("Node-path:") or line.startswith("Revision-number"):
+                    self.push(line)
+                    break
+        #print "READ NODE ENDS"
+        return (header, properties, content)
     def read_until_next(self, prefix, revmap=None):
         "Accumulate lines until the next matches a specified prefix."
         stash = ""
@@ -312,7 +357,7 @@ class SubversionRange:
         return self.txt
 
 class Logfile:
-    "Represent the state of a lofile"
+    "Represent the state of a logfile"
     def __init__(self, readable, restriction=None):
         self.comments = {}
         self.source = LineBufferedSource(readable)
@@ -610,12 +655,49 @@ def setlog(source, logpatch, selection):
         return (propkeys, propdict)
     source.apply_property_hook(selection, loghook)
 
+def skeletonize(source, selection):
+    "Skeletonize a portion of the dump file defined by a revision selection."
+    emit = 0 in selection
+    stash = source.read_until_next("Revision-number:")
+    if emit:
+        sys.stdout.write(stash)
+    if not source.has_line_buffered():    
+        return
+    while True:
+        (revision,stash,properties) = source.read_revision_header()
+        if revision in selection:
+            sys.stdout.write(stash)
+            emit = True
+        elif revision == selection.upperbound()+1:
+            return
+        else:
+            source.read_until_next("Revision-number:")
+            continue
+        while True:
+            line = source.readline()
+            if not line:
+                return
+            elif line == '\n':
+                sys.stdout.write(line)
+                continue
+            elif line.startswith("Revision-number:"):
+                source.push(line)
+                break
+            elif line.startswith("Node-path:"):
+                source.push(line)
+                (header, properties, content) = source.read_node()
+                sys.stdout.write(header + properties)
+                continue
+            else:
+                sys.stderr.write("svncutter: parse at %s doesn't look right (%s), aborting!\n" % (revision, repr(line)))
+                sys.exit(1)
+
 if __name__ == '__main__':
     try:
-        (options, arguments) = getopt.getopt(sys.argv[1:], "ce:fl:m:p:qr:",
+        (options, arguments) = getopt.getopt(sys.argv[1:], "ce:fl:m:p:qr:s",
                                              ["excise", "flagrefs", "revprop=",
                                               "logpatch=", "map=",
-                                              "quiet", "range="])
+                                              "quiet", "range=", "skeleton"])
         selection = SubversionRange("0:HEAD")
         timefuzz = 300	# 5 minute fuzz
         compressmap = False
@@ -646,11 +728,11 @@ if __name__ == '__main__':
             sys.stderr.write("Type 'svncutter help' for usage." + os.linesep)
             sys.exit(1)
         baton = None
-        #if arguments[0] != 'help':
-        #    if progress:
-        #        baton = Baton(oneliners[arguments[0]], "done")
-        #    else:
-        #        baton = None
+        if arguments[0] != 'help':
+            if progress:
+                baton = Baton(oneliners[arguments[0]], "done")
+            else:
+                baton = None
         if arguments[0] == "squash":
             squash(DumpfileSource(sys.stdin, baton),
                    timefuzz, mapto, selection, excise, flagrefs, compressmap)
@@ -678,6 +760,8 @@ if __name__ == '__main__':
             if not logpatch:
                 sys.stderr.write("svncutter: setlog requires a log entries file.\n")
             setlog(DumpfileSource(sys.stdin, baton), logpatch, selection)
+        elif arguments[0] == "skeleton":
+            skeletonize(DumpfileSource(sys.stdin, baton), selection)            
         elif arguments[0] == "help":
             if len(arguments) == 1:
                 sys.stdout.write(__doc__)

Modified: subversion/branches/issue-4194-dev/notes/dump-load-format.txt
URL: http://svn.apache.org/viewvc/subversion/branches/issue-4194-dev/notes/dump-load-format.txt?rev=1411814&r1=1411813&r2=1411814&view=diff
==============================================================================
--- subversion/branches/issue-4194-dev/notes/dump-load-format.txt (original)
+++ subversion/branches/issue-4194-dev/notes/dump-load-format.txt Tue Nov 20 19:39:39 2012
@@ -297,7 +297,7 @@ $ echo "Replacement text" > dir/file.txt
 $ svn ci -m "Replace dir/file.txt with a copy of otherdir/otherfile.txt and replace its text, too."
 -------------------------------------------------------------------
 
-$Subversion filesystems do not allow the root directory ("/") to be
+Subversion filesystems do not allow the root directory ("/") to be
 deleted or replaced.
 
 === Some details about copyfroms ===

Modified: subversion/branches/issue-4194-dev/subversion/include/private/svn_named_atomic.h
URL: http://svn.apache.org/viewvc/subversion/branches/issue-4194-dev/subversion/include/private/svn_named_atomic.h?rev=1411814&r1=1411813&r2=1411814&view=diff
==============================================================================
--- subversion/branches/issue-4194-dev/subversion/include/private/svn_named_atomic.h (original)
+++ subversion/branches/issue-4194-dev/subversion/include/private/svn_named_atomic.h Tue Nov 20 19:39:39 2012
@@ -54,7 +54,7 @@ typedef struct svn_named_atomic__t svn_n
 /** Returns #FALSE when named atomics are not available to our process
  * and svn_atomic_namespace__create is likely to fail.
  *
- * Please note that the actual check will be performed only once and later
+ * @note The actual check will be performed only once and later
  * changes in process privileges will not reflect in the outcome of future
  * calls to this function.
  */
@@ -76,7 +76,7 @@ svn_named_atomic__is_efficient(void);
  * the same shared memory region but have independent lifetimes.
  *
  * The access object will be allocated in @a result_pool and atomics gotten
- * from this object will become invalid when the pool is being cleaned.
+ * from this object will become invalid when the pool is being cleared.
  */
 svn_error_t *
 svn_atomic_namespace__create(svn_atomic_namespace__t **ns,
@@ -104,7 +104,7 @@ svn_atomic_namespace__cleanup(const char
  * characters and an error will be returned if the specified name is longer
  * than supported.
  *
- * Please note that the lifetime of the atomic is bound to the lifetime
+ * @note The lifetime of the atomic is bound to the lifetime
  * of the @a ns object, i.e. the pool the latter was created in.
  */
 svn_error_t *
@@ -120,8 +120,8 @@ svn_error_t *
 svn_named_atomic__read(apr_int64_t *value,
                        svn_named_atomic__t *atomic);
 
-/** Set the data in @a atomic to @a NEW_VALUE and return its old content
- * in @a OLD_VALUE.  @a OLD_VALUE may be NULL.
+/** Set the data in @a atomic to @a new_value and return its old content
+ * in @a *old_value.  @a old_value may be NULL.
  *
  * An error will be returned if @a atomic is @c NULL.
  */
@@ -131,7 +131,7 @@ svn_named_atomic__write(apr_int64_t *old
                         svn_named_atomic__t *atomic);
 
 /** Add @a delta to the data in @a atomic and return its new value in
- * @a NEW_VALUE.  @a NEW_VALUE may be NULL.
+ * @a *new_value.  @a new_value may be null.
  *
  * An error will be returned if @a atomic is @c NULL.
  */
@@ -141,8 +141,8 @@ svn_named_atomic__add(apr_int64_t *new_v
                       svn_named_atomic__t *atomic);
 
 /** If the current data in @a atomic equals @a comperand, set it to
- * @a NEW_VALUE.  Return the initial value in @a OLD_VALUE.
- * @a OLD_VALUE may be NULL.
+ * @a new_value.  Return the initial value in @a *old_value.
+ * @a old_value may be NULL.
  *
  * An error will be returned if @a atomic is @c NULL.
  */

Modified: subversion/branches/issue-4194-dev/subversion/include/private/svn_wc_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/issue-4194-dev/subversion/include/private/svn_wc_private.h?rev=1411814&r1=1411813&r2=1411814&view=diff
==============================================================================
--- subversion/branches/issue-4194-dev/subversion/include/private/svn_wc_private.h (original)
+++ subversion/branches/issue-4194-dev/subversion/include/private/svn_wc_private.h Tue Nov 20 19:39:39 2012
@@ -546,6 +546,10 @@ svn_wc__node_is_status_deleted(svn_boole
  * and has no deleted ancestor, @a *deleted_ancestor_abspath will equal
  * @a local_abspath. If @a local_abspath was not deleted,
  * set @a *deleted_ancestor_abspath to @c NULL.
+ *
+ * A node is considered 'deleted' if it is deleted or moved-away, and is
+ * not replaced.
+ *
  * @a *deleted_ancestor_abspath is allocated in @a result_pool.
  * Use @a scratch_pool for all temporary allocations.
  */

Modified: subversion/branches/issue-4194-dev/subversion/include/svn_error_codes.h
URL: http://svn.apache.org/viewvc/subversion/branches/issue-4194-dev/subversion/include/svn_error_codes.h?rev=1411814&r1=1411813&r2=1411814&view=diff
==============================================================================
--- subversion/branches/issue-4194-dev/subversion/include/svn_error_codes.h (original)
+++ subversion/branches/issue-4194-dev/subversion/include/svn_error_codes.h Tue Nov 20 19:39:39 2012
@@ -1244,7 +1244,7 @@ SVN_ERROR_START
              SVN_ERR_CLIENT_CATEGORY_START + 22,
              "Can't perform this operation without a valid lock token")
 
-/** @since New in 1.7. */
+  /** @since New in 1.7. */
   SVN_ERRDEF(SVN_ERR_CLIENT_FORBIDDEN_BY_SERVER,
              SVN_ERR_CLIENT_CATEGORY_START + 23,
              "The operation is forbidden by the server")

Modified: subversion/branches/issue-4194-dev/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/issue-4194-dev/subversion/include/svn_wc.h?rev=1411814&r1=1411813&r2=1411814&view=diff
==============================================================================
--- subversion/branches/issue-4194-dev/subversion/include/svn_wc.h (original)
+++ subversion/branches/issue-4194-dev/subversion/include/svn_wc.h Tue Nov 20 19:39:39 2012
@@ -795,7 +795,8 @@ typedef struct svn_wc_external_item2_t
       field will often be redundant.) */
   const char *target_dir;
 
-  /** Where to check out from. */
+  /** Where to check out from. This is possibly a relative external URL, as
+   * allowed in externals definitions, but without the peg revision. */
   const char *url;
 
   /** What revision to check out.  The only valid kinds for this are
@@ -4774,7 +4775,8 @@ svn_wc_add_repos_file(const char *dst_pa
 
 
 /** Remove @a local_abspath from revision control.  @a wc_ctx must
- * hold a write lock.
+ * hold a write lock on the parent of @a local_abspath, or if that is a
+ * WC root then on @a local_abspath itself.
  *
  * If @a local_abspath is a file, all its info will be removed from the
  * administrative area.  If @a local_abspath is a directory, then the

Modified: subversion/branches/issue-4194-dev/subversion/libsvn_client/diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-4194-dev/subversion/libsvn_client/diff.c?rev=1411814&r1=1411813&r2=1411814&view=diff
==============================================================================
--- subversion/branches/issue-4194-dev/subversion/libsvn_client/diff.c (original)
+++ subversion/branches/issue-4194-dev/subversion/libsvn_client/diff.c Tue Nov 20 19:39:39 2012
@@ -678,8 +678,8 @@ display_prop_diffs(const apr_array_heade
 
         /* The last character in a property is often not a newline.
            An eol character is appended to prevent the diff API to add a
-           ' \ No newline at end of file' line. We add
-           ' \ No newline at end of property' manually if needed. */
+           '\ No newline at end of file' line. We add
+           '\ No newline at end of property' manually if needed. */
         tmp = original_value ? original_value
                              : svn_string_create_empty(iterpool);
         orig = maybe_append_eol(tmp, NULL, iterpool);

Modified: subversion/branches/issue-4194-dev/subversion/libsvn_diff/diff_file.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-4194-dev/subversion/libsvn_diff/diff_file.c?rev=1411814&r1=1411813&r2=1411814&view=diff
==============================================================================
--- subversion/branches/issue-4194-dev/subversion/libsvn_diff/diff_file.c (original)
+++ subversion/branches/issue-4194-dev/subversion/libsvn_diff/diff_file.c Tue Nov 20 19:39:39 2012
@@ -1492,12 +1492,12 @@ output_unified_line(svn_diff__file_outpu
           && ! had_cr)
         {
           const char *out_str;
-          SVN_ERR(svn_utf_cstring_from_utf8_ex2
-                  (&out_str,
-                   apr_psprintf(baton->pool,
-                                APR_EOL_STR "\\ %s" APR_EOL_STR,
-                                _("No newline at end of file")),
-                   baton->header_encoding, baton->pool));
+          SVN_ERR(svn_utf_cstring_from_utf8_ex2(
+               &out_str,
+               /* The string below is intentionally not marked for translation,
+                  for wider interoperability with patch(1) programs. */
+               APR_EOL_STR "\\ No newline at end of file" APR_EOL_STR,
+               baton->header_encoding, baton->pool));
           svn_stringbuf_appendcstr(baton->hunk, out_str);
         }
 

Modified: subversion/branches/issue-4194-dev/subversion/libsvn_diff/diff_memory.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-4194-dev/subversion/libsvn_diff/diff_memory.c?rev=1411814&r1=1411813&r2=1411814&view=diff
==============================================================================
--- subversion/branches/issue-4194-dev/subversion/libsvn_diff/diff_memory.c (original)
+++ subversion/branches/issue-4194-dev/subversion/libsvn_diff/diff_memory.c Tue Nov 20 19:39:39 2012
@@ -420,9 +420,8 @@ output_unified_token_range(output_baton_
       const char *out_str;
       SVN_ERR(svn_utf_cstring_from_utf8_ex2
               (&out_str,
-               /* The string below is intentionally not marked for translation:
-                  it's vital to correct operation of the diff(1)/patch(1)
-                  program pair. */
+               /* The string below is intentionally not marked for translation,
+                  for wider interoperability with patch(1) programs. */
                APR_EOL_STR "\\ No newline at end of file" APR_EOL_STR,
                btn->header_encoding, btn->pool));
       svn_stringbuf_appendcstr(btn->hunk, out_str);

Modified: subversion/branches/issue-4194-dev/subversion/libsvn_diff/parse-diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-4194-dev/subversion/libsvn_diff/parse-diff.c?rev=1411814&r1=1411813&r2=1411814&view=diff
==============================================================================
--- subversion/branches/issue-4194-dev/subversion/libsvn_diff/parse-diff.c (original)
+++ subversion/branches/issue-4194-dev/subversion/libsvn_diff/parse-diff.c Tue Nov 20 19:39:39 2012
@@ -555,15 +555,11 @@ parse_next_hunk(svn_diff_hunk_t **hunk,
       pos = 0;
       SVN_ERR(svn_io_file_seek(apr_file, APR_CUR, &pos, iterpool));
 
-      /* Lines starting with a backslash are comments, such as
-       * "\ No newline at end of file". */
+      /* Lines starting with a backslash indicate a missing EOL:
+       * "\ No newline at end of file" or "end of property". */
       if (line->data[0] == '\\')
         {
-          if (in_hunk &&
-              ((!*is_property &&
-                strcmp(line->data, "\\ No newline at end of file") == 0) ||
-               (*is_property &&
-                strcmp(line->data, "\\ No newline at end of property") == 0)))
+          if (in_hunk)
             {
               char eolbuf[2];
               apr_size_t len;

Modified: subversion/branches/issue-4194-dev/subversion/libsvn_fs_fs/fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/issue-4194-dev/subversion/libsvn_fs_fs/fs.h?rev=1411814&r1=1411813&r2=1411814&view=diff
==============================================================================
--- subversion/branches/issue-4194-dev/subversion/libsvn_fs_fs/fs.h (original)
+++ subversion/branches/issue-4194-dev/subversion/libsvn_fs_fs/fs.h Tue Nov 20 19:39:39 2012
@@ -180,6 +180,7 @@ typedef struct fs_fs_shared_txn_data_t
    per file.  On Windows apr implements the locking as per file handle
    locks, so we don't have to add our own mutex for just in-process
    synchronization. */
+/* Compare ../libsvn_subr/named_atomic.c:USE_THREAD_MUTEX */
 #if APR_HAS_THREADS && !defined(WIN32)
 #define SVN_FS_FS__USE_LOCK_MUTEX 1
 #else

Modified: subversion/branches/issue-4194-dev/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-4194-dev/subversion/libsvn_fs_fs/fs_fs.c?rev=1411814&r1=1411813&r2=1411814&view=diff
==============================================================================
--- subversion/branches/issue-4194-dev/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/issue-4194-dev/subversion/libsvn_fs_fs/fs_fs.c Tue Nov 20 19:39:39 2012
@@ -360,6 +360,18 @@ path_txn_dir(svn_fs_t *fs, const char *t
                               NULL);
 }
 
+/* Return the name of the sha1->rep mapping file in transaction TXN_ID
+ * within FS for the given SHA1 checksum.  Use POOL for allocations.
+ */
+static APR_INLINE const char *
+path_txn_sha1(svn_fs_t *fs, const char *txn_id, svn_checksum_t *sha1,
+              apr_pool_t *pool)
+{
+  return svn_dirent_join(path_txn_dir(fs, txn_id, pool),
+                         svn_checksum_to_cstring(sha1, pool),
+                         pool);
+}
+
 static APR_INLINE const char *
 path_txn_changes(svn_fs_t *fs, const char *txn_id, apr_pool_t *pool)
 {
@@ -2613,10 +2625,6 @@ svn_fs_fs__put_node_revision(svn_fs_t *f
   fs_fs_data_t *ffd = fs->fsap_data;
   apr_file_t *noderev_file;
   const char *txn_id = svn_fs_fs__id_txn_id(id);
-  const char *sha1 = ffd->rep_sharing_allowed && noderev->data_rep
-                   ? svn_checksum_to_cstring(noderev->data_rep->sha1_checksum,
-                                             pool)
-                   : NULL;
 
   noderev->is_fresh_txn_root = fresh_txn_root;
 
@@ -2637,13 +2645,31 @@ svn_fs_fs__put_node_revision(svn_fs_t *f
 
   SVN_ERR(svn_io_file_close(noderev_file, pool));
 
+  return SVN_NO_ERROR;
+}
+
+/* For the in-transaction NODEREV within FS, write the sha1->rep mapping
+ * file in the respective transaction, if rep sharing has been enabled etc.
+ * Use POOL for temporary allocations.
+ */
+static svn_error_t *
+store_sha1_rep_mapping(svn_fs_t *fs,
+                       node_revision_t *noderev,
+                       apr_pool_t *pool)
+{
+  fs_fs_data_t *ffd = fs->fsap_data;
+
   /* if rep sharing has been enabled and the noderev has a data rep and
    * its SHA-1 is known, store the rep struct under its SHA1. */
-  if (sha1)
+  if (   ffd->rep_sharing_allowed
+      && noderev->data_rep
+      && noderev->data_rep->sha1_checksum)
     {
       apr_file_t *rep_file;
-      const char *file_name = svn_dirent_join(path_txn_dir(fs, txn_id, pool),
-                                              sha1, pool);
+      const char *file_name = path_txn_sha1(fs,
+                                            svn_fs_fs__id_txn_id(noderev->id),
+                                            noderev->data_rep->sha1_checksum,
+                                            pool);
       const char *rep_string = representation_string(noderev->data_rep,
                                                      ffd->format,
                                                      (noderev->kind
@@ -4885,6 +4911,7 @@ read_plain_window(svn_stringbuf_t **nwin
                                  pool));
   (*nwin)->data[size] = 0;
 
+  /* Update RS. */
   rs->off += (apr_off_t)size;
 
   return SVN_NO_ERROR;
@@ -4931,7 +4958,10 @@ get_combined_window(svn_stringbuf_t **re
       rs = APR_ARRAY_IDX(rb->rs_list, i, struct rep_state *);
       window = APR_ARRAY_IDX(windows, i, svn_txdelta_window_t *);
 
-      /* Maybe, we've got a PLAIN start representation */
+      /* Maybe, we've got a PLAIN start representation.  If we do, read
+         as much data from it as the needed for the txdelta window's source
+         view.
+         Note that BUF / SOURCE may only be NULL in the first iteration. */
       source = buf;
       if (source == NULL && rb->src_state != NULL)
         SVN_ERR(read_plain_window(&source, rb->src_state, window->sview_len,
@@ -7297,9 +7327,7 @@ get_shared_rep(representation_t **old_re
     {
       svn_node_kind_t kind;
       const char *file_name
-        = svn_dirent_join(path_txn_dir(fs, rep->txn_id, pool),
-                          svn_checksum_to_cstring(rep->sha1_checksum, pool),
-                          pool);
+        = path_txn_sha1(fs, rep->txn_id, rep->sha1_checksum, pool);
 
       /* in our txn, is there a rep file named with the wanted SHA1?
          If so, read it and use that rep.
@@ -7389,6 +7417,8 @@ rep_write_contents_close(void *baton)
   /* Write out the new node-rev information. */
   SVN_ERR(svn_fs_fs__put_node_revision(b->fs, b->noderev->id, b->noderev, FALSE,
                                        b->pool));
+  if (!old_rep)
+    SVN_ERR(store_sha1_rep_mapping(b->fs, b->noderev, b->pool));
 
   SVN_ERR(svn_io_file_close(b->file, b->pool));
   SVN_ERR(unlock_proto_rev(b->fs, rep->txn_id, b->lockcookie, b->pool));

Modified: subversion/branches/issue-4194-dev/subversion/libsvn_fs_fs/structure
URL: http://svn.apache.org/viewvc/subversion/branches/issue-4194-dev/subversion/libsvn_fs_fs/structure?rev=1411814&r1=1411813&r2=1411814&view=diff
==============================================================================
--- subversion/branches/issue-4194-dev/subversion/libsvn_fs_fs/structure (original)
+++ subversion/branches/issue-4194-dev/subversion/libsvn_fs_fs/structure Tue Nov 20 19:39:39 2012
@@ -526,6 +526,7 @@ A transaction directory has the followin
   node.<nid>.<cid>           New node-rev data for node
   node.<nid>.<cid>.props     Props for new node-rev, if changed
   node.<nid>.<cid>.children  Directory contents for node-rev
+  <sha1>                     Text representation of that sha1
 
 In FS formats 1 and 2, it also contains:
 
@@ -543,6 +544,11 @@ The two kinds of props files are all in 
 file will always be present.  The "node.<nid>.<cid>.props" file will
 only be present if the node-rev properties have been changed.
 
+The <sha1> files have been introduced in FS format 6. Their content
+is that of text rep references: "<rev> <offset> <length> <size> <digest>"
+They will be written for text reps in the current transaction and be
+used to eliminate duplicate reps within that transaction.
+
 The "next-ids" file contains a single line "<next-temp-node-id>
 <next-temp-copy-id>\n" giving the next temporary node-ID and copy-ID
 assignments (without the leading underscores).  The next node-ID is

Modified: subversion/branches/issue-4194-dev/subversion/libsvn_ra_serf/ra_serf.h
URL: http://svn.apache.org/viewvc/subversion/branches/issue-4194-dev/subversion/libsvn_ra_serf/ra_serf.h?rev=1411814&r1=1411813&r2=1411814&view=diff
==============================================================================
--- subversion/branches/issue-4194-dev/subversion/libsvn_ra_serf/ra_serf.h (original)
+++ subversion/branches/issue-4194-dev/subversion/libsvn_ra_serf/ra_serf.h Tue Nov 20 19:39:39 2012
@@ -189,7 +189,7 @@ struct svn_ra_serf__session_t {
   const char *uuid;
 
   /* Connection timeout value */
-  apr_short_interval_time_t timeout;
+  apr_interval_time_t timeout;
 
   /* HTTPv1 flags */
   svn_tristate_t supports_deadprop_count;

Modified: subversion/branches/issue-4194-dev/subversion/libsvn_ra_serf/replay.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-4194-dev/subversion/libsvn_ra_serf/replay.c?rev=1411814&r1=1411813&r2=1411814&view=diff
==============================================================================
--- subversion/branches/issue-4194-dev/subversion/libsvn_ra_serf/replay.c (original)
+++ subversion/branches/issue-4194-dev/subversion/libsvn_ra_serf/replay.c Tue Nov 20 19:39:39 2012
@@ -732,7 +732,7 @@ svn_ra_serf__replay_range(svn_ra_session
   svn_revnum_t rev = start_revision;
   const char *report_target;
   int active_reports = 0;
-  apr_short_interval_time_t waittime_left = session->timeout;
+  apr_interval_time_t waittime_left = session->timeout;
 
   SVN_ERR(svn_ra_serf__report_resource(&report_target, session, NULL, pool));
 

Modified: subversion/branches/issue-4194-dev/subversion/libsvn_ra_serf/serf.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-4194-dev/subversion/libsvn_ra_serf/serf.c?rev=1411814&r1=1411813&r2=1411814&view=diff
==============================================================================
--- subversion/branches/issue-4194-dev/subversion/libsvn_ra_serf/serf.c (original)
+++ subversion/branches/issue-4194-dev/subversion/libsvn_ra_serf/serf.c Tue Nov 20 19:39:39 2012
@@ -131,7 +131,11 @@ load_http_auth_types(apr_pool_t *pool, s
 
   return SVN_NO_ERROR;
 }
-#define DEFAULT_HTTP_TIMEOUT 3600
+
+/* Default HTTP timeout (in seconds); overridden by the 'http-timeout'
+   runtime configuration variable. */
+#define DEFAULT_HTTP_TIMEOUT 600
+
 static svn_error_t *
 load_config(svn_ra_serf__session_t *session,
             apr_hash_t *config_hash,
@@ -253,6 +257,7 @@ load_config(svn_ra_serf__session_t *sess
     }
 
   /* Parse the connection timeout value, if any. */
+  session->timeout = apr_time_from_sec(DEFAULT_HTTP_TIMEOUT);
   if (timeout_str)
     {
       char *endstr;
@@ -267,12 +272,6 @@ load_config(svn_ra_serf__session_t *sess
                                 _("Invalid config: negative timeout value"));
       session->timeout = apr_time_from_sec(timeout);
     }
-  else
-    session->timeout = apr_time_from_sec(DEFAULT_HTTP_TIMEOUT);
-
-  if (session->timeout < 0) /* Always true for DEFAULT_HTTP_TIMEOUT */
-    session->timeout = apr_time_from_sec(600); /* 10 min */
-
   SVN_ERR_ASSERT(session->timeout > 0);
 
   /* Convert the proxy port value, if any. */

Modified: subversion/branches/issue-4194-dev/subversion/libsvn_ra_serf/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-4194-dev/subversion/libsvn_ra_serf/update.c?rev=1411814&r1=1411813&r2=1411814&view=diff
==============================================================================
--- subversion/branches/issue-4194-dev/subversion/libsvn_ra_serf/update.c (original)
+++ subversion/branches/issue-4194-dev/subversion/libsvn_ra_serf/update.c Tue Nov 20 19:39:39 2012
@@ -2591,7 +2591,7 @@ finish_report(void *report_baton,
   svn_stringbuf_t *buf = NULL;
   apr_pool_t *iterpool = svn_pool_create(pool);
   svn_error_t *err;
-  apr_short_interval_time_t waittime_left = sess->timeout;
+  apr_interval_time_t waittime_left = sess->timeout;
 
   svn_xml_make_close_tag(&buf, iterpool, "S:update-report");
   SVN_ERR(svn_io_file_write_full(report->body_file, buf->data, buf->len,

Modified: subversion/branches/issue-4194-dev/subversion/libsvn_ra_serf/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-4194-dev/subversion/libsvn_ra_serf/util.c?rev=1411814&r1=1411813&r2=1411814&view=diff
==============================================================================
--- subversion/branches/issue-4194-dev/subversion/libsvn_ra_serf/util.c (original)
+++ subversion/branches/issue-4194-dev/subversion/libsvn_ra_serf/util.c Tue Nov 20 19:39:39 2012
@@ -718,7 +718,7 @@ svn_ra_serf__context_run_wait(svn_boolea
                               apr_pool_t *scratch_pool)
 {
   apr_pool_t *iterpool;
-  apr_short_interval_time_t waittime_left = sess->timeout;
+  apr_interval_time_t waittime_left = sess->timeout;
   
   assert(sess->pending_error == SVN_NO_ERROR);
 
@@ -1903,10 +1903,12 @@ handle_response(serf_request_t *request,
   handler->conn->last_status_code = handler->sline.code;
 
   if (handler->sline.code == 405
+      || handler->sline.code == 408
       || handler->sline.code == 409
       || handler->sline.code >= 500)
     {
       /* 405 Method Not allowed.
+         408 Request Timeout
          409 Conflict: can indicate a hook error.
          5xx (Internal) Server error. */
       serf_bucket_t *hdrs;

Modified: subversion/branches/issue-4194-dev/subversion/libsvn_subr/named_atomic.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-4194-dev/subversion/libsvn_subr/named_atomic.c?rev=1411814&r1=1411813&r2=1411814&view=diff
==============================================================================
--- subversion/branches/issue-4194-dev/subversion/libsvn_subr/named_atomic.c (original)
+++ subversion/branches/issue-4194-dev/subversion/libsvn_subr/named_atomic.c Tue Nov 20 19:39:39 2012
@@ -80,12 +80,12 @@
 /* Particle that will be appended to the namespace name to form the
  * name of the mutex / lock file used for that namespace.
  */
-#define MUTEX_NAME_SUFFIX "Mutex"
+#define MUTEX_NAME_SUFFIX ".mutex"
 
 /* Particle that will be appended to the namespace name to form the
  * name of the shared memory file that backs that namespace.
  */
-#define SHM_NAME_SUFFIX "Shm"
+#define SHM_NAME_SUFFIX ".shm"
 
 /* Platform-dependent implementations of our basic atomic operations.
  * NA_SYNCHRONIZE(op) will ensure that the OP gets executed atomically.
@@ -162,9 +162,11 @@ synched_cmpxchg(volatile apr_int64_t *me
 }
 
 #define NA_SYNCHRONIZE(_atomic,op)\
+  do{\
   SVN_ERR(lock(_atomic->mutex));\
   op;\
-  SVN_ERR(unlock(_atomic->mutex,SVN_NO_ERROR));
+  SVN_ERR(unlock(_atomic->mutex,SVN_NO_ERROR));\
+  }while(0)
 
 #define NA_SYNCHRONIZE_IS_FAST FALSE
 
@@ -238,6 +240,7 @@ struct svn_atomic_namespace__t
 /* On most operating systems APR implements file locks per process, not
  * per file. I.e. the lock file will only sync. among processes but within
  * a process, we must use a mutex to sync the threads. */
+/* Compare ../libsvn_fs_fs/fs.h:SVN_FS_FS__USE_LOCK_MUTEX */
 #if APR_HAS_THREADS && !defined(WIN32)
 #define USE_THREAD_MUTEX 1
 #else

Modified: subversion/branches/issue-4194-dev/subversion/libsvn_wc/adm_ops.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-4194-dev/subversion/libsvn_wc/adm_ops.c?rev=1411814&r1=1411813&r2=1411814&view=diff
==============================================================================
--- subversion/branches/issue-4194-dev/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/branches/issue-4194-dev/subversion/libsvn_wc/adm_ops.c Tue Nov 20 19:39:39 2012
@@ -2330,6 +2330,11 @@ svn_wc__internal_remove_from_revision_co
 
   SVN_ERR(svn_wc__db_is_wcroot(&is_root, db, local_abspath, scratch_pool));
 
+  SVN_ERR(svn_wc__write_check(db, is_root ? local_abspath
+                                          : svn_dirent_dirname(local_abspath,
+                                                               scratch_pool),
+                              scratch_pool));
+
   SVN_ERR(svn_wc__db_op_remove_node(&left_something,
                                     db, local_abspath,
                                     destroy_wf /* destroy_wc */,

Modified: subversion/branches/issue-4194-dev/subversion/libsvn_wc/externals.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-4194-dev/subversion/libsvn_wc/externals.c?rev=1411814&r1=1411813&r2=1411814&view=diff
==============================================================================
--- subversion/branches/issue-4194-dev/subversion/libsvn_wc/externals.c (original)
+++ subversion/branches/issue-4194-dev/subversion/libsvn_wc/externals.c Tue Nov 20 19:39:39 2012
@@ -164,16 +164,17 @@ svn_wc_parse_externals_description3(apr_
                                     apr_pool_t *pool)
 {
   int i;
-  int j;
+  unsigned int len;
   apr_array_header_t *externals = NULL;
   apr_array_header_t *lines = svn_cstring_split(desc, "\n\r", TRUE, pool);
+  apr_hash_t *duplicate_check = apr_hash_make(pool);
   const char *parent_directory_display = svn_path_is_url(parent_directory) ?
     parent_directory : svn_dirent_local_style(parent_directory, pool);
 
   /* If an error occurs halfway through parsing, *externals_p should stay
-   * untouched. So, store the list in a local var first. Since we are checking
-   * for duplicate targets, always compose the list regardless. */
-  externals = apr_array_make(pool, 1, sizeof(svn_wc_external_item2_t *));
+   * untouched. So, store the list in a local var first. */
+  if (externals_p)
+    externals = apr_array_make(pool, 1, sizeof(svn_wc_external_item2_t *));
 
   for (i = 0; i < lines->nelts; i++)
     {
@@ -332,22 +333,22 @@ svn_wc_parse_externals_description3(apr_
         }
 
       /* Has the same WC target path already been mentioned in this prop? */
-      for (j = 0; j < externals->nelts; j++)
+      len = apr_hash_count(duplicate_check);
+      apr_hash_set(duplicate_check, item->target_dir, APR_HASH_KEY_STRING, "");
+      if (len == apr_hash_count(duplicate_check))
         {
-          svn_wc_external_item2_t *other_item =
-              APR_ARRAY_IDX(externals, j, svn_wc_external_item2_t *);
-
-          if (strcmp(item->target_dir, other_item->target_dir) == 0)
-            return svn_error_createf
-              (SVN_ERR_CLIENT_INVALID_EXTERNALS_DESCRIPTION, NULL,
-               _("Invalid %s property on '%s': "
-                 "target '%s' appears more than once"),
-               SVN_PROP_EXTERNALS,
-               parent_directory_display,
-               item->target_dir);
+          /* Hashtable length is unchanged. This must be a duplicate. */
+          return svn_error_createf
+            (SVN_ERR_CLIENT_INVALID_EXTERNALS_DESCRIPTION, NULL,
+             _("Invalid %s property on '%s': "
+               "target '%s' appears more than once"),
+             SVN_PROP_EXTERNALS,
+             parent_directory_display,
+             item->target_dir);
         }
 
-      APR_ARRAY_PUSH(externals, svn_wc_external_item2_t *) = item;
+      if (externals)
+        APR_ARRAY_PUSH(externals, svn_wc_external_item2_t *) = item;
     }
 
   if (externals_p)

Modified: subversion/branches/issue-4194-dev/subversion/libsvn_wc/wc-metadata.sql
URL: http://svn.apache.org/viewvc/subversion/branches/issue-4194-dev/subversion/libsvn_wc/wc-metadata.sql?rev=1411814&r1=1411813&r2=1411814&view=diff
==============================================================================
--- subversion/branches/issue-4194-dev/subversion/libsvn_wc/wc-metadata.sql (original)
+++ subversion/branches/issue-4194-dev/subversion/libsvn_wc/wc-metadata.sql Tue Nov 20 19:39:39 2012
@@ -585,13 +585,14 @@ CREATE UNIQUE INDEX I_EXTERNALS_DEFINED 
 
 -- STMT_UPGRADE_TO_20
 
-UPDATE BASE_NODE SET checksum=(SELECT checksum FROM pristine
-                           WHERE md5_checksum=BASE_NODE.checksum)
-WHERE EXISTS(SELECT 1 FROM pristine WHERE md5_checksum=BASE_NODE.checksum);
-
-UPDATE WORKING_NODE SET checksum=(SELECT checksum FROM pristine
-                           WHERE md5_checksum=WORKING_NODE.checksum)
-WHERE EXISTS(SELECT 1 FROM pristine WHERE md5_checksum=WORKING_NODE.checksum);
+UPDATE BASE_NODE SET checksum = (SELECT checksum FROM pristine
+                                 WHERE md5_checksum = BASE_NODE.checksum)
+WHERE EXISTS (SELECT 1 FROM pristine WHERE md5_checksum = BASE_NODE.checksum);
+
+UPDATE WORKING_NODE SET checksum = (SELECT checksum FROM pristine
+                                    WHERE md5_checksum = WORKING_NODE.checksum)
+WHERE EXISTS (SELECT 1 FROM pristine
+              WHERE md5_checksum = WORKING_NODE.checksum);
 
 INSERT INTO NODES (
        wc_id, local_relpath, op_depth, parent_relpath,
@@ -731,9 +732,9 @@ LIMIT 1
 
 -- STMT_UPGRADE_TO_28
 
-UPDATE NODES SET checksum=(SELECT checksum FROM pristine
-                           WHERE md5_checksum=nodes.checksum)
-WHERE EXISTS(SELECT 1 FROM pristine WHERE md5_checksum=nodes.checksum);
+UPDATE NODES SET checksum = (SELECT checksum FROM pristine
+                             WHERE md5_checksum = nodes.checksum)
+WHERE EXISTS (SELECT 1 FROM pristine WHERE md5_checksum = nodes.checksum);
 
 PRAGMA user_version = 28;
 

Modified: subversion/branches/issue-4194-dev/subversion/libsvn_wc/wc_db.h
URL: http://svn.apache.org/viewvc/subversion/branches/issue-4194-dev/subversion/libsvn_wc/wc_db.h?rev=1411814&r1=1411813&r2=1411814&view=diff
==============================================================================
--- subversion/branches/issue-4194-dev/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/branches/issue-4194-dev/subversion/libsvn_wc/wc_db.h Tue Nov 20 19:39:39 2012
@@ -134,7 +134,8 @@ typedef enum svn_wc__db_status_t {
     svn_wc__db_status_normal,
 
     /* The node has been added (potentially obscuring a delete or move of
-       the BASE node; see HAVE_BASE param). The text will be marked as
+       the BASE node; see HAVE_BASE param [### What param? This is an enum
+       not a function.] ). The text will be marked as
        modified, and if properties exist, they will be marked as modified.
 
        In many cases svn_wc__db_status_added means any of added, moved-here

Modified: subversion/branches/issue-4194-dev/subversion/svn/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-4194-dev/subversion/svn/main.c?rev=1411814&r1=1411813&r2=1411814&view=diff
==============================================================================
--- subversion/branches/issue-4194-dev/subversion/svn/main.c (original)
+++ subversion/branches/issue-4194-dev/subversion/svn/main.c Tue Nov 20 19:39:39 2012
@@ -218,7 +218,8 @@ const apr_getopt_option_t svn_cl__option
                     N_("do not cross copies while traversing history")},
   {"no-ignore",     opt_no_ignore, 0,
                     N_("disregard default and svn:ignore and\n"
-                       "svn:global-ignore property ignores")},
+                       "                             "
+                       "svn:global-ignores property ignores")},
   {"no-auth-cache", opt_no_auth_cache, 0,
                     N_("do not cache authentication tokens")},
   {"trust-server-cert", opt_trust_server_cert, 0,
@@ -1114,7 +1115,8 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "\n"
      "  A unidiff patch suitable for application to a working copy can be\n"
      "  produced with the 'svn diff' command or third-party diffing tools.\n"
-     "  Any non-unidiff content of PATCHFILE is ignored.\n"
+     "  Any non-unidiff content of PATCHFILE is ignored, except for Subversion\n"
+     "  property diffs as produced by 'svn diff'.\n"
      "\n"
      "  Changes listed in the patch will either be applied or rejected.\n"
      "  If a change does not match at its exact line offset, it may be applied\n"
@@ -1229,6 +1231,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "  Note: svn recognizes the following special versioned properties\n"
      "  but will store any arbitrary properties set:\n"
      "    svn:ignore     - A newline separated list of file glob patterns to ignore.\n"
+     "    svn:global-ignores         - Like svn:ignore, but inheritable.\n"
      "    svn:keywords   - Keywords to be expanded.  Valid keywords are:\n"
      "      URL, HeadURL             - The URL for the head version of the object.\n"
      "      Author, LastChangedBy    - The last person to modify the file.\n"

Modified: subversion/branches/issue-4194-dev/subversion/svn/propget-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-4194-dev/subversion/svn/propget-cmd.c?rev=1411814&r1=1411813&r2=1411814&view=diff
==============================================================================
--- subversion/branches/issue-4194-dev/subversion/svn/propget-cmd.c (original)
+++ subversion/branches/issue-4194-dev/subversion/svn/propget-cmd.c Tue Nov 20 19:39:39 2012
@@ -443,7 +443,8 @@ svn_cl__propget(apr_getopt_t *os,
           print_filenames = ((opt_state->depth > svn_depth_empty
                               || targets->nelts > 1
                               || apr_hash_count(props) > 1
-                              || opt_state->verbose)
+                              || opt_state->verbose
+                              || opt_state->show_inherited_props)
                              && (! opt_state->strict));
           omit_newline = opt_state->strict;
           like_proplist = opt_state->verbose && !opt_state->strict;

Modified: subversion/branches/issue-4194-dev/subversion/svnlook/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-4194-dev/subversion/svnlook/main.c?rev=1411814&r1=1411813&r2=1411814&view=diff
==============================================================================
--- subversion/branches/issue-4194-dev/subversion/svnlook/main.c (original)
+++ subversion/branches/issue-4194-dev/subversion/svnlook/main.c Tue Nov 20 19:39:39 2012
@@ -887,8 +887,8 @@ display_prop_diffs(const apr_array_heade
 
         /* The last character in a property is often not a newline.
            An eol character is appended to prevent the diff API to add a
-           ' \ No newline at end of file' line. We add
-           ' \ No newline at end of property' manually if needed. */
+           '\ No newline at end of file' line. We add
+           '\ No newline at end of property' manually if needed. */
         tmp = orig_value ? orig_value : svn_string_create_empty(pool);
         orig = maybe_append_eol(tmp, NULL, pool);
 

Modified: subversion/branches/issue-4194-dev/subversion/svnrdump/dump_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-4194-dev/subversion/svnrdump/dump_editor.c?rev=1411814&r1=1411813&r2=1411814&view=diff
==============================================================================
--- subversion/branches/issue-4194-dev/subversion/svnrdump/dump_editor.c (original)
+++ subversion/branches/issue-4194-dev/subversion/svnrdump/dump_editor.c Tue Nov 20 19:39:39 2012
@@ -30,10 +30,10 @@
 #include "svn_subst.h"
 #include "svn_dirent_uri.h"
 
-#include "private/svn_fspath.h"
 #include "private/svn_subr_private.h"
 
 #include "svnrdump.h"
+#include <assert.h>
 
 #define ARE_VALID_COPY_ARGS(p,r) ((p) && SVN_IS_VALID_REVNUM(r))
 
@@ -50,14 +50,16 @@ struct dir_baton
   struct dump_edit_baton *eb;
   struct dir_baton *parent_dir_baton;
 
+  apr_pool_t *pool; /* Directory pool */
+
   /* is this directory a new addition to this revision? */
   svn_boolean_t added;
 
   /* has this directory been written to the output stream? */
   svn_boolean_t written_out;
 
-  /* the absolute path to this directory */
-  const char *abspath; /* an fspath */
+  /* the path to this directory */
+  const char *repos_relpath; /* a relpath */
 
   /* Copyfrom info for the node, if any. */
   const char *copyfrom_path; /* a relpath */
@@ -70,6 +72,20 @@ struct dir_baton
   apr_hash_t *deleted_entries;
 };
 
+/* A file baton used by all file-related callback functions in the dump
+ * editor */
+struct file_baton
+{
+  struct dump_edit_baton *eb;
+  struct dir_baton *parent_dir_baton;
+
+  /* the path to this file */
+  const char *repos_relpath; /* a relpath */
+
+  /* The checksum of the file the delta is being applied to */
+  const char *base_checksum;
+};
+
 /* A handler baton to be used in window_handler().  */
 struct handler_baton
 {
@@ -106,9 +122,6 @@ struct dump_edit_baton {
   const char *delta_abspath;
   apr_file_t *delta_file;
 
-  /* The checksum of the file the delta is being applied to */
-  const char *base_checksum;
-
   /* Flags to trigger dumping props and text */
   svn_boolean_t dump_text;
   svn_boolean_t dump_props;
@@ -142,16 +155,13 @@ make_dir_baton(const char *path,
   struct dump_edit_baton *eb = edit_baton;
   struct dir_baton *pb = parent_dir_baton;
   struct dir_baton *new_db = apr_pcalloc(pool, sizeof(*new_db));
-  const char *abspath;
+  const char *repos_relpath;
 
   /* Construct the full path of this node. */
-  /* ### FIXME: Not sure why we use an abspath here.  If I understand
-     ### correctly, the only place we used this path is in dump_node(),
-     ### which immediately converts it into a relpath.  -- cmpilato.  */
   if (pb)
-    abspath = svn_fspath__canonicalize(path, pool);
+    repos_relpath = svn_relpath_canonicalize(path, pool);
   else
-    abspath = "/";
+    repos_relpath = "";
 
   /* Strip leading slash from copyfrom_path so that the path is
      canonical and svn_relpath_join can be used */
@@ -160,8 +170,11 @@ make_dir_baton(const char *path,
 
   new_db->eb = eb;
   new_db->parent_dir_baton = pb;
-  new_db->abspath = abspath;
-  new_db->copyfrom_path = copyfrom_path;
+  new_db->pool = pool;
+  new_db->repos_relpath = repos_relpath;
+  new_db->copyfrom_path = copyfrom_path 
+                            ? svn_relpath_canonicalize(copyfrom_path, pool)
+                            : NULL;
   new_db->copyfrom_rev = copyfrom_rev;
   new_db->added = added;
   new_db->written_out = FALSE;
@@ -287,7 +300,7 @@ do_dump_newlines(struct dump_edit_baton 
  */
 static svn_error_t *
 dump_node(struct dump_edit_baton *eb,
-          const char *path,    /* an absolute path. */
+          const char *repos_relpath,
           svn_node_kind_t kind,
           enum svn_node_action action,
           svn_boolean_t is_copy,
@@ -295,16 +308,12 @@ dump_node(struct dump_edit_baton *eb,
           svn_revnum_t copyfrom_rev,
           apr_pool_t *pool)
 {
-  /* Remove leading slashes from path and copyfrom_path */
-  if (path)
-    path = svn_relpath_canonicalize(path, pool);
-
-  if (copyfrom_path)
-    copyfrom_path = svn_relpath_canonicalize(copyfrom_path, pool);
+  assert(svn_relpath_is_canonical(repos_relpath));
+  assert(!copyfrom_path || svn_relpath_is_canonical(copyfrom_path));
 
   /* Node-path: commons/STATUS */
   SVN_ERR(svn_stream_printf(eb->stream, pool,
-                            SVN_REPOS_DUMPFILE_NODE_PATH ": %s\n", path));
+                            SVN_REPOS_DUMPFILE_NODE_PATH ": %s\n", repos_relpath));
 
   /* Node-kind: file */
   if (kind == svn_node_file)
@@ -347,7 +356,7 @@ dump_node(struct dump_edit_baton *eb,
                               SVN_REPOS_DUMPFILE_NODE_ACTION ": delete\n\n"));
 
       /* Recurse: Print an additional add-with-history record. */
-      SVN_ERR(dump_node(eb, path, kind, svn_node_action_add,
+      SVN_ERR(dump_node(eb, repos_relpath, kind, svn_node_action_add,
                         is_copy, copyfrom_path, copyfrom_rev, pool));
 
       /* We can leave this routine quietly now, don't need to dump any
@@ -428,6 +437,24 @@ open_root(void *edit_baton,
   return SVN_NO_ERROR;
 }
 
+/* Dump pending items from the specified node, to allow starting the dump
+   of a child node */
+static svn_error_t *
+dump_pending(struct dir_baton *pb,
+             apr_pool_t *scratch_pool)
+{
+  /* Some pending properties to dump? */
+  SVN_ERR(do_dump_props(&pb->eb->propstring, pb->eb->stream,
+                        pb->eb->props, pb->eb->deleted_props,
+                        &(pb->eb->dump_props), TRUE,
+                        pb->pool, scratch_pool));
+
+  /* Some pending newlines to dump? */
+  SVN_ERR(do_dump_newlines(pb->eb, &(pb->eb->dump_newlines), scratch_pool));
+
+  return SVN_NO_ERROR;
+}
+
 static svn_error_t *
 delete_entry(const char *path,
              svn_revnum_t revision,
@@ -438,13 +465,7 @@ delete_entry(const char *path,
 
   LDR_DBG(("delete_entry %s\n", path));
 
-  /* Some pending properties to dump? */
-  SVN_ERR(do_dump_props(&pb->eb->propstring, pb->eb->stream,
-                        pb->eb->props, pb->eb->deleted_props,
-                        &(pb->eb->dump_props), TRUE, pool, pool));
-
-  /* Some pending newlines to dump? */
-  SVN_ERR(do_dump_newlines(pb->eb, &(pb->eb->dump_newlines), pool));
+  SVN_ERR(dump_pending(pb, pool));
 
   /* Add this path to the deleted_entries of the parent directory
      baton. */
@@ -472,13 +493,7 @@ add_directory(const char *path,
   new_db = make_dir_baton(path, copyfrom_path, copyfrom_rev, pb->eb,
                           pb, TRUE, pb->eb->pool);
 
-  /* Some pending properties to dump? */
-  SVN_ERR(do_dump_props(&pb->eb->propstring, pb->eb->stream,
-                        pb->eb->props, pb->eb->deleted_props,
-                        &(pb->eb->dump_props), TRUE, pool, pool));
-
-  /* Some pending newlines to dump? */
-  SVN_ERR(do_dump_newlines(pb->eb, &(pb->eb->dump_newlines), pool));
+  SVN_ERR(dump_pending(pb, pool));
 
   /* This might be a replacement -- is the path already deleted? */
   val = apr_hash_get(pb->deleted_entries, path, APR_HASH_KEY_STRING);
@@ -487,11 +502,11 @@ add_directory(const char *path,
   is_copy = ARE_VALID_COPY_ARGS(copyfrom_path, copyfrom_rev);
 
   /* Dump the node */
-  SVN_ERR(dump_node(pb->eb, path,
+  SVN_ERR(dump_node(pb->eb, new_db->repos_relpath,
                     svn_node_dir,
                     val ? svn_node_action_replace : svn_node_action_add,
                     is_copy,
-                    is_copy ? copyfrom_path : NULL,
+                    is_copy ? new_db->copyfrom_path : NULL,
                     is_copy ? copyfrom_rev : SVN_INVALID_REVNUM,
                     pool));
 
@@ -519,13 +534,7 @@ open_directory(const char *path,
 
   LDR_DBG(("open_directory %s\n", path));
 
-  /* Some pending properties to dump? */
-  SVN_ERR(do_dump_props(&pb->eb->propstring, pb->eb->stream,
-                        pb->eb->props, pb->eb->deleted_props,
-                        &(pb->eb->dump_props), TRUE, pool, pool));
-
-  /* Some pending newlines to dump? */
-  SVN_ERR(do_dump_newlines(pb->eb, &(pb->eb->dump_newlines), pool));
+  SVN_ERR(dump_pending(pb, pool));
 
   /* If the parent directory has explicit comparison path and rev,
      record the same for this one. */
@@ -548,18 +557,11 @@ close_directory(void *dir_baton,
                 apr_pool_t *pool)
 {
   struct dir_baton *db = dir_baton;
-  struct dump_edit_baton *eb = db->eb;
   apr_hash_index_t *hi;
 
   LDR_DBG(("close_directory %p\n", dir_baton));
 
-  /* Some pending properties to dump? */
-  SVN_ERR(do_dump_props(&eb->propstring, eb->stream,
-                        eb->props, eb->deleted_props,
-                        &(eb->dump_props), TRUE, pool, pool));
-
-  /* Some pending newlines to dump? */
-  SVN_ERR(do_dump_newlines(eb, &(eb->dump_newlines), pool));
+  SVN_ERR(dump_pending(db, pool));
 
   /* Dump the deleted directory entries */
   for (hi = apr_hash_first(pool, db->deleted_entries); hi;
@@ -584,18 +586,17 @@ add_file(const char *path,
          void **file_baton)
 {
   struct dir_baton *pb = parent_baton;
+  struct file_baton *fb = apr_pcalloc(pool, sizeof(*fb));
   void *val;
   svn_boolean_t is_copy;
 
-  LDR_DBG(("add_file %s\n", path));
+  fb->eb = pb->eb;
+  fb->parent_dir_baton = pb;
+  fb->repos_relpath = svn_relpath_canonicalize(path, pool);
 
-  /* Some pending properties to dump? */
-  SVN_ERR(do_dump_props(&pb->eb->propstring, pb->eb->stream,
-                        pb->eb->props, pb->eb->deleted_props,
-                        &(pb->eb->dump_props), TRUE, pool, pool));
+  LDR_DBG(("add_file %s\n", path));
 
-  /* Some pending newlines to dump? */
-  SVN_ERR(do_dump_newlines(pb->eb, &(pb->eb->dump_newlines), pool));
+  SVN_ERR(dump_pending(pb, pool));
 
   /* This might be a replacement -- is the path already deleted? */
   val = apr_hash_get(pb->deleted_entries, path, APR_HASH_KEY_STRING);
@@ -604,11 +605,12 @@ add_file(const char *path,
   is_copy = ARE_VALID_COPY_ARGS(copyfrom_path, copyfrom_rev);
 
   /* Dump the node. */
-  SVN_ERR(dump_node(pb->eb, path,
+  SVN_ERR(dump_node(pb->eb, fb->repos_relpath,
                     svn_node_file,
                     val ? svn_node_action_replace : svn_node_action_add,
                     is_copy,
-                    is_copy ? copyfrom_path : NULL,
+                    is_copy ? svn_relpath_canonicalize(copyfrom_path, pool)
+                            : NULL,
                     is_copy ? copyfrom_rev : SVN_INVALID_REVNUM,
                     pool));
 
@@ -618,7 +620,7 @@ add_file(const char *path,
 
   /* Build a nice file baton to pass to change_file_prop and
      apply_textdelta */
-  *file_baton = pb->eb;
+  *file_baton = fb;
 
   return SVN_NO_ERROR;
 }
@@ -631,18 +633,17 @@ open_file(const char *path,
           void **file_baton)
 {
   struct dir_baton *pb = parent_baton;
+  struct file_baton *fb = apr_pcalloc(pool, sizeof(*fb));
   const char *copyfrom_path = NULL;
   svn_revnum_t copyfrom_rev = SVN_INVALID_REVNUM;
 
-  LDR_DBG(("open_file %s\n", path));
+  fb->eb = pb->eb;
+  fb->parent_dir_baton = pb;
+  fb->repos_relpath = svn_relpath_canonicalize(path, pool);
 
-  /* Some pending properties to dump? */
-  SVN_ERR(do_dump_props(&pb->eb->propstring, pb->eb->stream,
-                        pb->eb->props, pb->eb->deleted_props,
-                        &(pb->eb->dump_props), TRUE, pool, pool));
+  LDR_DBG(("open_file %s\n", path));
 
-  /* Some pending newlines to dump? */
-  SVN_ERR(do_dump_newlines(pb->eb, &(pb->eb->dump_newlines), pool));
+  SVN_ERR(dump_pending(pb, pool));
 
   /* If the parent directory has explicit copyfrom path and rev,
      record the same for this one. */
@@ -654,12 +655,13 @@ open_file(const char *path,
       copyfrom_rev = pb->copyfrom_rev;
     }
 
-  SVN_ERR(dump_node(pb->eb, path, svn_node_file, svn_node_action_change,
-                    FALSE, copyfrom_path, copyfrom_rev, pool));
+  SVN_ERR(dump_node(pb->eb, fb->repos_relpath, svn_node_file,
+                    svn_node_action_change, FALSE, copyfrom_path,
+                    copyfrom_rev, pool));
 
   /* Build a nice file baton to pass to change_file_prop and
      apply_textdelta */
-  *file_baton = pb->eb;
+  *file_baton = fb;
 
   return SVN_NO_ERROR;
 }
@@ -692,7 +694,7 @@ change_dir_prop(void *parent_baton,
          props. If it not, dump the node itself before dumping the
          props. */
 
-      SVN_ERR(dump_node(db->eb, db->abspath, svn_node_dir,
+      SVN_ERR(dump_node(db->eb, db->repos_relpath, svn_node_dir,
                         svn_node_action_change, FALSE, db->copyfrom_path,
                         db->copyfrom_rev, pool));
       db->written_out = TRUE;
@@ -712,7 +714,8 @@ change_file_prop(void *file_baton,
                  const svn_string_t *value,
                  apr_pool_t *pool)
 {
-  struct dump_edit_baton *eb = file_baton;
+  struct file_baton *fb = file_baton;
+  struct dump_edit_baton *eb = fb->eb;
 
   LDR_DBG(("change_file_prop %p\n", file_baton));
 
@@ -756,7 +759,8 @@ apply_textdelta(void *file_baton, const 
                 svn_txdelta_window_handler_t *handler,
                 void **handler_baton)
 {
-  struct dump_edit_baton *eb = file_baton;
+  struct file_baton *fb = file_baton;
+  struct dump_edit_baton *eb = fb->eb;
 
   /* Custom handler_baton allocated in a separate pool */
   struct handler_baton *hb;
@@ -775,8 +779,7 @@ apply_textdelta(void *file_baton, const 
                           SVN_DELTA_COMPRESSION_LEVEL_DEFAULT, pool);
 
   eb->dump_text = TRUE;
-  eb->base_checksum = apr_pstrdup(eb->pool, base_checksum);
-  SVN_ERR(svn_stream_close(delta_filestream));
+  fb->base_checksum = apr_pstrdup(eb->pool, base_checksum);
 
   /* The actual writing takes place when this function has
      finished. Set handler and handler_baton now so for
@@ -792,7 +795,8 @@ close_file(void *file_baton,
            const char *text_checksum,
            apr_pool_t *pool)
 {
-  struct dump_edit_baton *eb = file_baton;
+  struct file_baton *fb = file_baton;
+  struct dump_edit_baton *eb = fb->eb;
   apr_finfo_t *info = apr_pcalloc(pool, sizeof(apr_finfo_t));
 
   LDR_DBG(("close_file %p\n", file_baton));
@@ -817,12 +821,12 @@ close_file(void *file_baton,
       if (err)
         SVN_ERR(svn_error_wrap_apr(err, NULL));
 
-      if (eb->base_checksum)
+      if (fb->base_checksum)
         /* Text-delta-base-md5: */
         SVN_ERR(svn_stream_printf(eb->stream, pool,
                                   SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_MD5
                                   ": %s\n",
-                                  eb->base_checksum));
+                                  fb->base_checksum));
 
       /* Text-content-length: 39 */
       SVN_ERR(svn_stream_printf(eb->stream, pool,

Modified: subversion/branches/issue-4194-dev/subversion/tests/cmdline/svnadmin_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/issue-4194-dev/subversion/tests/cmdline/svnadmin_tests.py?rev=1411814&r1=1411813&r2=1411814&view=diff
==============================================================================
--- subversion/branches/issue-4194-dev/subversion/tests/cmdline/svnadmin_tests.py (original)
+++ subversion/branches/issue-4194-dev/subversion/tests/cmdline/svnadmin_tests.py Tue Nov 20 19:39:39 2012
@@ -79,9 +79,9 @@ def check_hotcopy_fsfs(src, dst):
       # Compare all files in this directory
       for src_file in src_files:
         # Exclude temporary files
-        if src_file == 'rev-prop-atomicsShm':
+        if src_file == 'rev-prop-atomics.shm':
           continue
-        if src_file == 'rev-prop-atomicsMutex':
+        if src_file == 'rev-prop-atomics.mutex':
           continue
 
         src_path = os.path.join(src_dirpath, src_file)

Modified: subversion/branches/issue-4194-dev/subversion/tests/cmdline/svnrdump_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/issue-4194-dev/subversion/tests/cmdline/svnrdump_tests.py?rev=1411814&r1=1411813&r2=1411814&view=diff
==============================================================================
--- subversion/branches/issue-4194-dev/subversion/tests/cmdline/svnrdump_tests.py (original)
+++ subversion/branches/issue-4194-dev/subversion/tests/cmdline/svnrdump_tests.py Tue Nov 20 19:39:39 2012
@@ -197,7 +197,6 @@ def run_load_test(sbox, dumpfile_name, e
 ######################################################################
 # Tests
 
-@Skip(svntest.main.is_ra_type_dav_serf)
 def basic_dump(sbox):
   "dump: standard sbox repos"
   sbox.build(read_only = True, create_wc = False)
@@ -210,7 +209,6 @@ def basic_dump(sbox):
   if not out[0].startswith('SVN-fs-dump-format-version:'):
     raise svntest.Failure('No valid output')
 
-@Skip(svntest.main.is_ra_type_dav_serf)
 def revision_0_dump(sbox):
   "dump: revision zero"
   run_dump_test(sbox, "revision-0.dump")
@@ -229,7 +227,6 @@ def revision_0_load(sbox):
 #     docs/         (Added r6)
 #       README      (Added r6)
 
-@Skip(svntest.main.is_ra_type_dav_serf)
 def skeleton_dump(sbox):
   "dump: skeleton repository"
   run_dump_test(sbox, "skeleton.dump")
@@ -238,7 +235,6 @@ def skeleton_load(sbox):
   "load: skeleton repository"
   run_load_test(sbox, "skeleton.dump")
 
-@Skip(svntest.main.is_ra_type_dav_serf)
 def sparse_propchanges_dump(sbox):
   "dump: sparse file/dir propchanges"
   run_dump_test(sbox, "sparse-propchanges.dump")
@@ -248,7 +244,6 @@ def sparse_propchanges_load(sbox):
   "load: sparse file/dir propchanges"
   run_load_test(sbox, "sparse-propchanges.dump")
 
-@Skip(svntest.main.is_ra_type_dav_serf)
 def copy_and_modify_dump(sbox):
   "dump: copy and modify"
   run_dump_test(sbox, "copy-and-modify.dump")
@@ -257,7 +252,6 @@ def copy_and_modify_load(sbox):
   "load: copy and modify"
   run_load_test(sbox, "copy-and-modify.dump")
 
-@Skip(svntest.main.is_ra_type_dav_serf)
 def no_author_dump(sbox):
   "dump: copy revs with no svn:author revprops"
   run_dump_test(sbox, "no-author.dump")
@@ -266,7 +260,6 @@ def no_author_load(sbox):
   "load: copy revs with no svn:author revprops"
   run_load_test(sbox, "no-author.dump")
 
-@Skip(svntest.main.is_ra_type_dav_serf)
 def copy_from_previous_version_and_modify_dump(sbox):
   "dump: copy from previous version and modify"
   run_dump_test(sbox, "copy-from-previous-version-and-modify.dump")
@@ -275,7 +268,6 @@ def copy_from_previous_version_and_modif
   "load: copy from previous version and modify"
   run_load_test(sbox, "copy-from-previous-version-and-modify.dump")
 
-@Skip(svntest.main.is_ra_type_dav_serf)
 def modified_in_place_dump(sbox):
   "dump: modified in place"
   run_dump_test(sbox, "modified-in-place.dump")
@@ -284,7 +276,6 @@ def modified_in_place_load(sbox):
   "load: modified in place"
   run_load_test(sbox, "modified-in-place.dump")
 
-@Skip(svntest.main.is_ra_type_dav_serf)
 def move_and_modify_in_the_same_revision_dump(sbox):
   "dump: move parent & modify child file in same rev"
   run_dump_test(sbox, "move-and-modify.dump")
@@ -293,7 +284,6 @@ def move_and_modify_in_the_same_revision
   "load: move parent & modify child file in same rev"
   run_load_test(sbox, "move-and-modify.dump")
 
-@Skip(svntest.main.is_ra_type_dav_serf)
 def tag_empty_trunk_dump(sbox):
   "dump: tag empty trunk"
   run_dump_test(sbox, "tag-empty-trunk.dump")
@@ -302,7 +292,6 @@ def tag_empty_trunk_load(sbox):
   "load: tag empty trunk"
   run_load_test(sbox, "tag-empty-trunk.dump")
 
-@Skip(svntest.main.is_ra_type_dav_serf)
 def tag_trunk_with_file_dump(sbox):
   "dump: tag trunk containing a file"
   run_dump_test(sbox, "tag-trunk-with-file.dump")
@@ -311,7 +300,6 @@ def tag_trunk_with_file_load(sbox):
   "load: tag trunk containing a file"
   run_load_test(sbox, "tag-trunk-with-file.dump")
 
-@Skip(svntest.main.is_ra_type_dav_serf)
 def tag_trunk_with_file2_dump(sbox):
   "dump: tag trunk containing a file (#2)"
   run_dump_test(sbox, "tag-trunk-with-file2.dump")
@@ -320,7 +308,6 @@ def tag_trunk_with_file2_load(sbox):
   "load: tag trunk containing a file (#2)"
   run_load_test(sbox, "tag-trunk-with-file2.dump")
 
-@Skip(svntest.main.is_ra_type_dav_serf)
 def dir_prop_change_dump(sbox):
   "dump: directory property changes"
   run_dump_test(sbox, "dir-prop-change.dump")
@@ -329,7 +316,6 @@ def dir_prop_change_load(sbox):
   "load: directory property changes"
   run_load_test(sbox, "dir-prop-change.dump")
 
-@Skip(svntest.main.is_ra_type_dav_serf)
 def copy_parent_modify_prop_dump(sbox):
   "dump: copy parent and modify prop"
   run_dump_test(sbox, "copy-parent-modify-prop.dump")
@@ -338,7 +324,6 @@ def copy_parent_modify_prop_load(sbox):
   "load: copy parent and modify prop"
   run_load_test(sbox, "copy-parent-modify-prop.dump")
 
-@Skip(svntest.main.is_ra_type_dav_serf)
 def copy_revprops_dump(sbox):
   "dump: copy revprops other than svn:*"
   run_dump_test(sbox, "revprops.dump")
@@ -347,19 +332,16 @@ def copy_revprops_load(sbox):
   "load: copy revprops other than svn:*"
   run_load_test(sbox, "revprops.dump")
 
-@Skip(svntest.main.is_ra_type_dav_serf)
 def only_trunk_dump(sbox):
   "dump: subdirectory"
   run_dump_test(sbox, "trunk-only.dump", subdir="/trunk",
                 expected_dumpfile_name="trunk-only.expected.dump",)
 
-@Skip(svntest.main.is_ra_type_dav_serf)
 def only_trunk_A_with_changes_dump(sbox):
   "dump: subdirectory with changes on root"
   run_dump_test(sbox, "trunk-A-changes.dump", subdir="/trunk/A",
            expected_dumpfile_name="trunk-A-changes.expected.dump")
 
-@Skip(svntest.main.is_ra_type_dav_serf)
 def url_encoding_dump(sbox):
   "dump: url encoding issues"
   run_dump_test(sbox, "url-encoding-bug.dump")
@@ -368,21 +350,18 @@ def url_encoding_load(sbox):
   "load: url encoding issues"
   run_load_test(sbox, "url-encoding-bug.dump")
 
-@Skip(svntest.main.is_ra_type_dav_serf)
 def copy_bad_line_endings_dump(sbox):
   "dump: inconsistent line endings in svn:* props"
   run_dump_test(sbox, "copy-bad-line-endings.dump",
                 expected_dumpfile_name="copy-bad-line-endings.expected.dump",
                 bypass_prop_validation=True)
 
-@Skip(svntest.main.is_ra_type_dav_serf)
 def copy_bad_line_endings2_dump(sbox):
   "dump: non-LF line endings in svn:* props"
   run_dump_test(sbox, "copy-bad-line-endings2.dump",
                 expected_dumpfile_name="copy-bad-line-endings2.expected.dump",
                 bypass_prop_validation=True, ignore_base_checksums=True)
 
-@Skip(svntest.main.is_ra_type_dav_serf)
 def commit_a_copy_of_root_dump(sbox):
   "dump: commit a copy of root"
   run_dump_test(sbox, "repo-with-copy-of-root-dir.dump")
@@ -391,7 +370,6 @@ def commit_a_copy_of_root_load(sbox):
   "load: commit a copy of root"
   run_load_test(sbox, "repo-with-copy-of-root-dir.dump")
 
-@Skip(svntest.main.is_ra_type_dav_serf)
 def descend_into_replace_dump(sbox):
   "dump: descending into replaced dir looks in src"
   run_dump_test(sbox, "descend-into-replace.dump", subdir='/trunk/H',
@@ -402,7 +380,6 @@ def descend_into_replace_load(sbox):
   run_load_test(sbox, "descend-into-replace.dump")
 
 @Issue(3847)
-@Skip(svntest.main.is_ra_type_dav_serf)
 def add_multi_prop_dump(sbox):
   "dump: add with multiple props"
   run_dump_test(sbox, "add-multi-prop.dump")
@@ -417,7 +394,6 @@ def multi_prop_edit_load(sbox):
 # revs in svn:mergeinfo' but uses 'svnrdump load' in place of
 # 'svnadmin load'.
 @Issue(3890)
-@Skip(svntest.main.is_ra_type_dav_serf)
 def reflect_dropped_renumbered_revs(sbox):
   "svnrdump renumbers dropped revs in mergeinfo"
 
@@ -481,7 +457,6 @@ def reflect_dropped_renumbered_revs(sbox
 # from incremental dump' but uses 'svnrdump [dump|load]' in place of
 # 'svnadmin [dump|load]'.
 @Issue(3890)
-@Skip(svntest.main.is_ra_type_dav_serf)
 def dont_drop_valid_mergeinfo_during_incremental_svnrdump_loads(sbox):
   "don't drop mergeinfo revs in incremental svnrdump"
 

Modified: subversion/branches/issue-4194-dev/subversion/tests/cmdline/switch_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/issue-4194-dev/subversion/tests/cmdline/switch_tests.py?rev=1411814&r1=1411813&r2=1411814&view=diff
==============================================================================
--- subversion/branches/issue-4194-dev/subversion/tests/cmdline/switch_tests.py (original)
+++ subversion/branches/issue-4194-dev/subversion/tests/cmdline/switch_tests.py Tue Nov 20 19:39:39 2012
@@ -586,6 +586,11 @@ def file_dir_file(sbox):
   if not os.path.isdir(file_path):
     raise svntest.Failure
 
+  # The reason the following switch currently fails is that the node
+  # is determined to be a 'root', because it is switched against its parent.
+  # In this specific case the switch editor is designed to be rooted on the node
+  # itself instead of its ancestor. If you would use sbox.ospath('A') for
+  # file_path the switch works both ways.
   svntest.actions.run_and_verify_svn(None, None, [], 'switch',
                                      '--ignore-ancestry', file_url, file_path)
   if not os.path.isfile(file_path):
@@ -2219,8 +2224,9 @@ def switch_to_root(sbox):
 
 #----------------------------------------------------------------------
 # Make sure that switch continue after deleting locally modified
-# directories, as it update and merge do.
+# directories, as update and merge do.
 
+@Issue(2505)
 def tolerate_local_mods(sbox):
   "tolerate deletion of a directory with local mods"
 

Modified: subversion/branches/issue-4194-dev/subversion/tests/libsvn_client/client-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-4194-dev/subversion/tests/libsvn_client/client-test.c?rev=1411814&r1=1411813&r2=1411814&view=diff
==============================================================================
--- subversion/branches/issue-4194-dev/subversion/tests/libsvn_client/client-test.c (original)
+++ subversion/branches/issue-4194-dev/subversion/tests/libsvn_client/client-test.c Tue Nov 20 19:39:39 2012
@@ -721,111 +721,6 @@ test_youngest_common_ancestor(const svn_
   return SVN_NO_ERROR;
 }
 
-static svn_error_t *
-test_externals_parse(const svn_test_opts_t *opts, apr_pool_t *pool)
-{
-  int i;
-  struct external_info
-    {
-      const char *line;
-      const char *url;
-      const char *local_path;
-      svn_revnum_t peg_rev;
-      svn_revnum_t rev;
-      
-    } items[] = {
-        {
-            "dir http://server/svn/a",
-            "http://server/svn/a",
-            "dir"
-        },
-        {
-            "/svn/home dir",
-            "u://svr/svn/home",
-            "dir"
-        },
-        {
-            "//server/home dir",
-            "u://server/home",
-            "dir"
-        },
-        {
-            "../../../../home dir",
-            "u://svr/svn/home",
-            "dir",
-        },
-        {
-            "^/../repB/tools/scripts scripts",
-            "u://svr/svn/cur/repB/tools/scripts",
-            "scripts"
-        },
-        { 
-            "^/../repB/tools/README.txt scripts/README.txt",
-            "u://svr/svn/cur/repB/tools/README.txt",
-            "scripts/README.txt"
-        },
-    };
-  
-
-  for (i = 0; i < sizeof(items) / sizeof(items[0]); i++)
-    {
-      apr_array_header_t *results;
-      svn_wc_external_item2_t *external_item;
-      const char *resolved_url;
-      SVN_ERR(svn_wc_parse_externals_description3(&results, "/my/current/dir",
-                                                  items[i].line, FALSE, pool));
-
-      SVN_TEST_ASSERT(results && results->nelts == 1);
-
-      external_item = APR_ARRAY_IDX(results, 0, svn_wc_external_item2_t *);
-
-      SVN_ERR(svn_wc__resolve_relative_external_url(&resolved_url,
-                                                    external_item,
-                                                    "u://svr/svn/cur/dir",
-                                                    "u://svr/svn/cur/dir/sd/fl",
-                                                    pool, pool));
-
-      SVN_TEST_STRING_ASSERT(resolved_url, items[i].url);
-      SVN_TEST_STRING_ASSERT(external_item->target_dir, items[i].local_path);
-
-      if (items[i].peg_rev != 0)
-        SVN_TEST_ASSERT(external_item->peg_revision.value.number
-                                == items[i].peg_rev);
-      if (items[i].rev != 0)
-        SVN_TEST_ASSERT(external_item->revision.value.number == items[i].rev);
-      SVN_TEST_ASSERT(svn_uri_is_canonical(resolved_url, pool));
-    }
-
-
-  return SVN_NO_ERROR;
-
-}
-
-static svn_error_t *
-test_externals_parse_erratic(apr_pool_t *pool)
-{
-  svn_error_t *err;
-  apr_array_header_t *list = NULL;
-
-  err = svn_wc_parse_externals_description3(
-          &list, "parent_dir",
-          "^/valid/but/should/not/be/on/record wc_target\n"
-           "because_this_is_an_error",
-          FALSE, pool);
-
-  /* DESC above has an error, so expect one. */
-  SVN_TEST_ASSERT(err != NULL);
-  svn_error_clear(err);
-
-  /* svn_wc_parse_externals_description3() should not
-     touch LIST when DESC had an error.*/
-  SVN_TEST_ASSERT(list == NULL);
-
-  return SVN_NO_ERROR;
-}
-
-
-
 
 /* ========================================================================== */
 
@@ -843,7 +738,5 @@ struct svn_test_descriptor_t test_funcs[
     SVN_TEST_OPTS_PASS(test_16k_add, "test adding 16k files"),
 #endif
     SVN_TEST_OPTS_PASS(test_youngest_common_ancestor, "test youngest_common_ancestor"),
-    SVN_TEST_OPTS_PASS(test_externals_parse, "test svn_wc_parse_externals_description3"),
-    SVN_TEST_PASS2(test_externals_parse_erratic, "parse erratic externals definition"),
     SVN_TEST_NULL
   };

Modified: subversion/branches/issue-4194-dev/subversion/tests/libsvn_fs/fs-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-4194-dev/subversion/tests/libsvn_fs/fs-test.c?rev=1411814&r1=1411813&r2=1411814&view=diff
==============================================================================
--- subversion/branches/issue-4194-dev/subversion/tests/libsvn_fs/fs-test.c (original)
+++ subversion/branches/issue-4194-dev/subversion/tests/libsvn_fs/fs-test.c Tue Nov 20 19:39:39 2012
@@ -3533,7 +3533,8 @@ static int my_rand(apr_uint64_t scalar, 
 {
   static const apr_uint32_t TEST_RAND_MAX = 0xffffffffUL;
   /* Assumes TEST_RAND_MAX+1 can be exactly represented in a double */
-  return (int)(((double)svn_test_rand(seed)
+  apr_uint32_t rand = svn_test_rand(seed);
+  return (int)(((double)rand
                 / ((double)TEST_RAND_MAX+1.0))
                * (double)scalar);
 }
@@ -4895,6 +4896,26 @@ node_history(const svn_test_opts_t *opts
   return SVN_NO_ERROR;
 }
 
+/* Test svn_fs_delete_fs(). */
+static svn_error_t *
+delete_fs(const svn_test_opts_t *opts,
+             apr_pool_t *pool)
+{
+  svn_fs_t *fs;
+  const char *path;
+  svn_node_kind_t kind;
+
+  SVN_ERR(svn_test__create_fs(&fs, "test-delete-fs", opts, pool));
+  path = svn_fs_path(fs, pool);
+  SVN_ERR(svn_io_check_path(path, &kind, pool));
+  SVN_TEST_ASSERT(kind != svn_node_none);
+  SVN_ERR(svn_fs_delete_fs(path, pool));
+  SVN_ERR(svn_io_check_path(path, &kind, pool));
+  SVN_TEST_ASSERT(kind == svn_node_none);
+
+  return SVN_NO_ERROR;
+}
+
 
 
 /* ------------------------------------------------------------------------ */
@@ -4978,5 +4999,7 @@ struct svn_test_descriptor_t test_funcs[
                        "create and modify small file"),
     SVN_TEST_OPTS_PASS(node_history,
                        "test svn_fs_node_history"),
+    SVN_TEST_OPTS_PASS(delete_fs,
+                       "test svn_fs_delete_fs"),
     SVN_TEST_NULL
   };