/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 commands.py

Rename converter -> object_store, provide utility function for getting ObjectStore's.

Show diffs side-by-side

added added

removed removed

Lines of Context:
137
137
            pb.finished()
138
138
 
139
139
 
140
 
def repo_get_object_store(repo):
141
 
    from bzrlib.plugins.git.converter import (
142
 
        BazaarObjectStore,
143
 
        )
144
 
    from bzrlib.plugins.git.mapping import (
145
 
        default_mapping,
146
 
        )
147
 
    from bzrlib.plugins.git.repository import (
148
 
        GitRepository,
149
 
        )
150
 
    if isinstance(repo, GitRepository):
151
 
        return repo._git.object_store
152
 
    else:
153
 
        return BazaarObjectStore(repo, default_mapping)
154
 
 
155
 
 
156
140
class cmd_git_object(Command):
157
141
    """List or display Git objects by SHA.
158
142
    
180
164
            )
181
165
        bzrdir, _ = BzrDir.open_containing(directory)
182
166
        repo = bzrdir.find_repository()
183
 
        object_store = repo_get_object_store(repo)
 
167
        from bzrlib.plugins.git.object_store import (
 
168
            get_object_store,
 
169
            )
 
170
        object_store = get_object_store(repo)
184
171
        repo.lock_read()
185
172
        try:
186
173
            if sha1 is not None: