Rev 2966: (robertc) Fix export to lock the repository. (Robert Collins) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Mon Nov 5 20:16:08 GMT 2007


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 2966
revision-id: pqm at pqm.ubuntu.com-20071105201604-gjsoryzr7dcx7r65
parent: pqm at pqm.ubuntu.com-20071105143350-4ci30x2493vaeb3q
parent: robertc at robertcollins.net-20071028173025-pk3c1b0kmr5x6l31
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2007-11-05 20:16:04 +0000
message:
  (robertc) Fix export to lock the repository. (Robert Collins)
modified:
  bzrlib/export/__init__.py      __init__.py-20051114235828-1ba62cb4062304e6
    ------------------------------------------------------------
    revno: 2947.2.1
    merged: robertc at robertcollins.net-20071028173025-pk3c1b0kmr5x6l31
    parent: pqm at pqm.ubuntu.com-20071028093324-h4ymz42l31vwfbu1
    committer: Robert Collins <robertc at robertcollins.net>
    branch nick: export
    timestamp: Mon 2007-10-29 04:30:25 +1100
    message:
      (robertc) Fix export to lock the repository. (Robert Collins)
=== modified file 'bzrlib/export/__init__.py'
--- a/bzrlib/export/__init__.py	2006-09-20 23:43:18 +0000
+++ b/bzrlib/export/__init__.py	2007-10-28 17:30:25 +0000
@@ -92,7 +92,11 @@
 
     if format not in _exporters:
         raise errors.NoSuchExportFormat(format)
-    return _exporters[format](tree, dest, root)
+    tree.lock_read()
+    try:
+        return _exporters[format](tree, dest, root)
+    finally:
+        tree.unlock()
 
 
 def get_root_name(dest):




More information about the bazaar-commits mailing list