Checkout Tools
  • last updated 1 hour ago
Constraints: committers
Constraints: files
Constraints: dates

Changeset 1818578 is being indexed.

Fix svn_repos_stat() implemention for directories to match the svn_dirent_t


* subversion/libsvn_repos/list.c

(fill_dirent): Make sure SIZE is 0 for directories.

Make the 'svn ls --search' implementation actually case- and accent-

insensitive. The option handling of '--search' already assumes it

but the implementation did not follow up.

That's easily done by using the same generic UTF8-based normalization

to the path segments as 'svn' applies to the patterns. To reduce code

duplication, move the normalization and matching function to lib_subr.

And because there isn't really a better place to put it, add it to


* subversion/include/private/svn_utf_private.h

(svn_utf__fuzzy_glob_match): Declare new private API.

* subversion/libsvn_subr/utf8proc.c

(svn_utf__fuzzy_glob_match): Implement the function, code mostly taken

from list.c.

* subversion/libsvn_client/list.c

(match_patterns): Forward to the new matching function.

(get_dir_contents): Add SCRATCH_BUFFER as a pass-through argument.

(list_internal): Provide the SCRATCH_BUFFER.

* subversion/libsvn_repos/list.c



svn_repos_list): Mirror the changes from the client side above.

  1. … 3 more files in changeset.
Fix design bug in svn_client_list4()/svn_ra_list()/svn_repos_list() APIs.

* subversion/include/svn_client.h (svn_client_list4):

Make the patterns array const. All dependencies and references updated.

* subversion/include/svn_ra.h (svn_ra_list): Likewise.

* subversion/include/svn_repos.h (svn_repos_list): Likewise.

* subversion/libsvn_client/list.c

(list_externals, list_internal, match_patterns,

get_dir_contents, list_external_items, svn_client_list4):

Make patterns array const.

* subversion/libsvn_ra/ra_loader.h (svn_ra__vtable_t::list): Likewise.

* subversion/libsvn_ra/ra_loader.c (svn_ra_list): Likewise.

* subversion/libsvn_ra_local/ra_plugin.c (svn_ra_local__list): Likewise.

* subversion/libsvn_ra_svn/client.c (ra_svn_list): And again.

* subversion/libsvn_repos/list.c (matches_any, do_list, svn_repos_list):

And some more of the same.

  1. … 8 more files in changeset.
Change the svn_*_list APIs to use NULL as the "don't filter by pattern"

parameter instead of an empty pattern list.

Suggested by: Patrick Steinhardt (patrick.steinhardt at

* subversion/include/svn_repos.h

(svn_repos_list): Document the new PATTERN options behavior.

* subversion/libsvn_repos/list.c

(matches_any): Implement the new behavior.

(svn_repos_list): Empty lists will almost always be created by dumb

scripts. It's probably a good idea to explicitly

not waste any resources in the degenerate case.

* subversion/include/svn_ra.h

(svn_ra_list): Document the new PATTERN options behavior.

* subversion/libsvn_ra_svn/protocol

(3.1.1. Main Command Set): The patterns list in the list command is

now optional.

* subversion/libsvn_subr/log.c

(svn_log__list): Make the logging cope with NULL pattern lists.

* subversion/svnserve/serve.c

(list): Receive NULL for PATTERNS, if no list was received.

* subversion/libsvn_ra_svn/client.c

(ra_svn_list): Omit the pattern list entirely, if patterns is NULL.

* subversion/include/svn_client.h

(svn_client_list4): Document the new PATTERN options behavior.

(svn_client_list3): Update docstring.

* subversion/libsvn_client/deprecated.c

(svn_client_list3): Update implementation.

* subversion/libsvn_client/list.c

(match_patterns): Implement the new behavior.

(list_internal): Update docstring.

* subversion/svn/list-cmd.c

(svn_cl__list): If no patterns were specified, pass NULL to the API.

* subversion/svnbench/null-list-cmd.c

(svn_cl__null_list): Same.

  1. … 11 more files in changeset.
Fix 'svn ls' with authz broken by the introduction of svn_repos_list.

* subversion/libsvn_repos/list.c

(do_list): Actually check against the current path instead of the base.

Make ra_local tests pass again:

Handle edge and error cases for list the same as in the client-only code.

* subversion/libsvn_repos/list.c

(svn_repos_list): Allow 'list' for file nodes and use the same error

code for nodes that are neither file nor directory.

Finalize the svn_repos_list interface: Name scratch pools explicitly.

* subversion/include/svn_repos.h


svn_repos_list): The pools given here are pure SCRATCH_POOLs.

* subversion/libsvn_repos/list.c




svn_repos_list): Same.

  1. … 1 more file in changeset.
Make the new svn_repos_list easier to use with typical client requests.

Instead of a single pattern, accept an array of alternative patterns of

which at least one must match if any patterns are given. Sort the output

by path to make it match the client-side implementation's output order.

* subversion/include/svn_repos.h

(svn_repos_list): We now support multiple glob patterns and sort the


* subversion/libsvn_repos/list.c

(matches_any): New utility function for matching against an array

instead of a single pattern.

(report_dirent): For efficiency reasons, we now filter early before

calling this reporter function.


compare_filtered_dirent): New filtering and sorting support.

(do_list): Support multiple PATTERNS. Filter and sort the data before

processing it further.

(svn_repos_list): Update signature, filtering and passing of parameters.

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

(test_list): Adapt test case to interface change.

  1. … 2 more files in changeset.
Fix a copy-n-pasto in the new svn_repos_list code.

Found by: danielsh

* subversion/libsvn_repos/list.c

(svn_repos_list): The DEPTH parameter is relevant for the top-level dir.

Introduce a "directory list" operation at the repos layer. This is the

first step towards an efficient implementation of 'svn list -r'.

The function is straight-forward with support for operation depth and

authz. One important use-case is "find files". To support this with

minimal system load, the function allows to specify a glob pattern for

the file name and has an option to only report path and node type.

* subversion/include/svn_repos.h


svn_repos_list): The new API.

* subversion/libsvn_repos/list.c

(*): New file implementing the new API. Noteworthy:

(fill_dirent): Factored out from ...

(svn_repos_stat): ... this, which has been moved here from repos.c

* subversion/libsvn_repos/repos.c

(svn_repos_stat): Move from here to list.c due to shared code.

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

(test_list): Simple test-case for the new function.

(test_funcs): Register new test.

  1. … 3 more files in changeset.