This is an archive of the discontinued Mercurial Phabricator instance.

py3: use pycompat.fsencode() to convert tempfile name to bytes
ClosedPublic

Authored by pulkit on May 19 2018, 10:41 AM.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

pulkit created this revision.May 19 2018, 10:41 AM
This revision was automatically updated to reflect the committed changes.
yuja added a subscriber: yuja.May 21 2018, 8:58 AM
bundle = None
try:  # guards bundle
  • bundlepath = "bundle:%s+%s" % (op.repo.root, bundlefile)

+ bundlepath = "bundle:%s+%s" % (op.repo.root,
+ pycompat.fsencode(bundlefile))

It's probably better to handle this by callers because a filename passed
to a Mercurial function should always be bytes.