~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-04-16 14:16:50 UTC
  • mfrom: (5777.6.13 commit-lossy)
  • Revision ID: pqm@pqm.ubuntu.com-20110416141650-nyf3g3jmhw9cjoff
(jelmer) Add --lossy option to 'bzr commit'.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
from bzrlib.bzrdir import BzrDir
35
35
from bzrlib.tests import (
36
36
    probe_bad_non_ascii,
 
37
    test_foreign,
37
38
    TestSkipped,
38
39
    UnicodeFilenameFeature,
39
40
    )
72
73
        self.run_bzr(["commit", "--unchanged", "-m", u'foo\xb5'])
73
74
        self.assertEqual('', self.run_bzr('unknowns')[0])
74
75
 
 
76
    def test_commit_lossy_native(self):
 
77
        """A --lossy option to commit is supported."""
 
78
        self.make_branch_and_tree('.')
 
79
        self.run_bzr('commit --lossy --unchanged -m message')
 
80
        self.assertEqual('', self.run_bzr('unknowns')[0])
 
81
 
 
82
    def test_commit_lossy_foreign(self):
 
83
        test_foreign.register_dummy_foreign_for_test(self)
 
84
        self.make_branch_and_tree('.',
 
85
            format=test_foreign.DummyForeignVcsDirFormat())
 
86
        self.run_bzr('commit --lossy --unchanged -m message')
 
87
        output = self.run_bzr('revision-info')[0]
 
88
        self.assertTrue(output.startswith('1 dummy-'))
 
89
 
75
90
    def test_commit_with_path(self):
76
91
        """Commit tree with path of root specified"""
77
92
        a_tree = self.make_branch_and_tree('a')
91
106
        self.run_bzr('resolved b/a_file')
92
107
        self.run_bzr(['commit', '-m', 'merge into b', 'b'])
93
108
 
94
 
 
95
109
    def test_10_verbose_commit(self):
96
110
        """Add one file and examine verbose commit output"""
97
111
        tree = self.make_branch_and_tree('.')