Commit 3552242a authored by Aay Jay Chan's avatar Aay Jay Chan

py3: byteify revision literals in RevDetailsWidget.reload() (fixes #5529)

The literals are passed to RevDetailsWidget.onRevisionSelected(), which expects
bytes.

This fixes a crash that happens when stripping an ancestor changeset.

--HG--
branch : stable
parent 7ebcbe811dac
......@@ -366,12 +366,12 @@ class RevDetailsWidget(QWidget, qtlib.TaskWidget):
rev = self.ctx.rev()
if isinstance(self.ctx.rev(), int):
if len(self.repo) <= self.ctx.rev():
rev = 'tip'
rev = b'tip'
elif rev is not None: # None in isrevsymbol() raises ProgrammingError
if scmutil.isrevsymbol(self.repo, rev):
rev = scmutil.revsymbol(self.repo, rev).rev()
elif rev not in self.repo.thgmqunappliedpatches:
rev = 'tip'
rev = b'tip'
try:
self.onRevisionSelected(rev)
except error.FilteredRepoLookupError:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment