~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/weave.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-01-15 04:49:48 UTC
  • mfrom: (3984.5.22 switch-r-183559)
  • Revision ID: pqm@pqm.ubuntu.com-20100115044948-yxz5m3vchxapbq22
(andrew) Add --revision option to 'bzr switch'. (#184559)

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
# Author: Martin Pool <mbp@canonical.com>
18
18
 
 
19
 
19
20
"""Weave - storage of related text file versions"""
20
21
 
21
 
from __future__ import absolute_import
22
22
 
23
23
# XXX: If we do weaves this way, will a merge still behave the same
24
24
# way if it's done in a different order?  That's a pretty desirable
69
69
from copy import copy
70
70
from cStringIO import StringIO
71
71
import os
 
72
import time
 
73
import warnings
72
74
 
73
75
from bzrlib.lazy_import import lazy_import
74
76
lazy_import(globals(), """
77
79
from bzrlib import (
78
80
    errors,
79
81
    osutils,
 
82
    progress,
80
83
    )
81
84
from bzrlib.errors import (WeaveError, WeaveFormatError, WeaveParentMismatch,
82
85
        RevisionAlreadyPresent,
83
86
        RevisionNotPresent,
84
87
        UnavailableRepresentation,
 
88
        WeaveRevisionAlreadyPresent,
 
89
        WeaveRevisionNotPresent,
85
90
        )
86
91
from bzrlib.osutils import dirname, sha, sha_strings, split_lines
87
92
import bzrlib.patiencediff
920
925
        self._transport = transport
921
926
        self._filemode = filemode
922
927
        try:
923
 
            f = self._transport.get(name + WeaveFile.WEAVE_SUFFIX)
924
 
            _read_weave_v5(StringIO(f.read()), self)
 
928
            _read_weave_v5(self._transport.get(name + WeaveFile.WEAVE_SUFFIX), self)
925
929
        except errors.NoSuchFile:
926
930
            if not create:
927
931
                raise