~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge.py

  • Committer: John Arbash Meinel
  • Date: 2008-08-01 16:40:01 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-20080801164001-h8qnpzd3oflukm4n
Add a test that we only call get_symlink_target if the object should be a symlink.

Show diffs side-by-side

added added

removed removed

Lines of Context:
783
783
                    content_changed = False
784
784
                elif other_ie.kind == 'file':
785
785
                    def get_sha1(ie, tree):
786
 
                        # TODO: we should actually check that ie.kind == 'file'
787
 
                        #       otherwise kind changes will break this. It is
788
 
                        #       possible to have kind_winner = THIS and still
789
 
                        #       have a kind change. We just don't have a kind
790
 
                        #       change in 'other'
791
 
                        if ie.kind is None:
 
786
                        if ie.kind != 'file':
792
787
                            return None
793
788
                        return tree.get_file_sha1(file_id)
794
789
                    base_sha1 = get_sha1(base_ie, self.base_tree)
811
806
                        content_changed = False
812
807
                elif other_ie.kind == 'symlink':
813
808
                    def get_target(ie, tree):
814
 
                        if ie.kind is None:
 
809
                        if ie.kind != 'symlink':
815
810
                            return None
816
811
                        return tree.get_symlink_target(file_id)
817
812
                    base_target = get_target(base_ie, self.base_tree)