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 2016/06/05 15:03:54 UTC

svn commit: r1746927 [1/8] - in /subversion/branches/authzperf: ./ build/ contrib/client-side/ contrib/client-side/svnmerge/ contrib/hook-scripts/ contrib/server-side/ contrib/server-side/fsfsfixer/fixer/ notes/directory-index/ notes/move-tracking/ sub...

Author: stefan2
Date: Sun Jun  5 15:03:52 2016
New Revision: 1746927

URL: http://svn.apache.org/viewvc?rev=1746927&view=rev
Log:
On the authzperf branch:
Sync with /trunk up to r1746926. No conflicts to resolve.

Added:
    subversion/branches/authzperf/subversion/libsvn_repos/compat.c
      - copied unchanged from r1746926, subversion/trunk/subversion/libsvn_repos/compat.c
Modified:
    subversion/branches/authzperf/   (props changed)
    subversion/branches/authzperf/CHANGES
    subversion/branches/authzperf/Makefile.in
    subversion/branches/authzperf/README
    subversion/branches/authzperf/build.conf
    subversion/branches/authzperf/build/run_tests.py
    subversion/branches/authzperf/configure.ac
    subversion/branches/authzperf/contrib/client-side/incremental-update.py
    subversion/branches/authzperf/contrib/client-side/svn-hgmerge.py
    subversion/branches/authzperf/contrib/client-side/svn-merge-vendor.py
    subversion/branches/authzperf/contrib/client-side/svn_apply_autoprops.py
    subversion/branches/authzperf/contrib/client-side/svn_export_empty_files.py
    subversion/branches/authzperf/contrib/client-side/svnmerge/svnmerge-migrate-history-remotely.py
    subversion/branches/authzperf/contrib/client-side/svnmerge/svnmerge-migrate-history.py
    subversion/branches/authzperf/contrib/client-side/svnmerge/svnmerge.py
    subversion/branches/authzperf/contrib/client-side/svnmerge/svnmerge_test.py
    subversion/branches/authzperf/contrib/hook-scripts/hook_toolbox.py
    subversion/branches/authzperf/contrib/hook-scripts/remove-zombie-locks.py
    subversion/branches/authzperf/contrib/server-side/add-needs-lock.py
    subversion/branches/authzperf/contrib/server-side/fsfsfixer/fixer/find_good_id.py
    subversion/branches/authzperf/contrib/server-side/fsfsfixer/fixer/fix-rev.py
    subversion/branches/authzperf/contrib/server-side/fsfsverify.py
    subversion/branches/authzperf/contrib/server-side/svn-tweak-author.py
    subversion/branches/authzperf/get-deps.sh
    subversion/branches/authzperf/notes/directory-index/dirindex.py
    subversion/branches/authzperf/notes/move-tracking/path_pairs_to_eid_map.py
    subversion/branches/authzperf/subversion/bindings/swig/python/tests/core.py
    subversion/branches/authzperf/subversion/bindings/swig/python/tests/repository.py
    subversion/branches/authzperf/subversion/include/private/svn_repos_private.h
    subversion/branches/authzperf/subversion/include/private/svn_sqlite.h
    subversion/branches/authzperf/subversion/include/svn_client.h
    subversion/branches/authzperf/subversion/include/svn_fs.h
    subversion/branches/authzperf/subversion/include/svn_repos.h
    subversion/branches/authzperf/subversion/libsvn_client/conflicts.c
    subversion/branches/authzperf/subversion/libsvn_client/copy.c
    subversion/branches/authzperf/subversion/libsvn_fs/fs-loader.c
    subversion/branches/authzperf/subversion/libsvn_fs_fs/cached_data.c
    subversion/branches/authzperf/subversion/libsvn_fs_fs/cached_data.h
    subversion/branches/authzperf/subversion/libsvn_fs_fs/caching.c
    subversion/branches/authzperf/subversion/libsvn_fs_fs/fs.h
    subversion/branches/authzperf/subversion/libsvn_fs_fs/low_level.c
    subversion/branches/authzperf/subversion/libsvn_fs_fs/low_level.h
    subversion/branches/authzperf/subversion/libsvn_fs_fs/rep-cache.c
    subversion/branches/authzperf/subversion/libsvn_fs_fs/stats.c
    subversion/branches/authzperf/subversion/libsvn_fs_fs/temp_serializer.c
    subversion/branches/authzperf/subversion/libsvn_fs_fs/temp_serializer.h
    subversion/branches/authzperf/subversion/libsvn_fs_fs/transaction.c
    subversion/branches/authzperf/subversion/libsvn_fs_fs/tree.c
    subversion/branches/authzperf/subversion/libsvn_fs_x/   (props changed)
    subversion/branches/authzperf/subversion/libsvn_fs_x/batch_fsync.c
    subversion/branches/authzperf/subversion/libsvn_fs_x/batch_fsync.h
    subversion/branches/authzperf/subversion/libsvn_fs_x/cached_data.c
    subversion/branches/authzperf/subversion/libsvn_fs_x/caching.c
    subversion/branches/authzperf/subversion/libsvn_fs_x/changes.c
    subversion/branches/authzperf/subversion/libsvn_fs_x/fs.c
    subversion/branches/authzperf/subversion/libsvn_fs_x/fs.h
    subversion/branches/authzperf/subversion/libsvn_fs_x/fs_x.c
    subversion/branches/authzperf/subversion/libsvn_fs_x/hotcopy.c
    subversion/branches/authzperf/subversion/libsvn_fs_x/index.c
    subversion/branches/authzperf/subversion/libsvn_fs_x/index.h
    subversion/branches/authzperf/subversion/libsvn_fs_x/lock.c
    subversion/branches/authzperf/subversion/libsvn_fs_x/low_level.c
    subversion/branches/authzperf/subversion/libsvn_fs_x/low_level.h
    subversion/branches/authzperf/subversion/libsvn_fs_x/pack.c
    subversion/branches/authzperf/subversion/libsvn_fs_x/rep-cache.c
    subversion/branches/authzperf/subversion/libsvn_fs_x/rep-cache.h
    subversion/branches/authzperf/subversion/libsvn_fs_x/rev_file.c
    subversion/branches/authzperf/subversion/libsvn_fs_x/revprops.c
    subversion/branches/authzperf/subversion/libsvn_fs_x/temp_serializer.c
    subversion/branches/authzperf/subversion/libsvn_fs_x/temp_serializer.h
    subversion/branches/authzperf/subversion/libsvn_fs_x/transaction.c
    subversion/branches/authzperf/subversion/libsvn_fs_x/transaction.h
    subversion/branches/authzperf/subversion/libsvn_fs_x/util.c
    subversion/branches/authzperf/subversion/libsvn_fs_x/util.h
    subversion/branches/authzperf/subversion/libsvn_ra_local/ra_plugin.c
    subversion/branches/authzperf/subversion/libsvn_repos/deprecated.c
    subversion/branches/authzperf/subversion/libsvn_repos/log.c
    subversion/branches/authzperf/subversion/libsvn_subr/sqlite.c
    subversion/branches/authzperf/subversion/libsvn_subr/win32_crashrpt.c
    subversion/branches/authzperf/subversion/svn/conflict-callbacks.c
    subversion/branches/authzperf/subversion/svnadmin/svnadmin.c
    subversion/branches/authzperf/subversion/tests/cmdline/authz_tests.py
    subversion/branches/authzperf/subversion/tests/cmdline/autoprop_tests.py
    subversion/branches/authzperf/subversion/tests/cmdline/basic_tests.py
    subversion/branches/authzperf/subversion/tests/cmdline/copy_tests.py
    subversion/branches/authzperf/subversion/tests/cmdline/export_tests.py
    subversion/branches/authzperf/subversion/tests/cmdline/externals_tests.py
    subversion/branches/authzperf/subversion/tests/cmdline/import_tests.py
    subversion/branches/authzperf/subversion/tests/cmdline/lock_tests.py
    subversion/branches/authzperf/subversion/tests/cmdline/log_tests.py
    subversion/branches/authzperf/subversion/tests/cmdline/merge_automatic_tests.py
    subversion/branches/authzperf/subversion/tests/cmdline/merge_tests.py
    subversion/branches/authzperf/subversion/tests/cmdline/mod_authz_svn_tests.py
    subversion/branches/authzperf/subversion/tests/cmdline/mod_dav_svn_tests.py
    subversion/branches/authzperf/subversion/tests/cmdline/move_tests.py
    subversion/branches/authzperf/subversion/tests/cmdline/patch_tests.py
    subversion/branches/authzperf/subversion/tests/cmdline/prop_tests.py
    subversion/branches/authzperf/subversion/tests/cmdline/revert_tests.py
    subversion/branches/authzperf/subversion/tests/cmdline/schedule_tests.py
    subversion/branches/authzperf/subversion/tests/cmdline/special_tests.py
    subversion/branches/authzperf/subversion/tests/cmdline/svnadmin_tests.py
    subversion/branches/authzperf/subversion/tests/cmdline/svnauthz_tests.py
    subversion/branches/authzperf/subversion/tests/cmdline/svndumpfilter_tests.py
    subversion/branches/authzperf/subversion/tests/cmdline/svnfsfs_tests.py
    subversion/branches/authzperf/subversion/tests/cmdline/svnlook_tests.py
    subversion/branches/authzperf/subversion/tests/cmdline/svnmover_tests.py
    subversion/branches/authzperf/subversion/tests/cmdline/svnmucc_tests.py
    subversion/branches/authzperf/subversion/tests/cmdline/svnrdump_tests.py
    subversion/branches/authzperf/subversion/tests/cmdline/svnsync_tests.py
    subversion/branches/authzperf/subversion/tests/cmdline/svntest/__init__.py
    subversion/branches/authzperf/subversion/tests/cmdline/svntest/actions.py
    subversion/branches/authzperf/subversion/tests/cmdline/svntest/deeptrees.py
    subversion/branches/authzperf/subversion/tests/cmdline/svntest/main.py
    subversion/branches/authzperf/subversion/tests/cmdline/svntest/mergetrees.py
    subversion/branches/authzperf/subversion/tests/cmdline/svntest/objects.py
    subversion/branches/authzperf/subversion/tests/cmdline/svntest/sandbox.py
    subversion/branches/authzperf/subversion/tests/cmdline/svntest/testcase.py
    subversion/branches/authzperf/subversion/tests/cmdline/svntest/tree.py
    subversion/branches/authzperf/subversion/tests/cmdline/svntest/verify.py
    subversion/branches/authzperf/subversion/tests/cmdline/svntest/wc.py
    subversion/branches/authzperf/subversion/tests/cmdline/trans_tests.py
    subversion/branches/authzperf/subversion/tests/cmdline/update_tests.py
    subversion/branches/authzperf/subversion/tests/cmdline/upgrade_tests.py
    subversion/branches/authzperf/subversion/tests/cmdline/wc_tests.py
    subversion/branches/authzperf/subversion/tests/libsvn_client/conflicts-test.c
    subversion/branches/authzperf/subversion/tests/libsvn_fs/fs-test.c
    subversion/branches/authzperf/subversion/tests/libsvn_fs_x/fs-x-pack-test.c
    subversion/branches/authzperf/subversion/tests/libsvn_subr/io-test.c
    subversion/branches/authzperf/subversion/tests/manual/tree-conflicts-add-vs-add.py
    subversion/branches/authzperf/tools/client-side/change-svn-wc-format.py
    subversion/branches/authzperf/tools/client-side/mergeinfo-sanitizer.py
    subversion/branches/authzperf/tools/client-side/svn-vendor.py
    subversion/branches/authzperf/tools/dev/benchmarks/RepoPerf/copy_repo.py
    subversion/branches/authzperf/tools/dev/benchmarks/RepoPerf/win_repo_bench.py
    subversion/branches/authzperf/tools/dev/benchmarks/suite1/benchmark.py
    subversion/branches/authzperf/tools/dev/build-svn-deps-win.pl
    subversion/branches/authzperf/tools/dev/contribulyze.py
    subversion/branches/authzperf/tools/dev/gen-javahl-errors.py
    subversion/branches/authzperf/tools/dev/gen-py-errors.py
    subversion/branches/authzperf/tools/dev/gen_junit_report.py
    subversion/branches/authzperf/tools/dev/graph-dav-servers.py
    subversion/branches/authzperf/tools/dev/histogram.py
    subversion/branches/authzperf/tools/dev/iz/ff2csv.py
    subversion/branches/authzperf/tools/dev/iz/find-fix.py
    subversion/branches/authzperf/tools/dev/merge-graph.py
    subversion/branches/authzperf/tools/dev/mergegraph/mergegraph.py
    subversion/branches/authzperf/tools/dev/mergegraph/save_as_sh.py
    subversion/branches/authzperf/tools/dev/sbox-ospath.py
    subversion/branches/authzperf/tools/dev/unix-build/Makefile.svn
    subversion/branches/authzperf/tools/dev/wc-format.py
    subversion/branches/authzperf/tools/dev/wc-ng/bump-to-19.py
    subversion/branches/authzperf/tools/dev/wc-ng/populate-pristine.py
    subversion/branches/authzperf/tools/dev/which-error.py
    subversion/branches/authzperf/tools/dist/collect_sigs.py
    subversion/branches/authzperf/tools/examples/get-location-segments.py
    subversion/branches/authzperf/tools/hook-scripts/svn2feed.py
    subversion/branches/authzperf/tools/hook-scripts/svnperms.py
    subversion/branches/authzperf/tools/po/l10n-report.py
    subversion/branches/authzperf/tools/server-side/fsfs-reshard.py
    subversion/branches/authzperf/tools/server-side/svn-backup-dumps.py
    subversion/branches/authzperf/tools/server-side/svn-populate-node-origins-index.c
    subversion/branches/authzperf/tools/server-side/svnpredumpfilter.py
    subversion/branches/authzperf/tools/server-side/svnpubsub/daemonize.py
    subversion/branches/authzperf/tools/server-side/svnpubsub/irkerbridge.py
    subversion/branches/authzperf/tools/server-side/svnpubsub/svntweet.py
    subversion/branches/authzperf/tools/server-side/svnpubsub/svnwcsub.py
    subversion/branches/authzperf/tools/server-side/test_svn_server_log_parse.py

