~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/weavefile.py

  • Committer: Olaf Conradi
  • Date: 2006-03-28 23:30:02 UTC
  • mto: (1661.1.1 bzr.mbp.remember)
  • mto: This revision was merged to the branch mainline in revision 1663.
  • Revision ID: olaf@conradi.org-20060328233002-f6262df0e19c1963
Added testcases for using pull with --remember. Moved remember code to
beginning of cmd_pull. This remembers the location in case of a failure
during pull.

Show diffs side-by-side

added added

removed removed

Lines of Context:
93
93
 
94
94
 
95
95
def read_weave(f):
96
 
    return read_weave_v5(f)
97
 
 
98
 
 
99
 
def read_weave_v5(f):
100
 
    from weave import Weave, WeaveFormatError
 
96
    # FIXME: detect the weave type and dispatch
 
97
    from bzrlib.trace import mutter
 
98
    from weave import Weave
101
99
    w = Weave(getattr(f, 'name', None))
 
100
    _read_weave_v5(f, w)
 
101
    return w
 
102
 
 
103
 
 
104
def _read_weave_v5(f, w):
 
105
    """Private helper routine to read a weave format 5 file into memory.
 
106
    
 
107
    This is only to be used by read_weave and WeaveFile.__init__.
 
108
    """
 
109
    from weave import WeaveFormatError
102
110
 
103
111
    l = f.readline()
104
112
    if l != FORMAT_1: