Author: stsp
Date: Sat Apr 13 11:40:22 2013
New Revision: 1467597
URL: http://svn.apache.org/r1467597
Log:
For issue #3913, in case an authentication failure occurred and the '-F -'
option was given, make 'svn' point out that '-F -' can interfere with
interactive prompting.
* subversion/svn/svn.c
(main): Keep track of whether -F is causing us to read from standard input,
and, if so, append an appropriate hint to authentication error messages.
Modified:
subversion/trunk/subversion/svn/svn.c
Modified: subversion/trunk/subversion/svn/svn.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/svn.c?rev=1467597&r1=1467596&r2=1467597&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/svn.c (original)
+++ subversion/trunk/subversion/svn/svn.c Sat Apr 13 11:40:22 2013
@@ -1730,6 +1730,7 @@ sub_main(int argc, const char *argv[], a
svn_boolean_t interactive_conflicts = FALSE;
svn_boolean_t force_interactive = FALSE;
svn_boolean_t use_notifier = TRUE;
+ svn_boolean_t reading_file_from_stdin = FALSE;
apr_hash_t *changelists;
apr_hash_t *cfg_hash;
@@ -1946,6 +1947,7 @@ sub_main(int argc, const char *argv[], a
SVN_INT_ERR(svn_utf_cstring_to_utf8(&utf8_opt_arg, opt_arg, pool));
SVN_INT_ERR(svn_stringbuf_from_file2(&(opt_state.filedata),
utf8_opt_arg, pool));
+ reading_file_from_stdin = (strcmp(utf8_opt_arg, "-") == 0);
dash_F_arg = opt_arg;
break;
case opt_targets:
@@ -2883,6 +2885,12 @@ sub_main(int argc, const char *argv[], a
_("Authentication failed and interactive"
" prompting is disabled; see the"
" --force-interactive option"));
+ if (reading_file_from_stdin)
+ err = svn_error_quick_wrap(err,
+ _("Reading file from standard input "
+ "because of -F option; this can "
+ "interfere with interactive "
+ "prompting"));
}
/* Tell the user about 'svn cleanup' if any error on the stack