~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_info.py

  • Committer: Patch Queue Manager
  • Date: 2012-02-14 18:29:43 UTC
  • mfrom: (6404.6.11 cached-branch-store)
  • Revision ID: pqm@pqm.ubuntu.com-20120214182943-vso6j0mqdnxfkp7s
(vila) Cache the branch config store to avoid useless IOs. (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2007-2011 Canonical Ltd
 
1
# Copyright (C) 2007-2012 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
322
322
 
323
323
    def test_gather_related_braches(self):
324
324
        branch = self.make_branch('.')
325
 
        branch.set_public_branch('baz')
326
 
        branch.set_push_location('bar')
327
 
        branch.set_parent('foo')
328
 
        branch.set_submit_branch('qux')
 
325
        branch.lock_write()
 
326
        try:
 
327
            branch.set_public_branch('baz')
 
328
            branch.set_push_location('bar')
 
329
            branch.set_parent('foo')
 
330
            branch.set_submit_branch('qux')
 
331
        finally:
 
332
            branch.unlock()
329
333
        self.assertEqual(
330
334
            [('public branch', 'baz'), ('push branch', 'bar'),
331
335
             ('parent branch', 'foo'), ('submit branch', 'qux')],