You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by pb...@apache.org on 2010/11/15 19:50:41 UTC

svn commit: r1035404 [1/15] - in /subversion/branches/issue-3668-3669: ./ build/ build/generator/ build/generator/templates/ build/win32/ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/org/apache/subversion/javahl/ subversion/binding...

Author: pburba
Date: Mon Nov 15 18:50:38 2010
New Revision: 1035404

URL: http://svn.apache.org/viewvc?rev=1035404&view=rev
Log:
On the issue-3668-3669 branch: Sync with ^/subversion/trunk.

Added:
    subversion/branches/issue-3668-3669/build/generator/templates/build_locale.ezt
      - copied unchanged from r1035394, subversion/trunk/build/generator/templates/build_locale.ezt
    subversion/branches/issue-3668-3669/build/generator/templates/build_zlib.ezt
      - copied unchanged from r1035394, subversion/trunk/build/generator/templates/build_zlib.ezt
    subversion/branches/issue-3668-3669/build/generator/templates/msvc_dsp.ezt
      - copied unchanged from r1035394, subversion/trunk/build/generator/templates/msvc_dsp.ezt
    subversion/branches/issue-3668-3669/build/generator/templates/msvc_dsw.ezt
      - copied unchanged from r1035394, subversion/trunk/build/generator/templates/msvc_dsw.ezt
    subversion/branches/issue-3668-3669/build/generator/templates/neon.dsp.ezt
      - copied unchanged from r1035394, subversion/trunk/build/generator/templates/neon.dsp.ezt
    subversion/branches/issue-3668-3669/build/generator/templates/neon.vcproj.ezt
      - copied unchanged from r1035394, subversion/trunk/build/generator/templates/neon.vcproj.ezt
    subversion/branches/issue-3668-3669/build/generator/templates/neon.vcxproj.ezt
      - copied unchanged from r1035394, subversion/trunk/build/generator/templates/neon.vcxproj.ezt
    subversion/branches/issue-3668-3669/build/generator/templates/serf.dsp.ezt
      - copied unchanged from r1035394, subversion/trunk/build/generator/templates/serf.dsp.ezt
    subversion/branches/issue-3668-3669/build/generator/templates/serf.vcproj.ezt
      - copied unchanged from r1035394, subversion/trunk/build/generator/templates/serf.vcproj.ezt
    subversion/branches/issue-3668-3669/build/generator/templates/serf.vcxproj.ezt
      - copied unchanged from r1035394, subversion/trunk/build/generator/templates/serf.vcxproj.ezt
    subversion/branches/issue-3668-3669/build/generator/templates/svn_config.dsp.ezt
      - copied unchanged from r1035394, subversion/trunk/build/generator/templates/svn_config.dsp.ezt
    subversion/branches/issue-3668-3669/build/generator/templates/svn_config.vcproj.ezt
      - copied unchanged from r1035394, subversion/trunk/build/generator/templates/svn_config.vcproj.ezt
    subversion/branches/issue-3668-3669/build/generator/templates/svn_config.vcxproj.ezt
      - copied unchanged from r1035394, subversion/trunk/build/generator/templates/svn_config.vcxproj.ezt
    subversion/branches/issue-3668-3669/build/generator/templates/svn_locale.dsp.ezt
      - copied unchanged from r1035394, subversion/trunk/build/generator/templates/svn_locale.dsp.ezt
    subversion/branches/issue-3668-3669/build/generator/templates/svn_locale.vcproj.ezt
      - copied unchanged from r1035394, subversion/trunk/build/generator/templates/svn_locale.vcproj.ezt
    subversion/branches/issue-3668-3669/build/generator/templates/svn_locale.vcxproj.ezt
      - copied unchanged from r1035394, subversion/trunk/build/generator/templates/svn_locale.vcxproj.ezt
    subversion/branches/issue-3668-3669/build/generator/templates/zlib.dsp.ezt
      - copied unchanged from r1035394, subversion/trunk/build/generator/templates/zlib.dsp.ezt
    subversion/branches/issue-3668-3669/build/generator/templates/zlib.vcproj.ezt
      - copied unchanged from r1035394, subversion/trunk/build/generator/templates/zlib.vcproj.ezt
    subversion/branches/issue-3668-3669/build/generator/templates/zlib.vcxproj.ezt
      - copied unchanged from r1035394, subversion/trunk/build/generator/templates/zlib.vcxproj.ezt
    subversion/branches/issue-3668-3669/subversion/bindings/javahl/native/org_apache_subversion_javahl_type_Version.cpp
      - copied unchanged from r1035394, subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_type_Version.cpp
    subversion/branches/issue-3668-3669/subversion/bindings/javahl/src/org/apache/subversion/javahl/type/
      - copied from r1035394, subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/type/
    subversion/branches/issue-3668-3669/subversion/bindings/javahl/src/org/apache/subversion/javahl/type/Version.java
      - copied unchanged from r1035394, subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/type/Version.java
Removed:
    subversion/branches/issue-3668-3669/build/generator/build_locale.ezt
    subversion/branches/issue-3668-3669/build/generator/build_zlib.ezt
    subversion/branches/issue-3668-3669/build/generator/msvc_dsp.ezt
    subversion/branches/issue-3668-3669/build/generator/msvc_dsw.ezt
    subversion/branches/issue-3668-3669/build/generator/neon.dsp.ezt
    subversion/branches/issue-3668-3669/build/generator/neon.vcproj.ezt
    subversion/branches/issue-3668-3669/build/generator/neon.vcxproj.ezt
    subversion/branches/issue-3668-3669/build/generator/serf.dsp.ezt
    subversion/branches/issue-3668-3669/build/generator/serf.vcproj.ezt
    subversion/branches/issue-3668-3669/build/generator/serf.vcxproj.ezt
    subversion/branches/issue-3668-3669/build/generator/svn_config.vcproj.ezt
    subversion/branches/issue-3668-3669/build/generator/svn_config.vcxproj.ezt
    subversion/branches/issue-3668-3669/build/generator/svn_locale.vcproj.ezt
    subversion/branches/issue-3668-3669/build/generator/svn_locale.vcxproj.ezt
    subversion/branches/issue-3668-3669/build/generator/zlib.dsp.ezt
    subversion/branches/issue-3668-3669/build/generator/zlib.vcproj.ezt
    subversion/branches/issue-3668-3669/build/generator/zlib.vcxproj.ezt
    subversion/branches/issue-3668-3669/build/win32/svn_config.dsp
    subversion/branches/issue-3668-3669/build/win32/svn_locale.dsp
    subversion/branches/issue-3668-3669/subversion/bindings/javahl/native/org_apache_subversion_javahl_Version.cpp
    subversion/branches/issue-3668-3669/subversion/bindings/javahl/src/org/apache/subversion/javahl/Version.java
Modified:
    subversion/branches/issue-3668-3669/   (props changed)
    subversion/branches/issue-3668-3669/Makefile.in
    subversion/branches/issue-3668-3669/build.conf
    subversion/branches/issue-3668-3669/build/generator/gen_msvc_dsp.py
    subversion/branches/issue-3668-3669/build/generator/gen_vcnet_vcproj.py
    subversion/branches/issue-3668-3669/build/generator/gen_win.py
    subversion/branches/issue-3668-3669/build/run_tests.py
    subversion/branches/issue-3668-3669/configure.ac
    subversion/branches/issue-3668-3669/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
    subversion/branches/issue-3668-3669/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRepos.java
    subversion/branches/issue-3668-3669/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java
    subversion/branches/issue-3668-3669/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
    subversion/branches/issue-3668-3669/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNRepos.java
    subversion/branches/issue-3668-3669/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Version.java
    subversion/branches/issue-3668-3669/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
    subversion/branches/issue-3668-3669/subversion/bindings/swig/ruby/svn/fs.rb
    subversion/branches/issue-3668-3669/subversion/include/svn_client.h
    subversion/branches/issue-3668-3669/subversion/include/svn_error_codes.h
    subversion/branches/issue-3668-3669/subversion/libsvn_client/changelist.c
    subversion/branches/issue-3668-3669/subversion/libsvn_client/checkout.c
    subversion/branches/issue-3668-3669/subversion/libsvn_client/client.h
    subversion/branches/issue-3668-3669/subversion/libsvn_client/deprecated.c
    subversion/branches/issue-3668-3669/subversion/libsvn_client/externals.c
    subversion/branches/issue-3668-3669/subversion/libsvn_client/patch.c
    subversion/branches/issue-3668-3669/subversion/libsvn_client/relocate.c
    subversion/branches/issue-3668-3669/subversion/libsvn_client/status.c
    subversion/branches/issue-3668-3669/subversion/libsvn_client/update.c
    subversion/branches/issue-3668-3669/subversion/libsvn_fs_fs/lock.c
    subversion/branches/issue-3668-3669/subversion/libsvn_wc/adm_ops.c
    subversion/branches/issue-3668-3669/subversion/libsvn_wc/entries.c
    subversion/branches/issue-3668-3669/subversion/libsvn_wc/tree_conflicts.c
    subversion/branches/issue-3668-3669/subversion/libsvn_wc/tree_conflicts.h
    subversion/branches/issue-3668-3669/subversion/libsvn_wc/update_editor.c
    subversion/branches/issue-3668-3669/subversion/libsvn_wc/upgrade.c
    subversion/branches/issue-3668-3669/subversion/libsvn_wc/wc-queries.sql
    subversion/branches/issue-3668-3669/subversion/libsvn_wc/wc.h
    subversion/branches/issue-3668-3669/subversion/libsvn_wc/wc_db.c
    subversion/branches/issue-3668-3669/subversion/libsvn_wc/wc_db.h
    subversion/branches/issue-3668-3669/subversion/libsvn_wc/workqueue.c
    subversion/branches/issue-3668-3669/subversion/po/de.po
    subversion/branches/issue-3668-3669/subversion/po/es.po
    subversion/branches/issue-3668-3669/subversion/po/fr.po
    subversion/branches/issue-3668-3669/subversion/po/it.po
    subversion/branches/issue-3668-3669/subversion/po/ja.po
    subversion/branches/issue-3668-3669/subversion/po/ko.po
    subversion/branches/issue-3668-3669/subversion/po/nb.po
    subversion/branches/issue-3668-3669/subversion/po/pl.po
    subversion/branches/issue-3668-3669/subversion/po/pt_BR.po
    subversion/branches/issue-3668-3669/subversion/po/sv.po
    subversion/branches/issue-3668-3669/subversion/po/zh_CN.po
    subversion/branches/issue-3668-3669/subversion/po/zh_TW.po
    subversion/branches/issue-3668-3669/subversion/svn/changelist-cmd.c
    subversion/branches/issue-3668-3669/subversion/svn/main.c
    subversion/branches/issue-3668-3669/subversion/svn/patch-cmd.c
    subversion/branches/issue-3668-3669/subversion/svn/unlock-cmd.c
    subversion/branches/issue-3668-3669/subversion/svn/update-cmd.c
    subversion/branches/issue-3668-3669/subversion/tests/cmdline/depth_tests.py
    subversion/branches/issue-3668-3669/subversion/tests/cmdline/input_validation_tests.py
    subversion/branches/issue-3668-3669/subversion/tests/cmdline/patch_tests.py
    subversion/branches/issue-3668-3669/subversion/tests/cmdline/update_tests.py
    subversion/branches/issue-3668-3669/subversion/tests/libsvn_wc/op-depth-test.c
    subversion/branches/issue-3668-3669/subversion/tests/libsvn_wc/tree-conflict-data-test.c

