You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2012/02/05 22:01:34 UTC

svn commit: r1240816 [1/3] - in /subversion/branches/revprop-packing: ./ notes/ subversion/bindings/javahl/ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/org/apache/subversion/javahl/ subversion/bindings/swig/python/libsvn_swig_py/ ...

Author: danielsh
Date: Sun Feb  5 21:01:32 2012
New Revision: 1240816

URL: http://svn.apache.org/viewvc?rev=1240816&view=rev
Log:
On the revprop-packing branch, sync from trunk.

Added:
    subversion/branches/revprop-packing/subversion/bindings/javahl/Manifest.in
      - copied unchanged from r1239863, subversion/trunk/subversion/bindings/javahl/Manifest.in
    subversion/branches/revprop-packing/tools/dev/gdb-py/
      - copied from r1239863, subversion/trunk/tools/dev/gdb-py/
    subversion/branches/revprop-packing/tools/dev/merge-graph.py
      - copied unchanged from r1239863, subversion/trunk/tools/dev/merge-graph.py
Modified:
    subversion/branches/revprop-packing/   (props changed)
    subversion/branches/revprop-packing/CHANGES
    subversion/branches/revprop-packing/Makefile.in
    subversion/branches/revprop-packing/notes/dump-load-format.txt
    subversion/branches/revprop-packing/subversion/bindings/javahl/   (props changed)
    subversion/branches/revprop-packing/subversion/bindings/javahl/native/SVNClient.cpp
    subversion/branches/revprop-packing/subversion/bindings/javahl/native/SVNClient.h
    subversion/branches/revprop-packing/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
    subversion/branches/revprop-packing/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
    subversion/branches/revprop-packing/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
    subversion/branches/revprop-packing/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
    subversion/branches/revprop-packing/subversion/bindings/swig/python/tests/mergeinfo.py
    subversion/branches/revprop-packing/subversion/include/private/svn_repos_private.h
    subversion/branches/revprop-packing/subversion/include/private/svn_subr_private.h
    subversion/branches/revprop-packing/subversion/include/svn_client.h
    subversion/branches/revprop-packing/subversion/include/svn_editor.h
    subversion/branches/revprop-packing/subversion/include/svn_io.h
    subversion/branches/revprop-packing/subversion/include/svn_mergeinfo.h
    subversion/branches/revprop-packing/subversion/include/svn_utf.h
    subversion/branches/revprop-packing/subversion/libsvn_client/cmdline.c
    subversion/branches/revprop-packing/subversion/libsvn_client/commit_util.c
    subversion/branches/revprop-packing/subversion/libsvn_client/copy.c
    subversion/branches/revprop-packing/subversion/libsvn_client/deprecated.c
    subversion/branches/revprop-packing/subversion/libsvn_client/diff.c
    subversion/branches/revprop-packing/subversion/libsvn_client/merge.c
    subversion/branches/revprop-packing/subversion/libsvn_client/patch.c
    subversion/branches/revprop-packing/subversion/libsvn_delta/compat.c
    subversion/branches/revprop-packing/subversion/libsvn_delta/editor.c
    subversion/branches/revprop-packing/subversion/libsvn_fs/fs-loader.h
    subversion/branches/revprop-packing/subversion/libsvn_ra_neon/session.c
    subversion/branches/revprop-packing/subversion/libsvn_ra_serf/property.c
    subversion/branches/revprop-packing/subversion/libsvn_ra_serf/ra_serf.h
    subversion/branches/revprop-packing/subversion/libsvn_ra_serf/serf.c
    subversion/branches/revprop-packing/subversion/libsvn_ra_serf/util.c
    subversion/branches/revprop-packing/subversion/libsvn_ra_svn/cyrus_auth.c
    subversion/branches/revprop-packing/subversion/libsvn_repos/commit.c
    subversion/branches/revprop-packing/subversion/libsvn_repos/load-fs-vtable.c
    subversion/branches/revprop-packing/subversion/libsvn_subr/cmdline.c
    subversion/branches/revprop-packing/subversion/libsvn_subr/config_file.c
    subversion/branches/revprop-packing/subversion/libsvn_subr/deprecated.c
    subversion/branches/revprop-packing/subversion/libsvn_subr/io.c
    subversion/branches/revprop-packing/subversion/libsvn_subr/spillbuf.c
    subversion/branches/revprop-packing/subversion/libsvn_subr/ssl_server_trust_providers.c
    subversion/branches/revprop-packing/subversion/libsvn_subr/stream.c
    subversion/branches/revprop-packing/subversion/libsvn_subr/utf.c
    subversion/branches/revprop-packing/subversion/libsvn_wc/diff_editor.c
    subversion/branches/revprop-packing/subversion/libsvn_wc/status.c
    subversion/branches/revprop-packing/subversion/libsvn_wc/update_editor.c
    subversion/branches/revprop-packing/subversion/libsvn_wc/util.c
    subversion/branches/revprop-packing/subversion/mod_dav_svn/liveprops.c
    subversion/branches/revprop-packing/subversion/mod_dav_svn/mod_dav_svn.c
    subversion/branches/revprop-packing/subversion/mod_dav_svn/reports/update.c
    subversion/branches/revprop-packing/subversion/mod_dav_svn/util.c
    subversion/branches/revprop-packing/subversion/svn/cl.h
    subversion/branches/revprop-packing/subversion/svn/diff-cmd.c
    subversion/branches/revprop-packing/subversion/svn/log-cmd.c
    subversion/branches/revprop-packing/subversion/svn/main.c
    subversion/branches/revprop-packing/subversion/svnrdump/dump_editor.c
    subversion/branches/revprop-packing/subversion/svnrdump/svnrdump.c
    subversion/branches/revprop-packing/subversion/svnrdump/svnrdump.h
    subversion/branches/revprop-packing/subversion/tests/cmdline/basic_tests.py
    subversion/branches/revprop-packing/subversion/tests/cmdline/commit_tests.py
    subversion/branches/revprop-packing/subversion/tests/cmdline/externals_tests.py
    subversion/branches/revprop-packing/subversion/tests/cmdline/log_tests.py
    subversion/branches/revprop-packing/subversion/tests/cmdline/log_tests_data/merge_history_repo.png
    subversion/branches/revprop-packing/subversion/tests/cmdline/merge_tests.py
    subversion/branches/revprop-packing/subversion/tests/cmdline/patch_tests.py
    subversion/branches/revprop-packing/subversion/tests/cmdline/special_tests.py
    subversion/branches/revprop-packing/subversion/tests/cmdline/stat_tests.py
    subversion/branches/revprop-packing/subversion/tests/cmdline/svntest/factory.py
    subversion/branches/revprop-packing/subversion/tests/libsvn_subr/spillbuf-test.c
    subversion/branches/revprop-packing/tools/client-side/svnmucc/svnmucc.c
    subversion/branches/revprop-packing/tools/dev/gdb-py/svndbg/   (props changed)
    subversion/branches/revprop-packing/tools/dist/backport.pl

Propchange: subversion/branches/revprop-packing/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb  5 21:01:32 2012
@@ -56,4 +56,4 @@
 /subversion/branches/tree-conflicts:868291-873154
 /subversion/branches/tree-conflicts-notify:873926-874008
 /subversion/branches/uris-as-urls:1060426-1064427
-/subversion/trunk:1143817-1231296
+/subversion/trunk:1143817-1239863

