Patchwork [V2] serve: No 'listening at' line when port specified (issue 3976)

login
register
mail settings
Submitter Anurag Goel
Date Feb. 19, 2014, 8:31 p.m.
Message ID <03f3e641e777d7abd214.1392841876@ubuntu.ubuntu-domain>
Download mbox | patch
Permalink /patch/3699/
State Deferred
Headers show

Comments

Anurag Goel - Feb. 19, 2014, 8:31 p.m.
# HG changeset patch
# User anuraggoel <anurag.dsps@gmail.com>
# Date 1392841762 -19800
#      Thu Feb 20 01:59:22 2014 +0530
# Node ID 03f3e641e777d7abd214693a821774d588ec1c36
# Parent  0e2877f8605dcaf4fdf2ab7e0046f1f6f80161dd
serve: No 'listening at' line when port specified (issue 3976)

When port is specified in "hg serve" command,then there is no listening.
This problem arise when ui.verbose is not configured which simply return the function value in mid-way.
I think,there is no use of "ui.verbose" statement, so i just cut it out.
Now it gives message to the user "listening at port some number".
I run the test suite.Its working fine except that new line when port is specified.
We need to add one line in test suite wherever port is specified explicitly.
Matt Mackall - Feb. 19, 2014, 10:56 p.m.
On Thu, 2014-02-20 at 02:01 +0530, Anurag Goel wrote:
> # HG changeset patch
> # User anuraggoel <anurag.dsps@gmail.com>
> # Date 1392841762 -19800
> #      Thu Feb 20 01:59:22 2014 +0530
> # Node ID 03f3e641e777d7abd214693a821774d588ec1c36
> # Parent  0e2877f8605dcaf4fdf2ab7e0046f1f6f80161dd
> serve: No 'listening at' line when port specified (issue 3976)

Fails bullet points 1 and 2 of the submission checklist.

> I run the test suite.Its working fine except that new line when port is specified.
> We need to add one line in test suite wherever port is specified explicitly.

And bullet point 9. You didn't fix that yourself why?

Patch

diff -r 0e2877f8605d -r 03f3e641e777 mercurial/commands.py
--- a/mercurial/commands.py	Sat Feb 15 22:09:32 2014 -0600
+++ b/mercurial/commands.py	Thu Feb 20 01:59:22 2014 +0530
@@ -5116,9 +5116,6 @@ 
         util.setsignalhandler()
         self.httpd = hgweb_server.create_server(self.ui, self.app)
 
-        if self.opts['port'] and not self.ui.verbose:
-            return
-
         if self.httpd.prefix:
             prefix = self.httpd.prefix.strip('/') + '/'
         else: