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

Post-commit hook on Windows fails getting since %REV% and %REPO% är empty #290

Closed pedwik closed 5 years ago

pedwik commented 5 years ago

I have tried this post-commit hook on Windows. I use direct php instead of curl, and would appreciate any help!

set REPOS=%1 set REV=%2

SET PHP="C:\PHP\v7.1.9\x64\php-cgi.exe" SET SVNLOOK="C:\csvn\bin\svnlook.exe" SET TEMPFILE="C:\csvn\temp\log.txt"

%SVNLOOK% log -r %REV% %REPOS% > %TEMPFILE%

%PHP% c:\mantisbt\plugin.php page=Source/checkin reponame=%REPOS% data=%REV% api_key=xxx

The problem is that the SVNLOOK-command returns nothing.

dregad commented 5 years ago

I don't see the need for this svnlook command, since its output is not being used by the source integration plugin at all. Maybe it would be better to redirect your question to some SVN forum.

pedwik commented 5 years ago

Since checkin.php requires revision number, I use import.php instead in the post-commit hook, and then it works. Import.php only imports all the latest revisions and it runs fast, so I do not see the need for checkin.php anymore.

dregad commented 5 years ago

Fair enough, thanks for the feedback.