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 2015/05/05 06:00:10 UTC
svn commit: r1677736 - in /subversion/branches/1.9.x: ./ STATUS
subversion/libsvn_subr/stream.c subversion/tests/libsvn_subr/io-test.c
Author: svn-role
Date: Tue May 5 04:00:10 2015
New Revision: 1677736
URL: http://svn.apache.org/r1677736
Log:
Merge the r1676526 group from trunk:
* r1676526, r1676535
Fix working copy operations (checkout, update) with very long path names
on Windows. See http://svn.haxx.se/users/archive-2015-04/0105.shtml
Justification:
Bug in primary use case (checkout and update). Regression from 1.8.x.
Votes:
+1: ivan, rhuijben
+1: brane (not tested, but fix looks obviously correct)
Modified:
subversion/branches/1.9.x/ (props changed)
subversion/branches/1.9.x/STATUS
subversion/branches/1.9.x/subversion/libsvn_subr/stream.c
subversion/branches/1.9.x/subversion/tests/libsvn_subr/io-test.c
Propchange: subversion/branches/1.9.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue May 5 04:00:10 2015
@@ -91,4 +91,4 @@
/subversion/branches/verify-at-commit:1462039-1462408
/subversion/branches/verify-keep-going:1439280-1546110
/subversion/branches/wc-collate-path:1402685-1480384
-/subversion/trunk:1660545-1660547,1660549-1662901,1663003,1663183-1663184,1663338,1663347,1663355,1663374,1663450,1663530,1663671,1663697,1663706,1663738,1663749,1663791,1663991,1664035,1664078,1664080,1664084-1664085,1664187,1664191,1664193,1664200,1664344,1664476,1664480-1664481,1664483,1664489-1664490,1664507,1664520-1664521,1664523,1664526-1664527,1664531-1664532,1664588,1664593-1664594,1664596,1664653,1664664,1664672,1664674,1664684,1664927,1664938-1664940,1664978,1664984,1664997,1665164,1665195,1665213,1665259,1665318,1665437-1665438,1665609,1665611-1665612,1665845,1665850,1665852,1665886,1665894,1665896,1666096,1666258,1666270,1666272,1666379,1666449,1666690,1666832,1666851,1666965,1667101,1667106-1667107,1667120,1667228,1667233-1667235,1667249-1667250,1667258,1667290,1667301,1667471,1667691-1667693,1667699-1667700,1667715,1667941,1667976,1668320,1668598-1668600,1668602-1668603,1668607-1668608,1668618,1669743,1669746,1669749,1669945,1670139,1670149,1670152,1670329,1670337,167
0347,1670353,1671164,1671388,1672295,1672311,1672372,1672404,1672511-1672512,1672578,1672728,1673044,1673062-1673063,1673065,1673153,1673170,1673172,1673197,1673202,1673204,1673228,1673282,1673445,1673691-1673692,1673746,1673785,1673803,1674015,1674032,1674170,1674406,1674487,1674522,1674580,1674627,1674891,1675771,1676555,1676564,1676665,1676769
+/subversion/trunk:1660545-1660547,1660549-1662901,1663003,1663183-1663184,1663338,1663347,1663355,1663374,1663450,1663530,1663671,1663697,1663706,1663738,1663749,1663791,1663991,1664035,1664078,1664080,1664084-1664085,1664187,1664191,1664193,1664200,1664344,1664476,1664480-1664481,1664483,1664489-1664490,1664507,1664520-1664521,1664523,1664526-1664527,1664531-1664532,1664588,1664593-1664594,1664596,1664653,1664664,1664672,1664674,1664684,1664927,1664938-1664940,1664978,1664984,1664997,1665164,1665195,1665213,1665259,1665318,1665437-1665438,1665609,1665611-1665612,1665845,1665850,1665852,1665886,1665894,1665896,1666096,1666258,1666270,1666272,1666379,1666449,1666690,1666832,1666851,1666965,1667101,1667106-1667107,1667120,1667228,1667233-1667235,1667249-1667250,1667258,1667290,1667301,1667471,1667691-1667693,1667699-1667700,1667715,1667941,1667976,1668320,1668598-1668600,1668602-1668603,1668607-1668608,1668618,1669743,1669746,1669749,1669945,1670139,1670149,1670152,1670329,1670337,167
0347,1670353,1671164,1671388,1672295,1672311,1672372,1672404,1672511-1672512,1672578,1672728,1673044,1673062-1673063,1673065,1673153,1673170,1673172,1673197,1673202,1673204,1673228,1673282,1673445,1673691-1673692,1673746,1673785,1673803,1674015,1674032,1674170,1674406,1674487,1674522,1674580,1674627,1674891,1675771,1676526,1676535,1676555,1676564,1676665,1676769
Modified: subversion/branches/1.9.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/STATUS?rev=1677736&r1=1677735&r2=1677736&view=diff
==============================================================================
--- subversion/branches/1.9.x/STATUS (original)
+++ subversion/branches/1.9.x/STATUS Tue May 5 04:00:10 2015
@@ -84,15 +84,6 @@ Veto-blocked changes:
Approved changes:
=================
- * r1676526, r1676535
- Fix working copy operations (checkout, update) with very long path names
- on Windows. See http://svn.haxx.se/users/archive-2015-04/0105.shtml
- Justification:
- Bug in primary use case (checkout and update). Regression from 1.8.x.
- Votes:
- +1: ivan, rhuijben
- +1: brane (not tested, but fix looks obviously correct)
-
* r1677191
Fix client pool SEGV with ra-local and --enable-runtime-module-search.
Justification:
Modified: subversion/branches/1.9.x/subversion/libsvn_subr/stream.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/libsvn_subr/stream.c?rev=1677736&r1=1677735&r2=1677736&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/libsvn_subr/stream.c (original)
+++ subversion/branches/1.9.x/subversion/libsvn_subr/stream.c Tue May 5 04:00:10 2015
@@ -2200,11 +2200,11 @@ svn_stream__install_stream(svn_stream_t
apr_os_file_get(&hFile, ib->baton_apr.file);
- SVN_ERR(svn_utf__win32_utf8_to_utf16(&w_final_abspath,
- svn_dirent_local_style(
+ SVN_ERR(svn_io__utf8_to_unicode_longpath(&w_final_abspath,
+ svn_dirent_local_style(
final_abspath,
scratch_pool),
- NULL, scratch_pool));
+ scratch_pool));
path_len = wcslen(w_final_abspath);
rename_size = sizeof(*rename_info) + sizeof(WCHAR) * path_len;
Modified: subversion/branches/1.9.x/subversion/tests/libsvn_subr/io-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/tests/libsvn_subr/io-test.c?rev=1677736&r1=1677735&r2=1677736&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/tests/libsvn_subr/io-test.c (original)
+++ subversion/branches/1.9.x/subversion/tests/libsvn_subr/io-test.c Tue May 5 04:00:10 2015
@@ -30,8 +30,10 @@
#include "svn_pools.h"
#include "svn_string.h"
+#include "svn_io.h"
#include "private/svn_skel.h"
#include "private/svn_dep_compat.h"
+#include "private/svn_io_private.h"
#include "../svn_test.h"
#include "../svn_test_fs.h"
@@ -737,6 +739,49 @@ ignore_enoent(apr_pool_t *pool)
return SVN_NO_ERROR;
}
+static svn_error_t *
+test_install_stream_to_longpath(apr_pool_t *pool)
+{
+ const char *tmp_dir;
+ const char *final_abspath;
+ const char *deep_dir;
+ svn_stream_t *stream;
+ svn_stringbuf_t *actual_content;
+ int i;
+
+ /* Create an empty directory. */
+ SVN_ERR(svn_dirent_get_absolute(&tmp_dir, "test_install_stream_to_longpath",
+ pool));
+ SVN_ERR(svn_io_remove_dir2(tmp_dir, TRUE, NULL, NULL, pool));
+ SVN_ERR(svn_io_make_dir_recursively(tmp_dir, pool));
+ svn_test_add_dir_cleanup(tmp_dir);
+
+ deep_dir = tmp_dir;
+
+ /* Generate very long path (> 260 symbols) */
+ for (i = 0; i < 26; i++)
+ {
+ deep_dir = svn_dirent_join(deep_dir, "1234567890", pool);
+ SVN_ERR(svn_io_make_dir_recursively(deep_dir, pool));
+ }
+
+ final_abspath = svn_dirent_join(deep_dir, "stream1", pool);
+ SVN_ERR(svn_stream__create_for_install(&stream, deep_dir, pool, pool));
+ SVN_ERR(svn_stream_puts(stream, "stream1 content"));
+ SVN_ERR(svn_stream_close(stream));
+ SVN_ERR(svn_stream__install_stream(stream,
+ final_abspath,
+ TRUE,
+ pool));
+
+ SVN_ERR(svn_stringbuf_from_file2(&actual_content,
+ final_abspath,
+ pool));
+
+ SVN_TEST_STRING_ASSERT(actual_content->data, "stream1 content");
+
+ return SVN_NO_ERROR;
+}
/* The test table. */
@@ -759,6 +804,8 @@ static struct svn_test_descriptor_t test
"test aligned seek"),
SVN_TEST_PASS2(ignore_enoent,
"test ignore-enoent"),
+ SVN_TEST_PASS2(test_install_stream_to_longpath,
+ "test svn_stream__install_stream to long path"),
SVN_TEST_NULL
};