~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/weavefile.py

  • Committer: John Arbash Meinel
  • Date: 2006-02-15 15:18:44 UTC
  • mto: (1185.79.1 bzr-jam-pending)
  • mto: This revision was merged to the branch mainline in revision 1554.
  • Revision ID: john@arbash-meinel.com-20060215151844-ce3e3efccd19da3f
Reverting gpg changes, should not be mainline, see gpg_uses_tempfile plugin.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /usr/bin/python
2
 
 
3
1
# Copyright (C) 2005 Canonical Ltd
4
2
 
5
3
# This program is free software; you can redistribute it and/or modify
94
92
 
95
93
 
96
94
 
97
 
def read_weave(f):
98
 
    return read_weave_v5(f)
99
 
 
100
 
 
101
 
def read_weave_v5(f):
 
95
def read_weave(f,prelude=False):
 
96
    return read_weave_v5(f,prelude=prelude)
 
97
 
 
98
 
 
99
def read_weave_v5(f,prelude=False):
102
100
    from weave import Weave, WeaveFormatError
103
 
    w = Weave()
 
101
    w = Weave(getattr(f, 'name', None))
104
102
 
105
103
    l = f.readline()
106
104
    if l != FORMAT_1:
135
133
        else:
136
134
            raise WeaveFormatError('unexpected line %r' % l)
137
135
 
 
136
    if prelude:
 
137
        return w
 
138
 
138
139
    while True:
139
140
        l = f.readline()
140
141
        if l == 'W\n':