/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/merge.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:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
 
import contextlib
 
17
from __future__ import absolute_import
18
18
 
19
19
from .lazy_import import lazy_import
20
20
lazy_import(globals(), """
22
22
 
23
23
from breezy import (
24
24
    branch as _mod_branch,
 
25
    cleanup,
25
26
    conflicts as _mod_conflicts,
26
27
    debug,
27
28
    graph as _mod_graph,
48
49
    hooks,
49
50
    registry,
50
51
    )
 
52
from .sixish import (
 
53
    viewitems,
 
54
    )
51
55
# TODO: Report back as changes are merged in
52
56
 
53
57
 
443
447
    def _add_parent(self):
444
448
        new_parents = self.this_tree.get_parent_ids() + [self.other_rev_id]
445
449
        new_parent_trees = []
446
 
        with contextlib.ExitStack() as stack:
 
450
        with cleanup.ExitStack() as stack:
447
451
            for revision_id in new_parents:
448
452
                try:
449
453
                    tree = self.revision_tree(revision_id)
650
654
        return merge
651
655
 
652
656
    def do_merge(self):
653
 
        with contextlib.ExitStack() as stack:
 
657
        with cleanup.ExitStack() as stack:
654
658
            stack.enter_context(self.this_tree.lock_tree_write())
655
659
            if self.base_tree is not None:
656
660
                stack.enter_context(self.base_tree.lock_read())
753
757
            self.do_merge()
754
758
 
755
759
    def do_merge(self):
756
 
        with contextlib.ExitStack() as stack:
 
760
        with cleanup.ExitStack() as stack:
757
761
            stack.enter_context(self.working_tree.lock_tree_write())
758
762
            stack.enter_context(self.this_tree.lock_read())
759
763
            stack.enter_context(self.base_tree.lock_read())
2251
2255
        filtered_parent_map = {}
2252
2256
        child_map = {}
2253
2257
        tails = []
2254
 
        for key, parent_keys in parent_map.items():
 
2258
        for key, parent_keys in viewitems(parent_map):
2255
2259
            culled_parent_keys = [p for p in parent_keys if p in parent_map]
2256
2260
            if not culled_parent_keys:
2257
2261
                tails.append(key)