Patchwork [V5] commands: 'listening at' line when port specified (issue3976)

login
register
mail settings
Submitter Chinmay Joshi
Date April 10, 2014, 4:33 p.m.
Message ID <802dd51a733fb2ff3a8b.1397147619@ubuntu>
Download mbox | patch
Permalink /patch/4278/
State Changes Requested
Headers show

Comments

Chinmay Joshi - April 10, 2014, 4:33 p.m.
# HG changeset patch
# User Chinmay Joshi <c@chinmayjoshi.com>
# Date 1397147577 -19800
#      Thu Apr 10 22:02:57 2014 +0530
# Node ID 802dd51a733fb2ff3a8b4d6a8a08ff14dcba896f
# Parent  596960a4ad0d342506cf2a601e9736c446a04699
commands: 'listening at' line when port specified (issue3976)

Now 'listening at ...' line is printed in hg serve when port is specified. Stays silent for daemon. Changed commnads.py. No test files changed. Test suite covers to check this output by using --verbose for daemon.
Augie Fackler - April 12, 2014, 3:47 p.m.
On Thu, Apr 10, 2014 at 10:03:39PM +0530, Chinmay Joshi wrote:
> # HG changeset patch
> # User Chinmay Joshi <c@chinmayjoshi.com>
> # Date 1397147577 -19800
> #      Thu Apr 10 22:02:57 2014 +0530
> # Node ID 802dd51a733fb2ff3a8b4d6a8a08ff14dcba896f
> # Parent  596960a4ad0d342506cf2a601e9736c446a04699
> commands: 'listening at' line when port specified (issue3976)
>
> Now 'listening at ...' line is printed in hg serve when port is specified. Stays silent for daemon. Changed commnads.py. No test files changed. Test suite covers to check this output by using --verbose for daemon.


I'd like to see a new test introduced that demonstrates the new
behavior for 'hg serve' with no arguments, but I like this change a
lot.


>
> diff --git a/mercurial/commands.py b/mercurial/commands.py
> --- a/mercurial/commands.py
> +++ b/mercurial/commands.py
> @@ -5250,7 +5250,7 @@
>          util.setsignalhandler()
>          self.httpd = hgweb_server.create_server(self.ui, self.app)
>
> -        if self.opts['port'] and not self.ui.verbose:
> +        if self.opts['port'] and self.opts["daemon"] and not self.ui.verbose:
>              return
>
>          if self.httpd.prefix:
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -5250,7 +5250,7 @@ 
         util.setsignalhandler()
         self.httpd = hgweb_server.create_server(self.ui, self.app)
 
-        if self.opts['port'] and not self.ui.verbose:
+        if self.opts['port'] and self.opts["daemon"] and not self.ui.verbose:
             return
 
         if self.httpd.prefix: