~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge_core.py

  • Committer: Aaron Bentley
  • Date: 2005-08-10 17:39:16 UTC
  • mto: (1092.1.41) (1185.3.4) (974.1.47)
  • mto: This revision was merged to the branch mainline in revision 1110.
  • Revision ID: abentley@panoramicfeedback.com-20050810173916-77580019d21a0e82
Removed MergeTree.inventory

Show diffs side-by-side

added added

removed removed

Lines of Context:
76
76
        self.other = other_inventory
77
77
def invert_invent(inventory):
78
78
    invert_invent = {}
79
 
    for key, value in inventory.iteritems():
80
 
        invert_invent[value.file_id] = key
 
79
    for file_id in inventory:
 
80
        path = inventory.id2path(file_id)
 
81
        if path == '':
 
82
            path = './.'
 
83
        else:
 
84
            path = './' + path
 
85
        invert_invent[file_id] = path
81
86
    return invert_invent
82
87
 
83
88
def make_inv(inventory):
92
97
    inventory = ThreewayInventory(make_inv(this_inventory),
93
98
                                  make_inv(base_inventory), 
94
99
                                  make_inv(other_inventory))
95
 
    cset = changeset_function(base, other, base_inventory, other_inventory, 
96
 
                              interesting_ids)
 
100
    cset = changeset_function(base, other, interesting_ids)
97
101
    new_cset = make_merge_changeset(cset, inventory, this, base, other, 
98
102
                                    conflict_handler, merge_factory)
99
103
    result = apply_changeset(new_cset, invert_invent(this_inventory),