1. TortoiseHg
  2. TortoiseHg
  3. thg
Issue #2428 resolved

Strip revisions with some specific phase "configuration" generates some trouble

André Sintzoff
created an issue

Create a test repository via command line:

hg init test
cd test
touch toto
hg add toto
hg commit -m"add toto"
touch tata
hg add tata
hg commit -m"add tata"
hg up 0
touch titi
hg add titi
hg commit -m"add titi"
hg phase -p tip

Launch TortoiseHg

Strip revision 1 (add tata)

Afterwards, no more revision displayed on the workbench even there are still two. Check with hg log for instance.

If I close the corresponding tab and try to reopen it, I get:

** Mercurial version (2.5.1+2-9a06aab5981b).  TortoiseHg version (2.7+27-86653e6d48b3)
** Command: 
** CWD: /Users/as/hg-repo/test
** Encoding: UTF-8
** Extensions loaded: mercurial_keyring, mq
** Python version: 2.6.6 (r266:84374, Aug 31 2010, 11:00:51) [GCC 4.0.1 (Apple Inc. build 5493)]
** System: Darwin amical.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun  7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386
** Qt-4.7.4 PyQt-4.8.6 QScintilla-2.6
Traceback (most recent call last):
  File "/Users/as/hg-repo/thg-build/thg/tortoisehg/hgqt/workbench.py", line 547, in openRepo
    self._openRepo(root, reuse)
  File "/Users/as/hg-repo/thg-build/thg/tortoisehg/hgqt/workbench.py", line 917, in _openRepo
    return self.addRepoTab(repo, bundle)
  File "/Users/as/hg-repo/thg-build/thg/tortoisehg/hgqt/workbench.py", line 759, in addRepoTab
    rw = RepoWidget(repo, self, bundle=bundle)
  File "/Users/as/hg-repo/thg-build/thg/tortoisehg/hgqt/repowidget.py", line 113, in __init__
    self.setupUi()
  File "/Users/as/hg-repo/thg-build/thg/tortoisehg/hgqt/repowidget.py", line 164, in setupUi
  File "/Users/as/hg-repo/thg-build/thg/tortoisehg/hgqt/repofilter.py", line 113, in __init__
    self.refresh()
  File "/Users/as/hg-repo/thg-build/thg/tortoisehg/hgqt/repofilter.py", line 310, in refresh
    self._updatebranchfilter()
  File "/Users/as/hg-repo/thg-build/thg/tortoisehg/hgqt/repofilter.py", line 263, in _updatebranchfilter
    branches = self._repo.namedbranches
  File "/Users/as/hg-repo/thg-build/hg/mercurial/util.py", line 271, in __get__
    result = self.func(obj)
  File "/Users/as/hg-repo/thg-build/thg/tortoisehg/hgqt/thgrepo.py", line 451, in namedbranches
    allbranches = self.branchtags()
  File "/Users/as/hg-repo/thg-build/hg/mercurial/localrepo.py", line 657, in branchtags
    for bn, heads in self.branchmap().iteritems():
  File "/Users/as/hg-repo/thg-build/hg/mercurial/localrepo.py", line 634, in branchmap
    branchmap.updatecache(self)
  File "/Users/as/hg-repo/thg-build/hg/mercurial/branchmap.py", line 75, in updatecache
    partial = subset.branchmap().copy()
  File "/Users/as/hg-repo/thg-build/hg/mercurial/localrepo.py", line 634, in branchmap
    branchmap.updatecache(self)
  File "/Users/as/hg-repo/thg-build/hg/mercurial/branchmap.py", line 75, in updatecache
    partial = subset.branchmap().copy()
  File "/Users/as/hg-repo/thg-build/hg/mercurial/localrepo.py", line 634, in branchmap
    branchmap.updatecache(self)
  File "/Users/as/hg-repo/thg-build/hg/mercurial/branchmap.py", line 75, in updatecache
    partial = subset.branchmap().copy()
  File "/Users/as/hg-repo/thg-build/hg/mercurial/localrepo.py", line 634, in branchmap
    branchmap.updatecache(self)
  File "/Users/as/hg-repo/thg-build/hg/mercurial/branchmap.py", line 62, in updatecache
    cl = repo.changelog
  File "/Users/as/hg-repo/thg-build/hg/mercurial/repoview.py", line 170, in changelog
    revs = filterrevs(unfi, self.filtername)
  File "/Users/as/hg-repo/thg-build/hg/mercurial/repoview.py", line 117, in filterrevs
    repo.filteredrevcache[filtername] = func(repo.unfiltered())
  File "/Users/as/hg-repo/thg-build/hg/mercurial/repoview.py", line 68, in computemutable
    maymutable = filterrevs(repo, 'base')
  File "/Users/as/hg-repo/thg-build/hg/mercurial/repoview.py", line 117, in filterrevs
    repo.filteredrevcache[filtername] = func(repo.unfiltered())
  File "/Users/as/hg-repo/thg-build/hg/mercurial/repoview.py", line 92, in computeimpactable
    firstmutable = min(firstmutable, min(cl.rev(r) for r in roots))
  File "/Users/as/hg-repo/thg-build/hg/mercurial/repoview.py", line 92, in <genexpr>
    firstmutable = min(firstmutable, min(cl.rev(r) for r in roots))
  File "/Users/as/hg-repo/thg-build/hg/mercurial/changelog.py", line 184, in rev
    r = super(changelog, self).rev(node)
  File "/Users/as/hg-repo/thg-build/hg/mercurial/revlog.py", line 315, in rev
    raise LookupError(node, self.indexfile, _('no node'))
LookupError: 00changelog.i@7268c68742c9: no node

If you omit the last operation in the repository creation (no phase modification), no trouble at all.

Comments (5)

  1. Log in to comment