Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(243)

Side by Side Diff: tools/migration/lib/src/fork.dart

Issue 2992903002: Fix a couple of things causing bot redness: (Closed)
Patch Set: Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tests/language_strong/built_in_identifier_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:io'; 5 import 'dart:io';
6 6
7 import 'package:path/path.dart' as p; 7 import 'package:path/path.dart' as p;
8 8
9 import 'io.dart'; 9 import 'io.dart';
10 import 'log.dart'; 10 import 'log.dart';
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 String _strongSource; 107 String _strongSource;
108 108
109 Fork(this.twoPath); 109 Fork(this.twoPath);
110 110
111 List<String> migrate() { 111 List<String> migrate() {
112 print("- ${bold(twoPath)}:"); 112 print("- ${bold(twoPath)}:");
113 113
114 var todos = <String>[]; 114 var todos = <String>[];
115 115
116 if (!oneExists && !twoExists) { 116 if (!oneExists && !strongExists) {
117 // It's already been migrated, so there's nothing to move. 117 // It's already been migrated, so there's nothing to move.
118 note("Is already migrated."); 118 note("Is already migrated.");
119 } else if (twoExists) { 119 } else if (twoExists) {
120 // If there is a migrated version and it's the same as an unmigrated one, 120 // If there is a migrated version and it's the same as an unmigrated one,
121 // delete the unmigrated one. 121 // delete the unmigrated one.
122 if (oneExists) { 122 if (oneExists) {
123 if (oneSource == twoSource) { 123 if (oneSource == twoSource) {
124 deleteFile(onePath); 124 deleteFile(onePath);
125 done("Deleted already-migrated $onePath."); 125 done("Deleted already-migrated $onePath.");
126 } else { 126 } else {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 } 165 }
166 166
167 // See what work is left to be done in the migrated file. 167 // See what work is left to be done in the migrated file.
168 if (twoExists) { 168 if (twoExists) {
169 validateFile(twoPath, twoSource, todos); 169 validateFile(twoPath, twoSource, todos);
170 } 170 }
171 171
172 return todos; 172 return todos;
173 } 173 }
174 } 174 }
OLDNEW
« no previous file with comments | « tests/language_strong/built_in_identifier_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698