~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/plugins/weave_fmt/repository.py

  • Committer: Jelmer Vernooij
  • Date: 2011-02-08 16:06:21 UTC
  • mto: (5582.12.2 weave-plugin)
  • mto: This revision was merged to the branch mainline in revision 5718.
  • Revision ID: jelmer@samba.org-20110208160621-ncf1hsd30ksk7thz
Clean up patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
from bzrlib.lazy_import import lazy_import
29
29
lazy_import(globals(), """
30
30
from bzrlib import (
 
31
    xml5,
 
32
    graph as _mod_graph,
 
33
    ui,
 
34
    )
 
35
""")
 
36
from bzrlib import (
31
37
    debug,
32
 
    graph as _mod_graph,
 
38
    errors,
33
39
    lockable_files,
34
40
    lockdir,
35
41
    osutils,
36
42
    symbol_versioning,
37
43
    trace,
38
44
    tuned_gzip,
39
 
    ui,
40
45
    urlutils,
41
46
    versionedfile,
42
47
    weave,
43
 
    xml5,
44
 
    )
45
 
""")
46
 
from bzrlib import (
47
 
    errors,
48
 
    )
49
 
from bzrlib.decorators import (
50
 
    needs_read_lock,
51
 
    needs_write_lock,
52
 
    )
 
48
    weavefile,
 
49
    )
 
50
from bzrlib.decorators import needs_read_lock, needs_write_lock
53
51
from bzrlib.repository import (
54
52
    CommitBuilder,
55
53
    InterRepository,
66
64
    VersionedFiles,
67
65
    )
68
66
 
69
 
from bzrlib.plugins.weave_fmt.bzrdir import (
70
 
    BzrDirFormat4,
71
 
    BzrDirFormat5,
72
 
    BzrDirFormat6,
73
 
    )
 
67
from bzrlib.plugins.weave_fmt import bzrdir as weave_bzrdir
74
68
 
75
69
 
76
70
class AllInOneRepository(Repository):
296
290
 
297
291
        # Create an empty weave
298
292
        sio = StringIO()
299
 
        weave.write_weave_v5(weave.Weave(), sio)
 
293
        weavefile.write_weave_v5(weave.Weave(), sio)
300
294
        empty_weave = sio.getvalue()
301
295
 
302
296
        trace.mutter('creating repository in %s.', a_bzrdir.transport.base)
350
344
 
351
345
    supports_funky_characters = False
352
346
 
353
 
    _matchingbzrdir = BzrDirFormat4()
 
347
    _matchingbzrdir = weave_bzrdir.BzrDirFormat4()
354
348
 
355
349
    def get_format_description(self):
356
350
        """See RepositoryFormat.get_format_description()."""
398
392
    """
399
393
 
400
394
    _versionedfile_class = weave.WeaveFile
401
 
    _matchingbzrdir = BzrDirFormat5()
 
395
    _matchingbzrdir = weave_bzrdir.BzrDirFormat5()
402
396
    supports_funky_characters = False
403
397
 
404
398
    @property
445
439
    """
446
440
 
447
441
    _versionedfile_class = weave.WeaveFile
448
 
    _matchingbzrdir = BzrDirFormat6()
 
442
    _matchingbzrdir = weave_bzrdir.BzrDirFormat6()
449
443
    supports_funky_characters = False
450
 
 
451
444
    @property
452
445
    def _serializer(self):
453
446
        return xml5.serializer_v5
543
536
        """
544
537
        # Create an empty weave
545
538
        sio = StringIO()
546
 
        weave.write_weave_v5(weave.Weave(), sio)
 
539
        weavefile.write_weave_v5(weave.Weave(), sio)
547
540
        empty_weave = sio.getvalue()
548
541
 
549
542
        trace.mutter('creating repository in %s.', a_bzrdir.transport.base)