~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/weavefile.py

  • Committer: Alexander Belchenko
  • Date: 2006-07-31 16:12:57 UTC
  • mto: (1711.2.111 jam-integration)
  • mto: This revision was merged to the branch mainline in revision 1906.
  • Revision ID: bialix@ukr.net-20060731161257-91a231523255332c
new official bzr.ico

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
 
46
46
 
47
47
def write_weave(weave, f, format=None):
48
 
    if format is None or format == 1:
 
48
    if format == None or format == 1:
49
49
        return write_weave_v5(weave, f)
50
50
    else:
51
51
        raise ValueError("unknown weave format %r" % format)
124
124
 
125
125
    lines = iter(f.readlines())
126
126
    
127
 
    try:
128
 
        l = lines.next()
129
 
    except StopIteration:
130
 
        raise WeaveFormatError('invalid weave file: no header')
131
 
 
 
127
    l = lines.next()
132
128
    if l != FORMAT_1:
133
129
        raise WeaveFormatError('invalid weave file header: %r' % l)
134
130