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/05/15 14:39:16 UTC

svn commit: r1338671 [1/2] - in /subversion/branches/1.7.x-issue4153: ./ build/generator/ build/win32/ contrib/client-side/emacs/ subversion/bindings/swig/ruby/test/ subversion/include/ subversion/include/private/ subversion/libsvn_client/ subversion/l...

Author: stsp
Date: Tue May 15 12:39:14 2012
New Revision: 1338671

URL: http://svn.apache.org/viewvc?rev=1338671&view=rev
Log:
Sync the 1.7.x-issue4153 branch with 1.7.x.

Modified:
    subversion/branches/1.7.x-issue4153/   (props changed)
    subversion/branches/1.7.x-issue4153/CHANGES   (contents, props changed)
    subversion/branches/1.7.x-issue4153/STATUS
    subversion/branches/1.7.x-issue4153/build/generator/gen_win.py
    subversion/branches/1.7.x-issue4153/build/win32/make_dist.py
    subversion/branches/1.7.x-issue4153/build/win32/vc6-build.bat.in
    subversion/branches/1.7.x-issue4153/contrib/client-side/emacs/dsvn.el
    subversion/branches/1.7.x-issue4153/contrib/client-side/emacs/vc-svn.el
    subversion/branches/1.7.x-issue4153/subversion/bindings/swig/ruby/test/test_client.rb
    subversion/branches/1.7.x-issue4153/subversion/bindings/swig/ruby/test/test_wc.rb
    subversion/branches/1.7.x-issue4153/subversion/include/private/svn_adler32.h   (props changed)
    subversion/branches/1.7.x-issue4153/subversion/include/private/svn_repos_private.h
    subversion/branches/1.7.x-issue4153/subversion/include/private/svn_string_private.h   (props changed)
    subversion/branches/1.7.x-issue4153/subversion/include/private/svn_temp_serializer.h   (props changed)
    subversion/branches/1.7.x-issue4153/subversion/include/svn_version.h
    subversion/branches/1.7.x-issue4153/subversion/libsvn_client/checkout.c
    subversion/branches/1.7.x-issue4153/subversion/libsvn_client/client.h
    subversion/branches/1.7.x-issue4153/subversion/libsvn_client/copy.c
    subversion/branches/1.7.x-issue4153/subversion/libsvn_client/diff.c
    subversion/branches/1.7.x-issue4153/subversion/libsvn_client/externals.c
    subversion/branches/1.7.x-issue4153/subversion/libsvn_client/merge.c
    subversion/branches/1.7.x-issue4153/subversion/libsvn_client/prop_commands.c
    subversion/branches/1.7.x-issue4153/subversion/libsvn_client/status.c
    subversion/branches/1.7.x-issue4153/subversion/libsvn_client/update.c
    subversion/branches/1.7.x-issue4153/subversion/libsvn_fs/fs-loader.c
    subversion/branches/1.7.x-issue4153/subversion/libsvn_fs_fs/temp_serializer.c   (props changed)
    subversion/branches/1.7.x-issue4153/subversion/libsvn_fs_fs/temp_serializer.h   (props changed)
    subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_neon/commit.c
    subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_neon/fetch.c
    subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_serf/update.c
    subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_svn/client.c
    subversion/branches/1.7.x-issue4153/subversion/libsvn_repos/repos.c
    subversion/branches/1.7.x-issue4153/subversion/libsvn_subr/adler32.c   (props changed)
    subversion/branches/1.7.x-issue4153/subversion/libsvn_subr/hash.c   (props changed)
    subversion/branches/1.7.x-issue4153/subversion/libsvn_subr/svn_base64.c   (props changed)
    subversion/branches/1.7.x-issue4153/subversion/libsvn_subr/svn_temp_serializer.c   (props changed)
    subversion/branches/1.7.x-issue4153/subversion/libsvn_wc/adm_crawler.c
    subversion/branches/1.7.x-issue4153/subversion/libsvn_wc/externals.c
    subversion/branches/1.7.x-issue4153/subversion/libsvn_wc/update_editor.c
    subversion/branches/1.7.x-issue4153/subversion/libsvn_wc/wc_db.c
    subversion/branches/1.7.x-issue4153/subversion/libsvn_wc/wc_db_util.c
    subversion/branches/1.7.x-issue4153/subversion/mod_dav_svn/reports/update.c
    subversion/branches/1.7.x-issue4153/subversion/mod_dav_svn/repos.c
    subversion/branches/1.7.x-issue4153/subversion/mod_dav_svn/util.c
    subversion/branches/1.7.x-issue4153/subversion/mod_dav_svn/version.c
    subversion/branches/1.7.x-issue4153/subversion/po/de.po
    subversion/branches/1.7.x-issue4153/subversion/svn/diff-cmd.c
    subversion/branches/1.7.x-issue4153/subversion/svn/status.c
    subversion/branches/1.7.x-issue4153/subversion/svnserve/serve.c
    subversion/branches/1.7.x-issue4153/subversion/tests/cmdline/basic_tests.py   (props changed)
    subversion/branches/1.7.x-issue4153/subversion/tests/cmdline/davautocheck.sh
    subversion/branches/1.7.x-issue4153/subversion/tests/cmdline/depth_tests.py
    subversion/branches/1.7.x-issue4153/subversion/tests/cmdline/externals_tests.py
    subversion/branches/1.7.x-issue4153/subversion/tests/cmdline/lock_tests.py
    subversion/branches/1.7.x-issue4153/subversion/tests/cmdline/merge_tests.py
    subversion/branches/1.7.x-issue4153/subversion/tests/cmdline/prop_tests.py
    subversion/branches/1.7.x-issue4153/subversion/tests/cmdline/stat_tests.py
    subversion/branches/1.7.x-issue4153/subversion/tests/cmdline/svntest/actions.py
    subversion/branches/1.7.x-issue4153/subversion/tests/cmdline/svntest/main.py

Propchange: subversion/branches/1.7.x-issue4153/
------------------------------------------------------------------------------
  Merged /subversion/branches/1.7.x-issue4166:r1330474-1336071
  Merged /subversion/branches/1.7.x-issue4161:r1330697-1331209
  Merged /subversion/branches/1.7.x:r1309894-1338666
  Merged /subversion/branches/1.7.x-issue4169:r1330537-1336116
  Merged /subversion/branches/1.7.x-r1306111:r1306301-1331207
  Merged /subversion/branches/1.7.x-issue4087:r1243707-1336073
  Merged /subversion/trunk:r1164929,1190463,1200277,1200896,1203977,1205968,1210913,1211048,1232267,1243694,1243840,1243920,1244466,1244551,1291594,1291797,1291810,1295007,1295372,1296251,1296303,1296691,1297522,1298343,1306111,1306334,1309992,1310378,1310428,1310535,1310594,1311702,1311935,1325361,1327474,1327490,1327495,1327979,1328002,1328038,1328144,1328267-1328268,1328353,1328846-1328847,1328852,1328878,1329388,1329417,1329876,1330258,1330382,1330444,1330520,1335104,1335555

