D7467: util: convert an exception to bytes when passing to Abort()
mharbison72 (Matt Harbison)
phabricator at mercurial-scm.org
Thu Nov 21 23:23:41 UTC 2019
mharbison72 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
I happened to notice this searching for how to convert an exception to bytes in
the previous patch. I'm pretty sure I've got a bunch of other instances that
use `pycompat.bytestr()` suppressed locally.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D7467
AFFECTED FILES
mercurial/util.py
CHANGE DETAILS
diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -1906,7 +1906,7 @@
) & 0x7FFFFFFF
os.utime(dest, (advanced, advanced))
except shutil.Error as inst:
- raise error.Abort(str(inst))
+ raise error.Abort(stringutil.forcebytestr(inst))
def copyfiles(src, dst, hardlink=None, progress=None):
To: mharbison72, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list