~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_workingtree.py

 * Two new commands 'bzr checkout' and 'bzr update' allow for CVS/SVN-alike
   behaviour. They use the existing serverless-mode and store no data
   locally. As such they are not suitable for use except in high bandwidth
   low latency environments like LAN's or local disk. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
87
87
        """See WorkingTreeFormat.get_format_string()."""
88
88
        return "Sample tree format."
89
89
 
90
 
    def initialize(self, a_bzrdir):
 
90
    def initialize(self, a_bzrdir, revision_id=None):
91
91
        """Sample branches cannot be created."""
92
92
        t = a_bzrdir.get_workingtree_transport(self)
93
93
        t.put('format', StringIO(self.get_format_string()))
119
119
        
120
120
    def test_find_format_no_tree(self):
121
121
        dir = bzrdir.BzrDirMetaFormat1().initialize('.')
122
 
        self.assertRaises(NotBranchError,
 
122
        self.assertRaises(errors.NoWorkingTree,
123
123
                          workingtree.WorkingTreeFormat.find_format,
124
124
                          dir)
125
125
 
144
144
        workingtree.WorkingTreeFormat.register_format(format)
145
145
        # which branch.Open will refuse (not supported)
146
146
        self.assertRaises(errors.UnsupportedFormatError, workingtree.WorkingTree.open, '.')
147
 
        # compatability
148
 
        self.assertRaises(errors.UnsupportedFormatError, workingtree.WorkingTree, '.')
149
147
        # but open_downlevel will work
150
148
        self.assertEqual(format.open(dir), workingtree.WorkingTree.open_downlevel('.'))
151
149
        # unregister the format
177
175
        self.assertEqualDiff('### bzr hashcache v5\n',
178
176
                             t.get('stat-cache').read())
179
177
        self.assertFalse(t.has('inventory.basis'))
 
178
        # no last-revision file means 'None' or 'NULLREVISION'
 
179
        self.assertFalse(t.has('last-revision'))
180
180
        # TODO RBC 20060210 do a commit, check the inventory.basis is created 
181
 
        # correctly.
 
181
        # correctly and last-revision file becomes present.