~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: Ian Clatworthy
  • Date: 2008-07-18 15:00:08 UTC
  • mto: (4171.1.1 ianc-integration)
  • mto: This revision was merged to the branch mainline in revision 4173.
  • Revision ID: ian.clatworthy@canonical.com-20080718150008-mjjaa5c60kncqd80
access rules via get_special_file to fix recursion bug

Show diffs side-by-side

added added

removed removed

Lines of Context:
439
439
        else:
440
440
            return f
441
441
 
 
442
    def get_special_file(self, type):
 
443
        """Get a file special to Bazaar.
 
444
 
 
445
        :type: a type of XXX maps to a file path .bzrXXX
 
446
        :return: a file-like object or None if the file does not exist
 
447
        """
 
448
        path = self.abspath(".bzr" + type)
 
449
        try:
 
450
            return open(path, 'rb')
 
451
        except IOError:
 
452
            return None
 
453
 
442
454
    @needs_read_lock
443
455
    def annotate_iter(self, file_id, default_revision=CURRENT_REVISION):
444
456
        """See Tree.annotate_iter