~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/changeset.py

  • Committer: John Arbash Meinel
  • Date: 2005-11-30 15:43:57 UTC
  • mto: (1185.50.1 jam-integration)
  • mto: This revision was merged to the branch mainline in revision 1518.
  • Revision ID: john@arbash-meinel.com-20051130154357-614206b3a7b83cd0
Refactored bzrlib/ui.py into a module with the possibility for multiple ui forms.

Show diffs side-by-side

added added

removed removed

Lines of Context:
794
794
            return None
795
795
 
796
796
        if parent == NULL_ID or parent is None:
797
 
            if to_name != '.':
 
797
            if to_name != u'.':
798
798
                raise SourceRootHasName(self, to_name)
799
799
            else:
800
 
                return '.'
801
 
        if from_dir == to_dir:
 
800
                return u'.'
 
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:
1609
1613
            return None
1610
1614
        directory = self.get_dir(id)
1611
1615
        if directory == '.':
1612
 
            directory = './.'
 
1616
            directory = u'./.'
1613
1617
        if directory is None:
1614
1618
            return NULL_ID
1615
1619
        return self.get_rinventory().get(directory)