/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/branch.py

  • Committer: Andrew Bennetts
  • Date: 2009-05-01 07:59:02 UTC
  • mfrom: (4319 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4320.
  • Revision ID: andrew.bennetts@canonical.com-20090501075902-evil2r4edle6qx4d
Merge from bzr.dev, resolving a conflict.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1397
1397
        control_files = lockable_files.LockableFiles(branch_transport,
1398
1398
            lock_name, lock_class)
1399
1399
        control_files.create_lock()
1400
 
        control_files.lock_write()
 
1400
        try:
 
1401
            control_files.lock_write()
 
1402
        except errors.LockContention:
 
1403
            if lock_type != 'branch4':
 
1404
                raise
 
1405
            lock_taken = False
 
1406
        else:
 
1407
            lock_taken = True
1401
1408
        if set_format:
1402
1409
            utf8_files += [('format', self.get_format_string())]
1403
1410
        try:
1406
1413
                    filename, content,
1407
1414
                    mode=a_bzrdir._get_file_mode())
1408
1415
        finally:
1409
 
            control_files.unlock()
 
1416
            if lock_taken:
 
1417
                control_files.unlock()
1410
1418
        return self.open(a_bzrdir, _found=True)
1411
1419
 
1412
1420
    def initialize(self, a_bzrdir):