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

Changeset 876442 is being indexed.

Revert path-test changed of r33424 to show that UNC path support

in the svn_path_*() functions is currently broken.

r33424 removed UNC path support from svn_uri_*() functions and

shouldn't have disabled it for svn_path_*().

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

(test_path_dirname, test_path_canonicalize, test_path_is_ancestor,

test_path_is_canonical): Re-enable old test values.

Follow-up to r35614:

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

(test_path_join): Simplify code.

Suggested by: gstein

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

(test_path_join): Fix compiler warning.

Delete trailing whitespace.

Follow-up to r26317 and r27598.

* build/generator/

* build/generator/

* build/generator/

* contrib/client-side/svnmerge/

* subversion/bindings/ctypes-python/csvn/

* subversion/bindings/ctypes-python/csvn/

* subversion/bindings/ctypes-python/examples/

* subversion/bindings/ctypes-python/

* subversion/bindings/ctypes-python/test/

* subversion/bindings/ctypes-python/test/

* subversion/bindings/ctypes-python/test/

* subversion/bindings/ctypes-python/test/

* subversion/bindings/ctypes-python/test/

* subversion/bindings/javahl/src/org/tigris/subversion/javahl/

* subversion/include/private/svn_auth_private.h:

* subversion/include/private/svn_sqlite.h:

* subversion/include/private/svn_wc_private.h:

* subversion/include/svn_auth.h:

* subversion/include/svn_checksum.h:

* subversion/include/svn_client.h:

* subversion/include/svn_cmdline.h:

* subversion/include/svn_dirent_uri.h:

* subversion/include/svn_path.h:

* subversion/include/svn_props.h:

* subversion/libsvn_client/commit_util.c:

* subversion/libsvn_client/copy.c:

* subversion/libsvn_client/deprecated.c:

* subversion/libsvn_client/export.c:

* subversion/libsvn_client/externals.c:

* subversion/libsvn_client/info.c:

* subversion/libsvn_client/merge.c:

* subversion/libsvn_client/mergeinfo.h:

* subversion/libsvn_client/ra.c:

* subversion/libsvn_client/repos_diff.c:

* subversion/libsvn_fs_base/bdb/checksum-reps-table.c:

* subversion/libsvn_fs_base/bdb/checksum-reps-table.h:

* subversion/libsvn_fs_base/bdb/miscellaneous-table.c:

* subversion/libsvn_fs_base/bdb/reps-table.c:

* subversion/libsvn_fs_base/dag.c:

* subversion/libsvn_fs_base/dag.h:

* subversion/libsvn_fs_base/err.h:

* subversion/libsvn_fs_base/fs.c:

* subversion/libsvn_fs_base/reps-strings.c:

* subversion/libsvn_fs_base/tree.c:

* subversion/libsvn_fs_base/tree.h:

* subversion/libsvn_fs_base/util/fs_skels.c:

* subversion/libsvn_fs_fs/dag.h:

* subversion/libsvn_fs_fs/fs_fs.h:

* subversion/libsvn_fs/fs-loader.c:

* subversion/libsvn_fs/fs-loader.h:

* subversion/libsvn_fs_fs/rep-cache.c:

* subversion/libsvn_fs_fs/rep-cache.h:

* subversion/libsvn_fs_fs/tree.c:

* subversion/libsvn_ra/compat.c:

* subversion/libsvn_ra_neon/log.c:

* subversion/libsvn_ra_neon/session.c:

* subversion/libsvn_ra_serf/log.c:

* subversion/libsvn_ra_serf/update.c:

* subversion/libsvn_ra_serf/util.c:

* subversion/libsvn_ra_serf/win32_auth_sspi.c:

* subversion/libsvn_repos/hooks.c:

* subversion/libsvn_repos/log.c:

* subversion/libsvn_repos/repos.h:

* subversion/libsvn_subr/checksum.c:

* subversion/libsvn_subr/cmdline.c:

* subversion/libsvn_subr/config_file.c:

* subversion/libsvn_subr/config_win.c:

* subversion/libsvn_subr/dirent_uri.c:

* subversion/libsvn_subr/dso.c:

* subversion/libsvn_subr/io.c:

* subversion/libsvn_subr/nls.c:

* subversion/libsvn_subr/simple_providers.c:

* subversion/libsvn_subr/sqlite.c:

* subversion/libsvn_subr/ssl_client_cert_pw_providers.c:

* subversion/libsvn_subr/stream.c:

* subversion/libsvn_subr/win32_crypto.c:

* subversion/libsvn_wc/adm_ops.c:

* subversion/libsvn_wc/diff.c:

* subversion/libsvn_wc/props.c:

