~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_log.py

  • Committer: Aaron Bentley
  • Date: 2008-04-24 04:58:42 UTC
  • mfrom: (3377 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3380.
  • Revision ID: aaron@aaronbentley.com-20080424045842-0cajl9v6s4u52kaw
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
891
891
        # f3 should be marked as modified by revisions A, B, C, and D
892
892
        self.assertAllRevisionsForFileID(tree, 'f2-id', ['D', 'C', 'A'])
893
893
 
 
894
    def test_file_id_with_ghosts(self):
 
895
        # This is testing bug #209948, where having a ghost would cause
 
896
        # _filter_revisions_touching_file_id() to fail.
 
897
        tree = self.create_tree_with_single_merge()
 
898
        # We need to add a revision, so switch back to a write-locked tree
 
899
        tree.unlock()
 
900
        tree.lock_write()
 
901
        first_parent = tree.last_revision()
 
902
        tree.set_parent_ids([first_parent, 'ghost-revision-id'])
 
903
        self.build_tree_contents([('tree/f1', 'A\nB\nXX\n')])
 
904
        tree.commit('commit with a ghost', rev_id='XX')
 
905
        self.assertAllRevisionsForFileID(tree, 'f1-id', ['XX', 'B', 'A'])
 
906
        self.assertAllRevisionsForFileID(tree, 'f2-id', ['D', 'C', 'A'])
 
907
 
894
908
 
895
909
class TestShowChangedRevisions(TestCaseWithTransport):
896
910