/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 read_changeset.py

  • Committer: aaron.bentley at utoronto
  • Date: 2005-07-01 01:17:12 UTC
  • mto: (0.5.85) (1185.82.1 bzr-w-changeset)
  • mto: This revision was merged to the branch mainline in revision 1738.
  • Revision ID: aaron.bentley@utoronto.ca-20050701011712-6d8deb8be1108bdf
Got file gets working

Show diffs side-by-side

added added

removed removed

Lines of Context:
569
569
        def has_id(self, file_id):
570
570
            return self.id2path(file_id) is not None
571
571
 
572
 
        def get_file(file_id):
 
572
        def get_file(self, file_id):
573
573
            result = StringIO()
574
574
            result.write(self.contents[file_id])
575
575
            result.seek(0,0)
676
676
            assert ctree.path2id("grandparent/parent/file") == "e"
677
677
            assert ctree.get_file("e").read() == "Extra cheese"
678
678
 
 
679
        def test_get(self):
 
680
            ctree, mtree = self.make_tree_1()
 
681
            mtree.add_file("e", "grandparent/parent/topping", "Anchovies\n")
 
682
            ctree.note_rename("grandparent/parent/file", 
 
683
                              "grandparent/alt_parent/file")
 
684
            ctree.note_rename("grandparent/parent/topping", 
 
685
                              "grandparent/alt_parent/stopping")
 
686
            mod_patch = self.unified_diff(["Anchovies\n"], ["Lemon\n"])
 
687
            ctree.note_patch("grandparent/alt_parent/stopping", mod_patch)
 
688
            assert ctree.get_file("c").read() == "Hello"
 
689
            assert ctree.get_file("e").read() == "Lemon\n"
 
690
 
679
691
    patchesTestSuite = unittest.makeSuite(CTreeTester,'test_')
680
692
    runner = unittest.TextTestRunner()
681
693
    runner.run(patchesTestSuite)