~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Jelmer Vernooij
  • Date: 2012-02-23 16:48:41 UTC
  • mto: (6437.41.3 rmbranch-active)
  • mto: This revision was merged to the branch mainline in revision 6481.
  • Revision ID: jelmer@samba.org-20120223164841-eyy9xljbpblkchba
Support colocated branches in 'bzr rmbranch'.

Show diffs side-by-side

added added

removed removed

Lines of Context:
236
236
        tree_a.commit('commit b')
237
237
        # reset parent
238
238
        parent = branch_b.get_parent()
239
 
        branch_b = branch.Branch.open('branch_b')
240
239
        branch_b.set_parent(None)
241
240
        self.assertEqual(None, branch_b.get_parent())
242
241
        # test pull for failure without parent set
253
252
                ('','bzr: ERROR: These branches have diverged.'
254
253
                    ' Use the missing command to see how.\n'
255
254
                    'Use the merge command to reconcile them.\n'))
256
 
        tree_b = tree_b.bzrdir.open_workingtree()
257
 
        branch_b = tree_b.branch
258
 
        self.assertEqual(parent, branch_b.get_parent())
 
255
        self.assertEqual(branch_b.get_parent(), parent)
259
256
        # test implicit --remember after resolving previous failure
260
257
        uncommit.uncommit(branch=branch_b, tree=tree_b)
261
258
        t.delete('branch_b/d')
262
259
        self.run_bzr('pull', working_dir='branch_b')
263
 
        # Refresh the branch object as 'pull' modified it
264
 
        branch_b = branch_b.bzrdir.open_branch()
265
260
        self.assertEqual(branch_b.get_parent(), parent)
266
261
        # test explicit --remember
267
262
        self.run_bzr('pull ../branch_c --remember', working_dir='branch_b')
268
 
        # Refresh the branch object as 'pull' modified it
269
 
        branch_b = branch_b.bzrdir.open_branch()
270
 
        self.assertEqual(branch_c.bzrdir.root_transport.base,
271
 
                         branch_b.get_parent())
 
263
        self.assertEqual(branch_b.get_parent(),
 
264
                          branch_c.bzrdir.root_transport.base)
272
265
 
273
266
    def test_pull_bundle(self):
274
267
        from bzrlib.testament import Testament
367
360
    def test_pull_verbose_uses_default_log(self):
368
361
        tree = self.example_branch('source')
369
362
        target = self.make_branch_and_tree('target')
370
 
        target.branch.get_config_stack().set('log_format', 'short')
 
363
        target_config = target.branch.get_config_stack()
 
364
        target_config.set('log_format', 'short')
371
365
        out = self.run_bzr('pull -v source -d target')[0]
372
366
        self.assertContainsRe(out, r'\n {4}1 .*\n {6}setup\n')
373
367
        self.assertNotContainsRe(