~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-10-01 07:56:03 UTC
  • mfrom: (3224.5.40 faster-startup)
  • Revision ID: pqm@pqm.ubuntu.com-20081001075603-s9nynw8y85fmrprj
Reduce startup time by a small amount. (Andrew Bennetts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
 
from cStringIO import StringIO
18
 
 
19
17
from bzrlib.lazy_import import lazy_import
20
18
lazy_import(globals(), """
 
19
import cStringIO
21
20
import re
22
21
import time
23
22
 
34
33
    lockdir,
35
34
    lru_cache,
36
35
    osutils,
37
 
    registry,
38
36
    remote,
39
37
    revision as _mod_revision,
40
38
    symbol_versioning,
41
 
    transactions,
42
39
    tsort,
43
40
    ui,
44
41
    )
45
42
from bzrlib.bundle import serializer
46
43
from bzrlib.revisiontree import RevisionTree
47
44
from bzrlib.store.versioned import VersionedFileStore
48
 
from bzrlib.store.text import TextStore
49
45
from bzrlib.testament import Testament
50
 
from bzrlib.util import bencode
51
46
""")
52
47
 
 
48
from bzrlib import registry
53
49
from bzrlib.decorators import needs_read_lock, needs_write_lock
54
50
from bzrlib.inter import InterObject
55
51
from bzrlib.inventory import Inventory, InventoryDirectory, ROOT_ID
57
53
        deprecated_method,
58
54
        one_one,
59
55
        one_two,
60
 
        one_three,
61
56
        one_six,
62
57
        )
63
 
from bzrlib.trace import mutter, mutter_callsite, note, warning
 
58
from bzrlib.trace import mutter, mutter_callsite, warning
64
59
 
65
60
 
66
61
# Old formats display a warning, but only once
1158
1153
        #       would have already do it.
1159
1154
        # TODO: jam 20070210 Just use _serializer.write_revision_to_string()
1160
1155
        rev = self.get_revision(revision_id)
1161
 
        rev_tmp = StringIO()
 
1156
        rev_tmp = cStringIO.StringIO()
1162
1157
        # the current serializer..
1163
1158
        self._serializer.write_revision(rev, rev_tmp)
1164
1159
        rev_tmp.seek(0)