Closed
Description
I get this error when trying to import a repository:
APPLICATION ERROR #plugin_SourceViewVC_run_svn
shell_exec() failed to execute Subversion.
Please use the "Back" button in your web browser to return to the previous page....
Setup:
OS: Window Server 2016 (VPS)
MantisBT version: 2.6
Database: Sql Server 2014 Express
PHP: 7.1.9
Settings made in Source plugin configuration UI:
SVN: Path to binary: C:\csvn\bin
SVN: Command Arguments: Empty
SVN: Trust All SSL certifcates: True
SVN: Use Windows Start : True (tried both)
Activity
bright-tools commentedon Sep 13, 2017
Which SVN distribution/version are you using, please?
bright-tools commentedon Sep 13, 2017
If my understanding's correct, it should be trying to execute
c:\csvn\bin\svn help
first of all when you try to import a repo. Could you try that from a command line & check what the output is? Also check that this is accessible by whatever user PHP is effectively executing as?pedwik commentedon Sep 13, 2017
Subversion version is 1.8.17 (installed with Collabnet)
pedwik commentedon Sep 13, 2017
AFAIK, on IIS 10 the application pool identity is the effective "user". This is some sort of virtual account that cannot be used as the user-parameter in a runas (test) command.
bright-tools commentedon Sep 13, 2017
Thanks. I can reproduce this, so I'll take a look.
bright-tools commentedon Sep 13, 2017
@pedwik - Two issues seem to be at work here, one of which I believe needs a code change (pull request submitted just now), the other of which will need you to add an SVN command argument - see #81 (FYI created an empty directory & used this as the parameter to the arg).
pedwik commentedon Sep 14, 2017
Since "svn.exe" is added in the code to the path (right?) "SVN: Path to binary" should be the physical path to the folder where svn.exe is located, for example C:\csvn\bin and not C:\csvn\bin\svn.exe. Is this correct? If so, maybe that should be documented shortly in the form.
Concerning the SVN command argument field, should I enter for example
"--config -dir c:\csvn\someEmptyFolder" ? The discussion in #81 is not that 100% clear to me on what the conclusions were.
bright-tools commentedon Sep 14, 2017
"SVN: Path to binary" should indeed be the directory containing the binary, as you say. Unfortunately, without the fix I submitted, the configuration options are ignored. It's a simple change, though, so hopefully you can manually update your install?
Regarding the SVN arg, what you have looks to be analogous the what I used (though note that it's
--config-dir
not--config -dir
).Debugging of failed SVN invocations could do with some improvement, to be honest. I might take a look at that in the future. Let us know how you get on, anyway.
pedwik commentedon Sep 14, 2017
I added the code change and after that the "shell_exec()" error disappeared. But nothing is imported, a new error message is "svn info returned invalid xml code"
dregad commentedon Sep 14, 2017
Just merged the PR into master. I've been planning to cut an official 2.1.0 release for some time, but other priorities keep getting in the way.
dregad commentedon Sep 14, 2017
Documentation for this plugin is sorely lacking. Any contribution in this area would be greatly appreciated... something along the lines of the existing "configuring" guides, in https://github.com/mantisbt-plugins/source-integration/tree/master/docs
dregad commentedon Sep 14, 2017
Not sure if it helps, but have a look at #132 where user had the same error message and managed to find a solution to the problem.
bright-tools commentedon Sep 14, 2017
I had feared as much. Unfortunately the plugin doesn't check for errors & tries to parse the string returned from the SVN command as if the command had succeeded. I'll try and improve the call such that it'll report the error string returned by SVN rather than the XML parse error.
30 remaining items