~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_commit.py

  • Committer: Martin von Gagern
  • Date: 2011-06-01 12:53:56 UTC
  • mto: This revision was merged to the branch mainline in revision 6009.
  • Revision ID: martin.vgagern@gmx.net-20110601125356-lwozv2vecea6hxfz
Change from no_decorate to classify as name for the argument.

The command line switch remains as --no-classify, to keep backwards
compatibility.  Users are free to include --no-classify in an alias, and
still use --classify to change back.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
from bzrlib.bzrdir import BzrDirMetaFormat1
27
27
from bzrlib.commit import Commit, NullCommitReporter
28
28
from bzrlib.config import BranchConfig
29
 
from bzrlib.errors import (
30
 
    PointlessCommit,
31
 
    BzrError,
32
 
    SigningFailed,
33
 
    LockContention,
34
 
    )
 
29
from bzrlib.errors import (PointlessCommit, BzrError, SigningFailed,
 
30
                           LockContention)
35
31
from bzrlib.tests import (
 
32
    SymlinkFeature,
36
33
    TestCaseWithTransport,
37
34
    test_foreign,
38
35
    )
39
 
from bzrlib.tests.features import (
40
 
    SymlinkFeature,
41
 
    )
42
 
from bzrlib.tests.matchers import MatchesAncestry
43
36
 
44
37
 
45
38
# TODO: Test commit with some added, and added-but-missing files
161
154
        wt.commit(message='add hello')
162
155
 
163
156
        os.remove('hello')
164
 
        reporter = CapturingReporter()
165
 
        wt.commit('removed hello', rev_id='rev2', reporter=reporter)
166
 
        self.assertEquals(
167
 
            [('missing', u'hello'), ('deleted', u'hello')],
168
 
            reporter.calls)
 
157
        wt.commit('removed hello', rev_id='rev2')
169
158
 
170
159
        tree = b.repository.revision_tree('rev2')
171
160
        self.assertFalse(tree.has_id('hello-id'))
368
357
        eq = self.assertEquals
369
358
        eq(b.revision_history(), rev_ids)
370
359
        for i in range(4):
371
 
            self.assertThat(rev_ids[:i+1],
372
 
                MatchesAncestry(b.repository, rev_ids[i]))
 
360
            anc = b.repository.get_ancestry(rev_ids[i])
 
361
            eq(anc, [None] + rev_ids[:i+1])
373
362
 
374
363
    def test_commit_new_subdir_child_selective(self):
375
364
        wt = self.make_branch_and_tree('.')