~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_workingtree/test_parents.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-09-09 13:49:07 UTC
  • mfrom: (4679.1.1 merge-2.0-into-bzr.dev)
  • Revision ID: pqm@pqm.ubuntu.com-20090909134907-nnrr06jw5o011doh
(andrew) Merge 2.0 tip, including fixes for 408841, 423506, 406687,
        418931.

Show diffs side-by-side

added added

removed removed

Lines of Context:
392
392
            try:
393
393
                if shape.root.revision is None:
394
394
                    shape.root.revision = revid
 
395
                # Create the text records for this inventory.
 
396
                for path, ie in shape.iter_entries():
 
397
                    if ie.text_size:
 
398
                        lines = ['a' * ie.text_size]
 
399
                    else:
 
400
                        lines = []
 
401
                    tree.branch.repository.texts.add_lines(
 
402
                        (ie.file_id, ie.revision), [], lines)
395
403
                sha1 = tree.branch.repository.add_inventory(revid, shape, [])
396
404
                rev = Revision(timestamp=0,
397
405
                               timezone=None,
400
408
                               inventory_sha1=sha1,
401
409
                               revision_id=revid)
402
410
                tree.branch.repository.add_revision(revid, rev)
 
411
                tree.branch.repository.commit_write_group()
403
412
            except:
404
413
                tree.branch.repository.abort_write_group()
405
414
                raise
406
 
            else:
407
 
                tree.branch.repository.commit_write_group()
408
415
        finally:
409
416
            tree.unlock()
410
417