~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.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:
602
602
            branch = Branch.open(to_location)
603
603
            if name:
604
604
                name = StringIO(name)
605
 
                branch.control_files.put_utf8('branch-name', name)
 
605
                branch.lock_write()
 
606
                try:
 
607
                    branch.control_files.put_utf8('branch-name', name)
 
608
                finally:
 
609
                    branch.unlock()
 
610
                    
606
611
            note('Branched %d revision(s).' % branch.revno())
607
612
        finally:
608
613
            br_from.unlock()