Author: stefan2 Date: Sat Dec 17 11:50:50 2011 New Revision: 1215468 URL: http://svn.apache.org/viewvc?rev=1215468&view=rev Log: On file_handle_cache branch: Remove svn_file_handle_cache__has_file() function since it is no longer being used.
* subversion/include/private/svn_file_handle_cache.h (svn_file_handle_cache__has_file): remove declaration * subversion/libsvn_subr/svn_file_handle_cache.c (svn_file_handle_cache__has_file): remove implementation Modified: subversion/branches/file-handle-cache/subversion/include/private/svn_file_handle_cache.h subversion/branches/file-handle-cache/subversion/libsvn_subr/svn_file_handle_cache.c Modified: subversion/branches/file-handle-cache/subversion/include/private/svn_file_handle_cache.h URL: http://svn.apache.org/viewvc/subversion/branches/file-handle-cache/subversion/include/private/svn_file_handle_cache.h?rev=1215468&r1=1215467&r2=1215468&view=diff ============================================================================== --- subversion/branches/file-handle-cache/subversion/include/private/svn_file_handle_cache.h (original) +++ subversion/branches/file-handle-cache/subversion/include/private/svn_file_handle_cache.h Sat Dec 17 11:50:50 2011 @@ -74,16 +74,6 @@ svn_file_handle_cache__open(svn_file_han apr_pool_t *pool); /** - * Efficiently check whether the file handle cache @a cache holds an open - * handle to the file named @a fname. This is basically an efficient way - * to check that a file exists. However, a @c FALSE result does not mean - * that the respective file does not exist. - */ -svn_boolean_t -svn_file_handle_cache__has_file(svn_file_handle_cache_t *cache, - const char *fname); - -/** * Return the APR level file handle underlying the cache file handle @a f. * Returns NULL, if @a f is NULL, has already been closed or otherwise * invalidated. Modified: subversion/branches/file-handle-cache/subversion/libsvn_subr/svn_file_handle_cache.c URL: http://svn.apache.org/viewvc/subversion/branches/file-handle-cache/subversion/libsvn_subr/svn_file_handle_cache.c?rev=1215468&r1=1215467&r2=1215468&view=diff ============================================================================== --- subversion/branches/file-handle-cache/subversion/libsvn_subr/svn_file_handle_cache.c (original) +++ subversion/branches/file-handle-cache/subversion/libsvn_subr/svn_file_handle_cache.c Sat Dec 17 11:50:50 2011 @@ -730,43 +730,6 @@ svn_file_handle_cache__open(svn_file_han return unlock_cache(cache, err ? err : open_entry(f, cache, entry, pool)); } -/* Efficiently check whether the file handle cache CACHE holds an open - * handle to the file named FNAME. This is basically an efficient way to - * check that a file exists. However, a FALSE result does not mean that - * the respective file does not exist. - */ -svn_boolean_t -svn_file_handle_cache__has_file(svn_file_handle_cache_t *cache, - const char *fname) -{ - svn_boolean_t result = FALSE; - - if (cache != NULL) - { - /* lock the cache and look for a used cache entry, i.e. an open - * APR level file handle. Only if the latter exists, we know for - * sure the file exists. Default to "FALSE" otherwise. - */ - svn_error_t *err = lock_cache(cache); - if (!err) - result = find_first(cache, fname) ? TRUE : FALSE; - - /* unlock the cache and return "file not cached" upon any error - * since this is the safe default. - */ - if (!err) - err = unlock_cache(cache, err); - - if (err) - { - svn_error_clear(err); - result = FALSE; - } - } - - return result; -} - /* Return the APR level file handle underlying the cache file handle F. * Returns NULL, if f is NULL, has already been closed or otherwise * invalidated.