Modified: subversion/branches/1.7.x-issue4153/CHANGES
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/CHANGES?rev=1338671&r1=1338670&r2=1338671&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/CHANGES (original)
+++ subversion/branches/1.7.x-issue4153/CHANGES Tue May 15 12:39:14 2012
@@ -1,3 +1,54 @@
+Version 1.7.5
+(17 May 2012, from /branches/1.7.x)
+http://svn.apache.org/repos/asf/subversion/tags/1.7.5
+
+ User-visible changes:
+  - Client- and server-side bugfixes:
+    * http: report deleted-revision upon delete during update (r1327474)
+
+  - Client-side bugfixes:
+    * avoid potential segfault when canonicalizing properties (r1296369)
+    * improve memory and file-handle management with externals (issue #4130)
+    * serf: convert assertions to "MERGE failed" errors (r1302417)
+    * fix undefined behaviour during multi-segment reverse merges (issue #4144)
+    * fix potential use of already freed memory during diff operation (r1311935)
+    * improve performance of scan for the working copy root (r1306334)
+    * cmdline: fix segfault during 'svn diff' argument processing (r1311702)
+    * fix regression from 1.6 in update with --depth option (issue #4136)
+    * propset: avoid undefined behaviour in error path (r1325361)
+    * reset sqlite statements, partly for sqlite-3.7.11 compat (r1328846, et al)
+    * fix assertion during 'svn diff -r BASE:HEAD ^/trunk' (issue #4161)
+    * notify upon 'update' just removing locks on files (r1329876)
+    * neon: fix potential use of freed memory during commits (r1329388)
+    * 'status --xml' doesn't show repository deletes correctly (issue #4167)
+    * fix assert on svn:externals with drive letter on Windows (issue #4073)
+    * fix 'svn update --depth=empty' against 1.4 servers (issue #4046)
+    * handle missing svn:date reported by svnserve gracefully (r1306111)
+    * fix merges which first add a subtree and then delete it (issue #4166)
+    * fix a regression with checkout of file externals (issue #4087)
+    * don't add spurious mergeinfo to subtrees in edge-case merge (issue #4169)
+    * improve performance of status on large working copies (issue #4178)
+
+  - Server-side bugfixes:
+    * fix non-fatal FSFS corruption bug with concurrent commits (issue #4129)
+    * mod_dav_svn: raise an error on MERGE of non-existent resource (r1298343)
+    * mod_dav_svn: support compiling/running under httpd-2.4 (r1232267)
+    * mod_dav_svn: forbid BDB repositories under httpd's event MPM (issue #4157)
+
+  - Other tool improvements and bugfixes:
+    * emacs support: updates to dsvn.el and vc-svn.el (r1200896, et al)
+
+ Developer-visible changes:
+  - General:
+    * windows example distribution scripts: include svnrdump (r1295007)
+    * fix running the test suite with jsvn (r1335555)
+
+  - Bindings:
+    * swig-py tests: avoid FAILs on APR hash order (r1296137, r1292248)
+    * swig-rb tests: avoid FAILs on APR hash order (r1310535, r1310594)
+    * swig-pl: Improved perl detection in gen-make.py (r1291797, r1291810)
+
+
 Version 1.7.4
 (08 Mar 2012, from /branches/1.7.x)
 http://svn.apache.org/repos/asf/subversion/tags/1.7.4
@@ -341,7 +392,7 @@ the 1.6 release:  http://subversion.apac
 
 
 Version 1.6.18
-(?? Mar 2012, from /branches/1.6.x)
+(29 Mar 2012, from /branches/1.6.x)
 http://svn.apache.org/repos/asf/subversion/tags/1.6.18
 
   User-visible changes:
@@ -352,6 +403,11 @@ http://svn.apache.org/repos/asf/subversi
     * plug a memory leak in the bdb backend (r1205726)
     * server-side performance fix for "log -g" (r1152282)
     * fix description of svndumpfilter's --targets option (r1151911)
+    * fix datastream corruption during resumed transfer in ra_serf (r1154733)
+    * fix a crash in ra_svn SASL authentication (r1166555, -678)
+    * fix potential corruption on 32-bit FSFS with large files (r1230212)
+    * make website links point to subversion.apache.org (r896893, -901, r915036)
+    * fix non-fatal FSFS corruption bug with concurrent commits (issue #4129)
 
   Developer-visible changes:
     * fix sqlite distfile retrieval in get-deps.sh (r1134734)

Propchange: subversion/branches/1.7.x-issue4153/CHANGES
------------------------------------------------------------------------------
  Merged /subversion/branches/1.7.x-issue4169/CHANGES:r1330537-1336116
  Merged /subversion/branches/1.7.x-issue4087/CHANGES:r1243707-1336073
  Merged /subversion/trunk/CHANGES:r1302038-1336829
  Merged /subversion/branches/1.7.x/CHANGES:r1309894-1338666

Modified: subversion/branches/1.7.x-issue4153/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/STATUS?rev=1338671&r1=1338670&r2=1338671&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/STATUS (original)
+++ subversion/branches/1.7.x-issue4153/STATUS Tue May 15 12:39:14 2012
@@ -10,40 +10,11 @@ See http://subversion.apache.org/docs/co
 for details on how release lines and voting work, what kinds of bugs can
 delay a release, etc.
 
-Status of 1.7.5:
+Status of 1.7.6:
 
 Candidate changes:
 ==================
 
- * r1164929, r1200277, r1243694, r1243840, r1243920, r1244466, r1244551, r1295372
-   Workaround for issue #4087, "bogus repos_id in wc.db for file externals"
-   Justification:
-     Regression from 1.6. Some repositories with file externals cannot be
-     checked out with 1.7. Users complained.
-     See http://svn.haxx.se/users/archive-2011-12/0299.shtml
-   Branch:
-     ^/subversion/branches/1.7.x-issue4087
-   Notes:
-     r1164929 and r1200277 were merged to simplify conflict resolution
-     r1243694 implements the workaround
-     r1243840 is a cosmetic follow-up treak
-     r1243920 was merged for conflict resolution for r1244466
-     r1244466 eliminates an unneccesary RA round-trip from r1243694
-     r1244551 uses a better API to query the local repos root and uuid
-     r1295372 improves test coverage
-   Votes:
-     +1: stsp, neels
-
- * r1291797, r1291810
-   On Windows detect where perl is installed and add this information to the
-   include and lib directory settings of the swig-perl projects.
-   Justification:
-     Allows building swig-perl without copying perl libraries manually.
-     Somehow required on the Windows buildbot since the last library version
-     bump.
-   Votes:
-     +1: rhuijben
-
  * r1293945, r1293972, r1293976, r1293998, r1294136, r1294236;
    r1294134, r1294147, r1294586
    Two interdependent changes:
@@ -64,91 +35,24 @@ Candidate changes:
    Votes:
      +1: danielsh, stsp
 
- * r1295007
-   Include svnrdump in the Windows build.
-   Justification:
-     I do not know for sure, but I assume that either make-dist.py or
-     vc6-build.bat.in is actually used by some people --- and if I'm wrong,
-     this would be harmless.
-   Votes:
-     +1: danielsh
-
- * r1210913, r1211048
-   Fix issue 4073, assert on svn:externals path with drive letter on Windows.
-   Justification:
-     Avoid client asserting.
-   Notes:
-     Merge with '--accept mc' to resolve r1210913 conflict.
-   Votes:
-     +1: philip
-     +1: stsp (cannot test this, but the trunk windows buildsbots are
-               happy and the diff makes sense)
-
- * r1296251, r1296303, r1297522
-   Resolve issue 4136, "Deep commit followed by --depth immediates update
-   triggers checksum failure"
-   Justification:
-     User reported regression since 1.7.0
-   Votes:
-     +1: stsp, rhuijben
-
- * r1298343
-   Return an error when attempting to MERGE a resource that does not exist.
-   Justification:
-     Avoid asserting.
-   Votes:
-     +1: philip, stsp
-
- * r1306111
-   Handle NULL dates in libsvn_ra_svn.
-   Justification:
-     Avoids segfault.
-   Branch:
-     1.7.x-r1306111
-   Votes:
-     +1: danielsh
-
- * r1306334
-   Optimize failure of opening wc.db files.
-   Justification:
-     Takes far too much CPU when performing status on not-working copies.
-     Reported as raw performance data on AnkhSVN. Probably noticable on the
-     buildbot total time too.
-   Votes:
-     +1: rhuijben
-
  * r1307177
    Move mod_dontdothat to install-tools.
    Justification:
      Undo compatibility break of 'make install' in 1.7.3.
    Votes:
-     +1: danielsh
+     +1: danielsh, gstein
 
- * r1307184
-   Change mod_dontdothat install target to a subdir of $(APACHE_LIBEXECDIR).
+ * r1337441
+   Fix XML namespace expansion in ra_serf
    Justification:
-     Consistency with $(bindir)/svn-tools/.
-   Notes:
-     Depends on r1307177.
+     Avoids segfaults caused by a malicious server sending unknown prefixes
+     to ra_serf. (and corrects the semantics for a bonus win)
    Votes:
-     +1: danielsh
+     +1: gstein, rhuijben
+
 
 Veto-blocked changes:
 =====================
 
- * r1291594
-   Support httpd-2.4 in davautocheck.
-   Justification:
-     Allow testing against current stable httpd.
-   Votes:
-     -1: danielsh (hangs with bdb)
-
- * r1232267
-   Allow building mod_dav_svn against httpd-2.4.
-   Justification:
-     Support current stable httpd.
-   Votes:
-     -1: danielsh (davautocheck hangs with bdb)
-
 Approved changes:
 =================

Modified: subversion/branches/1.7.x-issue4153/build/generator/gen_win.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/build/generator/gen_win.py?rev=1338671&r1=1338670&r2=1338671&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/build/generator/gen_win.py (original)
+++ subversion/branches/1.7.x-issue4153/build/generator/gen_win.py Tue May 15 12:39:14 2012
@@ -954,6 +954,8 @@ class WinGeneratorBase(GeneratorBase):
           fakeincludes.append(self.apath(self.swig_libdir, 'perl5'))
       else:
         fakeincludes.append(self.swig_libdir)
+      if target.lang == "perl":
+        fakeincludes.extend(self.perl_includes)
       if target.lang == "python":
         fakeincludes.extend(self.python_includes)
       if target.lang == "ruby":
@@ -1006,6 +1008,8 @@ class WinGeneratorBase(GeneratorBase):
     if self.swig_libdir \
        and (isinstance(target, gen_base.TargetSWIG)
             or isinstance(target, gen_base.TargetSWIGLib)):
+      if target.lang == "perl" and self.perl_libdir:
+        fakelibdirs.append(self.perl_libdir)
       if target.lang == "python" and self.python_libdir:
         fakelibdirs.append(self.python_libdir)
       if target.lang == "ruby" and self.ruby_libdir:
@@ -1234,13 +1238,15 @@ class WinGeneratorBase(GeneratorBase):
 
   def _find_perl(self):
     "Find the right perl library name to link swig bindings with"
+    self.perl_includes = []
+    self.perl_libdir = None
     fp = os.popen('perl -MConfig -e ' + escape_shell_arg(
                   'print "$Config{PERL_REVISION}$Config{PERL_VERSION}"'), 'r')
     try:
-      num = fp.readline()
-      if num:
+      line = fp.readline()
+      if line:
         msg = 'Found installed perl version number.'
-        self.perl_lib = 'perl' + num.rstrip() + '.lib'
+        self.perl_lib = 'perl' + line.rstrip() + '.lib'
       else:
         msg = 'Could not detect perl version.'
         self.perl_lib = 'perl56.lib'
@@ -1248,6 +1254,16 @@ class WinGeneratorBase(GeneratorBase):
              % (msg, self.perl_lib))
     finally:
       fp.close()
+      
+    fp = os.popen('perl -MConfig -e ' + escape_shell_arg(
+                  'print $Config{archlib}'), 'r')
+    try:
+      line = fp.readline()
+      if line:
+        self.perl_libdir = os.path.join(line, 'CORE')
+        self.perl_includes = [os.path.join(line, 'CORE')]
+    finally:
+      fp.close()
 
   def _find_ruby(self):
     "Find the right Ruby library name to link swig bindings with"

Modified: subversion/branches/1.7.x-issue4153/build/win32/make_dist.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/build/win32/make_dist.py?rev=1338671&r1=1338670&r2=1338671&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/build/win32/make_dist.py (original)
+++ subversion/branches/1.7.x-issue4153/build/win32/make_dist.py Tue May 15 12:39:14 2012
@@ -209,6 +209,8 @@ _disttree = {'': OptFile('%(readme)s', '
                      File('%(blddir)s/svnserve/svnserve.pdb'),
                      File('%(blddir)s/svnversion/svnversion.exe'),
                      File('%(blddir)s/svnversion/svnversion.pdb'),
+                     File('%(blddir)s/svnrdump/svnrdump.exe'),
+                     File('%(blddir)s/svnrdump/svnrdump.pdb'),
                      File('%(blddir)s/../contrib/client-side/svn-push/svn-push.exe'),
                      File('%(blddir)s/../contrib/client-side/svn-push/svn-push.pdb'),
                      File('%(blddir)s/../tools/client-side/svnmucc/svnmucc.exe'),

Modified: subversion/branches/1.7.x-issue4153/build/win32/vc6-build.bat.in
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/build/win32/vc6-build.bat.in?rev=1338671&r1=1338670&r2=1338671&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/build/win32/vc6-build.bat.in (original)
+++ subversion/branches/1.7.x-issue4153/build/win32/vc6-build.bat.in Tue May 15 12:39:14 2012
@@ -136,6 +136,7 @@ copy src-%DIR%\Release\subversion\svndum
 copy src-%DIR%\Release\subversion\svnlook\svnlook.exe svn-win32-%VER%\bin
 copy src-%DIR%\Release\subversion\svnserve\svnserve.exe svn-win32-%VER%\bin
 copy src-%DIR%\Release\subversion\svnversion\svnversion.exe svn-win32-%VER%\bin
+copy src-%DIR%\Release\subversion\svnrdump\svnrdump.exe svn-win32-%VER%\bin
 copy src-%DIR%\Release\subversion\mod_authz_svn\mod_authz_svn.so svn-win32-%VER%\httpd
 copy src-%DIR%\Release\subversion\mod_dav_svn\mod_dav_svn.so svn-win32-%VER%\httpd
 copy svn-win32-%VER%\bin\intl.dll "%APACHEDIR%\bin"

Modified: subversion/branches/1.7.x-issue4153/contrib/client-side/emacs/dsvn.el
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/contrib/client-side/emacs/dsvn.el?rev=1338671&r1=1338670&r2=1338671&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/contrib/client-side/emacs/dsvn.el (original)
+++ subversion/branches/1.7.x-issue4153/contrib/client-side/emacs/dsvn.el Tue May 15 12:39:14 2012
@@ -130,12 +130,41 @@
   :type 'boolean
   :group 'dsvn)
 
-(defun svn-call-process (program buffer &rest args)
+;; start-file-process and process-file are needed for tramp but only appeared
+;; in Emacs 23 and 22 respectively.
+(setq svn-start-file-process
+  (if (fboundp 'start-file-process) 'start-file-process 'start-process))
+(setq svn-process-file
+  (if (fboundp 'process-file) 'process-file 'call-process))
+
+;; Run svn with default (US-English) messages, since we are going to
+;; parse them.
+(setq svn-process-environment '("LC_MESSAGES=C"))
+
+(defun svn-call-in-svn-environment (func)
+  ;; Dynamic rebinding of process-environment
+  (let ((process-environment
+         (append svn-process-environment process-environment)))
+    (funcall func)))
+
+(defun svn-start-svn-process (buffer args)
+  "Start an svn process associated to BUFFER, with command-line
+arguments ARGS. Return the process object for it."
+  (svn-call-in-svn-environment
+   (lambda ()
+     (apply svn-start-file-process "svn" buffer svn-program args))))
+
+(defun svn-call-svn (infile buffer display args)
+  "Call svn synchronously. Arguments are like process-file."
+  (svn-call-in-svn-environment
+   (lambda ()
+     (apply svn-process-file svn-program infile buffer display args))))
+
+(defun svn-call-process (buffer &rest args)
   "Run svn and wait for it to finish.
-Argument PROGRAM is the svn binary to run.
 Argument BUFFER is the buffer in which to insert output.
 Optional argument ARGS are the arguments to svn."
-  (let ((proc (apply 'start-process "svn" buffer program args)))
+  (let ((proc (svn-start-svn-process buffer args)))
     (set-process-coding-system proc 'utf-8)
     (set-process-filter proc 'svn-output-filter)
     (while (eq (process-status proc) 'run)
@@ -159,9 +188,7 @@ Return non-NIL if there was any output."
         (fundamental-mode))
       (setq default-directory dir)
       (setq buffer-read-only t)
-      (let ((cmd `(,svn-program ,subcommand ,@args))
-            proc)
-        (setq proc (apply 'start-process "svn" buf cmd))
+      (let ((proc (svn-start-svn-process buf (cons subcommand args))))
         (set-process-coding-system proc 'utf-8)
         (set-process-filter proc 'svn-output-filter)
         (while (eq (process-status proc) 'run)
@@ -184,7 +211,7 @@ Returns the buffer that holds the output
     (with-current-buffer buf
       (erase-buffer)
       (setq default-directory dir))
-    (apply 'call-process svn-program nil buf nil (symbol-name command) args)
+    (svn-call-svn nil buf nil (cons (symbol-name command) args))
     buf))
 
 (defun svn-run-for-stdout (command args)
@@ -192,8 +219,8 @@ Returns the buffer that holds the output
 Argument COMMAND is the svn subcommand to run.
 Optional argument ARGS is a list of arguments."
   (let ((output-buffer (generate-new-buffer "*svn-stdout*")))
-    (apply 'call-process svn-program nil (list output-buffer nil) nil
-	   (symbol-name command) args)
+    (svn-call-svn nil (list output-buffer nil) nil
+                  (cons (symbol-name command) args))
     (let ((stdout (with-current-buffer output-buffer (buffer-string))))
       (kill-buffer output-buffer)
       stdout)))
@@ -255,8 +282,7 @@ buffer to describe what is going on."
             args (cons "-v" args)))
     (unless (memq command svn-noninteractive-blacklist)
       (setq args (cons "--non-interactive" args)))
-    (setq proc (apply 'start-process "svn" (current-buffer)
-                      svn-program command-s args))
+    (setq proc (svn-start-svn-process (current-buffer) (cons command-s args)))
     (if (fboundp filter-func)
         (set-process-filter proc filter-func)
       (set-process-filter proc 'svn-default-filter))
@@ -546,7 +572,7 @@ VERBOSE-P."
       (setq buffer-read-only t)
       (erase-buffer)
       (setq default-directory dir)
-      (svn-call-process svn-program diff-buf
+      (svn-call-process diff-buf
                         "diff" "-r"
                         (format "%d:%d" (1- commit-id) commit-id)))))
 
@@ -1085,9 +1111,9 @@ outside."
       (insert str)
       (goto-char svn-output-marker)
       (while (looking-at
-              "\\([ ACDGIMRX?!~][ CM][ L][ +][ S][ KOTB]\\)[ C]? \\([* ]\\) \\(........\\) \\(........\\) \\(............\\) \\([^ ].*\\)\n")
-        (let ((status (match-string 1))
-              (filename (svn-normalise-path (match-string 6))))
+              "\\(?:\\(\\?.....\\)\\|\\([ ACDGIMRX!~][ CM][ L][ +][ S][ KOTB]\\)[ C]? [* ] +[^ ]+ +[^ ]+ +[^ ]+\\) +\\([^ ].*\\)\n")
+        (let ((status (or (match-string 1) (match-string 2)))
+              (filename (svn-normalise-path (match-string 3))))
           (delete-region (match-beginning 0)
                          (match-end 0))
 	  (when (or (not svn-file-filter)
@@ -1154,7 +1180,8 @@ With prefix arg, prompt for REVISION."
     (?D . "Deleted")
     (?U . "Updated")
     (?G . "Merged")
-    (?C . "Conflict")))
+    (?C . "Conflict")
+    (?E . "Existed")))
 
 (defvar svn-merging nil)
 
@@ -1182,7 +1209,7 @@ With prefix arg, prompt for REVISION."
       (goto-char svn-output-marker)
       (while (not nomore)
         (cond ((looking-at
-                "\\([ ADUCG][ ADUCG][ B]\\)  \\(.*\\)\n")
+                "\\([ ADUCGE][ ADUCGE][ B]\\)  \\(.*\\)\n")
                (let* ((status (match-string 1))
                       (file-status (elt status 0))
                       (prop-status (elt status 1))
@@ -1211,6 +1238,8 @@ With prefix arg, prompt for REVISION."
               ((looking-at "At revision \\([0-9]+\\)\\.\n")
                (svn-update-label svn-revision-label (match-string 1))
                (forward-line 1))
+              ((looking-at "Updating '.*':\n")
+               (delete-region (match-beginning 0) (match-end 0)))
               ((and (not svn-merging)
                     (looking-at "Updated to revision \\([0-9]+\\)\\.\n"))
                (svn-update-label svn-revision-label (match-string 1))

Modified: subversion/branches/1.7.x-issue4153/contrib/client-side/emacs/vc-svn.el
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/contrib/client-side/emacs/vc-svn.el?rev=1338671&r1=1338670&r2=1338671&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/contrib/client-side/emacs/vc-svn.el (original)
+++ subversion/branches/1.7.x-issue4153/contrib/client-side/emacs/vc-svn.el Tue May 15 12:39:14 2012
@@ -3,18 +3,28 @@
 
 ;;; #########################################################################
 ;;; ##                                                                     ##
-;;; ##          NOTE: THIS IS NOT THE MASTER VERSION OF VC-SVN.EL          ##
+;;; ##                NOTE: THIS FILE IS ONLY FOR EMACS 21                 ##
 ;;; ##                                                                     ##
-;;; ## The canonical vc-svn.el now lives in the FSF Emacs tree, at         ##
-;;; ## http://savannah.gnu.org/cgi-bin/viewcvs/emacs/emacs/lisp/vc-svn.el. ##
-;;; ## The version here is maintained only because it is compatible with   ##
-;;; ## older releases of Emacs, since (as of this writing) the one in the  ##
-;;; ## FSF tree hasn't made it into an official release of Emacs yet.      ##
-;;; ## Eventually it will, though, and sometime after that the version     ##
-;;; ## here will go away.                                                  ##
+;;; ## Emacs 21 does not come with a working vc-mode for Subversion, and   ##
+;;; ## in particular, dsvn.el needs one. This file is provided for those   ##
+;;; ## who use that Emacs version.					   ##
 ;;; ##                                                                     ##
+;;; ## Emacs 22 and newer versions come with a Subversion-capable vc-mode  ##
+;;; ## and should not use this file.					   ##
+;;; ##									   ##
+;;; ## This file is a mild fork of vc-svn.el from the Emacs source tree.   ##
+;;; ## It may go away at some undetermined point in the future, when	   ##
+;;; ## support of Emacs 21 becomes completely irrelevant.		   ##
+;;; ## 									   ##
+;;; ## Maintenance of the vc-mode for Subversion should be done first and  ##
+;;; ## foremost in the Emacs tree, and changes done to this file only	   ##
+;;; ## when necessary.							   ##
+;;; ## 									   ##
 ;;; #########################################################################
 
+(if (> emacs-major-version 21)
+    (error "This file should only be used by Emacs versions 21 and earlier"))
+
 ;;; Writing this back end has shown up some problems in VC: bugs,
 ;;; shortcomings in the back end interface, and so on.  But I want to
 ;;; first produce code that Subversion users can use with an already

Modified: subversion/branches/1.7.x-issue4153/subversion/bindings/swig/ruby/test/test_client.rb
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/bindings/swig/ruby/test/test_client.rb?rev=1338671&r1=1338670&r2=1338671&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/bindings/swig/ruby/test/test_client.rb (original)
+++ subversion/branches/1.7.x-issue4153/subversion/bindings/swig/ruby/test/test_client.rb Tue May 15 12:39:14 2012
@@ -2341,7 +2341,9 @@ class SvnClientTest < Test::Unit::TestCa
 
   def test_changelists_get_without_block
     assert_changelists do |ctx, changelist_name|
-      ctx.changelists(changelist_name, @wc_path)
+      changelists = ctx.changelists(changelist_name, @wc_path)
+      changelists.each_value { |v| v.sort! }
+      changelists
     end
   end
 
@@ -2351,6 +2353,7 @@ class SvnClientTest < Test::Unit::TestCa
       ctx.changelists(changelist_name, @wc_path) do |path,cl_name|
         changelists[cl_name] << path
       end
+      changelists.each_value { |v| v.sort! }
       changelists
     end
   end

Modified: subversion/branches/1.7.x-issue4153/subversion/bindings/swig/ruby/test/test_wc.rb
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/bindings/swig/ruby/test/test_wc.rb?rev=1338671&r1=1338670&r2=1338671&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/bindings/swig/ruby/test/test_wc.rb (original)
+++ subversion/branches/1.7.x-issue4153/subversion/bindings/swig/ruby/test/test_wc.rb Tue May 15 12:39:14 2012
@@ -747,14 +747,15 @@ EOE
             :file_changed_prop_name => prop_name,
             :file_changed_prop_value => prop_value,
           }
-          expected_props, actual_result = yield(property_info, callbacks.result)
+          sorted_result = callbacks.result.sort_by {|r| r.first.to_s}
+          expected_props, actual_result = yield(property_info, sorted_result)
           dir_changed_props, file_changed_props, empty_changed_props = expected_props
           assert_equal([
                         [:dir_props_changed, @wc_path, dir_changed_props],
-                        [:file_changed, path1, file_changed_props],
                         [:file_added, path2, empty_changed_props],
+                        [:file_changed, path1, file_changed_props],
                        ],
-                       callbacks.result)
+                       sorted_result)
         end
       end
     end

Propchange: subversion/branches/1.7.x-issue4153/subversion/include/private/svn_adler32.h
------------------------------------------------------------------------------
  Merged /subversion/branches/1.7.x-issue4087/subversion/include/private/svn_adler32.h:r1243707-1336073
  Merged /subversion/trunk/subversion/include/private/svn_adler32.h:r1164929
  Merged /subversion/branches/1.7.x/subversion/include/private/svn_adler32.h:r1309894-1338666
  Merged /subversion/branches/1.7.x-issue4169/subversion/include/private/svn_adler32.h:r1330537-1336116

Modified: subversion/branches/1.7.x-issue4153/subversion/include/private/svn_repos_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/include/private/svn_repos_private.h?rev=1338671&r1=1338670&r2=1338671&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/include/private/svn_repos_private.h (original)
+++ subversion/branches/1.7.x-issue4153/subversion/include/private/svn_repos_private.h Tue May 15 12:39:14 2012
@@ -73,6 +73,12 @@ const char *
 svn_repos__post_commit_error_str(svn_error_t *err,
                                  apr_pool_t *pool);
 
+/* A repos version of svn_fs_type */
+svn_error_t *
+svn_repos__fs_type(const char **fs_type,
+                   const char *repos_path,
+                   apr_pool_t *pool);
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Propchange: subversion/branches/1.7.x-issue4153/subversion/include/private/svn_string_private.h
------------------------------------------------------------------------------
  Merged /subversion/branches/1.7.x/subversion/include/private/svn_string_private.h:r1309894-1338666
  Merged /subversion/trunk/subversion/include/private/svn_string_private.h:r1164929
  Merged /subversion/branches/1.7.x-issue4087/subversion/include/private/svn_string_private.h:r1243707-1336073
  Merged /subversion/branches/1.7.x-issue4169/subversion/include/private/svn_string_private.h:r1330537-1336116

Propchange: subversion/branches/1.7.x-issue4153/subversion/include/private/svn_temp_serializer.h
------------------------------------------------------------------------------
  Merged /subversion/branches/1.7.x-issue4169/subversion/include/private/svn_temp_serializer.h:r1330537-1336116
  Merged /subversion/trunk/subversion/include/private/svn_temp_serializer.h:r1164929
  Merged /subversion/branches/1.7.x/subversion/include/private/svn_temp_serializer.h:r1309894-1338666
  Merged /subversion/branches/1.7.x-issue4087/subversion/include/private/svn_temp_serializer.h:r1243707-1336073

Modified: subversion/branches/1.7.x-issue4153/subversion/include/svn_version.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/include/svn_version.h?rev=1338671&r1=1338670&r2=1338671&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/include/svn_version.h (original)
+++ subversion/branches/1.7.x-issue4153/subversion/include/svn_version.h Tue May 15 12:39:14 2012
@@ -71,7 +71,7 @@ extern "C" {
  *
  * @since New in 1.1.
  */
-#define SVN_VER_PATCH      5
+#define SVN_VER_PATCH      6
 
 
 /** @deprecated Provided for backward compatibility with the 1.0 API. */

Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_client/checkout.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_client/checkout.c?rev=1338671&r1=1338670&r2=1338671&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_client/checkout.c (original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_client/checkout.c Tue May 15 12:39:14 2012
@@ -73,7 +73,6 @@ svn_client__checkout_internal(svn_revnum
                               const char *local_abspath,
                               const svn_opt_revision_t *peg_revision,
                               const svn_opt_revision_t *revision,
-                              const svn_client__ra_session_from_path_results *ra_cache,
                               svn_depth_t depth,
                               svn_boolean_t ignore_externals,
                               svn_boolean_t allow_unver_obstructions,
@@ -88,6 +87,10 @@ svn_client__checkout_internal(svn_revnum
   const char *session_url;
   svn_node_kind_t kind;
   const char *uuid, *repos_root;
+  apr_pool_t *session_pool = svn_pool_create(pool);
+  svn_ra_session_t *ra_session;
+  svn_revnum_t tmp_revnum;
+  const char *tmp_session_url;
 
   /* Sanity check.  Without these, the checkout is meaningless. */
   SVN_ERR_ASSERT(local_abspath != NULL);
@@ -100,60 +103,19 @@ svn_client__checkout_internal(svn_revnum
       && (revision->kind != svn_opt_revision_head))
     return svn_error_create(SVN_ERR_CLIENT_BAD_REVISION, NULL, NULL);
 
-  {
-    svn_boolean_t have_repos_root_url;
-    svn_boolean_t have_repos_uuid;
-    svn_boolean_t have_session_url;
-    svn_boolean_t have_revnum;
-    svn_boolean_t have_kind;
-
-    if ((have_repos_root_url = (ra_cache && ra_cache->repos_root_url)))
-      repos_root = ra_cache->repos_root_url;
-
-    if ((have_repos_uuid = (ra_cache && ra_cache->repos_uuid)))
-      uuid = ra_cache->repos_uuid;
-
-    if ((have_session_url = (ra_cache && ra_cache->ra_session_url)))
-      session_url = ra_cache->ra_session_url;
-
-    if ((have_revnum = (ra_cache && SVN_IS_VALID_REVNUM(ra_cache->ra_revnum))))
-      revnum = ra_cache->ra_revnum;
-
-    if ((have_kind = (ra_cache && ra_cache->kind != svn_node_unknown)))
-      kind = ra_cache->kind;
-
-    if (! have_repos_root_url || ! have_repos_uuid || ! have_session_url ||
-        ! have_revnum || ! have_kind)
-      {
-        apr_pool_t *session_pool = svn_pool_create(pool);
-        svn_ra_session_t *ra_session;
-        svn_revnum_t tmp_revnum;
-        const char *tmp_session_url;
-
-        /* Get the RA connection. */
-        SVN_ERR(svn_client__ra_session_from_path(&ra_session, &tmp_revnum,
-                                                 &tmp_session_url, url, NULL,
-                                                 peg_revision, revision, ctx,
-                                                 session_pool));
-
-        if (! have_repos_root_url)
-          SVN_ERR(svn_ra_get_repos_root2(ra_session, &repos_root, pool));
-
-        if (! have_repos_uuid)
-          SVN_ERR(svn_ra_get_uuid2(ra_session, &uuid, pool));
-
-        if (! have_session_url)
-          session_url = apr_pstrdup(pool, tmp_session_url);
-
-        if (! have_revnum)
-          revnum = tmp_revnum;
-
-        if (! have_kind)
-          SVN_ERR(svn_ra_check_path(ra_session, "", revnum, &kind, pool));
-
-        svn_pool_destroy(session_pool);
-      }
-  }
+  /* Get the RA connection. */
+  SVN_ERR(svn_client__ra_session_from_path(&ra_session, &tmp_revnum,
+                                           &tmp_session_url, url, NULL,
+                                           peg_revision, revision, ctx,
+                                           session_pool));
+
+  SVN_ERR(svn_ra_get_repos_root2(ra_session, &repos_root, pool));
+  SVN_ERR(svn_ra_get_uuid2(ra_session, &uuid, pool));
+  session_url = apr_pstrdup(pool, tmp_session_url);
+  revnum = tmp_revnum;
+  SVN_ERR(svn_ra_check_path(ra_session, "", revnum, &kind, pool));
+
+  svn_pool_destroy(session_pool);
 
   if (kind == svn_node_none)
     return svn_error_createf(SVN_ERR_RA_ILLEGAL_URL, NULL,
@@ -253,7 +215,7 @@ svn_client_checkout3(svn_revnum_t *resul
   SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
 
   return svn_client__checkout_internal(result_rev, URL, local_abspath,
-                                       peg_revision, revision, NULL, depth,
+                                       peg_revision, revision, depth,
                                        ignore_externals,
                                        allow_unver_obstructions, NULL,
                                        ctx, pool);

Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_client/client.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_client/client.h?rev=1338671&r1=1338670&r2=1338671&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_client/client.h (original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_client/client.h Tue May 15 12:39:14 2012
@@ -451,36 +451,6 @@ svn_client__update_internal(svn_revnum_t
                             svn_client_ctx_t *ctx,
                             apr_pool_t *pool);
 
-/* Structure holding the results of svn_client__ra_session_from_path()
-   plus the repository root URL and UUID and the node kind for the
-   input URL, REVISION and PEG_REVISION .  See
-   svn_client__ra_session_from_path() for the meaning of these fields.
-   This structure is used by svn_client__checkout_internal() to save
-   one or more round-trips if the client already gathered some of this
-   information.  Not all the fields need to be filled in.  */
-typedef struct svn_client__ra_session_from_path_results
-{
-  /* The repository root URL.  A NULL value means the root URL is
-     unknown.*/
-  const char *repos_root_url;
-
-  /* The repository UUID.  A NULL value means the UUID is unknown.  */
-  const char *repos_uuid;
-
-  /* The actual final resulting URL for the input URL.  This may be
-     different because of copy history.  A NULL value means the
-     resulting URL is unknown.  */
-  const char *ra_session_url;
-
-  /* The actual final resulting revision for the input URL.  An
-     invalid revnum as determined by SVN_IS_VALID_REVNUM() means the
-     revnum is unknown.  */
-  svn_revnum_t ra_revnum;
-
-  /* An optional node kind for the URL.  svn_node_unknown if unknown */
-  svn_node_kind_t kind;
-} svn_client__ra_session_from_path_results;
-
 /* Checkout into LOCAL_ABSPATH a working copy of URL at REVISION, and (if not
    NULL) set RESULT_REV to the checked out revision.
 
@@ -517,7 +487,6 @@ svn_client__checkout_internal(svn_revnum
                               const char *local_abspath,
                               const svn_opt_revision_t *peg_revision,
                               const svn_opt_revision_t *revision,
-                              const svn_client__ra_session_from_path_results *ra_cache,
                               svn_depth_t depth,
                               svn_boolean_t ignore_externals,
                               svn_boolean_t allow_unver_obstructions,
@@ -958,11 +927,12 @@ svn_client__export_externals(apr_hash_t 
                              apr_pool_t *pool);
 
 
-/* Perform status operations on each external in TRAVERSAL_INFO.  All
-   other options are the same as those passed to svn_client_status(). */
+/* Perform status operations on each external in EXTERNAL_MAP, a const char *
+   local_abspath of all externals mapping to the const char* defining_abspath.
+   All other options are the same as those passed to svn_client_status(). */
 svn_error_t *
 svn_client__do_external_status(svn_client_ctx_t *ctx,
-                               apr_hash_t *external_defs,
+                               apr_hash_t *external_map,
                                svn_depth_t depth,
                                svn_boolean_t get_all,
                                svn_boolean_t update,

Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_client/copy.c?rev=1338671&r1=1338670&r2=1338671&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_client/copy.c (original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_client/copy.c Tue May 15 12:39:14 2012
@@ -1547,7 +1547,7 @@ repos_to_wc_copy_single(svn_client__copy
                                             pair->src_original,
                                             tmp_abspath,
                                             &pair->src_peg_revision,
-                                            &pair->src_op_revision, NULL,
+                                            &pair->src_op_revision,
                                             svn_depth_infinity,
                                             ignore_externals, FALSE,
                                             &sleep_needed, ctx, pool);

Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_client/diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_client/diff.c?rev=1338671&r1=1338670&r2=1338671&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_client/diff.c (original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_client/diff.c Tue May 15 12:39:14 2012
@@ -812,6 +812,17 @@ struct diff_cmd_baton {
 };
 
 
+/* A helper function that marks a path as visited. It copies PATH
+ * into the correct pool before referencing it from the hash table. */
+static void
+mark_path_as_visited(struct diff_cmd_baton *diff_cmd_baton, const char *path)
+{
+  const char *p;
+
+  p = apr_pstrdup(apr_hash_pool_get(diff_cmd_baton->visited_paths), path);
+  apr_hash_set(diff_cmd_baton->visited_paths, p, APR_HASH_KEY_STRING, p);
+}
+
 /* An helper for diff_dir_props_changed, diff_file_changed and diff_file_added
  */
 static svn_error_t *
@@ -859,8 +870,7 @@ diff_props_changed(svn_wc_notify_state_t
       /* We've printed the diff header so now we can mark the path as
        * visited. */
       if (show_diff_header)
-        apr_hash_set(diff_cmd_baton->visited_paths, path,
-                     APR_HASH_KEY_STRING, path);
+        mark_path_as_visited(diff_cmd_baton, path);
     }
 
   if (state)
@@ -1056,9 +1066,7 @@ diff_content_changed(const char *path,
                      subpool));
 
           /* We have a printed a diff for this path, mark it as visited. */
-          apr_hash_set(diff_cmd_baton->visited_paths, path,
-                       APR_HASH_KEY_STRING, path);
-
+          mark_path_as_visited(diff_cmd_baton, path);
         }
 
       /* Close the stream (flush) */
@@ -1427,8 +1435,8 @@ check_paths(svn_boolean_t *is_repos1,
                                 _("At least one revision must be non-local "
                                   "for a pegged diff"));
 
-      *is_repos1 = ! is_local_rev1;
-      *is_repos2 = ! is_local_rev2;
+      *is_repos1 = ! is_local_rev1 || svn_path_is_url(path1);
+      *is_repos2 = ! is_local_rev2 || svn_path_is_url(path2);
     }
   else
     {

Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_client/externals.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_client/externals.c?rev=1338671&r1=1338670&r2=1338671&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_client/externals.c (original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_client/externals.c Tue May 15 12:39:14 2012
@@ -24,7 +24,7 @@
 /* ==================================================================== */
 
 
-
+ 
 /*** Includes. ***/
 
 #include <apr_uri.h>
@@ -41,7 +41,7 @@
 
 #include "svn_private_config.h"
 #include "private/svn_wc_private.h"
-
+ 
 /* Closure for handle_external_item_change. */
 struct external_change_baton_t
 {
@@ -273,7 +273,7 @@ switch_dir_external(const char *local_ab
 
   /* ... Hello, new hotness. */
   SVN_ERR(svn_client__checkout_internal(NULL, url, local_abspath, peg_revision,
-                                        revision, NULL, svn_depth_infinity,
+                                        revision, svn_depth_infinity,
                                         FALSE, FALSE, timestamp_sleep,
                                         ctx, pool));
 
@@ -816,10 +816,15 @@ handle_external_item_change(const struct
                             apr_pool_t *scratch_pool)
 {
   svn_ra_session_t *ra_session;
-  svn_client__ra_session_from_path_results ra_cache = { 0 };
+  svn_revnum_t ra_revnum;
+  const char *ra_session_url;
+  const char *repos_root_url;
+  const char *repos_uuid;
   const char *new_url;
+  svn_node_kind_t ext_kind;
+  svn_node_kind_t local_kind;
 
-  ra_cache.kind = svn_node_unknown;
+  local_kind = svn_node_unknown;
 
   SVN_ERR_ASSERT(eb->repos_root_url && parent_dir_url);
   SVN_ERR_ASSERT(new_item != NULL);
@@ -836,140 +841,130 @@ handle_external_item_change(const struct
                                          parent_dir_url,
                                          scratch_pool, scratch_pool));
 
-  /* If the external is being checked out, exported or updated,
-     determine if the external is a file or directory. */
-  if (new_item)
-    {
-      svn_node_kind_t kind;
-
-      /* Get the RA connection. */
-      SVN_ERR(svn_client__ra_session_from_path(&ra_session,
-                                               &ra_cache.ra_revnum,
-                                               &ra_cache.ra_session_url,
-                                               new_url, NULL,
-                                               &(new_item->peg_revision),
-                                               &(new_item->revision), eb->ctx,
-                                               scratch_pool));
-
-      SVN_ERR(svn_ra_get_uuid2(ra_session, &ra_cache.repos_uuid,
-                               scratch_pool));
-      SVN_ERR(svn_ra_get_repos_root2(ra_session, &ra_cache.repos_root_url,
-                                     scratch_pool));
-      SVN_ERR(svn_ra_check_path(ra_session, "", ra_cache.ra_revnum, &kind,
-                                scratch_pool));
+  /* Determine if the external is a file or directory. */
+  /* Get the RA connection. */
+  SVN_ERR(svn_client__ra_session_from_path(&ra_session,
+                                           &ra_revnum,
+                                           &ra_session_url,
+                                           new_url, NULL,
+                                           &(new_item->peg_revision),
+                                           &(new_item->revision), eb->ctx,
+                                           scratch_pool));
+
+  SVN_ERR(svn_ra_get_uuid2(ra_session, &repos_uuid, scratch_pool));
+  SVN_ERR(svn_ra_get_repos_root2(ra_session, &repos_root_url, scratch_pool));
+  SVN_ERR(svn_ra_check_path(ra_session, "", ra_revnum, &ext_kind,
+                            scratch_pool));
+
+  if (svn_node_none == ext_kind)
+    return svn_error_createf(SVN_ERR_RA_ILLEGAL_URL, NULL,
+                             _("URL '%s' at revision %ld doesn't exist"),
+                             ra_session_url, ra_revnum);
+
+  if (svn_node_dir != ext_kind && svn_node_file != ext_kind)
+    return svn_error_createf(SVN_ERR_RA_ILLEGAL_URL, NULL,
+                             _("URL '%s' at revision %ld is not a file "
+                               "or a directory"),
+                             ra_session_url, ra_revnum);
 
-      if (svn_node_none == kind)
-        return svn_error_createf(SVN_ERR_RA_ILLEGAL_URL, NULL,
-                                 _("URL '%s' at revision %ld doesn't exist"),
-                                 ra_cache.ra_session_url,
-                                 ra_cache.ra_revnum);
-
-      if (svn_node_dir != kind && svn_node_file != kind)
-        return svn_error_createf(SVN_ERR_RA_ILLEGAL_URL, NULL,
-                                 _("URL '%s' at revision %ld is not a file "
-                                   "or a directory"),
-                                 ra_cache.ra_session_url,
-                                 ra_cache.ra_revnum);
+  local_kind = ext_kind;
 
-      ra_cache.kind = kind;
-    }
 
   /* Not protecting against recursive externals.  Detecting them in
      the global case is hard, and it should be pretty obvious to a
      user when it happens.  Worst case: your disk fills up :-). */
 
-  if (! old_defining_abspath)
+  /* First notify that we're about to handle an external. */
+  if (eb->ctx->notify_func2)
     {
-      /* This branch is only used during a checkout or an export. */
-
-      /* First notify that we're about to handle an external. */
-      if (eb->ctx->notify_func2)
-        (*eb->ctx->notify_func2)(
-           eb->ctx->notify_baton2,
-           svn_wc_create_notify(local_abspath, svn_wc_notify_update_external,
-                                scratch_pool), scratch_pool);
-
-      switch (ra_cache.kind)
-        {
-        case svn_node_dir:
-          /* The target dir might have multiple components.  Guarantee
-             the path leading down to the last component. */
-          SVN_ERR(svn_io_make_dir_recursively(svn_dirent_dirname(local_abspath,
-                                                                 scratch_pool),
-                                              scratch_pool));
-
-          SVN_ERR(switch_dir_external(
-                   local_abspath, new_url,
-                   &(new_item->peg_revision), &(new_item->revision),
-                   parent_dir_abspath, eb->timestamp_sleep, eb->ctx,
-                   scratch_pool));
-          break;
-        case svn_node_file:
-          SVN_ERR(switch_file_external(local_abspath,
-                                       new_url,
-                                       &new_item->peg_revision,
-                                       &new_item->revision,
-                                       parent_dir_abspath,
-                                       ra_session,
-                                       ra_cache.ra_session_url,
-                                       ra_cache.ra_revnum,
-                                       ra_cache.repos_root_url,
-                                       eb->timestamp_sleep, eb->ctx,
-                                       scratch_pool));
-          break;
-        default:
-          SVN_ERR_MALFUNCTION();
-          break;
-        }
+      (*eb->ctx->notify_func2)(
+         eb->ctx->notify_baton2,
+         svn_wc_create_notify(local_abspath,
+                              svn_wc_notify_update_external,
+                              scratch_pool),
+         scratch_pool);
     }
-  else
-    {
-      /* This branch handles a definition change or simple update. */
-
-      /* First notify that we're about to handle an external. */
-      if (eb->ctx->notify_func2)
-        {
-          svn_wc_notify_t *nt;
-
-          nt = svn_wc_create_notify(local_abspath,
-                                    svn_wc_notify_update_external,
-                                    scratch_pool);
 
-          eb->ctx->notify_func2(eb->ctx->notify_baton2, nt, scratch_pool);
-        }
+  if (! old_defining_abspath)
+    {
+      /* The target dir might have multiple components.  Guarantee the path
+         leading down to the last component. */
+      SVN_ERR(svn_io_make_dir_recursively(svn_dirent_dirname(local_abspath,
+                                                             scratch_pool),
+                                          scratch_pool));
+    }
+
+  switch (local_kind)
+    {
+      case svn_node_dir:
+        SVN_ERR(switch_dir_external(local_abspath, new_url,
+                                    &(new_item->peg_revision),
+                                    &(new_item->revision),
+                                    parent_dir_abspath,
+                                    eb->timestamp_sleep, eb->ctx,
+                                    scratch_pool));
+        break;
+      case svn_node_file:
+        if (strcmp(eb->repos_root_url, repos_root_url))
+          {
+            const char *local_repos_root_url;
+            const char *local_repos_uuid;
+            const char *ext_repos_relpath;
+            
+            /* 
+             * The working copy library currently requires that all files
+             * in the working copy have the same repository root URL.
+             * The URL from the file external's definition differs from the
+             * one used by the working copy. As a workaround, replace the
+             * root URL portion of the file external's URL, after making
+             * sure both URLs point to the same repository. See issue #4087.
+             */
+
+            SVN_ERR(svn_wc__node_get_repos_info(&local_repos_root_url,
+                                                &local_repos_uuid,
+                                                eb->ctx->wc_ctx,
+                                                parent_dir_abspath,
+                                                scratch_pool, scratch_pool));
+            ext_repos_relpath = svn_uri_skip_ancestor(repos_root_url,
+                                                      new_url, scratch_pool);
+            if (local_repos_uuid == NULL || local_repos_root_url == NULL ||
+                ext_repos_relpath == NULL ||
+                strcmp(local_repos_uuid, repos_uuid) != 0)
+              return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
+                        _("Unsupported external: url of file external '%s' "
+                          "is not in repository '%s'"),
+                        new_url, eb->repos_root_url);
+
+            new_url = svn_path_url_add_component2(local_repos_root_url,
+                                                  ext_repos_relpath,
+                                                  scratch_pool);
+            SVN_ERR(svn_client__ra_session_from_path(&ra_session,
+                                                     &ra_revnum,
+                                                     &ra_session_url,
+                                                     new_url,
+                                                     NULL,
+                                                     &(new_item->peg_revision),
+                                                     &(new_item->revision),
+                                                     eb->ctx, scratch_pool));
+            SVN_ERR(svn_ra_get_repos_root2(ra_session, &repos_root_url,
+                                           scratch_pool));
+          }
 
-      /* Either the URL changed, or the exact same item is present in
-         both hashes, and caller wants to update such unchanged items.
-         In the latter case, the call below will try to make sure that
-         the external really is a WC pointing to the correct
-         URL/revision. */
-      switch (ra_cache.kind)
-        {
-        case svn_node_dir:
-          SVN_ERR(switch_dir_external(local_abspath, new_url,
-                                      &(new_item->peg_revision),
-                                      &(new_item->revision),
-                                      parent_dir_abspath,
-                                      eb->timestamp_sleep, eb->ctx,
-                                      scratch_pool));
-          break;
-        case svn_node_file:
-          SVN_ERR(switch_file_external(local_abspath,
-                                       new_url,
-                                       &new_item->peg_revision,
-                                       &new_item->revision,
-                                       parent_dir_abspath,
-                                       ra_session,
-                                       ra_cache.ra_session_url,
-                                       ra_cache.ra_revnum,
-                                       ra_cache.repos_root_url,
-                                       eb->timestamp_sleep, eb->ctx,
-                                       scratch_pool));
-          break;
-        default:
-          SVN_ERR_MALFUNCTION();
-          break;
-        }
+        SVN_ERR(switch_file_external(local_abspath,
+                                     new_url,
+                                     &new_item->peg_revision,
+                                     &new_item->revision,
+                                     parent_dir_abspath,
+                                     ra_session,
+                                     ra_session_url,
+                                     ra_revnum,
+                                     repos_root_url,
+                                     eb->timestamp_sleep, eb->ctx,
+                                     scratch_pool));
+        break;
+      default:
+        SVN_ERR_MALFUNCTION();
+        break;
     }
 
   return SVN_NO_ERROR;
@@ -1283,7 +1278,7 @@ svn_client__export_externals(apr_hash_t 
 
 svn_error_t *
 svn_client__do_external_status(svn_client_ctx_t *ctx,
-                               apr_hash_t *externals_new,
+                               apr_hash_t *external_map,
                                svn_depth_t depth,
                                svn_boolean_t get_all,
                                svn_boolean_t update,
@@ -1293,69 +1288,59 @@ svn_client__do_external_status(svn_clien
                                apr_pool_t *pool)
 {
   apr_hash_index_t *hi;
-  apr_pool_t *subpool = svn_pool_create(pool);
+  apr_pool_t *iterpool = svn_pool_create(pool);
 
   /* Loop over the hash of new values (we don't care about the old
      ones).  This is a mapping of versioned directories to property
      values. */
-  for (hi = apr_hash_first(pool, externals_new);
+  for (hi = apr_hash_first(pool, external_map);
        hi;
        hi = apr_hash_next(hi))
     {
-      apr_array_header_t *exts;
-      const char *path = svn__apr_hash_index_key(hi);
-      const char *propval = svn__apr_hash_index_val(hi);
-      apr_pool_t *iterpool;
-      int i;
+      svn_node_kind_t external_kind;
+      const char *local_abspath = svn__apr_hash_index_key(hi);
+      const char *defining_abspath = svn__apr_hash_index_val(hi);
+      svn_node_kind_t kind;
+      svn_opt_revision_t opt_rev;
+
+      svn_pool_clear(iterpool);
 
-      /* Clear the subpool. */
-      svn_pool_clear(subpool);
+      /* Obtain information on the expected external. */
+      SVN_ERR(svn_wc__read_external_info(&external_kind, NULL, NULL, NULL,
+                                         &opt_rev.value.number,
+                                         ctx->wc_ctx, defining_abspath,
+                                         local_abspath, FALSE,
+                                         iterpool, iterpool));
 
-      /* Parse the svn:externals property value.  This results in a
-         hash mapping subdirectories to externals structures. */
-      SVN_ERR(svn_wc_parse_externals_description3(&exts, path, propval,
-                                                  FALSE, subpool));
+      if (external_kind != svn_node_dir)
+        continue;
 
-      /* Make a sub-pool of SUBPOOL. */
-      iterpool = svn_pool_create(subpool);
+      SVN_ERR(svn_io_check_path(local_abspath, &kind, iterpool));
+      if (kind != svn_node_dir)
+        continue;
 
-      /* Loop over the subdir array. */
-      for (i = 0; exts && (i < exts->nelts); i++)
-        {
-          const char *fullpath;
-          svn_wc_external_item2_t *external;
-          svn_node_kind_t kind;
-
-          svn_pool_clear(iterpool);
-
-          external = APR_ARRAY_IDX(exts, i, svn_wc_external_item2_t *);
-          fullpath = svn_dirent_join(path, external->target_dir, iterpool);
-
-          /* If the external target directory doesn't exist on disk,
-             just skip it. */
-          SVN_ERR(svn_io_check_path(fullpath, &kind, iterpool));
-          if (kind != svn_node_dir)
-            continue;
-
-          /* Tell the client we're starting an external status set. */
-          if (ctx->notify_func2)
-            (ctx->notify_func2)(
+      if (SVN_IS_VALID_REVNUM(opt_rev.value.number))
+        opt_rev.kind = svn_opt_revision_number;
+      else
+        opt_rev.kind = svn_opt_revision_unspecified;
+
+      /* Tell the client we're starting an external status set. */
+      if (ctx->notify_func2)
+        ctx->notify_func2(
                ctx->notify_baton2,
-               svn_wc_create_notify(fullpath, svn_wc_notify_status_external,
+               svn_wc_create_notify(local_abspath,
+                                    svn_wc_notify_status_external,
                                     iterpool), iterpool);
 
-          /* And then do the status. */
-          SVN_ERR(svn_client_status5(NULL, ctx, fullpath,
-                                     &(external->revision),
-                                     depth, get_all, update,
-                                     no_ignore, FALSE, FALSE, NULL,
-                                     status_func, status_baton,
-                                     iterpool));
-        }
+      /* And then do the status. */
+      SVN_ERR(svn_client_status5(NULL, ctx, local_abspath, &opt_rev, depth,
+                                 get_all, update, no_ignore, FALSE, FALSE,
+                                 NULL, status_func, status_baton,
+                                 iterpool));
     }
 
   /* Destroy SUBPOOL and (implicitly) ITERPOOL. */
-  svn_pool_destroy(subpool);
+  svn_pool_destroy(iterpool);
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_client/merge.c?rev=1338671&r1=1338670&r2=1338671&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_client/merge.c (original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_client/merge.c Tue May 15 12:39:14 2012
@@ -2634,26 +2634,56 @@ notification_receiver(void *baton, const
 
       if (notify->action == svn_wc_notify_update_add)
         {
-          svn_boolean_t is_root_of_added_subtree = FALSE;
-          const char *added_path = apr_pstrdup(notify_b->pool, notify->path);
-          const char *added_path_parent = NULL;
+          svn_boolean_t root_of_added_subtree = TRUE;
 
           /* Stash the root path of any added subtrees. */
           if (notify_b->added_abspaths == NULL)
             {
+              /* The first added path is always a root. */
               notify_b->added_abspaths = apr_hash_make(notify_b->pool);
-              is_root_of_added_subtree = TRUE;
             }
           else
             {
-              added_path_parent = svn_dirent_dirname(added_path, pool);
-              if (!apr_hash_get(notify_b->added_abspaths, added_path_parent,
-                                APR_HASH_KEY_STRING))
-                is_root_of_added_subtree = TRUE;
-            }
-          if (is_root_of_added_subtree)
-            apr_hash_set(notify_b->added_abspaths, added_path,
-                         APR_HASH_KEY_STRING, added_path);
+              const char *added_path_parent =
+                svn_dirent_dirname(notify->path, pool);
+              apr_pool_t *subpool = svn_pool_create(pool);
+
+              /* Is NOTIFY->PATH the root of an added subtree? */
+              while (strcmp(notify_b->merge_b->target_abspath,
+                            added_path_parent))
+                {
+                  if (apr_hash_get(notify_b->added_abspaths,
+                                   added_path_parent,
+                                   APR_HASH_KEY_STRING))
+                    {
+                      root_of_added_subtree = FALSE;
+                      break;
+                    }
+
+                  added_path_parent = svn_dirent_dirname(
+                    added_path_parent, subpool);
+                }
+
+              svn_pool_destroy(subpool);
+            }
+
+          if (root_of_added_subtree)
+            {
+              const char *added_root_path = apr_pstrdup(notify_b->pool,
+                                                        notify->path);
+              apr_hash_set(notify_b->added_abspaths, added_root_path,
+                           APR_HASH_KEY_STRING, added_root_path);
+            }
+        }
+
+      if (notify->action == svn_wc_notify_update_delete
+          && notify_b->added_abspaths)
+        {
+          /* Issue #4166: If a previous merge added NOTIFY_ABSPATH, but we
+             are now deleting it, then remove it from the list of added
+             paths. */
+          apr_hash_set(notify_b->added_abspaths, notify->path,
+                       APR_HASH_KEY_STRING, NULL);
         }
     }
 

Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_client/prop_commands.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_client/prop_commands.c?rev=1338671&r1=1338670&r2=1338671&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_client/prop_commands.c (original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_client/prop_commands.c Tue May 15 12:39:14 2012
@@ -357,7 +357,7 @@ svn_client_propset_local(const char *pro
                              iterpool);
 
       if ((err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
-          || kind == svn_node_unknown || kind == svn_node_none)
+          || (!err && (kind == svn_node_unknown || kind == svn_node_none)))
         {
           if (ctx->notify_func2)
             {

Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_client/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_client/status.c?rev=1338671&r1=1338670&r2=1338671&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_client/status.c (original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_client/status.c Tue May 15 12:39:14 2012
@@ -419,7 +419,7 @@ svn_client_status5(svn_revnum_t *result_
                                                       pool));
             }
 
-          if (depth_as_sticky)
+          if (depth_as_sticky || !server_supports_depth)
             status_depth = depth;
           else
             status_depth = svn_depth_unknown; /* Use depth from WC */
@@ -505,13 +505,13 @@ svn_client_status5(svn_revnum_t *result_
   */
   if (SVN_DEPTH_IS_RECURSIVE(depth) && (! ignore_externals))
     {
-      apr_hash_t *externals_new;
-      SVN_ERR(svn_wc__externals_gather_definitions(&externals_new, NULL,
-                                                   ctx->wc_ctx, target_abspath,
-                                                   depth, pool, pool));
+      apr_hash_t *external_map;
+      SVN_ERR(svn_wc__externals_defined_below(&external_map,
+                                              ctx->wc_ctx, target_abspath,
+                                              pool, pool));
 
 
-      SVN_ERR(svn_client__do_external_status(ctx, externals_new,
+      SVN_ERR(svn_client__do_external_status(ctx, external_map,
                                              depth, get_all,
                                              update, no_ignore,
                                              status_func, status_baton, pool));

Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_client/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_client/update.c?rev=1338671&r1=1338670&r2=1338671&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_client/update.c (original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_client/update.c Tue May 15 12:39:14 2012
@@ -390,7 +390,9 @@ update_internal(svn_revnum_t *result_rev
      invalid revnum, that means RA will use the latest revision.  */
   SVN_ERR(svn_ra_do_update2(ra_session, &reporter, &report_baton,
                             revnum, target,
-                            depth_is_sticky ? depth : svn_depth_unknown,
+                            (!server_supports_depth || depth_is_sticky
+                             ? depth
+                             : svn_depth_unknown),
                             FALSE, update_editor, update_edit_baton, pool));
 
   /* Drive the reporter structure, describing the revisions within

Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_fs/fs-loader.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_fs/fs-loader.c?rev=1338671&r1=1338670&r2=1338671&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_fs/fs-loader.c (original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_fs/fs-loader.c Tue May 15 12:39:14 2012
@@ -235,14 +235,27 @@ svn_fs_type(const char **fs_type, const 
   apr_size_t len;
 
   /* Read the fsap-name file to get the FSAP name, or assume the (old)
-     default. */
+     default.  For old repositories I suppose we could check some
+     other file, DB_CONFIG or strings say, but for now just check the
+     directory exists. */
   filename = svn_dirent_join(path, FS_TYPE_FILENAME, pool);
   err = svn_io_file_open(&file, filename, APR_READ|APR_BUFFERED, 0, pool);
   if (err && APR_STATUS_IS_ENOENT(err->apr_err))
     {
-      svn_error_clear(err);
-      *fs_type = apr_pstrdup(pool, SVN_FS_TYPE_BDB);
-      return SVN_NO_ERROR;
+      svn_node_kind_t kind;
+      svn_error_t *err2 = svn_io_check_path(path, &kind, pool);
+      if (err2)
+        {
+          svn_error_clear(err2);
+          return err;
+        }
+      if (kind == svn_node_dir)
+        {
+          svn_error_clear(err);
+          *fs_type = SVN_FS_TYPE_BDB;
+          return SVN_NO_ERROR;
+        }
+      return err;
     }
   else if (err)
     return err;

Propchange: subversion/branches/1.7.x-issue4153/subversion/libsvn_fs_fs/temp_serializer.c
------------------------------------------------------------------------------
  Merged /subversion/branches/1.7.x-issue4169/subversion/libsvn_fs_fs/temp_serializer.c:r1330537-1336116
  Merged /subversion/branches/1.7.x/subversion/libsvn_fs_fs/temp_serializer.c:r1309894-1338666
  Merged /subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.c:r1164929
  Merged /subversion/branches/1.7.x-issue4087/subversion/libsvn_fs_fs/temp_serializer.c:r1243707-1336073

Propchange: subversion/branches/1.7.x-issue4153/subversion/libsvn_fs_fs/temp_serializer.h
------------------------------------------------------------------------------
  Merged /subversion/branches/1.7.x/subversion/libsvn_fs_fs/temp_serializer.h:r1309894-1338666
  Merged /subversion/branches/1.7.x-issue4169/subversion/libsvn_fs_fs/temp_serializer.h:r1330537-1336116
  Merged /subversion/branches/1.7.x-issue4087/subversion/libsvn_fs_fs/temp_serializer.h:r1243707-1336073
  Merged /subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.h:r1164929

Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_neon/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_neon/commit.c?rev=1338671&r1=1338670&r2=1338671&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_neon/commit.c (original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_neon/commit.c Tue May 15 12:39:14 2012
@@ -739,6 +739,7 @@ static svn_error_t * commit_open_root(vo
          transaction (and, optionally, a corresponding activity). */
       svn_ra_neon__request_t *req;
       const char *header_val;
+      svn_error_t *err;
 
       SVN_ERR(svn_ra_neon__request_create(&req, cc->ras, "POST",
                                           cc->ras->me_resource, dir_pool));
@@ -751,33 +752,39 @@ static svn_error_t * commit_open_root(vo
                             svn_uuid_generate(dir_pool));
 #endif
 
-      SVN_ERR(svn_ra_neon__request_dispatch(NULL, req, NULL, "( create-txn )",
-                                            201, 0, dir_pool));
-
-      /* Check the response headers for either the virtual transaction
-         details, or the real transaction details.  We need to have
-         one or the other of those!  */
-      if ((header_val = ne_get_response_header(req->ne_req,
-                                               SVN_DAV_VTXN_NAME_HEADER)))
-        {
-          cc->txn_url = svn_path_url_add_component2(cc->ras->vtxn_stub,
-                                                    header_val, cc->pool);
-          cc->txn_root_url
-            = svn_path_url_add_component2(cc->ras->vtxn_root_stub,
-                                          header_val, cc->pool);
-        }
-      else if ((header_val = ne_get_response_header(req->ne_req,
-                                                    SVN_DAV_TXN_NAME_HEADER)))
-        {
-          cc->txn_url = svn_path_url_add_component2(cc->ras->txn_stub,
-                                                    header_val, cc->pool);
-          cc->txn_root_url = svn_path_url_add_component2(cc->ras->txn_root_stub,
-                                                         header_val, cc->pool);
+      err = svn_ra_neon__request_dispatch(NULL, req, NULL, "( create-txn )",
+                                          201, 0, dir_pool);
+      if (!err)
+        {
+          /* Check the response headers for either the virtual transaction
+             details, or the real transaction details.  We need to have
+             one or the other of those!  */
+          if ((header_val = ne_get_response_header(req->ne_req,
+                                                   SVN_DAV_VTXN_NAME_HEADER)))
+            {
+              cc->txn_url = svn_path_url_add_component2(cc->ras->vtxn_stub,
+                                                        header_val, cc->pool);
+              cc->txn_root_url
+                = svn_path_url_add_component2(cc->ras->vtxn_root_stub,
+                                              header_val, cc->pool);
+            }
+          else if ((header_val
+                    = ne_get_response_header(req->ne_req,
+                                             SVN_DAV_TXN_NAME_HEADER)))
+            {
+              cc->txn_url = svn_path_url_add_component2(cc->ras->txn_stub,
+                                                        header_val, cc->pool);
+              cc->txn_root_url
+                = svn_path_url_add_component2(cc->ras->txn_root_stub,
+                                              header_val, cc->pool);
+            }
+          else
+            err = svn_error_createf(SVN_ERR_RA_DAV_REQUEST_FAILED, NULL,
+                                    _("POST request did not return transaction "
+                                      "information"));
         }
-      else
-        return svn_error_createf(SVN_ERR_RA_DAV_REQUEST_FAILED, NULL,
-                                 _("POST request did not return transaction "
-                                   "information"));
+      svn_ra_neon__request_destroy(req);
+      SVN_ERR(err);
 
       root->rsrc = NULL;
       root->txn_root_url = svn_path_url_add_component2(cc->txn_root_url,

Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_neon/fetch.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_neon/fetch.c?rev=1338671&r1=1338670&r2=1338671&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_neon/fetch.c (original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_neon/fetch.c Tue May 15 12:39:14 2012
@@ -1818,6 +1818,10 @@ start_element(int *elem, void *userdata,
                                    " element"));
       svn_stringbuf_set(rb->namestr, name);
 
+      att = svn_xml_get_attr_value("rev", atts);
+      if (att) /* Not available on older repositories! */
+        crev = SVN_STR_TO_REV(att);
+
       parent_dir = &TOP_DIR(rb);
 
       /* Pool use is a little non-standard here.  When lots of items in the
@@ -1832,8 +1836,8 @@ start_element(int *elem, void *userdata,
       svn_path_add_component(pathbuf, rb->namestr->data);
 
       SVN_ERR((*rb->editor->delete_entry)(pathbuf->data,
-                                          SVN_INVALID_REVNUM,
-                                          TOP_DIR(rb).baton,
+                                          crev,
+                                          parent_dir->baton,
                                           subpool));
       svn_pool_destroy(subpool);
       break;

Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_serf/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_serf/update.c?rev=1338671&r1=1338670&r2=1338671&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_serf/update.c (original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_serf/update.c Tue May 15 12:39:14 2012
@@ -1557,9 +1557,11 @@ start_report(svn_ra_serf__xml_parser_t *
            strcmp(name.name, "delete-entry") == 0)
     {
       const char *file_name;
+      const char *rev_str;
       report_info_t *info;
       apr_pool_t *tmppool;
       const char *full_path;
+      svn_revnum_t delete_rev = SVN_INVALID_REVNUM;
 
       file_name = svn_xml_get_attr_value("name", attrs);
 
@@ -1570,6 +1572,10 @@ start_report(svn_ra_serf__xml_parser_t *
             _("Missing name attr in delete-entry element"));
         }
 
+      rev_str = svn_xml_get_attr_value("rev", attrs);
+      if (rev_str) /* Not available on older repositories! */
+        delete_rev = SVN_STR_TO_REV(rev_str);
+
       info = parser->state->private;
 
       SVN_ERR(open_dir(info->dir));
@@ -1579,7 +1585,7 @@ start_report(svn_ra_serf__xml_parser_t *
       full_path = svn_relpath_join(info->dir->name, file_name, tmppool);
 
       SVN_ERR(info->dir->update_editor->delete_entry(full_path,
-                                                     SVN_INVALID_REVNUM,
+                                                     delete_rev,
                                                      info->dir->dir_baton,
                                                      tmppool));
 

Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_svn/client.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_svn/client.c?rev=1338671&r1=1338670&r2=1338671&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_svn/client.c (original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_ra_svn/client.c Tue May 15 12:39:14 2012
@@ -1152,7 +1152,18 @@ static svn_error_t *ra_svn_get_dir(svn_r
       dirent->size = size;/* FIXME: svn_filesize_t */
       dirent->has_props = has_props;
       dirent->created_rev = crev;
-      SVN_ERR(svn_time_from_cstring(&dirent->time, cdate, pool));
+      /* NOTE: the tuple's format string says CDATE may be NULL. But this
+         function does not allow that. The server has always sent us some
+         random date, however, so this just happens to work. But let's
+         be wary of servers that are (improperly) fixed to send NULL.
+
+         Note: they should NOT be "fixed" to send NULL, as that would break
+         any older clients which received that NULL. But we may as well
+         be defensive against a malicous server.  */
+      if (cdate == NULL)
+        dirent->time = 0;
+      else
+        SVN_ERR(svn_time_from_cstring(&dirent->time, cdate, pool));
       dirent->last_author = cauthor;
       apr_hash_set(*dirents, name, APR_HASH_KEY_STRING, dirent);
     }

Modified: subversion/branches/1.7.x-issue4153/subversion/libsvn_repos/repos.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4153/subversion/libsvn_repos/repos.c?rev=1338671&r1=1338670&r2=1338671&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4153/subversion/libsvn_repos/repos.c (original)
+++ subversion/branches/1.7.x-issue4153/subversion/libsvn_repos/repos.c Tue May 15 12:39:14 2012
@@ -1875,3 +1875,17 @@ svn_repos_remember_client_capabilities(s
   return SVN_NO_ERROR;
 }
 
+svn_error_t *
+svn_repos__fs_type(const char **fs_type,
+                   const char *repos_path,
+                   apr_pool_t *pool)
+{
+  svn_repos_t repos;
+  repos.path = (char*)repos_path;
+
+  SVN_ERR(check_repos_format(&repos, pool));
+
+  return svn_fs_type(fs_type,
+                     svn_dirent_join(repos_path, SVN_REPOS__DB_DIR, pool),
+                     pool);
+}

Propchange: subversion/branches/1.7.x-issue4153/subversion/libsvn_subr/adler32.c
------------------------------------------------------------------------------
  Merged /subversion/trunk/subversion/libsvn_subr/adler32.c:r1164929
  Merged /subversion/branches/1.7.x-issue4169/subversion/libsvn_subr/adler32.c:r1330537-1336116
  Merged /subversion/branches/1.7.x-issue4087/subversion/libsvn_subr/adler32.c:r1243707-1336073
  Merged /subversion/branches/1.7.x/subversion/libsvn_subr/adler32.c:r1309894-1338666

Propchange: subversion/branches/1.7.x-issue4153/subversion/libsvn_subr/hash.c
------------------------------------------------------------------------------
  Merged /subversion/trunk/subversion/libsvn_subr/hash.c:r1164929
  Merged /subversion/branches/1.7.x-issue4087/subversion/libsvn_subr/hash.c:r1243707-1336073
  Merged /subversion/branches/1.7.x/subversion/libsvn_subr/hash.c:r1309894-1338666
  Merged /subversion/branches/1.7.x-issue4169/subversion/libsvn_subr/hash.c:r1330537-1336116

Propchange: subversion/branches/1.7.x-issue4153/subversion/libsvn_subr/svn_base64.c
------------------------------------------------------------------------------
  Merged /subversion/branches/1.7.x-issue4087/subversion/libsvn_subr/svn_base64.c:r1243707-1336073
  Merged /subversion/trunk/subversion/libsvn_subr/svn_base64.c:r1164929
  Merged /subversion/branches/1.7.x/subversion/libsvn_subr/svn_base64.c:r1309894-1338666
  Merged /subversion/branches/1.7.x-issue4169/subversion/libsvn_subr/svn_base64.c:r1330537-1336116

Propchange: subversion/branches/1.7.x-issue4153/subversion/libsvn_subr/svn_temp_serializer.c
------------------------------------------------------------------------------
  Merged /subversion/branches/1.7.x-issue4169/subversion/libsvn_subr/svn_temp_serializer.c:r1330537-1336116
  Merged /subversion/trunk/subversion/libsvn_subr/svn_temp_serializer.c:r1164929
  Merged /subversion/branches/1.7.x/subversion/libsvn_subr/svn_temp_serializer.c:r1309894-1338666
  Merged /subversion/branches/1.7.x-issue4087/subversion/libsvn_subr/svn_temp_serializer.c:r1243707-1336073