anchor.diff:      log.io("Finding versions of ${ref.name} in "
           "$systemCacheRoot/${_urlToDirectory(server)}");
   
  -    var dir = path.join(systemCacheRoot, _urlToDirectory(server));
  +    var dir = p.join(systemCacheRoot, _urlToDirectory(server));
   
       var versions;
       if (dirExists(dir)) {
         versions = await listDir(dir).map((entry) {
  -        var components = path.basename(entry).split("-");
  +        var components = p.basename(entry).split("-");
           if (components.first != ref.name) return null;
           return HostedSource.idFor(
               ref.name, new Version.parse(components.skip(1).join("-")),
  
positive.code:   String getDirectory(PackageId id) {
      var parsed = _parseDescription(id.description);
      var dir = _urlToDirectory(parsed.last);
      return path.join(systemCacheRoot, dir, "${parsed.first}-${id.version}");
    }
  
    String packageName(description) => _parseDescription(description).first;
  
negative.code: /// This behavior is a bug, but is being preserved for compatibility.
  String _urlToDirectory(String url) {
    // Normalize all loopback URLs to "localhost".
    url = url.replaceAllMapped(
        new RegExp(r"^(https?://)(127\.0\.0\.1|\[::1\]|localhost)?"),
        (match) {
      // Don't include the scheme for HTTPS URLs. This makes the directory names
      // nice for the default and most recommended scheme. We also don't include
      // it for localhost URLs, since they're always known to be HTTP.
      var localhost = match[2] == null ? '' : 'localhost';
      var scheme = match[1] == 'https://' || localhost.isNotEmpty ? '' : match[1];
      return "$scheme$localhost";
    });
    return replace(url, new RegExp(r'[<>:"\\/|?*%]'),
        (match) => '%${match[0].codeUnitAt(0)}');
  }
  