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

Support user.signingkey configuration variable in .git/config.

Merged from https://code.launchpad.net/~jelmer/brz/local-git-key/+merge/381000

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
"""Git-specific subcommands for Bazaar."""
23
23
 
 
24
from __future__ import absolute_import
 
25
 
24
26
import breezy.bzr  # noqa: F401
25
27
from breezy import controldir
26
28
from ..commands import (
31
33
    Option,
32
34
    RegistryOption,
33
35
    )
 
36
from ..sixish import (
 
37
    text_type,
 
38
    viewitems,
 
39
    )
34
40
 
35
41
 
36
42
class cmd_git_import(Command):
135
141
        mapping = source_repo.get_mapping()
136
142
        result = interrepo.fetch()
137
143
        with ui.ui_factory.nested_progress_bar() as pb:
138
 
            for i, (name, sha) in enumerate(result.refs.items()):
 
144
            for i, (name, sha) in enumerate(viewitems(result.refs)):
139
145
                try:
140
146
                    branch_name = ref_to_branch_name(name)
141
147
                except ValueError:
180
186
    takes_args = ["sha1?"]
181
187
    takes_options = [Option('directory',
182
188
                            short_name='d',
183
 
                            help='Location of repository.', type=str),
 
189
                            help='Location of repository.', type=text_type),
184
190
                     Option('pretty', help='Pretty-print objects.')]
185
191
    encoding_type = 'exact'
186
192
 
241
247
        object_store = get_object_store(repo)
242
248
        with object_store.lock_read():
243
249
            refs = get_refs_container(controldir, object_store)
244
 
            for k, v in sorted(refs.as_dict().items()):
 
250
            for k, v in sorted(viewitems(refs.as_dict())):
245
251
                self.outf.write("%s -> %s\n" %
246
252
                                (k.decode('utf-8'), v.decode('utf-8')))
247
253
 
298
304
 
299
305
    takes_options = [Option('directory',
300
306
                            short_name='d',
301
 
                            help='Location of repository.', type=str)]
 
307
                            help='Location of repository.', type=text_type)]
302
308
    takes_args = ['target', 'package']
303
309
 
304
310
    def run(self, target, package, directory='.'):