Lines Matching refs:lines

128      * Adjacent changelog lines are optimistically parsed and cached to speed up
165 //read lines from changelog
166 [$fp, $lines] = $this->readloglines($rev);
170 if (empty($lines)) return false;
172 // parse and cache changelog lines
173 foreach ($lines as $line) {
191 * For efficiency, the log lines are parsed and cached for later
194 * lines are received.
196 * @param int $first skip the first n changelog lines
206 $lines = [];
229 $lines = file($logfile);
230 if ($lines === false) {
272 $lines = [...$tmp, ...$lines];
277 } else { // already read all the lines
285 // skip parsing extra lines
286 $num = max(min(count($lines) - $first, $num), 0);
288 $lines = array_slice($lines, max(count($lines) - $first - $num, 0), $num);
290 $lines = array_slice($lines, 0, max(count($lines) - $first, 0));
292 $lines = array_slice($lines, max(count($lines) - $num, 0));
295 // handle lines in reverse order
296 for ($i = count($lines) - 1; $i >= 0; $i--) {
297 $info = $this->parseAndCacheLogLine($lines[$i]);
312 * Adjacent changelog lines are optimistically parsed and cached to speed up
333 //get lines from changelog
334 [$fp, $lines, $head, $tail, $eof] = $this->readloglines($rev);
335 if (empty($lines)) return false;
338 // also parse and cache changelog lines for getRevisionInfo().
345 $count = count($lines);
354 $info = $this->parseAndCacheLogLine($lines[$i]);
372 [$lines, $head, $tail] = $this->readAdjacentChunk($fp, $head, $tail, $direction);
374 if (empty($lines)) break;
410 [$revs2, $allRevs, $fp, $lines, $head, $tail] = $this->retrieveRevisionsAround($rev2, $max);
425 for ($i = count($lines) - 1; $i >= 0; $i--) {
426 $info = $this->parseAndCacheLogLine($lines[$i]);
437 [$lines, $head, $tail] = $this->readAdjacentChunk($fp, $head, $tail, -1);
484 * - $lines: non-parsed changelog lines before the parsed revisions
495 //get lines from changelog
496 [$fp, $lines, $startHead, $startTail, $eof] = $this->readloglines($rev);
497 if (empty($lines)) return false;
499 //parse changelog lines in chunk, and read forward more chunks until $max/2 is reached
502 while (count($lines) > 0) {
503 foreach ($lines as $line) {
521 [$lines, $head, $tail] = $this->readAdjacentChunk($fp, $head, $tail, 1);
540 $lines = [];
545 [$lines, $head, $tail] = $this->readAdjacentChunk($fp, $head, $tail, -1);
547 for ($i = count($lines) - 1; $i >= 0; $i--) {
548 $info = $this->parseAndCacheLogLine($lines[$i]);
559 //keep only non-parsed lines
560 $lines = array_slice($lines, 0, $i);
567 return [$requestedRevs, $revs, $fp, $lines, $head, $lastTail];