Checkout Tools
  • last updated 5 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates

Changeset 1719196 is being indexed.

Revert r1719188: It seems APR doesn't report proper position for apr_file_t

with ungotten character while our patch parser relies on that.

* subversion/include/svn_io.h

(svn_io_file_ungetc): Revert r1719188.

* subversion/libsvn_subr/io.c

(svn_io_file_ungetc, svn_io_file_readline): Revert r1719188.

* subversion/tests/libsvn_subr/io-test.c

(test_file_readline, test_file_ungetc,

svn_test_descriptor_t): Revert r1719188.

  1. … 2 more files in changeset.
[Reverted in 1719196]

Use existing APR function in implementation of svn_io_file_readline() for

peeking char after we found '\r' instead of save position and seek back.

* subversion/include/svn_io.h

(svn_io_file_ungetc): New.

* subversion/libsvn_subr/io.c

(svn_io_file_ungetc): New. Wrapper around apr_file_ungetc().

(svn_io_file_readline): Use svn_io_file_ungetc() for peeking char after we

found '\r' instead of save position and seek back.

* subversion/tests/libsvn_subr/io-test.c

(test_file_readline): New test for svn_io_file_readline().

(test_file_ungetc): New test for svn_io_file_ungetc().

(svn_test_descriptor_t): Add test_file_readline and test_file_ungetc.

  1. … 2 more files in changeset.
When getting the default file permissions for a file created outside

the system directory create the necessary temporary files in the

given directory. This removes the disk IO to TMPDIR during the first

commit made by mod_dav_svn and svnserve processes, all disk IO now

happens in the repositories.

* subversion/libsvn_subr/io.c

(get_default_file_perms): Create temporary files in given directory.

(merge_default_file_perms): Add directory parameter.

(svn_io_open_unique_file3): Pass directory.

Implement svn_io_write_atomic2() with FLUSH_TO_DISK flag to control whether

wait or not until file is actually written to disk. The old

svn_io_write_atomic() was flushing data to disk unconditionally.

* subversion/include/svn_io.h

(svn_io_write_atomic2): New function declaration.

(svn_io_write_atomic): Deprecate.

* subversion/libsvn_subr/io.c

(svn_io_write_atomic2): Revv from svn_io_write_atomic() Add FLUSH_TO_DISK

parameter and perform flush to disk only if FLUSH_TO_DISK is non-zero.

* subversion/libsvn_subr/deprecated.c

(svn_io_write_atomic): Call svn_io_write_atomic2() with FLUSH_TO_DISK=TRUE.

* subversion/libsvn_fs_fs/fs_fs.c

* subversion/libsvn_fs_fs/transaction.c

* subversion/libsvn_fs_fs/util.c

* subversion/libsvn_fs_x/fs_x.c

* subversion/libsvn_fs_x/revprops.c

* subversion/libsvn_fs_x/util.c

* subversion/libsvn_wc/workqueue.c

* subversion/mod_dav_svn/activity.c

* subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c

* subversion/tests/libsvn_fs_x/fs-x-pack-test.c

* subversion/tests/libsvn_repos/repos-test.c

(*): Use svn_io_write_atomic2() with FLUSH_TO_DISK=TRUE instead of

svn_io_write_atomic().

  1. … 13 more files in changeset.
Fix some typos in comments, mostly of the 's/then/than' variety.

Found by "grep -i '\([a-z]er\|more\|less\) then'".

  1. … 9 more files in changeset.
Explicitly release file locks on Windows, instead of relying on them to be

automatically unlocked by the OS.

Documentation for LockFileEx() [1] states that, although a process doesn't

necessarily have to release its file locks before closing the handle, it

is not recommended, and a better choice is to explicitly unlock them:

[[[

If a process terminates with a portion of a file locked or closes a file

that has outstanding locks, the locks are unlocked by the operating system.

However, the time it takes for the operating system to unlock these locks

depends upon available system resources. Therefore, it is recommended that

your process explicitly unlock all files it has locked when it terminates.

If this is not done, access to these files may be denied if the operating

system has not yet unlocked them.

]]]

