| Index: pkg/analysis_server/test/stress/replay/replay.dart
|
| diff --git a/pkg/analysis_server/test/stress/replay/replay.dart b/pkg/analysis_server/test/stress/replay/replay.dart
|
| index 6c56047cfc0b868338440254ac246e92731bce8e..dd9016d7d60f97f54ffeb680bba0d773d000c485 100644
|
| --- a/pkg/analysis_server/test/stress/replay/replay.dart
|
| +++ b/pkg/analysis_server/test/stress/replay/replay.dart
|
| @@ -9,6 +9,7 @@ library analysis_server.test.stress.replay.replay;
|
|
|
| import 'dart:async';
|
| import 'dart:io';
|
| +import 'dart:math' as math;
|
|
|
| import 'package:analysis_server/plugin/protocol/protocol.dart';
|
| import 'package:analyzer/dart/ast/token.dart';
|
| @@ -168,7 +169,8 @@ class Driver {
|
| LineInfo info = fileEdit.lineInfo;
|
| for (DiffHunk hunk in blobDiff.hunks) {
|
| int srcStart = info.getOffsetOfLine(hunk.srcLine);
|
| - int srcEnd = info.getOffsetOfLine(hunk.srcLine + hunk.removeLines.length);
|
| + int srcEnd = info.getOffsetOfLine(
|
| + math.min(hunk.srcLine + hunk.removeLines.length, info.lineCount - 1));
|
| String addedText = _join(hunk.addLines);
|
| //
|
| // Create the source edits.
|
| @@ -320,6 +322,7 @@ class Driver {
|
| //
|
| // Iterate over the history, applying changes.
|
| //
|
| + int dotCount = 0;
|
| bool firstCheckout = true;
|
| ErrorMap expectedErrors = null;
|
| Iterable<String> changedPubspecs;
|
| @@ -363,6 +366,10 @@ class Driver {
|
| }
|
| changedPubspecs = commitDelta.filesMatching(PUBSPEC_FILE_NAME);
|
| stdout.write('.');
|
| + if (dotCount++ > 100) {
|
| + stdout.writeln();
|
| + dotCount = 0;
|
| + }
|
| }
|
| server.removeAllOverlays();
|
| stdout.writeln();
|
| @@ -632,10 +639,8 @@ class Statistics {
|
| if (hours > 0) {
|
| return '$hours:$minutes:$seconds.$milliseconds';
|
| } else if (minutes > 0) {
|
| - return '$minutes:$seconds.$milliseconds m';
|
| - } else if (seconds > 0) {
|
| - return '$seconds.$milliseconds s';
|
| + return '$minutes:$seconds.$milliseconds';
|
| }
|
| - return '$milliseconds ms';
|
| + return '$seconds.$milliseconds';
|
| }
|
| }
|
|
|