Move two functions to deprecated.c no functional changes.

* subversion/libsvn_ra_svn/deprecated.c
  (svn_ra_svn_create_conn2,
   svn_ra_svn_create_conn): Move deprecated functions here...

* subversion/libsvn_ra_svn/marshal.c
  (svn_ra_svn_create_conn2,
   svn_ra_svn_create_conn): ... that used to be here.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1533879 13f79535-47bb-0310-9956-ffa450edef68
Support Visual Studio 2013 as '2013' in the Windows build.
(It was already possible to use the option '12' to create a working
 but sub-optimal solution)

* gen-make.py
  Document VS 2013 value.
  
* build/generator/gen_win_dependencies.py
  (parse_options): Set internal versions for VS 2013.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1533907 13f79535-47bb-0310-9956-ffa450edef68
Hmmm, whoever decided to call the unspecified revision "START"?
Free speech is all very well, but at least we could follow naming conventions.

* subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Revision.java
  (Revision.UNSPECIFIED): Make an alias for Revision.START, so that developers
   familiar with Subversion's API have a chance of undertanding JavaHL, too.
  (Revision.toString): Handle the unspecified case.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1533928 13f79535-47bb-0310-9956-ffa450edef68
* build/generator/gen_win_dependencies.py
  (parse_options): Following up on r1533907, remove duplicated VS 2012 block
    and create a VS 2012 compatible solution file, as VS 2013 writes solutions
    in this format when it determines projects are backwards compatible, such
    as our .vcxproj files.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1533958 13f79535-47bb-0310-9956-ffa450edef68
Localized strings must not contain preprocessor macros.

* subversion/libsvn_fs_x/noderevs.c
  (svn_fs_x__noderevs_get,
   read_reps): use the double-escape trick for localized strings
               as we already do in other places

* subversion/libsvn_fs_x/changes.c
  (svn_fs_x__changes_get_list): ditto

* subversion/svnserve/serve.c
  (log_cmd): ditto

* subversion/libsvn_fs_x/index.c
  (l2p_page_get_offset): ditto; had to provide a pool
  (l2p_page_access_func,
   l2p_index_lookup): update callers

Found by: Mattias Engdegård <mattiase@bredband.net>

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1533970 13f79535-47bb-0310-9956-ffa450edef68
Use standard names for subpools and iterpools.

* subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c
  (invoke_callback): rename sub_pool to subpool

* tools/dev/fsfs-reorg.c
  (get_combined_window): ditto; rename iter_pool to iterpool

* tools/server-side/fsfs-stats.c
  (get_combined_window): same here
  (parse_dir): rename iter_pool to iterpool

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1533971 13f79535-47bb-0310-9956-ffa450edef68
Add a Windows specific svn_cmdline_puts() shortcut for the direct console
output case to avoid the insanely expensive double character conversion
in the Visual C++ CRT for this specific, but for Subversion very common case.

Before:                              VM/Network WC  Host
$ svn status -v trunk              = 7.5s           5.8s
$ svn status -v trunk > file       = 0.7s           0.1s

After:
$ svn status -v trunk              = 1.3s           0.4s
$ svn status -v trunk > file       = 0.7s           0.1s

(Measured on Windows 7, 8 and 8.1 with several CRT versions >= 2008)

When locales are explicitly enabled (such as in Subversion) the Visual
C++ CRT applies a double character conversion to make the console output
identical to what DOS and Win9X would do, while the console natively supports
displaying unicode. Instead of using the standard conversion route, this
shortcut converts our utf-8 to utf-16 and sends that to the attached console.

This patch avoids the extreme performance penalty and at the same time
enables displaying all unicode characters that the console support even
when they can't be expressed in the ansi character set.

Note that you will not see any change in the test suite, as the test suite
redirects all output. It will make subversion easier to profile though,
as before this patch many performance scenarios were console io bound on
Windows.

* subversion/libsvn_subr/cmdline.c
  (includes): Add conio.h on Windows. Add win32_xlate.
  (svn_cmdline_init): Detect if stdout and/or stderr are connected to the
    console.
  (svn_cmdline_fputs): Shortcut stdout/stderr to the console when possible.

