Yes, I sent email to thg-dev@googlegroups.com
, titled Fix TypeError in "Compress History" dialog (issue 5719)
- although from my work mail, not the one linked to heptapod/github.
Should I have posted to Google Groups instead, or maybe used different mail?
Stamped, sent - let's see how it goes. Why not Pull Request tho?
In "Compress History" RMB dialog, after you succesfully compressed changes in commits and click "Commit" button, THG displays this bug report:
#!python
** Mercurial version (5.8). TortoiseHg version (5.8+3-582e49bf29ae)
** Command:
** CWD: /home/user
** Encoding: UTF-8
** Extensions loaded: clonebundles, extdiff, graphlog, histedit, largefiles, mq, purge, rebase, strip, tortoisehg.util.configitems
** Python version: 3.9.2 (default, Feb 20 2021, 18:40:11) [GCC 10.2.0]
** System: Linux hostname 5.4.105-1-MANJARO #1 SMP PREEMPT Thu Mar 11 18:27:58 UTC 2021 x86_64
** Qt-5.15.2 PyQt-5.15.4 QScintilla-2.12.1
Traceback (most recent call last):
File "/home/user/.local/lib/python3.9/site-packages/tortoisehg/hgqt/compress.py", line 124, in commit
revs = [c for c in self.repo.revs(b'%s::%s' % (base, tip)) if c != base]
TypeError: %b requires a bytes-like object, or an object that implements __bytes__, not 'int'
I tinkered with the code a bit, and found this:
tortoisehg/hgqt/repowidget.py
during def compressRevisionsPair(self)
the variables reva, revb = self._selectedIntRevisionsPair()
contain two integers like 19895, 19898
- numbers of revisions being compressedtortoisehg/hgqt/compress.py
these are stored into self.revs = revs
during class CompressDialog
constructiondef commit(self)
they are used in format-string b'%s::%s' % (base, tip)
, that apparently used to work with strings (likely revision hashes) in the past.It seems like simply replacing %s
with %d
is enough to fix the issue - clicking on "Commit" now creates a commit dialog with pre-filled commit message.