Mercurial > public > mercurial-scm > hg-stable
diff mercurial/dirstate.py @ 8716:f3322bb29a0e
dirstate: don't complain about 0-length files
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 04 Jun 2009 16:21:09 -0500 |
parents | a645904c88c4 |
children | 3507f6c7715c |
line wrap: on
line diff
--- 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