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 2010/04/04 11:09:35 UTC

svn commit: r930648 [1/3] - in /subversion/branches/svn-patch-improvements: ./ build/generator/ build/generator/templates/ notes/wc-ng/ subversion/bindings/javahl/native/ subversion/include/ subversion/include/private/ subversion/libsvn_client/ subvers...

Author: dannas
Date: Sun Apr  4 09:09:34 2010
New Revision: 930648

URL: http://svn.apache.org/viewvc?rev=930648&view=rev
Log:
Sync svn-patch-improvements branch with trunk.

Added:
    subversion/branches/svn-patch-improvements/subversion/tests/cmdline/svnadmin_tests_data/mergeinfo_included_full.dump
      - copied unchanged from r930647, subversion/trunk/subversion/tests/cmdline/svnadmin_tests_data/mergeinfo_included_full.dump
    subversion/branches/svn-patch-improvements/tools/buildbot/slaves/win32-SharpSvn/
      - copied from r930647, subversion/trunk/tools/buildbot/slaves/win32-SharpSvn/
    subversion/branches/svn-patch-improvements/tools/buildbot/slaves/win32-SharpSvn/svn-config.cmd.template
      - copied unchanged from r930647, subversion/trunk/tools/buildbot/slaves/win32-SharpSvn/svn-config.cmd.template
    subversion/branches/svn-patch-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd
      - copied unchanged from r930647, subversion/trunk/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd
    subversion/branches/svn-patch-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-build-bindings.cmd
      - copied unchanged from r930647, subversion/trunk/tools/buildbot/slaves/win32-SharpSvn/svntest-build-bindings.cmd
    subversion/branches/svn-patch-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-build.cmd
      - copied unchanged from r930647, subversion/trunk/tools/buildbot/slaves/win32-SharpSvn/svntest-build.cmd
    subversion/branches/svn-patch-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-cleanup.cmd
      - copied unchanged from r930647, subversion/trunk/tools/buildbot/slaves/win32-SharpSvn/svntest-cleanup.cmd
    subversion/branches/svn-patch-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-template.cmd
      - copied unchanged from r930647, subversion/trunk/tools/buildbot/slaves/win32-SharpSvn/svntest-template.cmd
    subversion/branches/svn-patch-improvements/tools/buildbot/slaves/win32-SharpSvn/svntest-test.cmd
      - copied unchanged from r930647, subversion/trunk/tools/buildbot/slaves/win32-SharpSvn/svntest-test.cmd
Modified:
    subversion/branches/svn-patch-improvements/   (props changed)
    subversion/branches/svn-patch-improvements/CHANGES
    subversion/branches/svn-patch-improvements/build/generator/gen_win.py
    subversion/branches/svn-patch-improvements/build/generator/templates/vcnet_vcproj.ezt
    subversion/branches/svn-patch-improvements/build/generator/templates/vcnet_vcxproj.ezt
    subversion/branches/svn-patch-improvements/notes/wc-ng/conflict-storage
    subversion/branches/svn-patch-improvements/subversion/bindings/javahl/native/JNIUtil.cpp
    subversion/branches/svn-patch-improvements/subversion/bindings/javahl/native/JNIUtil.h
    subversion/branches/svn-patch-improvements/subversion/include/private/svn_sqlite.h
    subversion/branches/svn-patch-improvements/subversion/include/private/svn_wc_private.h
    subversion/branches/svn-patch-improvements/subversion/include/svn_editor.h
    subversion/branches/svn-patch-improvements/subversion/include/svn_io.h
    subversion/branches/svn-patch-improvements/subversion/include/svn_wc.h
    subversion/branches/svn-patch-improvements/subversion/libsvn_client/merge.c
    subversion/branches/svn-patch-improvements/subversion/libsvn_delta/editor.c
    subversion/branches/svn-patch-improvements/subversion/libsvn_fs/fs-loader.c
    subversion/branches/svn-patch-improvements/subversion/libsvn_fs_fs/tree.c
    subversion/branches/svn-patch-improvements/subversion/libsvn_repos/delta.c
    subversion/branches/svn-patch-improvements/subversion/libsvn_subr/cmdline.c
    subversion/branches/svn-patch-improvements/subversion/libsvn_subr/deprecated.c
    subversion/branches/svn-patch-improvements/subversion/libsvn_subr/stream.c
    subversion/branches/svn-patch-improvements/subversion/libsvn_wc/adm_crawler.c
    subversion/branches/svn-patch-improvements/subversion/libsvn_wc/adm_ops.c
    subversion/branches/svn-patch-improvements/subversion/libsvn_wc/entries.c
    subversion/branches/svn-patch-improvements/subversion/libsvn_wc/entries.h
    subversion/branches/svn-patch-improvements/subversion/libsvn_wc/log.c
    subversion/branches/svn-patch-improvements/subversion/libsvn_wc/log.h
    subversion/branches/svn-patch-improvements/subversion/libsvn_wc/merge.c
    subversion/branches/svn-patch-improvements/subversion/libsvn_wc/props.c
    subversion/branches/svn-patch-improvements/subversion/libsvn_wc/props.h
    subversion/branches/svn-patch-improvements/subversion/libsvn_wc/questions.c
    subversion/branches/svn-patch-improvements/subversion/libsvn_wc/revision_status.c
    subversion/branches/svn-patch-improvements/subversion/libsvn_wc/tree_conflicts.h
    subversion/branches/svn-patch-improvements/subversion/libsvn_wc/update_editor.c
    subversion/branches/svn-patch-improvements/subversion/libsvn_wc/wc-metadata.sql
    subversion/branches/svn-patch-improvements/subversion/libsvn_wc/wc-queries.sql
    subversion/branches/svn-patch-improvements/subversion/libsvn_wc/wc_db.c
    subversion/branches/svn-patch-improvements/subversion/libsvn_wc/wc_db.h
    subversion/branches/svn-patch-improvements/subversion/libsvn_wc/workqueue.c
    subversion/branches/svn-patch-improvements/subversion/libsvn_wc/workqueue.h
    subversion/branches/svn-patch-improvements/subversion/mod_dav_svn/reports/get-locks.c
    subversion/branches/svn-patch-improvements/subversion/tests/cmdline/svnadmin_tests.py
    subversion/branches/svn-patch-improvements/subversion/tests/cmdline/trans_tests.py
    subversion/branches/svn-patch-improvements/tools/dev/wc-ng/count-progress.py

Propchange: subversion/branches/svn-patch-improvements/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Apr  4 09:09:34 2010
@@ -33,4 +33,4 @@
 /subversion/branches/tc_url_rev:874351-874483
 /subversion/branches/tree-conflicts:868291-873154
 /subversion/branches/tree-conflicts-notify:873926-874008
-/subversion/trunk:918519-929258
+/subversion/trunk:918519-930647

Modified: subversion/branches/svn-patch-improvements/CHANGES
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/CHANGES?rev=930648&r1=930647&r2=930648&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/CHANGES (original)
+++ subversion/branches/svn-patch-improvements/CHANGES Sun Apr  4 09:09:34 2010
@@ -1,5 +1,5 @@
 Version 1.6.10
-(?? ??? 2010, from /branches/1.6.x)
+(02 Apr 2010, from /branches/1.6.x)
 http://svn.apache.org/repos/asf/subversion/tags/1.6.10
 
  User-visible changes:
