# HG changeset patch # User Yuya Nishihara # Date 2018-03-03 20:33:52 # Node ID 214f61abd8655df7a66ac398e2e6f23cfb175402 # Parent 5c4c9eb1feb654a75c984d9b232a96b9dda95c8a py3: back out c77c925987d7 to store bytes filename in IOError Appears that this is how Python 3 works. diff --git a/mercurial/lock.py b/mercurial/lock.py --- a/mercurial/lock.py +++ b/mercurial/lock.py @@ -200,10 +200,9 @@ class lock(object): return locker = self._testlock(locker) if locker is not None: - raise error.LockHeld( - errno.EAGAIN, - encoding.strfromlocal(self.vfs.join(self.f)), - self.desc, locker) + raise error.LockHeld(errno.EAGAIN, + self.vfs.join(self.f), self.desc, + locker) else: raise error.LockUnavailable(why.errno, why.strerror, why.filename, self.desc) @@ -212,8 +211,7 @@ class lock(object): # use empty locker to mean "busy for frequent lock/unlock # by many processes" raise error.LockHeld(errno.EAGAIN, - encoding.strfromlocal(self.vfs.join(self.f)), - self.desc, "") + self.vfs.join(self.f), self.desc, "") def _readlock(self): """read lock and return its value diff --git a/mercurial/statichttprepo.py b/mercurial/statichttprepo.py --- a/mercurial/statichttprepo.py +++ b/mercurial/statichttprepo.py @@ -206,7 +206,7 @@ class statichttprepository(localrepo.loc return statichttppeer(self) def wlock(self, wait=True): - raise error.LockUnavailable(0, _('lock not available'), r'lock', + raise error.LockUnavailable(0, _('lock not available'), 'lock', _('cannot lock static-http repository')) def lock(self, wait=True):