/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/tests/test_dirstate.py

  • Committer: Martin Pool
  • Date: 2007-10-10 00:07:04 UTC
  • mto: This revision was merged to the branch mainline in revision 2902.
  • Revision ID: mbp@sourcefrog.net-20071010000704-f6o18zzj6twx94vs
Validate dirstate during tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
742
742
            self.assertTrue(inv.has_id('foo-id'))
743
743
            self.assertTrue(inv.has_filename('foo'))
744
744
            inv.add_path('bar', 'file', 'bar-id')
 
745
            tree._dirstate._validate()
745
746
            # this used to cause it to lose its hashcache
746
747
            tree._dirstate.set_state_from_inventory(inv)
 
748
            tree._dirstate._validate()
747
749
        finally:
748
750
            tree.unlock()
749
751
 
751
753
        try:
752
754
            # now check that the state still has the original hashcache value
753
755
            state = tree._dirstate
 
756
            state._validate()
754
757
            foo_tuple = state._get_entry(0, path_utf8='foo')
755
758
            self.assertEqual(
756
759
                (('', 'foo', 'foo-id',),