View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0009866 | mantisbt | administration | public | 2008-11-21 12:33 | 2010-09-19 03:11 |
Reporter | martyribs | Assigned To | dhx | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | won't fix | ||
Platform | Intel | OS | Linux | OS Version | 2.6.17-1.2142_FC |
Product Version | 1.1.4 | ||||
Summary | 0009866: CVS integration does not work | ||||
Description | I have all the pieces in place for CVS integration, but when ../core/checkin.php gets called, the STDIN stream does not contain anything. I have inserted fwrites in the checkin.php script and there is nothing coming in on STDIN, so the regex matching does not occur inside the loop. However, when the script is called from the command line like so: cat message.txt | php checkin.php there is data on the standard IN stream as expected. I'm still investigating how CVS passes parameters in the commitinfo mechanism on Linux, but I have not found the details on the topic yet. | ||||
Steps To Reproduce | Add to checkin.php At the beginningdefine(MYDEBUGFILE, fopen("/tmp/mymantistest.out", "a")); Inside the STDIN loopfwrite(MYDEBUGFILE, "Read from STDIN: " . $t_line . "\n"); At the endfclose(MYDEBUGFILE); Do a CVS commit on a file and check MYDEBUGFILE for output. | ||||
Additional Information | I did see some references on-line about the fact that on Windows (which I'm not using), what used to be passed as parameters by CVS was at some point moved to STDIN. I doubt that checkin.php was written with just Windows in mind, so this is likely not the cause. I also saw references to bugs in the STDIN handling by PHP a few versions back, but I have confirmed with my tests that that is not an issue. My PHP version is 5.0.4. checkin.php reads STDIN correctly when invoked from the command line. | ||||
Tags | No tags attached. | ||||
I did an additional test. I modified ../core/checkin.php script. Here is the code. ================================================================= #!/usr/local/bin/php -q Mantis - a php based bugtracking systemCopyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.orgCopyright (C) 2002 - 2007 Mantis Team - mantisbt-dev@lists.sourceforge.netMantis is free software: you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation, either version 2 of the License, or(at your option) any later version.# Mantis is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU General Public License for more details.# You should have received a copy of the GNU General Public Licensealong with Mantis. If not, see http://www.gnu.org/licenses/.
?> ====================================================== The output in /tmp/mantistest.out was as follows: New invocation of checkin.php ============================================================ So there is no data on the STDIN stream. |
|
I'm seeing the same issue, STDIN is empty on my commits: |
|
I don't know if this is correct, but I got the result I wanted by putting the trigger in 'loginfo' instead of 'commitinfo': DEFAULT (echo ""; id; echo %{sVv}; date; cat) | /usr/share/mantis/core/checkin.php |
|
Won't fix as this old source code integration support is being dropped in favour of using a more modern plugin approach with the SourceIntegration plugin. Refer to 0011732 for more details and feedback. |
|