Patchwork [1,of,5,RFC,py3,support] commands: import hgweb.server in a way that 2to3 can rewrite

login
register
mail settings
Submitter Augie Fackler
Date Sept. 19, 2013, 8:08 p.m.
Message ID <bc6ff6482c1da65bf928.1379621290@arthedain.pit.corp.google.com>
Download mbox | patch
Permalink /patch/2547/
State Accepted
Commit ff00839e8bb3211b8a7a2a462cdb408fa3428bec
Headers show

Comments

Augie Fackler - Sept. 19, 2013, 8:08 p.m.
# HG changeset patch
# User Augie Fackler <raf@durin42.com>
# Date 1379618906 14400
#      Thu Sep 19 15:28:26 2013 -0400
# Node ID bc6ff6482c1da65bf9286c82a0b3ebcafc80f09b
# Parent  d4ed26beae0e41c86c413c69c1e6f13c32eb3d33
commands: import hgweb.server in a way that 2to3 can rewrite
Matt Mackall - Sept. 19, 2013, 8:37 p.m.
On Thu, 2013-09-19 at 16:08 -0400, Augie Fackler wrote:
> # HG changeset patch
> # User Augie Fackler <raf@durin42.com>
> # Date 1379618906 14400
> #      Thu Sep 19 15:28:26 2013 -0400
> # Node ID bc6ff6482c1da65bf9286c82a0b3ebcafc80f09b
> # Parent  d4ed26beae0e41c86c413c69c1e6f13c32eb3d33
> commands: import hgweb.server in a way that 2to3 can rewrite

I've taken the first three of these. Can we get a check-code rule for
this one?

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -12,7 +12,8 @@ 
 import hg, scmutil, util, revlog, copies, error, bookmarks
 import patch, help, encoding, templatekw, discovery
 import archival, changegroup, cmdutil, hbisect
-import sshserver, hgweb, hgweb.server, commandserver
+import sshserver, hgweb, commandserver
+from hgweb import server as hgweb_server
 import merge as mergemod
 import minirst, revset, fileset
 import dagparser, context, simplemerge, graphmod
@@ -5183,7 +5184,7 @@ 
     class service(object):
         def init(self):
             util.setsignalhandler()
-            self.httpd = hgweb.server.create_server(ui, app)
+            self.httpd = hgweb_server.create_server(ui, app)
 
             if opts['port'] and not ui.verbose:
                 return