~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/changeset.py

Show diffs side-by-side

added added

removed removed

Lines of Context:
798
798
                raise SourceRootHasName(self, to_name)
799
799
            else:
800
800
                return '.'
801
 
        if from_dir == to_dir:
 
801
        parent_entry = changeset.entries.get(parent)
 
802
        if parent_entry is None:
802
803
            dir = os.path.dirname(id_map[self.id])
803
804
        else:
804
805
            mutter("path, new_path: %r %r", self.path, self.new_path)
805
 
            parent_entry = changeset.entries[parent]
806
806
            dir = parent_entry.get_new_path(id_map, changeset, reverse)
807
807
        if from_name == to_name:
808
808
            name = os.path.basename(id_map[self.id])
939
939
            temp_name[entry.id] = None
940
940
 
941
941
        elif entry.needs_rename():
 
942
            if entry.is_creation(reverse):
 
943
                continue
942
944
            to_name = os.path.join(temp_dir, str(i))
943
945
            src_path = inventory.get(entry.id)
944
946
            if src_path is not None:
985
987
            entry.apply(new_path, conflict_handler, reverse)
986
988
            changed_inventory[entry.id] = new_tree_path
987
989
        elif entry.needs_rename():
 
990
            if entry.is_deletion(reverse):
 
991
                continue
988
992
            if old_path is None:
989
993
                continue
990
994
            try: