[Pkg-bazaar-commits] ./bzr/unstable r613: - fix locking for RemoteBranch

Martin Pool mbp at sourcefrog.net
Fri Apr 10 08:20:18 UTC 2009


------------------------------------------------------------
revno: 613
committer: Martin Pool <mbp at sourcefrog.net>
timestamp: Wed 2005-06-01 13:16:18 +1000
message:
  - fix locking for RemoteBranch
  - add RemoteBranch.revision_store
modified:
  bzrlib/remotebranch.py
-------------- next part --------------
=== modified file 'bzrlib/remotebranch.py'
--- a/bzrlib/remotebranch.py	2005-05-30 02:02:46 +0000
+++ b/bzrlib/remotebranch.py	2005-06-01 03:16:18 +0000
@@ -109,6 +109,7 @@
 
         self.inventory_store = RemoteStore(baseurl + '/.bzr/inventory-store/')
         self.text_store = RemoteStore(baseurl + '/.bzr/text-store/')
+        self.revision_store = RemoteStore(baseurl + '/.bzr/revision-store/')
 
     def __str__(self):
         b = getattr(self, 'baseurl', 'undefined')
@@ -122,9 +123,14 @@
         return get_url(self.baseurl + '/.bzr/' + filename, False)
 
 
-    def lock(self, mode):
-        if mode != 'r':
-            raise BzrError('lock mode %r not supported for remote branch %r' % (mode, self))
+    def lock_read(self):
+        # no locking for remote branches yet
+        pass
+
+    def lock_write(self):
+        from errors import LockError
+        raise LockError("write lock not supported for remote branch %s"
+                        % self.baseurl)
 
     def unlock(self):
         pass



More information about the Pkg-bazaar-commits mailing list