Commits

Steve Borho committed eeed481

status: catch util.Abort from repo.parents()

is_merge() is the place this is usually caught first in the commit tool.
Place a warning in the status bar telling the user to refresh.

Closes #1200

Comments (0)

Files changed (1)

tortoisehg/hgtk/status.py

             self.mqmode = True
 
     def is_merge(self):
-        return self.count_revs() < 2 and len(self.repo.parents()) == 2
+        try:
+            numparents = len(self.repo.parents())
+        except error.Abort, e:
+            self.stbar.set_text(str(e) + _(', please refresh'))
+            numparents = 1
+        return self.count_revs() < 2 and numparents == 2
 
 
     def get_accelgroup(self):