~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Vincent Ladeuil
  • Date: 2012-01-09 20:55:07 UTC
  • mto: This revision was merged to the branch mainline in revision 6468.
  • Revision ID: v.ladeuil+lp@free.fr-20120109205507-2i3en5r4w4ohdchj
Use idioms coherently and add comments to make their purpose clearer.

Show diffs side-by-side

added added

removed removed

Lines of Context:
250
250
                                % (self.get_url('b1'),))
251
251
        self.assertContainsRe(out, '^.*/b2/ is now stacked on ../b1\n$')
252
252
        self.assertEquals('', err)
253
 
        b2 = bzrdir.BzrDir.open('b2').open_branch()
 
253
        # Refresh the branch as 'reconfigure' modified it
 
254
        branch_2 = branch_2.bzrdir.open_branch()
254
255
        # It should be given a relative URL to the destination, if possible,
255
256
        # because that's most likely to work across different transports
256
 
        self.assertEquals('../b1', b2.get_stacked_on_url())
 
257
        self.assertEquals('../b1', branch_2.get_stacked_on_url())
257
258
        # commit, and it should be stored into b2's repo
258
259
        self.build_tree_contents([('foo', 'new foo')])
259
260
        tree_2.commit('update foo')
262
263
        self.assertContainsRe(out,
263
264
            '^.*/b2/ is now not stacked\n$')
264
265
        self.assertEquals('', err)
265
 
        b2 = bzrdir.BzrDir.open('b2').open_branch()
266
 
        self.assertRaises(errors.NotStacked, b2.get_stacked_on_url)
 
266
        # Refresh the branch as 'reconfigure' modified it
 
267
        branch_2 = branch_2.bzrdir.open_branch()
 
268
        self.assertRaises(errors.NotStacked, branch_2.get_stacked_on_url)
267
269
 
268
270
    # XXX: Needs a test for reconfiguring stacking and shape at the same time;
269
271
    # no branch at location; stacked-on is not a branch; quiet mode.