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

Side by Side Diff: sdk/lib/_internal/pub/lib/src/command.dart

Issue 344413004: Support pub --with-prejudice. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « sdk/lib/_internal/pub/bin/pub.dart ('k') | sdk/lib/_internal/pub/lib/src/log.dart » ('j') | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 library pub.command; 5 library pub.command;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:math' as math; 8 import 'dart:math' as math;
9 9
10 import 'package:args/args.dart'; 10 import 'package:args/args.dart';
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 help: 'Control output verbosity.', 288 help: 'Control output verbosity.',
289 allowed: ['normal', 'io', 'solver', 'all'], 289 allowed: ['normal', 'io', 'solver', 'all'],
290 allowedHelp: { 290 allowedHelp: {
291 'normal': 'Show errors, warnings, and user messages.', 291 'normal': 'Show errors, warnings, and user messages.',
292 'io': 'Also show IO operations.', 292 'io': 'Also show IO operations.',
293 'solver': 'Show steps during version resolution.', 293 'solver': 'Show steps during version resolution.',
294 'all': 'Show all output including internal tracing messages.' 294 'all': 'Show all output including internal tracing messages.'
295 }); 295 });
296 argParser.addFlag('verbose', abbr: 'v', negatable: false, 296 argParser.addFlag('verbose', abbr: 'v', negatable: false,
297 help: 'Shortcut for "--verbosity=all".'); 297 help: 'Shortcut for "--verbosity=all".');
298 argParser.addFlag('with-prejudice', hide: !isAprilFools, negatable: false,
299 help: 'Execute commands with prejudice.');
298 300
299 // Register the commands. 301 // Register the commands.
300 PubCommand.mainCommands.forEach((name, command) { 302 PubCommand.mainCommands.forEach((name, command) {
301 _registerCommand(name, command, argParser); 303 _registerCommand(name, command, argParser);
302 }); 304 });
303 305
304 return argParser; 306 return argParser;
305 } 307 }
306 308
307 /// Registers a [command] with [name] on [parser]. 309 /// Registers a [command] with [name] on [parser].
308 void _registerCommand(String name, PubCommand command, ArgParser parser) { 310 void _registerCommand(String name, PubCommand command, ArgParser parser) {
309 parser.addCommand(name, command.commandParser); 311 parser.addCommand(name, command.commandParser);
310 312
311 // Recursively wire up any subcommands. 313 // Recursively wire up any subcommands.
312 command.subcommands.forEach((name, subcommand) { 314 command.subcommands.forEach((name, subcommand) {
313 _registerCommand(name, subcommand, command.commandParser); 315 _registerCommand(name, subcommand, command.commandParser);
314 }); 316 });
315 } 317 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/pub/bin/pub.dart ('k') | sdk/lib/_internal/pub/lib/src/log.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698