This, that and the other
4abb459392
Refactor dumpBackup.php and dumpTextPass.php to be Maintenance subclasses
...
Use the Maintenance class's new $orderedOptions and support for
passing options multiple times. This allows for option "chaining".
The BackupDumper and TextPassDumper class now extend Maintenance, but
should continue to function as before. The public function processArgs()
has been removed and replaced by processOptions(), which takes no
parameters. It is unlikely that users of these classes were calling
processArgs.
Inheritors of these classes that overrode processOption() will now need to
override processOptions() and use Maintenance::getOption() and friends.
The maintenance/backupTextPass.inc file has been deleted. Users should
include maintenance/dumpTextPass.php instead.
Bug: T122587
Change-Id: I2473ee119c185d1b2b00ac4b1e70ee8a6cafe4a3
2015-12-31 20:46:54 +11:00
Christian Aistleitner
7f687cc858
Allow to set stub read buffer size for TextPassDumper
...
The default buffer size of 512KB seems to unconveniently high for
checkpoint tests. To be able to speed up tests in a follow-up commit,
we allow callers to set the buffer size to use for reads of the stub.
Bug: T70653
Change-Id: Ib63e89fac2abaac8feb542839d4d8e53c917ebe1
2015-02-20 00:56:39 +01:00
Siebrand Mazeland
f2f31fadc7
Update formatting in maintenance/ (2/4)
...
Change-Id: I2b791d3bff0de464b6bdaaeae0622c065389c31c
2014-04-23 20:08:42 +02:00
Ladsgroup
16a5102765
Change URLs to mediawiki.org in comments to HTTPS
...
These are only documentation fixes
http://www.mediawiki.org --> https://www.mediawiki.org
Change-Id: I62ad42be1a3aac410cc53e98ce79389ceddd8988
2014-03-20 16:59:46 +00:00
umherirrender
5dbfd5bf80
Fixed spacing
...
- Removed trailing spaces in comments
- Removed multiple empty lines
- Removed space after object operator
Change-Id: I9fd3256ab490c7cd2034de3fd94e6be6e6d6d8f2
2013-11-21 18:52:25 +00:00
Timo Tijhof
beb1c4a0ec
phpcs: More require/include is not a function
...
Follows-up I1343872de7, Ia533aedf63 and I2df2f80b81.
Also updated usage in text in documentation and the
installer LocalSettingsGenerator.
Most of them were handled by this regex:
- find: (require|include|require_once|include_once)\s*\(\s*(.+?)\s*\)\s*;$
- replace: $1 $2;
Change-Id: I6b38aad9a5149c9c43ce18bd8edbab14b8ce43fa
2013-05-21 23:26:28 +02:00
Antoine Musso
f6b92231fd
style: normalize end of files
...
By PSR2 PHP Standard, the files should ends with exactly one newline.
Some of our files have 2 or more and some other were missing a newline.
Fix almost all occurences of CodeSniffer sniff:
PSR2.Files.EndFileNewline.TooMany
I have not fixed the selenium files, I believe we will drop them.
Change-Id: I89fca8c1786fee94855b7b77bb0f364001ee84b6
2013-02-03 15:04:39 +01:00
jeroendedauw
38c7f444e1
Use __DIR__ instead of dirname( __FILE__ )
...
We can now do this since we finally switched to PHP 5.3 for MW 1.20 and get rid of the silly dirname(__FILE__) stuff :)
Change-Id: Id9b2c9cd2e678197aa81c78adced5d1d31ff57b1
2012-08-27 21:45:00 +02:00
Platonides
f77bd54df3
Make backupTestPass.inc require_once by itself its dependence on backup.inc
...
Change path-less requires to full path ones.
Change-Id: Ida37a3ec9bb1d5c99f4bbbf6d967cb40d0442e38
2012-05-06 22:31:03 +02:00
Christian Aistleitner
da71da52f2
TextPassDumper -> backupTextPass.inc
...
Change-Id: I68e744251ca5d8dc61d08a840751bf5a667d496c
2012-04-03 12:55:08 +02:00
Christian Aistleitner
f4877475ed
Code reformatting
...
Change-Id: I40a108216045aad9496bbbf723de2f42b084d009
2012-03-22 12:11:50 +01:00
Christian Aistleitner
e1227913b7
Refactoring dumpTextPass's error handling
...
Change-Id: I9c0af860ca97489222b3cec071ed721ce72ad9e5
2012-03-22 10:51:20 +01:00
Roan Kattouw
0fca9a7991
Revert r107309, r113601, r113704, r113742, r113792, r113838, r113859, r113893, r113894, r113952, r114047, r114252, r114256, r114257. This reverts the remaining 'new' revisions in core.
...
All of these revisions are tagged with 'gerritmigration' and will be resubmitted into Gerrit after the Gerrit switchover. See also http://lists.wikimedia.org/pipermail/wikitech-l/2012-March/059124.html
2012-03-21 00:16:50 +00:00
Christian Aistleitner
b23761744f
Follow-up to r114256: Removing final assert
2012-03-20 12:00:18 +00:00
Christian Aistleitner
2c06312ae3
Follow up to r114252: Removing asserts
2012-03-20 11:53:35 +00:00
Christian Aistleitner
872ea70af6
Refactoring dumpTextPass's error handling
2012-03-20 11:11:53 +00:00
Sam Reed
f3f180850a
Fixing up undefined types in maintenance documentation
2012-02-09 21:08:06 +00:00
Sam Reed
e336b5e951
Remove some unused getting of non existent arguments
...
Documentation
2011-10-18 17:31:54 +00:00
Ariel Glenn
b547246366
add mwscript handling for call of fetchText.php maintenance script
2011-09-23 07:48:30 +00:00
Ariel Glenn
2ec322f6c2
handle naming checkpoint file with first/last pageID when the file is empty
2011-09-23 06:15:20 +00:00
Ariel Glenn
be36f6e1fe
getFilename renamed to getFilenames since it can return a list
2011-09-09 07:28:11 +00:00
Ariel Glenn
e30a238ebf
uniform comment style, fix a few space issues, address couple issues from comments on r95272
2011-09-08 21:06:15 +00:00
Chad Horohoe
cbd499b538
Remove wfDie() that Ariel keeps trying to resurrect :)
2011-08-30 20:45:36 +00:00
Ariel Glenn
409725f43e
check the checkpoint related options only if we specified checkpoints, duh
2011-08-29 22:48:18 +00:00
Ariel Glenn
12e00d6eb9
move some member vars to parent class since they are needed there now, set lastTime and other vars so checkpoints without prefetch work, update progress reporting in parent class to give rates during interval and from start of run
2011-08-28 19:06:52 +00:00
Ariel Glenn
0dcd589b6b
define and use closeAndRename() after last write of xml dump file; convert from popen (child inherits all open descriptors and there is no workaround) to proc_open (CLOEXEC set on all descriptors), needed so close and rename doesn't hang forever if a child (prefetcher) is forked
2011-08-27 18:31:03 +00:00
Ariel Glenn
0f90a6b10e
remove extraneous hyphen that crept in, grr
2011-08-24 20:43:09 +00:00
Ariel Glenn
76997163b6
fix timestamp stuff, more fallout from bad merge attempt
2011-08-23 00:36:15 +00:00
Ariel Glenn
b6a6354676
fix a couple bad lines in previous commit from bad merge attempt
2011-08-23 00:04:45 +00:00
Ariel Glenn
bc3caf7666
add support for writing out checkpoint files of xml dump at regular intervals (close and rename file based on filename pattern which includes first and last page id written)
2011-08-22 22:45:22 +00:00
Chad Horohoe
b1bfcaeca4
Revert r85034, r81186, r77638: per CR on r77638: XMLReader and XMLWriter are memory-hungry beasts and this script OOMs constantly.
...
This was already reverted in 1.17wmf1 (r82930) by Ariel. Doing the same in trunk now. I'm not opposed to using the new pretty XML* classes, but somebody needs to debug why they eat memory for breakfast, lunch and dinner.
2011-07-20 23:06:24 +00:00
Sam Reed
26e62d5089
Swap = to == in conditional
2011-03-30 18:56:31 +00:00
Ariel Glenn
82915f097b
eta shows revs/pages per sec in current interval as well as overall; useful for investigating problems, now that we have logging
2011-03-27 13:27:05 +00:00
Alexandre Emsenhuber
8eb3b596e0
* (bug 27016) Fix for r77638: dumpTextPass.php now consider the "output" parameter
...
Also added "output" parameter to the doc since nothing was mentioning it
2011-01-29 09:00:38 +00:00
Ariel Glenn
585f1a3cce
open a series of files for xml input, if supplied (used for multiple xml prefetch files)
2011-01-28 19:20:49 +00:00
Alexandre Emsenhuber
449a2e61bd
When opening the subprocess fetchText.php, pass the complete wiki ID through the --wiki parameter so that it works for all setups and not only for wikimedia
2010-12-06 09:20:07 +00:00
Alexandre Emsenhuber
1098d92d42
Follow-up r67324: removed check for empty text since the length is checked explicitly
2010-12-04 19:30:26 +00:00
Alexandre Emsenhuber
6b190f772e
Modifier dumpTextPass.php to use XMLReader and XMLWriter rather than xml_* functions
2010-12-03 10:05:01 +00:00
Sam Reed
c15c1c6abb
More reversion of r77297, 2 of 2 commits to keep it readable in CR (hopefully)
2010-11-25 22:24:28 +00:00
Antoine Musso
6fe29c9c30
revert r76464
...
* mixed style changes and variable removing
* logic changes
* useful comments removed
2010-11-25 20:01:34 +00:00
Sam Reed
10ecfeb03b
Various unused variables, add some braces
...
Explicitally define some variables used in hook type calls
2010-11-10 19:49:04 +00:00
Alexandre Emsenhuber
f916f9e25c
One more remplacement to __METHOD__
2010-10-09 12:30:20 +00:00
Alexandre Emsenhuber
76bebf904c
* Standardised file description headers
...
* added @file where needed
* added file description headers where needed
2010-10-03 09:25:28 +00:00
Alexandre Emsenhuber
6da6645192
And while I'm a it:
...
* Fixed E_STRICT about different signature of TextPassDumper::dump() and BackupDumper::dump()
* Add the possibility to show the help message...
2010-10-02 21:58:04 +00:00
Alexandre Emsenhuber
da131336ac
Per Platonides; follow-up r74158: XMLReader is included in PHP since 5.1.0
2010-10-02 21:51:44 +00:00
Alexandre Emsenhuber
7e9424bce9
MediaWiki even require PHP 5.1.0+ ;)
2010-10-02 21:40:43 +00:00
Platonides
50e2405a03
Refactor to avoid defining globals inside switches.
2010-08-12 14:25:07 +00:00
Ariel Glenn
fba252c800
clean up space/tab stuff
2010-07-19 18:36:52 +00:00
Ariel Glenn
9f6103db51
intval ( $id ) once in caller instead of in all the getTextXXX functions
2010-07-15 21:25:31 +00:00
Ariel Glenn
da009ed5fb
distinguish failed text retrieval from empty text, consolidate text retrieval retry code, die after maxConsecutiveFailedTextRetrievals (of separate revisions)
2010-06-16 20:12:29 +00:00