Error when selecting a merge revision in incoming() filter
Created originally on Bitbucket by datallah (Daniel Atallah)
When I select a merge revision from the incoming list and one of the merge parents is already present in my repo (so it doesn't appear in the filtered incoming list), the following traceback occurs.
{{{ #!python ** Please report this bug to http://bitbucket.org/tortoisehg/thg/issues ** Mercurial version (unknown). TortoiseHg version (1.9.3+117-a181cc240555) ** Command: ** CWD: c:\export\spare\thg\thg ** Extensions loaded: transplant, rebase, fetch, mq, histedit ** Python version: 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)] ** Windows version: (6, 1, 7600, 2, '') ** Processor architecture: x64 ** Qt-4.7.1 PyQt-4.8.3 Traceback (most recent call last): File "C:\export\spare\thg\thg\tortoisehg\hgqt\revdetails.py", line 208, in onFileRevSelected self.fileview.displayFile(file, rev, status) File "C:\export\spare\thg\thg\tortoisehg\hgqt\fileview.py", line 289, in displayFile ctx2 = self.repo[self._p_rev] File "C:\export\spare\thg\hg\mercurial\localrepo.py", line 206, in getitem return context.changectx(self, changeid) File "C:\export\spare\thg\hg\mercurial\context.py", line 25, in init self._node = self._repo.changelog.node(changeid) File "C:\export\spare\thg\hg\mercurial\revlog.py", line 312, in node return self.index[rev][7] IndexError: list index out of range
}}}
The obvious fix seems to be to wrap fileview.py:289 in a try/catch IndexError, but I feel like that might be masking the problem instead of fixing it (I don't fully understand the intent of the passed-in rev).