Modified: subversion/branches/revprop-packing/CHANGES
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/CHANGES?rev=1240816&r1=1240815&r2=1240816&view=diff
==============================================================================
--- subversion/branches/revprop-packing/CHANGES (original)
+++ subversion/branches/revprop-packing/CHANGES Sun Feb  5 21:01:32 2012
@@ -16,6 +16,9 @@ http://svn.apache.org/repos/asf/subversi
     * reject some attempts to merge between unrelated branches (r1215273)
     * support GPG agent for password storage on UNIX-like platforms (r1150783)
     * new 'svnadmin lock' / 'svnadmin unlock' subcommands (issue #3942, #4092)
+    * new SVNUseUTF8 configuration option for mod_dav_svn (issue #2487)
+    * new --ignore-properties option for 'svn diff' (r1239553. -617)
+    * new --patch-compatible option for 'svn diff' (r1239561)
 
   - Client-side bugfixes:
     *
@@ -37,6 +40,30 @@ http://svn.apache.org/repos/asf/subversi
     *
 
 
+Version 1.7.3
+(XX XXX 2012, from /branches/1.7.x)
+http://svn.apache.org/repos/asf/subversion/tags/1.7.3
+
+  User-visible changes:
+    * fix segfault on 'svn rm $ROOT_URL' (issue #4074)
+    * replace a couple of assertions in favor of errors (r1207858, -949)
+    * fix a server assert after being upgraded (r1210195)
+    * fix segfault on 'svn mkdir svn://localhost' (r1211483)
+    * make 'svnadmin recover' prune the rep cache (r1213331, et al)
+    * make svnmucc use values from --config-dir option
+    * update and clarify the merge help text (r1154121, et al)
+    * replace wc assertion with informative error (r1222521, -693)
+    * copy permissions correctly for FSFS dirs (r1229252)
+    * improve 'svn log --with-all-revprops' over ra-dav (issue #4082)
+    * fix segfault when remapping a file external (issue #4093)
+    * fix segfault caused by obstructing unversioned dir (r1229677)
+    * fix regression on first update of external dir with '-r' (issue #4053) 
+
+  Developer-visible changes:
+    * JavaHL: Add missing notify action, fixing an exception (r1221793)
+    * fix spurious test suite failure (r1220742, -50)
+
+
 Version 1.7.2
 (02 Dec 2011, from /branches/1.7.x)
 http://svn.apache.org/repos/asf/subversion/tags/1.7.2

Modified: subversion/branches/revprop-packing/Makefile.in
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/Makefile.in?rev=1240816&r1=1240815&r2=1240816&view=diff
==============================================================================
--- subversion/branches/revprop-packing/Makefile.in (original)
+++ subversion/branches/revprop-packing/Makefile.in Sun Feb  5 21:01:32 2012
@@ -297,8 +297,11 @@ SWIG_RB_SRC_DIR = $(abs_srcdir)/subversi
 
 ### Automate JAR creation using Makefile generator's javahl-java.jar
 ### property.  Enhance generator to support JAR installation.
+JAVAHL_MANIFEST_IN = $(abs_srcdir)/subversion/bindings/javahl/Manifest.in
+JAVAHL_MANIFEST = subversion/bindings/javahl/Manifest
 INSTALL_EXTRA_JAVAHL_JAVA=\
-	$(JAR) cf $(JAVAHL_JAR) -C subversion/bindings/javahl/classes org; \
+	sed s/%bundleVersion/$(PACKAGE_VERSION)/ $(JAVAHL_MANIFEST_IN) > $(JAVAHL_MANIFEST); \
+	$(JAR) cfm $(JAVAHL_JAR) $(JAVAHL_MANIFEST) -C subversion/bindings/javahl/classes org; \
 	$(INSTALL_DATA) $(JAVAHL_JAR) $(DESTDIR)$(javahl_javadir);
 
 INSTALL_EXTRA_JAVAHL_LIB=@INSTALL_EXTRA_JAVAHL_LIB@

Modified: subversion/branches/revprop-packing/notes/dump-load-format.txt
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/notes/dump-load-format.txt?rev=1240816&r1=1240815&r2=1240816&view=diff
==============================================================================
--- subversion/branches/revprop-packing/notes/dump-load-format.txt (original)
+++ subversion/branches/revprop-packing/notes/dump-load-format.txt Sun Feb  5 21:01:32 2012
@@ -1,139 +1,375 @@
-This file describes the format produced by 'svnadmin dump' and
-consumed by 'svnadmin load'.  
+= How to interpret Subversion dumpfiles =
 
-The format has undergone revisions over time.  They are presented in
-reverse chronological order here.  You may wish to start with the
-VERSION 1 description in order to get a baseline understanding first.
+Version 1.0, 2012-01-18
 
-===== SVN DUMPFILE VERSION 3 FORMAT =====
+== Introduction ==
 
-(generated by SVN versions 1.1.0-present, if requested by the user)
+The Subversion dumpfile format is a serialized description of the
+actions required to (re)build a version history. from scratch.
 
-This format is equivalent to the VERSION 2 format except for the
-following:
+The goal of this document is that it be sufficient for people writing
+dumpfile interpreters to emulate the actions the dumpfile describes on
+a versioned filesystem-like store, such as another version-control
+system.  It derives from and incorporates some incomplete notes from 
+before r39883.
 
-1.) The format starts with the new version number of the dump format
-    ("SVN-fs-dump-format-version: 3\n").
+1. In interpreting a Node record which has both a copyfrom source and
+a property section, it is possible that the copy source node itself
+has a property section.  How are they to be combined?
 
-2.) There are several new optional headers for node changes:
+Also note that the section on the semantics of kinds of operations 
+documents a minor bug at r39883 in the behavior of "add", which 
+should be fixed.
 
-[Text-delta: true|false]
-[Prop-delta: true|false]
-[Text-delta-base-md5: blob]
-[Text-delta-base-sha1: blob]
-[Text-copy-source-sha1: blob]
-[Text-content-sha1: blob]
+== Syntax ==
 
-    The default value for the boolean headers is "false".  If the value is
-    set to "true", then the text and property contents will be treated
-    as deltas against the previous contents of the node (as determined
-    by copy history for adds with history, or by the value in the
-    previous revision for changes--just as with commits).
+=== Encoding and delimiters ===
 
-Property deltas have the same format as regular property lists except
-that (1) properties with the same value as in the previous contents of
-the node are not printed, and (2) deleted properties will be written
-out as
+Subversion dumpfiles are plain byte streams. The structural parts are
+ASCII.  Text sections and property key/value pairs may be interpreted
+as binary data in any encoding by client tools.
 
-D <name length>
-<name>
+A dumpfile consists of four kinds of records.  A record is a group of
+RFC822-style header lines (each consisting of a key, followed by a
+colon, followed by text data to end of line), followed by an empty
+spacer line, followed optionally by a body section.  If the body
+section is present, another empty spacer line separates it from the
+following record.
 
-just as a regular property is printed, but with the "K " changed to a
-"D " and with no value part.
+For forward compatibility, unrecognized headers are ignored.
 
-Text deltas are written out as a series of svndiff0 windows.  If
-Text-delta-base-md5 is provided, it is the checksum of the base to
-which the text delta is applied; note that older versions (pre-1.5) of
-'svnadmin load' may ignore the checksum.
+=== Record types ===
 
-Text-delta-base-sha1, Text-copy-source-sha1, and Text-content-sha1 are not
-currently used by the loader.  They are written by 1.6-and-later versions of
-Subversion so that future loaders can optionally choose which checksum to
-use for checking for corruption.
+Dumpfiles include four record types.  Two, the version stamp and UUID
+record, consist of single header lines. The bulk of a dumpfile
+consists of Revision and Node records.
+
+A version stamp record is always the first line of the file and
+looks like this:
+
+-------------------------------------------------------------------
+SVN-fs-dump-format-version: <N>\n
+-------------------------------------------------------------------
+
+where <N> is replaced by the dump format version. Except where 
+specified, the descriptions in this document aapply to all
+versions of the format.
+
+Versions 2 and later may have a UUID record following the version
+stamp. It is of the form 
 
-===== SVN DUMPFILE VERSION 2 FORMAT =====
+-------------------------------------------------------------------
+UUID: <hex-string>
+-------------------------------------------------------------------
 
-(generated by SVN versions 0.18.0-present, by default)
+where the <hex-string> is the UUID of the originating repository.
+An example UUID is "7bf7a5ef-cabf-0310-b7d4-93df341afa7e".
 
-This format is equivalent to the VERSION 1 format in every respect,
-except for the following:
+A Revision record has three headers and is always followed by a
+property section.  Expect the following form and sequence:
+
+-------------------------------------------------------------------
+Revision-number: <N>
+Prop-content-length: <P>
+Content-length: <L>
+!
+-------------------------------------------------------------------
+
+with the Revision-number header always first and the '!' indicating
+a mandatory empty spacer line.  <P> gives the length in bytes of the
+following property section. <L> gives the body length of the entire
+Revision record.  These two numbers will be *identical* for a Revision
+record; the Content-length header is added for the benefit of software
+that can parse RFC-822 messages.
+
+A revision record is followed by one or more Node records (see below).
+
+=== Property sections ==
+
+A Revision record *must* have a property section, and a Node record *may*
+have a property section. Every record with a property section has 
+a Prop-content-length header.
+
+A property section consists of pairs of key and value records and
+is ended by a fixed trailer.  Here is an example attached to a
+Revision record:
+
+-------------------------------------------------------------------
+Revision-number: 1422
+Prop-content-length: 80
+Content-length: 80
+
+K 6
+author
+V 7
+sussman
+K 3
+log
+V 33
+Added two files, changed a third.
+PROPS-END
+-------------------------------------------------------------------
+
+The fixed trailer is "PROPS-END\n" and its length is included in the
+Prop-content-length. Before it, each K and V record consists of a
+header line giving the length of the key or value content in bytes.  
+The content follows.  The content is itself always followed by \n.
+
+In version 3 of the format, a third type 'D' of property record is
+introduced to describe property deletion. This feature will be
+described later, in the specification of delta dumps.
+
+=== Node records ===
+
+Each Revision record is followed by one or more Node records.
+Node records have the following sequence of header lines:
+
+-------------------------------------------------------------------
+Node-path: <path/to/node/in/filesystem>
+[Node-kind: {file | dir}]
+Node-action: {change | add | delete | replace}
+[Node-copyfrom-rev: <rev>]
+[Node-copyfrom-path: <path> ]
+[Text-copy-source-md5: <blob>]
+[Text-content-md5: <blob>]
+[Text-content-length: <T>]
+[Prop-content-length: <P>]
+[Content-length: Y]
+!
+-------------------------------------------------------------------
+
+Bracketing in [] indicates optional lines; { | } is an alternation group.
+
+Dump decoders should be prepared for the optional lines after
+Node-action to be in any order, except that Content-length is 
+always last if it present.
+
+A Node record describes an action on a path relative to the repository
+root, and always begins with the Node-path specification.
+
+The Node-kind line indicates whether the path is a file or directory.
+The header value will be one of the strings "file" or "dir". 
+This header may be (and usually is) absent if the node action is a delete.  
+
+The Node-action line is always present and specifies the type of
+operation for this node.  The header value is one of the strings
+"change", "add", "delete", or "replace".  These operations will be
+described in detail later in this document.
+
+Either both the Node-copyfrom-rev and Node-copyfrom-path lines will be
+present, or neither will be.  They pair to describe a copy source for
+the node. Copy-source semantics will be described in detail later in
+this document.
+
+The Text-content-md5 and Text-copy-source-md5 lines are hash integrity
+checks and will be present only if Text-content-length and the copfyrom
+pair (respectively) are also present. A decoder may use them to verify
+that the source content they refer to has not been corrupted.
+
+Text-content-length will be present only when there is a text section.
+Zero is a legal value for this length, indicating an empty file.
+
+Prop-content-length will be present only when there is a properties section.
+
+Content-length will be present if there is either a text or a
+properties section.  This is not always the case.  In particular, 
+a delete operation cannot have either.  Some other operations that use
+copyfrom sources may also not have either.
+
+Again, the '!' stands in for a mandatory empty line following the
+RFC822-style headers. A body may follow
+
+== Semantics ==
+
+=== The kinds of things ===
+
+There are four kinds of things described by a dumpfile: paths,
+properties, content, and flows.  The distinctions among content,
+paths, and flows matter for understanding some operations.
+
+A path is a filesystem location (a file or directory).  There are two
+kinds of paths in a dumpfile; node paths and copy sources.
+
+Properties are key-value pairs associated with revisions or paths.
+Subversion interprets and reserves some properties, those beginning
+with "svn:". Others are not interpreted by Subversion; they may 
+may be set and read for the convenience of other applications, such
+as repository browsers or translators.
+
+A flow is a sequence of actions on a file or directory path that is
+considered to be a single history for change-tracking purposes.
+Creating a flow tells Subversion that you want to track the history of
+the path or paths it contains. Destroying a flow breaks the chain of
+history; changes will not be tracked across the break, even if another
+flow is created at the same path.  A copy operation creates a new
+flow connected to the flow from which it was copied.
+
+Content is what file paths point at (one timewise slice of a flow). It
+is the payload of program source code, documents, images, and so forth
+that a version control system actually manages.
+
+A Node record describes a change in properties, the addition or deletion
+of a flow, or a change in content.  It nust do at least one of these things,
+otherwise it would be a no-op and omitted.
+
+When no copyfrom is present, and the action isn't an add or copy, then
+the kind of the thing identified by (PATH, REVISION) must agree with
+the kind of the thing identified by (PATH, -1+REVISION).
+
+Terminological node: in Subversion-speak, the term "node" is
+historically ambiguous.  Sometimes it refers to what this document
+calls a "flow", and sometimes it refers to the internal per-revision
+structure that a Node record represents (that is, just one action in a
+flow).  For clarity, most of this document avoids the term "node" in
+favor of the more specific "flow" and "Node record", but knowing 
+about this issue will help if you read the Ancient History section.
+
+=== The kinds of operations ===
+
+.File operations
+|======================================================================
+|                           |   add    | delete | replace  |  change  |
+|Can have text section?     | optional |   no   | optional | optional |
+|Can have property section? | optional |   no   | optional | optional |
+|Can have copy source?      | optional |   no   | optional |    no    |
+|Fails on existent path     |   yes*   |   no   |    no    |    no    |   
+|Fails on non-existent path |    no    |  yes   |   yes    |   yes    |   
+|======================================================================
+
+* As of December 2011 there is a minor bug: Adding a file with history
+twice _in two different revisions_ succeeds silently.
+
+.Directory operations
+|======================================================================
+|                           |   add    | delete | replace  |  change  |
+|Can have text section?     |    no    |   no   |    no    |    no    |
+|Can have property section? | optional |   no   | optional | required |
+|Can have copy source?      | optional |   no   | optional |    no    |
+|Fails on existent path     |   yes    |   no   |    no    |    no    |   
+|Fails on non-existent path |    no    |  yes   |   yes    |   yes    |   
+|======================================================================
+
+A Node record represents an operation that does one of four things: add,
+delete, change, or replace.
+
+Node records can carry content in one (or both!) of two ways: from a text
+section or from a copy source (that is, a copy-path and copy-revision
+pair).
+
+Giving a copy source appends the node to the flow of which that source
+is part; when you 'add' or 'replace' with a copy source, the content
+at the path becomes a copy of the source (but see below for a
+qualification about directories).
+
+Giving a text section also changes the content of the flow. In the
+(unusual) case that a node has both a copy source and a text section,
+the correct semantics is to attach the path to the source flow and
+then change the content.
+
+An add operation creates a new flow for a file or directory. See the
+table above for possible operand combinations.
+
+A delete operation deletes a flow and its content. If the path is a
+file, the file is deleted.  If the path is a directory, the directory
+and all its children are deleted. A subsequent add at the same path
+will create a new and different flow with its own history.
+
+A change operation changes properties on a file or directory path. See the
+table above for possible operand combinations.
+
+A replace operation behaves exactly like a delete followed by an add
+(destroying an old flow, producing a new one) when it has no copy
+source. When a replace has a copy source, it produces a new flow
+with history extending back through the copy source. A Node record
+representing a replace operation may have a property section.
+
+The main reason "replace" exists is because it helps sequential
+processors of the dump stream avoid possibly notifying about multiple
+actions on the same path.
+
+It is even possible to have a replace with a copyfrom source *and*
+text, such as would result from this on the client side:
+ 
+-------------------------------------------------------------------
+$ svn rm dir/file.txt
+$ svn cp otherdir/otherfile.txt dir/file.txt
+$ 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
+deleted or replaced.
+
+=== Some details about copyfroms ===
+
+The source and target of a copyfrom are always of like kind; that is,
+Subversion dump will never generate a node with a source type of file
+and a target type of directory or vice-versa.
+
+Interpreting copyfrom_path for file copies is straightforward; the
+target pathname gets the contents of the source pathname.
+
+Directory copies (the primitive beneath branching and tagging) are
+tricky.  For each source path under the source directory, a new path
+is generated by removing the head segment of the pathname that is
+the source directory.  That new path under the target directory gets
+the content of the source path.
+
+After this operation:
+
+-------------------------------------------------------------------
+Node-path: x/y/z
+Node-kind: dir
+Node-action: add
+Node-copyfrom-rev: 10
+Node-copyfrom-path: a/b/c
+-------------------------------------------------------------------
 
-1.) The format starts with the new version number of the dump format
-    ("SVN-fs-dump-format-version: 2\n").
-
-2.) In addition to "Revision Records", another sort of record is supported:
-    the "UUID" record, which should be of the form:
-
-UUID: 7bf7a5ef-cabf-0310-b7d4-93df341afa7e
-
-    This should be used to indicate the UUID of the originating repository.
-
-===== SVN DUMPFILE VERSION 1 FORMAT =====
-
-(generated by SVN versions prior to 0.18.0)
-
-The binary format starts with the version number of the dump format
-("SVN-fs-dump-format-version: 1\n"), followed by a series of revision
-records.  Each revision record starts with information about the
-revision, followed by a variable number of node changes for that
-revision.  Fields in [braces] are optional, and unknown headers are
-always ignored, for backwards compatibility.
-
-Revision-number: N
-Prop-content-length: P
-Content-length: L
-
-   ...P bytes of property data.  Properties are stored in the same
-   human-readable hashdump format used by working copy property files,
-   except that they end with "PROPS-END\n" for better readability.
-
-Node-path: absolute/path/to/node/in/filesystem
-Node-kind: file | dir  (1)
-Node-action: change | add | delete | replace
-[Node-copyfrom-rev: X]
-[Node-copyfrom-path: path ]
-[Text-copy-source-md5: blob] (2)
-[Text-content-md5: blob]
-[Text-content-length: T]
-[Prop-content-length: P]
-Content-length: Y (3)
-
-   ... Y bytes of content data, divided into P bytes of "property"
-   data and T bytes of "text" data.  The properties come first; their
-   total length (including formatting) is Prop-content-length, and is
-   included in Node-content-length.  The "PROPS-END\n" line always
-   terminates the property section if there are props.  The remainder
-   of the Y bytes (expected to be equivalent to Text-content-length)
-   represent the contents of the node.
-
-
-Notes:
-
-   (1) if the node represents a deletion, this field is optional.
-   
-   (2) this is a checksum of the source of the copy.  a loader process
-       can use this checksum to determine that the copyfrom path/rev
-       already present in a filesystem is really the *correct* one to
-       use.
-   
-   (3) the Content-length header is technically unnecessary, since the
-       information it holds (and more) can be found in the
-       Prop-content-length and Text-content-length fields.  Though
-       Subversion itself does not make use of the header when reading
-       a dumpfile, we include it for compatibility with generic RFC822
-       parsers.
-   
-   (4) There are actually 2 types of version 1 dump streams. The
-       regular ones are generated since r2634 (svn 0.14.0). Older ones
-       also claim to be version 1, but miss the Props-content-length
-       and Text-content-length fields in the block header. In those
-       days there *always* was a properties block.
-   
-EXAMPLE:
+the file a/b/c/d will have been be copied to x/y/z/d.
 
-Here's an example of revision 1422, whereby I added a new directory
+A single revision may include multiple copyfrom Node records, even multiple
+copyfroms to the same directory, even mixed directory and file copies
+to the same directory. 
+
+=== Properties and persistence ===
+
+The properties section of a Revision record consists of some subset
+of the three reserved per-commit properties: svn:author, svn:date,
+and svn.log. These properties do not persist to later revisions.
+
+The key thing to know about Node properties is that they are 
+persistent, once set, until modified by a future property 
+section on the same path.
+
+Normally, a dumpfile re-lists the entire property set for a directory
+or file in every Node record that changes any part of it. (But see
+the material on delta dumps for an exception.)
+
+This implies that to delete a given property from a path, a dumpfile
+generator will issue a Node record with all other properties listed in it;
+to delete all properties from a path, the dumpfile generator will
+simply issue a node with an empty properties section. Note that this
+is different from an *absent* properties section, which will change
+no properties and will be associated with a change to content!
+
+=== Implementation pragmatics ===
+
+Because directory operations with copyfroms don't specify all the file
+paths they modify, an interpreter for this format must build a map of
+the paths in the file store it is manipulating, and update that map as
+it processes each Node record.
+
+On a repository with thousands of commits, the per-revision list of
+maps can become quite large. For space economy, the file map for each 
+revision can be discarded after it is processed *unless it is a source
+revision for a copyfrom*. 
+
+== An example ==
+
+Here's an example of revision 1422, which added a new directory
 "baz", added a new file "bop" inside it, and modified the file "foo.c":
 
+-------------------------------------------------------------------
 Revision-number: 1422
 Prop-content-length: 80
 Content-length: 80
@@ -188,8 +424,79 @@ Content-length: 102
 
 Here is the fulltext of my change to an existing /bar/foo.c.
 Notice that this file has no properties.
+-------------------------------------------------------------------
+
+== Format variants ==
+
+=== Version 3 format ===
+
+Version 3 format is a delta dump; text changes are represented 
+as diffs against the original file, and properties as incremental
+changes to a persistent set (that is, a property section does not
+necessarily implcitly clear the property set on a path before the
+new property settings are evaluated).
+
+This change is a space optimization. It requires additional 
+computing time to integrate the diff history.
+
+Version 3 is generated by SVN versions 1.1.0-present, if requested by the user.
+
+This format is equivalent to the VERSION 2 format except for the
+following:
+
+1. The format starts with the new version number of the dump format
+   ("SVN-fs-dump-format-version: 3\n").
+
+2. There are several new optional headers for Node records:
+
+-------------------------------------------------------------------
+[Text-delta: true|false]
+[Prop-delta: true|false]
+[Text-delta-base-md5: blob]
+[Text-delta-base-sha1: blob]
+[Text-copy-source-sha1: blob]
+[Text-content-sha1: blob]
+-------------------------------------------------------------------
 
--*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*-
+The default value for the boolean headers is "false".  If the value is
+set to "true", then the text and property contents will be treated
+as deltas against the previous contents of the flow (as determined
+by copy history for adds with history, or by the value in the
+previous revision for changes--just as with commits).
+
+Property deltas have the same format as regular property lists except
+that (1) properties with the same value as in the previous contents of
+the flow are not printed, and (2) deleted properties will be written
+out as
+
+D <name length>
+<name>
+
+just as a regular property is printed, but with the "K " changed to a
+"D " and with no value part.
+
+Text deltas are written out as a series of svndiff0 windows.  If
+Text-delta-base-md5 is provided, it is the checksum of the base to
+which the text delta is applied; note that older versions (pre-1.5) of
+'svnadmin load' may ignore the checksum.
+
+Text-delta-base-sha1, Text-copy-source-sha1, and Text-content-sha1 are not
+currently used by the loader.  They are written by 1.6-and-later versions of
+Subversion so that future loaders can optionally choose which checksum to
+use for checking for corruption.
+
+=== Archaic version 1 format ===
+
+There are actually two types of version 1 dump streams. The regular ones
+are generated since r2634 (svn 0.14.0). Older ones also claim to be
+version 1, but miss the Props-content-length and Text-content-length
+fields in the block header. In those days there *always* was a
+properties block.
+
+This note is included for historical completeness only, at is it highly
+unlikely that any Subversion instances that old remain in production.
+
+== Ancient history ==
 
 Old discussion: 
 
@@ -197,8 +504,7 @@ Old discussion: 
 
 A proposal for an svn filesystem dump/restore format.
 
-Two problems we want to solve
-=============================
+=== Two problems we want to solve ===
 
  1.  When we change our node-id schema, we need to migrate all of our
      data (by dumping and restoring).
@@ -207,8 +513,7 @@ Two problems we want to solve
      someday.
 
 
-Design Goals
-============
+=== Design Goals ===
 
  A.  Written as two new public functions in svn_fs.h.  To be invoked
      by new 'svnadmin' subcommands.
@@ -221,9 +526,7 @@ Design Goals
      backend.  In other words, we're talking about the basic ideas in
      our original "design spec" from May 2000.
 
-
-Format Semantics
-================
+=== Format Semantics ===
 
 Here are the timeless semantics of our fs design -- the things that
 would be stored in our dump format.
@@ -248,10 +551,9 @@ would be stored in our dump format.
     The history values can be non-existent (meaning the node is
     completely new), or can have a value of {revision, path}.
 
+=== Refinement of proposal #2: ===
 
-------------------------------------------------------------------------
-Refinement of proposal #2:  (after discussion with gstein)
-=========================
+(after discussion with gstein)
 
 Each node starts with RFC822-style headers at the top.  The final
 header is a 'Content-length:', followed by the content, so record
@@ -261,3 +563,5 @@ The content section has two implicit par
 fulltext.  The division between these two sections is implied by the
 "PROPS-END\n" tag at the end of the prophash.  In the case of a
 directory node or a revision, only the prophash is present.
+
+//End of document.

Propchange: subversion/branches/revprop-packing/subversion/bindings/javahl/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sun Feb  5 21:01:32 2012
@@ -3,3 +3,4 @@ classes
 include
 svn-javahl.jar
 test-work
+Manifest

Modified: subversion/branches/revprop-packing/subversion/bindings/javahl/native/SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/bindings/javahl/native/SVNClient.cpp?rev=1240816&r1=1240815&r2=1240816&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/bindings/javahl/native/SVNClient.cpp (original)
+++ subversion/branches/revprop-packing/subversion/bindings/javahl/native/SVNClient.cpp Sun Feb  5 21:01:32 2012
@@ -829,10 +829,11 @@ jbyteArray SVNClient::propertyGet(const 
         return NULL;
 
     apr_hash_t *props;
-    SVN_JNI_ERR(svn_client_propget3(&props, name,
+    SVN_JNI_ERR(svn_client_propget4(&props, name,
                                     intPath.c_str(), pegRevision.revision(),
                                     revision.revision(), NULL, svn_depth_empty,
-                                    NULL, ctx, subPool.getPool()),
+                                    NULL, ctx, subPool.getPool(),
+                                    subPool.getPool()),
                 NULL);
 
     apr_hash_index_t *hi;
@@ -935,7 +936,7 @@ void SVNClient::diff(const char *target1
                      OutputStream &outputStream, svn_depth_t depth,
                      StringArray &changelists,
                      bool ignoreAncestry, bool noDiffDelete, bool force,
-                     bool showCopiesAsAdds)
+                     bool showCopiesAsAdds, bool ignoreProps)
 {
     SVN::Pool subPool(pool);
     const char *c_relToDir = relativeToDir ?
@@ -971,7 +972,8 @@ void SVNClient::diff(const char *target1
                                    noDiffDelete,
                                    showCopiesAsAdds,
                                    force,
-                                   FALSE,
+                                   ignoreProps,
+                                   FALSE, /* use_git_diff_format */
                                    SVN_APR_LOCALE_CHARSET,
                                    outputStream.getStream(subPool),
                                    NULL /* error file */,
@@ -997,7 +999,8 @@ void SVNClient::diff(const char *target1
                                noDiffDelete,
                                showCopiesAsAdds,
                                force,
-                               FALSE,
+                               ignoreProps,
+                               FALSE, /* use_git_diff_format */
                                SVN_APR_LOCALE_CHARSET,
                                outputStream.getStream(subPool),
                                NULL /* error stream */,
@@ -1013,11 +1016,11 @@ void SVNClient::diff(const char *target1
                      const char *relativeToDir, OutputStream &outputStream,
                      svn_depth_t depth, StringArray &changelists,
                      bool ignoreAncestry, bool noDiffDelete, bool force,
-                     bool showCopiesAsAdds)
+                     bool showCopiesAsAdds, bool ignoreProps)
 {
     diff(target1, revision1, target2, revision2, NULL, relativeToDir,
          outputStream, depth, changelists, ignoreAncestry, noDiffDelete, force,
-         showCopiesAsAdds);
+         showCopiesAsAdds, ignoreProps);
 }
 
 void SVNClient::diff(const char *target, Revision &pegRevision,
@@ -1025,11 +1028,12 @@ void SVNClient::diff(const char *target,
                      const char *relativeToDir, OutputStream &outputStream,
                      svn_depth_t depth, StringArray &changelists,
                      bool ignoreAncestry, bool noDiffDelete, bool force,
-                     bool showCopiesAsAdds)
+                     bool showCopiesAsAdds, bool ignoreProps)
 {
     diff(target, startRevision, NULL, endRevision, &pegRevision,
          relativeToDir, outputStream, depth, changelists,
-         ignoreAncestry, noDiffDelete, force, showCopiesAsAdds);
+         ignoreAncestry, noDiffDelete, force, showCopiesAsAdds,
+         ignoreProps);
 }
 
 void

Modified: subversion/branches/revprop-packing/subversion/bindings/javahl/native/SVNClient.h
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/bindings/javahl/native/SVNClient.h?rev=1240816&r1=1240815&r2=1240816&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/bindings/javahl/native/SVNClient.h (original)
+++ subversion/branches/revprop-packing/subversion/bindings/javahl/native/SVNClient.h Sun Feb  5 21:01:32 2012
@@ -177,13 +177,13 @@ class SVNClient :public SVNBase
             const char *relativeToDir, OutputStream &outputStream,
             svn_depth_t depth, StringArray &changelists,
             bool ignoreAncestry, bool noDiffDelete, bool force,
-            bool showCopiesAsAdds);
+            bool showCopiesAsAdds, bool ignoreProps);
   void diff(const char *target, Revision &pegevision,
             Revision &startRevision, Revision &endRevision,
             const char *relativeToDir, OutputStream &outputStream,
             svn_depth_t depth, StringArray &changelists,
             bool ignoreAncestry, bool noDiffDelete, bool force,
-            bool showCopiesAsAdds);
+            bool showCopiesAsAdds, bool ignoreProps);
   void diffSummarize(const char *target1, Revision &revision1,
                      const char *target2, Revision &revision2,
                      svn_depth_t depth, StringArray &changelists,
@@ -212,7 +212,7 @@ class SVNClient :public SVNBase
             OutputStream &outputStream, svn_depth_t depth,
             StringArray &changelists,
             bool ignoreAncestry, bool noDiffDelete, bool force,
-            bool showCopiesAsAdds);
+            bool showCopiesAsAdds, bool ignoreProps);
 
   Path m_lastPath;
   ClientContext context;