* subversion/libsvn_wc/status.c:

* subversion/libsvn_wc/tree_conflicts.c:

* subversion/libsvn_wc/tree_conflicts.h:

* subversion/libsvn_wc/update_editor.c:

* subversion/libsvn_wc/wc_db.h:

* subversion/svn/cl.h:

* subversion/svndumpfilter/main.c:

* subversion/svnlook/main.c:

* subversion/svn/propedit-cmd.c:

* subversion/svn/propget-cmd.c:

* subversion/svnserve/main.c:

* subversion/svn/status-cmd.c:

* subversion/svn/tree-conflicts.c:

* subversion/svn/util.c:

* subversion/tests/cmdline/

* subversion/tests/cmdline/

* subversion/tests/cmdline/

* subversion/tests/cmdline/

* subversion/tests/cmdline/

* subversion/tests/cmdline/

* subversion/tests/cmdline/

* subversion/tests/cmdline/

* subversion/tests/cmdline/svntest/

* subversion/tests/cmdline/svntest/

* subversion/tests/cmdline/

* subversion/tests/cmdline/

* subversion/tests/cmdline/

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

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

* subversion/tests/libsvn_subr/dirent_uri-test.c:

* subversion/tests/libsvn_subr/path-test.c:

* subversion/tests/libsvn_subr/target-test.c:

* subversion/tests/libsvn_wc/tree-conflict-data-test.c:

* tools/examples/ Delete trailing whitespace.

  1. … 112 more files in changeset.
Fix some the svn_uri_canonicalize and svn_canonicalize_path tests on

Windows. Remove the UNC-path test cases for the svn_path functions, as those

are not canonical uris.

Patch by: rhuijben


(Testcases by me.)

* subversion/libsvn_subr/dirent_uri.c

(canonicalize): Only consider '//' as the start of a UNC path when working

with dirents, not uris.

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

(test_path_dirname, test_path_canonicalize,

test_path_is_ancestor, test_path_is_canonical): Comment out UNC-path test

cases. The svn_path functions aren't documented to support UNC paths, and

they don't work for all svn_path functions either.

  1. … 1 more file in changeset.
Add some URL test cases for svn_path_join and document that svn_path_join_many

doesn't support URLs.

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

(test_path_join): Add URL test cases for svn_path_join, make sure they aren't

run for svn_path_join_many.

* subversion/include/svn_path.h

(svn_path_join_many): Add note about URLs not being supported.

  1. … 1 more file in changeset.
Issue #2028: Separate directory entry & URI manipulation function from the

to-be deprecated svn_path functions. Start with svn_dirent_is_root.

* subversion/include/svn_path.h

(svn_dirent_is_root): Remove this declaration here, keep it #ifndef-ed for now

for compatibility reasons.

* subversion/libsvn_subr/path.c

(global): Include "svn_dirent_uri.h"

(svn_dirent_is_root): Remove this function here.

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

(test_dirent_is_root): Remove here.

(test_funcs): Remove test_dirent_is_root here.

* subversion/include/svn_dirent_uri.h

* subversion/libsvn_subr/dirent_uri.c

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

New files, contain declaration, definition & test for svn_dirent_is_root.

* build.conf

(dirent_uri-test): New target.

(__ALL_TESTS__): Add dirent_uri-test.

* subversion/libsvn_subr/target.c

* subversion/libsvn_wc/util.c

* subversion/libsvn_wc/update_editor.c

* subversion/libsvn_wc/lock.c

* subversion/libsvn_client/mergeinfo.c

* subversion/libsvn_client/add.c

* subversion/libsvn_client/commit.c

* subversion/libsvn_repos/repos.c

(global): Include "svn_dirent_uri.h".

  1. … 14 more files in changeset.
Issue #2028: Prepare for move from svn_path* to svn_dirent* and svn_uri* API.

Document current (buggy) behavior of the svn_path* functions in terms of more


Most of this testcases are ressurected from r23906.

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

(test_is_url, test_is_uri_safe, test_join, test_basename, test_dirname,

test_decompose, test_canonicalize, test_remove_component,

test_get_longest_ancestor, test_splitext,

test_compose): Rename to test_path_*.

(test_is_root): Rename to test_dirent_is_root.

(test_path_is_url, test_path_join, test_path_basename,

test_path_dirname, test_path_canonicalize,

test_path_remove_component, test_path_get_longest_ancestor): Add new testcases

for Windows dirents and UNC paths.

(test_funcs): Update to renamed test functions.

Follow up r33254 with some tests.

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


test_is_canonical): Add testcases.

Windows standards dictate drive letters are in upper case, so let's

