~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge.py

  • Committer: Ian Clatworthy
  • Date: 2009-10-27 09:45:35 UTC
  • mto: (4634.103.1 385879)
  • mto: This revision was merged to the branch mainline in revision 4857.
  • Revision ID: ian.clatworthy@canonical.com-20091027094535-wii07udtqgtsxbp4
Use the working tree for path lookups as Robert suggested. We still need to fall back to the other tree though in the case of files being added.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1164
1164
                # OTHER changed the file
1165
1165
                wt = self.this_tree
1166
1166
                if wt.supports_content_filtering():
1167
 
                    filter_tree_path = self.other_tree.id2path(file_id)
 
1167
                    # We get the path from the working tree if it exists.
 
1168
                    # That fails though when OTHER is adding a file, so
 
1169
                    # we fall back to the other tree to find the path if
 
1170
                    # it doesn't exist locally.
 
1171
                    try:
 
1172
                        filter_tree_path = wt.id2path(file_id)
 
1173
                    except errors.NoSuchId:
 
1174
                        filter_tree_path = self.other_tree.id2path(file_id)
1168
1175
                else:
1169
1176
                    # Skip the id2path lookup for older formats
1170
1177
                    filter_tree_path = None