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

svn commit: r1241415 [1/2] - in /subversion/branches/moves-scan-log: ./ build/ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/org/apache/subversion/javahl/ subversion/include/ subversion/libsvn_client/ subversion/libsvn_delta/ subver...

Author: stsp
Date: Tue Feb  7 10:33:18 2012
New Revision: 1241415

URL: http://svn.apache.org/viewvc?rev=1241415&view=rev
Log:
Sync the moves-scan-log branch with trunk.

Added:
    subversion/branches/moves-scan-log/tools/dev/mergegraph/
      - copied from r1241413, subversion/trunk/tools/dev/mergegraph/
Modified:
    subversion/branches/moves-scan-log/   (props changed)
    subversion/branches/moves-scan-log/CHANGES
    subversion/branches/moves-scan-log/build/run_tests.py
    subversion/branches/moves-scan-log/subversion/bindings/javahl/native/SVNClient.cpp
    subversion/branches/moves-scan-log/subversion/bindings/javahl/native/SVNClient.h
    subversion/branches/moves-scan-log/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
    subversion/branches/moves-scan-log/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
    subversion/branches/moves-scan-log/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
    subversion/branches/moves-scan-log/subversion/include/svn_checksum.h
    subversion/branches/moves-scan-log/subversion/include/svn_config.h
    subversion/branches/moves-scan-log/subversion/include/svn_editor.h
    subversion/branches/moves-scan-log/subversion/include/svn_io.h
    subversion/branches/moves-scan-log/subversion/include/svn_repos.h
    subversion/branches/moves-scan-log/subversion/libsvn_client/commit_util.c
    subversion/branches/moves-scan-log/subversion/libsvn_client/repos_diff.c
    subversion/branches/moves-scan-log/subversion/libsvn_delta/compat.c
    subversion/branches/moves-scan-log/subversion/libsvn_delta/editor.c
    subversion/branches/moves-scan-log/subversion/libsvn_fs_base/tree.c
    subversion/branches/moves-scan-log/subversion/libsvn_fs_fs/tree.c
    subversion/branches/moves-scan-log/subversion/libsvn_repos/commit.c
    subversion/branches/moves-scan-log/subversion/libsvn_repos/fs-wrap.c
    subversion/branches/moves-scan-log/subversion/libsvn_repos/hooks.c
    subversion/branches/moves-scan-log/subversion/libsvn_repos/load-fs-vtable.c
    subversion/branches/moves-scan-log/subversion/libsvn_repos/reporter.c
    subversion/branches/moves-scan-log/subversion/libsvn_repos/repos.c
    subversion/branches/moves-scan-log/subversion/libsvn_repos/repos.h
    subversion/branches/moves-scan-log/subversion/libsvn_subr/checksum.c
    subversion/branches/moves-scan-log/subversion/libsvn_subr/deprecated.c
    subversion/branches/moves-scan-log/subversion/libsvn_subr/io.c
    subversion/branches/moves-scan-log/subversion/libsvn_wc/externals.c
    subversion/branches/moves-scan-log/subversion/libsvn_wc/update_editor.c
    subversion/branches/moves-scan-log/subversion/mod_dav_svn/dav_svn.h
    subversion/branches/moves-scan-log/subversion/mod_dav_svn/liveprops.c
    subversion/branches/moves-scan-log/subversion/mod_dav_svn/mod_dav_svn.c
    subversion/branches/moves-scan-log/subversion/mod_dav_svn/repos.c
    subversion/branches/moves-scan-log/subversion/svn/cl.h
    subversion/branches/moves-scan-log/subversion/svn/diff-cmd.c
    subversion/branches/moves-scan-log/subversion/svn/main.c
    subversion/branches/moves-scan-log/subversion/svnserve/serve.c
    subversion/branches/moves-scan-log/subversion/tests/cmdline/update_tests.py
    subversion/branches/moves-scan-log/subversion/tests/libsvn_subr/checksum-test.c
    subversion/branches/moves-scan-log/tools/dev/merge-graph.py   (contents, props changed)
    subversion/branches/moves-scan-log/tools/dist/backport.pl

Propchange: subversion/branches/moves-scan-log/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb  7 10:33:18 2012
@@ -57,4 +57,4 @@
 /subversion/branches/tree-conflicts:868291-873154
 /subversion/branches/tree-conflicts-notify:873926-874008
 /subversion/branches/uris-as-urls:1060426-1064427
-/subversion/trunk:1186288-1239609
+/subversion/trunk:1186288-1241413

Modified: subversion/branches/moves-scan-log/CHANGES
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/CHANGES?rev=1241415&r1=1241414&r2=1241415&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/CHANGES (original)
+++ subversion/branches/moves-scan-log/CHANGES Tue Feb  7 10:33:18 2012
@@ -17,7 +17,8 @@ http://svn.apache.org/repos/asf/subversi
     * 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 --no-diff-properties option for 'svn diff' (r1239553)
+    * new SVNHooksEnv configuration option for mod_dav_svn (r1239966)
+    * new --ignore-properties option for 'svn diff' (r1239553. -617)
     * new --patch-compatible option for 'svn diff' (r1239561)
 
   - Client-side bugfixes:

Modified: subversion/branches/moves-scan-log/build/run_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/build/run_tests.py?rev=1241415&r1=1241414&r2=1241415&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/build/run_tests.py (original)
+++ subversion/branches/moves-scan-log/build/run_tests.py Tue Feb  7 10:33:18 2012
@@ -43,7 +43,6 @@ separated list of test numbers; the defa
 '''
 
 # A few useful constants
-LINE_LENGTH = 45
 SVN_VER_MINOR = 8
 
 import os, re, subprocess, sys, imp
@@ -72,6 +71,38 @@ class TextColors:
     cls.SUCCESS = ''
 
 
+def _get_term_width():
+  'Attempt to discern the width of the terminal'
+  # This may not work on all platforms, in which case the default of 80
+  # characters is used.  Improvements welcomed.
+
+  def ioctl_GWINSZ(fd):
+    try:
+      import fcntl, termios, struct, os
+      cr = struct.unpack('hh', fcntl.ioctl(fd, termios.TIOCGWINSZ, '1234'))
+    except:
+      return None
+    return cr
+
+  cr = ioctl_GWINSZ(0) or ioctl_GWINSZ(1) or ioctl_GWINSZ(2)
+  if not cr:
+    try:
+      fd = os.open(os.ctermid(), os.O_RDONLY)
+      cr = ioctl_GWINSZ(fd)
+      os.close(fd)
+    except:
+      pass
+  if not cr:
+    try:
+      cr = (env['LINES'], env['COLUMNS'])
+    except:
+      cr = None
+  if not cr:
+    # Default
+    cr = (25, 80)
+  return int(cr[1])
+
+
 class TestHarness:
   '''Test harness for Subversion tests.
   '''
@@ -511,14 +542,17 @@ class TestHarness:
 
     progabs = os.path.abspath(os.path.join(self.srcdir, prog))
     old_cwd = os.getcwd()
+    line_length = _get_term_width()
+    dots_needed = line_length \
+                    - len(test_info) \
+                    - len('Running tests in ') \
+                    - len('success')
     try:
       os.chdir(progdir)
       if progbase[-3:] == '.py':
-        failed = self._run_py_test(progabs, test_nums,
-                                   (LINE_LENGTH - len(test_info)))
+        failed = self._run_py_test(progabs, test_nums, dots_needed)
       else:
-        failed = self._run_c_test(prog, test_nums,
-                                  (LINE_LENGTH - len(test_info)))
+        failed = self._run_c_test(prog, test_nums, dots_needed)
     except:
       os.chdir(old_cwd)
       raise

Modified: subversion/branches/moves-scan-log/subversion/bindings/javahl/native/SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/bindings/javahl/native/SVNClient.cpp?rev=1241415&r1=1241414&r2=1241415&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/bindings/javahl/native/SVNClient.cpp (original)
+++ subversion/branches/moves-scan-log/subversion/bindings/javahl/native/SVNClient.cpp Tue Feb  7 10:33:18 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,7 @@ void SVNClient::diff(const char *target1
                                    noDiffDelete,
                                    showCopiesAsAdds,
                                    force,
-                                   FALSE, /* ignore_prop_diff */
+                                   ignoreProps,
                                    FALSE, /* use_git_diff_format */
                                    SVN_APR_LOCALE_CHARSET,
                                    outputStream.getStream(subPool),
@@ -998,7 +999,7 @@ void SVNClient::diff(const char *target1
                                noDiffDelete,
                                showCopiesAsAdds,
                                force,
-                               FALSE, /* ignore_prop_diff */
+                               ignoreProps,
                                FALSE, /* use_git_diff_format */
                                SVN_APR_LOCALE_CHARSET,
                                outputStream.getStream(subPool),
@@ -1015,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,
@@ -1027,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/moves-scan-log/subversion/bindings/javahl/native/SVNClient.h
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/bindings/javahl/native/SVNClient.h?rev=1241415&r1=1241414&r2=1241415&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/bindings/javahl/native/SVNClient.h (original)
+++ subversion/branches/moves-scan-log/subversion/bindings/javahl/native/SVNClient.h Tue Feb  7 10:33:18 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/moves-scan-log/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp?rev=1241415&r1=1241414&r2=1241415&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp (original)
+++ subversion/branches/moves-scan-log/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp Tue Feb  7 10:33:18 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/moves-scan-log/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java?rev=1241415&r1=1241414&r2=1241415&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java (original)
+++ subversion/branches/moves-scan-log/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java Tue Feb  7 10:33:18 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/moves-scan-log/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java?rev=1241415&r1=1241414&r2=1241415&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java (original)
+++ subversion/branches/moves-scan-log/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java Tue Feb  7 10:33:18 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/moves-scan-log/subversion/include/svn_checksum.h
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/include/svn_checksum.h?rev=1241415&r1=1241414&r2=1241415&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/include/svn_checksum.h (original)
+++ subversion/branches/moves-scan-log/subversion/include/svn_checksum.h Tue Feb  7 10:33:18 2012
@@ -239,6 +239,14 @@ svn_checksum_final(svn_checksum_t **chec
 apr_size_t
 svn_checksum_size(const svn_checksum_t *checksum);
 
+/**
+ * Return @c TRUE iff CHECKSUM matches the checksum for the empty string.
+ *
+ * @since New in 1.8.
+ */
+svn_boolean_t
+svn_checksum_is_empty_checksum(svn_checksum_t *checksum);
+
 
 /**
  * Return an error of type #SVN_ERR_CHECKSUM_MISMATCH for @a actual and

Modified: subversion/branches/moves-scan-log/subversion/include/svn_config.h
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/include/svn_config.h?rev=1241415&r1=1241414&r2=1241415&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/include/svn_config.h (original)
+++ subversion/branches/moves-scan-log/subversion/include/svn_config.h Tue Feb  7 10:33:18 2012
@@ -135,6 +135,8 @@ typedef struct svn_config_t svn_config_t
 #define SVN_CONFIG_OPTION_USE_SASL                  "use-sasl"
 #define SVN_CONFIG_OPTION_MIN_SSF                   "min-encryption"
 #define SVN_CONFIG_OPTION_MAX_SSF                   "max-encryption"
+/** @since New in 1.8. */
+#define SVN_CONFIG_SECTION_HOOKS_ENV            "hooks-env"
 
 /* For repository password database */
 #define SVN_CONFIG_SECTION_USERS                "users"

Modified: subversion/branches/moves-scan-log/subversion/include/svn_editor.h
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/include/svn_editor.h?rev=1241415&r1=1241414&r2=1241415&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/include/svn_editor.h (original)
+++ subversion/branches/moves-scan-log/subversion/include/svn_editor.h Tue Feb  7 10:33:18 2012
@@ -176,9 +176,9 @@ extern "C" {
  *      svn_editor_setcb_add_file() \n
  *      svn_editor_setcb_add_symlink() \n
  *      svn_editor_setcb_add_absent() \n
- *      svn_editor_setcb_set_props() \n
- *      svn_editor_setcb_set_text() \n
- *      svn_editor_setcb_set_target() \n
+ *      svn_editor_setcb_alter_directory() \n
+ *      svn_editor_setcb_alter_file() \n
+ *      svn_editor_setcb_alter_symlink() \n
  *      svn_editor_setcb_delete() \n
  *      svn_editor_setcb_copy() \n
  *      svn_editor_setcb_move() \n
@@ -199,9 +199,9 @@ extern "C" {
  *      svn_editor_add_file() \n
  *      svn_editor_add_symlink() \n
  *      svn_editor_add_absent() \n
- *      svn_editor_set_props() \n
- *      svn_editor_set_text() \n
- *      svn_editor_set_target() \n
+ *      svn_editor_alter_directory() \n
+ *      svn_editor_alter_file() \n
+ *      svn_editor_alter_symlink() \n
  *      svn_editor_delete() \n
  *      svn_editor_copy() \n
  *      svn_editor_move() \n
@@ -241,6 +241,7 @@ extern "C" {
  *   follow for each child mentioned in the @a children argument of any
  *   svn_editor_add_directory() call.
  *
+ * ### fix the below paragraph
  * - svn_editor_set_props()
  *   - The @a complete argument must be TRUE if no more calls will follow on
  *     the same path. @a complete must always be TRUE for directories.
@@ -250,12 +251,14 @@ extern "C" {
  *     - if @a relpath is a symlink, this must (at some point) be followed by
  *       an svn_editor_set_target() call on the same path.
  *
+ * ### fix the below paragraph
  * - svn_editor_set_text() and svn_editor_set_target() must always occur
  *   @b after an svn_editor_set_props() call on the same path, if any.
  *
  *   In other words, if there are two calls coming in on the same path, the
  *   first of them has to be svn_editor_set_props().
  *
+ * ### fix the below paragraph
  * - Other than the above two pairs of linked operations, a path should
  *   never be referenced more than once by the add_* and set_* and the
  *   delete operations (the "Once Rule"). The source path of a copy (and
@@ -293,6 +296,7 @@ extern "C" {
  *   by a delete... that is fine. It is simply that svn_editor_move()
  *   should be used to describe a semantic move.
  *
+ * ### fix the below paragraph
  * - 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.
@@ -309,6 +313,7 @@ extern "C" {
  * \n\n
  *
  * <h3>Receiving Restrictions</h3>
+ * ### fix the below paragraph
  * All callbacks must complete their handling of a path before they
  * return, except for the following pairs, where a change must be completed
  * when receiving the second callback in each pair:
@@ -463,35 +468,36 @@ typedef svn_error_t *(*svn_editor_cb_add
   svn_revnum_t replaces_rev,
   apr_pool_t *scratch_pool);
 
-/** @see svn_editor_set_props(), svn_editor_t.
+/** @see svn_editor_alter_directory(), svn_editor_t.
  * @since New in 1.8.
  */
-typedef svn_error_t *(*svn_editor_cb_set_props_t)(
+typedef svn_error_t *(*svn_editor_cb_alter_directory_t)(
   void *baton,
   const char *relpath,
   svn_revnum_t revision,
   apr_hash_t *props,
-  svn_boolean_t complete,
   apr_pool_t *scratch_pool);
 
-/** @see svn_editor_set_text(), svn_editor_t.
+/** @see svn_editor_alter_file(), svn_editor_t.
  * @since New in 1.8.
  */
-typedef svn_error_t *(*svn_editor_cb_set_text_t)(
+typedef svn_error_t *(*svn_editor_cb_alter_file_t)(
   void *baton,
   const char *relpath,
   svn_revnum_t revision,
+  apr_hash_t *props,
   const svn_checksum_t *checksum,
   svn_stream_t *contents,
   apr_pool_t *scratch_pool);
 
-/** @see svn_editor_set_target(), svn_editor_t.
+/** @see svn_editor_alter_symlink(), svn_editor_t.
  * @since New in 1.8.
  */
-typedef svn_error_t *(*svn_editor_cb_set_target_t)(
+typedef svn_error_t *(*svn_editor_cb_alter_symlink_t)(
   void *baton,
   const char *relpath,
   svn_revnum_t revision,
+  apr_hash_t *props,
   const char *target,
   apr_pool_t *scratch_pool);
 
@@ -619,38 +625,38 @@ svn_editor_setcb_add_absent(svn_editor_t
                             svn_editor_cb_add_absent_t callback,
                             apr_pool_t *scratch_pool);
 
-/** Sets the #svn_editor_cb_set_props_t callback in @a editor
+/** Sets the #svn_editor_cb_alter_directory_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_set_props(svn_editor_t *editor,
-                           svn_editor_cb_set_props_t callback,
-                           apr_pool_t *scratch_pool);
+svn_editor_setcb_alter_directory(svn_editor_t *editor,
+                                 svn_editor_cb_alter_directory_t callback,
+                                 apr_pool_t *scratch_pool);
 
-/** Sets the #svn_editor_cb_set_text_t callback in @a editor
+/** Sets the #svn_editor_cb_alter_file_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_set_text(svn_editor_t *editor,
-                          svn_editor_cb_set_text_t callback,
-                          apr_pool_t *scratch_pool);
+svn_editor_setcb_alter_file(svn_editor_t *editor,
+                            svn_editor_cb_alter_file_t callback,
+                            apr_pool_t *scratch_pool);
 
-/** Sets the #svn_editor_cb_set_target_t callback in @a editor
+/** Sets the #svn_editor_cb_alter_symlink_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_set_target(svn_editor_t *editor,
-                            svn_editor_cb_set_target_t callback,
-                            apr_pool_t *scratch_pool);
+svn_editor_setcb_alter_symlink(svn_editor_t *editor,
+                               svn_editor_cb_alter_symlink_t callback,
+                               apr_pool_t *scratch_pool);
 
 /** Sets the #svn_editor_cb_delete_t callback in @a editor
  * to @a callback.
@@ -730,9 +736,9 @@ typedef struct svn_editor_cb_many_t
   svn_editor_cb_add_file_t cb_add_file;
   svn_editor_cb_add_symlink_t cb_add_symlink;
   svn_editor_cb_add_absent_t cb_add_absent;
-  svn_editor_cb_set_props_t cb_set_props;
-  svn_editor_cb_set_text_t cb_set_text;
-  svn_editor_cb_set_target_t cb_set_target;
+  svn_editor_cb_alter_directory_t cb_alter_directory;
+  svn_editor_cb_alter_file_t cb_alter_file;
+  svn_editor_cb_alter_symlink_t cb_alter_symlink;
   svn_editor_cb_delete_t cb_delete;
   svn_editor_cb_copy_t cb_copy;
   svn_editor_cb_move_t cb_move;
@@ -851,66 +857,57 @@ svn_editor_add_absent(svn_editor_t *edit
                       svn_kind_t kind,
                       svn_revnum_t replaces_rev);
 
-/** Drive @a editor's #svn_editor_cb_set_props_t callback.
+/** Drive @a editor's #svn_editor_cb_alter_directory_t callback.
  *
- * Set or change properties on the existing node at @a relpath.  This
- * function sends *all* properties, both existing and changes.
- * ### TODO @todo What is REVISION for?
- * ### HKW: This is puzzling to me as well...
- * ###
- * ### what about "entry props"? will these still be handled via
- * ### the general prop function?
+ * ### TODO: docco
+ * ### talk about revision as "the rev I'm trying to change". probably
+ * ### INVALID for destinations of copied/moved/rotated nodes
  *
  * For a description of @a props, see svn_editor_add_file().
  *
- * @a complete must be FALSE if and only if
- * - @a relpath is a file and an svn_editor_set_text() call will follow on
- *   the same path, or
- * - @a relpath is a symbolic link and an svn_editor_set_target() call will
- *   follow on the same path.
- *
  * For all restrictions on driving the editor, see #svn_editor_t.
  * @since New in 1.8.
  */
 svn_error_t *
-svn_editor_set_props(svn_editor_t *editor,
-                     const char *relpath,
-                     svn_revnum_t revision,
-                     apr_hash_t *props,
-                     svn_boolean_t complete);
-
-/** Drive @a editor's #svn_editor_cb_set_text_t callback.
+svn_editor_alter_directory(svn_editor_t *editor,
+                           const char *relpath,
+                           svn_revnum_t revision,
+                           apr_hash_t *props);
+
+/** Drive @a editor's #svn_editor_cb_alter_file_t callback.
+ *
+ * ### TODO: docco
+ * ### talk about stream closure and lazy-load. same as add_file?
+ * ### checksum is for the new checksum, not the old/current.
  *
- * Set/change the text content of a file at @a relpath to @a contents
- * 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 a description of @a props, see svn_editor_add_file().
  *
  * For all restrictions on driving the editor, see #svn_editor_t.
  * @since New in 1.8.
  */
 svn_error_t *
-svn_editor_set_text(svn_editor_t *editor,
-                    const char *relpath,
-                    svn_revnum_t revision,
-                    const svn_checksum_t *checksum,
-                    svn_stream_t *contents);
+svn_editor_alter_file(svn_editor_t *editor,
+                      const char *relpath,
+                      svn_revnum_t revision,
+                      apr_hash_t *props,
+                      const svn_checksum_t *checksum,
+                      svn_stream_t *stream);
 
-/** Drive @a editor's #svn_editor_cb_set_target_t callback.
+/** Drive @a editor's #svn_editor_cb_alter_symlink_t callback.
+ *
+ * ### TODO: docco
  *
- * Set/change the link target that a symbolic link at @a relpath points at
- * to @a target.
- * ### TODO @todo What is REVISION for?
+ * For a description of @a props, see svn_editor_add_file().
  *
  * For all restrictions on driving the editor, see #svn_editor_t.
  * @since New in 1.8.
  */
 svn_error_t *
-svn_editor_set_target(svn_editor_t *editor,
-                      const char *relpath,
-                      svn_revnum_t revision,
-                      const char *target);
+svn_editor_alter_symlink(svn_editor_t *editor,
+                         const char *relpath,
+                         svn_revnum_t revision,
+                         apr_hash_t *props,
+                         const char *target);
 
 /** Drive @a editor's #svn_editor_cb_delete_t callback.
  *

Modified: subversion/branches/moves-scan-log/subversion/include/svn_io.h
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/include/svn_io.h?rev=1241415&r1=1241414&r2=1241415&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/include/svn_io.h (original)
+++ subversion/branches/moves-scan-log/subversion/include/svn_io.h Tue Feb  7 10:33:18 2012
@@ -1531,10 +1531,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/moves-scan-log/subversion/include/svn_repos.h
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/include/svn_repos.h?rev=1241415&r1=1241414&r2=1241415&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/include/svn_repos.h (original)
+++ subversion/branches/moves-scan-log/subversion/include/svn_repos.h Tue Feb  7 10:33:18 2012
@@ -764,6 +764,17 @@ const char *
 svn_repos_post_unlock_hook(svn_repos_t *repos,
                            apr_pool_t *pool);
 
+/** Set the environment that @a repos's hooks will inherit to @a hooks_env,
+ * a hash table where keys and values represent names and values of environment
+ * variables. @a hooks_env must live at least as long as @a repos.
+ *
+ * If this function is not called, hooks will run in an empty environment.
+ *
+ * @since New in 1.8. */
+void
+svn_repos_hooks_setenv(svn_repos_t *repos,
+                       apr_hash_t *hooks_env);
+
 /** @} */
 
 /* ---------------------------------------------------------------*/

Modified: subversion/branches/moves-scan-log/subversion/libsvn_client/commit_util.c
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/libsvn_client/commit_util.c?rev=1241415&r1=1241414&r2=1241415&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/libsvn_client/commit_util.c (original)
+++ subversion/branches/moves-scan-log/subversion/libsvn_client/commit_util.c Tue Feb  7 10:33:18 2012
@@ -417,8 +417,8 @@ bail_on_tree_conflicted_ancestor(svn_wc_
    externals that aren't explicit commit targets.)
 
    DANGLERS is a hash table mapping const char* absolute paths of a parent
-   that must be committed to a const char * absolute path of a child that
-   needs them.
+   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.
@@ -834,14 +834,12 @@ harvest_committables(svn_wc_context_t *w
 
       if (parent_added)
         {
-          /* The op-root of the parent must be part of the commit */
           const char *copy_root_abspath;
           svn_boolean_t parent_is_copy;
 
-          /* 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. */
+          /* 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,
@@ -850,9 +848,6 @@ harvest_committables(svn_wc_context_t *w
           if (parent_is_copy)
             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. */
           if (!apr_hash_get(danglers, parent_abspath, APR_HASH_KEY_STRING))
             {
               apr_hash_set(danglers,

Modified: subversion/branches/moves-scan-log/subversion/libsvn_client/repos_diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/libsvn_client/repos_diff.c?rev=1241415&r1=1241414&r2=1241415&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/libsvn_client/repos_diff.c (original)
+++ subversion/branches/moves-scan-log/subversion/libsvn_client/repos_diff.c Tue Feb  7 10:33:18 2012
@@ -906,7 +906,8 @@ apply_textdelta(void *file_baton,
       SVN_ERR(svn_checksum_parse_hex(&base_md5_checksum, svn_checksum_md5,
                                      base_md5_digest, scratch_pool));
 
-      if (!svn_checksum_match(base_md5_checksum, b->start_md5_checksum))
+      if (!svn_checksum_is_empty_checksum(base_md5_checksum) &&
+            !svn_checksum_match(base_md5_checksum, b->start_md5_checksum))
         return svn_error_trace(svn_checksum_mismatch_err(
                                       base_md5_checksum,
                                       b->start_md5_checksum,

Modified: subversion/branches/moves-scan-log/subversion/libsvn_delta/compat.c
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/libsvn_delta/compat.c?rev=1241415&r1=1241414&r2=1241415&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/libsvn_delta/compat.c (original)
+++ subversion/branches/moves-scan-log/subversion/libsvn_delta/compat.c Tue Feb  7 10:33:18 2012
@@ -85,8 +85,8 @@ svn_compat_wrap_file_rev_handler(svn_fil
 /* The following code maps the calls to a traditional delta editor to an
  * Editorv2 editor.  It does this by keeping track of a lot of state, and
  * then communicating that state to Ev2 upon closure of the file or dir (or
- * edit).  Note that Ev2 calls add_symlink() and set_target() are not present
- * in the delta editor paradigm, so we never call them.
+ * edit).  Note that Ev2 calls add_symlink() and alter_symlink() are not
+ * present in the delta editor paradigm, so we never call them.
  *
  * The general idea here is that we have to see *all* the actions on a node's
  * parent before we can process that node, which means we need to buffer a
@@ -118,7 +118,7 @@ typedef svn_error_t *(*unlock_func_t)(
     const char *path,
     apr_pool_t *scratch_pool);
 
-/* svn_editor__See insert_shims() for more information. */
+/* See svn_editor__insert_shims() for more information. */
 struct extra_baton
 {
   start_edit_func_t start_edit;
@@ -189,6 +189,7 @@ struct prop_args
   const char *name;
   svn_revnum_t base_revision;
   const svn_string_t *value;
+  svn_kind_t kind;
 };
 
 struct copy_args
@@ -250,7 +251,7 @@ process_actions(void *edit_baton,
   svn_revnum_t delete_revnum = SVN_INVALID_REVNUM;
   svn_revnum_t props_base_revision = SVN_INVALID_REVNUM;
   svn_revnum_t text_base_revision = SVN_INVALID_REVNUM;
-  svn_kind_t kind;
+  svn_kind_t kind = svn_kind_unknown;
   int i;
 
   if (*path == '/')
@@ -272,6 +273,8 @@ process_actions(void *edit_baton,
             {
               const struct prop_args *p_args = action->args;
 
+              kind = p_args->kind;
+
               if (!SVN_IS_VALID_REVNUM(props_base_revision))
                 props_base_revision = p_args->base_revision;
               else
@@ -283,6 +286,12 @@ process_actions(void *edit_baton,
                      the modifications to it.  */
                   if (need_delete && need_add)
                     props = apr_hash_make(scratch_pool);
+                  else if (need_copy)
+                    SVN_ERR(eb->fetch_props_func(&props,
+                                                 eb->fetch_props_baton,
+                                                 copyfrom_path,
+                                                 copyfrom_rev,
+                                                 scratch_pool, scratch_pool));
                   else
                     SVN_ERR(eb->fetch_props_func(&props,
                                                  eb->fetch_props_baton,
@@ -327,6 +336,9 @@ process_actions(void *edit_baton,
             {
               struct path_checksum_args *pca = action->args;
 
+              /* We can only set text on files. */
+              kind = svn_node_file;
+
               SVN_ERR(svn_stream_open_readonly(&contents, pca->path,
                                                scratch_pool, scratch_pool));
               checksum = pca->checksum;
@@ -375,6 +387,7 @@ process_actions(void *edit_baton,
     {
       /* If we're only doing a delete, do it here. */
       SVN_ERR(svn_editor_delete(eb->editor, path, delete_revnum));
+      return SVN_NO_ERROR;
     }
 
   if (need_add)
@@ -399,19 +412,29 @@ process_actions(void *edit_baton,
                               delete_revnum));
     }
 
-  if (props)
+  if (props || contents)
     {
-      /* We fetched and modified the props in some way. Apply 'em now that
-         we have the new set.  */
-      SVN_ERR(svn_editor_set_props(eb->editor, path, props_base_revision,
-                                   props, contents == NULL));
-    }
+      /* We fetched and modified the props or content in some way. Apply 'em
+         now.  */
+      svn_revnum_t base_revision;
+
+      if (SVN_IS_VALID_REVNUM(props_base_revision)
+            && SVN_IS_VALID_REVNUM(text_base_revision))
+        SVN_ERR_ASSERT(props_base_revision == text_base_revision);
+
+      if (SVN_IS_VALID_REVNUM(props_base_revision))
+        base_revision = props_base_revision;
+      else if (SVN_IS_VALID_REVNUM(text_base_revision))
+        base_revision = text_base_revision;
+      else
+        base_revision = SVN_INVALID_REVNUM;
 
-  if (contents)
-    {
-      /* If we have an content for this node, set it now. */
-      SVN_ERR(svn_editor_set_text(eb->editor, path, text_base_revision,
-                                  checksum, contents));
+      if (kind == svn_kind_dir)
+        SVN_ERR(svn_editor_alter_directory(eb->editor, path, base_revision,
+                                           props));
+      else
+        SVN_ERR(svn_editor_alter_file(eb->editor, path, base_revision, props,
+                                      checksum, contents));
     }
 
   return SVN_NO_ERROR;
@@ -589,6 +612,7 @@ ev2_change_dir_prop(void *dir_baton,
   p_args->name = apr_pstrdup(db->eb->edit_pool, name);
   p_args->value = value ? svn_string_dup(value, db->eb->edit_pool) : NULL;
   p_args->base_revision = db->base_revision;
+  p_args->kind = svn_kind_dir;
 
   SVN_ERR(add_action(db->eb, db->path, ACTION_PROPSET, p_args));
 
@@ -792,6 +816,7 @@ ev2_change_file_prop(void *file_baton,
   p_args->name = apr_pstrdup(fb->eb->edit_pool, name);
   p_args->value = value ? svn_string_dup(value, fb->eb->edit_pool) : NULL;
   p_args->base_revision = fb->base_revision;
+  p_args->kind = svn_kind_file;
 
   SVN_ERR(add_action(fb->eb, fb->path, ACTION_PROPSET, p_args));
 
@@ -1055,19 +1080,15 @@ build(struct editor_baton *eb,
       apr_hash_t *current_props;
       apr_array_header_t *propdiffs;
 
-      /* Only fetch the kind if operating on something other than the root,
-         as we already know the kind on the root. */
-      if (operation->path)
-        {
-          if (kind == svn_kind_unknown)
-            SVN_ERR(eb->fetch_kind_func(&operation->kind, eb->fetch_kind_baton,
-                                        relpath, rev, scratch_pool));
-          else
-            operation->kind = kind;
-        }
+      operation->kind = kind;
 
       if (operation->operation == OP_REPLACE)
         current_props = apr_hash_make(scratch_pool);
+      else if (operation->copyfrom_url)
+        SVN_ERR(eb->fetch_props_func(&current_props, eb->fetch_props_baton,
+                                     operation->copyfrom_url,
+                                     operation->copyfrom_revision,
+                                     scratch_pool, scratch_pool));
       else
         SVN_ERR(eb->fetch_props_func(&current_props, eb->fetch_props_baton,
                                      relpath, rev, scratch_pool,
@@ -1285,68 +1306,89 @@ add_absent_cb(void *baton,
   return SVN_NO_ERROR;
 }
 
-/* This implements svn_editor_cb_set_props_t */
+/* This implements svn_editor_cb_alter_directory_t */
 static svn_error_t *
-set_props_cb(void *baton,
-             const char *relpath,
-             svn_revnum_t revision,
-             apr_hash_t *props,
-             svn_boolean_t complete,
-             apr_pool_t *scratch_pool)
+alter_directory_cb(void *baton,
+                   const char *relpath,
+                   svn_revnum_t revision,
+                   apr_hash_t *props,
+                   apr_pool_t *scratch_pool)
 {
   struct editor_baton *eb = baton;
 
-  SVN_ERR(build(eb, ACTION_PROPSET, relpath, svn_kind_unknown,
+  /* ### should we verify the kind is truly a directory?  */
+
+  SVN_ERR(build(eb, ACTION_PROPSET, relpath, svn_kind_dir,
                 NULL, SVN_INVALID_REVNUM,
                 props, NULL, NULL, revision, scratch_pool));
 
   return SVN_NO_ERROR;
 }
 
-/* This implements svn_editor_cb_set_text_t */
+/* This implements svn_editor_cb_alter_file_t */
 static svn_error_t *
-set_text_cb(void *baton,
-            const char *relpath,
-            svn_revnum_t revision,
-            const svn_checksum_t *checksum,
-            svn_stream_t *contents,
-            apr_pool_t *scratch_pool)
+alter_file_cb(void *baton,
+              const char *relpath,
+              svn_revnum_t revision,
+              apr_hash_t *props,
+              const svn_checksum_t *checksum,
+              svn_stream_t *contents,
+              apr_pool_t *scratch_pool)
 {
   struct editor_baton *eb = baton;
   const char *tmp_filename;
   svn_stream_t *tmp_stream;
   svn_checksum_t *md5_checksum;
 
-  /* We may need to re-checksum these contents */
-  if (!(checksum && checksum->kind == svn_checksum_md5))
-    contents = svn_stream_checksummed2(contents, &md5_checksum, NULL,
-                                       svn_checksum_md5, TRUE, scratch_pool);
-  else
-    md5_checksum = (svn_checksum_t *)checksum;
+  /* ### should we verify the kind is truly a file?  */
 
-  /* Spool the contents to a tempfile, and provide that to the driver. */
-  SVN_ERR(svn_stream_open_unique(&tmp_stream, &tmp_filename, NULL,
-                                 svn_io_file_del_on_pool_cleanup,
-                                 eb->edit_pool, scratch_pool));
-  SVN_ERR(svn_stream_copy3(contents, tmp_stream, NULL, NULL, scratch_pool));
+  if (contents)
+    {
+      /* We may need to re-checksum these contents */
+      if (!(checksum && checksum->kind == svn_checksum_md5))
+        contents = svn_stream_checksummed2(contents, &md5_checksum, NULL,
+                                           svn_checksum_md5, TRUE,
+                                           scratch_pool);
+      else
+        md5_checksum = (svn_checksum_t *)checksum;
 
-  SVN_ERR(build(eb, ACTION_PUT, relpath, svn_kind_file,
-                NULL, SVN_INVALID_REVNUM,
-                NULL, tmp_filename, md5_checksum, revision, scratch_pool));
+      /* Spool the contents to a tempfile, and provide that to the driver. */
+      SVN_ERR(svn_stream_open_unique(&tmp_stream, &tmp_filename, NULL,
+                                     svn_io_file_del_on_pool_cleanup,
+                                     eb->edit_pool, scratch_pool));
+      SVN_ERR(svn_stream_copy3(contents, tmp_stream, NULL, NULL,
+                               scratch_pool));
+
+      SVN_ERR(build(eb, ACTION_PUT, relpath, svn_kind_file,
+                    NULL, SVN_INVALID_REVNUM,
+                    NULL, tmp_filename, md5_checksum, revision, scratch_pool));
+    }
+
+  if (props)
+    {
+      SVN_ERR(build(eb, ACTION_PROPSET, relpath, svn_kind_file,
+                    NULL, SVN_INVALID_REVNUM,
+                    props, NULL, NULL, revision, scratch_pool));
+    }
 
   return SVN_NO_ERROR;
 }
 
-/* This implements svn_editor_cb_set_target_t */
+/* This implements svn_editor_cb_alter_symlink_t */
 static svn_error_t *
-set_target_cb(void *baton,
-              const char *relpath,
-              svn_revnum_t revision,
-              const char *target,
-              apr_pool_t *scratch_pool)
+alter_symlink_cb(void *baton,
+                 const char *relpath,
+                 svn_revnum_t revision,
+                 apr_hash_t *props,
+                 const char *target,
+                 apr_pool_t *scratch_pool)
 {
   struct editor_baton *eb = baton;
 
+  /* ### should we verify the kind is truly a symlink?  */
+
+  /* ### do something  */
+
   return SVN_NO_ERROR;
 }
 
@@ -1551,8 +1593,15 @@ drive_tree(struct operation *op,
               svn_txdelta_window_handler_t handler;
               void *handler_baton;
               svn_stream_t *contents;
+              const char *empty_md5;
+              
+              /* ### We could probably allocate this just once somewhere. */
+              empty_md5 = svn_checksum_to_cstring(svn_checksum_empty_checksum(
+                                            svn_checksum_md5, scratch_pool),
+                                            scratch_pool);
 
-              SVN_ERR(editor->apply_textdelta(file_baton, NULL, scratch_pool,
+              SVN_ERR(editor->apply_textdelta(file_baton, empty_md5,
+                                              scratch_pool,
                                               &handler, &handler_baton));
               SVN_ERR(svn_stream_open_readonly(&contents, op->src_file,
                                                scratch_pool, scratch_pool));
@@ -1767,9 +1816,9 @@ editor_from_delta(svn_editor_t **editor_
       add_file_cb,
       add_symlink_cb,
       add_absent_cb,
-      set_props_cb,
-      set_text_cb,
-      set_target_cb,
+      alter_directory_cb,
+      alter_file_cb,
+      alter_symlink_cb,
       delete_cb,
       copy_cb,
       move_cb,

Modified: subversion/branches/moves-scan-log/subversion/libsvn_delta/editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/libsvn_delta/editor.c?rev=1241415&r1=1241414&r2=1241415&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/libsvn_delta/editor.c (original)
+++ subversion/branches/moves-scan-log/subversion/libsvn_delta/editor.c Tue Feb  7 10:33:18 2012
@@ -57,7 +57,6 @@ struct svn_editor_t
 #ifdef ENABLE_ORDERING_CHECK
   apr_hash_t *pending_incomplete_children;
   apr_hash_t *completed_nodes;
-  apr_hash_t *needs_text_or_target;
   svn_boolean_t finished;
 
   apr_pool_t *result_pool;
@@ -82,7 +81,6 @@ svn_editor_create(svn_editor_t **editor,
 #ifdef ENABLE_ORDERING_CHECK
   (*editor)->pending_incomplete_children = apr_hash_make(result_pool);
   (*editor)->completed_nodes = apr_hash_make(result_pool);
-  (*editor)->needs_text_or_target = apr_hash_make(result_pool);
   (*editor)->finished = FALSE;
   (*editor)->result_pool = result_pool;
 #endif
@@ -132,31 +130,31 @@ svn_editor_setcb_add_absent(svn_editor_t
 
 
 svn_error_t *
-svn_editor_setcb_set_props(svn_editor_t *editor,
-                           svn_editor_cb_set_props_t callback,
-                           apr_pool_t *scratch_pool)
+svn_editor_setcb_alter_directory(svn_editor_t *editor,
+                                 svn_editor_cb_alter_directory_t callback,
+                                 apr_pool_t *scratch_pool)
 {
-  editor->funcs.cb_set_props = callback;
+  editor->funcs.cb_alter_directory = callback;
   return SVN_NO_ERROR;
 }
 
 
 svn_error_t *
-svn_editor_setcb_set_text(svn_editor_t *editor,
-                          svn_editor_cb_set_text_t callback,
-                          apr_pool_t *scratch_pool)
+svn_editor_setcb_alter_file(svn_editor_t *editor,
+                            svn_editor_cb_alter_file_t callback,
+                            apr_pool_t *scratch_pool)
 {
-  editor->funcs.cb_set_text = callback;
+  editor->funcs.cb_alter_file = callback;
   return SVN_NO_ERROR;
 }
 
 
 svn_error_t *
-svn_editor_setcb_set_target(svn_editor_t *editor,
-                            svn_editor_cb_set_target_t callback,
-                            apr_pool_t *scratch_pool)
+svn_editor_setcb_alter_symlink(svn_editor_t *editor,
+                               svn_editor_cb_alter_symlink_t callback,
+                               apr_pool_t *scratch_pool)
 {
-  editor->funcs.cb_set_target = callback;
+  editor->funcs.cb_alter_symlink = callback;
   return SVN_NO_ERROR;
 }
 
@@ -232,9 +230,9 @@ svn_editor_setcb_many(svn_editor_t *edit
   COPY_CALLBACK(cb_add_file);
   COPY_CALLBACK(cb_add_symlink);
   COPY_CALLBACK(cb_add_absent);
-  COPY_CALLBACK(cb_set_props);
-  COPY_CALLBACK(cb_set_text);
-  COPY_CALLBACK(cb_set_target);
+  COPY_CALLBACK(cb_alter_directory);
+  COPY_CALLBACK(cb_alter_file);
+  COPY_CALLBACK(cb_alter_symlink);
   COPY_CALLBACK(cb_delete);
   COPY_CALLBACK(cb_copy);
   COPY_CALLBACK(cb_move);
@@ -395,11 +393,10 @@ svn_editor_add_absent(svn_editor_t *edit
 
 
 svn_error_t *
-svn_editor_set_props(svn_editor_t *editor,
-                     const char *relpath,
-                     svn_revnum_t revision,
-                     apr_hash_t *props,
-                     svn_boolean_t complete)
+svn_editor_alter_directory(svn_editor_t *editor,
+                           const char *relpath,
+                           svn_revnum_t revision,
+                           apr_hash_t *props)
 {
   svn_error_t *err = SVN_NO_ERROR;
 
@@ -412,24 +409,14 @@ svn_editor_set_props(svn_editor_t *edito
   if (editor->cancel_func)
     SVN_ERR(editor->cancel_func(editor->cancel_baton));
 
-  if (editor->funcs.cb_set_props)
-    err = editor->funcs.cb_set_props(editor->baton, relpath, revision, props,
-                                     complete, editor->scratch_pool);
+  if (editor->funcs.cb_alter_directory)
+    err = editor->funcs.cb_alter_directory(editor->baton,
+                                           relpath, revision, props,
+                                           editor->scratch_pool);
 #ifdef ENABLE_ORDERING_CHECK
-  /* ### Some of the ordering here depends upon the kind of RELPATH, but
-   * ### we have no way of determining what that is. */
-  if (complete)
-    {
-      apr_hash_set(editor->completed_nodes,
-                   apr_pstrdup(editor->result_pool, relpath),
-                   APR_HASH_KEY_STRING, (void *) 0x5ca1ab1e);
-    }
-  else
-    {
-      apr_hash_set(editor->needs_text_or_target,
-                   apr_pstrdup(editor->result_pool, relpath),
-                   APR_HASH_KEY_STRING, (void *) 0xba5eba11);
-    }
+  apr_hash_set(editor->completed_nodes,
+               apr_pstrdup(editor->result_pool, relpath),
+               APR_HASH_KEY_STRING, (void *) 0x5ca1ab1e);
 #endif
   svn_pool_clear(editor->scratch_pool);
   return err;
@@ -437,11 +424,12 @@ svn_editor_set_props(svn_editor_t *edito
 
 
 svn_error_t *
-svn_editor_set_text(svn_editor_t *editor,
-                    const char *relpath,
-                    svn_revnum_t revision,
-                    const svn_checksum_t *checksum,
-                    svn_stream_t *contents)
+svn_editor_alter_file(svn_editor_t *editor,
+                      const char *relpath,
+                      svn_revnum_t revision,
+                      apr_hash_t *props,
+                      const svn_checksum_t *checksum,
+                      svn_stream_t *contents)
 {
   svn_error_t *err = SVN_NO_ERROR;
 
@@ -454,12 +442,12 @@ svn_editor_set_text(svn_editor_t *editor
   if (editor->cancel_func)
     SVN_ERR(editor->cancel_func(editor->cancel_baton));
 
-  if (editor->funcs.cb_set_text)
-    err = editor->funcs.cb_set_text(editor->baton, relpath, revision,
-                                    checksum, contents, editor->scratch_pool);
+  if (editor->funcs.cb_alter_file)
+    err = editor->funcs.cb_alter_file(editor->baton,
+                                      relpath, revision, props,
+                                      checksum, contents,
+                                      editor->scratch_pool);
 #ifdef ENABLE_ORDERING_CHECK
-  apr_hash_set(editor->needs_text_or_target, relpath, APR_HASH_KEY_STRING,
-               NULL);
   apr_hash_set(editor->completed_nodes,
                apr_pstrdup(editor->result_pool, relpath),
                APR_HASH_KEY_STRING, (void *) 0x5ca1ab1e);
@@ -470,10 +458,11 @@ svn_editor_set_text(svn_editor_t *editor
 
 
 svn_error_t *
-svn_editor_set_target(svn_editor_t *editor,
-                      const char *relpath,
-                      svn_revnum_t revision,
-                      const char *target)
+svn_editor_alter_symlink(svn_editor_t *editor,
+                         const char *relpath,
+                         svn_revnum_t revision,
+                         apr_hash_t *props,
+                         const char *target)
 {
   svn_error_t *err = SVN_NO_ERROR;
 
@@ -486,12 +475,12 @@ svn_editor_set_target(svn_editor_t *edit
   if (editor->cancel_func)
     SVN_ERR(editor->cancel_func(editor->cancel_baton));
 
-  if (editor->funcs.cb_set_target)
-    err = editor->funcs.cb_set_target(editor->baton, relpath, revision,
-                                      target, editor->scratch_pool);
+  if (editor->funcs.cb_alter_symlink)
+    err = editor->funcs.cb_alter_symlink(editor->baton,
+                                         relpath, revision, props,
+                                         target,
+                                         editor->scratch_pool);
 #ifdef ENABLE_ORDERING_CHECK
-  apr_hash_set(editor->needs_text_or_target, relpath, APR_HASH_KEY_STRING,
-               NULL);
   apr_hash_set(editor->completed_nodes,
                apr_pstrdup(editor->result_pool, relpath),
                APR_HASH_KEY_STRING, (void *) 0x5ca1ab1e);
@@ -636,7 +625,6 @@ svn_editor_complete(svn_editor_t *editor
 #ifdef ENABLE_ORDERING_CHECK
   SVN_ERR_ASSERT(!editor->finished);
   SVN_ERR_ASSERT(apr_hash_count(editor->pending_incomplete_children) == 0);
-  SVN_ERR_ASSERT(apr_hash_count(editor->needs_text_or_target) == 0);
 #endif
 
   if (editor->funcs.cb_complete)

Modified: subversion/branches/moves-scan-log/subversion/libsvn_fs_base/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/libsvn_fs_base/tree.c?rev=1241415&r1=1241414&r2=1241415&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/libsvn_fs_base/tree.c (original)
+++ subversion/branches/moves-scan-log/subversion/libsvn_fs_base/tree.c Tue Feb  7 10:33:18 2012
@@ -3743,6 +3743,7 @@ txn_body_apply_textdelta(void *baton, tr
          reps-strings.c.  Could we keep them both around somehow so this
          check could be more comprehensive? */
       if (tb->base_checksum->kind == checksum->kind
+            && !svn_checksum_is_empty_checksum(tb->base_checksum)
             && !svn_checksum_match(tb->base_checksum, checksum))
         return svn_checksum_mismatch_err(tb->base_checksum, checksum,
                             trail->pool,

Modified: subversion/branches/moves-scan-log/subversion/libsvn_fs_fs/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/libsvn_fs_fs/tree.c?rev=1241415&r1=1241414&r2=1241415&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/libsvn_fs_fs/tree.c (original)
+++ subversion/branches/moves-scan-log/subversion/libsvn_fs_fs/tree.c Tue Feb  7 10:33:18 2012
@@ -2437,7 +2437,8 @@ apply_textdelta(void *baton, apr_pool_t 
          contents, in other words, the base text. */
       SVN_ERR(svn_fs_fs__dag_file_checksum(&checksum, tb->node,
                                            tb->base_checksum->kind, pool));
-      if (!svn_checksum_match(tb->base_checksum, checksum))
+      if (!svn_checksum_is_empty_checksum(tb->base_checksum)
+            && !svn_checksum_match(tb->base_checksum, checksum))
         return svn_checksum_mismatch_err(tb->base_checksum, checksum, pool,
                                          _("Base checksum mismatch on '%s'"),
                                          tb->path);

Modified: subversion/branches/moves-scan-log/subversion/libsvn_repos/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/libsvn_repos/commit.c?rev=1241415&r1=1241414&r2=1241415&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/libsvn_repos/commit.c (original)
+++ subversion/branches/moves-scan-log/subversion/libsvn_repos/commit.c Tue Feb  7 10:33:18 2012
@@ -794,9 +794,19 @@ prop_fetch_func(apr_hash_t **props,
   svn_fs_root_t *fs_root;
   svn_error_t *err;
 
-  if (path[0] != '/')
-    /* Get an absolute path for use in the FS. */
-    path = svn_fspath__join(eb->base_path, path, scratch_pool);
+  if (svn_path_is_url(path))
+    {
+      /* This is a copyfrom URL. */
+      path = svn_uri_skip_ancestor(eb->repos_url, path, scratch_pool);
+      path = svn_fspath__canonicalize(path, scratch_pool);
+    }
+  else
+    {
+      /* This is a base-relative path. */
+      if (path[0] != '/')
+        /* Get an absolute path for use in the FS. */
+        path = svn_fspath__join(eb->base_path, path, scratch_pool);
+    }
 
   SVN_ERR(svn_fs_revision_root(&fs_root, eb->fs,
                                svn_fs_txn_base_revision(eb->txn),

Modified: subversion/branches/moves-scan-log/subversion/libsvn_repos/fs-wrap.c
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/libsvn_repos/fs-wrap.c?rev=1241415&r1=1241414&r2=1241415&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/libsvn_repos/fs-wrap.c (original)
+++ subversion/branches/moves-scan-log/subversion/libsvn_repos/fs-wrap.c Tue Feb  7 10:33:18 2012
@@ -61,7 +61,7 @@ svn_repos_fs_commit_txn(const char **con
     return err;
 
   /* Run post-commit hooks. */
-  if ((err2 = svn_repos__hooks_post_commit(repos, *new_rev, pool)))
+  if ((err2 = svn_repos__hooks_post_commit(repos, *new_rev, txn_name, pool)))
     {
       err2 = svn_error_create
                (SVN_ERR_REPOS_POST_COMMIT_HOOK_FAILED, err2,

Modified: subversion/branches/moves-scan-log/subversion/libsvn_repos/hooks.c
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/libsvn_repos/hooks.c?rev=1241415&r1=1241414&r2=1241415&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/libsvn_repos/hooks.c (original)
+++ subversion/branches/moves-scan-log/subversion/libsvn_repos/hooks.c Tue Feb  7 10:33:18 2012
@@ -159,6 +159,37 @@ check_hook_result(const char *name, cons
                           failure_message->data);
 }
 
+/* Copy the environment given as key/value pairs of ENV_HASH into
+ * an array of C strings allocated in RESULT_POOL.
+ * If the hook environment is empty, return NULL.
+ * Use SCRATCH_POOL for temporary allocations. */
+static const char **
+env_from_env_hash(apr_hash_t *env_hash,
+                  apr_pool_t *result_pool,
+                  apr_pool_t *scratch_pool)
+{
+  apr_hash_index_t *hi;
+  const char **env;
+  const char **envp;
+  
+  if (!env_hash)
+    return NULL;
+
+  env = apr_palloc(result_pool,
+                   sizeof(const char *) * (apr_hash_count(env_hash) + 1));
+  envp = env;
+  for (hi = apr_hash_first(scratch_pool, env_hash); hi; hi = apr_hash_next(hi))
+    {
+      *envp = apr_psprintf(result_pool, "%s=%s",
+                           (const char *)svn__apr_hash_index_key(hi),
+                           (const char *)svn__apr_hash_index_val(hi));
+      envp++;
+    }
+  *envp = NULL;
+
+  return env;
+}
+
 /* NAME, CMD and ARGS are the name, path to and arguments for the hook
    program that is to be run.  The hook's exit status will be checked,
    and if an error occurred the hook's stderr output will be added to
@@ -174,6 +205,7 @@ run_hook_cmd(svn_string_t **result,
              const char *name,
              const char *cmd,
              const char **args,
+             apr_hash_t *hooks_env,
              apr_file_t *stdin_handle,
              apr_pool_t *pool)
 {
@@ -196,9 +228,10 @@ run_hook_cmd(svn_string_t **result,
             (apr_err, _("Can't create null stdout for hook '%s'"), cmd);
     }
 
-  err = svn_io_start_cmd2(&cmd_proc, ".", cmd, args, FALSE,
-                          FALSE, stdin_handle, result != NULL, null_handle,
-                          TRUE, NULL, pool);
+  err = svn_io_start_cmd3(&cmd_proc, ".", cmd, args,
+                          env_from_env_hash(hooks_env, pool, pool),
+                          FALSE, FALSE, stdin_handle, result != NULL,
+                          null_handle, TRUE, NULL, pool);
 
   if (err)
     {
@@ -358,8 +391,8 @@ svn_repos__hooks_start_commit(svn_repos_
       args[3] = capabilities_string;
       args[4] = NULL;
 
-      SVN_ERR(run_hook_cmd(NULL, SVN_REPOS__HOOK_START_COMMIT, hook, args, NULL,
-                           pool));
+      SVN_ERR(run_hook_cmd(NULL, SVN_REPOS__HOOK_START_COMMIT, hook, args,
+                           repos->hooks_env, NULL, pool));
     }
 
   return SVN_NO_ERROR;
@@ -438,7 +471,7 @@ svn_repos__hooks_pre_commit(svn_repos_t 
                                  APR_READ, APR_OS_DEFAULT, pool));
 
       SVN_ERR(run_hook_cmd(NULL, SVN_REPOS__HOOK_PRE_COMMIT, hook, args,
-                           stdin_handle, pool));
+                           repos->hooks_env, stdin_handle, pool));
     }
 
   return SVN_NO_ERROR;
@@ -448,6 +481,7 @@ svn_repos__hooks_pre_commit(svn_repos_t 
 svn_error_t  *
 svn_repos__hooks_post_commit(svn_repos_t *repos,
                              svn_revnum_t rev,
+                             const char *txn_name,
                              apr_pool_t *pool)
 {
   const char *hook = svn_repos_post_commit_hook(repos, pool);
@@ -459,15 +493,16 @@ svn_repos__hooks_post_commit(svn_repos_t
     }
   else if (hook)
     {
-      const char *args[4];
+      const char *args[5];
 
       args[0] = hook;
       args[1] = svn_dirent_local_style(svn_repos_path(repos, pool), pool);
       args[2] = apr_psprintf(pool, "%ld", rev);
-      args[3] = NULL;
+      args[3] = txn_name;
+      args[4] = NULL;
 
-      SVN_ERR(run_hook_cmd(NULL, SVN_REPOS__HOOK_POST_COMMIT, hook, args, NULL,
-                           pool));
+      SVN_ERR(run_hook_cmd(NULL, SVN_REPOS__HOOK_POST_COMMIT, hook, args,
+                           repos->hooks_env, NULL, pool));
     }
 
   return SVN_NO_ERROR;
@@ -514,8 +549,8 @@ svn_repos__hooks_pre_revprop_change(svn_
       args[5] = action_string;
       args[6] = NULL;
 
-      SVN_ERR(run_hook_cmd(NULL, SVN_REPOS__HOOK_PRE_REVPROP_CHANGE, hook, args,
-                           stdin_handle, pool));
+      SVN_ERR(run_hook_cmd(NULL, SVN_REPOS__HOOK_PRE_REVPROP_CHANGE, hook,
+                           args, repos->hooks_env, stdin_handle, pool));
 
       SVN_ERR(svn_io_file_close(stdin_handle, pool));
     }
@@ -577,7 +612,7 @@ svn_repos__hooks_post_revprop_change(svn
       args[6] = NULL;
 
       SVN_ERR(run_hook_cmd(NULL, SVN_REPOS__HOOK_POST_REVPROP_CHANGE, hook,
-                           args, stdin_handle, pool));
+                           args, repos->hooks_env, stdin_handle, pool));
 
       SVN_ERR(svn_io_file_close(stdin_handle, pool));
     }
@@ -615,8 +650,8 @@ svn_repos__hooks_pre_lock(svn_repos_t *r
       args[5] = steal_lock ? "1" : "0";
       args[6] = NULL;
 
-      SVN_ERR(run_hook_cmd(&buf, SVN_REPOS__HOOK_PRE_LOCK, hook, args, NULL,
-                           pool));
+      SVN_ERR(run_hook_cmd(&buf, SVN_REPOS__HOOK_PRE_LOCK, hook, args,
+                           repos->hooks_env, NULL, pool));
 
       if (token)
         /* No validation here; the FS will take care of that. */
@@ -660,7 +695,7 @@ svn_repos__hooks_post_lock(svn_repos_t *
       args[4] = NULL;
 
       SVN_ERR(run_hook_cmd(NULL, SVN_REPOS__HOOK_POST_LOCK, hook, args,
-                           stdin_handle, pool));
+                           repos->hooks_env, stdin_handle, pool));
 
       SVN_ERR(svn_io_file_close(stdin_handle, pool));
     }
@@ -696,8 +731,8 @@ svn_repos__hooks_pre_unlock(svn_repos_t 
       args[5] = break_lock ? "1" : "0";
       args[6] = NULL;
 
-      SVN_ERR(run_hook_cmd(NULL, SVN_REPOS__HOOK_PRE_UNLOCK, hook, args, NULL,
-                           pool));
+      SVN_ERR(run_hook_cmd(NULL, SVN_REPOS__HOOK_PRE_UNLOCK, hook, args,
+                           repos->hooks_env, NULL, pool));
     }
 
   return SVN_NO_ERROR;
@@ -734,7 +769,7 @@ svn_repos__hooks_post_unlock(svn_repos_t
       args[4] = NULL;
 
       SVN_ERR(run_hook_cmd(NULL, SVN_REPOS__HOOK_POST_UNLOCK, hook, args,
-                           stdin_handle, pool));
+                           repos->hooks_env, stdin_handle, pool));
 
       SVN_ERR(svn_io_file_close(stdin_handle, pool));
     }

Modified: subversion/branches/moves-scan-log/subversion/libsvn_repos/load-fs-vtable.c
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/libsvn_repos/load-fs-vtable.c?rev=1241415&r1=1241414&r2=1241415&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/libsvn_repos/load-fs-vtable.c (original)
+++ subversion/branches/moves-scan-log/subversion/libsvn_repos/load-fs-vtable.c Tue Feb  7 10:33:18 2012
@@ -900,19 +900,28 @@ close_revision(void *baton)
   const char *conflict_msg = NULL;
   svn_revnum_t committed_rev;
   svn_error_t *err;
+  const char *txn_name;
 
   /* If we're skipping this revision or it has an invalid revision
      number, we're done here. */
   if (rb->skipped || (rb->rev <= 0))
     return SVN_NO_ERROR;
 
+  /* Get the txn name, if it will be needed. */
+  if (pb->use_pre_commit_hook || pb->use_post_commit_hook)
+    {
+      err = svn_fs_txn_name(&txn_name, rb->txn, rb->pool);
+      if (err)
+        {
+          svn_error_clear(svn_fs_abort_txn(rb->txn, rb->pool));
+          return svn_error_trace(err);
+        }
+    }
+
   /* Run the pre-commit hook, if so commanded. */
   if (pb->use_pre_commit_hook)
     {
-      const char *txn_name;
-      err = svn_fs_txn_name(&txn_name, rb->txn, rb->pool);
-      if (! err)
-        err = svn_repos__hooks_pre_commit(pb->repos, txn_name, rb->pool);
+      err = svn_repos__hooks_pre_commit(pb->repos, txn_name, rb->pool);
       if (err)
         {
           svn_error_clear(svn_fs_abort_txn(rb->txn, rb->pool));
@@ -945,7 +954,7 @@ close_revision(void *baton)
   if (pb->use_post_commit_hook)
     {
       if ((err = svn_repos__hooks_post_commit(pb->repos, committed_rev,
-                                              rb->pool)))
+                                              txn_name, rb->pool)))
         return svn_error_create
           (SVN_ERR_REPOS_POST_COMMIT_HOOK_FAILED, err,
            _("Commit succeeded, but post-commit hook failed"));

Modified: subversion/branches/moves-scan-log/subversion/libsvn_repos/reporter.c
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/libsvn_repos/reporter.c?rev=1241415&r1=1241414&r2=1241415&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/libsvn_repos/reporter.c (original)
+++ subversion/branches/moves-scan-log/subversion/libsvn_repos/reporter.c Tue Feb  7 10:33:18 2012
@@ -898,6 +898,21 @@ update_entry(report_baton_t *b, svn_revn
       SVN_ERR(svn_repos_deleted_rev(svn_fs_root_fs(b->t_root), t_path,
                                     s_rev, b->t_rev, &deleted_rev,
                                     pool));
+
+      if (!SVN_IS_VALID_REVNUM(deleted_rev))
+        {
+          /* Two possibilities: either the thing doesn't exist in S_REV; or
+             it wasn't deleted between S_REV and B->T_REV.  In the first case,
+             I think we should leave DELETED_REV as SVN_INVALID_REVNUM, but
+             in the second, it should be set to B->T_REV-1 for the call to
+             delete_entry() below. */
+          svn_node_kind_t kind;
+
+          SVN_ERR(svn_fs_check_path(&kind, b->t_root, t_path, pool));
+          if (kind != svn_node_none)
+            deleted_rev = b->t_rev - 1;
+        }
+
       SVN_ERR(b->editor->delete_entry(e_path, deleted_rev, dir_baton,
                                       pool));
       s_path = NULL;

Modified: subversion/branches/moves-scan-log/subversion/libsvn_repos/repos.c
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/libsvn_repos/repos.c?rev=1241415&r1=1241414&r2=1241415&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/libsvn_repos/repos.c (original)
+++ subversion/branches/moves-scan-log/subversion/libsvn_repos/repos.c Tue Feb  7 10:33:18 2012
@@ -165,6 +165,12 @@ svn_repos_post_revprop_change_hook(svn_r
                        pool);
 }
 
+void
+svn_repos_hooks_setenv(svn_repos_t *repos,
+                       apr_hash_t *hooks_env)
+{
+  repos->hooks_env = hooks_env;
+}
 
 static svn_error_t *
 create_repos_dir(const char *path, apr_pool_t *pool)
@@ -736,6 +742,7 @@ PREWRITTEN_HOOKS_TEXT
 "#"                                                                          NL
 "#   [1] REPOS-PATH   (the path to this repository)"                         NL
 "#   [2] REV          (the number of the revision just committed)"           NL
+"#   [3] TXN-NAME     (the name of the transaction that has become REV)"     NL
 "#"                                                                          NL
 "# The default working directory for the invocation is undefined, so"        NL
 "# the program should set one explicitly if it cares."                       NL
@@ -765,6 +772,7 @@ PREWRITTEN_HOOKS_TEXT
 ""                                                                           NL
 "REPOS=\"$1\""                                                               NL
 "REV=\"$2\""                                                                 NL
+"TXN_NAME=\"$3\""                                                            NL
                                                                              NL
 "mailer.py commit \"$REPOS\" \"$REV\" /path/to/mailer.conf"                  NL;
 
@@ -1040,7 +1048,17 @@ create_conf(svn_repos_t *repos, apr_pool
 "### to the effective key length for encryption (e.g. 128 means 128-bit"     NL
 "### encryption). The values below are the defaults."                        NL
 "# min-encryption = 0"                                                       NL
-"# max-encryption = 256"                                                     NL;
+"# max-encryption = 256"                                                     NL
+""                                                                           NL
+"[hooks-env]"                                                                NL
+"### Options in this section define environment variables for use by"        NL
+"### hook scripts run by svnserve."                                          NL
+#ifdef WIN32
+"# PATH = C:\\Program Files\\Subversion\\bin"                                NL
+#else
+"# PATH = /bin:/sbin:/usr/bin:/usr/sbin"                                     NL
+#endif
+"# LC_CTYPE = en_US.UTF-8"                                                   NL;
 
     SVN_ERR_W(svn_io_file_create(svn_repos_svnserve_conf(repos, pool),
                                  svnserve_conf_contents, pool),

Modified: subversion/branches/moves-scan-log/subversion/libsvn_repos/repos.h
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/libsvn_repos/repos.h?rev=1241415&r1=1241414&r2=1241415&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/libsvn_repos/repos.h (original)
+++ subversion/branches/moves-scan-log/subversion/libsvn_repos/repos.h Tue Feb  7 10:33:18 2012
@@ -140,6 +140,10 @@ struct svn_repos_t
      sufficiently well-informed internal code may just compare against
      those constants' addresses, therefore). */
   apr_hash_t *repository_capabilities;
+
+  /* The environment inherited to hook scripts. If NULL, hooks run
+   * in an empty environment. */
+  apr_hash_t *hooks_env;
 };
 
 
@@ -175,6 +179,7 @@ svn_repos__hooks_pre_commit(svn_repos_t 
 svn_error_t *
 svn_repos__hooks_post_commit(svn_repos_t *repos,
                              svn_revnum_t rev,
+                             const char *txn_name,
                              apr_pool_t *pool);
 
 /* Run the pre-revprop-change hook for REPOS.  Use POOL for any

Modified: subversion/branches/moves-scan-log/subversion/libsvn_subr/checksum.c
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/libsvn_subr/checksum.c?rev=1241415&r1=1241414&r2=1241415&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/libsvn_subr/checksum.c (original)
+++ subversion/branches/moves-scan-log/subversion/libsvn_subr/checksum.c Tue Feb  7 10:33:18 2012
@@ -423,3 +423,27 @@ svn_checksum_mismatch_err(const svn_chec
                 svn_checksum_to_cstring_display(expected, scratch_pool),
                 svn_checksum_to_cstring_display(actual, scratch_pool));
 }
+
+svn_boolean_t
+svn_checksum_is_empty_checksum(svn_checksum_t *checksum)
+{
+  /* By definition, the NULL checksum matches all others, including the
+     empty one. */
+  if (!checksum)
+    return TRUE;
+
+  switch (checksum->kind)
+    {
+      case svn_checksum_md5:
+        return svn_md5__digests_match(checksum->digest,
+                                      svn_md5__empty_string_digest());
+
+      case svn_checksum_sha1:
+        return svn_sha1__digests_match(checksum->digest,
+                                       svn_sha1__empty_string_digest());
+
+      default:
+        /* We really shouldn't get here, but if we do... */
+        return FALSE;
+    }
+}

Modified: subversion/branches/moves-scan-log/subversion/libsvn_subr/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/libsvn_subr/deprecated.c?rev=1241415&r1=1241414&r2=1241415&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/libsvn_subr/deprecated.c (original)
+++ subversion/branches/moves-scan-log/subversion/libsvn_subr/deprecated.c Tue Feb  7 10:33:18 2012
@@ -767,6 +767,25 @@ svn_io_get_dirents(apr_hash_t **dirents,
 }
 
 svn_error_t *
+svn_io_start_cmd2(apr_proc_t *cmd_proc,
+                  const char *path,
+                  const char *cmd,
+                  const char *const *args,
+                  svn_boolean_t inherit,
+                  svn_boolean_t infile_pipe,
+                  apr_file_t *infile,
+                  svn_boolean_t outfile_pipe,
+                  apr_file_t *outfile,
+                  svn_boolean_t errfile_pipe,
+                  apr_file_t *errfile,
+                  apr_pool_t *pool)
+{
+  return svn_io_start_cmd3(cmd_proc, path, cmd, args, NULL, inherit,
+                           infile_pipe, infile, outfile_pipe, outfile,
+                           errfile_pipe, errfile, pool);
+}
+
+svn_error_t *
 svn_io_start_cmd(apr_proc_t *cmd_proc,
                  const char *path,
                  const char *cmd,

Modified: subversion/branches/moves-scan-log/subversion/libsvn_subr/io.c
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/libsvn_subr/io.c?rev=1241415&r1=1241414&r2=1241415&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/libsvn_subr/io.c (original)
+++ subversion/branches/moves-scan-log/subversion/libsvn_subr/io.c Tue Feb  7 10:33:18 2012
@@ -2417,10 +2417,11 @@ handle_child_process_error(apr_pool_t *p
 
 
 svn_error_t *
-svn_io_start_cmd2(apr_proc_t *cmd_proc,
+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,
@@ -2542,8 +2543,8 @@ svn_io_start_cmd2(apr_proc_t *cmd_proc,
 
 
   /* Start the cmd command. */
-  apr_err = apr_proc_create(cmd_proc, cmd_apr, args_native, NULL,
-                            cmdproc_attr, pool);
+  apr_err = apr_proc_create(cmd_proc, cmd_apr, args_native,
+                            inherit ? NULL : env, cmdproc_attr, pool);
   if (apr_err)
     return svn_error_wrap_apr(apr_err, _("Can't start process '%s'"), cmd);
 
@@ -3279,6 +3280,15 @@ svn_io_write_unique(const char **tmp_pat
 svn_error_t *
 svn_io_file_trunc(apr_file_t *file, apr_off_t offset, apr_pool_t *pool)
 {
+  /* This is a work-around. APR would flush the write buffer
+     _after_ truncating the file causing now invalid buffered
+     data to be written behind OFFSET. */
+  SVN_ERR(do_io_file_wrapper_cleanup
+    (file, apr_file_flush(file),
+     N_("Can't flush file '%s'"),
+     N_("Can't flush stream"),
+     pool));
+
   return do_io_file_wrapper_cleanup
     (file, apr_file_trunc(file, offset),
      N_("Can't truncate file '%s'"),

Modified: subversion/branches/moves-scan-log/subversion/libsvn_wc/externals.c
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/libsvn_wc/externals.c?rev=1241415&r1=1241414&r2=1241415&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/libsvn_wc/externals.c (original)
+++ subversion/branches/moves-scan-log/subversion/libsvn_wc/externals.c Tue Feb  7 10:33:18 2012
@@ -500,7 +500,8 @@ apply_textdelta(void *file_baton,
           else
             original_md5 = eb->original_checksum;
 
-          if (!svn_checksum_match(expected_checksum, original_md5))
+          if (!svn_checksum_is_empty_checksum(expected_checksum)
+                && !svn_checksum_match(expected_checksum, original_md5))
             return svn_error_trace(svn_checksum_mismatch_err(
                                     expected_checksum,
                                     original_md5,

Modified: subversion/branches/moves-scan-log/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/libsvn_wc/update_editor.c?rev=1241415&r1=1241414&r2=1241415&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/branches/moves-scan-log/subversion/libsvn_wc/update_editor.c Tue Feb  7 10:33:18 2012
@@ -3982,7 +3982,8 @@ apply_textdelta(void *file_baton,
                                         recorded_base_checksum, pool, pool));
 
 
-  if (!svn_checksum_match(expected_base_checksum, recorded_base_checksum))
+  if (!svn_checksum_is_empty_checksum(expected_base_checksum)
+        && !svn_checksum_match(expected_base_checksum, recorded_base_checksum))
       return svn_error_createf(SVN_ERR_WC_CORRUPT_TEXT_BASE, NULL,
                      _("Checksum mismatch for '%s':\n"
                        "   expected:  %s\n"

Modified: subversion/branches/moves-scan-log/subversion/mod_dav_svn/dav_svn.h
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/mod_dav_svn/dav_svn.h?rev=1241415&r1=1241414&r2=1241415&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/mod_dav_svn/dav_svn.h (original)
+++ subversion/branches/moves-scan-log/subversion/mod_dav_svn/dav_svn.h Tue Feb  7 10:33:18 2012
@@ -385,6 +385,9 @@ const char *dav_svn__get_root_dir(reques
 /* Return the data compression level to be used over the wire. */
 int dav_svn__get_compression_level(void);
 
+/* Return the hook script environment parsed from the configuration. */
+apr_hash_t *dav_svn__get_hooks_env(request_rec *r);
+
 /** For HTTP protocol v2, these are the new URIs and URI stubs
     returned to the client in our OPTIONS response.  They all depend
     on the 'special uri', which is configurable in httpd.conf.  **/