~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

MergeĀ fromĀ jam-storage.

Show diffs side-by-side

added added

removed removed

Lines of Context:
411
411
        if updated:
412
412
            self.set_pending_merges(p)
413
413
 
 
414
    @needs_read_lock
414
415
    def pending_merges(self):
415
416
        """Return a list of pending merges.
416
417
 
417
418
        These are revisions that have been merged into the working
418
419
        directory but not yet committed.
419
420
        """
420
 
        cfn = self.branch.control_files._rel_controlfilename('pending-merges')
421
 
        if not self.branch.control_files._transport.has(cfn):
 
421
        try:
 
422
            f = self.branch.control_files.controlfile('pending-merges', 'r')
 
423
        except NoSuchFile:
422
424
            return []
423
425
        p = []
424
 
        for l in self.branch.control_files.controlfile('pending-merges', 'r').readlines():
 
426
        for l in f.readlines():
425
427
            p.append(l.rstrip('\n'))
426
428
        return p
427
429
 
793
795
        if old_revision is not None:
794
796
            try:
795
797
                path = self._basis_inventory_name(old_revision)
796
 
                path = self.branch.control_files._rel_controlfilename(path)
 
798
                path = self.branch.control_files._escape(path)
797
799
                self.branch.control_files._transport.delete(path)
798
800
            except NoSuchFile:
799
801
                pass