~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-05-04 17:38:09 UTC
  • mfrom: (5805.1.1 no-inventory)
  • Revision ID: pqm@pqm.ubuntu.com-20110504173809-otz0gw0cvf2z9jbk
(jelmer) Avoid using inventories in some repository tests. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
            err,
58
58
            DocTestMatches("""\
59
59
Committing to: ...
 
60
aborting commit write group: PointlessCommit(No changes to commit)
60
61
bzr: ERROR: No changes to commit.\
61
62
 Please 'bzr add' the files you want to commit,\
62
63
 or use --unchanged to force an empty commit.
754
755
            "commit tree/hello.txt", stdin="n\n")
755
756
        self.assertEqual(expected, tree.last_revision())
756
757
 
757
 
    def test_set_commit_message(self):
758
 
        msgeditor.hooks.install_named_hook("set_commit_message",
759
 
                lambda commit_obj, msg: "save me some typing\n", None)
760
 
        tree = self.make_branch_and_tree('tree')
761
 
        self.build_tree(['tree/hello.txt'])
762
 
        tree.add('hello.txt')
763
 
        out, err = self.run_bzr("commit tree/hello.txt")
764
 
        last_rev = tree.branch.repository.get_revision(tree.last_revision())
765
 
        self.assertEqual('save me some typing\n', last_rev.message)
766
 
 
767
758
    def test_commit_without_username(self):
768
759
        """Ensure commit error if username is not set.
769
760
        """
792
783
        self.assertEqual(out, '')
793
784
        self.assertContainsRe(err,
794
785
            'Branch.*test_checkout.*appears to be bound to itself')
 
786