In FileOp/FileBackend:
authorAaron Schulz <aaron@users.mediawiki.org>
Sun, 15 Jan 2012 22:45:14 +0000 (22:45 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Sun, 15 Jan 2012 22:45:14 +0000 (22:45 +0000)
commitc4a01a7afd7e1bf329b32338957f24c0eaa09aa7
treee0baf8db56925c35b4321e2e36bdb6175d5bf8c9
parent0fbf6e62884e2f5ebc18cd95372dd45119f4dbce
In FileOp/FileBackend:
* Added SHA-1 to FileOp::attemptBatch $predicates (since concatenate was removed from FileOp). This lets us get rid of temp file backups, as the remaining failure case is just the backend medium going down (the ops would break in that case anyway). Doing so reduces RTTs and backup file I/O overhead. This also simplifies expiry object support by avoiding having to stash the expiry values of temp backup objects somewhere.
* Improved precheck() and attempt() status logic in FileOp::attemptBatch() a bit. Use separate $subStatus var to check if each op is OK.
* A few minor code cleanups and comment tweaks.
* Fixed MoveFileOp bug found in unit tests when the source/dest are the same and an overwriteDest/overwriteSame param is given (the file would just get deleted). Improved CopyFileOp in this case too.
Other:
* Added more unit tests.
includes/filerepo/backend/FileBackend.php
includes/filerepo/backend/FileOp.php
tests/phpunit/includes/filerepo/FileBackendTest.php