https://bugzilla.wikimedia.org/show_bug.cgi?id=35218

--- Comment #2 from Mark Clements (HappyDog) <[email protected]> 2012-03-16 
10:50:15 UTC ---
I think the difference between 'old' behaviour and 'new' behaviour that I have
experienced is due to the fact that the old server was WAMP-based and the new
one is LAMP.

I've re-run the svnImport.php script, using the same MW and CR versions as my
Windows box, for the same repo, and I just get the following, which is what I
would consider the 'expected result':

 Using SubversionShell adaptor
 IMPORT FROM REPO: sandbox
 Last stored revision: 118
 Syncing from r119 to HEAD...
 Pre-caching skipped.
 Done!

Interestingly, I tried running the same svn log directly from the command-line
on the Windows machine:

 > svn log -v -r119:518 --non-interactive URL
 svn: No such revision 518

Therefore the error is generated in all cases, but in the Windows environment
it is not appearing on the screen for some reason.

>From that, and a bit of sleuthing inside wfShellExec(), it looks like, on
Windows, anything sent to stderr is discarded by the passthru() function,
whilst on Linux stderr always gets sent to the output stream, somehow bypassing
any output-buffering that has been set up, such as we use in wfShellExec().

I suspect the answer to this fix is to add " 2>&1" to the end of the $cmd
variable in wfShellExec() when not running on Windows, prior to executing the
command, so all output is caught.

Sound reasonable?  Or are there some ramifications there I've not considered?

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to