~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_dirstate.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-09-03 08:06:56 UTC
  • mfrom: (2778.2.1 none.minikind.wouter)
  • Revision ID: pqm@pqm.ubuntu.com-20070903080656-1sn8ea2d3ohx75ek
(Wouter van Heyst) Dirstate blowing up on None as a minikind fingerprint

Show diffs side-by-side

added added

removed removed

Lines of Context:
2120
2120
        self.assertContainsRe(str(e),
2121
2121
            'file a-id is absent in row')
2122
2122
 
 
2123
 
 
2124
class TestDirstateTreeReference(TestCaseWithDirState):
 
2125
 
 
2126
    def test_reference_revision_is_none(self):
 
2127
        tree = self.make_branch_and_tree('tree', format='dirstate-with-subtree')
 
2128
        subtree = self.make_branch_and_tree('tree/subtree',
 
2129
                            format='dirstate-with-subtree')
 
2130
        subtree.set_root_id('subtree')
 
2131
        tree.add_reference(subtree)
 
2132
        tree.add('subtree')
 
2133
        state = dirstate.DirState.from_tree(tree, 'dirstate')
 
2134
        key = ('', 'subtree', 'subtree')
 
2135
        expected = ('', [(key,
 
2136
            [('t', '', 0, False, 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')])])
 
2137
 
 
2138
        try:
 
2139
            self.assertEqual(expected, state._find_block(key))
 
2140
        finally:
 
2141
            state.unlock()