~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/workingtree_implementations/test_commit.py

  • Committer: Martin Pool
  • Date: 2006-06-20 05:32:16 UTC
  • mfrom: (1797 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1798.
  • Revision ID: mbp@sourcefrog.net-20060620053216-817857d7ca3e9d1f
[merge] bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
82
82
 
83
83
    def test_commit_sets_last_revision(self):
84
84
        tree = self.make_branch_and_tree('tree')
85
 
        tree.commit('foo', rev_id='foo', allow_pointless=True)
 
85
        committed_id = tree.commit('foo', rev_id='foo', allow_pointless=True)
86
86
        self.assertEqual('foo', tree.last_revision())
 
87
        # the commit should have returned the same id we asked for.
 
88
        self.assertEqual('foo', committed_id)
 
89
 
 
90
    def test_commit_returns_revision_id(self):
 
91
        tree = self.make_branch_and_tree('.')
 
92
        committed_id = tree.commit('message', allow_pointless=True)
 
93
        self.assertTrue(tree.branch.repository.has_revision(committed_id))
 
94
        self.assertNotEqual(None, committed_id)
87
95
 
88
96
    def test_commit_local_unbound(self):
89
97
        # using the library api to do a local commit on unbound branches is