anchor.diff:  enum Branch {
     beta,
     stable;
  -
  -  static Branch fromName(String name) {
  -    switch (name) {
  -      case 'beta':
  -        return Branch.beta;
  -      case 'stable':
  -        return Branch.stable;
  -      default:
  -        throw ArgumentError('Invalid branch name.');
  -    }
  -  }
   }
   
   /// A helper class for classes that want to run a process, optionally have the
  
positive.code: 
    final bool publish = parsedArguments['publish'] as bool;
    final bool dryRun = parsedArguments['dry_run'] as bool;
    final Branch branch = Branch.fromName(parsedArguments['branch'] as String);
    final ArchiveCreator creator = ArchiveCreator(
      tempDir,
      outputDir,
  
negative.code:     exit(exitCode);
    }
  
    if (!parsedArguments.wasParsed('revision')) {
      errorExit('Invalid argument: --revision must be specified.');
    }
    final String revision = parsedArguments['revision'] as String;
    if (revision.length != 40) {
      errorExit('Invalid argument: --revision must be the entire hash, not just a prefix.');
    }
  