r83485 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83484‎ | r83485 | r83486 >
Date:20:45, 7 March 2011
Author:hashar
Status:ok
Tags:
Comment:
raises shell adaptor virtual memory limitation

This patch adds a minimal memory threshold for our subversion
shell adaptator. The default in MediaWiki 1.18 is to limit
a shell execution virtual at 102400KB. On my Debian (testing),
'svn up' uses 138MB (checked with pmap).

The patch overrides $wgMaxShellMemory if it is too low.
Modified paths:
  • /trunk/extensions/CodeReview/backend/Subversion.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/backend/Subversion.php
@@ -122,7 +122,17 @@
123123 * Using the thingy-bobber
124124 */
125125 class SubversionShell extends SubversionAdaptor {
 126+ const MIN_MEMORY = 204800;
126127
 128+ function __construct( $repo ) {
 129+ parent::__construct( $repo );
 130+ global $wgMaxShellMemory;
 131+ if( $wgMaxShellMemory < SubversionShell::MIN_MEMORY ) {
 132+ $wgMaxShellMemory = 204800;
 133+ wfDebug( __METHOD__ . " raised wgMaxShellMemory to $wgMaxShellMemory\n" );
 134+ }
 135+ }
 136+
127137 function canConnect() {
128138 $command = sprintf(
129139 "svn info %s %s",

Follow-up revisions

RevisionCommit summaryAuthorDate
r84595Followup r83485: don't hardcode the mem limit in two places, just reuse the c...demon14:50, 23 March 2011

Status & tagging log