Index: subversion/svn/svn.c =================================================================== --- subversion/svn/svn.c (revision 1607783) +++ subversion/svn/svn.c (working copy) @@ -2018,9 +2018,16 @@ * later (if it's a log/lock message or an svn:* prop value), * according to the value of the '--encoding' option. */ SVN_ERR(svn_utf_cstring_to_utf8(&utf8_opt_arg, opt_arg, pool)); + if (strcmp(utf8_opt_arg, "-") == 0) + { + if (reading_file_from_stdin) + return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL, + _("stdin ('-') must not be specified " + "more than once")); + reading_file_from_stdin = TRUE; + } SVN_ERR(svn_stringbuf_from_file2(&(opt_state.filedata), utf8_opt_arg, pool)); - reading_file_from_stdin = (strcmp(utf8_opt_arg, "-") == 0); dash_F_arg = utf8_opt_arg; break; case opt_targets: @@ -2094,8 +2101,24 @@ opt_arg, pool)); break; case opt_auth_password: - SVN_ERR(svn_utf_cstring_to_utf8(&opt_state.auth_password, - opt_arg, pool)); + SVN_ERR(svn_utf_cstring_to_utf8(&utf8_opt_arg, opt_arg, pool)); + if (strcmp(utf8_opt_arg, "-") == 0) + { + svn_stringbuf_t *buffer, *buffer_utf8; + + if (reading_file_from_stdin) + return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL, + _("stdin ('-') must not be specified " + "more than once")); + reading_file_from_stdin = TRUE; + SVN_ERR(svn_stringbuf_from_file2(&buffer, utf8_opt_arg, pool)); + SVN_ERR(svn_utf_stringbuf_to_utf8(&buffer_utf8, buffer, pool)); + opt_state.auth_password = buffer_utf8->data; + } + else + { + opt_state.auth_password = utf8_opt_arg; + } break; case opt_encoding: opt_state.encoding = apr_pstrdup(pool, opt_arg);