Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9.2, 1.9.3, and 2.0

repowidget: catch RevlogError when rebuilding the graph in response to a change

The presumption is that a lot of activity is happening in the repository by
another process and we are witnessing it second-hand. Any RevlogError found
here is probably temporary. Show the error and an empty graph model until the
next refresh.

Changeset d1cf7a5e80fb

Parent 0f3254758851

by Steve Borho

Changes to one file · Browse files at d1cf7a5e80fb Showing diff from parent 0f3254758851 Diff from another changeset...

 
9
10
11
12
 
13
14
15
 
615
616
617
618
 
 
 
 
 
 
619
620
621
 
9
10
11
 
12
13
14
15
 
615
616
617
 
618
619
620
621
622
623
624
625
626
@@ -9,7 +9,7 @@
 import binascii  import os   -from mercurial import util, revset +from mercurial import util, revset, error    from tortoisehg.util import shlib, hglib   @@ -615,7 +615,12 @@
  def repositoryChanged(self):   'Repository has detected a changelog / dirstate change'   if self.isVisible(): - self.rebuildGraph() + try: + self.rebuildGraph() + except (error.RevlogError, error.RepoError), e: + self.showMessage(hglib.tounicode(str(e))) + self.repomodel = HgRepoListModel(None, None, None, False, self) + self.repoview.setModel(self.repomodel)   else:   self.dirty = True