/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: Robert Collins
  • Date: 2010-05-27 21:16:48 UTC
  • mto: This revision was merged to the branch mainline in revision 5266.
  • Revision ID: robertc@robertcollins.net-20100527211648-1mj8m4dh0ricku21
Final fix for 'no help for command' issue. We now show a clean message
when a command has no help, document how to set help more clearly, and
test that all commands available to the test suite have help.
(Robert Collins, #177500)

Show diffs side-by-side

added added

removed removed

Lines of Context:
463
463
        return (file_obj, stat_value)
464
464
 
465
465
    def get_file_text(self, file_id, path=None, filtered=True):
466
 
        return self.get_file(file_id, path=path, filtered=filtered).read()
 
466
        my_file = self.get_file(file_id, path=path, filtered=filtered)
 
467
        try:
 
468
            return my_file.read()
 
469
        finally:
 
470
            my_file.close()
467
471
 
468
472
    def get_file_byname(self, filename, filtered=True):
469
473
        path = self.abspath(filename)
523
527
 
524
528
        # Now we have the parents of this content
525
529
        annotator = self.branch.repository.texts.get_annotator()
526
 
        text = self.get_file(file_id).read()
 
530
        text = self.get_file_text(file_id)
527
531
        this_key =(file_id, default_revision)
528
532
        annotator.add_special_text(this_key, file_parent_keys, text)
529
533
        annotations = [(key[-1], line)