~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

forward to get_parent_ids in pending_merges.

Show diffs side-by-side

added added

removed removed

Lines of Context:
491
491
            parents = []
492
492
        else:
493
493
            parents = [last_rev]
494
 
        other_parents = self.pending_merges()
495
 
        return parents + other_parents
 
494
        try:
 
495
            merges_file = self._control_files.get_utf8('pending-merges')
 
496
        except NoSuchFile:
 
497
            pass
 
498
        else:
 
499
            for l in merges_file.readlines():
 
500
                parents.append(l.rstrip('\n'))
 
501
        return parents
496
502
 
497
503
    def get_root_id(self):
498
504
        """Return the id of this trees root"""
711
717
        These are revisions that have been merged into the working
712
718
        directory but not yet committed.
713
719
        """
714
 
        try:
715
 
            merges_file = self._control_files.get_utf8('pending-merges')
716
 
        except NoSuchFile:
717
 
            return []
718
 
        p = []
719
 
        for l in merges_file.readlines():
720
 
            p.append(l.rstrip('\n'))
721
 
        return p
 
720
        return self.get_parent_ids()[1:]
722
721
 
723
722
    @needs_write_lock
724
723
    def set_parent_ids(self, revision_ids, allow_leftmost_as_ghost=False):