/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

Implement to_files() for git merge directives.

Show diffs side-by-side

added added

removed removed

Lines of Context:
109
109
 
110
110
    _lock_class = TransportLock
111
111
 
112
 
    colocated_branches = True
113
 
 
114
112
    def is_supported(self):
115
113
        return True
116
114
 
145
143
    @classmethod
146
144
    def probe_transport(klass, transport):
147
145
        try:
148
 
            if not (transport.has('info/refs') or 
149
 
                    transport.has('.git/branches') or 
 
146
            if not (transport.has('info/refs') or transport.has('.git/branches') or 
150
147
                    transport.has('branches')):
151
148
                raise bzr_errors.NotBranchError(path=transport.base)
152
149
        except bzr_errors.NoSuchFile:
179
176
                "non-local transports")
180
177
        lazy_check_versions()
181
178
        from dulwich.repo import Repo
182
 
        Repo.init(transport.local_abspath(".").encode(osutils._fs_enc))
 
179
        Repo.create(transport.local_abspath(".").encode(osutils._fs_enc))
183
180
        return self.open(transport)
184
181
 
185
182
    def is_supported(self):
254
251
plugin_cmds.register_lazy("cmd_git_import", [], "bzrlib.plugins.git.commands")
255
252
plugin_cmds.register_lazy("cmd_git_object", ["git-objects", "git-cat"],
256
253
    "bzrlib.plugins.git.commands")
257
 
plugin_cmds.register_lazy("cmd_git_refs", [], "bzrlib.plugins.git.commands")
258
 
plugin_cmds.register_lazy("cmd_git_apply", [], "bzrlib.plugins.git.commands")
259
254
 
260
255
def update_stanza(rev, stanza):
261
256
    mapping = getattr(rev, "mapping", None)
292
287
send_format_registry.register_lazy('git', 'bzrlib.plugins.git.send',
293
288
                                   'send_git', 'Git am-style diff format')
294
289
 
295
 
try:
296
 
    from bzrlib.diff import format_registry as diff_format_registry
297
 
except ImportError:
298
 
    pass
299
 
else:
300
 
    diff_format_registry.register_lazy('git', 'bzrlib.plugins.git.send',
301
 
        'GitDiffTree', 'Git am-style diff format')
302
 
 
303
290
def test_suite():
304
291
    from bzrlib.plugins.git import tests
305
292
    return tests.test_suite()