~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: Robert Collins
  • Date: 2006-06-16 15:25:15 UTC
  • mto: (1777.1.2 integration)
  • mto: This revision was merged to the branch mainline in revision 1779.
  • Revision ID: robertc@robertcollins.net-20060616152515-961fbde13f8a3527
Teach all trees about unknowns, conflicts and get_parent_ids.

Show diffs side-by-side

added added

removed removed

Lines of Context:
455
455
    def get_file_byname(self, filename):
456
456
        return file(self.abspath(filename), 'rb')
457
457
 
 
458
    def get_parent_ids(self):
 
459
        """See Tree.get_parent_ids.
 
460
        
 
461
        This implementation reads the pending merges list and last_revision
 
462
        value and uses that to decide what the parents list should be.
 
463
        """
 
464
        last_rev = self.last_revision()
 
465
        if last_rev is None:
 
466
            parents = []
 
467
        else:
 
468
            parents = [last_rev]
 
469
        other_parents = self.pending_merges()
 
470
        return parents + other_parents
 
471
 
458
472
    def get_root_id(self):
459
473
        """Return the id of this trees root"""
460
474
        inv = self.read_working_inventory()