~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/changeset.py

  • Committer: Aaron Bentley
  • Date: 2005-08-26 14:39:43 UTC
  • mfrom: (974.2.7) (974.2.6)
  • mto: (1185.3.4)
  • mto: This revision was merged to the branch mainline in revision 1178.
  • Revision ID: abentley@panoramicfeedback.com-20050826143943-c677569cfb887d35
Merged changes from the merge4 branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
626
626
                return None
627
627
            return self.path
628
628
 
629
 
    def summarize_name(self, changeset, reverse=False):
 
629
    def summarize_name(self, reverse=False):
630
630
        """Produce a one-line summary of the filename.  Indicates renames as
631
631
        old => new, indicates creation as None => new, indicates deletion as
632
632
        old => None.
663
663
        :type reverse: bool
664
664
        :rtype: str
665
665
        """
666
 
        mutter("Finding new path for %s" % self.summarize_name(changeset))
 
666
        mutter("Finding new path for %s" % self.summarize_name())
667
667
        if reverse:
668
668
            parent = self.parent
669
669
            to_dir = self.dir
1329
1329
            yield self.get_entry(file_id, tree)
1330
1330
 
1331
1331
    def get_entry(self, file_id, tree):
1332
 
        if file_id not in tree:
 
1332
        if not tree.has_or_had_id(file_id):
1333
1333
            return None
1334
1334
        return tree.tree.inventory[file_id]
1335
1335
 
1339
1339
        return entry.parent_id
1340
1340
 
1341
1341
    def get_path(self, file_id, tree):
1342
 
        if not tree.has_id(file_id):
 
1342
        if not tree.has_or_had_id(file_id):
1343
1343
            return None
1344
1344
        path = tree.id2path(file_id)
1345
1345
        if path == '':
1397
1397
        full_path_b = self.tree_b.readonly_path(id)
1398
1398
        stat_a = self.lstat(full_path_a)
1399
1399
        stat_b = self.lstat(full_path_b)
1400
 
        if stat_b is None:
1401
 
            cs_entry.new_parent = None
1402
 
            cs_entry.new_path = None
1403
1400
        
1404
1401
        cs_entry.metadata_change = self.make_mode_change(stat_a, stat_b)
1405
1402
        cs_entry.contents_change = self.make_contents_change(full_path_a,