make svn_path_canonicalize do the same. Our test suite expects the same

as it does case sensitive compares on normalized paths.

Suggested by: rhuijben

* subversion/libsvn_subr/path.c

(svn_path_canonicalize): Change drive letter to upper case instead of


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


test_is_canonical): Update the 'drive letter' test cases.

  1. … 1 more file in changeset.
Follow up r33240 with a fix for the canonicalization of UNC server names.

This should handle the Windows buildbot test failures.

* subversion/libsvn_subr/path.c

(svn_path_canonicalize): Fix decision on when a path is UNC or not.

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


test_is_canonical): Add some basic test cases.

  1. … 1 more file in changeset.
On Windows, convert the disc letter of file:// URIs and the server name of

UNC paths to lower case during canonicalization. This is in line with the

approach chosen to fix issue #2475.

* subversion/libsvn_subr/path.c

(svn_path_canonicalize): Convert drive letter if file:// URIs and server

name in UNC paths to lower case. Adds small optimization for checking

empty hostname paths.

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


test_is_canonical): Add extra test cases for file:// URIs and UNC paths.

  1. … 1 more file in changeset.
Fix issue #2475: scheme and domain name in urls should be handled case


During canonicalization of urls, the scheme and domain name are now converted to

lower case. This is more practical than doing expensive url comparisons where we

use a simple strcmp right now.

As the entries files can now contain non-canonical urls, these will be

canonicalized during wc upgrade.

* subversion/libsvn_subr/path.c

(global): Include apr_uri.h

(svn_path_canonicalize): Convert the scheme and hostname part of a uri to lower


* subversion/include/svn_path.h

(svn_path_canonicalize): Add comment.

* subversion/libsvn_wc/wc.h

(SVN_WC__VERSION): Add comment on changes between wc format 9 and 10.

(SVN_WC__CHANGED_CANONICAL_URLS): Add new tag for wc format 10.

* subversion/libsvn_wc/entries.c

(read_url): New function that reads an url from an entries files and takes into

account the changed canonicalization in wc format 10.

(read_entry): Add argument entries_format for use when reading urls.

(read_entries): Read the format from the entries file.

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


test_is_canonical): Add some extra testcases for case insensitive scheme and


* subversion/tests/cmdline/

(change_case_of_hostname): Utility function, changes case of hostname

of an uri.


path_copy_in_repo_2475): New tests.

(test_list): Run the new tests, both pass.

  1. … 5 more files in changeset.
Canonicalise URIs which have an empty hostname part correctly.

This fixes the crash described in #2116 ('svn log file:///'

results in a failed assertion).

* subversion/libsvn_subr/path.c

(svn_path_canonicalize): We used to strip the trailing slash

of URIs with no hostname, e.g. http:// got canonicalised to http:/

Don't do that!

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

(test_canonicalize): Add some test cases for the above.

* subversion/libsvn_ra_local/split_url.c

(svn_ra_local__split_URL): Treat file:// equivalent to file:///.

This function used to complain about a missing hostname when

just passed "file://". But "file://" is the canonical version

of "file:///", which is equivalent to "file://localhost/".

skip_uri_scheme() (in subversion/libsvn_subr/path.c) and

therefore svn_path_is_url() have been considering "file://"

a valid URL since r14445.

Review by: danielsh

  1. … 2 more files in changeset.
* subversion/libsvn_subr/path-test.c


Add two testcases for trailing slashes.

Fix a bug which caused filenames with a single character before the

extension to not split correctly.

* subversion/libsvn_subr/path.c

(svn_path_splitext): Fix an off-by-one error.

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

(test_splitext): Update test to cover the bug fixed here.

Found by: MsShu

  1. … 1 more file in changeset.
Remove assertions and other debugging code ifdef'd with

NDEBUG if debugging is not enabled at compile time.

So far, this code was always compiled in, even in releases.

In path handling functions, assert that paths supplied

are canonical when debugging is enabled. This isn't new,

some functions already did so before this change, but now

it is consistent, and together with the above change,

doing this now actually makes sense.

* subversion/libsvn_subr/path.c

(is_canonical): Document, extend a little, and rewrite partly

for obviousness. This function has been around for much longer

than svn_path_is_canonical, and tries to provide the same

functionality, but does not quite match up. Confine its use

to functions that don't have a pool around.

(svn_path_join, svn_path_join_many, svn_path_add_component,

svn_path_remove_component, svn_path_dirname, svn_path_basename,

svn_path_is_empty, svn_path_compare_paths, svn_path_is_child,

svn_path_decompose, svn_path_is_single_path_component,

svn_path_split_if_file): When debugging is enabled, assert that

