~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/export/__init__.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-11-05 20:16:04 UTC
  • mfrom: (2947.2.1 export)
  • Revision ID: pqm@pqm.ubuntu.com-20071105201604-gjsoryzr7dcx7r65
(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):