You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by cm...@apache.org on 2011/01/27 06:03:28 UTC
svn commit: r1063992 - in /subversion/branches/uris-as-urls: ./
subversion/bindings/javahl/tests/org/apache/subversion/javahl/
subversion/include/ subversion/libsvn_client/ subversion/libsvn_subr/
subversion/svn/
Author: cmpilato
Date: Thu Jan 27 05:03:27 2011
New Revision: 1063992
URL: http://svn.apache.org/viewvc?rev=1063992&view=rev
Log:
Sync the 'uris-as-urls' branch up with recent trunk changes.
(Merged /subversion/trunk:r1063820-1063882)
Modified:
subversion/branches/uris-as-urls/ (props changed)
subversion/branches/uris-as-urls/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
subversion/branches/uris-as-urls/subversion/include/svn_client.h
subversion/branches/uris-as-urls/subversion/libsvn_client/patch.c
subversion/branches/uris-as-urls/subversion/libsvn_subr/io.c
subversion/branches/uris-as-urls/subversion/svn/main.c
Propchange: subversion/branches/uris-as-urls/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jan 27 05:03:27 2011
@@ -40,4 +40,4 @@
/subversion/branches/tc_url_rev:874351-874483
/subversion/branches/tree-conflicts:868291-873154
/subversion/branches/tree-conflicts-notify:873926-874008
-/subversion/trunk:1060426-1063819
+/subversion/trunk:1060426-1063882
Modified: subversion/branches/uris-as-urls/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
URL: http://svn.apache.org/viewvc/subversion/branches/uris-as-urls/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java?rev=1063992&r1=1063991&r2=1063992&view=diff
==============================================================================
--- subversion/branches/uris-as-urls/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java (original)
+++ subversion/branches/uris-as-urls/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java Thu Jan 27 05:03:27 2011
@@ -2580,12 +2580,11 @@ public class BasicTests extends SVNTests
*/
public void testPatch() throws SubversionException, IOException
{
- OneTest thisTest = new OneTest(true);
- File patchInput = new File(super.localTmp, thisTest.testName);
- final String iotaPath = thisTest.getWCPath().replace('\\', '/') + "/iota";
+ OneTest thisTest = new OneTest(true);
+ File patchInput = new File(super.localTmp, thisTest.testName);
final String NL = System.getProperty("line.separator");
- final String patchText = "Index: iota" + NL +
+ final String patchText = "Index: iota" + NL +
"===================================================================" + NL +
"--- iota\t(revision 1)" + NL +
"+++ iota\t(working copy)" + NL +
@@ -2598,14 +2597,16 @@ public class BasicTests extends SVNTests
writer.flush();
writer.close();
- client.patch(patchInput.getAbsolutePath(), iotaPath, false, 0,
- false, true, true,
- new PatchCallback() {
- public boolean singlePatch(String pathFromPatchfile,
- String patchPath, String rejectPath) {
- // Do nothing, right now.
- return false;
- }
+ client.patch(patchInput.getAbsolutePath(),
+ thisTest.getWCPath().replace('\\', '/'), false, 0,
+ false, true, true,
+ new PatchCallback() {
+ public boolean singlePatch(String pathFromPatchfile,
+ String patchPath,
+ String rejectPath) {
+ // Do nothing, right now.
+ return false;
+ }
});
}
Modified: subversion/branches/uris-as-urls/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/branches/uris-as-urls/subversion/include/svn_client.h?rev=1063992&r1=1063991&r2=1063992&view=diff
==============================================================================
--- subversion/branches/uris-as-urls/subversion/include/svn_client.h (original)
+++ subversion/branches/uris-as-urls/subversion/include/svn_client.h Thu Jan 27 05:03:27 2011
@@ -5352,7 +5352,7 @@ typedef svn_error_t *(*svn_client_patch_
/**
* Apply a unidiff patch that's located at absolute path
- * @a patch_abspath to the working copy at @a local_abspath.
+ * @a patch_abspath to the working copy directory at @a local_abspath.
*
* This function makes a best-effort attempt at applying the patch.
* It might skip patch targets which cannot be patched (e.g. targets
Modified: subversion/branches/uris-as-urls/subversion/libsvn_client/patch.c
URL: http://svn.apache.org/viewvc/subversion/branches/uris-as-urls/subversion/libsvn_client/patch.c?rev=1063992&r1=1063991&r2=1063992&view=diff
==============================================================================
--- subversion/branches/uris-as-urls/subversion/libsvn_client/patch.c (original)
+++ subversion/branches/uris-as-urls/subversion/libsvn_client/patch.c Thu Jan 27 05:03:27 2011
@@ -2736,6 +2736,7 @@ svn_client_patch(const char *patch_abspa
apr_pool_t *scratch_pool)
{
apply_patches_baton_t baton;
+ svn_node_kind_t kind;
if (strip_count < 0)
return svn_error_create(SVN_ERR_INCORRECT_PARAMS, NULL,
@@ -2745,6 +2746,22 @@ svn_client_patch(const char *patch_abspa
return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
_("'%s' is not a local path"), local_abspath);
+ SVN_ERR(svn_io_check_path(patch_abspath, &kind, scratch_pool));
+ if (kind == svn_node_none)
+ return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+ _("'%s' does not exist"), patch_abspath);
+ if (kind != svn_node_file)
+ return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+ _("'%s' is not a file"), patch_abspath);
+
+ SVN_ERR(svn_io_check_path(local_abspath, &kind, scratch_pool));
+ if (kind == svn_node_none)
+ return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+ _("'%s' does not exist"), local_abspath);
+ if (kind != svn_node_dir)
+ return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+ _("'%s' is not a directory"), local_abspath);
+
baton.patch_abspath = patch_abspath;
baton.abs_wc_path = local_abspath;
baton.dry_run = dry_run;
Modified: subversion/branches/uris-as-urls/subversion/libsvn_subr/io.c
URL: http://svn.apache.org/viewvc/subversion/branches/uris-as-urls/subversion/libsvn_subr/io.c?rev=1063992&r1=1063991&r2=1063992&view=diff
==============================================================================
--- subversion/branches/uris-as-urls/subversion/libsvn_subr/io.c (original)
+++ subversion/branches/uris-as-urls/subversion/libsvn_subr/io.c Thu Jan 27 05:03:27 2011
@@ -81,22 +81,27 @@
retry loop cannot completely solve this problem either, but can
help mitigate it.
*/
+#define RETRY_MAX_ATTEMPTS 100
+#define RETRY_INITIAL_SLEEP 1000
+#define RETRY_MAX_SLEEP 128000
+
#ifndef WIN32_RETRY_LOOP
#if defined(WIN32) && !defined(SVN_NO_WIN32_RETRY_LOOP)
#define WIN32_RETRY_LOOP(err, expr) \
do \
{ \
apr_status_t os_err = APR_TO_OS_ERROR(err); \
- int sleep_count = 1000; \
+ int sleep_count = RETRY_INITIAL_SLEEP; \
int retries; \
for (retries = 0; \
- retries < 100 && (os_err == ERROR_ACCESS_DENIED \
- || os_err == ERROR_SHARING_VIOLATION \
- || os_err == ERROR_DIR_NOT_EMPTY); \
+ retries < RETRY_MAX_ATTEMPTS && \
+ (os_err == ERROR_ACCESS_DENIED \
+ || os_err == ERROR_SHARING_VIOLATION \
+ || os_err == ERROR_DIR_NOT_EMPTY); \
++retries, os_err = APR_TO_OS_ERROR(err)) \
{ \
apr_sleep(sleep_count); \
- if (sleep_count < 128000) \
+ if (sleep_count < RETRY_MAX_SLEEP) \
sleep_count *= 2; \
(err) = (expr); \
} \
Modified: subversion/branches/uris-as-urls/subversion/svn/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/uris-as-urls/subversion/svn/main.c?rev=1063992&r1=1063991&r2=1063992&view=diff
==============================================================================
--- subversion/branches/uris-as-urls/subversion/svn/main.c (original)
+++ subversion/branches/uris-as-urls/subversion/svn/main.c Thu Jan 27 05:03:27 2011
@@ -125,7 +125,6 @@ typedef enum svn_cl__longopt_t {
opt_allow_mixed_revisions,
} svn_cl__longopt_t;
-#define SVN_CL__OPTION_CONTINUATION_INDENT " "
/* Option codes and descriptions for the command line client.
*
@@ -144,23 +143,23 @@ const apr_getopt_option_t svn_cl__option
{"non-recursive", 'N', 0, N_("obsolete; try --depth=files or --depth=immediates")},
{"change", 'c', 1,
N_("the change made by revision ARG (like -r ARG-1:ARG)\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
"If ARG is negative this is like -r ARG:ARG-1")},
{"revision", 'r', 1,
N_("ARG (some commands also take ARG1:ARG2 range)\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
"A revision argument can be one of:\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
" NUMBER revision number\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
" '{' DATE '}' revision at start of the date\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
" 'HEAD' latest in repository\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
" 'BASE' base rev of item's working copy\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
" 'COMMITTED' last commit at or before BASE\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
" 'PREV' revision just before COMMITTED")},
{"file", 'F', 1, N_("read log message from file ARG")},
{"incremental", opt_incremental, 0,
@@ -174,45 +173,45 @@ const apr_getopt_option_t svn_cl__option
{"password", opt_auth_password, 1, N_("specify a password ARG")},
{"extensions", 'x', 1,
N_("Default: '-u'. When Subversion is invoking an\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
"external diff program, ARG is simply passed along\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
"to the program. But when Subversion is using its\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
"default internal diff implementation, or when\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
"Subversion is displaying blame annotations, ARG\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
"could be any of the following:\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
" -u (--unified):\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
" Output 3 lines of unified context.\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
" -b (--ignore-space-change):\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
" Ignore changes in the amount of white space.\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
" -w (--ignore-all-space):\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
" Ignore all white space.\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
" --ignore-eol-style:\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
" Ignore changes in EOL style.\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
" -p (--show-c-function):\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
" Show C function name in diff output.")},
{"targets", opt_targets, 1,
N_("pass contents of file ARG as additional args")},
{"depth", opt_depth, 1,
N_("limit operation by depth ARG ('empty', 'files',\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
"'immediates', or 'infinity')")},
{"set-depth", opt_set_depth, 1,
N_("set new working copy depth to ARG ('exclude',\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
"'empty', 'files', 'immediates', or 'infinity')")},
{"xml", opt_xml, 0, N_("output in XML")},
{"strict", opt_strict, 0, N_("use strict semantics")},
@@ -224,7 +223,7 @@ const apr_getopt_option_t svn_cl__option
N_("do not cache authentication tokens")},
{"trust-server-cert", opt_trust_server_cert, 0,
N_("accept unknown SSL server certificates without\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
"prompting (but only with '--non-interactive')")},
{"non-interactive", opt_non_interactive, 0,
N_("do no interactive prompting")},
@@ -252,21 +251,21 @@ const apr_getopt_option_t svn_cl__option
N_("read user configuration files from directory ARG")},
{"config-option", opt_config_options, 1,
N_("set user configuration option in the format:\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
" FILE:SECTION:OPTION=[VALUE]\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
"For example:\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
" servers:global:http-library=serf")},
{"auto-props", opt_autoprops, 0, N_("enable automatic properties")},
{"no-auto-props", opt_no_autoprops, 0, N_("disable automatic properties")},
{"native-eol", opt_native_eol, 1,
N_("use a different EOL marker than the standard\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
"system marker for files with the svn:eol-style\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
"property set to 'native'.\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
"ARG may be one of 'LF', 'CR', 'CRLF'")},
{"limit", 'l', 1, N_("maximum number of log entries")},
{"no-unlock", opt_no_unlock, 0, N_("don't unlock the targets")},
@@ -283,42 +282,42 @@ const apr_getopt_option_t svn_cl__option
N_("retrieve no revision properties")},
{"with-revprop", opt_with_revprop, 1,
N_("set revision property ARG in new revision\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
"using the name[=value] format")},
{"parents", opt_parents, 0, N_("make intermediate directories")},
{"use-merge-history", 'g', 0,
N_("use/display additional information from merge\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
"history")},
{"accept", opt_accept, 1,
N_("specify automatic conflict resolution action\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
"('postpone', 'base', 'mine-conflict',\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
"'theirs-conflict', 'mine-full', 'theirs-full',\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
"'edit', 'launch')")},
{"show-revs", opt_show_revs, 1,
N_("specify which collection of revisions to display\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
"('merged', 'eligible')")},
{"reintegrate", opt_reintegrate, 0,
N_("merge a branch back into its parent branch")},
{"strip", opt_strip, 1,
N_("number of leading path components to strip from\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
"paths parsed from the patch file. --strip 0\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
"is the default and leaves paths unmodified.\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
"--strip 1 would change the path\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
"'doc/fudge/crunchy.html' to 'fudge/crunchy.html'.\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
"--strip 2 would leave just 'crunchy.html'\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
"The expected component separator is '/' on all\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
"platforms. A leading '/' counts as one component.")},
{"show-copies-as-adds", opt_show_copies_as_adds, 0,
N_("don't diff copied or moved files with their source")},
@@ -335,9 +334,9 @@ const apr_getopt_option_t svn_cl__option
N_("use git's extended diff format")},
{"allow-mixed-revisions", opt_allow_mixed_revisions, 0,
N_("Allow merge into mixed-revision working copy.\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
"Use of this option is not recommended!\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
"Please run 'svn update' instead.")},
/* Long-opt Aliases
@@ -710,7 +709,6 @@ const svn_opt_subcommand_desc2_t svn_cl_
" U Updated\n"
" C Conflict\n"
" G Merged\n"
- " E Existed\n"
" R Replaced\n"
"\n"
" Characters in the first column report about the item itself.\n"
@@ -974,9 +972,9 @@ const svn_opt_subcommand_desc2_t svn_cl_
" Note: the --accept option is currently required.\n"),
{opt_targets, 'R', opt_depth, 'q', opt_accept},
{{opt_accept, N_("specify automatic conflict resolution source\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
"('base', 'working', 'mine-conflict',\n"
- SVN_CL__OPTION_CONTINUATION_INDENT
+ " "
"'theirs-conflict', 'mine-full', 'theirs-full')")}} },
{ "resolved", svn_cl__resolved, {0}, N_