~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Robert Collins
  • Date: 2005-11-05 23:01:07 UTC
  • mto: This revision was merged to the branch mainline in revision 1503.
  • Revision ID: robertc@robertcollins.net-20051105230107-63b2bb28dd1f6199
Move pending_merges() to WorkingTree.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1032
1032
        self.working_tree()._write_inventory(inv)
1033
1033
        return result
1034
1034
 
1035
 
    def pending_merges(self):
1036
 
        """Return a list of pending merges.
1037
 
 
1038
 
        These are revisions that have been merged into the working
1039
 
        directory but not yet committed.
1040
 
        """
1041
 
        cfn = self._rel_controlfilename('pending-merges')
1042
 
        if not self._transport.has(cfn):
1043
 
            return []
1044
 
        p = []
1045
 
        for l in self.controlfile('pending-merges', 'r').readlines():
1046
 
            p.append(l.rstrip('\n'))
1047
 
        return p
1048
 
 
1049
 
 
1050
1035
    def add_pending_merge(self, *revision_ids):
1051
1036
        # TODO: Perhaps should check at this point that the
1052
1037
        # history of the revision is actually present?
1053
 
        p = self.pending_merges()
 
1038
        p = self.working_tree().pending_merges()
1054
1039
        updated = False
1055
1040
        for rev_id in revision_ids:
1056
1041
            if rev_id in p: