/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: Robert Collins
  • Date: 2006-03-07 12:39:38 UTC
  • mfrom: (1594 +trunk)
  • mto: (1594.2.4 integration)
  • mto: This revision was merged to the branch mainline in revision 1596.
  • Revision ID: robertc@robertcollins.net-20060307123938-f75ff66ebcc0c4d0
Merge in bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
                           NoWorkingTree)
48
48
import bzrlib.inventory as inventory
49
49
from bzrlib.inventory import Inventory
50
 
from bzrlib.lockable_files import LockableFiles
 
50
from bzrlib.lockable_files import LockableFiles, TransportLock
51
51
from bzrlib.osutils import (isdir, quotefn,
52
52
                            rename, splitpath, sha_file,
53
53
                            file_kind, abspath, normpath, pathjoin,
619
619
        utf8_files = [('revision-history', ''),
620
620
                      ('branch-name', ''),
621
621
                      ]
622
 
        control_files = LockableFiles(branch_transport, 'branch-lock')
 
622
        control_files = LockableFiles(branch_transport, 'branch-lock',
 
623
                                      TransportLock)
 
624
        control_files.create_lock()
623
625
        control_files.lock_write()
624
626
        try:
625
627
            for file, content in utf8_files:
669
671
        utf8_files = [('revision-history', ''),
670
672
                      ('branch-name', ''),
671
673
                      ]
672
 
        lock_file = 'lock'
673
 
        branch_transport.put(lock_file, StringIO()) # TODO get the file mode from the bzrdir lock files., mode=file_mode)
674
 
        control_files = LockableFiles(branch_transport, 'lock')
 
674
        control_files = LockableFiles(branch_transport, 'lock', TransportLock)
 
675
        control_files.create_lock()
675
676
        control_files.lock_write()
676
677
        control_files.put_utf8('format', self.get_format_string())
677
678
        try:
695
696
            format = BranchFormat.find_format(a_bzrdir)
696
697
            assert format.__class__ == self.__class__
697
698
        transport = a_bzrdir.get_branch_transport(None)
698
 
        control_files = LockableFiles(transport, 'lock')
 
699
        control_files = LockableFiles(transport, 'lock', TransportLock)
699
700
        return BzrBranch5(_format=self,
700
701
                          _control_files=control_files,
701
702
                          a_bzrdir=a_bzrdir,