Unknown revision error when stripping from outgoing list
Created originally on Bitbucket by Anonymous
This is with a hggit repo, I've not tested it with an HG-only repo, but seems likely it would be an issue there as well.
Repo steps
- In tortoise hg
- Have local changesets, press the outgoing button, history section changes to yellow background
- Select a changeset that you want removed, right click and go Modify History > Strip
- That should succeed in stripping the changesets
- Outgoing list tries to refresh, but an error pops up with "unknown revision", and stays as a empty yellow background list until you hit cancel
In my case this functioning without error would be great because i'm using tortoise to interact with a git repo that has a large turn-over of remote branches. Pressing the outgoing button lists all the remote branches which I've pulled but are no longer existing remotely. So I was trying to use that as a method to prune those branches.
But anytime I'd strip from the outgoing changeset history list, I'd then get an error "unknown revision '73627'" because that is the revision I just stripped from the HG history.
#!python
** Mercurial version (4.3.1). TortoiseHg version (4.3.1)
** Command:
** CWD: C:\windows\system32
** Encoding: cp1252
** Extensions loaded: rebase, purge, strip, mq, histedit, convert, hggit
** Python version: 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit (AMD64)]
** Windows version: sys.getwindowsversion(major=6, minor=2, build=9200, platform=2, service_pack='')
** Processor architecture: x64
** Qt-4.8.7 PyQt-4.11.4 QScintilla-2.9
Traceback (most recent call last):
File "tortoisehg\hgqt\repomodel.pyo", line 304, in _onQueryFinished
File "tortoisehg\hgqt\repomodel.pyo", line 245, in _rebuildGraph
File "tortoisehg\hgqt\repomodel.pyo", line 361, in _ensureBuilt
File "tortoisehg\hgqt\graph.pyo", line 950, in build_nodes
File "tortoisehg\hgqt\graph.pyo", line 591, in _iter_graphnodes
File "tortoisehg\hgqt\graph.pyo", line 510, in walk
File "tortoisehg\hgqt\graph.pyo", line 325, in _iter_revs
File "tortoisehg\hgqt\thgrepo.pyo", line 755, in __getitem__
File "mercurial\localrepo.pyo", line 716, in __getitem__
File "mercurial\context.pyo", line 509, in __init__
RepoLookupError: unknown revision '73627'