From patchwork Tue Aug 1 20:34:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [02, of, 10, py3] hg: avoid sending unicode url into config infrastructure From: Augie Fackler X-Patchwork-Id: 22610 Message-Id: <8b22554199879f80a13d.1501619670@augie-macbookpro2.roam.corp.google.com> To: mercurial-devel@mercurial-scm.org Date: Tue, 01 Aug 2017 16:34:30 -0400 # HG changeset patch # User Augie Fackler # Date 1500906158 14400 # Mon Jul 24 10:22:38 2017 -0400 # Node ID 8b22554199879f80a13ddee556bc540ddcb65a94 # Parent 87ee5c3b3271ded54fe4462aa43a9d1520b8a10b hg: avoid sending unicode url into config infrastructure This was causing some unfortunate breakage on Python 3. diff --git a/mercurial/hg.py b/mercurial/hg.py --- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -31,6 +31,7 @@ from . import ( merge as mergemod, node, phases, + pycompat, repoview, scmutil, sshpeer, @@ -648,7 +649,8 @@ def clone(ui, peeropts, source, dest=Non fp.write(template % defaulturl) fp.close() - destrepo.ui.setconfig('paths', 'default', defaulturl, 'clone') + destrepo.ui.setconfig( + 'paths', 'default', pycompat.bytesurl(defaulturl), 'clone') if update: if update is not True: