~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/bzrdir_implementations/test_bzrdir.py

  • Committer: Robey Pointer
  • Date: 2006-09-03 00:28:18 UTC
  • mfrom: (1981 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1996.
  • Revision ID: robey@lag.net-20060903002818-71ca5c7bfea93a26
merge from bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
                           NotBranchError,
34
34
                           )
35
35
import bzrlib.repository as repository
 
36
import bzrlib.revision
36
37
from bzrlib.tests import (
37
38
                          ChrootedTestCase,
38
39
                          TestCase,
142
143
            raise TestSkipped('Cannot sprout to remote bzrdirs.')
143
144
        return target
144
145
 
 
146
    def test_create_null_workingtree(self):
 
147
        dir = self.make_bzrdir('dir1')
 
148
        dir.create_repository()
 
149
        dir.create_branch()
 
150
        wt = dir.create_workingtree(revision_id=bzrlib.revision.NULL_REVISION)
 
151
        self.assertIs(wt.last_revision(), None)
 
152
 
145
153
    def test_clone_bzrdir_empty(self):
146
154
        dir = self.make_bzrdir('source')
147
155
        target = dir.clone(self.get_url('target'))
199
207
        tree.add('foo')
200
208
        tree.commit('revision 1', rev_id='1')
201
209
        tree.bzrdir.open_branch().set_revision_history([])
202
 
        tree.set_last_revision(None)
 
210
        tree.set_parent_trees([])
203
211
        tree.commit('revision 2', rev_id='2')
204
212
        tree.bzrdir.open_repository().copy_content_into(shared_repo)
205
213
        dir = self.make_bzrdir('shared/source')
219
227
        tree.add('foo')
220
228
        tree.commit('revision 1', rev_id='1')
221
229
        tree.bzrdir.open_branch().set_revision_history([])
222
 
        tree.set_last_revision(None)
 
230
        tree.set_parent_trees([])
223
231
        tree.commit('revision 2', rev_id='2')
224
232
        tree.bzrdir.open_repository().copy_content_into(shared_repo)
225
233
        shared_repo.set_make_working_trees(False)
264
272
        tree.add('foo')
265
273
        tree.commit('revision 1', rev_id='1')
266
274
        tree.bzrdir.open_branch().set_revision_history([])
267
 
        tree.set_last_revision(None)
 
275
        tree.set_parent_trees([])
268
276
        tree.commit('revision 2', rev_id='2')
269
277
        source = self.make_repository('source')
270
278
        tree.bzrdir.open_repository().copy_content_into(source)
519
527
        tree.add('foo')
520
528
        tree.commit('revision 1', rev_id='1')
521
529
        tree.bzrdir.open_branch().set_revision_history([])
522
 
        tree.set_last_revision(None)
 
530
        tree.set_parent_trees([])
523
531
        tree.commit('revision 2', rev_id='2')
524
532
        source = self.make_repository('source')
525
533
        tree.bzrdir.open_repository().copy_content_into(source)
542
550
        tree.add('foo')
543
551
        tree.commit('revision 1', rev_id='1')
544
552
        tree.bzrdir.open_branch().set_revision_history([])
545
 
        tree.set_last_revision(None)
 
553
        tree.set_parent_trees([])
546
554
        tree.commit('revision 2', rev_id='2')
547
555
        tree.bzrdir.open_repository().copy_content_into(shared_repo)
548
556
        dir = self.make_bzrdir('shared/source')
562
570
        tree.add('foo')
563
571
        tree.commit('revision 1', rev_id='1')
564
572
        tree.bzrdir.open_branch().set_revision_history([])
565
 
        tree.set_last_revision(None)
 
573
        tree.set_parent_trees([])
566
574
        tree.commit('revision 2', rev_id='2')
567
575
        tree.bzrdir.open_repository().copy_content_into(shared_repo)
568
576
        shared_repo.set_make_working_trees(False)
584
592
        tree.add('foo')
585
593
        tree.commit('revision 1', rev_id='1')
586
594
        tree.bzrdir.open_branch().set_revision_history([])
587
 
        tree.set_last_revision(None)
 
595
        tree.set_parent_trees([])
588
596
        tree.commit('revision 2', rev_id='2')
589
597
        source = self.make_repository('source')
590
598
        tree.bzrdir.open_repository().copy_content_into(source)
608
616
        tree.add('foo')
609
617
        tree.commit('revision 1', rev_id='1')
610
618
        tree.bzrdir.open_branch().set_revision_history([])
611
 
        tree.set_last_revision(None)
 
619
        tree.set_parent_trees([])
612
620
        tree.commit('revision 2', rev_id='2')
613
621
        source = self.make_repository('source')
614
622
        tree.bzrdir.open_repository().copy_content_into(source)