D5737: py3: convert info.name to bytes in subrepo.py

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Tue Jan 29 22:27:27 UTC 2019


pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5737

AFFECTED FILES
  mercurial/subrepo.py

CHANGE DETAILS

diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py
--- a/mercurial/subrepo.py
+++ b/mercurial/subrepo.py
@@ -1658,15 +1658,16 @@
                                         unit=_('files'))
         progress.update(0)
         for info in tar:
+            infoname = pycompat.bytestr(info.name)
             if info.isdir():
                 continue
-            if match and not match(info.name):
+            if match and not match(infoname):
                 continue
             if info.issym():
                 data = info.linkname
             else:
                 data = tar.extractfile(info).read()
-            archiver.addfile(prefix + self._path + '/' + info.name,
+            archiver.addfile(prefix + self._path + '/' + infoname,
                              info.mode, info.issym(), data)
             total += 1
             progress.increment()



To: pulkit, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list