This changeset turns our common locking sequences from

CreateFile → LockFile → (...) → CloseFile

into

CreateFile → LockFile → (...) → UnlockFileSingle → CloseFile

I conducted a couple of performance tests with svnadmin load, setrevprop,

simple commits, parallel short-living svnadmin instances doing work — i.e.,

tests where explicit unlocking could behave differently from delegating this

to OS. There is no noticeable difference, at least on my machine. So, we

do this not because it causes visible effects in common scenarios, but just

to follow the recommended practice and reduce the chance of encountering a

hard-to-diagnose problem.

Here is one of the performance tests that I used:

[[[

def lock_performance(sbox):

"lock performance"

sbox.build(create_wc=False)

input_file = sbox.get_tempname()

svntest.main.file_write(input_file, 'New log message')

def setlog(n):

svntest.actions.run_and_verify_svnadmin([], [], 'setrevprop', '-r1',

sbox.repo_dir, 'prop' + str(n),

input_file)

import multiprocessing.dummy

start = time.time()

p = multiprocessing.dummy.Pool()

results = p.map(setlog, range(2000))

p.close()

p.join();

stop = time.time()

logger.info('<TOTAL TIME = %.6f>' % (stop - start))

]]]

[1] https://msdn.microsoft.com/en-us/library/windows/desktop/aa365203

Found by: ivan

* subversion/libsvn_subr/io.c

(file_clear_locks): Always compile this function.

(svn_io_lock_open_file, svn_io_unlock_open_file): Install and remove pool

cleanup handlers on all platforms. Update the corresponding comments.

Do not attempt convert arbitrary apr_status_t to OS error to check it for

OS specific codes.

* subversion/libsvn_subr/io.c

(svn_io_open_uniquely_named, svn_io_dir_remove_nonrecursive,

temp_file_create): Use 'apr_err == APR_FROM_OS_ERROR(os_error)' pattern

instead of 'APR_TO_OS_ERROR(apr_err) == os_error'.

Fix Access Denied errors on checkout/update with working copies stored on

SMBv1 network shares.

Discussion: http://svn.haxx.se/dev/archive-2015-09/0054.shtml

Patch by: rhuijben

me

* subversion/libsvn_subr/io.c

(svn_io__win_rename_open_file): Return SVN_ERR_UNSUPPORTED_FEATURE if

SetFileInformationByHandle() returns ERROR_ACCESS_DENIED. Windows seems

to do not support performing rename operation twice using same file handle

for SMBv1 network shares and return ERROR_ACCESS_DENIED in this without

even sending request to SMB server. The caller will fall back to normal

close + rename in this case.

Remove unused argument from static function. No functional changes

intended.

* subversion/libsvn_subr/io.c

(win32_file_rename): Remove POOL argument.

(svn_io_file_rename2): Adapt calls to win32_file_rename().

Fix spurious 'Access Denied' errors during checkout or commit on Windows

reported on TortoiseSVN users mailing list [1].

The issue can be reproduced locally even though known problems reports are

with working copies stored on network share. The reproduction script is:

1. Checkout working copy with a file 'foo'

2. Run 'for /L %I in (1,1,50000000) do type foo' command in background to

emulate indexers/antivirus scanners

3. Modify file 'foo' in repository via another working copy.

4. Update the original working copy with 'type foo' running

The real fix is to add retry loop for SetFileInformationByHandle() call. All

other changes are refactoring to move existing platform specific code from

libsvn_subr/stream.c to libsvn_subr/io.c to use WIN32_RETRY_LOOP macro. We

already have retry loops for almost all IO operations on Windows.

[1] http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3134203

* subversion/include/private/svn_io_private.h

(svn_io__win_delete_file_on_close, svn_io__win_rename_open_file): Declare

new library private functions.

* subversion/libsvn_subr/io.c

(FILE_RENAME_INFO, FILE_DISPOSITION_INFO, FileRenameInfo,

FileDispositionInfo, SetFileInformationByHandle_t,

set_file_information_by_handle_proc): Move it here from

libsvn_subr/stream.c.

(win_init_dynamic_imports): Obtain pointer to SetFileInformationByHandle().

(win32_set_file_information_by_handle): New helper.

(svn_io__win_delete_file_on_close): New. Implementation extracted from

svn_stream__install_delete().

(svn_io__win_rename_open_file): New. Implementation extracted from

svn_stream__install_stream(). Retry operation on Access Denied errors.

* subversion/libsvn_subr/stream.c

(FILE_RENAME_INFO, FILE_DISPOSITION_INFO, SetFileInformationByHandle_t):

Move to libsvn_subr/io.c.

(SetFileInformationByHandle, SetFileInformationByHandle_a,

find_SetFileInformationByHandle): Remove.

(svn_stream__install_stream): Use svn_io__win_rename_open_file().

(svn_stream__install_delete): Use svn_io__win_delete_file_on_close().

  1. … 2 more files in changeset.
* subversion/libsvn_subr/io.c

(win_init_dynamic_imports): Check return value from

GetModuleHandle("kernel32.dll") for NULL even it's almost impossible

situation.

* subversion/libsvn_subr/io.c: Call svn_io_file_rename2() with

FLUSH_TO_DISK=TRUE and remove posix-specific flushing to disk, since

svn_io_file_rename2() will do this for us.

Implement svn_io_file_rename2() with FLUSH_TO_DISK flag to require OS to

wait until rename operation is actually written to disk. Discussed in thread

"svn commit: r1682265 - /subversion/trunk/subversion/libsvn_fs_fs/util.c" on

dev@s.a.o [1]

[1] http://svn.haxx.se/dev/archive-2015-05/0211.shtml

* subversion/include/svn_io.h

(svn_io_file_rename2): New function declaration.

(svn_io_file_rename): Deprecate.

* subversion/libsvn_subr/io.c

(win32_file_rename): Use MOVEFILE_WRITE_THROUGH flag in call to

MoveFileExW if FLUSH_TO_DISK is non-zero.

(svn_io_file_rename2): Revv from svn_io_file_rename(). Add FLUSH_TO_DISK

parameter and perform flush to disk operation depending on the platform:

use MoveFileEx flag on Windows, fsync() target directory on POSIX and

fsync() target file on all other platforms. This logic mostly copied

from svn_fs_fs__move_into_place().

(svn_io_copy_link, svn_io_copy_file, svn_io_write_atomic,

svn_io_write_version_file): Use svn_io_rename2() with

FLUSH_TO_DISK=FALSE instead of svn_io_rename().

* subversion/tests/libsvn_subr/io-test.c

(test_file_rename2): Simple tests for svn_io_file_rename2().

(test_funcs): Add test_file_rename2.

* subversion/libsvn_subr/deprecated.c

(svn_io_file_rename): Call svn_io_file_rename2() with FLUSH_TO_DISK=FALSE.

* subversion/libsvn_client/copy.c

* subversion/libsvn_client/export.c

* subversion/libsvn_client/externals.c

* subversion/libsvn_fs_fs/fs_fs.c

* subversion/libsvn_fs_fs/lock.c

* subversion/libsvn_fs_fs/transaction.c

* subversion/libsvn_fs_fs/util.c

* subversion/libsvn_fs_x/lock.c

* subversion/libsvn_fs_x/transaction.c

* subversion/libsvn_fs_x/util.c

* subversion/libsvn_subr/config_auth.c

* subversion/libsvn_subr/stream.c

* subversion/libsvn_subr/subst.c

* subversion/libsvn_wc/copy.c

* subversion/libsvn_wc/node.c

* subversion/libsvn_wc/upgrade.c

* subversion/libsvn_wc/wc_db_pristine.c

* subversion/libsvn_wc/workqueue.c

(*): Use svn_io_file_rename2() with FLUSH_TO_DISK=FALSE instead of

svn_io_file_rename().

  1. … 21 more files in changeset.
Follow-up to r1687583: Fix svn_io_file_rename() on OS/2.

* subversion/libsvn_subr/io.c

(svn_io_file_rename): Restore call to apr_file_rename() on OS/2 like it

was before r1687583.

Where feasible, we want use simple definedness tests with our SVN_*

preprocessor flag macros. So, make SVN_ON_POSIX comply to this policy.

* subversion/include/private/svn_dep_compat.h

(SVN_ON_POSIX): Switch from a value-based preprocessor flag to simple

definedness.

* subversion/libsvn_fs_fs/util.c

(svn_fs_fs__move_into_place): Update SVN_ON_POSIX check.

* subversion/libsvn_fs_x/batch_fsync.c

(svn_fs_x__batch_fsync_new_path): Same.

* subversion/libsvn_subr/io.c

(svn_io_write_atomic): Same.

Suggested by: brane

  1. … 3 more files in changeset.
Add workaround for APR problem that apr_file_rename() performs cross-volume

renames non-atomically on Windows.

* subversion/libsvn_subr/io.c

(win32_file_rename): New. Windows specific re-implementation of

apr_file_rename().

(svn_io_file_rename): Use win32_file_rename() on Windows and keep the

code for other platforms unchanged

* subversion/libsvn_subr/io.c

(svn_io_file_flush_to_disk): Make the error handling consistent to other

functions by including the file name in the

error message.

Remove unnecessary code in svn_io_file_move().

* subversion/libsvn_subr/io.c

(svn_io_file_move): Do not copy to temporary file for cross-volume moves,

because svn_io_copy_file() already performs atomic copy via temporary

file.

Fix our usage of fsync usage on non-Linux POSIX platforms.

They all share the "directory contains the file name" property.

* subversion/include/private/svn_dep_compat.h

(SVN_ON_POSIX): New define.

* subversion/libsvn_fs_fs/util.c

(svn_fs_fs__move_into_place): Always sync the parent directory when

we are on POSIX - not just for Linux.

* subversion/libsvn_subr/io.c

(svn_io_write_atomic): Same.

  1. … 2 more files in changeset.
Use consistent form for cancel callback invocation. No functional changes

intended.

* subversion/libsvn_fs_fs/revprops.c

* subversion/libsvn_fs_x/revprops.c

* subversion/libsvn_subr/io.c

* subversion/libsvn_wc/upgrade.c

(svn_fs_fs__delete_revprops_shard, svn_fs_x__delete_revprops_shard,

svn_io_remove_dir2, svn_wc__wipe_postupgrade): Use "cancel_func(baton)"

form instead of "(*cancel_func)(baton)" like we in all other code.

  1. … 3 more files in changeset.
Add new svn_io_file_size_get() function: lightweight variant of

svn_io_file_info_get() that returns only filesize of opened file.

* subversion/libsvn_subr/io.c

* subversion/include/svn_io.h

(svn_io_file_size_get): New.

* subversion/tests/libsvn_subr/io-test.c

(test_file_size_get): New test for svn_io_file_size_get() function.

(test_funcs): Add test_file_size_get to test list.

  1. … 2 more files in changeset.
Coding nanny: Remove duplicate ";" at the end of statements.

No functional change.

* subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigImpl_Category.cpp

(Java_org_apache_subversion_javahl_util_ConfigImpl_00024Category_enumerate): Here.

* subversion/libsvn_client/export.c

(svn_client_export5): And here.

* subversion/libsvn_fs_base/fs.c

(base_create): And here.

* subversion/libsvn_subr/io.c

(io_win_file_attrs_set): And here.

* subversion/svn/conflict-callbacks.c

(handle_text_conflict): And here.

  1. … 4 more files in changeset.
* subversion/libsvn_subr/io.c

(svn_io_file_move): Compose errors instead of dropping them. Add tracing.

Update pool argument names in functions added to the svn_io.h API in 1.9.

No functional change intended.

* subversion/include/svn_io.h

(svn_io_file_create_bytes,

svn_io_file_create_empty): The pool argument is actually a SCRATCH_POOL.

(svn_stringbuf_from_stream): The pool argument is a pure RESULT_POOL.

(svn_io_file_aligned_seek): The pool argument is actually a SCRATCH_POOL.

* subversion/libsvn_subr/io.c

(svn_io_file_create_bytes,

svn_io_file_create_empty,

svn_io_file_aligned_seek): Update implementation.

* subversion/libsvn_subr/stream.c

(svn_stringbuf_from_stream): Same.

  1. … 2 more files in changeset.
Introduce svn_error_quick_wrapf(), a variable-arguments version of

svn_error_quick_wrap(). Use it to simplify previous uses of the latter.

* subversion/include/svn_error.h

* subversion/libsvn_subr/error.c

(svn_error_quick_wrapf): New function and macro of the same name.

* subversion/libsvn_fs_fs/hotcopy.c

(hotcopy_body): Use it.

* subversion/libsvn_subr/io.c

(svn_io_copy_perms,

svn_io_open_unique_file3): Use it.

* subversion/libsvn_wc/wc_db.c

(read_info): Use it.

* subversion/libsvn_wc/wc_db_wcroot.c

(svn_wc__db_wcroot_parse_local_abspath): Use it.

* subversion/svnbench/svnbench.c

(sub_main): Use it.

* subversion/svn/svn.c

(sub_main): Use it.

  1. … 7 more files in changeset.
Apply the standard pre-branch whitespace cleanup via

tools/dev/remove-trailing-whitespace.zsh

There should be no functional changes.

* .ycm_extra_conf.py

* build/generator/gen_win.py

* build/generator/gen_win_dependencies.py

* subversion/bindings/javahl/native/EditorProxy.h

* subversion/bindings/javahl/native/StateReporter.cpp

* subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigImpl_Category.cpp

* subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c

* subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.h

* subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c

* subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c

* subversion/bindings/swig/ruby/test/test_fs.rb

* subversion/bindings/swig/ruby/test/util.rb

* subversion/bindings/swig/ruby/test/windows_util.rb

* subversion/include/private/svn_fs_fs_private.h

* subversion/include/private/svn_packed_data.h

* subversion/include/private/svn_repos_private.h

* subversion/include/private/svn_sorts_private.h

* subversion/include/private/svn_subr_private.h

* subversion/include/private/svn_wc_private.h

* subversion/include/svn_auth.h

* subversion/include/svn_cache_config.h

* subversion/include/svn_client.h

* subversion/include/svn_cmdline.h

* subversion/include/svn_diff.h

* subversion/include/svn_fs.h

* subversion/include/svn_io.h

* subversion/include/svn_ra.h

* subversion/include/svn_repos.h

* subversion/include/svn_string.h

* subversion/libsvn_client/blame.c

* subversion/libsvn_client/commit.c

* subversion/libsvn_client/commit_util.c

* subversion/libsvn_client/copy.c

* subversion/libsvn_client/diff.c

* subversion/libsvn_client/externals.c

* subversion/libsvn_client/log.c

* subversion/libsvn_client/patch.c

* subversion/libsvn_client/ra.c

* subversion/libsvn_client/update.c

* subversion/libsvn_delta/svndiff.c

* subversion/libsvn_diff/parse-diff.c

* subversion/libsvn_fs/fs-loader.c

* subversion/libsvn_fs_base/lock.c

* subversion/libsvn_fs_fs/cached_data.c

* subversion/libsvn_fs_fs/fs_fs.c

* subversion/libsvn_fs_fs/hotcopy.c

* subversion/libsvn_fs_fs/id.c

* subversion/libsvn_fs_fs/index.c

* subversion/libsvn_fs_fs/index.h

* subversion/libsvn_fs_fs/lock.c

* subversion/libsvn_fs_fs/low_level.c

* subversion/libsvn_fs_fs/low_level.h

* subversion/libsvn_fs_fs/pack.c

* subversion/libsvn_fs_fs/recovery.c

* subversion/libsvn_fs_fs/rev_file.c

* subversion/libsvn_fs_fs/revprops.c

* subversion/libsvn_fs_fs/revprops.h

* subversion/libsvn_fs_fs/stats.c

