/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/git/transform.py

  • Committer: Jelmer Vernooij
  • Date: 2020-08-16 22:04:52 UTC
  • mto: (7490.40.103 work)
  • mto: This revision was merged to the branch mainline in revision 7521.
  • Revision ID: jelmer@jelmer.uk-20200816220452-ow3vw02mfjy5apyr
Fix some more tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
593
593
            else:
594
594
                to_executable = from_executable
595
595
 
596
 
            if from_kind != to_kind:
 
596
            if from_versioned and from_kind != to_kind:
597
597
                modified = True
598
598
            elif to_kind in ('file', 'symlink') and (
599
599
                    trans_id in self._new_contents):
1055
1055
            orig_path = self.tree_path(trans_id)
1056
1056
            if orig_path is None:
1057
1057
                return None
1058
 
            return next(self._tree.iter_entries_by_dir(
1059
 
                specific_files=[orig_path]))[1]
 
1058
            try:
 
1059
                return next(self._tree.iter_entries_by_dir(
 
1060
                    specific_files=[orig_path]))[1]
 
1061
            except StopIteration:
 
1062
                return None
1060
1063
 
1061
1064
    def final_git_entry(self, trans_id):
1062
1065
        if trans_id in self._new_contents: