D2458: py3: use bytes instead of str in isinstance
pulkit (Pulkit Goyal)
phabricator at mercurial-scm.org
Mon Feb 26 12:32:39 UTC 2018
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
Internally we use bytes everywhere, and str on Python 3 is unicodes, so we need
to make sure we are doing the right check.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D2458
AFFECTED FILES
mercurial/archival.py
CHANGE DETAILS
diff --git a/mercurial/archival.py b/mercurial/archival.py
--- a/mercurial/archival.py
+++ b/mercurial/archival.py
@@ -38,7 +38,7 @@
if prefix:
prefix = util.normpath(prefix)
else:
- if not isinstance(dest, str):
+ if not isinstance(dest, bytes):
raise ValueError('dest must be string if no prefix')
prefix = os.path.basename(dest)
lower = prefix.lower()
To: pulkit, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list