Philip Martin wrote:
> Branko ÄŒibej <brane_at_wandisco.com> writes:
>>Â On 18.03.2013 16:12, philip_at_tigris.org wrote:
>>>Â http://subversion.tigris.org/issues/show_bug.cgi?id=3913
>>>
>>>Â clients automatically switch to non-interactive when stdin is not a
>>> terminal as that prevents scripts hanging in some circumstances and
>>> --force-interactive was introduced to allow the user to override ...
>>
>>Â Given that there are several cases where this decision (to assume
>>Â --non-interactive if stdin is not a terminal) may lead to somewhat
>>Â unexpected behaviour, I propose the following:
>>
>> Â Â * Leave the --non-interactive assumption as it now stands. One could
>> Â Â Â argue that, e.g., "svnrdump load" or "svnadmin load", which behave
>
> Only svnrdump is affected, svnadmin doesn't prompt.
>
>> Â Â Â like stream filters, should behave differently -- however, the
>> Â Â Â purpose of the assume-non-interactive change was to avoid the cases
>> Â Â Â where automated scripts would unexpectedly hang waiting for input
>> Â Â Â (possibly, in the case of post-commit scripts, resulting in a minor
>> Â Â Â DoS) instead of returning an error when, e.g., required credentials
>> Â Â Â are not available. It is, in my opinion, much better overall to be
>> Â Â Â consistent.
>>
>> Â Â * To mitigate the circumstance that users will now more often have to
>> Â Â Â type --force-interactive on the command line, I propose we allocate
>> Â Â Â one of our carefully-hoarded single-letter options for this
>> Â Â Â behaviour. I propose -i, which aligns with similar options of
>> Â Â Â standard unix tools, e.g., rm, cp, mv, expect, etc. Neither -i nor
>> Â Â Â -I (an alternative, though less desirable spelling) are currently
>> Â Â Â used by the command-line client.
>
> The sort of cases where the user will have to type --force-interactive
> are:
>
> Â Â svn commit -F -
> Â Â svn propset --revprop -rN -F -
> Â Â svn commit --targets -
> Â Â svnmucc put -
>
> Those look like commands that would be used in scripts rather than
> interactively, I think it will be rare for the user to type one of those
> and then have to type the long option --force-interactive. That leaves
> "svnrdump load" as the single place a user will type the short option.
> I can see "svnrdump load" being used from the command line but not
> repeatedly the way one uses "svn commit". I'm not convinced a short
> option is necessary.
Agreed -- I can't see the commands above being used frequently by a user who doesn't have the credentials stored. I think the most important thing here is for the error message to indicate the problem and the solution. The current one ...
 $ svn propset --revprop -r0 p -F - http://localhost:8888/obj/repo < x.x
 svn:
E215004: Unable to connect to a repository at URL
   'http://localhost:8888/obj/repo'
 svn: E215004: No more credentials or we tried too many times.
 Authentication failed
... is poor, while adding a client-layer wrapper message like ...
 $ svn propset --revprop -r0 p -F - http://localhost:8888/obj/repo < x.x
 svn: E215004: Authentication failed and interactive prompting is disabled; see the --force-interactive option
 svn:
E215004: Unable to connect to a repository at URL
   'http://localhost:8888/obj/repo'
 svn: E215004: No more credentials or we tried too many times.
 Authentication failed
... would make it better.
- Julian
Received on 2013-03-20 13:53:51 CET