Commits

Steve Borho  committed f080232

update: wctx.modified() is prone to throw EnvironmentError (closes #1435)

  • Participants
  • Parent commits 13b24d4
  • Branches stable

Comments (0)

Files changed (1)

File tortoisehg/hgqt/update.py

                 return
             def isclean():
                 '''whether WD is changed'''
-                wc = self.repo[None]
-                if wc.modified() or wc.added() or wc.removed():
+                try:
+                    wc = self.repo[None]
+                    if wc.modified() or wc.added() or wc.removed():
+                        return False
+                    for s in wc.substate:
+                        if wc.sub(s).dirty():
+                            return False
+                except EnvironmentError:
                     return False
-                for s in wc.substate:
-                    if wc.sub(s).dirty():
-                        return False
                 return True
             def ismergedchange():
                 '''whether the local changes are merged (have 2 parents)'''