diff hgext/acl.py @ 28883:032c4c2f802a

pycompat: switch to util.urlreq/util.urlerr for py3 compat
author timeless <timeless@mozdev.org>
date Wed, 06 Apr 2016 23:22:12 +0000
parents a1163ee26e4a
children d5883fd055c6
line wrap: on
line diff
--- a/hgext/acl.py	Thu Apr 07 00:05:48 2016 +0000
+++ b/hgext/acl.py	Wed Apr 06 23:22:12 2016 +0000
@@ -194,7 +194,6 @@
 from __future__ import absolute_import
 
 import getpass
-import urllib
 
 from mercurial.i18n import _
 from mercurial import (
@@ -203,6 +202,8 @@
     util,
 )
 
+urlreq = util.urlreq
+
 # Note for extension authors: ONLY specify testedwith = 'internal' for
 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
 # be specifying the version(s) of Mercurial they are tested with, or
@@ -287,7 +288,7 @@
     if source == 'serve' and 'url' in kwargs:
         url = kwargs['url'].split(':')
         if url[0] == 'remote' and url[1].startswith('http'):
-            user = urllib.unquote(url[3])
+            user = urlreq.unquote(url[3])
 
     if user is None:
         user = getpass.getuser()