##// END OF EJS Templates
py3: replace str() with it's bytes equivalent in hgext/shelve.py...
Pulkit Goyal -
r36514:7af74438 default
parent child Browse files
Show More
@@ -192,7 +192,7 class shelvedstate(object):
192 d['nodestoremove'] = [nodemod.bin(h)
192 d['nodestoremove'] = [nodemod.bin(h)
193 for h in d['nodestoremove'].split(' ')]
193 for h in d['nodestoremove'].split(' ')]
194 except (ValueError, TypeError, KeyError) as err:
194 except (ValueError, TypeError, KeyError) as err:
195 raise error.CorruptedState(str(err))
195 raise error.CorruptedState(pycompat.bytestr(err))
196
196
197 @classmethod
197 @classmethod
198 def _getversion(cls, repo):
198 def _getversion(cls, repo):
@@ -201,7 +201,7 class shelvedstate(object):
201 try:
201 try:
202 version = int(fp.readline().strip())
202 version = int(fp.readline().strip())
203 except ValueError as err:
203 except ValueError as err:
204 raise error.CorruptedState(str(err))
204 raise error.CorruptedState(pycompat.bytestr(err))
205 finally:
205 finally:
206 fp.close()
206 fp.close()
207 return version
207 return version
@@ -251,7 +251,7 class shelvedstate(object):
251 if d.get('activebook', '') != cls._noactivebook:
251 if d.get('activebook', '') != cls._noactivebook:
252 obj.activebookmark = d.get('activebook', '')
252 obj.activebookmark = d.get('activebook', '')
253 except (error.RepoLookupError, KeyError) as err:
253 except (error.RepoLookupError, KeyError) as err:
254 raise error.CorruptedState(str(err))
254 raise error.CorruptedState(pycompat.bytestr(err))
255
255
256 return obj
256 return obj
257
257
@@ -745,7 +745,7 def _rebaserestoredcommit(ui, repo, opts
745 try:
745 try:
746 rebase.rebase(ui, repo, **{
746 rebase.rebase(ui, repo, **{
747 r'rev': [shelvectx.rev()],
747 r'rev': [shelvectx.rev()],
748 r'dest': str(tmpwctx.rev()),
748 r'dest': "%d" % tmpwctx.rev(),
749 r'keep': True,
749 r'keep': True,
750 r'tool': opts.get('tool', ''),
750 r'tool': opts.get('tool', ''),
751 })
751 })
@@ -881,7 +881,7 def _dounshelve(ui, repo, *shelved, **op
881 raise
881 raise
882 cmdutil.wrongtooltocontinue(repo, _('unshelve'))
882 cmdutil.wrongtooltocontinue(repo, _('unshelve'))
883 except error.CorruptedState as err:
883 except error.CorruptedState as err:
884 ui.debug(str(err) + '\n')
884 ui.debug(pycompat.bytestr(err) + '\n')
885 if continuef:
885 if continuef:
886 msg = _('corrupted shelved state file')
886 msg = _('corrupted shelved state file')
887 hint = _('please run hg unshelve --abort to abort unshelve '
887 hint = _('please run hg unshelve --abort to abort unshelve '
General Comments 0
You need to be logged in to leave comments. Login now