Crash when stripping last changeset of branch included in filter
Created originally on Bitbucket by clechasseur (Charles Lechasseur)
Steps to reproduce:
-
In TortoiseHg Workbench, select File -> New Repository. Create empty repo anywhere (I unchecked "Add special files")
-
Run the following commands in the Console:
hg branch base
hg commit -m base
hg branch foo
hg commit -m foo
- Open the Filter toolbar and enter the following filter:
branch(base) or branch(foo)
- Right-click on the last changeset and select Modify History -> Strip. Confirm by pressing the Strip button. (Also works by executing "hg strip tip" in Console)
BAM. Bug report is attached below. Pressing OK simply shows the bug report again until you choose Quit.
This doesn't happen if the branch that goes away is not int he filter. For example, crash won't happen if filter is
branch(base) or tip
#!python
** Mercurial version (3.3.3). TortoiseHg version (3.3.3)
** Command: --nofork workbench
** CWD: C:\Users\clechasseur\Desktop
** Encoding: cp1252
** Extensions loaded: acl, churn, eol, relink, mercurial_keyring, checkfiles, extdiff, children, fetch, strip, mq, onsub, purge, rebase, share, transplant, convert
** Python version: 2.7.9 (default, Dec 10 2014, 12:28:03) [MSC v.1500 64 bit (AMD64)]
** Windows version: sys.getwindowsversion(major=6, minor=1, build=7601, platform=2, service_pack='Service Pack 1')
** Processor architecture: x64
** Qt-4.8.6 PyQt-4.11.3 QScintilla-2.8.4
Traceback (most recent call last):
File "tortoisehg\hgqt\repomodel.pyo", line 316, in _onQueryFinished
File "tortoisehg\hgqt\repomodel.pyo", line 261, in _rebuildGraph
File "tortoisehg\hgqt\repomodel.pyo", line 373, in _ensureBuilt
File "tortoisehg\hgqt\graph.pyo", line 874, in build_nodes
File "tortoisehg\hgqt\graph.pyo", line 612, in _iter_graphnodes
File "tortoisehg\hgqt\graph.pyo", line 764, in fromchangectx
File "mercurial\context.pyo", line 524, in phase
File "mercurial\phases.pyo", line 216, in phase
IndexError: list index out of range
Traceback (most recent call last):
File "tortoisehg\hgqt\repomodel.pyo", line 467, in data
File "tortoisehg\hgqt\graph.pyo", line 839, in __getitem__
IndexError: list index out of range
...
Traceback (most recent call last):
File "tortoisehg\hgqt\repomodel.pyo", line 467, in data
File "tortoisehg\hgqt\graph.pyo", line 839, in __getitem__
IndexError: list index out of range