You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2013/02/07 19:59:45 UTC
svn commit: r1443662 - in /subversion/trunk/subversion:
libsvn_wc/update_editor.c tests/cmdline/update_tests.py
Author: rhuijben
Date: Thu Feb 7 18:59:44 2013
New Revision: 1443662
URL: http://svn.apache.org/r1443662
Log:
* subversion/libsvn_wc/update_editor.c
(path_join_under_root): Verify that we are still looking at the same path,
not something a few levels deeper.
* subversion/tests/cmdline/update_tests.py
(windows_invalid_characters): Add regression test for issue #3288 case that
invalidated some database assumptions.
Modified:
subversion/trunk/subversion/libsvn_wc/update_editor.c
subversion/trunk/subversion/tests/cmdline/update_tests.py
Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/update_editor.c?rev=1443662&r1=1443661&r2=1443662&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/trunk/subversion/libsvn_wc/update_editor.c Thu Feb 7 18:59:44 2013
@@ -1144,6 +1144,15 @@ path_join_under_root(const char **result
pool));
}
+ /* This catches issue #3288 */
+ if (strcmp(add_path, svn_dirent_basename(*result_path, NULL)) != 0)
+ {
+ return svn_error_createf(
+ SVN_ERR_WC_OBSTRUCTED_UPDATE, NULL,
+ _("'%s' is not valid as filename in a working copy path"),
+ svn_dirent_local_style(add_path, pool));
+ }
+
return SVN_NO_ERROR;
}
Modified: subversion/trunk/subversion/tests/cmdline/update_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/update_tests.py?rev=1443662&r1=1443661&r2=1443662&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/update_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/update_tests.py Thu Feb 7 18:59:44 2013
@@ -6565,6 +6565,26 @@ def move_update_props(sbox):
svntest.actions.verify_disk(wc_dir, expected_disk, True,
svntest.tree.detect_conflict_files, extra_files)
+@Issues(3288)
+@SkipUnless(svntest.main.is_os_windows)
+def windows_invalid_characters(sbox):
+ "checkout with invalid NTFS characters"
+
+ sbox.build()
+
+ wc_dir = sbox.wc_dir
+
+ svntest.actions.run_and_verify_svnmucc(None, None, [],
+ '-U', sbox.repo_url,
+ '-m', '',
+ 'mkdir', 'A/completely\\unusable\\dir')
+
+ expected_error = 'svn: E155000: .* is not valid.*'
+
+ svntest.actions.run_and_verify_svn(wc_dir, None, expected_error, 'up',
+ wc_dir)
+
+
#######################################################################
# Run the tests
@@ -6647,6 +6667,7 @@ test_list = [ None,
incomplete_overcomplete,
update_swapped_depth_dirs,
move_update_props,
+ windows_invalid_characters,
]
if __name__ == '__main__':