/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 bzrlib/tests/blackbox/test_pull.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:
242
242
        parent = branch_b.get_parent()
243
243
        branch_b = branch.Branch.open('branch_b')
244
244
        branch_b.lock_write()
245
 
        branch_b.set_parent(None)
246
 
        branch_b.unlock()
 
245
        try:
 
246
            branch_b.set_parent(None)
 
247
        finally:
 
248
            branch_b.unlock()
247
249
        self.assertEqual(None, branch_b.get_parent())
248
250
        # test pull for failure without parent set
249
251
        out = self.run_bzr('pull', retcode=3, working_dir='branch_b')
266
268
        uncommit.uncommit(branch=branch_b, tree=tree_b)
267
269
        t.delete('branch_b/d')
268
270
        self.run_bzr('pull', working_dir='branch_b')
 
271
        # Refresh the branch object as 'pull' modified it
269
272
        branch_b = branch_b.bzrdir.open_branch()
270
273
        self.assertEqual(branch_b.get_parent(), parent)
271
274
        # test explicit --remember
272
275
        self.run_bzr('pull ../branch_c --remember', working_dir='branch_b')
 
276
        # Refresh the branch object as 'pull' modified it
273
277
        branch_b = branch_b.bzrdir.open_branch()
274
278
        self.assertEqual(branch_c.bzrdir.root_transport.base,
275
279
                         branch_b.get_parent())