* subversion/libsvn_fs_fs/transaction.c

* subversion/libsvn_fs_fs/tree.c

* subversion/libsvn_fs_fs/verify.c

* subversion/libsvn_fs_x/cached_data.c

* subversion/libsvn_fs_x/changes.c

* subversion/libsvn_fs_x/dag.h

* subversion/libsvn_fs_x/fs.h

* subversion/libsvn_fs_x/fs_id.c

* subversion/libsvn_fs_x/fs_x.c

* subversion/libsvn_fs_x/hotcopy.c

* subversion/libsvn_fs_x/hotcopy.h

* subversion/libsvn_fs_x/index.c

* subversion/libsvn_fs_x/index.h

* subversion/libsvn_fs_x/lock.c

* subversion/libsvn_fs_x/lock.h

* subversion/libsvn_fs_x/low_level.c

* subversion/libsvn_fs_x/low_level.h

* subversion/libsvn_fs_x/noderevs.c

* subversion/libsvn_fs_x/pack.c

* subversion/libsvn_fs_x/reps.c

* subversion/libsvn_fs_x/rev_file.c

* subversion/libsvn_fs_x/revprops.c

* subversion/libsvn_fs_x/revprops.h

* subversion/libsvn_fs_x/string_table.c

* subversion/libsvn_fs_x/string_table.h

* subversion/libsvn_fs_x/transaction.c

* subversion/libsvn_fs_x/tree.c

* subversion/libsvn_fs_x/util.c

* subversion/libsvn_fs_x/verify.c

* subversion/libsvn_ra_local/ra_plugin.c

* subversion/libsvn_ra_serf/ra_serf.h

* subversion/libsvn_ra_serf/serf.c

* subversion/libsvn_ra_serf/update.c

* subversion/libsvn_ra_serf/util.c

* subversion/libsvn_ra_svn/client.c

* subversion/libsvn_ra_svn/marshal.c

* subversion/libsvn_repos/authz_pool.c

* subversion/libsvn_repos/config_pool.c

* subversion/libsvn_repos/dump.c

* subversion/libsvn_repos/fs-wrap.c

* subversion/libsvn_repos/log.c

* subversion/libsvn_subr/bit_array.c

* subversion/libsvn_subr/cache-membuffer.c

* subversion/libsvn_subr/config.c

* subversion/libsvn_subr/dirent_uri.c

* subversion/libsvn_subr/fnv1a.c

* subversion/libsvn_subr/gpg_agent.c

* subversion/libsvn_subr/hash.c

* subversion/libsvn_subr/io.c

* subversion/libsvn_subr/object_pool.c

* subversion/libsvn_subr/packed_data.c

* subversion/libsvn_subr/prefix_string.c

* subversion/libsvn_subr/sorts.c

* subversion/libsvn_subr/sqlite.c

* subversion/libsvn_subr/subst.c

* subversion/libsvn_subr/sysinfo.c

* subversion/libsvn_subr/types.c

* subversion/libsvn_subr/utf.c

* subversion/libsvn_subr/utf8proc/utf8proc_data.c

* subversion/libsvn_subr/x509info.c

* subversion/libsvn_wc/diff.h

* subversion/libsvn_wc/props.c

* subversion/libsvn_wc/update_editor.c

* subversion/libsvn_wc/wc.h

* subversion/libsvn_wc/wc_db.c

* subversion/libsvn_wc/wc_db.h

* subversion/mod_dav_svn/lock.c

* subversion/mod_dav_svn/mod_dav_svn.c

* subversion/mod_dav_svn/status.c

* subversion/svn/auth-cmd.c

* subversion/svn/info-cmd.c

* subversion/svn/mergeinfo-cmd.c

* subversion/svn/notify.c

* subversion/svn/propget-cmd.c

* subversion/svn/svn.c

* subversion/svnadmin/svnadmin.c

* subversion/svnserve/logger.c

* subversion/svnserve/serve.c

* subversion/svnserve/server.h

* subversion/svnserve/svnserve.c

* subversion/tests/cmdline/blame_tests.py

