[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [Issue 3913] "svnrdump load" is not working in interactive mode

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Wed, 20 Mar 2013 12:53:14 +0000 (GMT)

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

This is an archived mail posted to the Subversion Dev mailing list.