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

Changeset 866987 is being indexed.

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.
Reverted the windows path handling code added to fix issue #1711 and #2556.

It seems that most path functions are used to handle both uri's and local

directories. While that's no problem on posix platforms, on windows an uri

'c:hi/test' should be handled different than the directory 'c:hi/test'.

More info on the dev mailing list archive:

Reverted revs: r23761, r23757, r22553, r22544, r22542, r22458, r22381,

r22349, r21621, r21591 and r21369.

* subversion/libsvn_subr/path.c: remove all windows-path handling specific

modifications to the existing path functions.

(svn_path_is_root): kept this function for now, as it's already used to

fix issue elsewhere.

* subversion/include/svn_path.h:

(svn_path_is_absolute): removed function

* subversion/tests/libsvn_subr/path-test.c: remove all windows-path handling

specific tests for the path functions.

* subversion/tests/cmdline/

(update_wc_on_windows_drive): test is now failing, mark as XFail

* subversion/tests/cmdline/

(verify_windows_paths_in_repos): test is now passing

* subversion/tests/cmdline/

(windows_paths_in_repos): test is now passing

  1. … 5 more files in changeset.
Fix for issue #2739: avoid aborting when committing in a working copy on the

root of a drive, don't try to lock the parent folder of '/'.

* subversion/libsvn_subr/path.c

(get_path_ancestor_length): make '/' the shared common part of '/folder1' and


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

(test_get_longest_ancestor): add test case for above scenario

  1. … 1 more file in changeset.
Follow-up to r23303 : more unit tests for svn_path_splitext.

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

(test_splitext): add extra test cases

Follow-up to r23303, fixing some minor stuff found in a review of that

commit by Peter Lundblad <>.

* subversion/include/svn_path.h

(svn_path_dirname): Fix some typos.

* subversion/libsvn_subr/path.c

(svn_path_splitext): Add an early out when NULL is passed for both

path_root and path_ext. Also, simplify the last-slash search to

look only after the last period.

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

(test_splitext): Test calls to svn_path_splitext() where NULL is

provided for each of the path_root and path_ext return parameters.

  1. … 2 more files in changeset.
Introduce a new svn_path_splitext() function, our version of Python's

os.path.splitext(). I'll be using this for MIME-type autodetection stuff.

* subversion/include/svn_path.h,

* subversion/libsvn_subr/path.c

(svn_path_splitext): New.

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

(test_splitext): New test of the svn_path_splitext() function.

(test_funcs): Add a reference to the new test_splitext() function.

  1. … 2 more files in changeset.
Final fixes to make the path functions support Windows and UNC paths on

Windows and Cygwin.

* subversion/libsvn_subr/path.c

(svn_path_join): add separator only when needed.

(svn_path_join_many): reimplement to avoid calls to svn_path_is_root, add

separator only when needed.

(svn_path_remove_component): can't remove components from root paths.

(get_path_ancestor_length): fix handling of UNC paths and some special

cases of Windows paths.

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

(test_funcs): mark test_get_longest_ancestor, test_remove_component and

test_join as PASSing.

  1. … 1 more file in changeset.
Fix some path functions to support windows and UNC paths (again), both on

Win32 and Cygwin.

* subversion/libsvn_subr/path.c

(svn_path_dirname): don't try to split a root path in segments. Add support

for Windows paths on Cygwin.

(svn_path_basename): fix to support Windows paths on Cywgin.

(svn_path_is_child): fix some special cases involving UNC paths. Add support

for Windows paths on Cygwin.

(previous_segment, svn_path_basename, svn_path_is_ancestor,

svn_path_canonicalize): fix to support Windows paths on Cywgin.

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

(test_path_is_child): add new testcase

(test_funcs): mark test_path_is_child, test_path_split and test_dirname as

passing again.

  1. … 1 more file in changeset.
Improve the performance of svn_path_is_root by replacing the call to

apr_filepath_root with a custom implementation. Because the new

implementation doesn't require a pool, it's removed from the signature

and all callers are updated.

* subversion/libsvn_subr/path.c

(svn_path_is_root): new custom implementation, remove pool from signature.

(is_canonical, svn_path_join, svn_path_join_many,

previous_segment, svn_path_basename, get_path_ancestor_length,

svn_path_is_child): remove the pool from the call to svn_path_is_root.

* subversion/include/svn_path.h

(svn_path_is_root): remove the pool parameter from the function signature

* subversion/libsvn_client/commit.c

(svn_client_commit4): remove the pool from the call to svn_path_is_root.

* subversion/libsvn_subr/target.c

(svn_path_condense_targets): remove the pool from the call to


* subversion/libsvn_wc/lock.c

(svn_wc_adm_open_anchor): remove the pool from the call to svn_path_is_root.

* subversion/libsvn_wc/update_editor.c

(check_wc_root): remove the pool from the call to svn_path_is_root.

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

(test_remove_component): remove the pool from the call to svn_path_is_root.

  1. … 6 more files in changeset.
Remove or change tests on non-canonical UNC paths.

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

(test_path_split, test_dirname,

test_remove_component, test_is_absolute,

test_path_is_ancestor, test_get_longest_ancestor):

do not test a non-canonical path, neither accept a non-canonical

path as result.

All tests for handling X: or X:/ paths on Windows should also work on Cygwin.

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

(test_path_is_child, test_path_split, test_join,

test_basename, test_dirname, test_canonicalize,

test_remove_component, test_is_root, test_is_absolute,

test_path_is_ancestor, test_compare_paths,

test_get_longest_ancestor): combine the Windows and Cygwin tests.

Follow up to r22349: Remove the pool parameter of svn_path_is_absolute,

since the new implementation doesn't use it anymore. Update all references.

* subversion/libsvn_subr/path.c

(svn_path_is_absolute): remove the pool parameter.



svn_path_is_child): update calls to svn_path_is_absolute.

* subversion/include/svn_path.h

(svn_path_is_absolute): remove the pool parameter from the function


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

(test_is_absolute) update call to svn_path_is_absolute.

  1. … 2 more files in changeset.
Add more test cases for svn_path_get_longest_ancestor.

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

(test_get_longest_ancestor): new testcases for 'file:///' url's.

Add new testcases for svn_path_get_longest_ancestor.

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

(test_get_longest_ancestor): New test cases. Run the testcases also in

with path1 and path2 in different order, svn_path_get_longest_ancestor

is supposed to be order-independent.

Add new testcases for svn_path_is_child, check for support of 'H:' and

UNC paths.

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

(test_path_is_child): new test cases. Cleaned up a bit so now it's clear

again what's tested.

(test_funcs): marked test_path_is_child XFail on Win32 and Cygwin.

Fix two faulty testcases added in r22067.

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

(test_remove_component): fixed two UNC path testcases.

Do not XFail the path tests on non-windows platforms.

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

(test_funcs): use the new macro SVN_TEST_XFAIL_COND to mark the

test as XFail only on Windows.

Added extra tests for UNC path handling on Windows and Cygwin. Not all of

the tests succeed anymore, so marked them as XFail. This is a regression

compared to 1.4, caused by the changes to support Windows paths (X:, X:/).

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

(test_path_split, test_join, test_basename, test_dirname,

test_remove_component, test_is_root, test_is_absolute,

test_path_is_ancestor, test_compare_paths, test_get_longest_ancestor):

new testcases for UNC paths (Windows and Cygwin only).

(test_funcs): some tests are now failing on Windows/Cygwin, so mark them

with XFail. Note that it isn't possible to limit XFail to a certain

platform, so this will result in tests XPass-ing on non-windows platforms.

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

(test_error_is_root_cause): Don't leak errors.

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

(test_path_check_valid): Don't leak errors.

  1. … 1 more file in changeset.
Followup to r21369 and r21621, fixing path-test test 13 on Cygwin.

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

(test_canonicalize): Don't run the tests for paths with drive letters on

Cygwin, since Windows is the only target that is expected to treat them

in the special way that these tests are expecting.

New unit test for svn_path_get_longest_ancestor.

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

(test_get_longest_ancestor): New function

(test_funcs): add the new unit test.