/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to __init__.py

Support 'initializing' repositories in control directories.

Show diffs side-by-side

added added

removed removed

Lines of Context:
221
221
                "non-local transports")
222
222
        lazy_check_versions()
223
223
        from dulwich.repo import Repo
224
 
        Repo.init(transport.local_abspath(".").encode(osutils._fs_enc),
225
 
            bare=self.bare)
 
224
        path = transport.local_abspath(".").encode(osutils._fs_enc)
 
225
        if self.bare:
 
226
            Repo.init_bare(path)
 
227
        else:
 
228
            Repo.init(path)
226
229
        return self.open(transport)
227
230
 
228
231
    def is_supported(self):
333
336
        stanza.add("git-commit", rev.foreign_revid)
334
337
 
335
338
 
336
 
rio_hooks = getattr(RioVersionInfoBuilder, "hooks", None)
337
 
if rio_hooks is not None:
338
 
    rio_hooks.install_named_hook('revision', update_stanza, None)
 
339
RioVersionInfoBuilder.hooks.install_named_hook('revision', update_stanza, None)
339
340
 
340
341
 
341
342
from bzrlib.transport import transport_server_registry
346
347
 
347
348
 
348
349
from bzrlib.repository import (
 
350
    format_registry as repository_format_registry,
349
351
    network_format_registry as repository_network_format_registry,
350
352
    )
351
353
repository_network_format_registry.register_lazy('git',
352
354
    'bzrlib.plugins.git.repository', 'GitRepositoryFormat')
353
355
 
354
356
try:
 
357
    register_extra_lazy_repository_format = getattr(repository_format_registry,
 
358
        "register_extra_lazy")
 
359
except AttributeError:
 
360
    pass
 
361
else:
 
362
    register_extra_lazy_repository_format('bzrlib.plugins.git.repository',
 
363
        'GitRepositoryFormat')
 
364
 
 
365
try:
355
366
    from bzrlib.controldir import (
356
367
        network_format_registry as controldir_network_format_registry,
357
368
        )