Revert "try again to not auto start editor port"

This reverts commit 043c5de2d213a3f3dd9c9b023eb42e1badefb8f0.

BUG=

Review URL: https://codereview.chromium.org//575733002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40301 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/sdk/lib/_internal/pub/README.md b/sdk/lib/_internal/pub/README.md
index fdacb34..6191ea3 100644
--- a/sdk/lib/_internal/pub/README.md
+++ b/sdk/lib/_internal/pub/README.md
@@ -40,7 +40,7 @@
 To run pub from the Dart repository, first [build Dart][building]. From the root
 of the repo:
 
-    ./tools/build.py -m release create_sdk
+    ./tools/build.py -m release
 
 You'll need to re-build whenever you sync the repository, but not when you
 modify pub or any packages it depends on. To run pub, just run `sdk/bin/pub` (or
diff --git a/sdk/lib/_internal/pub/lib/src/command/serve.dart b/sdk/lib/_internal/pub/lib/src/command/serve.dart
index 0283c2d..1d7db15 100644
--- a/sdk/lib/_internal/pub/lib/src/command/serve.dart
+++ b/sdk/lib/_internal/pub/lib/src/command/serve.dart
@@ -46,6 +46,9 @@
   /// `true` if Dart entrypoints should be compiled to JavaScript.
   bool get useDart2JS => commandOptions['dart2js'];
 
+  /// `true` if the admin server URL should be displayed on startup.
+  bool get logAdminUrl => commandOptions['log-admin-url'];
+
   BarbackMode get defaultMode => BarbackMode.DEBUG;
 
   List<String> get defaultSourceDirectories => ["web", "test"];
@@ -60,8 +63,11 @@
     commandParser.addOption('port', defaultsTo: '8080',
         help: 'The base port to listen on.');
 
-    // TODO(nweiz): Remove once editor also removes this. This is now a NOOP.
-    // Check on http://dartbug.com/20960
+    // TODO(rnystrom): A hidden option to print the URL that the admin server
+    // is bound to on startup. Since this is currently only used for the Web
+    // Socket interface, we don't want to show it to users, but the tests and
+    // Editor need this logged to know what port to bind to.
+    // Remove this (and always log) when #16954 is fixed.
     commandParser.addFlag('log-admin-url', defaultsTo: false, hide: true);
 
     // TODO(nweiz): Make this public when issue 16954 is fixed.
@@ -87,13 +93,13 @@
     var directoryLength = sourceDirectories.map((dir) => dir.length)
         .reduce(math.max);
 
-    if (adminPort != null) {
-      var server = await environment.startAdminServer(adminPort);
-      server.results.listen((_) {
-        // The admin server produces no result values.
-        assert(false);
-      }, onError: _fatalError);
+    var server = await environment.startAdminServer(adminPort);
+    server.results.listen((_) {
+      // The admin server produces no result values.
+      assert(false);
+    }, onError: _fatalError);
 
+    if (logAdminUrl) {
       log.message("Running admin server on "
           "${log.bold('http://$hostname:${server.port}')}");
     }
diff --git a/sdk/lib/_internal/pub_generated/lib/src/command/serve.dart b/sdk/lib/_internal/pub_generated/lib/src/command/serve.dart
index a6f27a5..8255ec1 100644
--- a/sdk/lib/_internal/pub_generated/lib/src/command/serve.dart
+++ b/sdk/lib/_internal/pub_generated/lib/src/command/serve.dart
@@ -23,6 +23,7 @@
     return adminPort == null ? null : parseInt(adminPort, 'admin port');
   }
   bool get useDart2JS => commandOptions['dart2js'];
+  bool get logAdminUrl => commandOptions['log-admin-url'];
   BarbackMode get defaultMode => BarbackMode.DEBUG;
   List<String> get defaultSourceDirectories => ["web", "test"];
   final _completer = new Completer();
@@ -66,77 +67,77 @@
                 var environment = x2;
                 var directoryLength =
                     sourceDirectories.map(((dir) => dir.length)).reduce(math.max);
-                join2() {
-                  environment.pauseUpdates();
-                  var it0 = sourceDirectories.iterator;
-                  break0(x6) {
-                    environment.barback.errors.listen(((error) {
-                      log.error(log.red("Build error:\n$error"));
-                    }));
-                    environment.barback.results.listen(((result) {
-                      if (result.succeeded) {
-                        log.message(
-                            "Build completed ${log.green('successfully')}");
-                      } else {
-                        log.message(
-                            "Build completed with " "${log.red(result.errors.length)} errors.");
-                      }
+                environment.startAdminServer(adminPort).then((x3) {
+                  try {
+                    var server = x3;
+                    server.results.listen(((_) {
+                      assert(false);
                     }), onError: _fatalError);
-                    environment.resumeUpdates();
-                    _completer.future.then((x3) {
-                      try {
-                        x3;
-                        completer0.complete(null);
-                      } catch (e1) {
-                        completer0.completeError(e1);
-                      }
-                    }, onError: (e2) {
-                      completer0.completeError(e2);
-                    });
-                  }
-                  continue0(x7) {
-                    if (it0.moveNext()) {
-                      Future.wait([]).then((x5) {
-                        var directory = it0.current;
-                        _startServer(
-                            environment,
-                            directory,
-                            directoryLength).then((x4) {
+                    join2() {
+                      environment.pauseUpdates();
+                      var it0 = sourceDirectories.iterator;
+                      break0(x7) {
+                        environment.barback.errors.listen(((error) {
+                          log.error(log.red("Build error:\n$error"));
+                        }));
+                        environment.barback.results.listen(((result) {
+                          if (result.succeeded) {
+                            log.message(
+                                "Build completed ${log.green('successfully')}");
+                          } else {
+                            log.message(
+                                "Build completed with " "${log.red(result.errors.length)} errors.");
+                          }
+                        }), onError: _fatalError);
+                        environment.resumeUpdates();
+                        _completer.future.then((x4) {
                           try {
                             x4;
-                            continue0(null);
-                          } catch (e3) {
-                            completer0.completeError(e3);
+                            completer0.complete(null);
+                          } catch (e2) {
+                            completer0.completeError(e2);
                           }
-                        }, onError: (e4) {
-                          completer0.completeError(e4);
+                        }, onError: (e3) {
+                          completer0.completeError(e3);
                         });
-                      });
-                    } else {
-                      break0(null);
+                      }
+                      continue0(x8) {
+                        if (it0.moveNext()) {
+                          Future.wait([]).then((x6) {
+                            var directory = it0.current;
+                            _startServer(
+                                environment,
+                                directory,
+                                directoryLength).then((x5) {
+                              try {
+                                x5;
+                                continue0(null);
+                              } catch (e4) {
+                                completer0.completeError(e4);
+                              }
+                            }, onError: (e5) {
+                              completer0.completeError(e5);
+                            });
+                          });
+                        } else {
+                          break0(null);
+                        }
+                      }
+                      continue0(null);
                     }
-                  }
-                  continue0(null);
-                }
-                if (adminPort != null) {
-                  environment.startAdminServer(adminPort).then((x8) {
-                    try {
-                      var server = x8;
-                      server.results.listen(((_) {
-                        assert(false);
-                      }), onError: _fatalError);
+                    if (logAdminUrl) {
                       log.message(
                           "Running admin server on " "${log.bold('http://${hostname}:${server.port}')}");
                       join2();
-                    } catch (e5) {
-                      completer0.completeError(e5);
+                    } else {
+                      join2();
                     }
-                  }, onError: (e6) {
-                    completer0.completeError(e6);
-                  });
-                } else {
-                  join2();
-                }
+                  } catch (e1) {
+                    completer0.completeError(e1);
+                  }
+                }, onError: (e6) {
+                  completer0.completeError(e6);
+                });
               } catch (e0) {
                 completer0.completeError(e0);
               }