Modified: subversion/branches/revprop-packing/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp?rev=1240816&r1=1240815&r2=1240816&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp (original)
+++ subversion/branches/revprop-packing/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp Sun Feb  5 21:01:32 2012
@@ -1171,12 +1171,12 @@ JNIEXPORT void JNICALL Java_org_apache_s
 }
 
 JNIEXPORT void JNICALL
-Java_org_apache_subversion_javahl_SVNClient_diff__Ljava_lang_String_2Lorg_apache_subversion_javahl_types_Revision_2Ljava_lang_String_2Lorg_apache_subversion_javahl_types_Revision_2Ljava_lang_String_2Ljava_io_OutputStream_2Lorg_apache_subversion_javahl_types_Depth_2Ljava_util_Collection_2ZZZZ
+Java_org_apache_subversion_javahl_SVNClient_diff__Ljava_lang_String_2Lorg_apache_subversion_javahl_types_Revision_2Ljava_lang_String_2Lorg_apache_subversion_javahl_types_Revision_2Ljava_lang_String_2Ljava_io_OutputStream_2Lorg_apache_subversion_javahl_types_Depth_2Ljava_util_Collection_2ZZZZZ
 (JNIEnv *env, jobject jthis, jstring jtarget1, jobject jrevision1,
  jstring jtarget2, jobject jrevision2, jstring jrelativeToDir,
  jobject jstream, jobject jdepth, jobject jchangelists,
  jboolean jignoreAncestry, jboolean jnoDiffDeleted, jboolean jforce,
- jboolean jcopiesAsAdds)
+ jboolean jcopiesAsAdds, jboolean jignoreProps)
 {
   JNIEntry(SVNClient, diff);
   SVNClient *cl = SVNClient::getCppObject(jthis);
@@ -1217,16 +1217,16 @@ Java_org_apache_subversion_javahl_SVNCli
            EnumMapper::toDepth(jdepth), changelists,
            jignoreAncestry ? true:false,
            jnoDiffDeleted ? true:false, jforce ? true:false,
-           jcopiesAsAdds ? true:false);
+           jcopiesAsAdds ? true:false, jignoreProps ? true:false);
 }
 
 JNIEXPORT void JNICALL
