/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/index.py

  • Committer: Robert Collins
  • Date: 2007-07-12 15:51:19 UTC
  • mto: (2592.5.3 pack-repository)
  • mto: This revision was merged to the branch mainline in revision 2624.
  • Revision ID: robertc@robertcollins.net-20070712155119-zmcbukds65jw3tou
Detect truncated indices.

Show diffs side-by-side

added added

removed removed

Lines of Context:
100
100
            node_ref_lists = int(options_line[len(_OPTION_NODE_REFS):-1])
101
101
        except ValueError:
102
102
            raise errors.BadIndexOptions(self)
 
103
        line_count = 0
 
104
        for line in stream.readlines():
 
105
            # validate the line
 
106
            line_count += 1
 
107
        if line_count < 1:
 
108
            # there must be one line - the empty trailer line.
 
109
            raise errors.BadIndexData(self)