@@ -14,17 +14,19 @@ http://svn.apache.org/repos/asf/subversi
   * make mergeinfo queries not require access to the repo root (issue #3242)
   * update URLs to refer the the new apache.org repository (r904301, -94)
   * update relative externals during a switch (issue #3390)
-  * update fix for dropped mergeinfo revisions in 'svnadmin load' (issue #3020)
   * fix 'merge --reintegrate' with self-referential mergeinfo (r892050, -85)
+  * improve wc-ng working copy detection (r929382)
   * fixed: 'svnlook plist --revprop' with '-t TXN_NAME' (r917640, -8211)
   * fixed: file external from URL cannot overwrite existing item (issue #3552)
   * fixed: potential memory error in 'svn status' (r923674, -9)
-  * fixed: merge records merginfo from natural history gaps (issue #3432)
+  * fixed: merge records mergeinfo from natural history gaps (issue #3432)
+  * fixed: theoretical possibility of DB corruption (r926151, -67)
 
  Developer-visible changes:
   * disable checks for wc-ng working copies when running the test suite
   * on Windows, don't ignore move operation error codes (r896915)
   * more precise reporting of errors occuring with sqlite init (r927323, -8)
+  * ensure rangelist APIs are commutative (r923389, -91)
 
 
 Version 1.6.9

Modified: subversion/branches/svn-patch-improvements/build/generator/gen_win.py
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/build/generator/gen_win.py?rev=930648&r1=930647&r2=930648&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/build/generator/gen_win.py (original)
+++ subversion/branches/svn-patch-improvements/build/generator/gen_win.py Sun Apr  4 09:09:34 2010
@@ -563,9 +563,12 @@ class WinGeneratorBase(GeneratorBase):
                 cbuild = '%s %s -o %s $(InputPath)' \
                          % (self.swig_exe, " ".join(swig_options), cout)
 
+                cdesc = 'Generating %s' % cout
+
                 sources.append(ProjectItem(path=isrc, reldir=None,
                                            custom_build=cbuild,
                                            custom_target=csrc,
+                                           custom_desc=cdesc,
                                            user_deps=user_deps,
                                            extension=''))
 
@@ -580,8 +583,13 @@ class WinGeneratorBase(GeneratorBase):
       cbuild = "python $(InputPath) %s > %s" \
                % (" ".join(deps), def_file)
 
-      sources.append(ProjectItem(path=gsrc, reldir=None, custom_build=cbuild,
-                                 user_deps=deps, custom_target=def_file,
+      cdesc = 'Generating %s ' % def_file
+
+      sources.append(ProjectItem(path=gsrc, reldir=None, 
+                                 custom_build=cbuild,
+                                 custom_target=def_file,
+                                 custom_desc=cdesc,
+                                 user_deps=deps, 
                                  extension=''))
 
       sources.append(ProjectItem(path=def_file, reldir=None,
@@ -698,7 +706,7 @@ class WinGeneratorBase(GeneratorBase):
     #
     # This section parses those dependencies and adds them to the dependency list
     # for this target.
-    if name[0:7] == 'javahl-' or name == 'libsvnjavahl':
+    if name.startswith('javahl') or name == 'libsvnjavahl':
       for dep in re.findall('\$\(([^\)]*)_DEPS\)', target.add_deps):
         dep = dep.replace('_', '-')
         depends.extend(self.sections[dep].get_targets())

Modified: subversion/branches/svn-patch-improvements/build/generator/templates/vcnet_vcproj.ezt
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/build/generator/templates/vcnet_vcproj.ezt?rev=930648&r1=930647&r2=930648&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/build/generator/templates/vcnet_vcproj.ezt (original)
+++ subversion/branches/svn-patch-improvements/build/generator/templates/vcnet_vcproj.ezt Sun Apr  4 09:09:34 2010
@@ -76,7 +76,7 @@
 [else]				LinkIncremental="1"
 [end]				AdditionalLibraryDirectories="..\..\..\db4-win32\lib;[for configs.libdirs][configs.libdirs];[end]"
 				TargetMachine="[is platforms "Win32"]1[end][is platforms "x64"]17[end]"
-				IgnoreDefaultLibraryNames="libc.lib"
+				IgnoreDefaultLibraryNames="libc.lib[is configs.name "debug"];msvcrt.lib[end]"
 [if-any def_file]				ModuleDefinitionFile="[def_file]"
 [end]				GenerateDebugInformation="TRUE"
 				ProgramDatabaseFile="$(OutDir)\$(TargetName).pdb"[is configs.name "Debug"]
@@ -89,7 +89,8 @@
 			<Tool
 				Name="VCLibrarianTool"
 				AdditionalOptions="[is platforms "win32"]/MACHINE:X86[end][is platforms "x64"]/MACHINE:X64[end]"
-				OutputFile="$(OutDir)\[target.output_name]"/>
+				OutputFile="$(OutDir)\[target.output_name]"[is configs.name "debug"]
+				IgnoreDefaultLibraryNames="msvcrt.lib"[end]/>
 [end]			<Tool
 				Name="VCMIDLTool"/>
 			<Tool

Modified: subversion/branches/svn-patch-improvements/build/generator/templates/vcnet_vcxproj.ezt
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/build/generator/templates/vcnet_vcxproj.ezt?rev=930648&r1=930647&r2=930648&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/build/generator/templates/vcnet_vcxproj.ezt (original)
+++ subversion/branches/svn-patch-improvements/build/generator/templates/vcnet_vcxproj.ezt Sun Apr  4 09:09:34 2010
@@ -67,17 +67,20 @@
       <AdditionalLibraryDirectories>[for configs.libdirs][configs.libdirs];[end]%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <SubSystem>Console</SubSystem>
-[is configs.name "Debug"][else]    <OptimizeReferences>true</OptimizeReferences>
+[is configs.name "Debug"]      <IgnoreSpecificDefaultLibraries>msvcrt.lib</IgnoreSpecificDefaultLibraries>
+[else]      <OptimizeReferences>true</OptimizeReferences>
 [end]    </Link>
 [else][is config_type "DynamicLibrary"]    <Link>
       <AdditionalDependencies>[for configs.libs][configs.libs];[end]%(AdditionalDependencies)</AdditionalDependencies>
       <AdditionalLibraryDirectories>[for configs.libdirs][configs.libdirs];[end]%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <GenerateDebugInformation>true</GenerateDebugInformation>
-[if-any def_file]      <ModuleDefinitionFile>[def_file]</ModuleDefinitionFile>
+[is configs.name "Debug"]      <IgnoreSpecificDefaultLibraries>msvcrt.lib</IgnoreSpecificDefaultLibraries>
+[end][if-any def_file]      <ModuleDefinitionFile>[def_file]</ModuleDefinitionFile>
 [end]    </Link>
 [else][is config_type "StaticLibrary"]    <Lib>
       <TargetMachine>[is platforms "X64"]MachineX64[else]MachineX86[end]</TargetMachine>
-    </Lib>
+[is configs.name "Debug"]      <IgnoreSpecificDefaultLibraries>msvcrt.lib</IgnoreSpecificDefaultLibraries>
+[end]    </Lib>
 [end][end][end]  </ItemDefinitionGroup>
 [end][end][if-any target.desc]  <ItemGroup>
     <ResourceCompile Include="..\svn.rc">

Modified: subversion/branches/svn-patch-improvements/notes/wc-ng/conflict-storage
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/notes/wc-ng/conflict-storage?rev=930648&r1=930647&r2=930648&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/notes/wc-ng/conflict-storage (original)
+++ subversion/branches/svn-patch-improvements/notes/wc-ng/conflict-storage Sun Apr  4 09:09:34 2010
@@ -5,30 +5,36 @@ Conflict meta data storage in wc-ng
 
 Conflict meta data is stored in the ACTUAL_NODE table, within the
 'conflict_data' column. The data in this column is a skel containing
-conflict information, or NULL (meaning no conflict is present).
+conflict information (meaning the node is in conflict, and the details
+are inside), or NULL (meaning no conflict is present).
+
+The conflict skel has the form:
+
+  ((KIND OPERATION KIND-SPECIFIC) (KIND OPERATION KIND-SPECIFIC) ...)
+
+KIND indicates the kind of conflict description that follows and is one
+of:
+
+  "text" - meaning a "normal" text conflict of the whole node (which must be a
+    file), with left/right/mine full texts saved, and (unless it's
+    "binary") conflict markers in the working text;
+  "prop" - meaning a "normal" property conflict, with left/right/mine full
+    values saved;
+  "tree" - meaning a tree conflict;
+  "reject" - meaning a text conflict for a single hunk of text, with the source
+    being a patch file (rather than left/right full texts), and with a
+    "reject" file being saved (?);
+  "obstructed" - meaning ### TODO
+
+OPERATION indicates the operation which caused the conflict and is
+detailed below.
+
+KIND-SPECIFIC is specific to each KIND, and is detailed below.
+
+There are restrictions on what mixture of conflicts can meaningfully be
+recorded - e.g. there must not be two "text" nor one "text" and one
+"reject".  These restrictions are implied but not spelled out here.
 
-There are five types of conflicts (text conflicts, property conflicts,
-tree conflicts, patch conflicts, and obstructions). The conflict skel
-has the form:
-
-  (COMMON (KIND KIND-SPECIFIC) (KIND KIND-SPECIFIC) ...)
-
-where KIND is one of "text", "prop", "tree", "patch", or
-"obstructed". KIND-SPECIFIC is specific to each KIND, and is detailed
-below. The COMMON skel contains data that is common to all KINDs, and
-is detailed below.
-
-### stsp: I think the COMMON block should appear at the start of each
-###   type-specific block instead. For instance, if I apply a patch and
-###   rejects are recorded by the "patch" operation on the node,
-###   it does not hurt to allow update or merge operations on the node
-###   while it still has a patch conflict recorded.
-###   A similar situation is a text vs. prop conflicts. E.g. if a node
-###   node has only property conflicts, why not allow an update or merge
-###   which does not touch conflicted properties? Even if we do not want
-###   to allow this, I think embedding this decision into the storage
-###   layer design is a bad idea. We can make higher layers deal with it.
-###   See also http://svn.haxx.se/dev/archive-2010-03/0646.shtml
 
 ### stsp: need conflict data format version info inside skel, too?
 ###   or do we bump the entire wc.db format number if we need to tweak
@@ -36,11 +42,10 @@ is detailed below.
 ###
 ### gstein sez: the KIND can become "text-2" or somesuch if we need to
 ###   radically alter the kind-specific data. but we can easily append
-###   information to the skel without much problem. adjusting the
-###   COMMON skel shouldn't be hard, if appending is insufficient.
+###   information to the skel without much problem.
 
-If the 'conflict_data' column is not NULL, then COMMON must exist and
-at least one KIND of conflict skel, describing the conflict(s).
+If the 'conflict_data' column is not NULL, then at least one
+KIND of conflict skel must exist, describing the conflict(s).
 
 Contrary to wc-1, wc-ng records sufficient information to help users
 understand, in hindsight, which operation led to the conflict (as long
@@ -52,69 +57,92 @@ but this information can be deduced from
 (e.g. conflict-old and friends; foo.r42 is now 'foo' + '.r' + left_rev)
 
 
-Terminology
---------------------
+Operation skel
+--------------
+
+Meaning:  The Operation skel indicates what kind of operation was being
+performed that resulted in a conflict, including the format and content
+(or reference to content) of the diff that was being applied to this
+node.
+
+The OPERATION skel has the following form:
+
+  (NAME OPERATION-SPECIFIC)
+
+NAME is one of:
+
+  "update" - meaning a 3-way merge as in "svn update";
+  "switch" - meaning a 3-way merge as in "svn switch";
+  "merge" - meaning a 3(4?)-way merge as in "svn merge";
+  "patch" - meaning application of a context-diff, as in "svn patch".
+
+OPERATION-SPECIFIC is as follows:
+
+To record an "update" operation, the skel has the form:
+
+  ("update" BASE_REV TARGET_REV)
+
+  BASE_REV is the base revision prior to the update.
+  TARGET_REV is the revision being updated to.
+
+For "switch", the skel has the form:
+
+  ("switch" BASE_REV TARGET_REV REPOS_RELPATH)
+
+  BASE_REV and TARGET_REV are as for "update" above.
+  REPOS_RELPATH is the path in the repository being switched to.
+
+For "merge", the skel has the form:
+
+  ("merge" LEFT_REV RIGHT_REV
+   (LEFT_REPOS_UUID LEFT_REPOS_ROOT_URL LEFT_REPOS_RELPATH LEFT_PEG_REV)
+   (RIGHT_REPOS_UUID RIGHT_REPOS_ROOT_URL RIGHT_REPOS_RELPATH RIGHT_PEG_REV) )
+
+  LEFT_REV is the merge-left revision, and RIGHT_REV is the merge-right
+    revision of a continuous revision range which was merged (merge tracking
+    might split a merge up into multiple merges of continuous revision ranges).
+
+  {LEFT,RIGHT}_REPOS_UUID is the UUID of the repository the {left,right}
+    version of the item comes from, in order to recognize merges from foreign
+    repositories.
 
-There are 3 versions of an item involved in a conflict:
-  left: During update, the 'left' version is the common ancestor
-        of the 'right' and 'mine' versions.
-        During merge, the 'left' version is the version of the item
-        as it appears at the merge-left revision.
- right: During update, the 'right' version is the version of the item
-        as it appears in the revision updated to.
-        During merge, the 'right' version is the version of the item
-        as it appears at the merge-right revision.
-  mine: During both update and merge, this is the version of the item
-        as found in the working copy when the conflict was detected
-        (which does not necessarily equal the current working version!)
-
-
-Common conflict data
---------------------
-
-Some information is shared for all conflict data that applies to a node. E.g.
-when a node has a combination of text and property conflicts these were
-always caused by the same operation. (Any later operation will skip the node
-unless the conflicts are resolved). The COMMON skel has the form:
-
-  (OPERATION LEFT_REV RIGHT_REV
-    (LEFT_UUID LEFT_ROOT_URL LEFT_RELPATH LEFT_PEG_REV)
-    (RIGHT_UUID RIGHT_ROOT_URL RIGHT_RELPATH RIGHT_PEG_REV) )
-
-### BH: I don't know if all these values apply to obstructions and patch
-###     conflicts. And most of these values are not available for conflicts
-###     that are introduced via 1.6 (and some of our deprecated svn_wc apis)
-
-### stsp: We can simply use empty strings for fields which don't make
-###   sense for the current conflict type.
-
-### BH: Should we have the (incoming_change local_change) block here?
-### BH: Should we have the (left_node_kind right_node_kind) block here?
-### BH: Do we need more data on 'older/mine' or is that handled via left/right?
-
-OPERATION is "update", "switch", "merge", or "patch", indicating during what
-type of operation the conflict occurred.
-
-{LEFT,RIGHT}_REV is the revision of the {left,right} side of
-the operation. With "update" and "switch", LEFT_REV is the base revision
-prior to the update/switch, and RIGHT_REV is the revision updated/switched
-to. During "merge", LEFT_REV is the merge-left revision, and RIGHT_REV
-is the merge-right revision, of a continuous revision range which was merged
-(merge tracking might split a merge up into multiple merges of continuous
-revision ranges).
-
-{LEFT,RIGHT}_UUID is the UUID of the repository the {left,right}
-version of the item comes from, in order to recognize merges from foreign
-repositories.
+  {LEFT,RIGHT}_REPOS_ROOT_URL is the repository root URL the {left,right}
+    version of the item comes from.
 
-{LEFT,RIGHT}_ROOT_URL is the repository root URL the {left,right}
-version of the item comes from.
+  {LEFT,RIGHT}_REPOS_RELPATH is the path in the repository of the {left,right}
+    version of the item.
 
-{LEFT,RIGHT}_RELPATH is the path in the repository of the {left,right}
-version of the item.
+  {LEFT,RIGHT}_PEG_REV is the peg revision of the {left,right} version
+    of the item.
 
-{LEFT,RIGHT}_PEG_REV is the peg revision of the {left,right} version
-of the item.
+### JAF: Don't want both "rev" and "peg-rev" separately: that's recording too
+###   much UI.  Just have the revision in which to find the repos-relpath.
+### stsp: Peg revs aren't just UI. You need them to uniquely identify an item
+###   in the repository history. Here's an example for why we need them:
+###   Say I'm doing a merge of range rA-rB, and within this range,
+###   file foo.c is replaced in rN, and later renamed to bar.c in rM.
+###   Of course, A < N < M < B.
+###   (Note: The following highly depends on how editorv2 drivers will be
+###    implemented, so I may be off-track here.)
+###   During the merge with editorv2, the replace and rename result in the
+###   addition of foo.c@N (replacing foo.c@A), and the move of foo.c@N
+###   to bar.c. Let's say foo.c@A has edits local to the merge target.
+###   I'd like flag a edit/replaced tree conflict, and record foo.c@rA as
+###   the 'left' version of the conflicting item, and foo.c@rN as the 'right'
+###   version. Recording foo.c@B is wrong because foo.c does not exist at
+###   that revision, so being able to record just two revisions won't work.
+###   We could also record bar.c@B as the 'right' version, but this doesn't
+###   feel right since the rename does not really conflict with the edits.
+###   The item which is being renamed is not the one which was edited -- it
+###   just happened to live at the same path at a different time.
+
+For "patch", the skel has the form:
+
+  ("patch" PATCH_SOURCE_LABEL)
+
+  PATCH_SOURCE_LABEL is (typically) the absolute path of the patch
+  file the application of which led to conflicts. In the future, it
+  may also be something like "<stdin>".
 
 
 Text conflicts
@@ -123,7 +151,11 @@ Text conflicts
 Text conflicts only exist on files. The following skel represents the
 "text" KIND of conflict:
 
-  ("text" LEFT_SHA1 RIGHT_SHA1 MINE_SHA1)
+  ("text" OPERATION LEFT_SHA1 RIGHT_SHA1 MINE_SHA1)
+
+{LEFT,RIGHT,MINE}_SHA1 are sha1 checksums of the full texts of
+the {left,right,mine} version of the file. File version's content
+can be obtained from the pristine store.
 
 ### BH: We need some marker here, but these values must also be stored
 ###     in the older_checksum, left_checksum, right_checksum colums of ACTUAL
@@ -134,10 +166,6 @@ Text conflicts only exist on files. The 
 ###   and symlinks are resolved before the SHA1 is calculated and
 ###   stored in the db?
 
-{LEFT,RIGHT,MINE}_SHA1 are sha1 checksums of the full texts of
-the {left,right,mine} version of the file. File version's content
-can be obtained from the pristine store.
-
 
 Property conflicts
 --------------
@@ -147,7 +175,8 @@ There can be one or more property confli
 by one or more "prop" KIND conflicts. Each "prop" conflict has the
 following form:
 
-  ("prop" PROPERTY_NAME ([LEFT_VALUE]) ([RIGHT_VALUE]) ([MINE_VALUE]))
+  ("prop" OPERATION
+   PROPERTY_NAME ([LEFT_VALUE]) ([RIGHT_VALUE]) ([MINE_VALUE]))
 
 PROPERTY_NAME is the name of the property, such as "svn:eol-style".
 
@@ -160,9 +189,12 @@ Tree conflicts
 --------------
 
 Tree conflicts exist on files or directories.
+
+### JAF: And symlinks, I presume - or, if not, why not?
+
 The following information is stored if there is a tree conflict on the node:
 
-  ("tree"
+  ("tree" OPERATION
     INCOMING_CHANGE LOCAL_CHANGE
     LEFT_NODE_KIND RIGHT_NODE_KIND
     LEFT_SHA1 RIGHT_SHA1 MINE_SHA1)
@@ -189,6 +221,16 @@ content can be obtained from the pristin
 ###     (We should keep the history of the node valid via replace vs update)
 ### stsp: I don't really understand your question. Can you be more specific?
 
+### gstein suggests:
+###
+###   ("tree" OPERATION LOCAL_STATE INCOMING_STATE)
+###
+###   LOCAL_STATE := (LOCAL_CHANGE NODE_KIND [ORIGINAL_SHA1 MINE_SHA1])
+###   INCOMING_STATE := (INCOMING_CHANGE NODE_KIND [INCOMING_SHA1])
+###
+### this groups the data better, and has nice (optional) placeholders
+### for the SHA1 values when NODE_KIND is "file"
+
 
 (Unversioned) Obstructions
 --------------------------
@@ -200,23 +242,22 @@ the BASE_NODE table.
 There is no particular data which needs to be recorded for an
 obstruction. Thus, the "obstructed" conflict skel has the form:
 
-  ("obstructed")
+  ("obstructed" OPERATION)
 
 
-Patch conflicts (a.k.a. "rejects")
-----------------------------------
+Reject conflicts
+----------------
 For patches, the content of the left and right versions is not fully known,
 so the conflict is not a diff3-style text conflict. Rather, the conflict
 is the failure to find a match for a hunk's context in the patch target.
+There can be one or more reject conflicts on a node. Each "reject" conflict
+has the following form:
 
-  ("patch" PATCH_FILE_ABSPATH
+  ("reject" OPERATION
     HUNK_ORIGINAL_OFFSET HUNK_ORIGINAL_LEN
     HUNK_MODIFIED_OFFSET HUNK_MODIFIED_LENGTH
     REJECT_DIFF_SHA1)
 
-PATCH_FILE_ABSPATH is the absolute path of the patch file the
-application of which to the node led to hunks being rejected.
-
 HUNK_{ORIGINAL,MODIFIED}_OFFSET and HUNK_{ORIGINAL,MODIFIED}_LENGTH
 are the hunk header values as parsed from the patch file (i.e. the "ID"
 of the hunk within the patch file). These also occur in the reject
@@ -234,8 +275,3 @@ hunk as written to the .svnpatch.rej fil
 ###   the user deletes the tempfile would be nice. And I don't see an issue
 ###   with also storing the SHA1 sum in the ACTUAL table. We do this for
 ###   text conflicts as well. Why would it need an extra table?
-
-### gstein: why keep the PATCH_FILE_ABSPATH? couldn't that be rm'd at
-###   some point after the attempted 'svn patch'? and doesn't this
-###   obviate the future possibility of patch from stdin?
-### stsp: See http://svn.haxx.se/dev/archive-2010-03/0645.shtml

Modified: subversion/branches/svn-patch-improvements/subversion/bindings/javahl/native/JNIUtil.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/bindings/javahl/native/JNIUtil.cpp?rev=930648&r1=930647&r2=930648&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/bindings/javahl/native/JNIUtil.cpp (original)
+++ subversion/branches/svn-patch-improvements/subversion/bindings/javahl/native/JNIUtil.cpp Sun Apr  4 09:09:34 2010
@@ -25,8 +25,12 @@
  */
 
 #include "JNIUtil.h"
+#include "Array.h"
+
 #include <sstream>
+#include <vector>
 #include <locale.h>
+
 #include <apr_strings.h>
 #include <apr_tables.h>
 #include <apr_general.h>
@@ -376,12 +380,74 @@ JNIUtil::throwNativeException(const char
   env->Throw(static_cast<jthrowable>(env->PopLocalFrame(nativeException)));
 }
 
+void
+JNIUtil::putErrorsInTrace(svn_error_t *err,
+                          std::vector<jobject> &stackTrace)
+{
+  if (!err)
+    return;
+
+  JNIEnv *env = getEnv();
+
+  // First, put all our child errors in the stack trace
+  putErrorsInTrace(err->child, stackTrace);
+
+  // Now, put our own error in the stack trace
+  jclass stClazz = env->FindClass("java/lang/StackTraceElement");
+  if (isJavaExceptionThrown())
+    return;
+
+  static jmethodID ctor_mid = 0;
+  if (ctor_mid == 0)
+    {
+      ctor_mid = env->GetMethodID(stClazz, "<init>",
+                                  "(Ljava/lang/String;Ljava/lang/String;"
+                                  "Ljava/lang/String;I)V");
+      if (isJavaExceptionThrown())
+        return;
+    }
+
+  jstring jdeclClass = makeJString("native");
+  if (isJavaExceptionThrown())
+    return;
+
+  char *tmp_path;
+  char *path = svn_relpath_dirname(err->file, err->pool);
+  while (tmp_path = strchr(path, '/'))
+    *tmp_path = '.';
+
+  jstring jmethodName = makeJString(path);
+  if (isJavaExceptionThrown())
+    return;
+
+  jstring jfileName = makeJString(svn_relpath_basename(err->file, err->pool));
+  if (isJavaExceptionThrown())
+    return;
+
+  jobject jelement = env->NewObject(stClazz, ctor_mid, jdeclClass, jmethodName,
+                                    jfileName, (jint) err->line);
+
+  stackTrace.push_back(jelement);
+
+  env->DeleteLocalRef(stClazz);
+  if (isJavaExceptionThrown())
+    return;
+  env->DeleteLocalRef(jdeclClass);
+  if (isJavaExceptionThrown())
+    return;
+  env->DeleteLocalRef(jmethodName);
+  if (isJavaExceptionThrown())
+    return;
+  env->DeleteLocalRef(jfileName);
+}
+
 void JNIUtil::handleSVNError(svn_error_t *err)
 {
   std::string msg;
-  assembleErrorMessage(err, 0, APR_SUCCESS, msg);
+  assembleErrorMessage(svn_error_purge_tracing(err), 0, APR_SUCCESS, msg);
   const char *source = NULL;
 #ifdef SVN_DEBUG
+#ifndef SVN_ERR__TRACING
   if (err->file)
     {
       std::ostringstream buf;
@@ -391,8 +457,113 @@ void JNIUtil::handleSVNError(svn_error_t
       source = buf.str().c_str();
     }
 #endif
-  throwNativeException(JAVA_PACKAGE "/ClientException", msg.c_str(),
-                       source, err->apr_err);
+#endif
+
+  // Much of the following is stolen from throwNativeException().  As much as
+  // we'd like to call that function, we need to do some manual stack
+  // unrolling, so it isn't feasible.
+
+  JNIEnv *env = getEnv();
+
+  // Create a local frame for our references
+  env->PushLocalFrame(LOCAL_FRAME_SIZE);
+  if (JNIUtil::isJavaExceptionThrown())
+    return;
+
+  jclass clazz = env->FindClass(JAVA_PACKAGE "/ClientException");
+  if (isJavaExceptionThrown())
+    POP_AND_RETURN_NOTHING();
+
+  if (getLogLevel() >= exceptionLog)
+    {
+      JNICriticalSection cs(*g_logMutex);
+      g_logStream << "Subversion JavaHL exception thrown, message:<";
+      g_logStream << msg << ">";
+      if (source)
+        g_logStream << " source:<" << source << ">";
+      if (err->apr_err != -1)
+        g_logStream << " apr-err:<" << err->apr_err << ">";
+      g_logStream << std::endl;
+    }
+  if (isJavaExceptionThrown())
+    POP_AND_RETURN_NOTHING();
+
+  jstring jmessage = makeJString(msg.c_str());
+  if (isJavaExceptionThrown())
+    POP_AND_RETURN_NOTHING();
+  jstring jsource = makeJString(source);
+  if (isJavaExceptionThrown())
+    POP_AND_RETURN_NOTHING();
+
+  jmethodID mid = env->GetMethodID(clazz, "<init>",
+                                   "(Ljava/lang/String;Ljava/lang/String;I)V");
+  if (isJavaExceptionThrown())
+    POP_AND_RETURN_NOTHING();
+  jobject nativeException = env->NewObject(clazz, mid, jmessage, jsource,
+                                           static_cast<jint>(err->apr_err));
+  if (isJavaExceptionThrown())
+    POP_AND_RETURN_NOTHING();
+
+#ifdef SVN_ERR__TRACING
+  // Add all the C error stack trace information to the Java Exception
+
+  // Get the standard stack trace, and vectorize it using the Array class.
+  static jmethodID mid_gst = 0;
+  if (mid_gst == 0)
+    {
+      mid_gst = env->GetMethodID(clazz, "getStackTrace",
+                                 "()[Ljava/lang/StackTraceElement;");
+      if (isJavaExceptionThrown())
+        POP_AND_RETURN_NOTHING();
+    }
+  Array stackTraceArray((jobjectArray) env->CallObjectMethod(nativeException,
+                                                             mid_gst));
+  std::vector<jobject> oldStackTrace = stackTraceArray.vector();
+
+  // Build the new stack trace elements from the chained errors.
+  std::vector<jobject> newStackTrace;
+  putErrorsInTrace(err, newStackTrace);
+
+  // Join the new elements with the old ones
+  for (std::vector<jobject>::const_iterator it = oldStackTrace.begin();
+            it < oldStackTrace.end(); ++it)
+    {
+      newStackTrace.push_back(*it);
+    }
+
+  jclass stClazz = env->FindClass("java/lang/StackTraceElement");
+  if (isJavaExceptionThrown())
+    POP_AND_RETURN_NOTHING();
+
+  jobjectArray jStackTrace = env->NewObjectArray(newStackTrace.size(), stClazz,
+                                                 NULL);
+  if (isJavaExceptionThrown())
+    POP_AND_RETURN_NOTHING();
+
+  int i = 0;
+  for (std::vector<jobject>::const_iterator it = newStackTrace.begin();
+       it < newStackTrace.end(); ++it)
+    {
+      env->SetObjectArrayElement(jStackTrace, i, *it);
+      ++i;
+    }
+
+  // And put the entire trace back into the exception
+  static jmethodID mid_sst = 0;
+  if (mid_sst == 0)
+    {
+      mid_sst = env->GetMethodID(clazz, "setStackTrace",
+                                 "([Ljava/lang/StackTraceElement;)V");
+      if (isJavaExceptionThrown())
+        POP_AND_RETURN_NOTHING();
+    }
+  env->CallVoidMethod(nativeException, mid_sst, jStackTrace);
+  if (isJavaExceptionThrown())
+    POP_AND_RETURN_NOTHING();
+#endif
+
+  env->Throw(static_cast<jthrowable>(env->PopLocalFrame(nativeException)));
+
   svn_error_clear(err);
 }
 

Modified: subversion/branches/svn-patch-improvements/subversion/bindings/javahl/native/JNIUtil.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/bindings/javahl/native/JNIUtil.h?rev=930648&r1=930647&r2=930648&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/bindings/javahl/native/JNIUtil.h (original)
+++ subversion/branches/svn-patch-improvements/subversion/bindings/javahl/native/JNIUtil.h Sun Apr  4 09:09:34 2010
@@ -28,6 +28,7 @@
 #define JNIUTIL_H
 
 #include <list>
+#include <vector>
 #include "Pool.h"
 struct apr_pool_t;
 struct svn_error;
@@ -143,6 +144,8 @@ class JNIUtil
   static void assembleErrorMessage(svn_error_t *err, int depth,
                                    apr_status_t parent_apr_err,
                                    std::string &buffer);
+  static void putErrorsInTrace(svn_error_t *err,
+                               std::vector<jobject> &stackTrace);
   /**
    * Set the appropriate global or thread-local flag that an exception
    * has been thrown to @a flag.

Modified: subversion/branches/svn-patch-improvements/subversion/include/private/svn_sqlite.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/include/private/svn_sqlite.h?rev=930648&r1=930647&r2=930648&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/include/private/svn_sqlite.h (original)
+++ subversion/branches/svn-patch-improvements/subversion/include/private/svn_sqlite.h Sun Apr  4 09:09:34 2010
@@ -71,7 +71,8 @@ svn_error_t *
 svn_sqlite__insert(apr_int64_t *row_id, svn_sqlite__stmt_t *stmt);
 
 /* Perform an an update/delete an then return the number of affected rows.
-   *AFFECTED_ROWS will be set to the number of rows changed.
+   If AFFECTED_ROWS is not NULL, then *AFFECTED_ROWS will be set to the
+   number of rows changed.
    STMT will be reset prior to returning. */
 svn_error_t *
 svn_sqlite__update(int *affected_rows, svn_sqlite__stmt_t *stmt);

Modified: subversion/branches/svn-patch-improvements/subversion/include/private/svn_wc_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/include/private/svn_wc_private.h?rev=930648&r1=930647&r2=930648&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/include/private/svn_wc_private.h (original)
+++ subversion/branches/svn-patch-improvements/subversion/include/private/svn_wc_private.h Sun Apr  4 09:09:34 2010
@@ -122,7 +122,6 @@ svn_wc__versioned_file_modcheck(svn_bool
                                 svn_wc_context_t *wc_ctx,
                                 const char *versioned_file_abspath,
                                 const char *base_file_abspath,
-                                svn_boolean_t compare_textbases,
                                 apr_pool_t *scratch_pool);
 
 /**

Modified: subversion/branches/svn-patch-improvements/subversion/include/svn_editor.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/include/svn_editor.h?rev=930648&r1=930647&r2=930648&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/include/svn_editor.h (original)
+++ subversion/branches/svn-patch-improvements/subversion/include/svn_editor.h Sun Apr  4 09:09:34 2010
@@ -859,6 +859,22 @@ svn_editor_copy(svn_editor_t *editor,
  *
  * For a description of @a replaces_rev, see svn_editor_add_file().
  *
+ * ### stsp: How would I describe a merge of revision range rA-rB,
+ * ###   within which a file foo.c was delete in rN, re-created in rM,
+ * ###   and then renamed to bar.c in rX?
+ * ###   Would the following be valid?
+ * ###   svn_editor_add_file(ed, "foo.c", props, rN);
+ * ###   svn_editor_move(ed, "foo.c", rM, "bar.c", rN);
+ * ###
+ * ### gstein: no, it would be:
+ * ###   svn_editor_delete(e, "foo.c", rN);
+ * ###   svn_editor_add_file(e, "foo.c", props, SVN_INVALID_REVNUM);
+ * ###   svn_editor_move(e, "foo.c", rM, "bar.c", SVN_INVALID_REVNUM);
+ * ###
+ * ###   replaces_rev is to indicate a deletion of the destination node
+ * ###   that occurs as part of the move. there are no replacements in
+ * ###   your example.
+ *
  * For all restrictions on driving the editor, see #svn_editor_t.
  * @since New in 1.7.
  */

Modified: subversion/branches/svn-patch-improvements/subversion/include/svn_io.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/include/svn_io.h?rev=930648&r1=930647&r2=930648&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/include/svn_io.h (original)
+++ subversion/branches/svn-patch-improvements/subversion/include/svn_io.h Sun Apr  4 09:09:34 2010
@@ -1235,10 +1235,29 @@ svn_stream_copy(svn_stream_t *from,
 
 
 /** Set @a *same to TRUE if @a stream1 and @a stream2 have the same
- * contents, else set it to FALSE.  Use @a pool for temporary allocations.
+ * contents, else set it to FALSE.
+ *
+ * Both streams will be closed before this function returns (regardless of
+ * the result, or any possible error).
+ *
+ * Use @a scratch_pool for temporary allocations.
+ *
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_stream_contents_same2(svn_boolean_t *same,
+                          svn_stream_t *stream1,
+                          svn_stream_t *stream2,
+                          apr_pool_t *pool);
+
+
+/**
+ * Same as svn_stream_contents_same2(), but the streams will not be closed.
  *
  * @since New in 1.4.
+ * @deprecated Provided for backward compatibility with the 1.6 API.
  */
+SVN_DEPRECATED
 svn_error_t *
 svn_stream_contents_same(svn_boolean_t *same,
                          svn_stream_t *stream1,

Modified: subversion/branches/svn-patch-improvements/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/include/svn_wc.h?rev=930648&r1=930647&r2=930648&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/include/svn_wc.h (original)
+++ subversion/branches/svn-patch-improvements/subversion/include/svn_wc.h Sun Apr  4 09:09:34 2010
@@ -2173,8 +2173,8 @@ typedef svn_error_t *(*svn_wc_conflict_r
 
 /**
  * A callback vtable invoked by our diff-editors, as they receive diffs
- * from the server.  'svn diff', 'svn merge' and 'svn patch' all
- * implement their own versions of this vtable.
+ * from the server. 'svn diff' and 'svn merge' implement their own versions
+ * of this vtable.
  *
  * Common parameters:
  *

Modified: subversion/branches/svn-patch-improvements/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/libsvn_client/merge.c?rev=930648&r1=930647&r2=930648&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/libsvn_client/merge.c (original)
+++ subversion/branches/svn-patch-improvements/subversion/libsvn_client/merge.c Sun Apr  4 09:09:34 2010
@@ -1839,8 +1839,7 @@ files_same_p(svn_boolean_t *same,
 
       /* Compare the file content, translating 'mine' to 'normal' form. */
       SVN_ERR(svn_wc__versioned_file_modcheck(&modified, wc_ctx, mine_abspath,
-                                              older_abspath, TRUE,
-                                              scratch_pool));
+                                              older_abspath, scratch_pool));
       *same = !modified;
     }
 
@@ -1879,8 +1878,8 @@ merge_file_deleted(const char *local_dir
 
   SVN_ERR(svn_dirent_get_absolute(&mine_abspath, mine, subpool));
 
-  if (*tree_conflicted)
-    tree_conflicted = FALSE;
+  if (tree_conflicted)
+    *tree_conflicted = FALSE;
 
   /* Easy out:  if we have no adm_access for the parent directory,
      then this portion of the tree-delta "patch" must be inapplicable.
@@ -4632,8 +4631,7 @@ remove_children_with_deleted_mergeinfo(m
    to the reporter.
 
    DEPTH, NOTIFY_B, and MERGE_B are cascasded from do_directory_merge(), see
-   that function for more info.  CALLBACKS are the svn merge versions of
-   the svn_wc_diff_callbacks4_t callbacks invoked by the editor.
+   that function for more info.
 
    If MERGE_B->sources_ancestral is set, then URL1@REVISION1 must be a
    historical ancestor of URL2@REVISION2, or vice-versa (see
@@ -4649,7 +4647,6 @@ drive_merge_report_editor(const char *ta
                           const apr_array_header_t *children_with_mergeinfo,
                           svn_depth_t depth,
                           notification_receiver_baton_t *notify_b,
-                          const svn_wc_diff_callbacks4_t *callbacks,
                           merge_cmd_baton_t *merge_b,
                           apr_pool_t *pool)
 {
@@ -4727,7 +4724,7 @@ drive_merge_report_editor(const char *ta
   /* Get the diff editor and a reporter with which to, ultimately,
      drive it. */
   SVN_ERR(svn_client__get_diff_editor(target_abspath, merge_b->ctx->wc_ctx,
-                                      callbacks, merge_b, depth,
+                                      &merge_callbacks, merge_b, depth,
                                       merge_b->dry_run,
                                       merge_b->ra_session2, revision1,
                                       notification_receiver, notify_b,
@@ -6808,7 +6805,6 @@ do_mergeinfo_unaware_dir_merge(const cha
   return drive_merge_report_editor(target_dir_wcpath,
                                    url1, revision1, url2, revision2,
                                    NULL, depth, notify_b,
-                                   &merge_callbacks,
                                    merge_b, pool);
 }
 
@@ -7729,7 +7725,7 @@ do_directory_merge(const char *url1,
                 real_url2, end_rev,
                 notify_b->children_with_mergeinfo,
                 depth, notify_b,
-                &merge_callbacks, merge_b,
+                merge_b,
                 iterpool));
               if (old_sess1_url)
                 SVN_ERR(svn_ra_reparent(merge_b->ra_session1,
@@ -7791,7 +7787,7 @@ do_directory_merge(const char *url1,
                                             url1, revision1, url2, revision2,
                                             NULL,
                                             depth, notify_b,
-                                            &merge_callbacks, merge_b,
+                                            merge_b,
                                             pool));
         }
     }

Modified: subversion/branches/svn-patch-improvements/subversion/libsvn_delta/editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/libsvn_delta/editor.c?rev=930648&r1=930647&r2=930648&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/libsvn_delta/editor.c (original)
+++ subversion/branches/svn-patch-improvements/subversion/libsvn_delta/editor.c Sun Apr  4 09:09:34 2010
@@ -391,7 +391,8 @@ svn_editor_copy(svn_editor_t *editor,
     SVN_ERR((*editor->cancel_func)(editor->cancel_baton));
 
   err = (*editor->funcs.cb_copy)(editor->baton, src_relpath, src_revision,
-                                 dst_relpath, replaces_rev, editor->scratch_pool);
+                                 dst_relpath, replaces_rev,
+                                 editor->scratch_pool);
   svn_pool_clear(editor->scratch_pool);
   return err;
 }
@@ -412,7 +413,8 @@ svn_editor_move(svn_editor_t *editor,
     SVN_ERR((*editor->cancel_func)(editor->cancel_baton));
 
   err = (*editor->funcs.cb_move)(editor->baton, src_relpath, src_revision,
-                                 dst_relpath, replaces_rev, editor->scratch_pool);
+                                 dst_relpath, replaces_rev,
+                                 editor->scratch_pool);
   svn_pool_clear(editor->scratch_pool);
   return err;
 }

Modified: subversion/branches/svn-patch-improvements/subversion/libsvn_fs/fs-loader.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/libsvn_fs/fs-loader.c?rev=930648&r1=930647&r2=930648&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/libsvn_fs/fs-loader.c (original)
+++ subversion/branches/svn-patch-improvements/subversion/libsvn_fs/fs-loader.c Sun Apr  4 09:09:34 2010
@@ -263,7 +263,7 @@ fs_library_vtable(fs_library_vtable_t **
   SVN_ERR(svn_fs_type(&fs_type, path, pool));
 
   /* Fetch the library vtable by name, now that we've chosen one. */
-  return get_library_vtable(vtable, fs_type, pool);
+  return svn_error_return(get_library_vtable(vtable, fs_type, pool));
 }
 
 static svn_error_t *
@@ -279,7 +279,7 @@ write_fs_type(const char *path, const ch
   SVN_ERR(svn_io_file_write_full(file, fs_type, strlen(fs_type), NULL,
                                  pool));
   SVN_ERR(svn_io_file_write_full(file, "\n", 1, NULL, pool));
-  return svn_io_file_close(file, pool);
+  return svn_error_return(svn_io_file_close(file, pool));
 }
 
 
@@ -419,9 +419,9 @@ svn_fs_create(svn_fs_t **fs_p, const cha
   if (err)
     {
       svn_error_clear(err2);
-      return err;
+      return svn_error_return(err);
     }
-  return err2;
+  return svn_error_return(err2);
 }
 
 svn_error_t *
@@ -440,9 +440,9 @@ svn_fs_open(svn_fs_t **fs_p, const char 
   if (err)
     {
       svn_error_clear(err2);
-      return err;
+      return svn_error_return(err);
     }
-  return err2;
+  return svn_error_return(err2);
 }
 
 svn_error_t *
@@ -461,9 +461,9 @@ svn_fs_upgrade(const char *path, apr_poo
   if (err)
     {
       svn_error_clear(err2);
-      return err;
+      return svn_error_return(err);
     }
-  return err2;
+  return svn_error_return(err2);
 }
 
 const char *
@@ -478,7 +478,7 @@ svn_fs_delete_fs(const char *path, apr_p
   fs_library_vtable_t *vtable;
 
   SVN_ERR(fs_library_vtable(&vtable, path, pool));
-  return vtable->delete_fs(path, pool);
+  return svn_error_return(vtable->delete_fs(path, pool));
 }
 
 svn_error_t *
@@ -491,7 +491,7 @@ svn_fs_hotcopy(const char *src_path, con
   SVN_ERR(svn_fs_type(&fs_type, src_path, pool));
   SVN_ERR(get_library_vtable(&vtable, fs_type, pool));
   SVN_ERR(vtable->hotcopy(src_path, dest_path, clean, pool));
-  return write_fs_type(dest_path, fs_type, pool);
+  return svn_error_return(write_fs_type(dest_path, fs_type, pool));
 }
 
 svn_error_t *
@@ -516,9 +516,9 @@ svn_fs_pack(const char *path,
   if (err)
     {
       svn_error_clear(err2);
-      return err;
+      return svn_error_return(err);
     }
-  return err2;
+  return svn_error_return(err2);
 }
 
 svn_error_t *
@@ -539,11 +539,11 @@ svn_fs_recover(const char *path,
   if (err)
     {
       svn_error_clear(err2);
-      return err;
+      return svn_error_return(err);
     }
   if (! err2)
     err2 = vtable->recover(fs, cancel_func, cancel_baton, pool);
-  return err2;
+  return svn_error_return(err2);
 }
 
 
@@ -569,9 +569,9 @@ svn_fs_create_berkeley(svn_fs_t *fs, con
   if (err)
     {
       svn_error_clear(err2);
-      return err;
+      return svn_error_return(err);
     }
-  return err2;
+  return svn_error_return(err2);
 }
 
 svn_error_t *
@@ -588,9 +588,9 @@ svn_fs_open_berkeley(svn_fs_t *fs, const
   if (err)
     {
       svn_error_clear(err2);
-      return err;
+      return svn_error_return(err);
     }
-  return err2;
+  return svn_error_return(err2);
 }
 
 const char *
@@ -602,27 +602,28 @@ svn_fs_berkeley_path(svn_fs_t *fs, apr_p
 svn_error_t *
 svn_fs_delete_berkeley(const char *path, apr_pool_t *pool)
 {
-  return svn_fs_delete_fs(path, pool);
+  return svn_error_return(svn_fs_delete_fs(path, pool));
 }
 
 svn_error_t *
 svn_fs_hotcopy_berkeley(const char *src_path, const char *dest_path,
                         svn_boolean_t clean_logs, apr_pool_t *pool)
 {
-  return svn_fs_hotcopy(src_path, dest_path, clean_logs, pool);
+  return svn_error_return(svn_fs_hotcopy(src_path, dest_path, clean_logs,
+                                         pool));
 }
 
 svn_error_t *
 svn_fs_berkeley_recover(const char *path, apr_pool_t *pool)
 {
-  return svn_fs_recover(path, NULL, NULL, pool);
+  return svn_error_return(svn_fs_recover(path, NULL, NULL, pool));
 }
 
 svn_error_t *
 svn_fs_set_berkeley_errcall(svn_fs_t *fs,
                             void (*handler)(const char *errpfx, char *msg))
 {
-  return fs->vtable->bdb_set_errcall(fs, handler);
+  return svn_error_return(fs->vtable->bdb_set_errcall(fs, handler));
 }
 
 svn_error_t *
@@ -634,7 +635,8 @@ svn_fs_berkeley_logfiles(apr_array_heade
   fs_library_vtable_t *vtable;
 
   SVN_ERR(fs_library_vtable(&vtable, path, pool));
-  return vtable->bdb_logfiles(logfiles, path, only_unused, pool);
+  return svn_error_return(vtable->bdb_logfiles(logfiles, path, only_unused,
+                                               pool));
 }
 
 
@@ -644,7 +646,7 @@ svn_error_t *
 svn_fs_begin_txn2(svn_fs_txn_t **txn_p, svn_fs_t *fs, svn_revnum_t rev,
                   apr_uint32_t flags, apr_pool_t *pool)
 {
-  return fs->vtable->begin_txn(txn_p, fs, rev, flags, pool);
+  return svn_error_return(fs->vtable->begin_txn(txn_p, fs, rev, flags, pool));
 }
 
 
@@ -652,7 +654,7 @@ svn_error_t *
 svn_fs_begin_txn(svn_fs_txn_t **txn_p, svn_fs_t *fs, svn_revnum_t rev,
                  apr_pool_t *pool)
 {
-  return svn_fs_begin_txn2(txn_p, fs, rev, 0, pool);
+  return svn_error_return(svn_fs_begin_txn2(txn_p, fs, rev, 0, pool));
 }
 
 svn_error_t *
@@ -661,7 +663,8 @@ svn_fs__begin_obliteration_txn(svn_fs_tx
                                svn_revnum_t rev,
                                apr_pool_t *pool)
 {
-  return fs->vtable->begin_obliteration_txn(txn_p, fs, rev, pool);
+  return svn_error_return(fs->vtable->begin_obliteration_txn(txn_p, fs, rev,
+                                                             pool));
 }
 
 svn_error_t *
@@ -703,13 +706,13 @@ svn_fs__commit_obliteration_txn(svn_revn
 svn_error_t *
 svn_fs_abort_txn(svn_fs_txn_t *txn, apr_pool_t *pool)
 {
-  return txn->vtable->abort(txn, pool);
+  return svn_error_return(txn->vtable->abort(txn, pool));
 }
 
 svn_error_t *
 svn_fs_purge_txn(svn_fs_t *fs, const char *txn_id, apr_pool_t *pool)
 {
-  return fs->vtable->purge_txn(fs, txn_id, pool);
+  return svn_error_return(fs->vtable->purge_txn(fs, txn_id, pool));
 }
 
 svn_error_t *
@@ -729,41 +732,41 @@ svn_error_t *
 svn_fs_open_txn(svn_fs_txn_t **txn, svn_fs_t *fs, const char *name,
                 apr_pool_t *pool)
 {
-  return fs->vtable->open_txn(txn, fs, name, pool);
+  return svn_error_return(fs->vtable->open_txn(txn, fs, name, pool));
 }
 
 svn_error_t *
 svn_fs_list_transactions(apr_array_header_t **names_p, svn_fs_t *fs,
                          apr_pool_t *pool)
 {
-  return fs->vtable->list_transactions(names_p, fs, pool);
+  return svn_error_return(fs->vtable->list_transactions(names_p, fs, pool));
 }
 
 svn_error_t *
 svn_fs_txn_prop(svn_string_t **value_p, svn_fs_txn_t *txn,
                 const char *propname, apr_pool_t *pool)
 {
-  return txn->vtable->get_prop(value_p, txn, propname, pool);
+  return svn_error_return(txn->vtable->get_prop(value_p, txn, propname, pool));
 }
 
 svn_error_t *
 svn_fs_txn_proplist(apr_hash_t **table_p, svn_fs_txn_t *txn, apr_pool_t *pool)
 {
-  return txn->vtable->get_proplist(table_p, txn, pool);
+  return svn_error_return(txn->vtable->get_proplist(table_p, txn, pool));
 }
 
 svn_error_t *
 svn_fs_change_txn_prop(svn_fs_txn_t *txn, const char *name,
                        const svn_string_t *value, apr_pool_t *pool)
 {
-  return txn->vtable->change_prop(txn, name, value, pool);
+  return svn_error_return(txn->vtable->change_prop(txn, name, value, pool));
 }
 
 svn_error_t *
 svn_fs_change_txn_props(svn_fs_txn_t *txn, const apr_array_header_t *props,
                         apr_pool_t *pool)
 {
-  return txn->vtable->change_props(txn, props, pool);
+  return svn_error_return(txn->vtable->change_props(txn, props, pool));
 }
 
 
@@ -776,7 +779,7 @@ svn_fs_revision_root(svn_fs_root_t **roo
   /* We create a subpool for each root object to allow us to implement
      svn_fs_close_root.  */
   apr_pool_t *subpool = svn_pool_create(pool);
-  return fs->vtable->revision_root(root_p, fs, rev, subpool);
+  return svn_error_return(fs->vtable->revision_root(root_p, fs, rev, subpool));
 }
 
 svn_error_t *
@@ -785,7 +788,7 @@ svn_fs_txn_root(svn_fs_root_t **root_p, 
   /* We create a subpool for each root object to allow us to implement
      svn_fs_close_root.  */
   apr_pool_t *subpool = svn_pool_create(pool);
-  return txn->vtable->root(root_p, txn, subpool);
+  return svn_error_return(txn->vtable->root(root_p, txn, subpool));
 }
 
 void
@@ -871,14 +874,15 @@ svn_error_t *
 svn_fs_check_path(svn_node_kind_t *kind_p, svn_fs_root_t *root,
                   const char *path, apr_pool_t *pool)
 {
-  return root->vtable->check_path(kind_p, root, path, pool);
+  return svn_error_return(root->vtable->check_path(kind_p, root, path, pool));
 }
 
 svn_error_t *
 svn_fs_node_history(svn_fs_history_t **history_p, svn_fs_root_t *root,
                     const char *path, apr_pool_t *pool)
 {
-  return root->vtable->node_history(history_p, root, path, pool);
+  return svn_error_return(root->vtable->node_history(history_p, root, path,
+                                                     pool));
 }
 
 svn_error_t *
@@ -907,42 +911,47 @@ svn_error_t *
 svn_fs_node_id(const svn_fs_id_t **id_p, svn_fs_root_t *root,
                const char *path, apr_pool_t *pool)
 {
-  return root->vtable->node_id(id_p, root, path, pool);
+  return svn_error_return(root->vtable->node_id(id_p, root, path, pool));
 }
 
 svn_error_t *
 svn_fs_node_created_rev(svn_revnum_t *revision, svn_fs_root_t *root,
                         const char *path, apr_pool_t *pool)
 {
-  return root->vtable->node_created_rev(revision, root, path, pool);
+  return svn_error_return(root->vtable->node_created_rev(revision, root, path,
+                                                         pool));
 }
 
 svn_error_t *
 svn_fs_node_origin_rev(svn_revnum_t *revision, svn_fs_root_t *root,
                        const char *path, apr_pool_t *pool)
 {
-  return root->vtable->node_origin_rev(revision, root, path, pool);
+  return svn_error_return(root->vtable->node_origin_rev(revision, root, path,
+                                                        pool));
 }
 
 svn_error_t *
 svn_fs_node_created_path(const char **created_path, svn_fs_root_t *root,
                          const char *path, apr_pool_t *pool)
 {
-  return root->vtable->node_created_path(created_path, root, path, pool);
+  return svn_error_return(root->vtable->node_created_path(created_path, root,
+                                                          path, pool));
 }
 
 svn_error_t *
 svn_fs_node_prop(svn_string_t **value_p, svn_fs_root_t *root,
                  const char *path, const char *propname, apr_pool_t *pool)
 {
-  return root->vtable->node_prop(value_p, root, path, propname, pool);
+  return svn_error_return(root->vtable->node_prop(value_p, root, path,
+                                                  propname, pool));
 }
 
 svn_error_t *
 svn_fs_node_proplist(apr_hash_t **table_p, svn_fs_root_t *root,
                      const char *path, apr_pool_t *pool)
 {
-  return root->vtable->node_proplist(table_p, root, path, pool);
+  return svn_error_return(root->vtable->node_proplist(table_p, root, path,
+                                                      pool));
 }
 
 svn_error_t *
@@ -950,7 +959,8 @@ svn_fs_change_node_prop(svn_fs_root_t *r
                         const char *name, const svn_string_t *value,
                         apr_pool_t *pool)
 {
-  return root->vtable->change_node_prop(root, path, name, value, pool);
+  return svn_error_return(root->vtable->change_node_prop(root, path, name,
+                                                         value, pool));
 }
 
 svn_error_t *
@@ -958,22 +968,26 @@ svn_fs_props_changed(svn_boolean_t *chan
                      const char *path1, svn_fs_root_t *root2,
                      const char *path2, apr_pool_t *pool)
 {
-  return root1->vtable->props_changed(changed_p, root1, path1, root2, path2,
-                                      pool);
+  return svn_error_return(root1->vtable->props_changed(changed_p,
+                                                       root1, path1,
+                                                       root2, path2,
+                                                       pool));
 }
 
 svn_error_t *
 svn_fs_copied_from(svn_revnum_t *rev_p, const char **path_p,
                    svn_fs_root_t *root, const char *path, apr_pool_t *pool)
 {
-  return root->vtable->copied_from(rev_p, path_p, root, path, pool);
+  return svn_error_return(root->vtable->copied_from(rev_p, path_p, root, path,
+                                                    pool));
 }
 
 svn_error_t *
 svn_fs_closest_copy(svn_fs_root_t **root_p, const char **path_p,
                     svn_fs_root_t *root, const char *path, apr_pool_t *pool)
 {
-  return root->vtable->closest_copy(root_p, path_p, root, path, pool);
+  return svn_error_return(root->vtable->closest_copy(root_p, path_p,
+                                                     root, path, pool));
 }
 
 svn_error_t *
@@ -984,8 +998,10 @@ svn_fs_get_mergeinfo(svn_mergeinfo_catal
                      svn_boolean_t include_descendants,
                      apr_pool_t *pool)
 {
-  return root->vtable->get_mergeinfo(catalog, root, paths, inherit,
-                                     include_descendants, pool);
+  return svn_error_return(root->vtable->get_mergeinfo(catalog, root, paths,
+                                                      inherit,
+                                                      include_descendants,
+                                                      pool));
 }
 
 svn_error_t *
@@ -994,29 +1010,32 @@ svn_fs_merge(const char **conflict_p, sv
              const char *target_path, svn_fs_root_t *ancestor_root,
              const char *ancestor_path, apr_pool_t *pool)
 {
-  return target_root->vtable->merge(conflict_p, source_root, source_path,
-                                    target_root, target_path, ancestor_root,
-                                    ancestor_path, pool);
+  return svn_error_return(target_root->vtable->merge(conflict_p,
+                                                     source_root, source_path,
+                                                     target_root, target_path,
+                                                     ancestor_root,
+                                                     ancestor_path, pool));
 }
 
 svn_error_t *
 svn_fs_dir_entries(apr_hash_t **entries_p, svn_fs_root_t *root,
                    const char *path, apr_pool_t *pool)
 {
-  return root->vtable->dir_entries(entries_p, root, path, pool);
+  return svn_error_return(root->vtable->dir_entries(entries_p, root, path,
+                                                    pool));
 }
 
 svn_error_t *
 svn_fs_make_dir(svn_fs_root_t *root, const char *path, apr_pool_t *pool)
 {
   SVN_ERR(path_valid(path, pool));
-  return root->vtable->make_dir(root, path, pool);
+  return svn_error_return(root->vtable->make_dir(root, path, pool));
 }
 
 svn_error_t *
 svn_fs_delete(svn_fs_root_t *root, const char *path, apr_pool_t *pool)
 {
-  return root->vtable->delete_node(root, path, pool);
+  return svn_error_return(root->vtable->delete_node(root, path, pool));
 }
 
 svn_error_t *
@@ -1024,21 +1043,24 @@ svn_fs_copy(svn_fs_root_t *from_root, co
             svn_fs_root_t *to_root, const char *to_path, apr_pool_t *pool)
 {
   SVN_ERR(path_valid(to_path, pool));
-  return to_root->vtable->copy(from_root, from_path, to_root, to_path, pool);
+  return svn_error_return(to_root->vtable->copy(from_root, from_path,
+                                                to_root, to_path, pool));
 }
 
 svn_error_t *
 svn_fs_revision_link(svn_fs_root_t *from_root, svn_fs_root_t *to_root,
                      const char *path, apr_pool_t *pool)
 {
-  return to_root->vtable->revision_link(from_root, to_root, path, pool);
+  return svn_error_return(to_root->vtable->revision_link(from_root, to_root,
+                                                         path, pool));
 }
 
 svn_error_t *
 svn_fs_file_length(svn_filesize_t *length_p, svn_fs_root_t *root,
                    const char *path, apr_pool_t *pool)
 {
-  return root->vtable->file_length(length_p, root, path, pool);
+  return svn_error_return(root->vtable->file_length(length_p, root, path,
+                                                    pool));
 }
 
 svn_error_t *
@@ -1086,14 +1108,15 @@ svn_error_t *
 svn_fs_file_contents(svn_stream_t **contents, svn_fs_root_t *root,
                      const char *path, apr_pool_t *pool)
 {
-  return root->vtable->file_contents(contents, root, path, pool);
+  return svn_error_return(root->vtable->file_contents(contents, root, path,
+                                                      pool));
 }
 
 svn_error_t *
 svn_fs_make_file(svn_fs_root_t *root, const char *path, apr_pool_t *pool)
 {
   SVN_ERR(path_valid(path, pool));
-  return root->vtable->make_file(root, path, pool);
+  return svn_error_return(root->vtable->make_file(root, path, pool));
 }
 
 svn_error_t *
@@ -1111,8 +1134,13 @@ svn_fs_apply_textdelta(svn_txdelta_windo
   SVN_ERR(svn_checksum_parse_hex(&result, svn_checksum_md5, result_checksum,
                                  pool));
 
-  return root->vtable->apply_textdelta(contents_p, contents_baton_p, root,
-                                       path, base, result, pool);
+  return svn_error_return(root->vtable->apply_textdelta(contents_p,
+                                                        contents_baton_p,
+                                                        root,
+                                                        path,
+                                                        base,
+                                                        result,
+                                                        pool));
 }
 
 svn_error_t *
@@ -1127,7 +1155,8 @@ svn_fs_apply_text(svn_stream_t **content
   SVN_ERR(svn_checksum_parse_hex(&result, svn_checksum_md5, result_checksum,
                                  pool));
 
-  return root->vtable->apply_text(contents_p, root, path, result, pool);
+  return svn_error_return(root->vtable->apply_text(contents_p, root, path,
+                                                   result, pool));
 }
 
 svn_error_t *
@@ -1135,41 +1164,46 @@ svn_fs_contents_changed(svn_boolean_t *c
                         const char *path1, svn_fs_root_t *root2,
                         const char *path2, apr_pool_t *pool)
 {
-  return root1->vtable->contents_changed(changed_p, root1, path1, root2,
-                                         path2, pool);
+  return svn_error_return(root1->vtable->contents_changed(changed_p,
+                                                          root1, path1,
+                                                          root2, path2,
+                                                          pool));
 }
 
 svn_error_t *
 svn_fs_youngest_rev(svn_revnum_t *youngest_p, svn_fs_t *fs, apr_pool_t *pool)
 {
-  return fs->vtable->youngest_rev(youngest_p, fs, pool);
+  return svn_error_return(fs->vtable->youngest_rev(youngest_p, fs, pool));
 }
 
 svn_error_t *
 svn_fs_deltify_revision(svn_fs_t *fs, svn_revnum_t revision, apr_pool_t *pool)
 {
-  return fs->vtable->deltify(fs, revision, pool);
+  return svn_error_return(fs->vtable->deltify(fs, revision, pool));
 }
 
 svn_error_t *
 svn_fs_revision_prop(svn_string_t **value_p, svn_fs_t *fs, svn_revnum_t rev,
                      const char *propname, apr_pool_t *pool)
 {
-  return fs->vtable->revision_prop(value_p, fs, rev, propname, pool);
+  return svn_error_return(fs->vtable->revision_prop(value_p, fs, rev,
+                                                    propname, pool));
 }
 
 svn_error_t *
 svn_fs_revision_proplist(apr_hash_t **table_p, svn_fs_t *fs, svn_revnum_t rev,
                          apr_pool_t *pool)
 {
-  return fs->vtable->revision_proplist(table_p, fs, rev, pool);
+  return svn_error_return(fs->vtable->revision_proplist(table_p, fs, rev,
+                                                        pool));
 }
 
 svn_error_t *
 svn_fs_change_rev_prop(svn_fs_t *fs, svn_revnum_t rev, const char *name,
                        const svn_string_t *value, apr_pool_t *pool)
 {
-  return fs->vtable->change_rev_prop(fs, rev, name, value, pool);
+  return svn_error_return(fs->vtable->change_rev_prop(fs, rev, name, value,
+                                                      pool));
 }
 
 svn_error_t *
@@ -1179,15 +1213,16 @@ svn_fs_get_file_delta_stream(svn_txdelta
                              svn_fs_root_t *target_root,
                              const char *target_path, apr_pool_t *pool)
 {
-  return target_root->vtable->get_file_delta_stream(stream_p, source_root,
-                                                    source_path, target_root,
-                                                    target_path, pool);
+  return svn_error_return(target_root->vtable->get_file_delta_stream(
+                            stream_p,
+                            source_root, source_path,
+                            target_root, target_path, pool));
 }
 
 svn_error_t *
 svn_fs_get_uuid(svn_fs_t *fs, const char **uuid, apr_pool_t *pool)
 {
-  return fs->vtable->get_uuid(fs, uuid, pool);
+  return svn_error_return(fs->vtable->get_uuid(fs, uuid, pool));
 }
 
 svn_error_t *
@@ -1205,7 +1240,7 @@ svn_fs_set_uuid(svn_fs_t *fs, const char
         return svn_error_createf(SVN_ERR_BAD_UUID, NULL,
                                  _("Malformed UUID '%s'"), uuid);
     }
-  return fs->vtable->set_uuid(fs, uuid, pool);
+  return svn_error_return(fs->vtable->set_uuid(fs, uuid, pool));
 }
 
 svn_error_t *
@@ -1229,28 +1264,30 @@ svn_fs_lock(svn_lock_t **lock, svn_fs_t 
           (SVN_ERR_INCORRECT_PARAMS, NULL,
            _("Negative expiration date passed to svn_fs_lock"));
 
-  return fs->vtable->lock(lock, fs, path, token, comment, is_dav_comment,
-                          expiration_date, current_rev, steal_lock, pool);
+  return svn_error_return(fs->vtable->lock(lock, fs, path, token, comment,
+                                           is_dav_comment, expiration_date,
+                                           current_rev, steal_lock, pool));
 }
 
 svn_error_t *
 svn_fs_generate_lock_token(const char **token, svn_fs_t *fs, apr_pool_t *pool)
 {
-  return fs->vtable->generate_lock_token(token, fs, pool);
+  return svn_error_return(fs->vtable->generate_lock_token(token, fs, pool));
 }
 
 svn_error_t *
 svn_fs_unlock(svn_fs_t *fs, const char *path, const char *token,
               svn_boolean_t break_lock, apr_pool_t *pool)
 {
-  return fs->vtable->unlock(fs, path, token, break_lock, pool);
+  return svn_error_return(fs->vtable->unlock(fs, path, token, break_lock,
+                                             pool));
 }
 
 svn_error_t *
 svn_fs_get_lock(svn_lock_t **lock, svn_fs_t *fs, const char *path,
                 apr_pool_t *pool)
 {
-  return fs->vtable->get_lock(lock, fs, path, pool);
+  return svn_error_return(fs->vtable->get_lock(lock, fs, path, pool));
 }
 
 svn_error_t *
@@ -1259,8 +1296,8 @@ svn_fs_get_locks(svn_fs_t *fs, const cha
                  void *get_locks_baton,
                  apr_pool_t *pool)
 {
-  return fs->vtable->get_locks(fs, path, get_locks_func,
-                               get_locks_baton, pool);
+  return svn_error_return(fs->vtable->get_locks(fs, path, get_locks_func,
+                                                get_locks_baton, pool));
 }
 
 
@@ -1272,14 +1309,16 @@ svn_fs_history_prev(svn_fs_history_t **p
                     svn_fs_history_t *history, svn_boolean_t cross_copies,
                     apr_pool_t *pool)
 {
-  return history->vtable->prev(prev_history_p, history, cross_copies, pool);
+  return svn_error_return(history->vtable->prev(prev_history_p, history,
+                                                cross_copies, pool));
 }
 
 svn_error_t *
 svn_fs_history_location(const char **path, svn_revnum_t *revision,
                         svn_fs_history_t *history, apr_pool_t *pool)
 {
-  return history->vtable->location(path, revision, history, pool);
+  return svn_error_return(history->vtable->location(path, revision, history,
+                                                    pool));
 }
 
 

Modified: subversion/branches/svn-patch-improvements/subversion/libsvn_fs_fs/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/libsvn_fs_fs/tree.c?rev=930648&r1=930647&r2=930648&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/libsvn_fs_fs/tree.c (original)
+++ subversion/branches/svn-patch-improvements/subversion/libsvn_fs_fs/tree.c Sun Apr  4 09:09:34 2010
@@ -2132,7 +2132,8 @@ fs_copy(svn_fs_root_t *from_root,
         const char *to_path,
         apr_pool_t *pool)
 {
-  return copy_helper(from_root, from_path, to_root, to_path, TRUE, pool);
+  return svn_error_return(copy_helper(from_root, from_path, to_root, to_path,
+                                    TRUE, pool));
 }
 
 
@@ -2148,7 +2149,8 @@ fs_revision_link(svn_fs_root_t *from_roo
   if (! to_root->is_txn_root)
     return SVN_FS__NOT_TXN(to_root);
 
-  return copy_helper(from_root, path, to_root, path, FALSE, pool);
+  return svn_error_return(copy_helper(from_root, path, to_root, path,
+                                      FALSE, pool));
 }
 
 

Modified: subversion/branches/svn-patch-improvements/subversion/libsvn_repos/delta.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/libsvn_repos/delta.c?rev=930648&r1=930647&r2=930648&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/libsvn_repos/delta.c (original)
+++ subversion/branches/svn-patch-improvements/subversion/libsvn_repos/delta.c Sun Apr  4 09:09:34 2010
@@ -656,7 +656,7 @@ svn_repos__compare_files(svn_boolean_t *
   SVN_ERR(svn_fs_file_contents(&stream1, root1, path1, pool));
   SVN_ERR(svn_fs_file_contents(&stream2, root2, path2, pool));
 
-  SVN_ERR(svn_stream_contents_same(&same, stream1, stream2, pool));
+  SVN_ERR(svn_stream_contents_same2(&same, stream1, stream2, pool));
 
   *changed_p = !same;
 

Modified: subversion/branches/svn-patch-improvements/subversion/libsvn_subr/cmdline.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/libsvn_subr/cmdline.c?rev=930648&r1=930647&r2=930648&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/libsvn_subr/cmdline.c (original)
+++ subversion/branches/svn-patch-improvements/subversion/libsvn_subr/cmdline.c Sun Apr  4 09:09:34 2010
@@ -31,6 +31,8 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <unistd.h>
+#else
+#include <crtdbg.h>
 #endif
 
 #include <apr_errno.h>          /* for apr_strerror */
@@ -124,7 +126,27 @@ svn_cmdline_init(const char *progname, F
 #ifdef SVN_USE_WIN32_CRASHHANDLER
   /* Attach (but don't load) the crash handler */
   SetUnhandledExceptionFilter(svn__unhandled_exception_filter);
-#endif
+
+#if _MSC_VER >= 1400
+  /* ### This should work for VC++ 2002 (=1300) and later */
+  /* Show the abort message on STDERR instead of a dialog to allow
+     scripts (e.g. our testsuite) to continue after an abort without
+     user intervention. Allow overriding for easier debugging. */
+  if (!getenv("SVN_CMDLINE_USE_DIALOG_FOR_ABORT"))
+    {
+      /* In release mode: Redirect abort() errors to stderr */
+      _set_error_mode(_OUT_TO_STDERR);
+
+      /* In _DEBUG mode: Redirect all debug output (E.g. assert() to stderr.
+         (Ignored in releas builds) */
+      _CrtSetReportFile( _CRT_ASSERT, _CRTDBG_FILE_STDERR);
+      _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
+      _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
+      _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
+    }
+#endif /* _MSC_VER >= 1400 */
+
+#endif /* SVN_USE_WIN32_CRASHHANDLER */
 
 #endif /* WIN32 */
 

Modified: subversion/branches/svn-patch-improvements/subversion/libsvn_subr/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/libsvn_subr/deprecated.c?rev=930648&r1=930647&r2=930648&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/libsvn_subr/deprecated.c (original)
+++ subversion/branches/svn-patch-improvements/subversion/libsvn_subr/deprecated.c Sun Apr  4 09:09:34 2010
@@ -856,6 +856,19 @@ svn_stream_from_aprfile(apr_file_t *file
   return svn_stream_from_aprfile2(file, TRUE, pool);
 }
 
+svn_error_t *
+svn_stream_contents_same(svn_boolean_t *same,
+                         svn_stream_t *stream1,
+                         svn_stream_t *stream2,
+                         apr_pool_t *pool)
+{
+  return svn_error_return(svn_stream_contents_same2(
+                            same,
+                            svn_stream_disown(stream1, pool),
+                            svn_stream_disown(stream2, pool),
+                            pool));
+}
+
 /*** From path.c ***/
 
 const char *

Modified: subversion/branches/svn-patch-improvements/subversion/libsvn_subr/stream.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/libsvn_subr/stream.c?rev=930648&r1=930647&r2=930648&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/libsvn_subr/stream.c (original)
+++ subversion/branches/svn-patch-improvements/subversion/libsvn_subr/stream.c Sun Apr  4 09:09:34 2010
@@ -472,22 +472,27 @@ svn_error_t *svn_stream_copy3(svn_stream
 }
 
 svn_error_t *
-svn_stream_contents_same(svn_boolean_t *same,
-                         svn_stream_t *stream1,
-                         svn_stream_t *stream2,
-                         apr_pool_t *pool)
+svn_stream_contents_same2(svn_boolean_t *same,
+                          svn_stream_t *stream1,
+                          svn_stream_t *stream2,
+                          apr_pool_t *pool)
 {
   char *buf1 = apr_palloc(pool, SVN__STREAM_CHUNK_SIZE);
   char *buf2 = apr_palloc(pool, SVN__STREAM_CHUNK_SIZE);
   apr_size_t bytes_read1 = SVN__STREAM_CHUNK_SIZE;
   apr_size_t bytes_read2 = SVN__STREAM_CHUNK_SIZE;
+  svn_error_t *err = NULL;
 
   *same = TRUE;  /* assume TRUE, until disproved below */
   while (bytes_read1 == SVN__STREAM_CHUNK_SIZE
          && bytes_read2 == SVN__STREAM_CHUNK_SIZE)
     {
-      SVN_ERR(svn_stream_read(stream1, buf1, &bytes_read1));
-      SVN_ERR(svn_stream_read(stream2, buf2, &bytes_read2));
+      err = svn_stream_read(stream1, buf1, &bytes_read1);
+      if (err)
+        break;
+      err = svn_stream_read(stream2, buf2, &bytes_read2);
+      if (err)
+        break;
 
       if ((bytes_read1 != bytes_read2)
           || (memcmp(buf1, buf2, bytes_read1)))
@@ -497,7 +502,10 @@ svn_stream_contents_same(svn_boolean_t *
         }
     }
 
-  return SVN_NO_ERROR;
+  return svn_error_compose_create(err,
+                                  svn_error_compose_create(
+                                    svn_stream_close(stream1),
+                                    svn_stream_close(stream2)));
 }
 
 

Modified: subversion/branches/svn-patch-improvements/subversion/libsvn_wc/adm_crawler.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/libsvn_wc/adm_crawler.c?rev=930648&r1=930647&r2=930648&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/libsvn_wc/adm_crawler.c (original)
+++ subversion/branches/svn-patch-improvements/subversion/libsvn_wc/adm_crawler.c Sun Apr  4 09:09:34 2010
@@ -47,6 +47,7 @@
 #include "translate.h"
 #include "entries.h"
 #include "lock.h"
+#include "workqueue.h"
 
 #include "svn_private_config.h"
 
@@ -66,108 +67,33 @@ static svn_error_t *
 restore_file(svn_wc__db_t *db,
              const char *local_abspath,
              svn_boolean_t use_commit_times,
-             apr_pool_t *pool)
+             apr_pool_t *scratch_pool)
 {
-  svn_stream_t *src_stream;
-  svn_boolean_t special;
-  apr_time_t text_time;
-
-  SVN_ERR(svn_wc__get_pristine_contents(&src_stream, db, local_abspath, pool,
-                                        pool));
-  if (src_stream == NULL)
-    /* Nothing to restore. */
-    return SVN_NO_ERROR;
-
-  SVN_ERR(svn_wc__get_special(&special, db, local_abspath, pool));
-  if (special)
-    {
-      svn_stream_t *dst_stream;
-
-      /* Copy the source into the destination to create the special file.
-         The creation wil happen atomically. */
-      SVN_ERR(svn_subst_create_specialfile(&dst_stream, local_abspath,
-                                           pool, pool));
-      /* ### need a cancel_func/baton */
-      SVN_ERR(svn_stream_copy3(src_stream, dst_stream, NULL, NULL, pool));
-    }
-  else
-    {
-      svn_subst_eol_style_t style;
-      const char *eol_str;
-      apr_hash_t *keywords;
-      const char *tmp_dir;
-      const char *tmp_file;
-      svn_stream_t *tmp_stream;
-
-      SVN_ERR(svn_wc__get_eol_style(&style, &eol_str, db, local_abspath,
-                                    pool, pool));
-      SVN_ERR(svn_wc__get_keywords(&keywords, db, local_abspath, NULL, pool,
-                                   pool));
-
-      /* Get a temporary destination so we can use a rename to create the
-         real destination atomically. */
-      SVN_ERR(svn_wc__db_temp_wcroot_tempdir(&tmp_dir, db, local_abspath,
-                                             pool, pool));
-      SVN_ERR(svn_stream_open_unique(&tmp_stream, &tmp_file, tmp_dir,
-                                     svn_io_file_del_none, pool, pool));
-
-      /* Wrap the (temp) destination stream with a translating stream. */
-      if (svn_subst_translation_required(style, eol_str, keywords,
-                                         FALSE /* special */,
-                                         TRUE /* force_eol_check */))
-        {
-          tmp_stream = svn_subst_stream_translated(tmp_stream,
-                                                   eol_str,
-                                                   TRUE /* repair */,
-                                                   keywords,
-                                                   TRUE /* expand */,
-                                                   pool);
-        }
+  const svn_skel_t *work_item;
 
-      SVN_ERR(svn_stream_copy3(src_stream, tmp_stream, NULL, NULL, pool));
-      /* ### need a cancel_func/baton */
-      SVN_ERR(svn_io_file_rename(tmp_file, local_abspath, pool));
-    }
-
-  SVN_ERR(svn_wc__maybe_set_read_only(NULL, db, local_abspath, pool));
-
-  /* If necessary, tweak the new working file's executable bit. */
-  SVN_ERR(svn_wc__maybe_set_executable(NULL, db, local_abspath, pool));
+  SVN_ERR(svn_wc__wq_build_file_install(&work_item,
+                                        db, local_abspath,
+                                        NULL /* source_abspath */,
+                                        use_commit_times,
+                                        TRUE /* record_fileinfo */,
+                                        scratch_pool, scratch_pool));
+  /* ### we need an existing path for wq_add. not entirely WRI_ABSPATH yet  */
+  SVN_ERR(svn_wc__db_wq_add(db,
+                            svn_dirent_dirname(local_abspath, scratch_pool),
+                            work_item, scratch_pool));
+
+  /* Run the work item immediately.  */
+  SVN_ERR(svn_wc__wq_run(db, local_abspath,
+                         NULL, NULL, /* ### nice to have cancel_func/baton */
+                         scratch_pool));
 
   /* Remove any text conflict */
   SVN_ERR(svn_wc__internal_resolved_conflict(
                     db, local_abspath, svn_depth_empty, TRUE, NULL, FALSE,
                     svn_wc_conflict_choose_merged, NULL, NULL, NULL, NULL,
-                    pool));
-
-  /* Possibly set timestamp to last-commit-time. */
-  if (use_commit_times && (! special))
-    {
-      apr_time_t changed_date;
+                    scratch_pool));
 
-      SVN_ERR(svn_wc__db_read_info(NULL, NULL, NULL,
-                                   NULL, NULL, NULL,
-                                   NULL, &changed_date, NULL,
-                                   NULL, NULL, NULL, NULL, NULL,
-                                   NULL, NULL, NULL, NULL,
-                                   NULL, NULL, NULL,
-                                   NULL, NULL, NULL,
-                                   db, local_abspath,
-                                   pool, pool));
-
-      SVN_ERR(svn_io_set_file_affected_time(changed_date, local_abspath,
-                                            pool));
-
-      text_time = changed_date;
-    }
-  else
-    {
-      SVN_ERR(svn_io_file_affected_time(&text_time, local_abspath, pool));
-    }
-
-  /* Modify our entry's text-timestamp to match the working file. */
-  return svn_error_return(
-    svn_wc__db_op_set_last_mod_time(db, local_abspath, text_time, pool));
+  return SVN_NO_ERROR;
 }
 
 /* Try to restore LOCAL_ABSPATH of node type KIND and if successfull,

Modified: subversion/branches/svn-patch-improvements/subversion/libsvn_wc/adm_ops.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/libsvn_wc/adm_ops.c?rev=930648&r1=930647&r2=930648&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/branches/svn-patch-improvements/subversion/libsvn_wc/adm_ops.c Sun Apr  4 09:09:34 2010
@@ -1526,7 +1526,11 @@ svn_wc_add4(svn_wc_context_t *wc_ctx,
                                                 pool);
 
           /* Make sure this new directory has an admistrative subdirectory
-             created inside of it */
+             created inside of it.
+
+             This creates a BASE_NODE for an added directory, really
+             it should create a WORKING_NODE.  It gets removed by the
+             next modify2 call. */
           SVN_ERR(svn_wc__internal_ensure_adm(db, local_abspath,
                                               new_url, parent_entry->repos,
                                               parent_entry->uuid, 0,
@@ -1537,11 +1541,7 @@ svn_wc_add4(svn_wc_context_t *wc_ctx,
           /* When we are called with the copyfrom arguments set and with
              the admin directory already in existence, then the dir will
              contain the copyfrom settings.  So we need to pass the
-             copyfrom arguments to the ensure call.
-
-             This creates a BASE_NODE for an added directory, really
-             it should create a WORKING_NODE.  It gets removed by the
-             next modify2 call. */
+             copyfrom arguments to the ensure call. */
           SVN_ERR(svn_wc__internal_ensure_adm(db, local_abspath,
                                               copyfrom_url,
                                               parent_entry->repos,
@@ -1584,15 +1584,16 @@ svn_wc_add4(svn_wc_context_t *wc_ctx,
          This deletes the erroneous BASE_NODE for added directories and
          adds a WORKING_NODE. */
       modify_flags |= SVN_WC__ENTRY_MODIFY_FORCE;
-      modify_flags |= SVN_WC__ENTRY_MODIFY_INCOMPLETE;
       tmp_entry.schedule = is_replace
                            ? svn_wc_schedule_replace
                            : svn_wc_schedule_add;
-      tmp_entry.incomplete = FALSE;
       SVN_ERR(svn_wc__entry_modify2(db, local_abspath, svn_node_dir,
                                     FALSE /* parent_stub */,
                                     &tmp_entry, modify_flags, pool));
 
+      SVN_ERR(svn_wc__db_temp_op_set_working_incomplete(
+                db, local_abspath, FALSE, pool));
+
       if (copyfrom_url)
         {
           /* If this new directory has ancestry, it's not enough to