/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

Remove 'as git' imports.

Show diffs side-by-side

added added

removed removed

Lines of Context:
119
119
        """Open this directory.
120
120
 
121
121
        """
122
 
        import dulwich as git
 
122
        import dulwich
123
123
        # we dont grok readonly - git isn't integrated with transport.
124
124
        url = transport.base
125
125
        if url.startswith('readonly+'):
126
126
            url = url[len('readonly+'):]
127
127
 
128
128
        try:
129
 
            gitrepo = git.repo.Repo(transport.local_abspath(".").encode(osutils._fs_enc))
 
129
            gitrepo = dulwich.repo.Repo(transport.local_abspath(".").encode(osutils._fs_enc))
130
130
        except bzr_errors.NotLocalUrl:
131
131
            raise bzr_errors.NotBranchError(path=transport.base)
132
132
        from bzrlib.plugins.git.dir import LocalGitDir, GitLockableFiles, GitLock
146
146
        if not transport.has(".git") and not transport.has("objects"):
147
147
            raise bzr_errors.NotBranchError(path=transport.base)
148
148
 
149
 
        import dulwich as git
 
149
        import dulwich
150
150
        format = klass()
151
151
        try:
152
152
            format.open(transport)
153
153
            return format
154
 
        except git.errors.NotGitRepository, e:
 
154
        except dulwich.errors.NotGitRepository, e:
155
155
            raise bzr_errors.NotBranchError(path=transport.base)
156
156
        raise bzr_errors.NotBranchError(path=transport.base)
157
157