Weird behavior of `svn --non-interactive`

2019-02-25 Thread Alexey Neyman

Hi all,

I am encountering some weird behavior after upgrading my workstation to 
Ubuntu 18.10 - which also upgraded the SVN to version 1.10.0 (r1827917).


An attempt to query anything from the server using the 
`--non-interactive` flag fails, unless there has been a recent 
"interactive session" with this server.


aneyman@yehat:~/work/lsk-ranges$ svn --non-interactive pl ^/
svn: E170013: Unable to connect to a repository at URL 
'svn://svn.lynx.com/lynxsecure'

svn: E170001: Can't get username or password
aneyman@yehat:~/work/lsk-ranges$ svn pl ^/
Properties on 'svn://svn.lynx.com/lynxsecure':
  reviewboard:url
aneyman@yehat:~/work/lsk-ranges$ svn --non-interactive pl ^/
Properties on 'svn://svn.lynx.com/lynxsecure':
  reviewboard:url

This happens during various actions by `rbt` (RBTools) which runs svn 
with --non-interactive flag.


Note that the "interactive" run of svn does not even query the password 
- it happily uses the stored password and proceeds. Why isn't the 
non-interactive invocation doing the same?


I also tried the development version of Subversion a couple of weeks 
ago; it has the same behavior.


Regards,
Alexey.



Re: working copy hook

2019-02-25 Thread Andreas Stieger
Hi,

> Could Subversion support working copy hook? Because I want to ensure
> new commit won't introduce any building error, e.g. always running
> "make html" before "svn commit".

This is not implemented in plain svn (and has serious security issues)
However some IDEs and UI integrations have this. e.g. 
https://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-settings.html#tsvn-dug-settings-hooks

Andreas


Re: working copy hook

2019-02-25 Thread Stefan Sperling
On Mon, Feb 25, 2019 at 05:11:25PM +0800, wuzhouhui wrote:
> Could Subversion support working copy hook? Because I want to ensure
> new commit won't introduce any building error, e.g. always running
> "make html" before "svn commit".
> 
> Thanks.

There are only server-side hooks.

But you can use branches to solve this problem.
You could commit to a "staging" branch, and have a post-commit hook on the
server which runs a build test on commits to this branch, and then performs
an automatic merge to a "production" branch if the build was successful.
If the build fails, such a server-side hook could avoid merging changes to
the "production" branch until the "staging" branch has been fixed in a
future commit.


working copy hook

2019-02-25 Thread wuzhouhui
Could Subversion support working copy hook? Because I want to ensure
new commit won't introduce any building error, e.g. always running
"make html" before "svn commit".

Thanks.