~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge.py

  • Committer: John Arbash Meinel
  • Date: 2008-07-22 21:47:13 UTC
  • mto: (3697.7.4 1.7)
  • mto: This revision was merged to the branch mainline in revision 3748.
  • Revision ID: john@arbash-meinel.com-20080722214713-xpdvsv1aixxq05tn
Test the case where BASE is missing a file that is present in THIS, OTHER and all LCAs.
Also include both the case where the file is modified, and where it isn't.

Show diffs side-by-side

added added

removed removed

Lines of Context:
661
661
        walker = _mod_tree.MultiWalker(self.other_tree,
662
662
                                       self._lca_trees.values())
663
663
 
 
664
        base_inventory = self.base_tree.inventory
 
665
        this_inventory = self.this_tree.inventory
664
666
        for path, file_id, other_ie, lca_values in walker.iter_all():
665
667
            # Is this modified at all from any of the other trees?
666
668
            last_rev = other_ie.revision
669
671
                    break
670
672
            else: # Identical in all trees
671
673
                continue
672
 
            base_ie = self.base_tree.inventory[file_id]
 
674
            if file_id in base_inventory:
 
675
                base_ie = self.base_tree.inventory[file_id]
 
676
                base_parent_id = base_ie.parent_id
 
677
                base_name = base_ie.name
 
678
                base_executable = base_ie.executable
 
679
            else:
 
680
                base_parent_id = base_name = base_executable = None
673
681
            this_ie = self.this_tree.inventory[file_id]
674
682
            result.append((file_id, True,
675
 
                           ((base_ie.parent_id,
 
683
                           ((base_parent_id,
676
684
                            [ie.parent_id for path, ie in lca_values]),
677
685
                            other_ie.parent_id, this_ie.parent_id),
678
 
                           ((base_ie.name,
 
686
                           ((base_name,
679
687
                            [ie.name for path, ie in lca_values]),
680
688
                            other_ie.name, this_ie.name),
681
 
                           ((base_ie.executable,
 
689
                           ((base_executable,
682
690
                            [ie.executable for path, ie in lca_values]),
683
691
                            other_ie.executable, this_ie.executable)
684
692
                          ))