~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Aaron Bentley
  • Date: 2005-12-25 22:44:53 UTC
  • mto: (1185.67.11 bzr.revision-storage)
  • mto: This revision was merged to the branch mainline in revision 1550.
  • Revision ID: aaron.bentley@utoronto.ca-20051225224453-098a11d24b7edf84
Added write locks as appropriate

Show diffs side-by-side

added added

removed removed

Lines of Context:
558
558
        ]
559
559
        cfn = self.control_files._rel_controlfilename
560
560
        self.control_files._transport.mkdir_multi([cfn(d) for d in dirs])
561
 
        for file, content in files:
562
 
            self.control_files.put_utf8(file, content)
563
 
        mutter('created control directory in ' + self.base)
 
561
        self.control_files.lock_write()
 
562
        try:
 
563
            for file, content in files:
 
564
                self.control_files.put_utf8(file, content)
 
565
            mutter('created control directory in ' + self.base)
 
566
        finally:
 
567
            self.control_files.unlock()
564
568
 
565
569
    def _check_format(self, relax_version_check):
566
570
        """Check this branch format is supported.