~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.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:
239
239
            mode = os.lstat(self.abspath(path)).st_mode
240
240
            return bool(stat.S_ISREG(mode) and stat.S_IEXEC&mode)
241
241
 
 
242
    def pending_merges(self):
 
243
        """Return a list of pending merges.
 
244
 
 
245
        These are revisions that have been merged into the working
 
246
        directory but not yet committed.
 
247
        """
 
248
        cfn = self.branch._rel_controlfilename('pending-merges')
 
249
        if not self.branch._transport.has(cfn):
 
250
            return []
 
251
        p = []
 
252
        for l in self.branch.controlfile('pending-merges', 'r').readlines():
 
253
            p.append(l.rstrip('\n'))
 
254
        return p
 
255
 
242
256
    def get_symlink_target(self, file_id):
243
257
        return os.readlink(self.id2abspath(file_id))
244
258