Home | History | Annotate | Download | only in Scripts

Lines Matching full:lines

409 #                       Unrecognized lines are discarded.
443 # Fix paths on ""---" and "+++" lines to match the leading
462 # Skip unrecognized lines.
578 # file -- i.e. no leading context and all lines starting with "+".
593 # lines. A new ChangeLog entry with the same date and author as the
594 # previous will match and cause the diff to have lines of starting
604 my @lines = split(/$lineEnding/, $patch);
609 for (; $i < @lines; ++$i) {
610 if (substr($lines[$i], 0, 1) eq "@") {
616 # Optimization: do not process if new lines already begin the chunk.
617 if (substr($lines[$i], 0, 1) eq "+") {
627 for (; $i < @lines; ++$i) {
628 my $line = $lines[$i];
637 if ($i >= @lines) {
642 # Rewrite overlapping lines to lead with " ".
644 for (; $i < @lines; ++$i) {
645 my $line = $lines[$i];
650 $lines[$i] = " " . substr($line, 1);
655 for (; $i < @lines; ++$i) {
656 my $firstChar = substr($lines[$i], 0, 1);
667 splice(@lines, $i - @overlappingLines, @overlappingLines);
671 # Work backwards, shifting overlapping lines towards front
674 my $line = $lines[$i];
683 $lines[$i] = "+$text";
686 # Finish moving whatever overlapping lines remain, and update
689 if ($lines[$chunkStartIndex - 1] !~ /$chunkRangeRegEx/) {
706 splice(@lines, $chunkStartIndex, 0, @overlappingLines);
710 $lines[$chunkStartIndex - 1] = "@@ -1,$sourceLineCount +1,$targetLineCount @@";
712 return join($lineEnding, @lines) . "\n"; # patch(1) expects an extra trailing newline.