-Java_org_apache_subversion_javahl_SVNClient_diff__Ljava_lang_String_2Lorg_apache_subversion_javahl_types_Revision_2Lorg_apache_subversion_javahl_types_Revision_2Lorg_apache_subversion_javahl_types_Revision_2Ljava_lang_String_2Ljava_io_OutputStream_2Lorg_apache_subversion_javahl_types_Depth_2Ljava_util_Collection_2ZZZZ
+Java_org_apache_subversion_javahl_SVNClient_diff__Ljava_lang_String_2Lorg_apache_subversion_javahl_types_Revision_2Lorg_apache_subversion_javahl_types_Revision_2Lorg_apache_subversion_javahl_types_Revision_2Ljava_lang_String_2Ljava_io_OutputStream_2Lorg_apache_subversion_javahl_types_Depth_2Ljava_util_Collection_2ZZZZZ
 (JNIEnv *env, jobject jthis, jstring jtarget, jobject jpegRevision,
  jobject jstartRevision, jobject jendRevision, jstring jrelativeToDir,
  jobject jstream, jobject jdepth, jobject jchangelists,
  jboolean jignoreAncestry, jboolean jnoDiffDeleted, jboolean jforce,
- jboolean jcopiesAsAdds)
+ jboolean jcopiesAsAdds, jboolean jignoreProps)
 {
   JNIEntry(SVNClient, diff);
   SVNClient *cl = SVNClient::getCppObject(jthis);
@@ -1267,7 +1267,7 @@ Java_org_apache_subversion_javahl_SVNCli
            dataOut, EnumMapper::toDepth(jdepth), changelists,
            jignoreAncestry ? true:false,
            jnoDiffDeleted ? true:false, jforce ? true:false,
-           jcopiesAsAdds ? true:false);
+           jcopiesAsAdds ? true:false, jignoreProps ? true:false);
 }
 
 JNIEXPORT void JNICALL