* subversion/tests/cmdline/checkout_tests.py

* subversion/tests/cmdline/commit_tests.py

* subversion/tests/cmdline/export_tests.py

* subversion/tests/cmdline/externals_tests.py

* subversion/tests/cmdline/lock_tests.py

* subversion/tests/cmdline/merge_tests.py

* subversion/tests/cmdline/merge_tree_conflict_tests.py

* subversion/tests/cmdline/move_tests.py

* subversion/tests/cmdline/redirect_tests.py

* subversion/tests/cmdline/stat_tests.py

* subversion/tests/cmdline/svnadmin_tests.py

* subversion/tests/cmdline/switch_tests.py

* subversion/tests/cmdline/update_tests.py

* subversion/tests/libsvn_client/client-test.c

* subversion/tests/libsvn_client/mtcc-test.c

* subversion/tests/libsvn_fs/fs-test.c

* subversion/tests/libsvn_fs/locks-test.c

* subversion/tests/libsvn_fs_fs/fs-fs-fuzzy-test.c

* subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c

* subversion/tests/libsvn_fs_x/fs-x-pack-test.c

* subversion/tests/libsvn_fs_x/string-table-test.c

* subversion/tests/libsvn_ra/ra-test.c

* subversion/tests/libsvn_subr/cache-test.c

* subversion/tests/libsvn_subr/checksum-test.c

* subversion/tests/libsvn_subr/config-test.c

* subversion/tests/libsvn_subr/io-test.c

* subversion/tests/libsvn_subr/packed-data-test.c

* subversion/tests/libsvn_subr/priority-queue-test.c

* subversion/tests/libsvn_subr/sqlite-test.c

* subversion/tests/libsvn_subr/string-test.c

* subversion/tests/libsvn_subr/subst_translate-test.c

* subversion/tests/libsvn_subr/x509-test.c

* subversion/tests/libsvn_wc/op-depth-test.c

* subversion/tests/svn_test_main.c

* tools/dev/benchmarks/RepoPerf/copy_repo.py

* tools/dev/benchmarks/RepoPerf/win_repo_bench.py

* tools/dev/build-svn-deps-win.pl

* tools/dev/fsfs-access-map.c

* tools/dev/po-merge.py

* tools/dev/x509-parser.c

* tools/diff/diff.c

* tools/dist/backport.pl

* tools/dist/backport_tests.py

* tools/hook-scripts/mailer/mailer.py

* tools/server-side/svnpubsub/daemonize.py

* win-tests.py

Remove unneeded whitespace via script.

  1. … 184 more files in changeset.
Following up on r1657525, r1657530 improve the win32 retry loop by testing

for a few error cases before waiting for 12 seconds.

* subversion/libsvn_subr/io.c

(file_open): Check a few cases before going into the dumb retry loop for

12 seconds.

Simplify the WIN32-specific part of svn_io_remove_file2() by removing the

inner scope.

* subversion/libsvn_subr/io.c

(svn_io_remove_file2): Drop the local variable 'apr_status_t os_err' in

favor of a single conditional statement. After that, remove the inner

scope, which is no longer unnecessary.

Simplify the ENOENT handling within svn_io_remove_file2().

On Windows, this function might call apr_file_remove() more than once due

to a special handling of access denied errors. However, handling access

denied errors doesn't somehow intersect with ENOENTs, so we can check for

ENOENT only once. Do that right before exiting from the function.

See the related discussion in http://svn.haxx.se/dev/archive-2015-01/0121.shtml

Message-ID:<CAP_GPNhjxoLzo7GwmGtYmb=UXGYai68KK6zVW4fGo9FYRwMAwQ@mail.gmail.com>

* subversion/libsvn_subr/io.c

(svn_io_remove_file2): Consolidate two checks into one and perform it when

we are about to return from this function. The corresponding explanatory

comment is no longer required. While here, also make the conditional

statements a bit more readable by splitting them.

* subversion/libsvn_subr/io.c

(svn_io_remove_file2): Ensure Windows does not return an ENOENT error

when ignore_enoent is set and the retry loop is triggered.