anchor.diff:    end
   end
   ''';
  -}
   
   Future runGit(List<String> args) async {
     print("git ${args.join(' ')}");
  
positive.code:   }
  }
  
  Future setCurrentRevisions(Map revisions) async {
    var lines = await (new File('$repository/dart.rb')).readAsLines();
  
    for (var channel in CHANNELS) {
  
negative.code:     revisions[channel] =
          regExp.firstMatch(lines.firstWhere(regExp.hasMatch)).group(1);
    }
    return revisions;
  }
  
  Future<Map> getHashes(Map revisions) async {
    var hashes = <String, Map>{};
    for (var channel in CHANNELS) {
      hashes[channel] = {};
      for (var file in FILES) {
        var hash = await getHash256(channel, revisions[channel], file);
        hashes[channel][file] = hash;
      }
    }
    return hashes;
  }
  
  Future writeHomebrewInfo(String channel, String revision) async {
    var revisions = await getCurrentRevisions();
  
    if (revisions[channel] == revision) {
      print("Channel $channel is already at revision $revision in homebrew.");
      exit(0);
    }
    revisions[channel] = revision;
    var hashes = await getHashes(revisions);
    var devVersion = await getVersion('dev', revisions['dev']);
  
    var stableVersion = await getVersion('stable', revisions['stable']);
  
    await new File('$repository/dartium.rb').writeAsString(
        createDartiumFormula(revisions, hashes, devVersion, stableVersion),
        flush: true);
    await new File('$repository/dart.rb').writeAsString(
        createDartFormula(revisions, hashes, devVersion, stableVersion),
        flush: true);
  }
  
  String createDartiumFormula(
      Map revisions, Map hashes, String devVersion, String stableVersion) => '''
  require 'formula'
  
  class Dartium < Formula
  