/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/blackbox/test_update.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-11-16 18:59:44 UTC
  • mfrom: (7143.15.15 more-cleanups)
  • Revision ID: breezy.the.bot@gmail.com-20181116185944-biefv1sub37qfybm
Sprinkle some PEP8iness.

Merged from https://code.launchpad.net/~jelmer/brz/more-cleanups/+merge/358611

Show diffs side-by-side

added added

removed removed

Lines of Context:
89
89
All changes applied successfully.
90
90
Updated to revision 1 of branch %s
91
91
""" % osutils.pathjoin(self.test_dir, 'branch',),
92
 
                         err)
 
92
            err)
93
93
        self.assertPathExists('branch/file')
94
94
 
95
95
    def test_update_out_of_date_light_checkout(self):
106
106
All changes applied successfully.
107
107
Updated to revision 1 of branch %s
108
108
''' % osutils.pathjoin(self.test_dir, 'branch',),
109
 
                         err)
 
109
            err)
110
110
        self.assertEqual('', out)
111
111
 
112
112
    def test_update_conflicts_returns_2(self):
131
131
1 conflicts encountered.
132
132
Updated to revision 2 of branch %s
133
133
''' % osutils.pathjoin(self.test_dir, 'branch',),
134
 
                         err)
 
134
            err)
135
135
        self.assertEqual('', out)
136
136
 
137
137
    def test_smoke_update_checkout_bound_branch_local_commits(self):
173
173
Updated to revision 2 of branch %s
174
174
Your local commits will now show as pending merges with 'brz status', and can be committed with 'brz commit'.
175
175
""" % osutils.pathjoin(self.test_dir, 'master',),
176
 
                         err)
 
176
            err)
177
177
        self.assertEqual([master_tip, child_tip], wt.get_parent_ids())
178
178
        self.assertPathExists('checkout/file')
179
179
        self.assertPathExists('checkout/file_b')
223
223
All changes applied successfully.
224
224
Updated to revision 2 of branch %s
225
225
''' % osutils.pathjoin(self.test_dir, 'master',),
226
 
                         err)
 
226
            err)
227
227
        # The pending merges should still be there
228
228
        self.assertEqual([b'o2'], checkout1.get_parent_ids()[1:])
229
229
 
272
272
        self.assertEqualDiff('''All changes applied successfully.
273
273
Updated to revision 2 of branch %s
274
274
''' % osutils.pathjoin(self.test_dir, 'master',),
275
 
                         err)
 
275
            err)
276
276
        # The pending merges should still be there
277
277
        self.assertEqual([], checkout1.get_parent_ids()[1:])
278
278
 
358
358
 
359
359
        see https://bugs.launchpad.net/bzr/+bug/202374"""
360
360
 
361
 
        tree=self.make_branch_and_tree('.')
 
361
        tree = self.make_branch_and_tree('.')
362
362
 
363
363
        with open('hello', 'wt') as f:
364
364
            f.write('foo')
369
369
            f.write('fee')
370
370
        tree.commit('fee')
371
371
 
372
 
        #tree.update() gives no such revision, so ...
 
372
        # tree.update() gives no such revision, so ...
373
373
        self.run_bzr(['update', '-r1'])
374
374
 
375
 
        #create conflict
 
375
        # create conflict
376
376
        with open('hello', 'wt') as f:
377
377
            f.write('fie')
378
378
 
412
412
        self.build_tree_contents([('checkout/file',
413
413
                                   b'checkout local changes\n')])
414
414
 
415
 
        # lightweight 
 
415
        # lightweight
416
416
        self.build_tree_contents([('lightweight/file',
417
417
                                   b'lightweight local changes\n')])
418
418
 
447
447
''',
448
448
                             'lightweight/file')
449
449
 
450
 
 
451
450
    def test_no_upgrade_single_file(self):
452
451
        """There's one basis revision per tree.
453
452
 
458
457
        """
459
458
        self.make_branch_and_tree('.')
460
459
        self.build_tree_contents([('a/',),
461
 
            ('a/file', b'content')])
 
460
                                  ('a/file', b'content')])
462
461
        sr = ScriptRunner()
463
462
        sr.run_script(self, '''
464
463
            $ brz update ./a