mantisbt-plugins / source-integration

Source control integration plugin framework for MantisBT, including support for Github, Gitlab, Bitbucket, Gitea, Gitweb, Cgit, Subversion, Mercurial and more
http://noswap.com/projects/source-integration/
MIT License
181 stars 130 forks source link

Improve error detection & handling when invoking SVN #247

Closed bright-tools closed 7 years ago

bright-tools commented 7 years ago

As discussed on #241, try and be a bit more robust when executing the SVN command.

@dregad, I tried to keep my implementation close to the work that you did in the hope it would ease the review process. Please take a look & let me know if you want any changes prior to merge. I've done some basic testing.

bright-tools commented 7 years ago

@dregad , thanks for the review!

I hopefully fixed the PHPDoc block

With regard to the errors, I've tried to refine them (the redundant parameter on one of the probably did not help). Intent is that the first error is triggered in the case that proc_open() fails (i.e. not possible to execute SVN), while the other error is triggered if the SVN process returns to stderr. It seemed like a distinction worth making, but let me know what you think.

dregad commented 7 years ago

WRT the error messages, I think its good following your latest commit.

bright-tools commented 7 years ago

Argh! You can tell how much I've used PHPDoc mark-up, can't you? :grin:

dregad commented 7 years ago

@bright-tools Thanks for your contribution !

As a side note and if you don't mind, I would prefer when you submit pull requests, that you rebase your branch on top of upstream master, instead of merging it (that's in the interest of keeping a clean git history). Thanks !

bright-tools commented 7 years ago

Noted, will do!