~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: John Arbash Meinel
  • Date: 2006-07-03 13:48:52 UTC
  • mfrom: (1835 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1836.
  • Revision ID: john@arbash-meinel.com-20060703134852-295eeb195b8e2811
[merge] bzr.dev 1835

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
    def make_file(self, name, contents):
27
27
        f = open(name, 'wb')
28
 
        f.write(contents)
29
 
        f.close()
 
28
        try:
 
29
            f.write(contents)
 
30
        finally:
 
31
            f.close()
30
32
 
31
33
    def create_conflicts(self):
32
34
        """Create a conflicted tree"""
106
108
        self.run_bzr_error(['remerge only works after normal merges',
107
109
                            'Not cherrypicking or multi-merges'],
108
110
                           'remerge')
 
111
 
 
112
    def test_conflicts(self):
 
113
        self.create_conflicts()
 
114
        self.run_bzr('merge', '../other', retcode=1)
 
115
        wt = WorkingTree.open('.')
 
116
        self.assertEqual(2, len(wt.conflicts()))
 
117
        self.run_bzr('remerge', retcode=1)
 
118
        wt = WorkingTree.open('.')
 
119
        self.assertEqual(2, len(wt.conflicts()))
 
120
        self.run_bzr('remerge', 'hello', retcode=1)
 
121
        self.assertEqual(2, len(wt.conflicts()))