~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/changeset.py

Add ChangesetEntry.__repr__

Fix bad results from ChangesetEntry.summarize_name()

Show diffs side-by-side

added added

removed removed

Lines of Context:
633
633
        if self.id  == self.parent:
634
634
            raise ParentIDIsSelf(self)
635
635
 
636
 
    def __str__(self):
 
636
    def __repr__(self):
637
637
        return "ChangesetEntry(%s)" % self.id
638
638
 
 
639
    __str__ = __repr__
 
640
 
639
641
    def __get_dir(self):
640
642
        if self.path is None:
641
643
            return None
750
752
        """
751
753
        orig_path = self.get_cset_path(False)
752
754
        mod_path = self.get_cset_path(True)
753
 
        if orig_path is not None:
 
755
        if orig_path and orig_path.startswith('./'):
754
756
            orig_path = orig_path[2:]
755
 
        if mod_path is not None:
 
757
        if mod_path and mod_path.startswith('./'):
756
758
            mod_path = mod_path[2:]
757
759
        if orig_path == mod_path:
758
760
            return orig_path
986
988
            if old_path is None:
987
989
                continue
988
990
            try:
 
991
                mutter('rename %s to final name %s', old_path, new_path)
989
992
                rename(old_path, new_path)
990
993
                changed_inventory[entry.id] = new_tree_path
991
994
            except OSError, e: