~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge.py

  • Committer: Jelmer Vernooij
  • Date: 2012-02-17 16:40:16 UTC
  • mto: This revision was merged to the branch mainline in revision 6470.
  • Revision ID: jelmer@samba.org-20120217164016-zlc5yhhpn4b0rwh1
Ask for forgiveness, not permission when looking up tree entry.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1260
1260
 
1261
1261
    def merge_names(self, file_id):
1262
1262
        def get_entry(tree):
1263
 
            if tree.has_id(file_id):
 
1263
            try:
1264
1264
                return tree.root_inventory[file_id]
1265
 
            else:
 
1265
            except errors.NoSuchId:
1266
1266
                return None
1267
1267
        this_entry = get_entry(self.this_tree)
1268
1268
        other_entry = get_entry(self.other_tree)