Modified: subversion/branches/revprop-packing/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java?rev=1240816&r1=1240815&r2=1240816&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java (original)
+++ subversion/branches/revprop-packing/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java Sun Feb  5 21:01:32 2012
@@ -521,13 +521,14 @@ public interface ISVNClient
      * @param force         diff even on binary files
      * @param copiesAsAdds  if set, copied files will be shown in their
      *                      entirety, not as diffs from their sources
+     * @param ignoreProps   don't show property diffs
      * @throws ClientException
      */
     void diff(String target1, Revision revision1, String target2,
               Revision revision2, String relativeToDir, OutputStream outStream,
               Depth depth, Collection<String> changelists,
               boolean ignoreAncestry, boolean noDiffDeleted, boolean force,
-              boolean copiesAsAdds)
+              boolean copiesAsAdds, boolean ignoreProps)
             throws ClientException;
 
     void diff(String target1, Revision revision1, String target2,
@@ -552,6 +553,7 @@ public interface ISVNClient
      * @param force         diff even on binary files
      * @param copiesAsAdds  if set, copied files will be shown in their
      *                      entirety, not as diffs from their sources
+     * @param ignoreProps   don't show property diffs
      * @throws ClientException
      */
     void diff(String target, Revision pegRevision, Revision startRevision,
@@ -559,7 +561,7 @@ public interface ISVNClient
               OutputStream outStream,
               Depth depth, Collection<String> changelists,
               boolean ignoreAncestry, boolean noDiffDeleted, boolean force,
-              boolean copiesAsAdds)
+              boolean copiesAsAdds, boolean ignoreProps)
             throws ClientException;
 
     void diff(String target, Revision pegRevision, Revision startRevision,

Modified: subversion/branches/revprop-packing/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java?rev=1240816&r1=1240815&r2=1240816&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java (original)
+++ subversion/branches/revprop-packing/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java Sun Feb  5 21:01:32 2012
@@ -278,7 +278,7 @@ public class SVNClient implements ISVNCl
             OutputStream stream = new FileOutputStream(outFileName);
             diff(target1, revision1, target2, revision2, relativeToDir,
                  stream, depth, changelists, ignoreAncestry, noDiffDeleted,
-                 force, copiesAsAdds);
+                 force, copiesAsAdds, false);
         } catch (FileNotFoundException ex) {
             throw ClientException.fromException(ex);
         }
@@ -289,7 +289,8 @@ public class SVNClient implements ISVNCl
                             OutputStream stream, Depth depth,
                             Collection<String> changelists,
                             boolean ignoreAncestry, boolean noDiffDeleted,
-                            boolean force, boolean copiesAsAdds)
+                            boolean force, boolean copiesAsAdds,
+                            boolean ignoreProps)
             throws ClientException;
 
     public void diff(String target, Revision pegRevision,
@@ -304,7 +305,7 @@ public class SVNClient implements ISVNCl
             OutputStream stream = new FileOutputStream(outFileName);
             diff(target, pegRevision, startRevision, endRevision,
                  relativeToDir, stream, depth, changelists, ignoreAncestry,
-                 noDiffDeleted, force, copiesAsAdds);
+                 noDiffDeleted, force, copiesAsAdds, false);
         } catch (FileNotFoundException ex) {
             throw ClientException.fromException(ex);
         }
@@ -315,7 +316,8 @@ public class SVNClient implements ISVNCl
                             String relativeToDir, OutputStream stream,
                             Depth depth, Collection<String> changelists,
                             boolean ignoreAncestry, boolean noDiffDeleted,
