Commits

Steve Borho  committed bc0ba03

hgignore: catch common errors from repo.status() (closes #1767)

  • Participants
  • Parent commits 33424a6
  • Branches hgtk

Comments (0)

Files changed (1)

File tortoisehg/hgtk/hgignore.py

     def refresh(self):
         hglib.invalidaterepo(self.repo)
         matcher = match.always(self.repo.root, self.repo.root)
-        unknown = self.repo.status(match=matcher, unknown=True)[4]
+        try:
+            unknown = self.repo.status(match=matcher, unknown=True)[4]
+        except (EnvironmentError, util.Abort), inst:
+            gdialog.Prompt(_('Error while reading status'),
+                           hglib.toutf(str(inst)), self).run()
+            return
         self.unkmodel.clear()
         for u in unknown:
             self.unkmodel.append([hglib.toutf(u), u])