You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by sv...@apache.org on 2013/10/22 06:02:21 UTC
svn commit: r1534483 - in /subversion/branches/1.8.x: ./ STATUS
subversion/libsvn_ra_local/split_url.c
subversion/tests/cmdline/checkout_tests.py
Author: svn-role
Date: Tue Oct 22 04:02:20 2013
New Revision: 1534483
URL: http://svn.apache.org/r1534483
Log:
Merge r1518184 from trunk:
* r1518184
Fix an of-by-one error in the fspath calculations of libsvn_ra_local,
for the specific case where a repository is placed in a Windows drive
root.
Justification:
Improves correctness. Resolves user reported problem.
Votes:
+1: rhuijben, stefan2, ivan
Modified:
subversion/branches/1.8.x/ (props changed)
subversion/branches/1.8.x/STATUS
subversion/branches/1.8.x/subversion/libsvn_ra_local/split_url.c
subversion/branches/1.8.x/subversion/tests/cmdline/checkout_tests.py
Propchange: subversion/branches/1.8.x/
------------------------------------------------------------------------------
Merged /subversion/trunk:r1518184
Modified: subversion/branches/1.8.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/STATUS?rev=1534483&r1=1534482&r2=1534483&view=diff
==============================================================================
--- subversion/branches/1.8.x/STATUS (original)
+++ subversion/branches/1.8.x/STATUS Tue Oct 22 04:02:20 2013
@@ -118,15 +118,6 @@ Veto-blocked changes:
Approved changes:
=================
- * r1518184
- Fix an of-by-one error in the fspath calculations of libsvn_ra_local,
- for the specific case where a repository is placed in a Windows drive
- root.
- Justification:
- Improves correctness. Resolves user reported problem.
- Votes:
- +1: rhuijben, stefan2, ivan
-
* r1526439
Improve http status processing during commit using ra_serf to improve
diagnostics.
Modified: subversion/branches/1.8.x/subversion/libsvn_ra_local/split_url.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/libsvn_ra_local/split_url.c?rev=1534483&r1=1534482&r2=1534483&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/libsvn_ra_local/split_url.c (original)
+++ subversion/branches/1.8.x/subversion/libsvn_ra_local/split_url.c Tue Oct 22 04:02:20 2013
@@ -39,6 +39,7 @@ svn_ra_local__split_URL(svn_repos_t **re
const char *repos_dirent;
const char *repos_root_dirent;
svn_stringbuf_t *urlbuf;
+ apr_size_t root_end;
SVN_ERR(svn_uri_get_dirent_from_file_url(&repos_dirent, URL, pool));
@@ -65,10 +66,17 @@ svn_ra_local__split_URL(svn_repos_t **re
"/",
svn_dirent_skip_ancestor(repos_root_dirent, repos_dirent),
(const char *)NULL); */
- *fs_path = &repos_dirent[strlen(repos_root_dirent)];
-
- if (**fs_path == '\0')
+ root_end = strlen(repos_root_dirent);
+ if (! repos_dirent[root_end])
*fs_path = "/";
+ else if (repos_dirent[root_end] == '/')
+ *fs_path = &repos_dirent[root_end];
+ else
+ {
+ /* On Windows "C:/" is the parent directory of "C:/dir" */
+ *fs_path = &repos_dirent[root_end-1];
+ SVN_ERR_ASSERT((*fs_path)[0] == '/');
+ }
/* Remove the path components after the root dirent from the original URL,
to get a URL to the repository root.
Modified: subversion/branches/1.8.x/subversion/tests/cmdline/checkout_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/tests/cmdline/checkout_tests.py?rev=1534483&r1=1534482&r2=1534483&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/tests/cmdline/checkout_tests.py (original)
+++ subversion/branches/1.8.x/subversion/tests/cmdline/checkout_tests.py Tue Oct 22 04:02:20 2013
@@ -1052,7 +1052,7 @@ def checkout_wc_from_drive(sbox):
svntest.main.safe_rmtree(sbox.wc_dir)
os.mkdir(sbox.wc_dir)
- # create a virtual drive to the working copy folder
+ # create a virtual drive to the repository folder
drive = find_the_next_available_drive_letter()
if drive is None:
raise svntest.Skip
@@ -1088,8 +1088,49 @@ def checkout_wc_from_drive(sbox):
})
svntest.actions.run_and_verify_checkout(repo_url, wc_dir,
expected_output, expected_wc,
- None, None, None, None,
- '--force')
+ None, None, None, None)
+
+ wc2_dir = sbox.add_wc_path('2')
+ expected_output = wc.State(wc2_dir, {
+ 'D' : Item(status='A '),
+ 'D/H' : Item(status='A '),
+ 'D/H/psi' : Item(status='A '),
+ 'D/H/chi' : Item(status='A '),
+ 'D/H/omega' : Item(status='A '),
+ 'D/G' : Item(status='A '),
+ 'D/G/tau' : Item(status='A '),
+ 'D/G/pi' : Item(status='A '),
+ 'D/G/rho' : Item(status='A '),
+ 'D/gamma' : Item(status='A '),
+ 'C' : Item(status='A '),
+ 'mu' : Item(status='A '),
+ 'B' : Item(status='A '),
+ 'B/E' : Item(status='A '),
+ 'B/E/alpha' : Item(status='A '),
+ 'B/E/beta' : Item(status='A '),
+ 'B/F' : Item(status='A '),
+ 'B/lambda' : Item(status='A '),
+ })
+ svntest.actions.run_and_verify_checkout(repo_url + '/A', wc2_dir,
+ expected_output, None,
+ None, None, None, None)
+
+ wc3_dir = sbox.add_wc_path('3')
+ expected_output = wc.State(wc3_dir, {
+ 'H' : Item(status='A '),
+ 'H/psi' : Item(status='A '),
+ 'H/chi' : Item(status='A '),
+ 'H/omega' : Item(status='A '),
+ 'G' : Item(status='A '),
+ 'G/tau' : Item(status='A '),
+ 'G/pi' : Item(status='A '),
+ 'G/rho' : Item(status='A '),
+ 'gamma' : Item(status='A '),
+ })
+
+ svntest.actions.run_and_verify_checkout(repo_url + '/A/D', wc3_dir,
+ expected_output, None,
+ None, None, None, None)
finally:
os.chdir(was_cwd)