~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_repository/test_repository.py

  • Committer: Andrew Bennetts
  • Date: 2009-09-09 06:06:44 UTC
  • mfrom: (4634.6.27 2.0)
  • mto: (4634.6.28 2.0)
  • mto: This revision was merged to the branch mainline in revision 4680.
  • Revision ID: andrew.bennetts@canonical.com-20090909060644-pcuzlf8zs9gsrnka
MergeĀ lp:bzr/2.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
760
760
        repo = self.make_repository('repo')
761
761
        repo.lock_write()
762
762
        self.addCleanup(repo.unlock)
763
 
        self.addCleanup(repo.commit_write_group)
764
763
        repo.start_write_group()
 
764
        self.addCleanup(repo.abort_write_group)
765
765
        inv = Inventory(revision_id='A')
766
766
        inv.root.revision = 'A'
767
767
        repo.add_inventory('A', inv, [])
788
788
        repo = self.make_repository('repo')
789
789
        repo.lock_write()
790
790
        repo.start_write_group()
 
791
        root_id = inv.root.file_id
 
792
        repo.texts.add_lines(('fixed-root', 'A'), [], [])
791
793
        repo.add_revision('A', Revision('A', committer='B', timestamp=0,
792
794
                          timezone=0, message='C'), inv=inv)
793
795
        repo.commit_write_group()
1225
1227
        repo.start_write_group()
1226
1228
        inv = Inventory(revision_id = 'ghost')
1227
1229
        inv.root.revision = 'ghost'
 
1230
        if repo.supports_rich_root():
 
1231
            root_id = inv.root.file_id
 
1232
            repo.texts.add_lines((root_id, 'ghost'), [], [])
1228
1233
        sha1 = repo.add_inventory('ghost', inv, [])
1229
1234
        rev = bzrlib.revision.Revision(timestamp=0,
1230
1235
                                       timezone=None,
1240
1245
 
1241
1246
        inv = Inventory(revision_id = 'the_ghost')
1242
1247
        inv.root.revision = 'the_ghost'
 
1248
        if repo.supports_rich_root():
 
1249
            root_id = inv.root.file_id
 
1250
            repo.texts.add_lines((root_id, 'the_ghost'), [], [])
1243
1251
        sha1 = repo.add_inventory('the_ghost', inv, [])
1244
1252
        rev = bzrlib.revision.Revision(timestamp=0,
1245
1253
                                       timezone=None,