Patchwork [5,of,6] commandserver: replace SocketServer with mercurial.socketserver

login
register
mail settings
Submitter Jun Wu
Date May 9, 2016, 12:06 a.m.
Message ID <1700e9299ac9d56bc3f5.1462752384@x1c>
Download mbox | patch
Permalink /patch/14982/
State Changes Requested
Headers show

Comments

Jun Wu - May 9, 2016, 12:06 a.m.
# HG changeset patch
# User Jun Wu <quark@fb.com>
# Date 1462477443 -3600
#      Thu May 05 20:44:03 2016 +0100
# Node ID 1700e9299ac9d56bc3f540ccd2497d8b360f0ce4
# Parent  7a84412fa25901e35b2d791b704aa3d2e3dd434f
commandserver: replace SocketServer with mercurial.socketserver

Since we have our own socketserver module, use it for commandserver.py.
Augie Fackler - May 11, 2016, 2:02 a.m.
On Mon, May 09, 2016 at 01:06:24AM +0100, Jun Wu wrote:
> # HG changeset patch
> # User Jun Wu <quark@fb.com>
> # Date 1462477443 -3600
> #      Thu May 05 20:44:03 2016 +0100
> # Node ID 1700e9299ac9d56bc3f540ccd2497d8b360f0ce4
> # Parent  7a84412fa25901e35b2d791b704aa3d2e3dd434f
> commandserver: replace SocketServer with mercurial.socketserver
>
> Since we have our own socketserver module, use it for commandserver.py.
>
> diff --git a/mercurial/commandserver.py b/mercurial/commandserver.py
> --- a/mercurial/commandserver.py
> +++ b/mercurial/commandserver.py
> @@ -7,7 +7,6 @@
>
>  from __future__ import absolute_import
>
> -import SocketServer
>  import errno
>  import os
>  import struct
> @@ -18,6 +17,7 @@
>  from . import (
>      encoding,
>      error,
> +    socketserver as SocketServer,

Rather than alias this, I'd just go ahead and drop the CamelCase on
the module name (since you're here.)

>      util,
>  )
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff --git a/mercurial/commandserver.py b/mercurial/commandserver.py
--- a/mercurial/commandserver.py
+++ b/mercurial/commandserver.py
@@ -7,7 +7,6 @@ 
 
 from __future__ import absolute_import
 
-import SocketServer
 import errno
 import os
 import struct
@@ -18,6 +17,7 @@ 
 from . import (
     encoding,
     error,
+    socketserver as SocketServer,
     util,
 )