/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/dir.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:
17
17
 
18
18
"""An adapter between a Git control dir and a Bazaar ControlDir."""
19
19
 
20
 
import contextlib
 
20
from __future__ import absolute_import
21
21
 
22
22
from .. import (
23
23
    branch as _mod_branch,
 
24
    cleanup,
24
25
    errors as brz_errors,
25
26
    trace,
26
27
    osutils,
27
28
    urlutils,
28
29
    )
 
30
from ..sixish import (
 
31
    PY3,
 
32
    viewitems,
 
33
    )
29
34
from ..transport import (
30
35
    do_catching_redirections,
31
36
    get_transport_from_path,
187
192
        else:
188
193
            wt = None
189
194
        if recurse == 'down':
190
 
            with contextlib.ExitStack() as stack:
 
195
            with cleanup.ExitStack() as stack:
191
196
                basis = None
192
197
                if wt is not None:
193
198
                    basis = wt.basis_tree()
246
251
            determine_wants = interrepo.determine_wants_all
247
252
        (pack_hint, _, refs) = interrepo.fetch_objects(determine_wants,
248
253
                                                       mapping=default_mapping)
249
 
        for name, val in refs.items():
 
254
        for name, val in viewitems(refs):
250
255
            target_git_repo.refs[name] = val
251
256
        result_dir = self.__class__(transport, target_git_repo, format)
252
257
        if revision_id is not None:
562
567
            else:
563
568
                base_url = urlutils.local_path_to_url(
564
569
                    commondir.decode(osutils._fs_enc)).rstrip('/.git/') + '/'
 
570
            if not PY3:
 
571
                params = {k: v.encode('utf-8') for (k, v) in viewitems(params)}
565
572
            return urlutils.join_segment_parameters(base_url, params)
566
573
        return None
567
574