Handle type changes in history (folder -> file, file -> symlink etc)
Jonas Haag
13 years ago
64 | 64 | def _path_changed_between(self, path, commit1, commit2): |
65 | 65 | path, filename = os.path.split(path) |
66 | 66 | try: |
67 | blob1 = self.get_tree(commit1, path)[filename] | |
67 | blob1 = self.get_tree(commit1, path) | |
68 | if not isinstance(blob1, dulwich.objects.Tree): | |
69 | return True | |
70 | blob1 = blob1[filename] | |
68 | 71 | except KeyError: |
69 | 72 | blob1 = None |
70 | 73 | try: |
71 | blob2 = self.get_tree(commit2, path)[filename] | |
74 | blob2 = self.get_tree(commit2, path) | |
75 | if not isinstance(blob2, dulwich.objects.Tree): | |
76 | return True | |
77 | blob2 = blob2[filename] | |
72 | 78 | except KeyError: |
73 | 79 | blob2 = None |
74 | 80 | if blob1 is None and blob2 is None: |