~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: 2006-04-13 22:37:15 UTC
  • mfrom: (1658.1.10 bzr.mbp.integration)
  • Revision ID: pqm@pqm.ubuntu.com-20060413223715-b826d3cb591fed82
(mbp) fix #38331, #3619

Show diffs side-by-side

added added

removed removed

Lines of Context:
1330
1330
    def initialize(self, a_bzrdir, shared=False):
1331
1331
        """Create a knit format 1 repository.
1332
1332
 
 
1333
        :param a_bzrdir: bzrdir to contain the new repository; must already
 
1334
            be initialized.
1333
1335
        :param shared: If true the repository will be initialized as a shared
1334
1336
                       repository.
1335
 
        XXX NOTE that this current uses a Weave for testing and will become 
1336
 
            A Knit in due course.
1337
1337
        """
1338
 
        from bzrlib.weavefile import write_weave_v5
1339
 
        from bzrlib.weave import Weave
1340
 
 
1341
 
        # Create an empty weave
1342
 
        sio = StringIO()
1343
 
        bzrlib.weavefile.write_weave_v5(Weave(), sio)
1344
 
        empty_weave = sio.getvalue()
1345
 
 
1346
1338
        mutter('creating repository in %s.', a_bzrdir.transport.base)
1347
 
        dirs = ['revision-store', 'knits', 'control']
1348
 
        files = [('control/inventory.weave', StringIO(empty_weave)), 
1349
 
                 ]
 
1339
        dirs = ['revision-store', 'knits']
 
1340
        files = []
1350
1341
        utf8_files = [('format', self.get_format_string())]
1351
1342
        
1352
1343
        self._upload_blank_content(a_bzrdir, dirs, files, utf8_files, shared)