Index: trunk/phase3/maintenance/fetchText.php |
— | — | @@ -39,7 +39,7 @@ |
40 | 40 | } |
41 | 41 | $textId = intval( $line ); |
42 | 42 | $text = $this->doGetText( $db, $textId ); |
43 | | - $this->output( strlen( $text ) . "\n" . $text ); |
| 43 | + $this->output( $textId . "\n" . strlen( $text ) . "\n" . $text ); |
44 | 44 | } |
45 | 45 | } |
46 | 46 | |
Index: trunk/phase3/maintenance/dumpTextPass.php |
— | — | @@ -331,7 +331,17 @@ |
332 | 332 | $ok = fflush( $this->spawnWrite ); |
333 | 333 | // $this->progress( ">> [flush]" ); |
334 | 334 | if ( !$ok ) return false; |
335 | | - |
| 335 | + |
| 336 | + // check that the text id they are sending is the one we asked for |
| 337 | + // this avoids out of sync revision text errors we have encountered in the past |
| 338 | + $newId = fgets( $this->spawnRead ); |
| 339 | + if ( $newId === false ) { |
| 340 | + return false; |
| 341 | + } |
| 342 | + if ( $id != intval( $newId ) ) { |
| 343 | + return false; |
| 344 | + } |
| 345 | + |
336 | 346 | $len = fgets( $this->spawnRead ); |
337 | 347 | // $this->progress( "<< " . trim( $len ) ); |
338 | 348 | if ( $len === false ) return false; |