paths supplied are canonical, using svn_path_is_canonical if possible,

otherwise using is_canonical. The API requires all paths supplied to

be canonical. Some of these functions have already done the same

assertion with is_canonical before, but for a few the assertion was

commented out because the call to strlen involved was considered

expensive This is debugging code, it's not supposed to

perform well, it's a safety net.

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

(test_is_single_path_component): Don't use a non-canonical path

in test set, the API being tested here does not support this.

This was only working because the assertion in the function

being tested was commented out.

* Compile with -DNDEBUG if debugging is off.

  1. … 2 more files in changeset.
Add a C test for svn_path_is_canonical.

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

(test_is_canonical): New.

(test_funcs): Run it.

Add some testcases for svn_path* functions.

Note that one of the testcases shows that our use of svn_path functions on both

urls and dir entries is neither well documented nor correct. Solving issue

#1711 should fix this.

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

(test_path_is_ancestor): Add some new testcases.

(test_get_longest_ancestor): ... And here too.

Make the code in skip_uri_scheme() a little clearer and add some more

tests for svn_path_is_url() which uses skip_uri_scheme().

* libsvn_subr/path.c


Add a note that a scheme may not contain a / character.

Have the for loop return early if a / is found before a :.

* tests/libsvn_subr/path-test.c


Add some more corner cases to check svn_path_is_url().

  1. … 1 more file in changeset.
New public svn_path_compose() to mirror svn_path_decompose(), it takes

an apr_array_header_t and returns a path.

* subversion/include/svn_path.h


New function.

* subversion/libsvn_subr/path.c


Implement the new function.

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


New function that checks that

path == svn_path_compose(svn_path_decompose(path))


Add test_compose to this array.

* subversion/bindings/swig/core.i

Tell swig to ignore svn_path_compose() and not to wrap it.

  1. … 3 more files in changeset.
* subversion/tests/libsvn_subr/path-test.c:

Wrap a line to fit within 80 characters.

Channeling Erik Hülsmann, remove all trailing whitespace within our source


for extsn in c h cpp java py pl rb; do

sed -i -e 's/[ \t]*$//' `find . -name "*.$extsn" | xargs grep '[ \t]$' -l`


Inspired by: ehu

  1. … 449 more files in changeset.
Follow up r24755: Fix VS.NET build issue.

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

(test_compare_paths): replace "foo\xe0bar" with "foo\xe0""bar" to avoid

a "too big for character" build error.

Finish issue #2641 - svnadmin dump path ordering bug.

Fix an issue with svn_path_compare_paths()'s ordering logic triggered

by just the wrong combination of paths which use extended ASCII

(high-bit-set) characters.

* subversion/libsvn_subr/path.c

(svn_path_compare_paths): Use an unsigned character comparison

instead of a signed one.

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

(test_compare_paths): Extend this test with data that triggers the

problem case.

  1. … 1 more file in changeset.
Teach svn_path_splitext() to handle dotfiles correctly.

* subversion/libsvn_subr/path.c

(svn_path_splitext): Effectively ignore the first period in a file's

basename when checking for an extension.

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

(test_funcs): No longer expect test_splitext() to fail.

  1. … 1 more file in changeset.
* subversion/tests/libsvn_subr/path-test.c

(test_splitext): Fix and grow the dotfile splitext tests.

Test how svn_path_splitext() handles dotfiles, too.

In IRC, eh, maxb and I agreed that the file ".foo" has no extension,

and the file ".foo.txt" has an extension of "txt". However, this is

not how Python's os.path.splitext() handles said files, and so is not

the way I originally wrote svn_path_splitext(). So, expect this test

to fail now until I fix svn_path_splitext().

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

(test_splitext): Test the handling of dotfiles, too.

(test_funcs): Expect test_splitext() to fail now.

Recover some path tests reverted in r23907.

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

(test_is_root): add testcases for checking root of windows-like path names.

Make it clear that svn_path_is_root only accepts directories, not uri's.

* subversion/include/svn_path.h

* subversion/libsvn_subr/path.c

(svn_path_is_root): renamed this function ...

(svn_dirent_is_root): ... to this, thereby removing ambiguity on the type

of paths that are accepted. Also rename the path parameter to dirent.

(is_canonical): replace svn_path_is_root with svn_dirent_is_root.

Replace svn_path_is_root with svn_dirent_is_root in all these places:

* subversion/libsvn_client/commit.c


* subversion/libsvn_client/merge.c


* subversion/libsvn_repos/repos.c


* subversion/libsvn_subr/target.c


* subversion/libsvn_subr/lock.c


* subversion/libsvn_wc/update_editor.c


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


  1. … 8 more files in changeset.