~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_branchbuilder.py

  • Committer: Jelmer Vernooij
  • Date: 2012-02-20 12:19:29 UTC
  • mfrom: (6437.23.11 2.5)
  • mto: (6581.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 6582.
  • Revision ID: jelmer@samba.org-20120220121929-7ni2psvjoatm1yp4
Merge bzr/2.5.

Show diffs side-by-side

added added

removed removed

Lines of Context:
86
86
            [rev_id1],
87
87
            branch.repository.get_revision(branch.last_revision()).parent_ids)
88
88
 
 
89
    def test_build_commit_parent_ids(self):
 
90
        """build_commit() takes a parent_ids argument."""
 
91
        builder = BranchBuilder(self.get_transport().clone('foo'))
 
92
        rev_id1 = builder.build_commit(
 
93
            parent_ids=["ghost"], allow_leftmost_as_ghost=True)
 
94
        rev_id2 = builder.build_commit(parent_ids=[])
 
95
        branch = builder.get_branch()
 
96
        self.assertEqual((1, rev_id2), branch.last_revision_info())
 
97
        self.assertEqual(
 
98
            ["ghost"],
 
99
            branch.repository.get_revision(rev_id1).parent_ids)
 
100
 
89
101
 
90
102
class TestBranchBuilderBuildSnapshot(tests.TestCaseWithMemoryTransport):
91
103