~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/changeset.py

  • Committer: aaron.bentley at utoronto
  • Date: 2005-08-26 01:50:01 UTC
  • mto: (974.1.47)
  • mto: This revision was merged to the branch mainline in revision 1178.
  • Revision ID: aaron.bentley@utoronto.ca-20050826015001-d8b6e6330cb6401a
Merged from bzr.24

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, reverse=False):
 
629
    def summarize_name(self, changeset, 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())
 
666
        mutter("Finding new path for %s" % self.summarize_name(changeset))
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 not tree.has_or_had_id(file_id):
 
1332
        if file_id not in tree:
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_or_had_id(file_id):
 
1342
        if not tree.has_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
1400
1403
        
1401
1404
        cs_entry.metadata_change = self.make_mode_change(stat_a, stat_b)
1402
1405
        cs_entry.contents_change = self.make_contents_change(full_path_a,