~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/knit.py

  • Committer: John Arbash Meinel
  • Date: 2006-12-07 23:18:34 UTC
  • mto: This revision was merged to the branch mainline in revision 2174.
  • Revision ID: john@arbash-meinel.com-20061207231834-zm3x2s92dvwy4ny3
Knit index files should ignore empty indexes rather than consider them corrupt.

Show diffs side-by-side

added added

removed removed

Lines of Context:
980
980
 
981
981
    def check_header(self, fp):
982
982
        line = fp.readline()
 
983
        if line == '':
 
984
            # An empty file can actually be treated as though the file doesn't
 
985
            # exist yet.
 
986
            raise errors.NoSuchFile(self._transport.base + self._filename)
983
987
        if line != self.HEADER:
984
 
            raise KnitHeaderError(badline=line)
 
988
            raise KnitHeaderError(badline=line,
 
989
                              filename=self._transport.abspath(self._filename))
985
990
 
986
991
    def commit(self):
987
992
        """Commit is a nop."""