/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

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2020-02-03 23:21:15 UTC
  • mfrom: (7290.42.6 paramiko-compat)
  • Revision ID: breezy.the.bot@gmail.com-20200203232115-g7k11bhsfeiqcprv
Fix compatibility with newer versions of paramiko, which break on noise before keys in pem files.

Merged from https://code.launchpad.net/~jelmer/brz/paramiko-compat/+merge/378480

Show diffs side-by-side

added added

removed removed

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