Propchange: subversion/branches/issue-3668-3669/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Nov 15 18:50:38 2010
@@ -39,4 +39,4 @@
 /subversion/branches/tc_url_rev:874351-874483
 /subversion/branches/tree-conflicts:868291-873154
 /subversion/branches/tree-conflicts-notify:873926-874008
-/subversion/trunk:1031000-1034190
+/subversion/trunk:1031000-1035394

Modified: subversion/branches/issue-3668-3669/Makefile.in
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3668-3669/Makefile.in?rev=1035404&r1=1035403&r2=1035404&view=diff
==============================================================================
--- subversion/branches/issue-3668-3669/Makefile.in (original)
+++ subversion/branches/issue-3668-3669/Makefile.in Mon Nov 15 18:50:38 2010
@@ -419,7 +419,7 @@ revision-install:
 install-static: @INSTALL_STATIC_RULES@
 
 # JavaHL target aliases
-javahl: mkdir-init javahl-java javahl-javah javahl-callback-javah javahl-lib @JAVAHL_TESTS_TARGET@ javahl-compat
+javahl: mkdir-init javahl-java javahl-javah javahl-callback-javah javahl-type-javah javahl-lib @JAVAHL_TESTS_TARGET@ javahl-compat
 install-javahl: javahl install-javahl-java install-javahl-javah install-javahl-lib
 javahl-compat: javahl-compat-java @JAVAHL_COMPAT_TESTS_TARGET@
 
@@ -600,7 +600,8 @@ doc-javahl:
 	  -link http://java.sun.com/javase/6/docs/api/ \
 	  org.tigris.subversion.javahl \
       org.apache.subversion.javahl \
-      org.apache.subversion.javahl.callback
+      org.apache.subversion.javahl.callback \
+      org.apache.subversion.javahl.type
 
 doc-clean:
 	rm -rf $(top_srcdir)/doc/doxygen

Modified: subversion/branches/issue-3668-3669/build.conf
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3668-3669/build.conf?rev=1035404&r1=1035403&r2=1035404&view=diff
==============================================================================
--- subversion/branches/issue-3668-3669/build.conf (original)
+++ subversion/branches/issue-3668-3669/build.conf Mon Nov 15 18:50:38 2010
@@ -56,7 +56,7 @@ private-built-includes =
         subversion/bindings/javahl/include/org_apache_subversion_javahl_Revision.h
         subversion/bindings/javahl/include/org_apache_subversion_javahl_SVNRepos.h
         subversion/bindings/javahl/include/org_apache_subversion_javahl_SVNClient.h
-        subversion/bindings/javahl/include/org_apache_subversion_javahl_Version.h
+        subversion/bindings/javahl/include/org_apache_subversion_javahl_type_Version.h
         subversion/bindings/javahl/include/org_apache_subversion_javahl_callback_UserPasswordCallback.h
 
 
@@ -404,7 +404,7 @@ sources = internal_statements.sql
 type = i18n
 path = subversion/po
 install = locale
-external-project = build/win32/svn_locale
+external-project = svn_locale
 
 # ----------------------------------------------------------------------------
 #
@@ -526,6 +526,7 @@ msvc-static = no
 type = java
 path = subversion/bindings/javahl/src/org/apache/subversion/javahl
   subversion/bindings/javahl/src/org/apache/subversion/javahl/callback
+  subversion/bindings/javahl/src/org/apache/subversion/javahl/type
 src-root = subversion/bindings/javahl/src
 sources = *.java
 install = javahl-java
@@ -569,6 +570,17 @@ package-roots = org
 #add-deps = javahl-compat-java
 add-deps = $(javahl_compat_java_DEPS)
 
+[javahl-type-javah]
+type = javah 
+path = subversion/bindings/javahl/src/org/apache/subversion/javahl/type
+classes = subversion/bindings/javahl/classes
+headers = subversion/bindings/javahl/include
+package = org.apache.subversion.javahl.type
+sources = *.java
+add-deps = $(javahl_java_DEPS)
+install = javahl-javah
+link-cmd = $(COMPILE_JAVAHL_JAVAH) -force
+
 [javahl-callback-javah]
 type = javah 
 path = subversion/bindings/javahl/src/org/apache/subversion/javahl/callback
@@ -598,7 +610,7 @@ path = subversion/bindings/javahl/native
 libs = libsvn_repos libsvn_client libsvn_wc libsvn_ra libsvn_delta libsvn_diff 
        libsvn_subr libsvn_fs aprutil apriconv apr neon
 sources = *.cpp *.c
-add-deps = $(javahl_javah_DEPS) $(javahl_java_DEPS) $(javahl_callback_javah_DEPS)
+add-deps = $(javahl_javah_DEPS) $(javahl_java_DEPS) $(javahl_callback_javah_DEPS) $(javahl_type_javah_DEPS)
 install = javahl-lib
 # need special build rule to include -I$(JDK)/include/jni.h
 compile-cmd = $(COMPILE_JAVAHL_CXX)
@@ -1047,7 +1059,7 @@ external-lib = $(SVN_SASL_LIBS)
 [zlib]
 type = lib
 external-lib = $(SVN_ZLIB_LIBS)
-external-project = build/win32/zlib
+external-project = zlib
 msvc-static = yes
 
 [neon]
@@ -1123,7 +1135,7 @@ libs = fs-libs ra-libs libsvn_client lib
 
 [__CONFIG__]
 type = lib
-external-project = build/win32/svn_config
+external-project = svn_config
 
 [__SWIG_PYTHON__]
 type = swig_project

Modified: subversion/branches/issue-3668-3669/build/generator/gen_msvc_dsp.py
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3668-3669/build/generator/gen_msvc_dsp.py?rev=1035404&r1=1035403&r2=1035404&view=diff
==============================================================================
--- subversion/branches/issue-3668-3669/build/generator/gen_msvc_dsp.py (original)
+++ subversion/branches/issue-3668-3669/build/generator/gen_msvc_dsp.py Mon Nov 15 18:50:38 2010
@@ -103,6 +103,18 @@ class Generator(gen_win.WinGeneratorBase
   def write(self):
     "Write a Workspace (.dsw)"
 
+    self.move_proj_file(self.projfilesdir,
+                        'svn_config.dsp',
+                          (
+                            ('sql', sql),
+                            ('project_guid', self.makeguid('__CONFIG__')),
+                          )
+                        )
+    self.move_proj_file(self.projfilesdir,
+                        'svn_locale.dsp',
+                        (
+                          ('project_guid', self.makeguid('svn_locale')),
+                        ))
     self.write_zlib_project_file('zlib.dsp')
     self.write_neon_project_file('neon.dsp')
     self.write_serf_project_file('serf.dsp')

Modified: subversion/branches/issue-3668-3669/build/generator/gen_vcnet_vcproj.py
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3668-3669/build/generator/gen_vcnet_vcproj.py?rev=1035404&r1=1035403&r2=1035404&view=diff
==============================================================================
--- subversion/branches/issue-3668-3669/build/generator/gen_vcnet_vcproj.py (original)
+++ subversion/branches/issue-3668-3669/build/generator/gen_vcnet_vcproj.py Mon Nov 15 18:50:38 2010
@@ -141,14 +141,14 @@ class Generator(gen_win.WinGeneratorBase
 
     # apr doesn't supply vcproj files, the user must convert them
     # manually before loading the generated solution
-    self.move_proj_file(os.path.join('build', 'win32'),
+    self.move_proj_file(self.projfilesdir,
                         'svn_config' + self.vcproj_extension,
                           (
                             ('sql', sql),
                             ('project_guid', self.makeguid('__CONFIG__')),
                           )
                         )
-    self.move_proj_file(os.path.join('build', 'win32'),
+    self.move_proj_file(self.projfilesdir,
                         'svn_locale' + self.vcproj_extension,
                         (
                           ('project_guid', self.makeguid('svn_locale')),

Modified: subversion/branches/issue-3668-3669/build/generator/gen_win.py
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3668-3669/build/generator/gen_win.py?rev=1035404&r1=1035403&r2=1035404&view=diff
==============================================================================
--- subversion/branches/issue-3668-3669/build/generator/gen_win.py (original)
+++ subversion/branches/issue-3668-3669/build/generator/gen_win.py Mon Nov 15 18:50:38 2010
@@ -255,8 +255,9 @@ class WinGeneratorBase(GeneratorBase):
     # Find Sqlite
     self._find_sqlite()
 
-    # Look for ML
+    # Look for ZLib and ML
     if self.zlib_path:
+      self._find_zlib()
       self._find_ml()
 
     # Find neon version
@@ -281,12 +282,20 @@ class WinGeneratorBase(GeneratorBase):
       if self.write_file_if_changed(svnissdeb, buf.replace("@CONFIG@", "Debug")):
         print('Wrote %s' % svnissdeb)
 
+    #Make the project files directory if it doesn't exist
+    #TODO win32 might not be the best path as win64 stuff will go here too
+    self.projfilesdir=os.path.join("build","win32",subdir)
+    self.rootpath = ".." + "\\.." * self.projfilesdir.count(os.sep)
+    if not os.path.exists(self.projfilesdir):
+      os.makedirs(self.projfilesdir)
+
     # Generate the build_zlib.bat file
     if self.zlib_path:
       data = {'zlib_path': os.path.abspath(self.zlib_path),
+              'zlib_version': self.zlib_version,
               'use_ml': self.have_ml and 1 or None}
-      bat = os.path.join('build', 'win32', 'build_zlib.bat')
-      self.write_with_template(bat, 'build_zlib.ezt', data)
+      bat = os.path.join(self.projfilesdir, 'build_zlib.bat')
+      self.write_with_template(bat, 'templates/build_zlib.ezt', data)
 
     # Generate the build_locale.bat file
     pofiles = []
@@ -296,15 +305,9 @@ class WinGeneratorBase(GeneratorBase):
           pofiles.append(POFile(po[:-3]))
 
     data = {'pofiles': pofiles}
-    self.write_with_template(os.path.join('build', 'win32', 'build_locale.bat'),
-                             'build_locale.ezt', data)
-
-    #Make the project files directory if it doesn't exist
-    #TODO win32 might not be the best path as win64 stuff will go here too
-    self.projfilesdir=os.path.join("build","win32",subdir)
-    self.rootpath = ".." + "\\.." * self.projfilesdir.count(os.sep)
-    if not os.path.exists(self.projfilesdir):
-      os.makedirs(self.projfilesdir)
+    self.write_with_template(os.path.join(self.projfilesdir,
+                                          'build_locale.bat'),
+                             'templates/build_locale.ezt', data)
 
     #Here we can add additional platforms to compile for
     self.platforms = ['Win32']
@@ -677,8 +680,10 @@ class WinGeneratorBase(GeneratorBase):
       path = self.neon_path + target.external_project[4:]
     elif target.external_project[:5] == 'serf/' and self.serf_lib:
       path = self.serf_path + target.external_project[4:]
-    else:
+    elif target.external_project.find('/') != -1:
       path = target.external_project
+    else:
+      path = os.path.join(self.projfilesdir, target.external_project)
 
     return "%s.%s" % (gen_base.native_path(path), proj_ext)
 
@@ -1115,7 +1120,7 @@ class WinGeneratorBase(GeneratorBase):
     if not self.zlib_path:
       return
     zlib_path = os.path.abspath(self.zlib_path)
-    self.move_proj_file(os.path.join('build', 'win32'), name,
+    self.move_proj_file(self.projfilesdir, name,
                         (('zlib_path', zlib_path),
                          ('zlib_sources',
                           glob.glob(os.path.join(zlib_path, '*.c'))
@@ -1125,7 +1130,9 @@ class WinGeneratorBase(GeneratorBase):
                                                    'contrib/masmx86/*.asm'))),
                          ('zlib_headers',
                           glob.glob(os.path.join(zlib_path, '*.h'))),
+                         ('zlib_version', self.zlib_version),
                          ('project_guid', self.makeguid('zlib')),
+                         ('use_ml', self.have_ml and 1 or None),
                         ))
 
   def write_neon_project_file(self, name):
@@ -1180,7 +1187,7 @@ class WinGeneratorBase(GeneratorBase):
     ### these projects include zlib, neon, serf, locale, config, etc.
 
     dest_file = os.path.join(path, name)
-    source_template = name + '.ezt'
+    source_template = os.path.join('templates', name + '.ezt')
     data = {
       'version' : self.vcproj_version,
       'configs' : self.configs,
@@ -1544,6 +1551,32 @@ class WinGeneratorBase(GeneratorBase):
     else:
       print(msg % self.sqlite_version)
 
+  def _find_zlib(self):
+    "Find the ZLib library and version"
+    
+    if not self.zlib_path:
+      self.zlib_version = '1'
+      return
+    
+    header_file = os.path.join(self.zlib_path, 'zlib.h')
+    
+    if not os.path.exists(header_file):
+      self.zlib_version = '1'
+      return
+      
+    fp = open(header_file)
+    txt = fp.read()
+    fp.close()
+    vermatch = re.search(r'^\s*#define\s+ZLIB_VERSION\s+"(\d+)\.(\d+)\.(\d+)(?:\.\d)?"', txt, re.M)
+
+    version = tuple(map(int, vermatch.groups()))
+    
+    self.zlib_version = '%d.%d.%d' % version
+
+    msg = 'Found ZLib version %s\n'
+
+    print(msg % self.zlib_version)
+
 class ProjectItem:
   "A generic item class for holding sources info, config info, etc for a project"
   def __init__(self, **kw):

Modified: subversion/branches/issue-3668-3669/build/run_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3668-3669/build/run_tests.py?rev=1035404&r1=1035403&r2=1035404&view=diff
==============================================================================
--- subversion/branches/issue-3668-3669/build/run_tests.py (original)
+++ subversion/branches/issue-3668-3669/build/run_tests.py Mon Nov 15 18:50:38 2010
@@ -363,6 +363,8 @@ class TestHarness:
     # restore some values
     sys.path = old_path
     if self.log:
+      sys.stdout.flush()
+      sys.stderr.flush()
       os.dup2(old_stdout, 1)
       os.dup2(old_stderr, 2)
       os.close(old_stdout)

Modified: subversion/branches/issue-3668-3669/configure.ac
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3668-3669/configure.ac?rev=1035404&r1=1035403&r2=1035404&view=diff
==============================================================================
--- subversion/branches/issue-3668-3669/configure.ac (original)
+++ subversion/branches/issue-3668-3669/configure.ac Mon Nov 15 18:50:38 2010
@@ -777,12 +777,29 @@ dnl Process some configuration options -
 AC_ARG_WITH(ssl,
 AS_HELP_STRING([--with-ssl],
                [This option does NOT affect the Subversion build process in any
-                way. It enables OpenSSL support in the Neon library. If and
-                only if you are building Neon as an integrated part of the
-                Subversion build process, rather than linking to an already
-                installed version of Neon, you probably want to pass this
-                option so that Neon (and so indirectly, Subversion) will be
-                capable of https:// access.]),
+                way. It enables OpenSSL support in the Neon HTTP client
+                library. If and only if you are building Neon as an integrated
+                part of the Subversion build process, rather than linking to
+                an already installed version of Neon, you probably want to pass
+                this option so that Neon (and so indirectly, Subversion) will
+                be capable of https:// access via that library. (Note that
+                Subversion also may also or alternatively be configured to use
+                the Serf library for http:// and https:// access; see the
+                --with-serf and --with-openssl options.)])
+[])
+
+AC_ARG_WITH(openssl,
+AS_HELP_STRING([--with-openssl],
+               [This option does NOT affect the Subversion build process in any
+                way. It enables OpenSSL support in the Serf HTTP client
+                library. If and only if you are building Serf as an integrated
+                part of the Subversion build process, rather than linking to
+                an already installed version of Serf, you probably want to pass
+                this option so that Serf (and so indirectly, Subversion) will
+                be capable of https:// access via that library. (Note that
+                Subversion also may also or alternatively be configured to use
+                the Neon library for http:// and https:// access; see the
+                --with-neon and --with-ssl options.)])
 [])
 
 AC_ARG_ENABLE(debug,

Modified: subversion/branches/issue-3668-3669/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3668-3669/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java?rev=1035404&r1=1035403&r2=1035404&view=diff
==============================================================================
--- subversion/branches/issue-3668-3669/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java (original)
+++ subversion/branches/issue-3668-3669/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java Mon Nov 15 18:50:38 2010
@@ -24,6 +24,7 @@
 package org.apache.subversion.javahl;
 
 import org.apache.subversion.javahl.callback.*;
+import org.apache.subversion.javahl.type.*;
 
 import java.io.OutputStream;
 import java.util.Collection;

Modified: subversion/branches/issue-3668-3669/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRepos.java
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3668-3669/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRepos.java?rev=1035404&r1=1035403&r2=1035404&view=diff
==============================================================================
--- subversion/branches/issue-3668-3669/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRepos.java (original)
+++ subversion/branches/issue-3668-3669/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRepos.java Mon Nov 15 18:50:38 2010
@@ -29,6 +29,7 @@ import java.io.InputStream;
 import java.io.File;
 
 import org.apache.subversion.javahl.callback.ReposNotifyCallback;
+import org.apache.subversion.javahl.type.*;
 
 public interface ISVNRepos {
 

Modified: subversion/branches/issue-3668-3669/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3668-3669/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java?rev=1035404&r1=1035403&r2=1035404&view=diff
==============================================================================
--- subversion/branches/issue-3668-3669/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java (original)
+++ subversion/branches/issue-3668-3669/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java Mon Nov 15 18:50:38 2010
@@ -23,6 +23,8 @@
 
 package org.apache.subversion.javahl;
 
+import org.apache.subversion.javahl.type.Version;
+
 /**
  * Handles activities related to management of native resouces
  * (e.g. loading of native libraries).

Modified: subversion/branches/issue-3668-3669/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3668-3669/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java?rev=1035404&r1=1035403&r2=1035404&view=diff
==============================================================================
--- subversion/branches/issue-3668-3669/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java (original)
+++ subversion/branches/issue-3668-3669/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java Mon Nov 15 18:50:38 2010
@@ -24,6 +24,7 @@
 package org.apache.subversion.javahl;
 
 import org.apache.subversion.javahl.callback.*;
+import org.apache.subversion.javahl.type.*;
 
 import java.io.OutputStream;
 import java.io.ByteArrayOutputStream;

Modified: subversion/branches/issue-3668-3669/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNRepos.java
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3668-3669/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNRepos.java?rev=1035404&r1=1035403&r2=1035404&view=diff
==============================================================================
--- subversion/branches/issue-3668-3669/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNRepos.java (original)
+++ subversion/branches/issue-3668-3669/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNRepos.java Mon Nov 15 18:50:38 2010
@@ -29,6 +29,7 @@ import java.io.InputStream;
 import java.io.File;
 
 import org.apache.subversion.javahl.callback.ReposNotifyCallback;
+import org.apache.subversion.javahl.type.*;
 
 /**
  * This class offers the same commands as the svnadmin commandline

Modified: subversion/branches/issue-3668-3669/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Version.java
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3668-3669/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Version.java?rev=1035404&r1=1035403&r2=1035404&view=diff
==============================================================================
--- subversion/branches/issue-3668-3669/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Version.java (original)
+++ subversion/branches/issue-3668-3669/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Version.java Mon Nov 15 18:50:38 2010
@@ -30,14 +30,14 @@ package org.tigris.subversion.javahl;
  */
 public class Version
 {
-    private org.apache.subversion.javahl.Version aVersion;
+    private org.apache.subversion.javahl.type.Version aVersion;
 
     public Version()
     {
-        aVersion = new org.apache.subversion.javahl.Version();
+        aVersion = new org.apache.subversion.javahl.type.Version();
     }
 
-    public Version(org.apache.subversion.javahl.Version aVersion)
+    public Version(org.apache.subversion.javahl.type.Version aVersion)
     {
         this.aVersion = aVersion;
     }

Modified: subversion/branches/issue-3668-3669/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3668-3669/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java?rev=1035404&r1=1035403&r2=1035404&view=diff
==============================================================================
--- subversion/branches/issue-3668-3669/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java (original)
+++ subversion/branches/issue-3668-3669/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java Mon Nov 15 18:50:38 2010
@@ -23,6 +23,7 @@
 package org.apache.subversion.javahl;
 
 import org.apache.subversion.javahl.callback.*;
+import org.apache.subversion.javahl.type.*;
 
 import java.io.File;
 import java.io.FileOutputStream;

Modified: subversion/branches/issue-3668-3669/subversion/bindings/swig/ruby/svn/fs.rb
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3668-3669/subversion/bindings/swig/ruby/svn/fs.rb?rev=1035404&r1=1035403&r2=1035404&view=diff
==============================================================================
--- subversion/branches/issue-3668-3669/subversion/bindings/swig/ruby/svn/fs.rb (original)
+++ subversion/branches/issue-3668-3669/subversion/bindings/swig/ruby/svn/fs.rb Mon Nov 15 18:50:38 2010
@@ -602,8 +602,13 @@ module Svn
           @tempfile1 = Tempfile.new("svn_fs")
           @tempfile2 = Tempfile.new("svn_fs")
 
-          dump_contents(@tempfile1, @root1, @path1)
-          dump_contents(@tempfile2, @root2, @path2)
+          begin
+            dump_contents(@tempfile1, @root1, @path1)
+            dump_contents(@tempfile2, @root2, @path2)
+          ensure
+            @tempfile1.close
+            @tempfile2.close
+          end
 
           [@tempfile1, @tempfile2]
         end
@@ -623,15 +628,10 @@ module Svn
       end
 
       private
-      def dump_contents(tempfile, root, path)
+      def dump_contents(open_tempfile, root, path)
         if root and path
-          begin
-            tempfile.open
-            root.file_contents(path) do |stream|
-              tempfile.print(stream.read)
-            end
-          ensure
-            tempfile.close
+          root.file_contents(path) do |stream|
+            open_tempfile.print(stream.read)
           end
         end
       end

Modified: subversion/branches/issue-3668-3669/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3668-3669/subversion/include/svn_client.h?rev=1035404&r1=1035403&r2=1035404&view=diff
==============================================================================
--- subversion/branches/issue-3668-3669/subversion/include/svn_client.h (original)
+++ subversion/branches/issue-3668-3669/subversion/include/svn_client.h Mon Nov 15 18:50:38 2010
@@ -1189,6 +1189,9 @@ svn_client_checkout(svn_revnum_t *result
  * If @a allow_unver_obstructions is FALSE then the update will abort
  * if there are any unversioned obstructing items.
  *
+ * If @a make_parents is TRUE, create any non-existent parent
+ * directories also by checking them out at depth=empty.
+ *
  * If @a ctx->notify_func2 is non-NULL, invoke @a ctx->notify_func2 with
  * @a ctx->notify_baton2 for each item handled by the update, and also for
  * files restored from text-base.  If @a ctx->cancel_func is non-NULL, invoke
@@ -1207,8 +1210,28 @@ svn_client_checkout(svn_revnum_t *result
  *  implementation, and allows for the possibility that different
  *  targets may come from different repositories.
  *
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_client_update4(apr_array_header_t **result_revs,
+                   const apr_array_header_t *paths,
+                   const svn_opt_revision_t *revision,
+                   svn_depth_t depth,
+                   svn_boolean_t depth_is_sticky,
+                   svn_boolean_t ignore_externals,
+                   svn_boolean_t allow_unver_obstructions,
+                   svn_boolean_t make_parents,
+                   svn_client_ctx_t *ctx,
+                   apr_pool_t *pool);
+
+/**
+ * Similar to svn_client_update4() but with @a make_parents always set
+ * to FALSE.
+ *
+ * @deprecated Provided for backward compatibility with the 1.6 API.
  * @since New in 1.5.
  */
+SVN_DEPRECATED
 svn_error_t *
 svn_client_update3(apr_array_header_t **result_revs,
                    const apr_array_header_t *paths,
@@ -2177,7 +2200,7 @@ svn_client_status5(svn_revnum_t *result_
 
 /**
  * Same as svn_client_status5(), but using #svn_wc_status_func3_t
- * instead of #svn_wc_status_func4_t and depth_as_sticky set to TRUE.
+ * instead of #svn_client_status_func_t and depth_as_sticky set to TRUE.
  *
  * @since New in 1.6.
  * @deprecated Provided for backward compatibility with the 1.6 API.

Modified: subversion/branches/issue-3668-3669/subversion/include/svn_error_codes.h
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3668-3669/subversion/include/svn_error_codes.h?rev=1035404&r1=1035403&r2=1035404&view=diff
==============================================================================
--- subversion/branches/issue-3668-3669/subversion/include/svn_error_codes.h (original)
+++ subversion/branches/issue-3668-3669/subversion/include/svn_error_codes.h Mon Nov 15 18:50:38 2010
@@ -219,6 +219,11 @@ SVN_ERROR_START
              SVN_ERR_BAD_CATEGORY_START + 13,
              "Unknown string value of token")
 
+  /** @since New in 1.7. */
+  SVN_ERRDEF(SVN_ERR_BAD_CHANGELIST_NAME,
+             SVN_ERR_BAD_CATEGORY_START + 14,
+             "Invalid changelist name")
+
   /* xml errors */
 
   SVN_ERRDEF(SVN_ERR_XML_ATTRIB_NOT_FOUND,

Modified: subversion/branches/issue-3668-3669/subversion/libsvn_client/changelist.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3668-3669/subversion/libsvn_client/changelist.c?rev=1035404&r1=1035403&r2=1035404&view=diff
==============================================================================
--- subversion/branches/issue-3668-3669/subversion/libsvn_client/changelist.c (original)
+++ subversion/branches/issue-3668-3669/subversion/libsvn_client/changelist.c Mon Nov 15 18:50:38 2010
@@ -107,6 +107,10 @@ svn_client_add_to_changelist(const apr_a
   apr_hash_t *changelist_hash = NULL;
   int i;
 
+  if (changelist[0] == '\0')
+    return svn_error_create(SVN_ERR_BAD_CHANGELIST_NAME, NULL,
+                            _("Target changelist name must not be empty"));
+
   for (i = 0; i < paths->nelts; i++)
     {
       const char *path = APR_ARRAY_IDX(paths, i, const char *);

Modified: subversion/branches/issue-3668-3669/subversion/libsvn_client/checkout.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3668-3669/subversion/libsvn_client/checkout.c?rev=1035404&r1=1035403&r2=1035404&view=diff
==============================================================================
--- subversion/branches/issue-3668-3669/subversion/libsvn_client/checkout.c (original)
+++ subversion/branches/issue-3668-3669/subversion/libsvn_client/checkout.c Mon Nov 15 18:50:38 2010
@@ -218,7 +218,7 @@ svn_client__checkout_internal(svn_revnum
                                     revision, depth, TRUE,
                                     ignore_externals,
                                     allow_unver_obstructions,
-                                    use_sleep, innercheckout,
+                                    use_sleep, innercheckout, FALSE,
                                     ctx, pool);
 
   if (err)

Modified: subversion/branches/issue-3668-3669/subversion/libsvn_client/client.h
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3668-3669/subversion/libsvn_client/client.h?rev=1035404&r1=1035403&r2=1035404&view=diff
==============================================================================
--- subversion/branches/issue-3668-3669/subversion/libsvn_client/client.h (original)
+++ subversion/branches/issue-3668-3669/subversion/libsvn_client/client.h Mon Nov 15 18:50:38 2010
@@ -39,34 +39,16 @@
 extern "C" {
 #endif /* __cplusplus */
 
-struct svn_cl__externals_store
-{
-  apr_pool_t *pool;
-  apr_hash_t *externals_old;
-  apr_hash_t *externals_new;
-  apr_hash_t *depths;
-};
-
-/* svn_wc_external_update_t handler, storing the received data in a
- * svn_cl__externals_store instance, which must be passed as baton.
- * When one of the hashes is NULL, these values are not stored */
-svn_error_t *
-svn_cl__store_externals(void *baton,
-                        const char *local_abspath,
-                        const svn_string_t *old_value,
-                        const svn_string_t *new_value,
-                        svn_depth_t depth,
-                        apr_pool_t *scratch_pool);
-
-
 
-/* Set *URL, allocated in RESULT_POOL, and *PEG_REVNUM (the latter is
-   ignored if NULL) to the repository URL of ABSPATH_OR_URL.  If
+/* Set *URL and *PEG_REVNUM (the latter is ignored if NULL) to the
+   repository URL of ABSPATH_OR_URL as found in revision PEG_REVISION.
+   If PEG_REVISION->kind is svn_opt_revision_unspecified, use the head
+   revision for a URL or the working revision for a local path.  If
    ABSPATH_OR_URL is an absolute WC path and PEG_REVISION->kind is
    svn_opt_revision_working, use the corresponding entry's copyfrom info.
    RA_SESSION may be NULL regardless of whether ABSPATH_OR_URL is a URL.
-   Use CTX for cancellation (ignored if NULL), and SCRATCH_POOL for all
-   temporary allocations. */
+   Use CTX for authentication and for a working copy context.  Allocate
+   *URL in RESULT_POOL. Use SCRATCH_POOL for temporary allocations. */
 svn_error_t *
 svn_client__derive_location(const char **url,
                             svn_revnum_t *peg_revnum,
@@ -91,7 +73,8 @@ svn_client__derive_location(const char *
 
    If PEG_REV_NUM is svn_opt_revision_unspecified, svn_opt_revision_number,
    svn_opt_revision_base, or svn_opt_revision_working then set *REVNUM
-   to the base revision. */
+   to the base revision.
+   ### What's up with this last paragraph? Sounds all wrong. */
 svn_error_t *
 svn_client__entry_location(const char **url,
                            svn_revnum_t *revnum,
@@ -491,6 +474,12 @@ svn_client__make_local_parents(const cha
    these obstructions cause the update to fail.
 
    If INNERUPDATE is true, no anchor check is performed on the update target.
+
+   If MAKE_PARENTS is true, allow the update to calculate and checkout
+   (with depth=empty) any parent directories of the requested update
+   target which are missing from the working copy.
+
+   NOTE:  You may not specify both INNERUPDATE and MAKE_PARENTS as true.
 */
 svn_error_t *
 svn_client__update_internal(svn_revnum_t *result_rev,
@@ -502,6 +491,7 @@ svn_client__update_internal(svn_revnum_t
                             svn_boolean_t allow_unver_obstructions,
                             svn_boolean_t *timestamp_sleep,
                             svn_boolean_t innerupdate,
+                            svn_boolean_t make_parents,
                             svn_client_ctx_t *ctx,
                             apr_pool_t *pool);
 
@@ -912,7 +902,6 @@ svn_client__do_commit(const char *base_u
 /*** Externals (Modules) ***/
 
 /* Handle changes to the svn:externals property described by EXTERNALS_OLD,
-
    EXTERNALS_NEW, and AMBIENT_DEPTHS.  The tree's top level directory
    is at TO_ABSPATH and corresponds to FROM_URL URL in the repository,
    which has a root URL of REPOS_ROOT_URL.  A write lock should be
@@ -1004,6 +993,44 @@ svn_client__do_external_status(svn_clien
                                void *status_baton,
                                apr_pool_t *pool);
 
+/* Set *EXTERNALS_P to a hash mapping const char * local absolute
+   paths to const svn_string_t * svn:externals property values, those
+   found by crawling LOCAL_ABSPATH to DEPTH. */
+svn_error_t *
+svn_client__crawl_for_externals(apr_hash_t **externals_p,
+                                const char *local_abspath,
+                                svn_depth_t depth,
+                                svn_client_ctx_t *ctx,
+                                apr_pool_t *scratch_pool,
+                                apr_pool_t *result_pool);
+
+/* Baton type for svn_wc__external_info_gatherer(). */
+typedef struct svn_client__external_func_baton_t
+{
+  apr_hash_t *externals_old;  /* Hash of old externals property values,
+                                 or NULL if the caller doesn't care. */
+  apr_hash_t *externals_new;  /* Hash of new externals property values,
+                                 or NULL if the caller doesn't care. */
+  apr_hash_t *ambient_depths; /* Hash of ambient depth values, or NULL
+                                 if the caller doesn't care. */
+  apr_pool_t *result_pool;    /* Pool to use for all stored values. */
+
+} svn_client__external_func_baton_t;
+
+
+/* This function gets invoked whenever external changes are encountered.
+   This implements the `svn_wc_external_update_t' interface, and can
+   be used with an svn_client__external_func_baton_t BATON to gather
+   information about changes to externals definitions. */
+svn_error_t *
+svn_client__external_info_gatherer(void *baton,
+                                   const char *local_abspath,
+                                   const svn_string_t *old_val,
+                                   const svn_string_t *new_val,
+                                   svn_depth_t depth,
+                                   apr_pool_t *scratch_pool);
+
+
 
 
 /* Retrieve log messages using the first provided (non-NULL) callback
@@ -1081,30 +1108,6 @@ svn_cl__rev_default_to_peg(const svn_opt
                            const svn_opt_revision_t *peg_revision);
 
 
-/* Some external traversal helpers.
- */
-/* This function gets invoked whenever external changes are encountered.
-   This implements svn_wc_external_update_t */
-svn_error_t *
-svn_client__external_info_gatherer(void *baton,
-                                   const char *local_abspath,
-                                   const svn_string_t *old_val,
-                                   const svn_string_t *new_val,
-                                   svn_depth_t depth,
-                                   apr_pool_t *scratch_pool);
-
-/* Baton type for svn_wc__external_info_gatherer().  All fields must be
-   populated before use. */
-typedef struct svn_client__external_func_baton_t
-{
-  apr_hash_t *externals_old;
-  apr_hash_t *externals_new;
-  apr_hash_t *ambient_depths;
-
-  apr_pool_t *result_pool;
-} svn_client__external_func_baton_t;
-
-
 
 
 #ifdef __cplusplus

Modified: subversion/branches/issue-3668-3669/subversion/libsvn_client/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3668-3669/subversion/libsvn_client/deprecated.c?rev=1035404&r1=1035403&r2=1035404&view=diff
==============================================================================
--- subversion/branches/issue-3668-3669/subversion/libsvn_client/deprecated.c (original)
+++ subversion/branches/issue-3668-3669/subversion/libsvn_client/deprecated.c Mon Nov 15 18:50:38 2010
@@ -1796,6 +1796,22 @@ svn_client_status(svn_revnum_t *result_r
 
 /*** From update.c ***/
 svn_error_t *
+svn_client_update3(apr_array_header_t **result_revs,
+                   const apr_array_header_t *paths,
+                   const svn_opt_revision_t *revision,
+                   svn_depth_t depth,
+                   svn_boolean_t depth_is_sticky,
+                   svn_boolean_t ignore_externals,
+                   svn_boolean_t allow_unver_obstructions,
+                   svn_client_ctx_t *ctx,
+                   apr_pool_t *pool)
+{
+  return svn_client_update4(result_revs, paths, revision,
+                            depth, depth_is_sticky, ignore_externals,
+                            allow_unver_obstructions, FALSE, ctx, pool);
+}
+
+svn_error_t *
 svn_client_update2(apr_array_header_t **result_revs,
                    const apr_array_header_t *paths,
                    const svn_opt_revision_t *revision,

Modified: subversion/branches/issue-3668-3669/subversion/libsvn_client/externals.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3668-3669/subversion/libsvn_client/externals.c?rev=1035404&r1=1035403&r2=1035404&view=diff
==============================================================================
--- subversion/branches/issue-3668-3669/subversion/libsvn_client/externals.c (original)
+++ subversion/branches/issue-3668-3669/subversion/libsvn_client/externals.c Mon Nov 15 18:50:38 2010
@@ -204,7 +204,7 @@ switch_dir_external(const char *path,
               SVN_ERR(svn_client__update_internal(NULL, local_abspath,
                                                   revision, svn_depth_unknown,
                                                   FALSE, FALSE, FALSE,
-                                                  timestamp_sleep, TRUE,
+                                                  timestamp_sleep, TRUE, FALSE,
                                                   ctx, subpool));
               svn_pool_destroy(subpool);
               return SVN_NO_ERROR;
@@ -1392,70 +1392,86 @@ svn_client__do_external_status(svn_clien
   return SVN_NO_ERROR;
 }
 
-/* Implements svn_wc_externals_update_t */
+
+/* Implements the `svn_wc_externals_update_t' interface. */
 svn_error_t *
-svn_cl__store_externals(void *baton,
-                        const char *local_abspath,
-                        const svn_string_t *old_value,
-                        const svn_string_t *new_value,
-                        svn_depth_t depth,
-                        apr_pool_t *scratch_pool)
+svn_client__external_info_gatherer(void *baton,
+                                   const char *local_abspath,
+                                   const svn_string_t *old_value,
+                                   const svn_string_t *new_value,
+                                   svn_depth_t depth,
+                                   apr_pool_t *scratch_pool)
 {
-  struct svn_cl__externals_store *eb = baton;
-  apr_pool_t *dup_pool = eb->pool;
+  svn_client__external_func_baton_t *efb = baton;
+
+  local_abspath = apr_pstrdup(efb->result_pool, local_abspath);
 
-  local_abspath = apr_pstrdup(dup_pool, local_abspath);
+  if (efb->externals_old != NULL && old_value != NULL)
+    apr_hash_set(efb->externals_old, local_abspath, APR_HASH_KEY_STRING,
+                 apr_pstrndup(efb->result_pool,
+                              old_value->data, old_value->len));
+
+  if (efb->externals_new != NULL && new_value != NULL)
+    apr_hash_set(efb->externals_new, local_abspath, APR_HASH_KEY_STRING,
+                 apr_pstrndup(efb->result_pool,
+                              new_value->data, new_value->len));
 
-  if (eb->externals_old != NULL && old_value != NULL)
-    apr_hash_set(eb->externals_new,
-                 local_abspath, APR_HASH_KEY_STRING,
-                 apr_pstrndup(dup_pool, old_value->data, old_value->len));
-
-  if (eb->externals_new != NULL && new_value != NULL)
-    apr_hash_set(eb->externals_new,
-                 local_abspath, APR_HASH_KEY_STRING,
-                 apr_pstrndup(dup_pool, new_value->data, new_value->len));
-
-  if (eb->depths != NULL)
-    apr_hash_set(eb->depths,
-                 local_abspath, APR_HASH_KEY_STRING,
+  if (efb->ambient_depths != NULL)
+    apr_hash_set(efb->ambient_depths, local_abspath, APR_HASH_KEY_STRING,
                  svn_depth_to_word(depth));
 
   return SVN_NO_ERROR;
 }
 
 
-
-svn_error_t *
-svn_client__external_info_gatherer(void *baton,
-                                   const char *local_abspath,
-                                   const svn_string_t *old_val,
-                                   const svn_string_t *new_val,
-                                   svn_depth_t depth,
-                                   apr_pool_t *scratch_pool)
+/* Callback of type svn_wc_external_update_t.  Just squirrels away an
+   svn:externals property value into BATON (which is an apr_hash_t *
+   keyed on local absolute path).  */
+static svn_error_t *
+externals_update_func(void *baton,
+                      const char *local_abspath,
+                      const svn_string_t *old_val,
+                      const svn_string_t *new_val,
+                      svn_depth_t depth,
+                      apr_pool_t *scratch_pool)
 {
-  svn_client__external_func_baton_t *efb = baton;
-  const char *dup_val = NULL;
-  const char *dup_path = apr_pstrdup(efb->result_pool, local_abspath);
+  apr_hash_t *externals_hash = baton;
+  apr_pool_t *hash_pool = apr_hash_pool_get(externals_hash);
 
-  if (old_val)
-    {
-      dup_val = apr_pstrmemdup(efb->result_pool, old_val->data, old_val->len);
+  apr_hash_set(externals_hash, apr_pstrdup(hash_pool, local_abspath),
+               APR_HASH_KEY_STRING, svn_string_dup(new_val, hash_pool));
+  return SVN_NO_ERROR;
+}
 
-      apr_hash_set(efb->externals_old, dup_path, APR_HASH_KEY_STRING, dup_val);
-    }
 
-  if (new_val)
-    {
-      /* In most cases the value is identical */
-      if (old_val != new_val)
-        dup_val = apr_pstrmemdup(efb->result_pool, new_val->data, new_val->len);
+/* Callback of type svn_wc_status_func4_t.  Does nothing. */
+static svn_error_t *
+status_noop_func(void *baton,
+                 const char *local_abspath,
+                 const svn_wc_status3_t *status,
+                 apr_pool_t *scratch_pool)
+{
+  return SVN_NO_ERROR;
+}
 
-      apr_hash_set(efb->externals_new, dup_path, APR_HASH_KEY_STRING, dup_val);
-    }
 
-  apr_hash_set(efb->ambient_depths, dup_path, APR_HASH_KEY_STRING,
-               svn_depth_to_word(depth));
+svn_error_t *
+svn_client__crawl_for_externals(apr_hash_t **externals_p,
+                                const char *local_abspath,
+                                svn_depth_t depth,
+                                svn_client_ctx_t *ctx,
+                                apr_pool_t *scratch_pool,
+                                apr_pool_t *result_pool)
+{
+  apr_hash_t *externals_hash = apr_hash_make(result_pool);
+
+  /* Do a status run just to harvest externals definitions. */
+  SVN_ERR(svn_wc_walk_status(ctx->wc_ctx, local_abspath, depth,
+                             FALSE, FALSE, NULL, status_noop_func, NULL,
+                             externals_update_func, externals_hash,
+                             ctx->cancel_func, ctx->cancel_baton,
+                             scratch_pool));
 
+  *externals_p = externals_hash;
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/issue-3668-3669/subversion/libsvn_client/patch.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3668-3669/subversion/libsvn_client/patch.c?rev=1035404&r1=1035403&r2=1035404&view=diff
==============================================================================
--- subversion/branches/issue-3668-3669/subversion/libsvn_client/patch.c (original)
+++ subversion/branches/issue-3668-3669/subversion/libsvn_client/patch.c Mon Nov 15 18:50:38 2010
@@ -2753,6 +2753,12 @@ svn_client_patch(const char *patch_abspa
     return svn_error_create(SVN_ERR_INCORRECT_PARAMS, NULL,
                             _("strip count must be positive"));
 
+  if (svn_path_is_url(local_abspath))
+    return svn_error_return(svn_error_createf(SVN_ERR_ILLEGAL_TARGET,
+                                              NULL,
+                                              _("'%s' is not a local path"),
+                                              local_abspath));
+
   baton.patch_abspath = patch_abspath;
   baton.abs_wc_path = local_abspath;
   baton.dry_run = dry_run;

Modified: subversion/branches/issue-3668-3669/subversion/libsvn_client/relocate.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3668-3669/subversion/libsvn_client/relocate.c?rev=1035404&r1=1035403&r2=1035404&view=diff
==============================================================================
--- subversion/branches/issue-3668-3669/subversion/libsvn_client/relocate.c (original)
+++ subversion/branches/issue-3668-3669/subversion/libsvn_client/relocate.c Mon Nov 15 18:50:38 2010
@@ -126,37 +126,6 @@ validator_func(void *baton,
 }
 
 
-/* Callback of type svn_wc_external_update_t.  Just squirrels away an
-   svn:externals property value into BATON (which is an apr_hash_t *
-   keyed on local absolute path).  */
-static svn_error_t *
-externals_update_func(void *baton,
-                      const char *local_abspath,
-                      const svn_string_t *old_val,
-                      const svn_string_t *new_val,
-                      svn_depth_t depth,
-                      apr_pool_t *scratch_pool)
-{
-  apr_hash_t *externals_hash = baton;
-  apr_pool_t *hash_pool = apr_hash_pool_get(externals_hash);
-
-  apr_hash_set(externals_hash, apr_pstrdup(hash_pool, local_abspath),
-               APR_HASH_KEY_STRING, svn_string_dup(new_val, hash_pool));
-  return SVN_NO_ERROR;
-}
-
-
-/* Callback of type svn_wc_status_func4_t.  Does nothing. */
-static svn_error_t *
-status_noop_func(void *baton,
-                 const char *local_abspath,
-                 const svn_wc_status3_t *status,
-                 apr_pool_t *scratch_pool)
-{
-  return SVN_NO_ERROR;
-}
-
-
 /* Examing the array of svn_wc_external_item2_t's EXT_DESC (parsed
    from the svn:externals property set on LOCAL_ABSPATH) and determine
    if the external working copies described by such should be
@@ -270,16 +239,10 @@ svn_client_relocate2(const char *wcroot_
   SVN_ERR(svn_client_root_url_from_path(&new_repos_root_url, local_abspath,
                                         ctx, pool));
 
-  externals_hash = apr_hash_make(pool);
-
-  /* Do a status run just to harvest externals definitions. */
-  SVN_ERR(svn_wc_walk_status(ctx->wc_ctx, local_abspath,
-                             svn_depth_infinity, FALSE, FALSE, NULL,
-                             status_noop_func, NULL,
-                             externals_update_func, externals_hash,
-                             ctx->cancel_func, ctx->cancel_baton, pool));
 
-  /* No externals?  No problem.  We're done here. */
+  /* Relocate externals, too (if any). */
+  SVN_ERR(svn_client__crawl_for_externals(&externals_hash, local_abspath,
+                                          svn_depth_infinity, ctx, pool, pool));
   if (! apr_hash_count(externals_hash))
     return SVN_NO_ERROR;
 

Modified: subversion/branches/issue-3668-3669/subversion/libsvn_client/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3668-3669/subversion/libsvn_client/status.c?rev=1035404&r1=1035403&r2=1035404&view=diff
==============================================================================
--- subversion/branches/issue-3668-3669/subversion/libsvn_client/status.c (original)
+++ subversion/branches/issue-3668-3669/subversion/libsvn_client/status.c Mon Nov 15 18:50:38 2010
@@ -267,7 +267,7 @@ svn_client_status5(svn_revnum_t *result_
   apr_array_header_t *ignores;
   svn_error_t *err;
   apr_hash_t *changelist_hash = NULL;
-  struct svn_cl__externals_store externals_store = { NULL };
+  struct svn_client__external_func_baton_t externals_store = { NULL };
 
   if (svn_path_is_url(path))
     return svn_error_return(svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
@@ -357,7 +357,7 @@ svn_client_status5(svn_revnum_t *result_
 
   if (!ignore_externals)
     {
-      externals_store.pool = pool;
+      externals_store.result_pool = pool;
       externals_store.externals_new = apr_hash_make(pool);
     }
 
@@ -393,10 +393,10 @@ svn_client_status5(svn_revnum_t *result_
                                     dir_abspath, target_basename,
                                     depth, get_all,
                                     no_ignore, ignores, tweak_status, &sb,
-                                    ignore_externals ? NULL
-                                                     : svn_cl__store_externals,
-                                    ignore_externals ? NULL
-                                                     : &externals_store,
+                                    ignore_externals
+                                        ? NULL
+                                        : svn_client__external_info_gatherer,
+                                    ignore_externals ? NULL : &externals_store,
                                     ctx->cancel_func, ctx->cancel_baton,
                                     pool, pool));
 
@@ -517,10 +517,10 @@ svn_client_status5(svn_revnum_t *result_
       err = svn_wc_walk_status(ctx->wc_ctx, target_abspath,
                                depth, get_all, no_ignore, ignores,
                                tweak_status, &sb,
-                               ignore_externals ? NULL
-                                                : svn_cl__store_externals,
-                               ignore_externals ? NULL
-                                                : &externals_store,
+                               ignore_externals
+                                   ? NULL
+                                   : svn_client__external_info_gatherer,
+                               ignore_externals ? NULL : &externals_store,
                                ctx->cancel_func, ctx->cancel_baton,
                                pool);
 

Modified: subversion/branches/issue-3668-3669/subversion/libsvn_client/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3668-3669/subversion/libsvn_client/update.c?rev=1035404&r1=1035403&r2=1035404&view=diff
==============================================================================
--- subversion/branches/issue-3668-3669/subversion/libsvn_client/update.c (original)
+++ subversion/branches/issue-3668-3669/subversion/libsvn_client/update.c Mon Nov 15 18:50:38 2010
@@ -44,7 +44,18 @@
 
 /*** Code. ***/
 
-
+/* This is a helper for svn_client__update_internal(), which see for
+   an explanation of most of these parameters.  Some stuff that's
+   unique is as follows:
+
+   ANCHOR_ABSPATH is the local absolute path of the update anchor.
+   This is typically either the same as LOCAL_ABSPATH, or the
+   immediate parent of LOCAL_ABSPATH.
+
+   If NOTIFY_SUMMARY is set (and there's a notification hander in
+   CTX), transmit the final update summary upon successful
+   completion of the update.
+*/
 static svn_error_t *
 update_internal(svn_revnum_t *result_rev,
                 const char *local_abspath,
@@ -56,6 +67,7 @@ update_internal(svn_revnum_t *result_rev
                 svn_boolean_t allow_unver_obstructions,
                 svn_boolean_t *timestamp_sleep,
                 svn_boolean_t innerupdate,
+                svn_boolean_t notify_summary,
                 svn_client_ctx_t *ctx,
                 apr_pool_t *pool)
 {
@@ -235,8 +247,8 @@ update_internal(svn_revnum_t *result_rev
   if (sleep_here)
     svn_io_sleep_for_timestamps(local_abspath, pool);
 
-  /* Let everyone know we're finished here. */
-  if (ctx->notify_func2)
+  /* Let everyone know we're finished here (unless we're asked not to). */
+  if (ctx->notify_func2 && notify_summary)
     {
       svn_wc_notify_t *notify
         = svn_wc_create_notify(local_abspath, svn_wc_notify_update_completed,
@@ -266,44 +278,99 @@ svn_client__update_internal(svn_revnum_t
                             svn_boolean_t allow_unver_obstructions,
                             svn_boolean_t *timestamp_sleep,
                             svn_boolean_t innerupdate,
+                            svn_boolean_t make_parents,
                             svn_client_ctx_t *ctx,
                             apr_pool_t *pool)
 {
-  const char *anchor_abspath;
+  const char *anchor_abspath, *lockroot_abspath;
   svn_error_t *err;
+  svn_opt_revision_t peg_revision = *((svn_opt_revision_t *)revision);
 
   SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
+  SVN_ERR_ASSERT(! (innerupdate && make_parents));
+
+  if (make_parents)
+    {
+      int i;
+      const char *parent_abspath = local_abspath;
+      apr_array_header_t *missing_parents = 
+        apr_array_make(pool, 4, sizeof(const char *));
+
+      while (1)
+        {
+          /* Try to lock.  If we can't lock because our target (or its
+             parent) isn't a working copy, we'll try to walk up the
+             tree to find a working copy, remembering this path's
+             parent as one we need to flesh out.  */
+          err = svn_wc__acquire_write_lock(&lockroot_abspath, ctx->wc_ctx,
+                                           parent_abspath, !innerupdate,
+                                           pool, pool);
+          if (!err)
+            break;
+          if ((err->apr_err != SVN_ERR_WC_NOT_WORKING_COPY)
+              || svn_dirent_is_root(parent_abspath, strlen(parent_abspath)))
+            return err;
+          svn_error_clear(err);
+
+          /* Remember the parent of our update target as a missing
+             parent. */
+          parent_abspath = svn_dirent_dirname(parent_abspath, pool);
+          APR_ARRAY_PUSH(missing_parents, const char *) = parent_abspath;
+        }
+
+      /* Run 'svn up --depth=empty' (effectively) on the missing
+         parents, if any. */
+      anchor_abspath = lockroot_abspath;
+      for (i = missing_parents->nelts - 1; i >= 0; i--)
+        {
+          const char *missing_parent =
+            APR_ARRAY_IDX(missing_parents, i, const char *);
+          err = update_internal(result_rev, missing_parent, anchor_abspath,
+                                &peg_revision, svn_depth_empty, FALSE,
+                                ignore_externals, allow_unver_obstructions,
+                                timestamp_sleep, innerupdate, FALSE,
+                                ctx, pool);
+          if (err)
+            goto cleanup;
+          anchor_abspath = missing_parent;
 
-  if (!innerupdate)
-    SVN_ERR(svn_wc__acquire_write_lock(&anchor_abspath,
-                                       ctx->wc_ctx, local_abspath, TRUE,
-                                       pool, pool));
+          /* If we successfully updated a missing parent, let's re-use
+             the returned revision number for future updates for the
+             sake of consistency. */
+          peg_revision.kind = svn_opt_revision_number;
+          peg_revision.value.number = *result_rev;
+        }
+    }
   else
-    SVN_ERR(svn_wc__acquire_write_lock(&anchor_abspath,
-                                       ctx->wc_ctx, local_abspath, FALSE,
-                                       pool, pool));
+    {
+      SVN_ERR(svn_wc__acquire_write_lock(&lockroot_abspath, ctx->wc_ctx,
+                                         local_abspath, !innerupdate,
+                                         pool, pool));
+      anchor_abspath = lockroot_abspath;
+    }
 
   err = update_internal(result_rev, local_abspath, anchor_abspath,
-                         revision, depth, depth_is_sticky,
-                         ignore_externals, allow_unver_obstructions,
-                         timestamp_sleep, innerupdate, ctx, pool);
-
+                        &peg_revision, depth, depth_is_sticky,
+                        ignore_externals, allow_unver_obstructions,
+                        timestamp_sleep, innerupdate, TRUE, ctx, pool);
+ cleanup:
   err = svn_error_compose_create(
             err,
-            svn_wc__release_write_lock(ctx->wc_ctx, anchor_abspath, pool));
+            svn_wc__release_write_lock(ctx->wc_ctx, lockroot_abspath, pool));
 
   return svn_error_return(err);
 }
 
 
 svn_error_t *
-svn_client_update3(apr_array_header_t **result_revs,
+svn_client_update4(apr_array_header_t **result_revs,
                    const apr_array_header_t *paths,
                    const svn_opt_revision_t *revision,
                    svn_depth_t depth,
                    svn_boolean_t depth_is_sticky,
                    svn_boolean_t ignore_externals,
                    svn_boolean_t allow_unver_obstructions,
+                   svn_boolean_t make_parents,
                    svn_client_ctx_t *ctx,
                    apr_pool_t *pool)
 {
@@ -340,7 +407,8 @@ svn_client_update3(apr_array_header_t **
                                             revision, depth, depth_is_sticky,
                                             ignore_externals,
                                             allow_unver_obstructions,
-                                            &sleep, FALSE, ctx, subpool);
+                                            &sleep, FALSE, make_parents,
+                                            ctx, subpool);
 
           if (err && err->apr_err != SVN_ERR_WC_NOT_WORKING_COPY)
             {

Modified: subversion/branches/issue-3668-3669/subversion/libsvn_fs_fs/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3668-3669/subversion/libsvn_fs_fs/lock.c?rev=1035404&r1=1035403&r2=1035404&view=diff
==============================================================================
--- subversion/branches/issue-3668-3669/subversion/libsvn_fs_fs/lock.c (original)
+++ subversion/branches/issue-3668-3669/subversion/libsvn_fs_fs/lock.c Mon Nov 15 18:50:38 2010
@@ -138,12 +138,12 @@ digest_path_from_digest(const char *fs_p
    PATH, where PATH is the path to the lock file or lock entries file
    in FS. */
 static const char *
-digest_path_from_path(svn_fs_t *fs,
+digest_path_from_path(const char *fs_path,
                       const char *path,
                       apr_pool_t *pool)
 {
   const char *digest = make_digest(path, pool);
-  return svn_dirent_join_many(pool, fs->path, PATH_LOCKS_DIR,
+  return svn_dirent_join_many(pool, fs_path, PATH_LOCKS_DIR,
                               apr_pstrmemdup(pool, digest, DIGEST_SUBDIR_LEN),
                               digest, NULL);
 }
@@ -152,12 +152,15 @@ digest_path_from_path(svn_fs_t *fs,
 /* Write to DIGEST_PATH a representation of CHILDREN (which may be
    empty, if the versioned path in FS represented by DIGEST_PATH has
    no children) and LOCK (which may be NULL if that versioned path is
-   lock itself locked).  Use POOL for all allocations. */
+   lock itself locked).  Set the permissions of DIGEST_PATH to those of
+   PERMS_REFERENCE.  Use POOL for all allocations.
+ */
 static svn_error_t *
 write_digest_file(apr_hash_t *children,
                   svn_lock_t *lock,
-                  svn_fs_t *fs,
+                  const char *fs_path,
                   const char *digest_path,
+                  const char *perms_reference,
                   apr_pool_t *pool)
 {
   svn_error_t *err = SVN_NO_ERROR;
@@ -165,12 +168,11 @@ write_digest_file(apr_hash_t *children,
   apr_hash_index_t *hi;
   apr_hash_t *hash = apr_hash_make(pool);
   const char *tmp_path;
-  const char *rev_0_path;
 
-  SVN_ERR(svn_fs_fs__ensure_dir_exists(svn_dirent_join(fs->path, PATH_LOCKS_DIR,
-                                                       pool), fs->path, pool));
+  SVN_ERR(svn_fs_fs__ensure_dir_exists(svn_dirent_join(fs_path, PATH_LOCKS_DIR,
+                                                       pool), fs_path, pool));
   SVN_ERR(svn_fs_fs__ensure_dir_exists(svn_dirent_dirname(digest_path, pool),
-                                       fs->path, pool));
+                                       fs_path, pool));
 
   if (lock)
     {
@@ -222,8 +224,8 @@ write_digest_file(apr_hash_t *children,
 
   SVN_ERR(svn_stream_close(stream));
   SVN_ERR(svn_io_file_rename(tmp_path, digest_path, pool));
-  SVN_ERR(svn_fs_fs__path_rev_absolute(&rev_0_path, fs, 0, pool));
-  return svn_io_copy_perms(rev_0_path, digest_path, pool);
+  SVN_ERR(svn_io_copy_perms(perms_reference, digest_path, pool));
+  return SVN_NO_ERROR;
 }
 
 
@@ -328,10 +330,16 @@ read_digest_file(apr_hash_t **children_p
      schema-supporting paths) ***/
 
 
-/* Write LOCK in FS to the actual OS filesystem. */
+/* Write LOCK in FS to the actual OS filesystem.
+
+   Use PERMS_REFERENCE for the permissions of any digest files.
+   
+   Note: this takes an FS_PATH because it's called from the hotcopy logic.
+ */
 static svn_error_t *
-set_lock(svn_fs_t *fs,
+set_lock(const char *fs_path,
          svn_lock_t *lock,
+         const char *perms_reference,
          apr_pool_t *pool)
 {
   svn_stringbuf_t *this_path = svn_stringbuf_create(lock->path, pool);
@@ -354,10 +362,10 @@ set_lock(svn_fs_t *fs,
 
       /* Calculate the DIGEST_PATH for the currently FS path, and then
          get its DIGEST_FILE basename. */
-      digest_path = digest_path_from_path(fs, this_path->data, subpool);
+      digest_path = digest_path_from_path(fs_path, this_path->data, subpool);
       digest_file = svn_dirent_basename(digest_path, subpool);
 
-      SVN_ERR(read_digest_file(&this_children, &this_lock, fs->path,
+      SVN_ERR(read_digest_file(&this_children, &this_lock, fs_path,
                                digest_path, subpool));
 
       /* We're either writing a new lock (first time through only) or
@@ -377,8 +385,8 @@ set_lock(svn_fs_t *fs,
           apr_hash_set(this_children, lock_digest_path,
                        APR_HASH_KEY_STRING, (void *)1);
         }
-      SVN_ERR(write_digest_file(this_children, this_lock, fs,
-                                digest_path, subpool));
+      SVN_ERR(write_digest_file(this_children, this_lock, fs_path,
+                                digest_path, perms_reference, subpool));
 
       /* Prep for next iteration, or bail if we're done. */
       if (svn_dirent_is_root(this_path->data, this_path->len))
@@ -416,7 +424,7 @@ delete_lock(svn_fs_t *fs,
 
       /* Calculate the DIGEST_PATH for the currently FS path, and then
          get its DIGEST_FILE basename. */
-      digest_path = digest_path_from_path(fs, this_path->data, subpool);
+      digest_path = digest_path_from_path(fs->path, this_path->data, subpool);
       digest_file = svn_dirent_basename(digest_path, subpool);
 
       SVN_ERR(read_digest_file(&this_children, &this_lock, fs->path,
@@ -441,8 +449,10 @@ delete_lock(svn_fs_t *fs,
         }
       else
         {
-          SVN_ERR(write_digest_file(this_children, this_lock, fs,
-                                    digest_path, subpool));
+          const char *rev_0_path;
+          SVN_ERR(svn_fs_fs__path_rev_absolute(&rev_0_path, fs, 0, pool));
+          SVN_ERR(write_digest_file(this_children, this_lock, fs->path,
+                                    digest_path, rev_0_path, subpool));
         }
 
       /* Prep for next iteration, or bail if we're done. */
@@ -468,7 +478,7 @@ get_lock(svn_lock_t **lock_p,
          apr_pool_t *pool)
 {
   svn_lock_t *lock;
-  const char *digest_path = digest_path_from_path(fs, path, pool);
+  const char *digest_path = digest_path_from_path(fs->path, path, pool);
 
   SVN_ERR(read_digest_file(NULL, &lock, fs->path, digest_path, pool));
   if (! lock)
@@ -692,7 +702,7 @@ svn_fs_fs__allow_locked_operation(const 
   if (recurse)
     {
       /* Discover all locks at or below the path. */
-      const char *digest_path = digest_path_from_path(fs, path, pool);
+      const char *digest_path = digest_path_from_path(fs->path, path, pool);
       SVN_ERR(walk_locks(fs, digest_path, get_locks_callback,
                          fs, have_write_lock, pool));
     }
@@ -734,6 +744,7 @@ lock_body(void *baton, apr_pool_t *pool)
   svn_lock_t *lock;
   svn_fs_root_t *root;
   svn_revnum_t youngest;
+  const char *rev_0_path;
 
   /* Until we implement directory locks someday, we only allow locks
      on files or non-existent paths. */
@@ -833,7 +844,8 @@ lock_body(void *baton, apr_pool_t *pool)
   lock->is_dav_comment = lb->is_dav_comment;
   lock->creation_date = apr_time_now();
   lock->expiration_date = lb->expiration_date;
-  SVN_ERR(set_lock(lb->fs, lock, pool));
+  SVN_ERR(svn_fs_fs__path_rev_absolute(&rev_0_path, lb->fs, 0, pool));
+  SVN_ERR(set_lock(lb->fs->path, lock, rev_0_path, pool));
   *lb->lock_p = lock;
 
   return SVN_NO_ERROR;
@@ -1040,7 +1052,8 @@ svn_fs_fs__get_locks(svn_fs_t *fs,
   glfb.get_locks_baton = get_locks_baton;
 
   /* Get the top digest path in our tree of interest, and then walk it. */
-  digest_path = digest_path_from_path(fs, path, pool);
-  return walk_locks(fs, digest_path, get_locks_filter_func, &glfb,
-                           FALSE, pool);
+  digest_path = digest_path_from_path(fs->path, path, pool);
+  SVN_ERR(walk_locks(fs, digest_path, get_locks_filter_func, &glfb,
+                     FALSE, pool));
+  return SVN_NO_ERROR;
 }

Modified: subversion/branches/issue-3668-3669/subversion/libsvn_wc/adm_ops.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3668-3669/subversion/libsvn_wc/adm_ops.c?rev=1035404&r1=1035403&r2=1035404&view=diff
==============================================================================
--- subversion/branches/issue-3668-3669/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/branches/issue-3668-3669/subversion/libsvn_wc/adm_ops.c Mon Nov 15 18:50:38 2010
@@ -807,8 +807,6 @@ check_can_add_to_parent(const char **rep
                                                  scratch_pool));
     }
   else if (parent_kind != svn_wc__db_kind_dir)
-    /* Can't happen until single db; but then it causes serious
-       trouble if we allow this. */
     return svn_error_createf(SVN_ERR_NODE_UNEXPECTED_KIND, NULL,
                              _("Can't schedule an addition of '%s'"
                                " below a not-directory node"),

Modified: subversion/branches/issue-3668-3669/subversion/libsvn_wc/entries.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3668-3669/subversion/libsvn_wc/entries.c?rev=1035404&r1=1035403&r2=1035404&view=diff
==============================================================================
--- subversion/branches/issue-3668-3669/subversion/libsvn_wc/entries.c (original)
+++ subversion/branches/issue-3668-3669/subversion/libsvn_wc/entries.c Mon Nov 15 18:50:38 2010
@@ -471,6 +471,42 @@ get_base_info_for_deleted(svn_wc_entry_t
 }
 
 
+/*
+ * Encode tree conflict descriptions into a single string.
+ *
+ * Set *CONFLICT_DATA to a string, allocated in POOL, that encodes the tree
+ * conflicts in CONFLICTS in a form suitable for storage in a single string
+ * field in a WC entry. CONFLICTS is a hash of zero or more pointers to
+ * svn_wc_conflict_description2_t objects, index by their basenames. All of the
+ * conflict victim paths must be siblings.
+ *
+ * Do all allocations in POOL.
+ *
+ * @see svn_wc__read_tree_conflicts()
+ */
+static svn_error_t *
+write_tree_conflicts(const char **conflict_data,
+                     apr_hash_t *conflicts,
+                     apr_pool_t *pool)
+{
+  svn_skel_t *skel = svn_skel__make_empty_list(pool);
+  apr_hash_index_t *hi;
+
+  for (hi = apr_hash_first(pool, conflicts); hi; hi = apr_hash_next(hi))
+    {
+      svn_skel_t *c_skel;
+
+      SVN_ERR(svn_wc__serialize_conflict(&c_skel, svn__apr_hash_index_val(hi),
+                                         pool, pool));
+      svn_skel__prepend(c_skel, skel);
+    }
+
+  *conflict_data = svn_skel__unparse(skel, pool)->data;
+
+  return SVN_NO_ERROR;
+}
+
+
 /* Read one entry from wc_db. It will be allocated in RESULT_POOL and
    returned in *NEW_ENTRY.
 
@@ -586,9 +622,8 @@ read_one_entry(const svn_wc_entry_t **ne
 
       if (tree_conflicts)
         {
-          SVN_ERR(svn_wc__write_tree_conflicts(&entry->tree_conflict_data,
-                                               tree_conflicts,
-                                               result_pool));
+          SVN_ERR(write_tree_conflicts(&entry->tree_conflict_data,
+                                       tree_conflicts, result_pool));
         }
     }
 

Modified: subversion/branches/issue-3668-3669/subversion/libsvn_wc/tree_conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3668-3669/subversion/libsvn_wc/tree_conflicts.c?rev=1035404&r1=1035403&r2=1035404&view=diff
==============================================================================
--- subversion/branches/issue-3668-3669/subversion/libsvn_wc/tree_conflicts.c (original)
+++ subversion/branches/issue-3668-3669/subversion/libsvn_wc/tree_conflicts.c Mon Nov 15 18:50:38 2010
@@ -267,47 +267,6 @@ svn_wc__deserialize_conflict(const svn_w
 }
 
 
-/* ### this is BAD. the CONFLICTS structure should not be dependent upon
-   ### DIR_PATH. each conflict should be labeled with an entry name, not
-   ### a whole path. (and a path which happens to vary based upon invocation
-   ### of the user client and these APIs)  */
-svn_error_t *
-svn_wc__read_tree_conflicts(apr_hash_t **conflicts,
-                            const char *conflict_data,
-                            const char *dir_path,
-                            apr_pool_t *pool)
-{
-  const svn_skel_t *skel;
-  apr_pool_t *iterpool;
-
-  *conflicts = apr_hash_make(pool);
-
-  if (conflict_data == NULL)
-    return SVN_NO_ERROR;
-
-  skel = svn_skel__parse(conflict_data, strlen(conflict_data), pool);
-  if (skel == NULL)
-    return svn_error_create(SVN_ERR_WC_CORRUPT, NULL,
-                            _("Error parsing tree conflict skel"));
-
-  iterpool = svn_pool_create(pool);
-  for (skel = skel->children; skel != NULL; skel = skel->next)
-    {
-      const svn_wc_conflict_description2_t *conflict;
-
-      svn_pool_clear(iterpool);
-      SVN_ERR(svn_wc__deserialize_conflict(&conflict, skel, dir_path,
-                                           pool, iterpool));
-      if (conflict != NULL)
-        apr_hash_set(*conflicts, svn_dirent_basename(conflict->local_abspath,
-                                                     pool),
-                     APR_HASH_KEY_STRING, conflict);
-    }
-  svn_pool_destroy(iterpool);
-
-  return SVN_NO_ERROR;
-}
-
 /* Prepend to SKEL the string corresponding to enumeration value N, as found
  * in MAP. */
 static svn_error_t *
@@ -417,29 +376,6 @@ svn_wc__serialize_conflict(svn_skel_t **
 
 
 svn_error_t *
-svn_wc__write_tree_conflicts(const char **conflict_data,
-                             apr_hash_t *conflicts,
-                             apr_pool_t *pool)
-{
-  svn_skel_t *skel = svn_skel__make_empty_list(pool);
-  apr_hash_index_t *hi;
-
-  for (hi = apr_hash_first(pool, conflicts); hi; hi = apr_hash_next(hi))
-    {
-      svn_skel_t *c_skel;
-
-      SVN_ERR(svn_wc__serialize_conflict(&c_skel, svn__apr_hash_index_val(hi),
-                                         pool, pool));
-      svn_skel__prepend(c_skel, skel);
-    }
-
-  *conflict_data = svn_skel__unparse(skel, pool)->data;
-
-  return SVN_NO_ERROR;
-}
-
-
-svn_error_t *
 svn_wc__del_tree_conflict(svn_wc_context_t *wc_ctx,
                           const char *victim_abspath,
                           apr_pool_t *scratch_pool)

Modified: subversion/branches/issue-3668-3669/subversion/libsvn_wc/tree_conflicts.h
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3668-3669/subversion/libsvn_wc/tree_conflicts.h?rev=1035404&r1=1035403&r2=1035404&view=diff
==============================================================================
--- subversion/branches/issue-3668-3669/subversion/libsvn_wc/tree_conflicts.h (original)
+++ subversion/branches/issue-3668-3669/subversion/libsvn_wc/tree_conflicts.h Mon Nov 15 18:50:38 2010
@@ -74,37 +74,6 @@ svn_wc__deserialize_conflict(const svn_w
                              apr_pool_t *result_pool,
                              apr_pool_t *scratch_pool);
 
-/*
- * Encode tree conflict descriptions into a single string.
- *
- * Set *CONFLICT_DATA to a string, allocated in POOL, that encodes the tree
- * conflicts in CONFLICTS in a form suitable for storage in a single string
- * field in a WC entry. CONFLICTS is a hash of zero or more pointers to
- * svn_wc_conflict_description2_t objects, index by their basenames. All of the
- * conflict victim paths must be siblings.
- *
- * Do all allocations in POOL.
- *
- * @see svn_wc__read_tree_conflicts()
- */
-svn_error_t *
-svn_wc__write_tree_conflicts(const char **conflict_data,
-                             apr_hash_t *conflicts,
-                             apr_pool_t *pool);
-
-/*
- * Read tree conflict descriptions from @a conflict_data.  Set @a *conflicts
- * to a hash of pointers to svn_wc_conflict_description2_t objects indexed by
- * svn_wc_conflict_description2_t.local_abspath, all newly allocated in @a
- * pool.  @a dir_path is the path to the working copy directory whose conflicts
- * are being read.  The conflicts read are the tree conflicts on the immediate
- * child nodes of @a dir_path.  Do all allocations in @a pool.
- */
-svn_error_t *
-svn_wc__read_tree_conflicts(apr_hash_t **conflicts,
-                            const char *conflict_data,
-                            const char *dir_path,
-                            apr_pool_t *pool);
 
 /* Token mapping tables.  */
 extern const svn_token_map_t svn_wc__operation_map[];

Modified: subversion/branches/issue-3668-3669/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3668-3669/subversion/libsvn_wc/update_editor.c?rev=1035404&r1=1035403&r2=1035404&view=diff
==============================================================================
--- subversion/branches/issue-3668-3669/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/branches/issue-3668-3669/subversion/libsvn_wc/update_editor.c Mon Nov 15 18:50:38 2010
@@ -2023,8 +2023,7 @@ do_entry_deletion(struct edit_baton *eb,
            * we must schedule the existing content for re-addition as a copy
            * of what it was, but with its local modifications preserved. */
 
-          SVN_ERR(svn_wc__db_temp_op_make_copy(eb->db, local_abspath, FALSE,
-                                               pool));
+          SVN_ERR(svn_wc__db_temp_op_make_copy(eb->db, local_abspath, pool));
 
           /* Fall through to remove the BASE_NODEs properly, with potentially
              keeping a not-present marker */