~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge_core.py

  • Committer: Martin Pool
  • Date: 2005-07-11 23:13:33 UTC
  • Revision ID: mbp@sourcefrog.net-20050711231333-4e73c6333b8d8213
- merge aaron's merge-rename fix

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
    return new_cset
60
60
 
61
61
def make_merged_entry(entry, inventory, conflict_handler):
 
62
    from bzrlib.trace import mutter
62
63
    this_name = inventory.this.get_name(entry.id)
63
64
    this_parent = inventory.this.get_parent(entry.id)
64
65
    this_dir = inventory.this.get_dir(entry.id)
75
76
    other_dir = inventory.base.get_dir(entry.id)
76
77
    if other_dir is None:
77
78
        other_dir = ""
78
 
 
 
79
    mutter("Dirs: this, base, other %r %r %r" % (this_dir, base_dir, other_dir))
 
80
    mutter("Names: this, base, other %r %r %r" % (this_name, base_name, other_name))
79
81
    if base_name == other_name:
80
82
        old_name = this_name
81
83
        new_name = this_name
104
106
        old_path = os.path.join(old_dir, old_name)
105
107
    else:
106
108
        old_path = None
107
 
    new_entry = changeset.ChangesetEntry(entry.id, old_parent, old_name)
 
109
    new_entry = changeset.ChangesetEntry(entry.id, old_parent, old_path)
108
110
    if new_name is not None and new_parent is not None:
109
111
        new_entry.new_path = os.path.join(new_dir, new_name)
110
112
    else:
111
113
        new_entry.new_path = None
112
114
    new_entry.new_parent = new_parent
 
115
    mutter(repr(new_entry))
113
116
    return new_entry
114
117
 
115
118