~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/export/__init__.py

  • Committer: Robert Collins
  • Date: 2007-10-28 17:30:25 UTC
  • mto: (2592.6.9 repository)
  • mto: This revision was merged to the branch mainline in revision 2966.
  • Revision ID: robertc@robertcollins.net-20071028173025-pk3c1b0kmr5x6l31
(robertc) Fix export to lock the repository. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
92
92
 
93
93
    if format not in _exporters:
94
94
        raise errors.NoSuchExportFormat(format)
95
 
    return _exporters[format](tree, dest, root)
 
95
    tree.lock_read()
 
96
    try:
 
97
        return _exporters[format](tree, dest, root)
 
98
    finally:
 
99
        tree.unlock()
96
100
 
97
101
 
98
102
def get_root_name(dest):