* subversion/libsvn_subr/win32_xlate.c
  (includes): Add svn_private_config.h.
  (svn_subr__win32_utf8_to_utf16): New function.

* subversion/libsvn_subr/win32_xlate.h
  (svn_subr__win32_utf8_to_utf16): New function.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1533994 13f79535-47bb-0310-9956-ffa450edef68
Add a Windows-specific conversion function from UTF-18 to UTF-8.
Use it in JNIUtil.cpp instead of the APR internal function.

* subversion/libsvn_subr/win32_xlate.h
  (svn_subr__win32_utf8_to_utf16): Declaration moved from here to ...
* subversion/include/private/svn_subr_private.h
  (svn_subr__win32_utf8_to_utf16): ... here.
  (svn_subr__win32_utf16_to_utf8): New prototype.
* subversion/libsvn_subr/win32_xlate.c
  (svn_subr__win32_utf8_to_utf16): Calculate the length of the source
   string only once, and null-terminate it just before returning it.
  (svn_subr__win32_utf16_to_utf8): Implement here.

* subversion/bindings/javahl/native/JNIUtil.cpp: Do not include the private
   APR header arch/win32/apr_arch_utf8.h.
  (JNIUtil::JNIGlobalInit): Use svn_subr__win32_utf16_to_utf8.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1534037 13f79535-47bb-0310-9956-ffa450edef68
Folow up to r1534037: Add missing include.

* subversion/libsvn_subr/cmdline.c: Do not include win32_xlate.c.
  Include private/svn_subr_private.h instead.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1534039 13f79535-47bb-0310-9956-ffa450edef68
* subversion/libsvn_subr/win32_xlate.c
  (svn_subr__win32_utf8_to_utf16, svn_subr__win32_utf16_to_utf8):
   Use the variable size to calculate the buffer size, not the type.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1534044 13f79535-47bb-0310-9956-ffa450edef68
Replace use of deprecated svn_ra_get_log2 in a couple of places.

* subversion/include/svn_ra.h (svn_ra_get_log2): Fix docstring.
* subversion/libsvn_client/merge.c (get_log): Use svn_ra_get_log3.
* subversion/libsvn_client/mergeinfo.c
  (logs_for_mergeinfo_rangelist): Likewise.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1534045 13f79535-47bb-0310-9956-ffa450edef68
Following up on r1533994 and r1534037 resolve two off by one errors that were
originally hidden by making Windows handle the final '\0' byte. When r1534037
started passing the explicit length this handling was disabled.

* subversion/libsvn_subr/win32_xlate.c
  (svn_subr__win32_utf8_to_utf16,
   svn_subr__win32_utf16_to_utf8): Put '\0' in the buffer instead of one byte
     after the buffer.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1534082 13f79535-47bb-0310-9956-ffa450edef68
Simplify some Win32 specific code by using svn_subr__win32_utf16_to_utf8.

* subversion/libsvn_subr/config_win.c
  (includes): Add private/svn_subr_private.h.
  (svn_config__win_config_path): Use svn_subr__win32_utf16_to_utf8.
  (parse_section): Add comment.

* subversion/libsvn_subr/nls.c
  (includes): Add svn_subr_private.h.
  (svn_nls_init): Simplify win32 specific code. Assume Windows 2000
    or later. Report buffer overflows instead of using a truncated
    path.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1534083 13f79535-47bb-0310-9956-ffa450edef68
Following up on r1534082, pass exact buffersizes to avoid unneeded
calculations. Also fix converting empty strings, which would be handled
as an error.

* subversion/libsvn_subr/win32_xlate.c
  (svn_subr__win32_utf8_to_utf16,
   svn_subr__win32_utf16_to_utf8): Handle empty string as constant return.
     Use the exact number of characters, instead of characters + 1 for
     anything but allocation of the buffer.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1534088 13f79535-47bb-0310-9956-ffa450edef68
* subversion/libsvn_subr/win32_xlate.c
  (svn_subr__win32_utf16_to_utf8): Fix error message (aka padding my stats).


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1534090 13f79535-47bb-0310-9956-ffa450edef68
* subversion/libsvn_subr/win32_xlate.c
  (svn_subr__win32_utf8_to_utf16): Remove an extraneous local var and allocation.
  (svn_subr__win32_utf16_to_utf8): Remove an extraneous local.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1534094 13f79535-47bb-0310-9956-ffa450edef68
On Windows: stop linking against a system DLL that is not used by most
processes, to avoid a slight performance penalty on loading libsvn_subr
that is only needed for 'svn --version --verbose'.

As this dll is usually not loaded and not needed except for debugging,
we don't want to pay the system (and especially virusscanner) overhead
of always loading this dll.

* build.conf
  (libsvn_subr): Remove psapi.lib.

* subversion/libsvn_subr/sysinfo.c
  (FNENUMPROCESSMODULES): Fix definition to match system header.
  (enum_loaded_modules): Obtain EnumProcessModules dynamically.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1534102 13f79535-47bb-0310-9956-ffa450edef68
* subversion/libsvn_subr/config.c
  (svn_config_set): replace plain assertion with our macros
                    as we have better control over them

Suggested by: brane

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1534110 13f79535-47bb-0310-9956-ffa450edef68
Move the new Win32-specific UTF-8 <-> UTF-16 conversion functions
to the svn_utf namespace.

* subversion/include/private/svn_subr_private.h
  (svn_subr__win32_utf8_to_utf16, svn_subr__win32_utf16_to_utf8):
   Move prototypes from here to ...
* subversion/include/private/svn_utf_private.h
  (svn_utf__win32_utf8_to_utf16, svn_utf__win32_utf16_to_utf8): ... here.

* subversion/libsvn_subr/win32_xlate.c
  (svn_subr__win32_utf8_to_utf16, svn_subr__win32_utf16_to_utf8):
   Move implementation from here to ...
* subversion/libsvn_subr/utf.c
  (svn_utf__win32_utf8_to_utf16, svn_utf__win32_utf16_to_utf8): ... here.

* subversion/bindings/javahl/native/JNIUtil.cpp,
  subversion/libsvn_subr/cmdline.c,
  subversion/libsvn_subr/config_win.c,
  subversion/libsvn_subr/nls.c: Update uses.
  Include svn_utf_private.h instead of svn_subr_private.h for
  svn_utf__win32_utf8_to_utf16 and svn_utf__win32_utf16_to_utf8.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1534118 13f79535-47bb-0310-9956-ffa450edef68
Extend the Windows CRYPTOAPI based ssl certificate verification to properly
handle intermediate authorities, like how webbrowsers handle this.

When I originally implemented the ssl server certificate verification, most
certificates were directly signed by the root authority while since then
most certificates moved to using short lived intermediate authorities.

This re-enables common cases like
$ svn info https://svn.apache.org/repos/asf/
to work directly on Windows, without an initial prompt for accepting a
certificate from an unknown authority, just like it worked a few years ago.

* subversion/include/private/svn_auth_private.h
  (SVN_AUTH_CRED_SSL_SERVER_AUTHORITY): Declare new credential type.
  (svn_auth__get_windows_ssl_server_authority_provider): New function.

* subversion/libsvn_ra_serf/util.c
  (includes): Add svn_auth_private.h.
  (ssl_server_cert): Instead of just recording authority failures call a
    new (optional) provider to allow

* subversion/libsvn_subr/auth.c
  (includes): Add svn_auth_private.h.
  (svn_auth_get_platform_specific_provider): Allow loading new provider.

* subversion/libsvn_subr/cmdline.c
  (svn_cmdline_create_auth_baton): Hook new provider in the same place as
    where we hook the server certificate provider.

* subversion/libsvn_subr/win32_crypto.c
  (windows_ssl_server_trust_first_credentials): Fix an old bug, where instead
    of properly accepting a failure, we removed the failure where it was
    originally stored. (This happened to work in serf an neon for years)

  (windows_server_authority_provider): New variable.
  (svn_auth__get_windows_ssl_server_authority_provider): New function.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1534149 13f79535-47bb-0310-9956-ffa450edef68