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

Changeset 864508 is being indexed.

* 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

(svn_client_commit4)

* subversion/libsvn_client/merge.c

(get_wc_merge_info)

* subversion/libsvn_repos/repos.c

(svn_repos_find_root_path)

* subversion/libsvn_subr/target.c

(svn_path_condense_targets)

* subversion/libsvn_subr/lock.c

(svn_wc_adm_open_anchor):

* subversion/libsvn_wc/update_editor.c

(check_wc_root)

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

(test_is_root)

  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:

http://svn.haxx.se/dev/archive-2007-03/0385.shtml

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_tests.py:

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

* subversion/tests/cmdline/svnadmin_tests.py:

(verify_windows_paths_in_repos): test is now passing

* subversion/tests/cmdline/basic_tests.py:

(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

'/folder2'

* 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 <plundblad@google.com>.

* 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

svn_path_is_root.

* 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_join,

svn_path_join_many,

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

declaration

* 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.

New unit test for svn_path_compare_paths.

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

(test_compare_paths): New function

(test_funcs): add the new unit test.

New unit test for svn_path_is_single_path_component.

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

(test_is_single_path_component): New function.

(test_funcs): Add the new unit test.

New unit test for svn_path_check_valid, test some paths with and without

control characters.

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

(test_path_check_valid): New function

(test_funcs): add the new unit test.

New unit test for svn_path_is_absolute.

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

(test_is_absolute): New function

(test_funcs): add the new unit test.

Replace anonymous data types with structs in setup of the path tests.

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

(test_uri_encode, test_uri_decode, test_uri_autoescape, test_basename,

test_dirname, test_canonicalize, test_remove_component: replace the

two-dimensional arrays of char *'s with arrays of struct {path, result}.

Suggested by: philip

dlr

Reorganized the setup of the path tests by putting the path and the expected result

in the same data structure. This way it's much easier to read and maintain.

Also bumped the copyright year.

Suggested by: philip

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

(test_is_url, test_is_uri_safe, test_is_root,

test_path_is_ancestor): Combine the path and result arrays into one array of tests

(= struct of path(s) and results). Fixed the test loops to use the structs.