changeset 8716 | f3322bb29a0e |
parent 8708 | a645904c88c4 |
child 8732 | 3507f6c7715c |
--- a/mercurial/dirstate.py Thu Jun 04 16:21:03 2009 -0500 +++ b/mercurial/dirstate.py Thu Jun 04 16:21:09 2009 -0500 @@ -73,9 +73,10 @@ def _pl(self): try: st = self._opener("dirstate").read(40) - if len(st) == 40: + l = len(st) + if l == 40: return st[:20], st[20:40] - if len(st) < 40: + elif l > 0 and l < 40: raise util.Abort(_('working directory state appears damaged!')) except IOError, err: if err.errno != errno.ENOENT: raise