Propchange: subversion/branches/authzperf/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sun Jun  5 15:03:52 2016
@@ -44,7 +44,7 @@ mkmf.log
 zlib
 sqlite-amalgamation
 serf
-gmock-fused
+googlemock
 .git
 .gitignore
 .idea

Propchange: subversion/branches/authzperf/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Jun  5 15:03:52 2016
@@ -95,4 +95,4 @@
 /subversion/branches/verify-at-commit:1462039-1462408
 /subversion/branches/verify-keep-going:1439280-1546110
 /subversion/branches/wc-collate-path:1402685-1480384
-/subversion/trunk:1613053-1741675
+/subversion/trunk:1613053-1746926

Modified: subversion/branches/authzperf/CHANGES
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/CHANGES?rev=1746927&r1=1746926&r2=1746927&view=diff
==============================================================================
--- subversion/branches/authzperf/CHANGES (original)
+++ subversion/branches/authzperf/CHANGES Sun Jun  5 15:03:52 2016
@@ -1641,7 +1641,7 @@ http://svn.apache.org/repos/asf/subversi
     * fix bug in mergeinfo recording during foreign-repos merge (r1430310)
     * fix spurious merge conflicts for binary files with keywords (issue #4221)
     * fix patching symlinks with 'svn patch' (issue #4273)
-    * make 'svn switch' refresh lock information (issue #3376)
+    * make 'svn switch' refresh lock information (issue #3378)
     * fix 'svn diff' output doesn't apply as patch without fuzz (issue #3362)
     * fix mergeinfo recording for multiple-revision-range merge (issue #4306)
     * fix diffs shown by 'show-diff' conflict prompt option (r1438879)

Modified: subversion/branches/authzperf/Makefile.in
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/Makefile.in?rev=1746927&r1=1746926&r2=1746927&view=diff
==============================================================================
--- subversion/branches/authzperf/Makefile.in (original)
+++ subversion/branches/authzperf/Makefile.in Sun Jun  5 15:03:52 2016
@@ -136,8 +136,9 @@ APACHE_INCLUDES = @APACHE_INCLUDES@
 APACHE_LIBEXECDIR = $(DESTDIR)@APACHE_LIBEXECDIR@
 APACHE_LDFLAGS = @APACHE_LDFLAGS@
 
-SVN_USE_GMOCK = @SVN_USE_GMOCK@
-GMOCK_INCLUDES = -I@GMOCK_SRCDIR@
+SVN_USE_GOOGLEMOCK = @SVN_USE_GOOGLEMOCK@
+GOOGLEMOCK_INCLUDES = -I@GOOGLEMOCK_SRCDIR@/googlemock/include -I@GOOGLEMOCK_SRCDIR@/googletest/include
+GOOGLEMOCK_LIB_INCLUDES = -I@GOOGLEMOCK_SRCDIR@/googlemock -I@GOOGLEMOCK_SRCDIR@/googletest $(GOOGLEMOCK_INCLUDES)
 
 SWIG = @SWIG@
 SWIG_PY_INCLUDES = @SWIG_PY_INCLUDES@ -I$(SWIG_SRC_DIR)/python/libsvn_swig_py
@@ -252,8 +253,8 @@ TEST_SHLIB_VAR_SWIG_RB=\
 
 # special compilation for files destined for cxxhl
 COMPILE_CXXHL_CXX = $(LT_COMPILE_CXX) $(CXXHL_INCLUDES) -o $@ -c
-COMPILE_GMOCK_CXX = $(LT_COMPILE_CXX_NOWARN) $(GMOCK_INCLUDES) -o $@ -c
-COMPILE_CXXHL_GMOCK_CXX = $(LT_COMPILE_CXX) $(CXXHL_INCLUDES) $(GMOCK_INCLUDES) -o $@ -c
+COMPILE_GOOGLEMOCK_CXX = $(LT_COMPILE_CXX_NOWARN) $(GOOGLEMOCK_LIB_INCLUDES) -o $@ -c
+COMPILE_CXXHL_GOOGLEMOCK_CXX = $(LT_COMPILE_CXX) $(CXXHL_INCLUDES) $(GOOGLEMOCK_INCLUDES) -o $@ -c
 
 LINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) $(LDFLAGS) -rpath $(libdir)
 LINK_LIB = $(LINK) $(LT_SO_VERSION)

Modified: subversion/branches/authzperf/README
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/README?rev=1746927&r1=1746926&r2=1746927&view=diff
==============================================================================
--- subversion/branches/authzperf/README (original)
+++ subversion/branches/authzperf/README Sun Jun  5 15:03:52 2016
@@ -36,10 +36,10 @@ II.   DOCUMENTATION
 
       It is written in DocBook XML, and the sources can be found at:
 
-         http://svnbook.googlecode.com/svn/trunk/
+         http://svn.code.sf.net/p/svnbook/source/trunk/
          
       If you wish to build the documentation from source, read the
-      src/en/README file within the book source.
+      en/README file within the book source.
 
 
 

Modified: subversion/branches/authzperf/build.conf
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/build.conf?rev=1746927&r1=1746926&r2=1746927&view=diff
==============================================================================
--- subversion/branches/authzperf/build.conf (original)
+++ subversion/branches/authzperf/build.conf Sun Jun  5 15:03:52 2016
@@ -742,30 +742,30 @@ link-cmd = $(LINK_CXX_LIB)
 
 [cxxhl-tests]
 description = Unit tests for Subversion C++ HighLevel bindings
-when = SVN_USE_GMOCK
+when = SVN_USE_GOOGLEMOCK
 type = exe
 path = subversion/bindings/cxxhl
-libs = libsvncxxhl libgmock libsvn_subr apr
+libs = libsvncxxhl libgooglemock libsvn_subr apr
 sources = tests/*.cpp
 install = tests
-compile-cmd = $(COMPILE_CXXHL_GMOCK_CXX)
+compile-cmd = $(COMPILE_CXXHL_GOOGLEMOCK_CXX)
 link-cmd = $(LINK_CXX)
 
 
 # ----------------------------------------------------------------------------
 #
-# Gmock targets
+# Googlemock targets
 #
 
-[libgmock]
+[libgooglemock]
 description = Googlemock Library
-when = SVN_USE_GMOCK
+when = SVN_USE_GOOGLEMOCK
 type = lib
-path = gmock-fused
-sources = gmock-gtest-all.cc
+path = googlemock
+sources = googletest/src/gtest-all.cc googlemock/src/gmock-all.cc
 install = tests
 msvc-static = yes
-compile-cmd = $(COMPILE_GMOCK_CXX)
+compile-cmd = $(COMPILE_GOOGLEMOCK_CXX)
 link-cmd = $(LINK_CXX_LIB)
 
 # ----------------------------------------------------------------------------

Modified: subversion/branches/authzperf/build/run_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/build/run_tests.py?rev=1746927&r1=1746926&r2=1746927&view=diff
==============================================================================
--- subversion/branches/authzperf/build/run_tests.py (original)
+++ subversion/branches/authzperf/build/run_tests.py Sun Jun  5 15:03:52 2016
@@ -45,10 +45,10 @@ and filename of a test program, optional
 separated list of test numbers; the default is to run all the tests in it.
 '''
 
-import os, sys, shutil
+import os, sys, shutil, codecs
 import re
 import logging
-import optparse, subprocess, imp, threading, traceback, exceptions
+import optparse, subprocess, imp, threading, traceback
 from datetime import datetime
 
 try:
@@ -58,6 +58,10 @@ except ImportError:
   # Python <3.0
   import Queue as queue
 
+if sys.version_info < (3, 0):
+  # Python >= 3.0 already has this build in
+  import exceptions
+
 # Ensure the compiled C tests use a known locale (Python tests set the locale
 # explicitly).
 os.environ['LC_ALL'] = 'C'
@@ -121,6 +125,12 @@ def _get_term_width():
       cr = (25, 80)
   return int(cr[1])
 
+def ensure_str(s):
+  '''If S is not a string already, convert it to a string'''
+  if isinstance(s, str):
+    return s
+  else:
+    return s.decode("latin-1")
 
 class TestHarness:
   '''Test harness for Subversion tests.
@@ -406,9 +416,9 @@ class TestHarness:
         job.execute(self.harness)
 
         if job.result:
-          os.write(sys.stdout.fileno(), '!' * job.test_count())
+          os.write(sys.stdout.fileno(), b'!' * job.test_count())
         else:
-          os.write(sys.stdout.fileno(), '.' * job.test_count())
+          os.write(sys.stdout.fileno(), b'.' * job.test_count())
 
 
   def _run_global_sheduler(self, testlist, has_py_tests):
@@ -472,7 +482,7 @@ class TestHarness:
     for t in threads:
       t.join()
 
-    print
+    print("")
 
     # Aggregate and log the results
     failed = 0
@@ -481,22 +491,22 @@ class TestHarness:
     for job in jobs:
       if last_test_name != job.progbase:
         if last_test_name != "":
-          log.write('ELAPSED: %s %s\n' % (last_test_name, str(taken)))
-          log.write('\n')
+          log.write('ELAPSED: %s %s\n\n' % (last_test_name, str(taken)))
         last_test_name = job.progbase
         taken = job.taken
       else:
         taken += job.taken
 
-      log.writelines(job.stderr_lines)
+      for line in job.stderr_lines:
+        log.write(ensure_str(line))
+
       for line in job.stdout_lines:
-        self._process_test_output_line(line)
+        self._process_test_output_line(ensure_str(line))
 
       self._check_for_unknown_failure(log, job.progbase, job.result)
       failed = job.result or failed
 
-    log.write('ELAPSED: %s %s\n' % (last_test_name, str(taken)))
-    log.write('\n')
+    log.write('ELAPSED: %s %s\n\n' % (last_test_name, str(taken)))
 
     return failed
 
@@ -565,12 +575,12 @@ class TestHarness:
     else:
       failed = self._run_global_sheduler(testlist, len(py_tests) > 0)
 
-    # Open the log in binary mode because it can contain binary data
-    # from diff_tests.py's testing of svnpatch. This may prevent
-    # readlines() from reading the whole log because it thinks it
-    # has encountered the EOF marker.
-    self._open_log('rb')
-    log_lines = self.log.readlines()
+    # Open the log again to for filtering.
+    if self.logfile:
+      self._open_log('r')
+      log_lines = self.log.readlines()
+    else:
+      log_lines = []
 
     # Remove \r characters introduced by opening the log as binary
     if sys.platform == 'win32':
@@ -674,7 +684,7 @@ class TestHarness:
     # Copy the truly interesting verbose logs to a separate file, for easier
     # viewing.
     if xpassed or failed_list:
-      faillog = open(self.faillogfile, 'wb')
+      faillog = codecs.open(self.faillogfile, 'w', encoding="latin-1")
       last_start_lineno = None
       last_start_re = re.compile('^(FAIL|SKIP|XFAIL|PASS|START|CLEANUP|END):')
       for lineno, line in enumerate(log_lines):
@@ -688,7 +698,7 @@ class TestHarness:
         if last_start_re.match(line):
           last_start_lineno = lineno + 1
       faillog.close()
-    elif os.path.exists(self.faillogfile):
+    elif self.faillogfile and os.path.exists(self.faillogfile):
       print("WARNING: no failures, but '%s' exists from a previous run."
             % self.faillogfile)
 
@@ -705,7 +715,7 @@ class TestHarness:
     'Open the log file with the required MODE.'
     if self.logfile:
       self._close_log()
-      self.log = open(self.logfile, mode)
+      self.log = codecs.open(self.logfile, mode, encoding="latin-1")
 
   def _close_log(self):
     'Close the log file.'
@@ -744,7 +754,7 @@ class TestHarness:
   def _run_c_test(self, progabs, progdir, progbase, test_nums, dot_count):
     'Run a c test, escaping parameters as required.'
     if self.opts.list_tests and self.opts.milestone_filter:
-      print 'WARNING: --milestone-filter option does not currently work with C tests'
+      print('WARNING: --milestone-filter option does not currently work with C tests')
 
     if not os.access(progbase, os.X_OK):
       print("\nNot an executable file: " + progbase)
@@ -768,11 +778,11 @@ class TestHarness:
     def progress_func(completed):
       if not self.log or self.dots_written >= dot_count:
         return
-      dots = (completed * dot_count) / total
+      dots = (completed * dot_count) // total
       if dots > dot_count:
         dots = dot_count
       dots_to_write = dots - self.dots_written
-      os.write(sys.stdout.fileno(), '.' * dots_to_write)
+      os.write(sys.stdout.fileno(), b'.' * dots_to_write)
       self.dots_written = dots
 
     tests_completed = 0
@@ -780,6 +790,7 @@ class TestHarness:
                             stderr=self.log)
     line = prog.stdout.readline()
     while line:
+      line = ensure_str(line)
       if self._process_test_output_line(line):
         tests_completed += 1
         progress_func(tests_completed)
@@ -788,7 +799,7 @@ class TestHarness:
 
     # If we didn't run any tests, still print out the dots
     if not tests_completed:
-      os.write(sys.stdout.fileno(), '.' * dot_count)
+      os.write(sys.stdout.fileno(), b'.' * dot_count)
 
     prog.wait()
     return prog.returncode
@@ -796,8 +807,13 @@ class TestHarness:
   def _run_py_test(self, progabs, progdir, progbase, test_nums, dot_count):
     'Run a python test, passing parameters as needed.'
     try:
-      prog_mod = imp.load_module(progbase[:-3], open(progabs, 'r'), progabs,
-                                 ('.py', 'U', imp.PY_SOURCE))
+      if sys.version_info < (3, 0):
+        prog_mod = imp.load_module(progbase[:-3], open(progabs, 'r'), progabs,
+                                   ('.py', 'U', imp.PY_SOURCE))
+      else:
+        prog_mod = imp.load_module(progbase[:-3],
+                                   open(progabs, 'r', encoding="utf-8"),
+                                   progabs, ('.py', 'U', imp.PY_SOURCE))
     except:
       print("\nError loading test (details in following traceback): " + progbase)
       traceback.print_exc()
@@ -821,14 +837,14 @@ class TestHarness:
          in parallel mode."""
       if not self.log:
         return
-      dots = (completed * dot_count) / total
+      dots = (completed * dot_count) // total
       if dots > dot_count:
         dots = dot_count
       self.progress_lock.acquire()
       if self.dots_written < dot_count:
         dots_to_write = dots - self.dots_written
         self.dots_written = dots
-        os.write(old_stdout, '.' * dots_to_write)
+        os.write(old_stdout, b'.' * dots_to_write)
       self.progress_lock.release()
 
     serial_only = hasattr(prog_mod, 'serial_only') and prog_mod.serial_only
@@ -847,7 +863,7 @@ class TestHarness:
                                           test_selection=test_nums)
     except svntest.Failure:
       if self.log:
-        os.write(old_stdout, '.' * dot_count)
+        os.write(old_stdout, b'.' * dot_count)
       failed = True
 
     # restore some values
@@ -925,7 +941,7 @@ class TestHarness:
     # we printed a "Running all tests in ..." line, add the test result.
     if self.log:
       if self.opts.list_tests:
-        print ''
+        print()
       else:
         if failed:
           print(TextColors.FAILURE + 'FAILURE' + TextColors.ENDC)

Modified: subversion/branches/authzperf/configure.ac
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/configure.ac?rev=1746927&r1=1746926&r2=1746927&view=diff
==============================================================================
--- subversion/branches/authzperf/configure.ac (original)
+++ subversion/branches/authzperf/configure.ac Sun Jun  5 15:03:52 2016
@@ -632,27 +632,27 @@ AC_SUBST(SVN_GNOME_KEYRING_INCLUDES)
 AC_SUBST(SVN_GNOME_KEYRING_LIBS)
 
 dnl Googlemock -----------------
-AC_ARG_ENABLE([gmock],
-  AS_HELP_STRING([--disable-gmock],
+AC_ARG_ENABLE([googlemock],
+  AS_HELP_STRING([--disable-googlemock],
                  [Do not use the Googlemock testing framework]),
   [],
-  [enable_gmock=yes])
+  [enable_googlemock=yes])
 
-AC_SUBST([GMOCK_SRCDIR], [$abs_srcdir/gmock-fused])
+AC_SUBST([GOOGLEMOCK_SRCDIR], [$abs_srcdir/googlemock])
 AC_MSG_CHECKING([whether use Googlemock])
-if test "$enable_gmock" != "no"; then
-  if test -d "$GMOCK_SRCDIR"; then
+if test "$enable_googlemock" != "no"; then
+  if test -d "$GOOGLEMOCK_SRCDIR"; then
     AC_MSG_RESULT([yes])
-    SVN_USE_GMOCK=true
+    SVN_USE_GOOGLEMOCK=true
   else
     AC_MSG_RESULT([no])
-    SVN_USE_GMOCK=false
+    SVN_USE_GOOGLEMOCK=false
   fi
 else
   AC_MSG_RESULT([no])
-  SVN_USE_GMOCK_SOURCES=false
+  SVN_USE_GOOGLEMOCK=false
 fi
-AC_SUBST([SVN_USE_GMOCK])
+AC_SUBST([SVN_USE_GOOGLEMOCK])
 
 dnl Ev2 experimental features ----------------------
 dnl Note: The Ev2 implementations will be built unconditionally, but by

Modified: subversion/branches/authzperf/contrib/client-side/incremental-update.py
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/contrib/client-side/incremental-update.py?rev=1746927&r1=1746926&r2=1746927&view=diff
==============================================================================
--- subversion/branches/authzperf/contrib/client-side/incremental-update.py (original)
+++ subversion/branches/authzperf/contrib/client-side/incremental-update.py Sun Jun  5 15:03:52 2016
@@ -156,24 +156,24 @@ def main():
         usage_and_exit(None)
     path = sys.argv[-1]
     args = ' '.join(sys.argv[1:-1] + ['--non-interactive'])
-    print "Fetch HEAD revision...",
+    sys.stdout.write("Fetch HEAD revision... ")
     head_revision = get_head_revision(path, args)
-    print "done."
-    print "Updating to revision %d" % (head_revision)
-    print "Harvesting the list of subdirectories...",
+    print("done.")
+    print("Updating to revision %d" % (head_revision))
+    sys.stdout.write("Harvesting the list of subdirectories... ")
     dirs = harvest_dirs(path)
-    print "done."
+    print("done.")
     dirs.sort(compare_paths)
     dirs.reverse()
-    print "Update the tree, one subdirectory at a time.  This could take " \
-          "a while."
+    print("Update the tree, one subdirectory at a time.  This could take " \
+          "a while.")
     num_dirs = len(dirs)
     width = len(str(num_dirs))
     format_string = '[%%%dd/%%%dd] Updating %%s' % (width, width)
     current = 0
     for dir in dirs:
         current = current + 1
-        print format_string % (current, num_dirs, dir)
+        print(format_string % (current, num_dirs, dir))
         os.system('%s update --quiet --revision %d %s %s'
                   % (SVN_BINARY, head_revision, args, dir))
 
@@ -183,6 +183,6 @@ if __name__ == "__main__":
         main()
     except SystemExit:
         raise
-    except Exception, e:
+    except Exception as e:
         print_error(str(e))
         sys.exit(1)

Modified: subversion/branches/authzperf/contrib/client-side/svn-hgmerge.py
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/contrib/client-side/svn-hgmerge.py?rev=1746927&r1=1746926&r2=1746927&view=diff
==============================================================================
--- subversion/branches/authzperf/contrib/client-side/svn-hgmerge.py (original)
+++ subversion/branches/authzperf/contrib/client-side/svn-hgmerge.py Sun Jun  5 15:03:52 2016
@@ -38,7 +38,7 @@ def do_hgmerge(base, repo, local, merged
   shutil.copyfile(local, temp_file)
   args = [HGMERGE_BINARY, temp_file, base, repo]
   status = os.spawnvp(os.P_WAIT, HGMERGE_BINARY, args)
-  print status
+  print(status)
   if status == 0:
     os.unlink(merged)
     shutil.copyfile(temp_file, merged)

Modified: subversion/branches/authzperf/contrib/client-side/svn-merge-vendor.py
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/contrib/client-side/svn-merge-vendor.py?rev=1746927&r1=1746926&r2=1746927&view=diff
==============================================================================
--- subversion/branches/authzperf/contrib/client-side/svn-merge-vendor.py (original)
+++ subversion/branches/authzperf/contrib/client-side/svn-merge-vendor.py Sun Jun  5 15:03:52 2016
@@ -72,7 +72,7 @@ def del_temp_tree(tmpdir):
     try:
         shutil.rmtree(tmpdir)
     except OSError:
-        print logger.warn("Couldn't delete tmpdir %s. Don't forget to remove it manually." % (tmpdir))
+        print(logger.warn("Couldn't delete tmpdir %s. Don't forget to remove it manually." % (tmpdir)))
 
 
 def checkout(url, revision=None):
@@ -282,7 +282,7 @@ def fine_tune(wc_dir):
 def alert(messages):
     """Wait the user to <ENTER> or abort the program"""
     for message in messages:
-        print >> sys.stderr, message
+        sys.stderr.write(message + "\n")
     try:
         return sys.stdin.readline()
     except KeyboardInterrupt:
@@ -336,7 +336,7 @@ def get_xml_text_content(xml_doc, xpath)
 
 def usage(error = None):
     """Print usage message and exit"""
-    print >>sys.stderr, """%s: Merges the difference between two revisions of the original repository of the vendor, to the vendor branch
+    sys.stderr.write("""%s: Merges the difference between two revisions of the original repository of the vendor, to the vendor branch
 usage: %s [options] REPO_URL CURRENT_PATH ORIGINAL_REPO_URL -r N:M
 
   - REPO_URL : repository URL for the vendor branch (i.e: http://svn.example.com/repos/vendor/libcomplex)
@@ -369,10 +369,10 @@ Valid options:
   -v [--verbose]           : verbose mode
   -c [--merged-vendor] arg : working copy path of the original already merged vendor trunk (skips the steps 1. and 2.)
   -w [--current-wc] arg    : working copy path of the current checked out trunk of the vendor branch (skips the step 3.)
-    """ % ((prog_name,) * 2)
+    """ % ((prog_name,) * 2))
 
     if error:
-        print >>sys.stder, "", "Current error : "+error
+        sys.stder.write("\nCurrent error : " + error + "\n")
 
     sys.exit(1)
 

Modified: subversion/branches/authzperf/contrib/client-side/svn_apply_autoprops.py
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/contrib/client-side/svn_apply_autoprops.py?rev=1746927&r1=1746926&r2=1746927&view=diff
==============================================================================
--- subversion/branches/authzperf/contrib/client-side/svn_apply_autoprops.py (original)
+++ subversion/branches/authzperf/contrib/client-side/svn_apply_autoprops.py Sun Jun  5 15:03:52 2016
@@ -152,7 +152,7 @@ def filter_walk(autoprop_lines, dirname,
 def main():
   try:
     opts, args = getopt.getopt(sys.argv[1:], 'h', ['help', 'config='])
-  except getopt.GetoptError, e:
+  except getopt.GetoptError as e:
     usage()
     return 1
 

Modified: subversion/branches/authzperf/contrib/client-side/svn_export_empty_files.py
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/contrib/client-side/svn_export_empty_files.py?rev=1746927&r1=1746926&r2=1746927&view=diff
==============================================================================
--- subversion/branches/authzperf/contrib/client-side/svn_export_empty_files.py (original)
+++ subversion/branches/authzperf/contrib/client-side/svn_export_empty_files.py Sun Jun  5 15:03:52 2016
@@ -71,7 +71,7 @@ def check_url_for_export(ctx, url, revis
     # is something wrong with the given URL.
     try:
         if ctx.verbose:
-            print "Trying to list '%s'" % url
+            print("Trying to list '%s'" % url)
         svn.client.ls(url, revision, 0, client_ctx)
 
         # Given a URL, the ls command does not tell you if
@@ -82,7 +82,7 @@ def check_url_for_export(ctx, url, revis
         try:
             last_slash_index = url.rindex('/')
         except ValueError:
-            print "Cannot find a / in the URL '%s'" % url
+            print("Cannot find a / in the URL '%s'" % url)
             return False
 
         parent_url = url[:last_slash_index]
@@ -90,31 +90,31 @@ def check_url_for_export(ctx, url, revis
 
         try:
             if ctx.verbose:
-                print "Trying to list '%s'" % parent_url
+                print("Trying to list '%s'" % parent_url)
             remote_ls = svn.client.ls(parent_url,
                                       revision,
                                       0,
                                       client_ctx)
         except svn.core.SubversionException:
             if ctx.verbose:
-                print "Listing of '%s' failed, assuming URL is top of repos" \
-                      % parent_url
+                print("Listing of '%s' failed, assuming URL is top of repos" \
+                      % parent_url)
             return True
 
         try:
             path_info = remote_ls[path_name]
         except ValueError:
-            print "Able to ls '%s' but '%s' not in ls of '%s'" \
-                  % (url, path_name, parent_url)
+            print("Able to ls '%s' but '%s' not in ls of '%s'" \
+                  % (url, path_name, parent_url))
             return False
 
         if svn.core.svn_node_dir != path_info.kind:
             if ctx.verbose:
-                print "The URL '%s' is not a directory" % url
+                print("The URL '%s' is not a directory" % url)
             return False
         else:
             if ctx.verbose:
-                print "The URL '%s' is a directory" % url
+                print("The URL '%s' is a directory" % url)
             return True
     finally:
         pass
@@ -154,16 +154,16 @@ def synchronize_dir(ctx, url, dir_name,
         msg = ("'%s' which is a local non-directory but remotely a " +
                "directory") % dir_name
         if ctx.delete_local_paths:
-            print "Removing", msg
+            print("Removing", msg)
             os.unlink(dir_name)
             local_path_kind = LOCAL_PATH_NONE
         else:
-            print "Need to remove", msg
+            print("Need to remove", msg)
             ctx.delete_needed = True
             return False
 
     if LOCAL_PATH_NONE == local_path_kind:
-        print "Creating directory '%s'" % dir_name
+        print("Creating directory '%s'" % dir_name)
         os.mkdir(dir_name)
 
     remote_ls = svn.client.ls(url,
@@ -172,7 +172,7 @@ def synchronize_dir(ctx, url, dir_name,
                               client_ctx)
 
     if ctx.verbose:
-        print "Syncing '%s' to '%s'" % (url, dir_name)
+        print("Syncing '%s' to '%s'" % (url, dir_name))
 
     remote_pathnames = remote_ls.keys()
     remote_pathnames.sort()
@@ -191,7 +191,7 @@ def synchronize_dir(ctx, url, dir_name,
 
         if remote_pathname in ctx.ignore_names or \
                full_remote_pathname in ctx.ignore_paths:
-            print "Skipping '%s'" % full_remote_pathname
+            print("Skipping '%s'" % full_remote_pathname)
             continue
 
         # Get the remote path kind.
@@ -221,16 +221,16 @@ def synchronize_dir(ctx, url, dir_name,
                 msg = ("'%s' which is a local directory but remotely a " +
                        "non-directory") % full_remote_pathname
                 if ctx.delete_local_paths:
-                    print "Removing", msg
+                    print("Removing", msg)
                     recursive_delete(full_remote_pathname)
                     local_path_kind = LOCAL_PATH_NONE
                 else:
-                    print "Need to remove", msg
+                    print("Need to remove", msg)
                     ctx.delete_needed = True
                     continue
 
             if LOCAL_PATH_NONE == local_path_kind:
-                print "Creating file '%s'" % full_remote_pathname
+                print("Creating file '%s'" % full_remote_pathname)
                 f = file(full_remote_pathname, 'w')
                 f.close()
 
@@ -240,17 +240,17 @@ def synchronize_dir(ctx, url, dir_name,
         full_local_pathname = os.path.join(dir_name, local_pathname)
         if os.path.isdir(full_local_pathname):
             if ctx.delete_local_paths:
-                print "Removing directory '%s'" % full_local_pathname
+                print("Removing directory '%s'" % full_local_pathname)
                 recursive_delete(full_local_pathname)
             else:
-                print "Need to remove directory '%s'" % full_local_pathname
+                print("Need to remove directory '%s'" % full_local_pathname)
                 ctx.delete_needed = True
         else:
             if ctx.delete_local_paths:
-                print "Removing file '%s'" % full_local_pathname
+                print("Removing file '%s'" % full_local_pathname)
                 os.unlink(full_local_pathname)
             else:
-                print "Need to remove file '%s'" % full_local_pathname
+                print("Need to remove file '%s'" % full_local_pathname)
                 ctx.delete_needed = True
 
     return status
@@ -293,14 +293,14 @@ def main(ctx, url, export_pathname):
                              client_ctx)
 
     if ctx.delete_needed:
-        print "There are files and directories in the local filesystem"
-        print "that do not exist in the Subversion repository that were"
-        print "not deleted.  ",
+        print("There are files and directories in the local filesystem")
+        print("that do not exist in the Subversion repository that were")
+        sys.stdout.write("not deleted.   ")
         if ctx.delete_needed:
-            print "Please pass the --delete command line option"
-            print "to have this script delete those files and directories."
+            print("Please pass the --delete command line option")
+            print("to have this script delete those files and directories.")
         else:
-            print ""
+            print("")
 
     if status:
         return 0
@@ -334,9 +334,10 @@ what you are looking for.  This script w
 non-working working copy that can be crawled with find or find's
 locate utility to make it easier to find files."""
 
-    print >>sys.stderr, message1 % sys.argv[0]
+    sys.stderr.write(message1 % sys.argv[0])
+    sys.stderr.write("\n")
     if verbose_usage:
-        print >>sys.stderr, message2
+        sys.stderr.write(message2 + "\n")
     sys.exit(1)
 
 if __name__ == '__main__':
@@ -363,7 +364,7 @@ if __name__ == '__main__':
     except getopt.GetoptError:
         usage(False)
     if len(args) < 1 or len(args) > 2:
-        print >>sys.stderr, "Incorrect number of arguments"
+        sys.stderr.write("Incorrect number of arguments\n")
         usage(False)
 
     for o, a in opts:
@@ -397,7 +398,7 @@ if __name__ == '__main__':
         try:
             last_slash_index = url.rindex('/')
         except ValueError:
-            print >>sys.stderr, "Cannot find a / in the URL '%s'" % url
+            sys.stderr.write("Cannot find a / in the URL '%s'\n" % url)
             usage(False)
         export_pathname = url[last_slash_index+1:]
 

Modified: subversion/branches/authzperf/contrib/client-side/svnmerge/svnmerge-migrate-history-remotely.py
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/contrib/client-side/svnmerge/svnmerge-migrate-history-remotely.py?rev=1746927&r1=1746926&r2=1746927&view=diff
==============================================================================
--- subversion/branches/authzperf/contrib/client-side/svnmerge/svnmerge-migrate-history-remotely.py (original)
+++ subversion/branches/authzperf/contrib/client-side/svnmerge/svnmerge-migrate-history-remotely.py Sun Jun  5 15:03:52 2016
@@ -366,7 +366,7 @@ class SvnmergeHistoryMigrator:
                             sys.stdout.write("   new sanitized chunk:\n")
                             pretty_print_mergeinfo(history, 6)
                         new_mergeinfo = mergeinfo_merge(new_mergeinfo, history)
-                    except core.SubversionException, e:
+                    except core.SubversionException as e:
                         if not (e.apr_err == core.SVN_ERR_FS_NOT_FOUND
                                 or e.apr_err == core.SVN_ERR_FS_NO_SUCH_REVISION):
                             raise

Modified: subversion/branches/authzperf/contrib/client-side/svnmerge/svnmerge-migrate-history.py
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/contrib/client-side/svnmerge/svnmerge-migrate-history.py?rev=1746927&r1=1746926&r2=1746927&view=diff
==============================================================================
--- subversion/branches/authzperf/contrib/client-side/svnmerge/svnmerge-migrate-history.py (original)
+++ subversion/branches/authzperf/contrib/client-side/svnmerge/svnmerge-migrate-history.py Sun Jun  5 15:03:52 2016
@@ -39,12 +39,12 @@ try:
   import svn.core
   import svn.fs
   import svn.repos
-except ImportError, e:
-  print >> sys.stderr, \
+except ImportError as e:
+  sys.stderr.write(\
         "ERROR: Unable to import Subversion's Python bindings: '%s'\n" \
         "Hint: Set your PYTHONPATH environment variable, or adjust your " \
         "PYTHONSTARTUP\nfile to point to your Subversion install " \
-        "location's svn-python directory." % e
+        "location's svn-python directory.\n" % e)
   sys.exit(1)
 
 # Convenience shortcut.
@@ -67,8 +67,8 @@ def usage_and_exit(error_msg=None):
 
   stream = error_msg and sys.stderr or sys.stdout
   if error_msg:
-    print >> stream, "ERROR: %s\n" % error_msg
-  print >> stream, """Usage: %s REPOS_PATH [PATH_PREFIX...] [OPTIONS]
+    stream.write("ERROR: %s\n\n" % error_msg)
+  stream.write("""Usage: %s REPOS_PATH [PATH_PREFIX...] [OPTIONS]
        %s --help
 
 Migrate merge history from svnmerge.py's format to Subversion 1.5's
@@ -88,7 +88,7 @@ Options:
 Example:
 
    %s /path/to/repos trunk branches tags
-""" % (progname, progname, progname)
+""" % (progname, progname, progname))
   sys.exit(error_msg and 1 or 0)
 
 class Migrator:
@@ -105,7 +105,7 @@ class Migrator:
   def log(self, message, only_when_verbose=True):
     if only_when_verbose and not self.verbose:
       return
-    print message
+    print(message)
 
   def run(self):
     self.repos = svn.repos.open(self.repos_path)
@@ -230,7 +230,7 @@ class Migrator:
             filtered_mergeinfo = \
                 svn.core.svn_mergeinfo_merge(filtered_mergeinfo,
                                              source_history)
-          except svn.core.SubversionException, e:
+          except svn.core.SubversionException as e:
             if not (e.apr_err == svn.core.SVN_ERR_FS_NOT_FOUND
                     or e.apr_err == svn.core.SVN_ERR_FS_NO_SUCH_REVISION):
               raise

Modified: subversion/branches/authzperf/contrib/client-side/svnmerge/svnmerge.py
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/contrib/client-side/svnmerge/svnmerge.py?rev=1746927&r1=1746926&r2=1746927&view=diff
==============================================================================
--- subversion/branches/authzperf/contrib/client-side/svnmerge/svnmerge.py (original)
+++ subversion/branches/authzperf/contrib/client-side/svnmerge/svnmerge.py Sun Jun  5 15:03:52 2016
@@ -206,13 +206,13 @@ def console_width():
 
 def error(s):
     """Subroutine to output an error and bail."""
-    print >> sys.stderr, "%s: %s" % (NAME, s)
+    sys.stderr.write("%s: %s\n" % (NAME, s))
     sys.exit(1)
 
 def report(s):
     """Subroutine to output progress message, unless in quiet mode."""
     if opts["verbose"]:
-        print "%s: %s" % (NAME, s)
+        print("%s: %s" % (NAME, s))
 
 def prefix_lines(prefix, lines):
     """Given a string representing one or more lines of text, insert the
@@ -263,7 +263,7 @@ try:
             stdoutAndErr = p.communicate()
             stdout = stdoutAndErr[0]
             stderr = stdoutAndErr[1]
-        except OSError, inst:
+        except OSError as inst:
             # Using 1 as failure code; should get actual number somehow? For
             # examples see svnmerge_test.py's TestCase_launch.test_failure and
             # TestCase_launch.test_failurecode.
@@ -319,7 +319,7 @@ def launchsvn(s, show=False, pretend=Fal
     cmd = ' '.join(filter(None, [opts["svn"], "--non-interactive",
                                  username, password, configdir, s]))
     if show or opts["verbose"] >= 2:
-        print cmd
+        print(cmd)
     if pretend:
         return None
     return launch(cmd, **kwargs)
@@ -330,7 +330,7 @@ def svn_command(s):
                     pretend=opts["dry-run"],
                     split_lines=False)
     if not opts["dry-run"]:
-        print out
+        print(out)
 
 def check_dir_clean(dir):
     """Check the current status of dir for local mods."""
@@ -1298,7 +1298,7 @@ def display_revisions(revs, display_styl
     if display_style == "revisions":
         if revs:
             report(revisions_msg)
-            print revs
+            print(revs)
     elif display_style == "logs":
         for start,end in revs.normalized():
             svn_command('log --incremental -v -r %d:%d %s' % \
@@ -1312,10 +1312,10 @@ def display_revisions(revs, display_styl
         for start, end in revs.normalized():
             print
             if start == end:
-                print "%s: changes in revision %d follow" % (NAME, start)
+                print("%s: changes in revision %d follow" % (NAME, start))
             else:
-                print "%s: changes in revisions %d-%d follow" % (NAME,
-                                                                 start, end)
+                print("%s: changes in revisions %d-%d follow" % (NAME,
+                                                                 start, end))
             print
 
             # Note: the starting revision number to 'svn diff' is
@@ -1412,9 +1412,9 @@ def action_init(target_dir, target_props
     # Write out commit message if desired
     if opts["commit-file"]:
         f = open(opts["commit-file"], "w")
-        print >>f, 'Initialized merge tracking via "%s" with revisions "%s" from ' \
-            % (NAME, revs)
-        print >>f, '%s' % source_url
+        f.write('Initialized merge tracking via "%s" with revisions "%s" from \n' \
+            % (NAME, revs))
+        f.write('%s\n' % source_url)
         f.close()
         report('wrote commit message to "%s"' % opts["commit-file"])
 
@@ -1555,15 +1555,15 @@ def action_merge(branch_dir, branch_prop
     if opts["commit-file"]:
         f = open(opts["commit-file"], "w")
         if record_only:
-            print >>f, 'Recorded merge of revisions %s via %s from ' % \
-                  (revs, NAME)
+            f.write('Recorded merge of revisions %s via %s from \n' % \
+                    (revs, NAME))
         else:
-            print >>f, 'Merged revisions %s via %s from ' % \
-                  (revs, NAME)
-        print >>f, '%s' % opts["source-url"]
+            f.write('Merged revisions %s via %s from \n' % \
+                    (revs, NAME))
+        f.write('%s\n' % opts["source-url"])
         if opts["commit-verbose"]:
-            print >>f
-            print >>f, construct_merged_log_message(opts["source-url"], revs),
+            f.write("\n")
+            f.write(construct_merged_log_message(opts["source-url"], revs))
 
         f.close()
         report('wrote commit message to "%s"' % opts["commit-file"])
@@ -1592,11 +1592,11 @@ def action_block(branch_dir, branch_prop
     # Write out commit message if desired
     if opts["commit-file"]:
         f = open(opts["commit-file"], "w")
-        print >>f, 'Blocked revisions %s via %s' % (revs_to_block, NAME)
+        f.write('Blocked revisions %s via %s\n' % (revs_to_block, NAME))
         if opts["commit-verbose"]:
-            print >>f
-            print >>f, construct_merged_log_message(opts["source-url"],
-                                                    revs_to_block),
+            f.write("\n")
+            f.write(construct_merged_log_message(opts["source-url"],
+                                                 revs_to_block))
 
         f.close()
         report('wrote commit message to "%s"' % opts["commit-file"])
@@ -1623,11 +1623,11 @@ def action_unblock(branch_dir, branch_pr
     # Write out commit message if desired
     if opts["commit-file"]:
         f = open(opts["commit-file"], "w")
-        print >>f, 'Unblocked revisions %s via %s' % (revs_to_unblock, NAME)
+        f.write('Unblocked revisions %s via %s\n' % (revs_to_unblock, NAME))
         if opts["commit-verbose"]:
-            print >>f
-            print >>f, construct_merged_log_message(opts["source-url"],
-                                                    revs_to_unblock),
+            f.write("\n")
+            f.write(construct_merged_log_message(opts["source-url"],
+                                                 revs_to_unblock))
         f.close()
         report('wrote commit message to "%s"' % opts["commit-file"])
 
@@ -1694,12 +1694,12 @@ def action_rollback(branch_dir, branch_p
     if opts["commit-file"]:
         f = open(opts["commit-file"], "w")
         if record_only:
-            print >>f, 'Recorded rollback of revisions %s via %s from ' % \
-                  (revs , NAME)
+            f.write('Recorded rollback of revisions %s via %s from \n' % \
+                    (revs , NAME))
         else:
-            print >>f, 'Rolled back revisions %s via %s from ' % \
-                  (revs , NAME)
-        print >>f, '%s' % opts["source-url"]
+            f.write('Rolled back revisions %s via %s from \n' % \
+                    (revs , NAME))
+        f.write('%s\n' % opts["source-url"])
 
         f.close()
         report('wrote commit message to "%s"' % opts["commit-file"])
@@ -1732,8 +1732,8 @@ def action_uninit(branch_dir, branch_pro
     # Write out commit message if desired
     if opts["commit-file"]:
         f = open(opts["commit-file"], "w")
-        print >>f, 'Removed merge tracking for "%s" for ' % NAME
-        print >>f, '%s' % opts["source-url"]
+        f.write('Removed merge tracking for "%s" for \n' % NAME)
+        f.write('%s\n' % opts["source-url"])
         f.close()
         report('wrote commit message to "%s"' % opts["commit-file"])
 
@@ -1876,9 +1876,9 @@ class CommandOpts:
 
     def _print_wrapped(self, text, indent=0):
         text = self._paragraphs(text, self.cwidth - indent)
-        print text.pop(0)
+        print(text.pop(0))
         for t in text:
-            print " " * indent + t
+            print(" " * indent + t)
 
     def _find_common(self, fl):
         for o in self.copts:
@@ -1960,7 +1960,7 @@ class CommandOpts:
                 opts.extend(cmd.opts)
                 args.remove(cmd.name)
             state, args = self._fancy_getopt(args, opts)
-        except getopt.GetoptError, e:
+        except getopt.GetoptError as e:
             self.error(e, cmd)
 
         # Handle builtins
@@ -1981,44 +1981,44 @@ class CommandOpts:
         return cmd, args, state
 
     def error(self, s, cmd=None):
-        print >>sys.stderr, "%s: %s" % (self.progname, s)
+        sys.stderr.write("%s: %s\n" % (self.progname, s))
         if cmd is not None:
             self.print_command_help(cmd)
         else:
             self.print_small_help()
         sys.exit(1)
     def print_small_help(self):
-        print "Type '%s help' for usage" % self.progname
+        print("Type '%s help' for usage" % self.progname)
     def print_usage_line(self):
-        print "usage: %s <subcommand> [options...] [args...]\n" % self.progname
+        print("usage: %s <subcommand> [options...] [args...]\n" % self.progname)
     def print_command_list(self):
-        print "Available commands (use '%s help COMMAND' for more details):\n" \
-              % self.progname
+        print("Available commands (use '%s help COMMAND' for more details):\n" \
+              % self.progname)
         cmds = self.ctable.keys()
         cmds.sort()
         indent = max(map(len, cmds))
         for c in cmds:
             h = self.ctable[c].short_help()
-            print "  %-*s   " % (indent, c),
+            sys.stdout.write("  %-*s    " % (indent, c))
             self._print_wrapped(h, indent+6)
     def print_command_help(self, cmd):
         cmd = self.ctable[str(cmd)]
-        print 'usage: %s %s\n' % (self.progname, cmd.usage)
+        print('usage: %s %s\n' % (self.progname, cmd.usage))
         self._print_wrapped(cmd.help)
         def print_opts(opts, self=self):
             if not opts: return
             flags = [o.repr_flags() for o in opts]
             indent = max(map(len, flags))
             for f,o in zip(flags, opts):
-                print "  %-*s :" % (indent, f),
+                sys.stdout.write("  %-*s : " % (indent, f))
                 self._print_wrapped(o.help, indent+5)
-        print '\nCommand options:'
+        print('\nCommand options:')
         print_opts(cmd.opts)
-        print '\nGlobal options:'
+        print('\nGlobal options:')
         print_opts(self.gopts)
 
     def print_version(self):
-        print self.version
+        print(self.version)
 
 ###############################################################################
 # Options and Commands description
@@ -2367,12 +2367,12 @@ def main(args):
 if __name__ == "__main__":
     try:
         main(sys.argv[1:])
-    except LaunchError, (ret, cmd, out):
+    except LaunchError as (ret, cmd, out):
         err_msg = "command execution failed (exit code: %d)\n" % ret
         err_msg += cmd + "\n"
         err_msg += "".join(out)
         error(err_msg)
     except KeyboardInterrupt:
         # Avoid traceback on CTRL+C
-        print "aborted by user"
+        print("aborted by user")
         sys.exit(1)

Modified: subversion/branches/authzperf/contrib/client-side/svnmerge/svnmerge_test.py
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/contrib/client-side/svnmerge/svnmerge_test.py?rev=1746927&r1=1746926&r2=1746927&view=diff
==============================================================================
--- subversion/branches/authzperf/contrib/client-side/svnmerge/svnmerge_test.py (original)
+++ subversion/branches/authzperf/contrib/client-side/svnmerge/svnmerge_test.py Sun Jun  5 15:03:52 2016
@@ -89,7 +89,7 @@ class TestCase_launch(unittest.TestCase)
     def test_failurecode(self):
         try:
             svnmerge.launch(self.cmd*10)
-        except svnmerge.LaunchError, (ret, cmd, out):
+        except svnmerge.LaunchError as (ret, cmd, out):
             self.assertNotEqual(ret, 0)
             self.assertNotEqual(ret, None)
             self.assert_(out)
@@ -254,7 +254,7 @@ class TestCase_SvnMerge(unittest.TestCas
                 reset_svnmerge()
 
                 ret = svnmerge.main(args)
-            except SystemExit, e:
+            except SystemExit as e:
                 ret = e.code
         finally:
             sys.stdout = sys.__stdout__
@@ -302,7 +302,7 @@ class TestCase_SvnMerge(unittest.TestCas
     def launch(self, cmd, **kwargs):
         try:
             out = svnmerge.launch(cmd, split_lines=False)
-        except svnmerge.LaunchError, (ret, cmd, out):
+        except svnmerge.LaunchError as (ret, cmd, out):
             return self._parseoutput(ret, out, **kwargs)
         return self._parseoutput(0, out, **kwargs)
 

Modified: subversion/branches/authzperf/contrib/hook-scripts/hook_toolbox.py
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/contrib/hook-scripts/hook_toolbox.py?rev=1746927&r1=1746926&r2=1746927&view=diff
==============================================================================
--- subversion/branches/authzperf/contrib/hook-scripts/hook_toolbox.py (original)
+++ subversion/branches/authzperf/contrib/hook-scripts/hook_toolbox.py Sun Jun  5 15:03:52 2016
@@ -99,7 +99,7 @@ def read_config(repos, filename, expecte
   '''
   path = os.path.join(repos, 'conf', filename)
   if not os.path.exists(path):
-    print 'Not present:', path
+    print('Not present:', path)
     return []
 
   config_lines = open(path).readlines()
@@ -114,16 +114,16 @@ def read_config(repos, filename, expecte
                      if len(tokens) == expected_tokens_per_line ]
 
   if len(matching_lines) < len(tokenized_lines):
-    print '*** %d syntax errors in %s' % (
+    print('*** %d syntax errors in %s' % (
              len(tokenized_lines) - len(matching_lines),
-             path)
+             path))
 
   return matching_lines
 
 
 def update_working_copy(wc_path):
   if not os.path.exists(wc_path):
-    print '--> *** Cannot find working copy', wc_path
+    print('--> *** Cannot find working copy', wc_path)
     return None
   return run(os.path.join(BIN_PATH, 'svn'), 'update', wc_path)
 
@@ -131,8 +131,8 @@ def update_working_copy(wc_path):
 def run(*cmd):
   '''Call the given command & args and return what it printed to stdout.
      e.g. result = run('/usr/bin/svn', 'info', wc_dir_path) '''
-  print '-->', ' '.join(cmd)
+  print('-->', ' '.join(cmd))
   stdout = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
-  print stdout.strip()
+  print(stdout.strip())
   return stdout
 

Modified: subversion/branches/authzperf/contrib/hook-scripts/remove-zombie-locks.py
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/contrib/hook-scripts/remove-zombie-locks.py?rev=1746927&r1=1746926&r2=1746927&view=diff
==============================================================================
--- subversion/branches/authzperf/contrib/hook-scripts/remove-zombie-locks.py (original)
+++ subversion/branches/authzperf/contrib/hook-scripts/remove-zombie-locks.py Sun Jun  5 15:03:52 2016
@@ -84,7 +84,7 @@ assert (svn.core.SVN_VER_MAJOR, svn.core
        + str(svn.core.SVN_VER_MAJOR) + "." + str(svn.core.SVN_VER_MINOR)
 
 def usage_and_exit():
-  print >> sys.stderr, __doc__
+  sys.stderr.write(__doc__ + "\n")
   sys.exit(1)
 
 class RepositoryZombieLockRemover:
@@ -112,7 +112,7 @@ class RepositoryZombieLockRemover:
     """check if the file still exists in HEAD, removing the lock if not"""
     if svn.fs.svn_fs_check_path(self.rev_root, lock.path, callback_pool) \
            == svn.core.svn_node_none:
-      print lock.path
+      print(lock.path)
       svn.repos.svn_repos_fs_unlock(self.repos_ptr, lock.path, lock.token,
                                     True, callback_pool)
 
@@ -120,8 +120,8 @@ class RepositoryZombieLockRemover:
     """iterate over every locked file in repo_path/repo_subpath,
        calling unlock_nonexistent_files for each"""
 
-    print "Removing all zombie locks from repository at %s\n" \
-          "This may take several minutes..." % self.repos_path
+    print("Removing all zombie locks from repository at %s\n" \
+          "This may take several minutes..." % self.repos_path)
 
     # Try to use svn_fs_get_locks2() if it's present, as it's believed
     # to be problem-free.
@@ -151,7 +151,7 @@ class RepositoryZombieLockRemover:
       else:
         svn.fs.svn_fs_get_locks(self.fs_ptr, self.repos_subpath,
                                 self.unlock_nonexistent_files, self.pool)
-    print "Done."
+    print("Done.")
 
 
 class RevisionZombieLockRemover:

Modified: subversion/branches/authzperf/contrib/server-side/add-needs-lock.py
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/contrib/server-side/add-needs-lock.py?rev=1746927&r1=1746926&r2=1746927&view=diff
==============================================================================
--- subversion/branches/authzperf/contrib/server-side/add-needs-lock.py (original)
+++ subversion/branches/authzperf/contrib/server-side/add-needs-lock.py Sun Jun  5 15:03:52 2016
@@ -46,8 +46,8 @@ try:
   import svn.core
   import svn.fs
   import svn.repos
-except ImportError, e:
-  print >> sys.stderr, "ERROR: Unable to import Subversion's Python bindings: '%s'" % e
+except ImportError as e:
+  sys.stderr.write("ERROR: Unable to import Subversion's Python bindings: '%s'\n" % e)
   sys.exit(1)
 
 # Walk a tree returning file paths
@@ -121,7 +121,7 @@ def addneedslock(repos_path, uname='', c
 
   interesting_files = []
 
-  print 'Searching ' + str(len(files)) + ' file(s)...'
+  print('Searching ' + str(len(files)) + ' file(s)...')
 
   for path in files:
     locked_val = svn.fs.get_lock(fsob, path)
@@ -135,7 +135,7 @@ def addneedslock(repos_path, uname='', c
   if interesting_files:
     if dryrun:
       for path in interesting_files:
-        print "Need to add svn:needs-lock to '" + path + "'"
+        print("Need to add svn:needs-lock to '" + path + "'")
     else:
       # open a transaction against HEAD
       headrev = svn.fs.youngest_rev(fsob)
@@ -143,21 +143,21 @@ def addneedslock(repos_path, uname='', c
       root = svn.fs.txn_root(txn)
 
       for path in interesting_files:
-        print "Adding svn:needs-lock to '" + path + "'..."
+        print("Adding svn:needs-lock to '" + path + "'...")
         svn.fs.change_node_prop(root, path, svn.core.SVN_PROP_NEEDS_LOCK, '*')
 
       conflict, newrev = svn.fs.commit_txn(txn)
       if conflict:
         raise Exception("Conflict encountered (%s)" % conflict)
 
-      print 'Created revision: ', newrev
+      print('Created revision: ', newrev)
   else:
-    print 'Nothing changed.  Current Revision: ', headrev
+    print('Nothing changed.  Current Revision: ', headrev)
 
 
 ################################################################################
 def usage():
-  print "USAGE: add-needs-lock.py [-u username] [-m commitmsg] [-i includeregexp] [-e excluderegexp] [-r REV] [-d] REPOS-PATH"
+  print("USAGE: add-needs-lock.py [-u username] [-m commitmsg] [-i includeregexp] [-e excluderegexp] [-r REV] [-d] REPOS-PATH")
   sys.exit(1)
 
 
@@ -184,12 +184,12 @@ def main():
     if name == '-r':
       rev = int(value)
     if name == '-d':
-      print 'Performing dry run...'
+      print('Performing dry run...')
       dryrun = 1
   if rev is None:
-    print 'Searching all files...'
+    print('Searching all files...')
   else:
-    print 'Searching revision: ' + str(rev) + '...'
+    print('Searching revision: ' + str(rev) + '...')
   if len(args) == 1:
     addneedslock(args[0], uname, commitmsg, included, excluded, rev, dryrun)
   else:

Modified: subversion/branches/authzperf/contrib/server-side/fsfsfixer/fixer/find_good_id.py
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/contrib/server-side/fsfsfixer/fixer/find_good_id.py?rev=1746927&r1=1746926&r2=1746927&view=diff
==============================================================================
--- subversion/branches/authzperf/contrib/server-side/fsfsfixer/fixer/find_good_id.py (original)
+++ subversion/branches/authzperf/contrib/server-side/fsfsfixer/fixer/find_good_id.py Sun Jun  5 15:03:52 2016
@@ -101,11 +101,11 @@ if __name__ == '__main__':
     repo_dir = sys.argv[1]
     rev = sys.argv[2]
     size = sys.argv[3]
-    print "Good offset:", find_good_rep_header(repo_dir, rev, size)
+    print("Good offset:", find_good_rep_header(repo_dir, rev, size))
     sys.exit(0)
 
   if len(sys.argv) != 3:
-    print >>sys.stderr, usage
+    sys.stderr.write(usage + "\n")
     sys.exit(1)
 
   repo_dir = sys.argv[1]
@@ -117,7 +117,7 @@ if __name__ == '__main__':
   # reconstruct the file so as to preserve all offsets.
   # ### TODO: This check should be in the caller rather than here.
   if len(good_id) != len(bad_id):
-    print >>sys.stderr, "warning: the good ID has a different length: " + \
-                        "bad id '" + bad_id + "', good id '" + good_id + "'"
+    sys.stderr.write("warning: the good ID has a different length: " + \
+                     "bad id '" + bad_id + "', good id '" + good_id + "'\n")
 
-  print good_id
+  print(good_id)

Modified: subversion/branches/authzperf/contrib/server-side/fsfsfixer/fixer/fix-rev.py
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/contrib/server-side/fsfsfixer/fixer/fix-rev.py?rev=1746927&r1=1746926&r2=1746927&view=diff
==============================================================================
--- subversion/branches/authzperf/contrib/server-side/fsfsfixer/fixer/fix-rev.py (original)
+++ subversion/branches/authzperf/contrib/server-side/fsfsfixer/fixer/fix-rev.py Sun Jun  5 15:03:52 2016
@@ -38,7 +38,7 @@ MAX_FSFS_FORMAT = 5
 # Print a message, only if 'verbose' mode is enabled.
 def verbose_print(str):
   if VERBOSE:
-    print str
+    print(str)
 
 # Echo the arguments to a log file, and also (if verbose) to standard output.
 def log(str):
@@ -101,7 +101,7 @@ def fix_id(repo_dir, rev, bad_id):
                    "good id '" + good_id + "'")
 
   replace_in_rev_file(repo_dir, rev, bad_id, good_id)
-  print "Fixed id: " + bad_id + " -> " + good_id
+  print("Fixed id: " + bad_id + " -> " + good_id)
   fixed_ids[bad_id] = good_id
 
 def fix_checksum(repo_dir, rev, old_checksum, new_checksum):
@@ -112,7 +112,7 @@ def fix_checksum(repo_dir, rev, old_chec
   assert old_checksum != new_checksum
 
   replace_in_rev_file(repo_dir, rev, old_checksum, new_checksum)
-  print "Fixed checksum: " + old_checksum + " -> " + new_checksum
+  print("Fixed checksum: " + old_checksum + " -> " + new_checksum)
   fixed_checksums[old_checksum] = new_checksum
 
 def fix_rep_ref(repo_dir, rev, prefix, rep_rev, bad_offset, rep_size):
@@ -127,7 +127,7 @@ def fix_rep_ref(repo_dir, rev, prefix, r
   if good_offset == bad_offset:
     raise FixError("Attempting to fix a rep ref that appears to be correct: " + old_line)
   replace_in_rev_file(repo_dir, rev, old_line, new_line)
-  print "Fixed rep ref:", old_line, "->", new_line
+  print("Fixed rep ref:", old_line, "->", new_line)
 
 
 def handle_one_error(repo_dir, rev, error_lines):
@@ -226,8 +226,8 @@ def fix_one_error(repo_dir, rev):
       return True
     else:
       verbose_print("Unrecognized error message; trying 'svnlook' instead.")
-  except FixError, e:
-    print 'warning:', e
+  except FixError as e:
+    print('warning:', e)
     verbose_print("Trying 'svnlook' instead.")
 
   # At this point, we've got an 'svnadmin' error that we don't know how to
@@ -238,7 +238,7 @@ def fix_one_error(repo_dir, rev):
   svnlook_err = grab_stderr([SVNLOOK, 'tree', '-r'+rev, repo_dir])
 
   if svnlook_err == []:
-    print 'warning: svnlook did not find an error'
+    print('warning: svnlook did not find an error')
   else:
     if handle_one_error(repo_dir, rev, svnlook_err):
       return True
@@ -281,13 +281,13 @@ def fix_rev(repo_dir, rev):
   # Keep looking for verification errors in r$REV and fixing them while we can.
   while fix_one_error(repo_dir, rev):
     pass
-  print "Revision " + rev + " verifies OK."
+  print("Revision " + rev + " verifies OK.")
 
 
 if __name__ == '__main__':
 
   if len(sys.argv) != 3:
-    print >>sys.stderr, usage
+    sys.stderr.write(usage + "\n")
     sys.exit(1)
 
   repo_dir = sys.argv[1]
@@ -295,6 +295,6 @@ if __name__ == '__main__':
 
   try:
     fix_rev(repo_dir, rev)
-  except FixError, e:
-    print 'error:', e
+  except FixError as e:
+    print('error:', e)
     sys.exit(1)

Modified: subversion/branches/authzperf/contrib/server-side/fsfsverify.py
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/contrib/server-side/fsfsverify.py?rev=1746927&r1=1746926&r2=1746927&view=diff
==============================================================================
--- subversion/branches/authzperf/contrib/server-side/fsfsverify.py (original)
+++ subversion/branches/authzperf/contrib/server-side/fsfsverify.py Sun Jun  5 15:03:52 2016
@@ -93,7 +93,7 @@ def log(type, indent, format, *args):
     indentStr = ' ' * indent
     str = format % args
     str = '\n'.join([indentStr + x for x in str.split('\n')])
-    print str
+    print(str)
 
 
 class ByteStream(object):
@@ -344,7 +344,7 @@ class Window(object):
           self.instrByteStream = ZlibByteStream(self.origInstrStream,
                                                 self.compressedInstrLength)
           self.isInstrCompressed = True
-      except Exception, e:
+      except Exception as e:
         new_e = InvalidCompressedStream(
           "Invalid compressed instr stream at offset %d (%s)" % (offset,
                                                                  str(e)),
@@ -359,7 +359,7 @@ class Window(object):
           self.dataByteStream = ZlibByteStream(self.origDataStream,
                                                self.compressedDataLength)
           self.isDataCompressed = True
-      except Exception, e:
+      except Exception as e:
         new_e = InvalidCompressedStream(
           "Invalid compressed data stream at offset %d (%s, %s)\n" % (
               offset, str(e), repr(self)),
@@ -388,7 +388,7 @@ class Window(object):
     while computedInstrLength < expectedInstrLength:
       try:
         instr = SvndiffInstruction(self.instrByteStream)
-      except PotentiallyFixableException, e:
+      except PotentiallyFixableException as e:
         e.window = self
         e.windowOffset = self.windowOffset
         raise
@@ -492,7 +492,7 @@ class Svndiff(object):
         log(LOG_WINDOWS, 3, repr(w))
         w.verify()
         remaining -= w.windowLength
-    except PotentiallyFixableException, e:
+    except PotentiallyFixableException as e:
       e.svndiffStart = self.startingOffset
       raise
 
@@ -561,7 +561,7 @@ class Rep(object):
       raise e
 
     if self.rev != currentRev:
-      print >>sys.stderr, "Skipping text rep since it isn't present in the current rev"
+      sys.stderr.write("Skipping text rep since it isn't present in the current rev\n")
       return
 
     f.seek(self.offset)
@@ -580,7 +580,7 @@ class Rep(object):
       try:
         svndiff = Svndiff(f, self.length)
         svndiff.verify()
-      except Exception, e:
+      except Exception as e:
         e.rep = self
         e.noderev = self.noderev
         raise
@@ -765,7 +765,7 @@ class NodeRev(object):
 
               if nodeId.rev != self.id.rev:
                   if not os.path.exists(str(nodeId.rev)):
-                      print "Can't check %s" % repr(nodeId)
+                      print("Can't check %s" % repr(nodeId))
                       continue
                   tmp = open(str(nodeId.rev),'rb')
                   tmp.seek(nodeId.offset)
@@ -785,8 +785,8 @@ class NodeRev(object):
           f.seek(offset)
         else:
           # The directory entries are stored in another file.
-          print "Warning: dir entries are stored in rev %d for noderev %s" % (
-            self.text.rev, repr(self.id))
+          print("Warning: dir entries are stored in rev %d for noderev %s" % (
+            self.text.rev, repr(self.id)))
 
   def __repr__(self):
     str = 'NodeRev Id: %s\n type: %s\n' % (repr(self.id), repr(self.type))
@@ -858,18 +858,18 @@ def getRootAndChangedPaths(revFile):
 
 
 def dumpChangedPaths(changedPaths):
-  print "Changed Path Information:"
+  print("Changed Path Information:")
   for (path,
        (id, action, textMod, propMod,
         copyfromRev, copyfromPath)) in changedPaths:
-    print " %s:" % path
-    print "  id: %s" % id
-    print "  action: %s" % action
-    print "  text mod: %s" % textMod
-    print "  prop mod: %s" % propMod
+    print(" %s:" % path)
+    print("  id: %s" % id)
+    print("  action: %s" % action)
+    print("  text mod: %s" % textMod)
+    print("  prop mod: %s" % propMod)
     if copyfromRev != -1:
-      print "  copyfrom path: %s" % copyfromPath
-      print "  copyfrom rev: %s" % copyfromRev
+      print("  copyfrom path: %s" % copyfromPath)
+      print("  copyfrom rev: %s" % copyfromRev)
     print
 
 
@@ -926,7 +926,7 @@ class RegexpStrategy(WalkStrategy):
 
 
 def verify(noderev, revFile, dumpInstructions, dumpWindows):
-  print noderev
+  print(noderev)
 
   if noderev.text:
     noderev.text.verify(revFile,
@@ -944,7 +944,7 @@ def verify(noderev, revFile, dumpInstruc
 def truncate(noderev, revFile):
   txnId = noderev.id
 
-  print "Truncating node %s (%s)" % (txnId, noderev.cpath)
+  print("Truncating node %s (%s)" % (txnId, noderev.cpath))
 
   # Grab the text rep
   textRep = noderev.text
@@ -980,7 +980,7 @@ def truncate(noderev, revFile):
   newTextRep = ' '.join(fields) + '\x0a'
   assert(len(newTextRep) == overallLength)
   revFile.write(newTextRep)
-  print "Done."
+  print("Done.")
   sys.exit(0)
 
 
@@ -1003,7 +1003,7 @@ def fixHeader(e, revFile):
         headerLen = len(line)
     offset = offset + len(line)
 
-  print "Original text rep located at", originalOffset
+  print("Original text rep located at", originalOffset)
 
   # Okay, now we have the original offset of the text rep that was
   # in the process of being written out.  The header portion of the
@@ -1014,14 +1014,14 @@ def fixHeader(e, revFile):
 
   revFile.seek(originalOffset)
   block = revFile.read(copyLen)
-  print "Copy %d bytes from offset %d" % (copyLen, originalOffset)
+  print("Copy %d bytes from offset %d" % (copyLen, originalOffset))
 
-  print "Write %d bytes at offset %d" % (copyLen, e.offset)
+  print("Write %d bytes at offset %d" % (copyLen, e.offset))
   revFile.seek(e.offset)
   revFile.write(block)
   revFile.flush()
 
-  print "Fixed? :-)  Re-run fsfsverify without the -f option"
+  print("Fixed? :-)  Re-run fsfsverify without the -f option")
 
 
 def fixStream(e, revFile):
@@ -1050,8 +1050,8 @@ def fixStream(e, revFile):
   srcOffset = errorOffset
   destOffset = repeatedBlockOffset
 
-  print "Copy %d bytes from offset %d" % (srcLength, srcOffset)
-  print "Write %d bytes at offset %d" % (srcLength, destOffset)
+  print("Copy %d bytes from offset %d" % (srcLength, srcOffset))
+  print("Write %d bytes at offset %d" % (srcLength, destOffset))
 
   while srcOffset < finalOffset:
     blen = 64*1024
@@ -1068,7 +1068,7 @@ def fixStream(e, revFile):
   revFile.flush()
   revFile.close()
 
-  print "Fixed? :-)  Re-run fsfsverify without the -f option"
+  print("Fixed? :-)  Re-run fsfsverify without the -f option")
 
 
 def checkOptions(options):
@@ -1078,16 +1078,16 @@ def checkOptions(options):
       count = count + 1
 
   if count > 1:
-    print >>sys.stderr, "Please use only one of -c, -f, and -t."
+    sys.stderr.write("Please use only one of -c, -f, and -t.\n")
     sys.exit(1)
 
   if options.dumpChanged and (options.dumpWindows or options.dumpInstructions):
-    print >>sys.stderr, \
-      "-c is incompatible with -w and -i.  Dropping -w and/or -i."
+    sys.stderr.write(\
+      "-c is incompatible with -w and -i.  Dropping -w and/or -i.\n")
 
   if options.noVerify and (options.dumpWindows or options.dumpInstructions):
-    print >>sys.stderr, \
-      "--no-verify is incompatible with -w and -i.  Dropping -w and/or -i."
+    sys.stderr.write(\
+      "--no-verify is incompatible with -w and -i.  Dropping -w and/or -i.\n")
 
 
 def handleError(error, withTraceback=False):
@@ -1096,8 +1096,8 @@ def handleError(error, withTraceback=Fal
     import traceback
     traceback.print_exc()
 
-  print >>sys.stderr,"Error %s: %s" % (error.__class__.__name__, str(e))
-  print >>sys.stderr,"Try running with -f to fix the revision"
+  sys.stderr.write("Error %s: %s\n" % (error.__class__.__name__, str(e)))
+  sys.stderr.write("Try running with -f to fix the revision\n")
   sys.exit(1)
 
 
@@ -1136,7 +1136,7 @@ if __name__ == '__main__':
   (options, args) = parser.parse_args()
 
   if len(args) != 1:
-    print >>sys.stderr, "Please specify exactly one rev file."
+    sys.stderr.write("Please specify exactly one rev file.\n")
     parser.print_help()
     sys.exit(1)
 
@@ -1192,7 +1192,7 @@ if __name__ == '__main__':
             truncate(noderev, revFile)
 
         else:
-          print noderev
+          print(noderev)
 
           if not options.noVerify:
             if noderev.text:
@@ -1209,13 +1209,13 @@ if __name__ == '__main__':
       except:
         sys.stdout.flush()
         raise
-  except InvalidRepHeader, e:
+  except InvalidRepHeader as e:
     if not options.fixRlle:
       handleError(e, options.showTraceback)
 
     fixHeader(e, revFile)
 
-  except PotentiallyFixableException, e:
+  except PotentiallyFixableException as e:
     if not options.fixRlle:
       handleError(e, options.showTraceback)
 

Modified: subversion/branches/authzperf/contrib/server-side/svn-tweak-author.py
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/contrib/server-side/svn-tweak-author.py?rev=1746927&r1=1746926&r2=1746927&view=diff
==============================================================================
--- subversion/branches/authzperf/contrib/server-side/svn-tweak-author.py (original)
+++ subversion/branches/authzperf/contrib/server-side/svn-tweak-author.py Sun Jun  5 15:03:52 2016
@@ -67,16 +67,16 @@ def tweak_rev_author(fs_obj, revision, a
     """Change the value of the svn:author property for REVISION in
     repository filesystem FS_OBJ in AUTHOR."""
     if author is None:
-        print "Deleting author for revision %d..." % (revision),
+        sys.stdout.write("Deleting author for revision %d... " % (revision))
     else:
-        print "Tweaking author for revision %d..." % (revision),
+        sys.stdout.write("Tweaking author for revision %d... " % (revision))
     try:
         fs.svn_fs_change_rev_prop(fs_obj, revision,
                                   core.SVN_PROP_REVISION_AUTHOR, author)
     except:
-        print ""
+        print("")
         raise
-    print "done."
+    print("done.")
 
 def get_fs_obj(repos_path):
     """Return a repository filesystem object for the repository
@@ -117,7 +117,7 @@ def main():
             usage_and_exit("Invalid mode (%s) provided." % (mode))
     except SystemExit:
         raise
-    except Exception, e:
+    except Exception as e:
         error_and_exit(str(e))
 
 if __name__ == "__main__":

Modified: subversion/branches/authzperf/get-deps.sh
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/get-deps.sh?rev=1746927&r1=1746926&r2=1746927&view=diff
==============================================================================
--- subversion/branches/authzperf/get-deps.sh (original)
+++ subversion/branches/authzperf/get-deps.sh Sun Jun  5 15:03:52 2016
@@ -36,7 +36,8 @@ APU_VERSION=${APU_VERSION:-"1.5.1"}
 SERF_VERSION=${SERF_VERSION:-"1.3.8"}
 ZLIB_VERSION=${ZLIB_VERSION:-"1.2.8"}
 SQLITE_VERSION=${SQLITE_VERSION:-"3.7.15.1"}
-GMOCK_VERSION=${GMOCK_VERSION:-"1.6.0"}
+GTEST_VERSION=${GMOCK_VERSION:-"1.7.0"}
+GMOCK_VERSION=${GMOCK_VERSION:-"1.7.0"}
 HTTPD_VERSION=${HTTPD_VERSION:-"2.4.10"}
 APR_ICONV_VERSION=${APR_ICONV_VERSION:-"1.2.1"}
 
@@ -46,8 +47,10 @@ SERF=serf-${SERF_VERSION}
 ZLIB=zlib-${ZLIB_VERSION}
 SQLITE_VERSION_LIST=`echo $SQLITE_VERSION | sed -e 's/\./ /g'`
 SQLITE=sqlite-amalgamation-`printf %d%02d%02d%02d $SQLITE_VERSION_LIST`
-GMOCK=gmock-${GMOCK_VERSION}
-GMOCK_URL=https://googlemock.googlecode.com/files/
+GTEST=release-${GTEST_VERSION}
+GTEST_URL=https://github.com/google/googletest/archive
+GMOCK=release-${GMOCK_VERSION}
+GMOCK_URL=https://github.com/google/googlemock/archive
 
 HTTPD=httpd-${HTTPD_VERSION}
 APR_ICONV=apr-iconv-${APR_ICONV_VERSION}
@@ -67,7 +70,7 @@ APACHE_MIRROR=http://archive.apache.org/
 # helpers
 usage() {
     echo "Usage: $0"
-    echo "Usage: $0 [ apr | serf | zlib | sqlite | gmock ] ..."
+    echo "Usage: $0 [ apr | serf | zlib | sqlite | googlemock ] ..."
     exit $1
 }
 
@@ -89,7 +92,7 @@ get_serf() {
     test -d $BASEDIR/serf && return
 
     cd $TEMPDIR
-    $HTTP_FETCH http://serf.googlecode.com/svn/src_releases/$SERF.tar.bz2
+    $HTTP_FETCH https://archive.apache.org/dist/serf/$SERF.tar.bz2
     cd $BASEDIR
 
     bzip2 -dc $TEMPDIR/$SERF.tar.bz2 | tar -xf -
@@ -122,17 +125,22 @@ get_sqlite() {
 
 }
 
-get_gmock() {
-    test -d $BASEDIR/gmock-fused && return
+get_googlemock() {
+    test -d $BASEDIR/googlemock && return
 
     cd $TEMPDIR
-    $HTTP_FETCH ${GMOCK_URL}/${GMOCK}.zip
-    cd $BASEDIR
+    $HTTP_FETCH ${GTEST_URL}/${GTEST}.zip
+    unzip -q ${GTEST}.zip
+    rm -f ${GTEST}.zip
 
-    unzip -q $TEMPDIR/$GMOCK.zip
+    $HTTP_FETCH ${GMOCK_URL}/${GMOCK}.zip
+    unzip -q ${GMOCK}.zip
+    rm -f ${GMOCK}.zip
 
-    mv $GMOCK/fused-src gmock-fused
-    rm -fr $GMOCK
+    cd $BASEDIR
+    mkdir googlemock
+    mv $TEMPDIR/googletest-release-${GTEST_VERSION} googlemock/googletest
+    mv $TEMPDIR/googlemock-release-${GMOCK_VERSION} googlemock/googlemock
 }
 
 # main()

Modified: subversion/branches/authzperf/notes/directory-index/dirindex.py
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/notes/directory-index/dirindex.py?rev=1746927&r1=1746926&r2=1746927&view=diff
==============================================================================
--- subversion/branches/authzperf/notes/directory-index/dirindex.py (original)
+++ subversion/branches/authzperf/notes/directory-index/dirindex.py Sun Jun  5 15:03:52 2016
@@ -754,13 +754,13 @@ __greek_tree = {
     }
 def greektree(ix, tx):
     def populate(track, items):
-        print 'Populating', track
+        print('Populating', track)
         for name, kind in items.iteritems():
             if kind == 'file':
                 node = ix.add(tx, track, name, NodeRev.FILE)
             else:
                 node = ix.add(tx, track, name, NodeRev.DIR)
-            print 'Added', node, 'node:', node.noderev
+            print('Added', node, 'node:', node.noderev)
             if isinstance(kind, dict):
                 populate(node, kind)
 
@@ -773,16 +773,16 @@ def simpletest(database):
     ix.initialize()
 
     try:
-        print "Lookup root"
+        print("Lookup root")
         tx = ix.get_txn()
-        print "transaction:", tx
+        print("transaction:", tx)
         root = ix.lookup(tx)
-        print "root track:", root
-        print "root noderev", root.noderev
+        print("root track:", root)
+        print("root noderev", root.noderev)
 
-        print 'Create greek tree'
+        print('Create greek tree')
         tx = ix.new_txn(0)
-        print "transaction:", tx
+        print("transaction:", tx)
         greektree(ix, tx)
         ix.commit_txn(tx, 1)
         ix.commit()
@@ -790,24 +790,24 @@ def simpletest(database):
 
         def listdir(noderev, prefix):
             for n in ix.listdir(tx, noderev):
-                print prefix, str(n)
+                print(prefix, str(n))
                 if n._isdir:
                     listdir(n, prefix + "  ")
 
-        print "List contents"
+        print("List contents")
         tx = ix.get_txn()
-        print "transaction:", tx
+        print("transaction:", tx)
         root = ix.lookup(tx)
-        print str(root.noderev)
+        print(str(root.noderev))
         listdir(root.noderev, " ")
 
-        print "Lookup iota"
+        print("Lookup iota")
         track = ix.lookup(tx, None, "iota")
-        print str(track), str(track.noderev)
+        print(str(track), str(track.noderev))
 
-        print "Lookup A/D/H/psi"
+        print("Lookup A/D/H/psi")
         track = ix.lookup(tx, None, "A/D/H/psi")
-        print str(track), str(track.noderev)
+        print(str(track), str(track.noderev))
     finally:
         ix.close()
 

Modified: subversion/branches/authzperf/notes/move-tracking/path_pairs_to_eid_map.py
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/notes/move-tracking/path_pairs_to_eid_map.py?rev=1746927&r1=1746926&r2=1746927&view=diff
==============================================================================
--- subversion/branches/authzperf/notes/move-tracking/path_pairs_to_eid_map.py (original)
+++ subversion/branches/authzperf/notes/move-tracking/path_pairs_to_eid_map.py Sun Jun  5 15:03:52 2016
@@ -256,5 +256,5 @@ print("Output, as (initial, final) mappi
 for eid in converter.peid_loc_pairs():
   relpath0 = converter.peid_locs_for_side(0).relpath_from_eid(eid)
   relpath1 = converter.peid_locs_for_side(1).relpath_from_eid(eid)
-  print "%3d %-12s %-12s" % (eid, relpath0, relpath1)
+  print("%3d %-12s %-12s" % (eid, relpath0, relpath1))
 

Modified: subversion/branches/authzperf/subversion/bindings/swig/python/tests/core.py
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/subversion/bindings/swig/python/tests/core.py?rev=1746927&r1=1746926&r2=1746927&view=diff
==============================================================================
--- subversion/branches/authzperf/subversion/bindings/swig/python/tests/core.py (original)
+++ subversion/branches/authzperf/subversion/bindings/swig/python/tests/core.py Sun Jun  5 15:03:52 2016
@@ -80,7 +80,7 @@ class SubversionCoreTestCase(unittest.Te
       # It must remain unchanged through the process.
       try:
         svn.client.info2(*args)
-      except svn.core.SubversionException, exc:
+      except svn.core.SubversionException as exc:
         # find the original exception
         while exc.file != rec.e.file: exc = exc.child
 

Modified: subversion/branches/authzperf/subversion/bindings/swig/python/tests/repository.py
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/subversion/bindings/swig/python/tests/repository.py?rev=1746927&r1=1746926&r2=1746927&view=diff
==============================================================================
--- subversion/branches/authzperf/subversion/bindings/swig/python/tests/repository.py (original)
+++ subversion/branches/authzperf/subversion/bindings/swig/python/tests/repository.py Sun Jun  5 15:03:52 2016
@@ -319,7 +319,7 @@ class SubversionRepositoryTestCase(unitt
     fs.lock(self.fs, '/trunk/README.txt', None, None, 0, 0, self.rev, False)
     try:
       fs.lock(self.fs, '/trunk/README.txt', None, None, 0, 0, self.rev, False)
-    except core.SubversionException, exc:
+    except core.SubversionException as exc:
       self.assertEqual(exc.apr_err, core.SVN_ERR_FS_PATH_ALREADY_LOCKED)
     fs.lock(self.fs, '/trunk/README.txt', None, None, 0, 0, self.rev, True)