mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
dirstate: don't complain about 0-length files
This commit is contained in:
parent
5ae9b1fb50
commit
7c6f521b8f
@ -73,9 +73,10 @@ class dirstate(object):
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user