~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_commit_merge.py

  • Committer: Jelmer Vernooij
  • Date: 2016-04-03 16:32:31 UTC
  • mto: This revision was merged to the branch mainline in revision 6617.
  • Revision ID: jelmer@jelmer.uk-20160403163231-h72bo0uyek2gikw0
Don't put French text in doc/en/user-reference when LANGUAGE=fr_CH.UTF_8.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006, 2007, 2009, 2011 Canonical Ltd
 
1
# Copyright (C) 2005, 2006, 2007, 2009, 2010, 2011, 2016 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
17
17
 
18
18
import os
19
19
 
20
 
from bzrlib import check, osutils
 
20
from bzrlib import (
 
21
    check,
 
22
    osutils,
 
23
    )
21
24
from bzrlib.errors import PointlessCommit
22
25
from bzrlib.tests import (
 
26
    TestCaseWithTransport,
 
27
    )
 
28
from bzrlib.tests.features import (
23
29
    SymlinkFeature,
24
 
    TestCaseWithTransport,
25
30
    )
 
31
from bzrlib.tests.matchers import RevisionHistoryMatches
26
32
 
27
33
 
28
34
class TestCommitMerge(TestCaseWithTransport):
52
58
        wty.merge_from_branch(bx)
53
59
        wty.commit('merge from x', rev_id='y@u-0-2', allow_pointless=False)
54
60
 
55
 
        self.assertEquals(by.revno(), 3)
56
 
        self.assertEquals(list(by.revision_history()),
57
 
                          [base_rev, 'y@u-0-1', 'y@u-0-2'])
 
61
        self.assertEqual(by.revno(), 3)
 
62
        graph = wty.branch.repository.get_graph()
 
63
        self.addCleanup(wty.lock_read().unlock)
 
64
        self.assertThat(by,
 
65
            RevisionHistoryMatches([base_rev, 'y@u-0-1', 'y@u-0-2'])
 
66
            )
58
67
        rev = by.repository.get_revision('y@u-0-2')
59
 
        self.assertEquals(rev.parent_ids,
 
68
        self.assertEqual(rev.parent_ids,
60
69
                          ['y@u-0-1', 'x@u-0-1'])
61
70
 
62
71
    def test_merge_new_file(self):
89
98
 
90
99
        wty.commit('merge from x', rev_id='y@u-0-2', allow_pointless=False)
91
100
        tree = by.repository.revision_tree('y@u-0-2')
92
 
        self.assertEquals(tree.get_file_revision('ecks-id'), 'x@u-0-1')
93
 
        self.assertEquals(tree.get_file_revision('why-id'), 'y@u-0-1')
 
101
        self.assertEqual(tree.get_file_revision('ecks-id'), 'x@u-0-1')
 
102
        self.assertEqual(tree.get_file_revision('why-id'), 'y@u-0-1')
94
103
 
95
104
        check.check_dwim(bx.base, False, True, True)
96
105
        check.check_dwim(by.base, False, True, True)