-                            boolean force, boolean copiesAsAdds)
+                            boolean force, boolean copiesAsAdds,
+                            boolean ignoreProps)
             throws ClientException;
 
     public native void diffSummarize(String target1, Revision revision1,

Modified: subversion/branches/revprop-packing/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c?rev=1240816&r1=1240815&r2=1240816&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c (original)
+++ subversion/branches/revprop-packing/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c Sun Feb  5 21:01:32 2012
@@ -657,10 +657,22 @@ static PyObject *convert_rangelist(void 
   apr_array_header_t *array = value;
 
   list = PyList_New(0);
+  if (list == NULL)
+    return NULL;
+
   for (i = 0; i < array->nelts; i++)
     {
       svn_merge_range_t *range = APR_ARRAY_IDX(array, i, svn_merge_range_t *);
-      if (PyList_Append(list, convert_to_swigtype(range, ctx, py_pool)) == -1)
+      PyObject *obj;
+      int result;
+
+      obj = convert_to_swigtype(range, ctx, py_pool);
+      if (obj == NULL)
+        goto error;
+
+      result = PyList_Append(list, obj);
+      Py_DECREF(obj);
+      if (result == -1)
         goto error;
     }
   return list;

Modified: subversion/branches/revprop-packing/subversion/bindings/swig/python/tests/mergeinfo.py
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/bindings/swig/python/tests/mergeinfo.py?rev=1240816&r1=1240815&r2=1240816&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/bindings/swig/python/tests/mergeinfo.py (original)
+++ subversion/branches/revprop-packing/subversion/bindings/swig/python/tests/mergeinfo.py Sun Feb  5 21:01:32 2012
@@ -18,7 +18,7 @@
 # under the License.
 #
 #
-import unittest, os
+import unittest, os, sys, gc
 from svn import core, repos, fs
 import utils
 
@@ -29,6 +29,15 @@ class RevRange:
     self.start = start
     self.end = end
 
+def get_svn_merge_range_t_objects():
+  """Returns a list 'svn_merge_range_t' objects being tracked by the
+     garbage collector, used for detecting memory leaks."""
+  return [
+    o for o in gc.get_objects()
+      if hasattr(o, '__class__') and
+        o.__class__.__name__ == 'svn_merge_range_t'
+  ]
+
 class SubversionMergeinfoTestCase(unittest.TestCase):
   """Test cases for mergeinfo"""
 
@@ -116,6 +125,53 @@ class SubversionMergeinfoTestCase(unitte
       }
     self.compare_mergeinfo_catalogs(mergeinfo, expected_mergeinfo)
 
+  def test_mergeinfo_leakage__incorrect_range_t_refcounts(self):
+    """Ensure that the ref counts on svn_merge_range_t objects returned by
+       svn_mergeinfo_parse() are correct."""
+    # When reference counting is working properly, each svn_merge_range_t in
+    # the returned mergeinfo will have a ref count of 1...
+    mergeinfo = core.svn_mergeinfo_parse(self.TEXT_MERGEINFO1)
+    for (path, rangelist) in mergeinfo.items():
+      # ....and now 2 (incref during iteration of rangelist)
+
+      for (i, r) in enumerate(rangelist):
+        # ....and now 3 (incref during iteration of each range object)
+
+        refcount = sys.getrefcount(r)
+        # ....and finally, 4 (getrefcount() also increfs)
+        expected = 4
+
+        # Note: if path and index are not '/trunk' and 0 respectively, then
+        # only some of the range objects are leaking, which is, as far as
+        # leaks go, even more impressive.
+        self.assertEquals(refcount, expected, (
+          "Memory leak!  Expected a ref count of %d for svn_merge_range_t "
+          "object, but got %d instead (path: %s, index: %d).  Probable "
+          "cause: incorrect Py_INCREF/Py_DECREF usage in libsvn_swig_py/"
+          "swigutil_py.c." % (expected, refcount, path, i)))
+
+    del mergeinfo
+    gc.collect()
+
+  def test_mergeinfo_leakage__lingering_range_t_objects_after_del(self):
+    """Ensure that there are no svn_merge_range_t objects being tracked by
+       the garbage collector after we explicitly `del` the results returned
+       by svn_mergeinfo_parse().  We call gc.collect() to force an explicit
+       garbage collection cycle after the `del`;
+       if our reference counts are correct, the allocated svn_merge_range_t
+       objects will be garbage collected and thus, not appear in the list of
+       objects returned by gc.get_objects()."""
+    mergeinfo = core.svn_mergeinfo_parse(self.TEXT_MERGEINFO1)
+    del mergeinfo
+    gc.collect()
+    lingering = get_svn_merge_range_t_objects()
+    self.assertEquals(lingering, list(), (
+      "Memory leak!  Found lingering svn_merge_range_t objects left over from "
+      "our call to svn_mergeinfo_parse(), even though we explicitly deleted "
+      "the returned mergeinfo object.  Probable cause: incorrect Py_INCREF/"
+      "Py_DECREF usage in libsvn_swig_py/swigutil_py.c.  Lingering objects:\n"
+      "%s" % lingering))
+
   def inspect_mergeinfo_dict(self, mergeinfo, merge_source, nbr_rev_ranges):
     rangelist = mergeinfo.get(merge_source)
     self.inspect_rangelist_tuple(rangelist, nbr_rev_ranges)

Modified: subversion/branches/revprop-packing/subversion/include/private/svn_repos_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/include/private/svn_repos_private.h?rev=1240816&r1=1240815&r2=1240816&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/include/private/svn_repos_private.h (original)
+++ subversion/branches/revprop-packing/subversion/include/private/svn_repos_private.h Sun Feb  5 21:01:32 2012
@@ -44,6 +44,14 @@ extern "C" {
  *
  * Use @a pool for temporary allocations.
  *
+ * @note This function is used to implement server-side validation.
+ * Consequently, if you make this function stricter in what it accepts, you
+ * (a) break svnsync'ing of existing repositories that contain now-invalid
+ * properties, (b) do not preclude such invalid values from entering the
+ * repository via tools that use the svn_fs_* API directly (possibly
+ * including svnadmin and svnlook).  This has happened before and there
+ * are known (documented, but unsupported) upgrade paths in some cases.
+ * 
  * @since New in 1.7.
  */
 svn_error_t *

Modified: subversion/branches/revprop-packing/subversion/include/private/svn_subr_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/include/private/svn_subr_private.h?rev=1240816&r1=1240815&r2=1240816&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/include/private/svn_subr_private.h (original)
+++ subversion/branches/revprop-packing/subversion/include/private/svn_subr_private.h Sun Feb  5 21:01:32 2012
@@ -25,6 +25,7 @@
 #define SVN_SUBR_PRIVATE_H
 
 #include "svn_types.h"
+#include "svn_io.h"
 
 
 #ifdef __cplusplus
@@ -188,6 +189,16 @@ svn_spillbuf__reader_write(svn_spillbuf_
                            apr_size_t len,
                            apr_pool_t *scratch_pool);
 
+
+/* Return a stream built on top of a spillbuf, using the same arguments as
+   svn_spillbuf__create().  This stream can be used for reading and writing,
+   but implements the same basic sematics of a spillbuf for the underlying
+   storage. */
+svn_stream_t *
+svn_stream__from_spillbuf(apr_size_t blocksize,
+                          apr_size_t maxsize,
+                          apr_pool_t *result_pool);
+
 /** @} */
 
 

Modified: subversion/branches/revprop-packing/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/include/svn_client.h?rev=1240816&r1=1240815&r2=1240816&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/include/svn_client.h (original)
+++ subversion/branches/revprop-packing/subversion/include/svn_client.h Sun Feb  5 21:01:32 2012
@@ -2877,6 +2877,7 @@ svn_client_diff6(const apr_array_header_
                  svn_boolean_t no_diff_deleted,
                  svn_boolean_t show_copies_as_adds,
                  svn_boolean_t ignore_content_type,
+                 svn_boolean_t ignore_prop_diff,
                  svn_boolean_t use_git_diff_format,
                  const char *header_encoding,
                  svn_stream_t *outstream,
@@ -2886,7 +2887,8 @@ svn_client_diff6(const apr_array_header_
                  apr_pool_t *pool);
 
 /** Similar to svn_client_diff6(), but with @a outfile and @a errfile,
- * instead of @a outstream and @a errstream.
+ * instead of @a outstream and @a errstream, and always showing property
+ * changes.
  *
  * @deprecated Provided for backward compatibility with the 1.7 API.
  * @since New in 1.7.
@@ -3035,6 +3037,7 @@ svn_client_diff_peg6(const apr_array_hea
                      svn_boolean_t no_diff_deleted,
                      svn_boolean_t show_copies_as_adds,
                      svn_boolean_t ignore_content_type,
+                     svn_boolean_t ignore_prop_diff,
                      svn_boolean_t use_git_diff_format,
                      const char *header_encoding,
                      svn_stream_t *outstream,
@@ -3044,7 +3047,8 @@ svn_client_diff_peg6(const apr_array_hea
                      apr_pool_t *pool);
 
 /** Similar to svn_client_diff_peg6(), but with @a outfile and @a errfile,
- * instead of @a outstream and @a errstream.
+ * instead of @a outstream and @a errstream, and always showing property
+ * changes.
  *
  * @deprecated Provided for backward compatibility with the 1.7 API.
  * @since New in 1.7.

Modified: subversion/branches/revprop-packing/subversion/include/svn_editor.h
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/include/svn_editor.h?rev=1240816&r1=1240815&r2=1240816&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/include/svn_editor.h (original)
+++ subversion/branches/revprop-packing/subversion/include/svn_editor.h Sun Feb  5 21:01:32 2012
@@ -87,7 +87,7 @@ extern "C" {
  * receiver editing its tree to the target state defined by the driver.
  *
  *
- * HISTORY
+ * <h3>History</h3>
  *
  * Classically, Subversion had a notion of a "tree delta" which could be
  * passed around as an independent entity. Theory implied this delta was an
@@ -117,6 +117,31 @@ extern "C" {
  * the most common functionality (cancellation and debugging) have been
  * integrated directly into this new editor system.
  *
+ *
+ * <h3>Implementation Plan</h3>
+ * @note This section can be removed after Ev2 is fully implemented.
+ *
+ * The delta editor is pretty engrained throughout Subversion, so attempting
+ * to replace it in situ is somewhat akin to performing open heart surgery
+ * while the patient is running a marathon.  However, a viable plan should
+ * make things a bit easier, and help parallelize the work.
+ *
+ * In short, the following items need to be done:
+ *  -# Implement backward compatibility wrappers ("shims")
+ *  -# Use shims to update editor consumers to Ev2
+ *  -# Update editor producers to drive Ev2
+ *     - This will largely involve rewriting the RA layers to accept and
+ *       send Ev2 commands
+ *  -# Optimize consumers and producers to leverage the features of Ev2
+ *
+ * The shims are largely self-contained, and as of this writing, are almost
+ * complete.  They can be released without much ado.  However, they do add
+ * <em>significant</em> performance regressions, which make releasing code
+ * which is half-delta-editor and half-Ev2 inadvisable.  As such, the updating
+ * of producers and consumers to Ev2 will probably need to wait until 1.9,
+ * though it could be largely parallelized.
+ *
+ *
  * @defgroup svn_editor The editor interface
  * @{
  */
@@ -157,6 +182,7 @@ extern "C" {
  *      svn_editor_setcb_delete() \n
  *      svn_editor_setcb_copy() \n
  *      svn_editor_setcb_move() \n
+ *      svn_editor_setcb_rotate() \n
  *      svn_editor_setcb_complete() \n
  *      svn_editor_setcb_abort()
  *
@@ -178,7 +204,8 @@ extern "C" {
  *      svn_editor_set_target() \n
  *      svn_editor_delete() \n
  *      svn_editor_copy() \n
- *      svn_editor_move()
+ *      svn_editor_move() \n
+ *      svn_editor_rotate()
  *    \n\n
  *    Just before each callback invocation is carried out, the @a cancel_func
  *    that was passed to svn_editor_create() is invoked to poll any
@@ -235,15 +262,17 @@ extern "C" {
  *   its children, if a directory) may be copied many times, and are
  *   otherwise subject to the Once Rule. The destination path of a copy
  *   or move may have set_* operations applied, but not add_* or delete.
- *   If the destination path of a copy or move is a directory, then its
- *   children are subject to the Once Rule. The source path of a move
- *   (and its child paths) may be referenced in add_*, or as the
- *   destination of a copy (where these new, copied nodes are subject to
- *   the Once Rule).
- *
- * - The ancestor of an added, copied-here, moved-here or modified node may
- *   not be deleted. The ancestor may not be moved (instead: perform the
- *   move, *then* the edits).
+ *   If the destination path of a copy, move, or rotate is a directory,
+ *   then its children are subject to the Once Rule. The source path of
+ *   a move (and its child paths) may be referenced in add_*, or as the
+ *   destination of a copy (where these new or copied nodes are subject
+ *   to the Once Rule). Paths listed in a rotation are both sources and
+ *   destinations, so they may not be referenced again in an add_* or a
+ *   deletion; these paths may have set_* operations applied.
+ *
+ * - The ancestor of an added, copied-here, moved-here, rotated, or
+ *   modified node may not be deleted. The ancestor may not be moved
+ *   (instead: perform the move, *then* the edits).
  *
  * - svn_editor_delete() must not be used to replace a path -- i.e.
  *   svn_editor_delete() must not be followed by an svn_editor_add_*() on
@@ -264,6 +293,10 @@ extern "C" {
  *   by a delete... that is fine. It is simply that svn_editor_move()
  *   should be used to describe a semantic move.
  *
+ * - Paths mentioned in svn_editor_rotate() may have their properties
+ *   and contents edited (via set_* calls) by a previous or later call,
+ *   but they may not be subject to a later move, rotate, or deletion.
+ *
  * - One of svn_editor_complete() or svn_editor_abort() must be called
  *   exactly once, which must be the final call the driver invokes.
  *   Invoking svn_editor_complete() must imply that the set of changes has
@@ -296,6 +329,19 @@ extern "C" {
  * for these items are invoked.
  * \n\n
  *
+ * <h3>Timing and State</h3>
+ * The calls made by the driver to alter the state in the receiver are
+ * based on the receiver's *current* state, which includes all prior changes
+ * made during the edit.
+ *
+ * Example: copy A to B; set-props on A; copy A to C. The props on C
+ * should reflect the updated properties of A.
+ *
+ * Example: mv A@N to B; mv C@M to A. The second move cannot be marked as
+ * a "replacing" move since it is not replacing A. The node at A was moved
+ * away. The second operation is simply moving C to the now-empty path
+ * known as A.
+ *
  * <h3>Paths</h3>
  * Each driver/receiver implementation of this editor interface must
  * establish the expected root path for the paths sent and received via the
@@ -480,6 +526,15 @@ typedef svn_error_t *(*svn_editor_cb_mov
   svn_revnum_t replaces_rev,
   apr_pool_t *scratch_pool);
 
+/** @see svn_editor_rotate(), svn_editor_t.
+ * @since New in 1.8.
+ */
+typedef svn_error_t *(*svn_editor_cb_rotate_t)(
+  void *baton,
+  const apr_array_header_t *relpaths,
+  const apr_array_header_t *revisions,
+  apr_pool_t *scratch_pool);
+
 /** @see svn_editor_complete(), svn_editor_t.
  * @since New in 1.8.
  */
@@ -630,6 +685,17 @@ svn_editor_setcb_move(svn_editor_t *edit
                       svn_editor_cb_move_t callback,
                       apr_pool_t *scratch_pool);
 
+/** Sets the #svn_editor_cb_rotate_t callback in @a editor
+ * to @a callback.
+ * @a scratch_pool is used for temporary allocations (if any).
+ * @see also svn_editor_setcb_many().
+ * @since New in 1.8.
+ */
+svn_error_t *
+svn_editor_setcb_rotate(svn_editor_t *editor,
+                        svn_editor_cb_rotate_t callback,
+                        apr_pool_t *scratch_pool);
+
 /** Sets the #svn_editor_cb_complete_t callback in @a editor
  * to @a callback.
  * @a scratch_pool is used for temporary allocations (if any).
@@ -670,6 +736,7 @@ typedef struct svn_editor_cb_many_t
   svn_editor_cb_delete_t cb_delete;
   svn_editor_cb_copy_t cb_copy;
   svn_editor_cb_move_t cb_move;
+  svn_editor_cb_rotate_t cb_rotate;
   svn_editor_cb_complete_t cb_complete;
   svn_editor_cb_abort_t cb_abort;
 
@@ -818,6 +885,7 @@ svn_editor_set_props(svn_editor_t *edito
  * with checksum @a checksum.
  * ### TODO @todo Does this send the *complete* content, always?
  * ### TODO @todo What is REVISION for?
+ * ### TODO @todo Who is responsible for closing the stream?
  *
  * For all restrictions on driving the editor, see #svn_editor_t.
  * @since New in 1.8.
@@ -904,6 +972,33 @@ svn_editor_move(svn_editor_t *editor,
                 const char *dst_relpath,
                 svn_revnum_t replaces_rev);
 
+/** Drive @a editor's #svn_editor_cb_rotate_t callback.
+ *
+ * Perform a rotation among multiple nodes in the target tree.
+ *
+ * The @relpaths and @revisions arrays (pair-wise) specify nodes in the
+ * tree which are located at a path and expected to be at a specific
+ * revision. These nodes are simultaneously moved in a rotation pattern.
+ * For example, the node at index 0 of @a relpaths and @a revisions will
+ * be moved to the relpath specified at index 1 of @a relpaths. The node
+ * at index 1 will be moved to the location at index 2. The node at index
+ * N-1 will be moved to the relpath specifed at index 0.
+ *
+ * The simplest form of this operation is to swap nodes A and B. One may
+ * think to move A to a temporary location T, then move B to A, then move
+ * T to B. However, this last move violations the Once Rule by moving T
+ * (which had already by edited by the move from A). In order to keep the
+ * restrictions against multiple moves of a single node, the rotation
+ * operation is needed for certain types of tree edits.
+ *
+ * For all restrictions on driving the editor, see #svn_editor_t.
+ * @since New in 1.8.
+ */
+svn_error_t *
+svn_editor_rotate(svn_editor_t *editor,
+                  const apr_array_header_t *relpaths,
+                  const apr_array_header_t *revisions);
+
 /** Drive @a editor's #svn_editor_cb_complete_t callback.
  *
  * Send word that the edit has been completed successfully.

Modified: subversion/branches/revprop-packing/subversion/include/svn_io.h
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/include/svn_io.h?rev=1240816&r1=1240815&r2=1240816&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/include/svn_io.h (original)
+++ subversion/branches/revprop-packing/subversion/include/svn_io.h Sun Feb  5 21:01:32 2012
@@ -989,6 +989,16 @@ svn_stream_t *
 svn_stream_from_string(const svn_string_t *str,
                        apr_pool_t *pool);
 
+/** Return a generic stream which implements buffered reads and writes.
+ *  The stream will preferentially store data in-memory, but may use
+ *  disk storage as backup if the amount of data is large.
+ *  Allocate the stream in @a result_pool
+ *
+ * @since New in 1.8.
+ */
+svn_stream_t *
+svn_stream_buffered(apr_pool_t *result_pool);
+
 /** Return a stream that decompresses all data read and compresses all
  * data written. The stream @a stream is used to read and write all
  * compressed data. All compression data structures are allocated on
@@ -1543,10 +1553,35 @@ svn_io_dir_walk(const char *dirname,
  * Otherwise, the invoked program runs with an empty environment and @a cmd
  * must be an absolute path.
  *
+ * If @a inherit is FALSE and @a env is not NULL, the invoked program
+ * inherits the environment defined by @a env, instead of an empty
+ * environment or the caller's environment.
+ *
  * @note On some platforms, failure to execute @a cmd in the child process
  * will result in error output being written to @a errfile, if non-NULL, and
  * a non-zero exit status being returned to the parent process.
  *
+ * @since New in 1.8.
+ */
+svn_error_t *svn_io_start_cmd3(apr_proc_t *cmd_proc,
+                               const char *path,
+                               const char *cmd,
+                               const char *const *args,
+                               const char *const *env,
+                               svn_boolean_t inherit,
+                               svn_boolean_t infile_pipe,
+                               apr_file_t *infile,
+                               svn_boolean_t outfile_pipe,
+                               apr_file_t *outfile,
+                               svn_boolean_t errfile_pipe,
+                               apr_file_t *errfile,
+                               apr_pool_t *pool);
+
+
+/**
+ * Similar to svn_io_start_cmd3() but with @a env always set to NULL.
+ *
+ * @deprecated Provided for backward compatibility with the 1.7 API
  * @since New in 1.7.
  */
 svn_error_t *svn_io_start_cmd2(apr_proc_t *cmd_proc,

Modified: subversion/branches/revprop-packing/subversion/include/svn_mergeinfo.h
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/include/svn_mergeinfo.h?rev=1240816&r1=1240815&r2=1240816&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/include/svn_mergeinfo.h (original)
+++ subversion/branches/revprop-packing/subversion/include/svn_mergeinfo.h Sun Feb  5 21:01:32 2012
@@ -166,9 +166,10 @@ svn_mergeinfo_parse(svn_mergeinfo_t *mer
                     apr_pool_t *pool);
 
 /** Calculate the delta between two mergeinfos, @a mergefrom and @a mergeto
- * (which may be @c NULL), and place the result in @a *deleted and @a
- * *added (neither output argument may be @c NULL), both allocated in @a
- * result_pool.
+ * (either or both of which may be @c NULL meaning an empty mergeinfo).
+ * Place the result in @a *deleted and @a *added (neither output argument
+ * may be @c NULL), both allocated in @a result_pool.  The resulting
+ * @a *deleted and @a *added will not be null.
  *
  * @a consider_inheritance determines how the rangelists in the two
  * hashes are compared for equality.  If @a consider_inheritance is FALSE,

Modified: subversion/branches/revprop-packing/subversion/include/svn_utf.h
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/include/svn_utf.h?rev=1240816&r1=1240815&r2=1240816&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/include/svn_utf.h (original)
+++ subversion/branches/revprop-packing/subversion/include/svn_utf.h Sun Feb  5 21:01:32 2012
@@ -49,12 +49,28 @@ extern "C" {
  * Initialize the UTF-8 encoding/decoding routines.
  * Allocate cached translation handles in a subpool of @a pool.
  *
+ * If @a assume_native_utf8 is TRUE, the native character set is
+ * assumed to be UTF-8, i.e. conversion is a no-op. This is useful
+ * in contexts where the native character set is ASCII but UTF-8
+ * should be used regardless (e.g. for mod_dav_svn which runs within
+ * httpd and always uses the "C" locale).
+ *
  * @note It is optional to call this function, but if it is used, no other
  * svn function may be in use in other threads during the call of this
  * function or when @a pool is cleared or destroyed.
  * Initializing the UTF-8 routines will improve performance.
  *
- * @since New in 1.1.
+ * @since New in 1.8.
+ */
+void
+svn_utf_initialize2(apr_pool_t *pool,
+                    svn_boolean_t assume_native_utf8);
+
+/**
+ * Like svn_utf_initialize but without the ability to force the
+ * native encoding to UTF-8.
+ *
+ * @deprecated Provided for backward compatibility with the 1.7 API.
  */
 void
 svn_utf_initialize(apr_pool_t *pool);

Modified: subversion/branches/revprop-packing/subversion/libsvn_client/cmdline.c
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/libsvn_client/cmdline.c?rev=1240816&r1=1240815&r2=1240816&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/libsvn_client/cmdline.c (original)
+++ subversion/branches/revprop-packing/subversion/libsvn_client/cmdline.c Sun Feb  5 21:01:32 2012
@@ -168,7 +168,6 @@ svn_client_args_to_target_array2(apr_arr
   int i;
   svn_boolean_t rel_url_found = FALSE;
   const char *root_url = NULL;
-  svn_error_t *err = SVN_NO_ERROR;
   apr_array_header_t *input_targets =
     apr_array_make(pool, DEFAULT_ARRAY_SIZE, sizeof(const char *));
   apr_array_header_t *output_targets =
@@ -348,6 +347,7 @@ svn_client_args_to_target_array2(apr_arr
       if (root_url == NULL)
         {
           const char *current_abspath;
+          svn_error_t *err;
 
           SVN_ERR(svn_dirent_get_absolute(&current_abspath, "", pool));
           err = svn_client_get_repos_root(&root_url, NULL /* uuid */,
@@ -391,11 +391,17 @@ svn_client_args_to_target_array2(apr_arr
   else
     *targets_p = output_targets;
 
-  if (reserved_names && ! err)
-    for (i = 0; i < reserved_names->nelts; ++i)
-      err = svn_error_createf(SVN_ERR_RESERVED_FILENAME_SPECIFIED, err,
-                              _("'%s' ends in a reserved name"),
-                              APR_ARRAY_IDX(reserved_names, i, const char *));
+  if (reserved_names)
+    {
+      svn_error_t *err = SVN_NO_ERROR;
+
+      for (i = 0; i < reserved_names->nelts; ++i)
+        err = svn_error_createf(SVN_ERR_RESERVED_FILENAME_SPECIFIED, err,
+                                _("'%s' ends in a reserved name"),
+                                APR_ARRAY_IDX(reserved_names, i,
+                                              const char *));
+      return svn_error_trace(err);
+    }
 
-  return svn_error_trace(err);
+  return SVN_NO_ERROR;
 }

Modified: subversion/branches/revprop-packing/subversion/libsvn_client/commit_util.c
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/libsvn_client/commit_util.c?rev=1240816&r1=1240815&r2=1240816&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/libsvn_client/commit_util.c (original)
+++ subversion/branches/revprop-packing/subversion/libsvn_client/commit_util.c Sun Feb  5 21:01:32 2012
@@ -416,6 +416,10 @@ bail_on_tree_conflicted_ancestor(svn_wc_
    by recursing deeper into a dir target. (This is used to skip all file
    externals that aren't explicit commit targets.)
 
+   DANGLERS is a hash table mapping const char* absolute paths of a parent
+   to a const char * absolute path of a child. See the comment about
+   danglers at the top of svn_client__harvest_committables().
+
    If CANCEL_FUNC is non-null, call it with CANCEL_BATON to see
    if the user has cancelled the operation.
 
@@ -435,6 +439,7 @@ harvest_committables(svn_wc_context_t *w
                      svn_boolean_t skip_files,
                      svn_boolean_t skip_dirs,
                      svn_boolean_t is_explicit_target,
+                     apr_hash_t *danglers,
                      svn_client__check_url_kind_t check_url_func,
                      void *check_url_baton,
                      svn_cancel_func_t cancel_func,
@@ -814,6 +819,45 @@ harvest_committables(svn_wc_context_t *w
         }
     }
 
+  /* Make sure we check for dangling children on additions */
+  if (state_flags && is_added && is_explicit_target && danglers)
+    {
+      /* If a node is added, it's parent must exist in the repository at the
+         time of committing */
+
+      svn_boolean_t parent_added;
+      const char *parent_abspath = svn_dirent_dirname(local_abspath,
+                                                      scratch_pool);
+
+      SVN_ERR(svn_wc__node_is_added(&parent_added, wc_ctx, parent_abspath,
+                                    scratch_pool));
+
+      if (parent_added)
+        {
+          const char *copy_root_abspath;
+          svn_boolean_t parent_is_copy;
+
+          /* The parent is added, so either it is a copy, or a locally added
+           * directory. In either case, we require the op-root of the parent
+           * to be part of the commit. See issue #4059. */
+          SVN_ERR(svn_wc__node_get_origin(&parent_is_copy, NULL, NULL, NULL,
+                                          NULL, &copy_root_abspath,
+                                          wc_ctx, parent_abspath,
+                                          FALSE, scratch_pool, scratch_pool));
+
+          if (parent_is_copy)
+            parent_abspath = copy_root_abspath;
+
+          if (!apr_hash_get(danglers, parent_abspath, APR_HASH_KEY_STRING))
+            {
+              apr_hash_set(danglers,
+                           apr_pstrdup(result_pool, parent_abspath),
+                           APR_HASH_KEY_STRING,
+                           apr_pstrdup(result_pool, local_abspath));
+            }
+        }
+    }
+
   if (db_kind != svn_node_dir || depth <= svn_depth_empty)
     return SVN_NO_ERROR;
 
@@ -863,6 +907,7 @@ harvest_committables(svn_wc_context_t *w
                                        (depth < svn_depth_files),
                                        (depth < svn_depth_immediates),
                                        FALSE, /* IS_EXPLICIT_TARGET */
+                                       danglers,
                                        check_url_func, check_url_baton,
                                        cancel_func, cancel_baton,
                                        notify_func, notify_baton,
@@ -1063,10 +1108,8 @@ svn_client__harvest_committables(svn_cli
   for (i = 0; i < targets->nelts; ++i)
     {
       const char *target_abspath;
-      svn_boolean_t is_added;
       svn_node_kind_t kind;
       const char *repos_root_url;
-      svn_error_t *err;
 
       svn_pool_clear(iterpool);
 
@@ -1103,51 +1146,6 @@ svn_client__harvest_committables(svn_cli
                                           target_abspath,
                                           result_pool, iterpool));
 
-      /* Handle an added/replaced node. */
-      SVN_ERR(svn_wc__node_is_added(&is_added, ctx->wc_ctx, target_abspath,
-                                    iterpool));
-      if (is_added)
-        {
-          /* This node is added. Is the parent also added? */
-          const char *parent_abspath = svn_dirent_dirname(target_abspath,
-                                                          iterpool);
-          err = svn_wc__node_is_added(&is_added, ctx->wc_ctx, parent_abspath,
-                                      iterpool);
-          if (err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
-            return svn_error_createf(
-                SVN_ERR_WC_CORRUPT, err,
-                _("'%s' is scheduled for addition within unversioned parent"),
-                svn_dirent_local_style(target_abspath, iterpool));
-          SVN_ERR(err);
-
-          if (is_added)
-            {
-              svn_boolean_t is_copy;
-              const char *copy_root_abspath;
-
-              /* Copies are always committed recursively as long as the
-               * copy root is in the commit target list.
-               * So for nodes copied along with a parent, the copy root path
-               * is the dangling parent. See issue #4059. */
-              SVN_ERR(svn_wc__node_get_origin(&is_copy,
-                                              NULL, NULL, NULL, NULL,
-                                              &copy_root_abspath,
-                                              ctx->wc_ctx,
-                                              target_abspath,
-                                              FALSE, iterpool, iterpool));
-              if (is_copy && strcmp(copy_root_abspath, target_abspath) != 0)
-                parent_abspath = copy_root_abspath;
-
-              /* Copy the parent and target into pool; iterpool
-                 lasts only for this loop iteration, and we check
-                 danglers after the loop is over. */
-              apr_hash_set(danglers,
-                           apr_pstrdup(scratch_pool, parent_abspath),
-                           APR_HASH_KEY_STRING,
-                           apr_pstrdup(scratch_pool, target_abspath));
-            }
-        }
-
       /* Handle our TARGET. */
       /* Make sure this isn't inside a working copy subtree that is
        * marked as tree-conflicted. */
@@ -1164,6 +1162,7 @@ svn_client__harvest_committables(svn_cli
                                    depth, just_locked, changelist_hash,
                                    FALSE, FALSE,
                                    TRUE /* IS_EXPLICIT_TARGET */,
+                                   danglers,
                                    check_url_func, check_url_baton,
                                    ctx->cancel_func, ctx->cancel_baton,
                                    ctx->notify_func2, ctx->notify_baton2,
@@ -1258,6 +1257,7 @@ harvest_copy_committables(void *baton, v
                                NULL,
                                FALSE, FALSE, /* skip files, dirs */
                                TRUE, /* IS_EXPLICIT_TARGET (don't care) */
+                               NULL,
                                btn->check_url_func,
                                btn->check_url_baton,
                                btn->ctx->cancel_func,

Modified: subversion/branches/revprop-packing/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/libsvn_client/copy.c?rev=1240816&r1=1240815&r2=1240816&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/libsvn_client/copy.c (original)
+++ subversion/branches/revprop-packing/subversion/libsvn_client/copy.c Sun Feb  5 21:01:32 2012
@@ -1558,27 +1558,18 @@ repos_to_wc_copy_single(svn_client__copy
 
   else if (pair->src_kind == svn_node_file)
     {
-      svn_stream_t *fstream;
-      const char *new_text_path;
       apr_hash_t *new_props;
       const char *src_rel;
-      svn_stream_t *new_base_contents;
-
-      SVN_ERR(svn_stream_open_unique(&fstream, &new_text_path, NULL,
-                                     svn_io_file_del_on_pool_cleanup, pool,
-                                     pool));
+      svn_stream_t *new_base_contents = svn_stream_buffered(pool);
 
       SVN_ERR(svn_ra_get_path_relative_to_session(ra_session, &src_rel,
                                                   pair->src_abspath_or_url,
                                                   pool));
       /* Fetch the file content. While doing so, resolve pair->src_revnum
        * to an actual revision number if it's 'invalid' meaning 'head'. */
-      SVN_ERR(svn_ra_get_file(ra_session, src_rel, pair->src_revnum, fstream,
+      SVN_ERR(svn_ra_get_file(ra_session, src_rel, pair->src_revnum,
+                              new_base_contents,
                               &pair->src_revnum, &new_props, pool));
-      SVN_ERR(svn_stream_close(fstream));
-
-      SVN_ERR(svn_stream_open_readonly(&new_base_contents, new_text_path,
-                                       pool, pool));
       SVN_ERR(svn_wc_add_repos_file4(
          ctx->wc_ctx, dst_abspath,
          new_base_contents, NULL, new_props, NULL,

Modified: subversion/branches/revprop-packing/subversion/libsvn_client/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/subversion/libsvn_client/deprecated.c?rev=1240816&r1=1240815&r2=1240816&view=diff
==============================================================================
--- subversion/branches/revprop-packing/subversion/libsvn_client/deprecated.c (original)
+++ subversion/branches/revprop-packing/subversion/libsvn_client/deprecated.c Sun Feb  5 21:01:32 2012
@@ -864,7 +864,7 @@ svn_client_diff5(const apr_array_header_
   return svn_client_diff6(diff_options, path1, revision1, path2,
                           revision2, relative_to_dir, depth,
                           ignore_ancestry, no_diff_deleted,
-                          show_copies_as_adds, ignore_content_type,
+                          show_copies_as_adds, ignore_content_type, FALSE,
                           use_git_diff_format, header_encoding,
                           outstream, errstream, changelists, ctx, pool);
 }
@@ -992,6 +992,7 @@ svn_client_diff_peg5(const apr_array_hea
                               no_diff_deleted,
                               show_copies_as_adds,
                               ignore_content_type,
+                              FALSE,
                               use_git_diff_format,
                               header_encoding,
                               outstream,