~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_branch/test_locking.py

  • Committer: Jelmer Vernooij
  • Date: 2012-02-20 12:19:29 UTC
  • mfrom: (6437.23.11 2.5)
  • mto: (6581.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 6582.
  • Revision ID: jelmer@samba.org-20120220121929-7ni2psvjoatm1yp4
Merge bzr/2.5.

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
        self.locks = []
43
43
        b = lock_helpers.LockWrapper(self.locks, self.get_branch(), 'b')
44
44
        b.repository = lock_helpers.LockWrapper(self.locks, b.repository, 'r')
45
 
        bcf = b.control_files
 
45
        bcf = getattr(b, "control_files", None)
46
46
        rcf = getattr(b.repository, 'control_files', None)
47
47
        if rcf is None:
48
48
            self.combined_branch = False
49
49
        else:
50
50
            # Look out for branch types that reuse their control files
51
 
            self.combined_control = bcf is rcf
 
51
            self.combined_control = bcf is rcf and bcf is not None
52
52
        try:
53
53
            b.control_files = lock_helpers.LockWrapper(
54
54
                self.locks, b.control_files, 'bc')