remove self.repository in favour of self.branch.repository
authorNeil <neil@dip.sun.ac.za>
Sat, 17 Nov 2012 15:26:22 +0000 (17:26 +0200)
committerNeil <neil@dip.sun.ac.za>
Sat, 17 Nov 2012 15:26:22 +0000 (17:26 +0200)
irkerhook.py

index d58b194ef6290f8a9375017f0567d7675971263c..4eecd2144eb2bdfa40567757112dd3e46db1a602 100644 (file)
@@ -15,13 +15,12 @@ class IrkerSender(object):
     def __init__(self, branch, revision_id, config):
         self.config = config
         self.branch = branch
-        self.repository = branch.repository
         self._revision_id = revision_id
         self.revision = None
         self.revno = None
 
     def _setup_revision_and_revno(self):
-        self.revision = self.repository.get_revision(self._revision_id)
+        self.revision = self.branch.repository.get_revision(self._revision_id)
         self.revno = self.branch.revision_id_to_revno(self._revision_id)
 
     def _format(self):
@@ -99,7 +98,7 @@ class IrkerSender(object):
         """Send the info to irkerd.
         """
         self.branch.lock_read()
-        self.repository.lock_read()
+        self.branch.repository.lock_read()
         # These should become configurable at some point
         default_server = 'localhost'
         IRKER_PORT = 6659
@@ -125,7 +124,7 @@ class IrkerSender(object):
                 finally:
                     sock.close()
         finally:
-            self.repository.unlock()
+            self.branch.repository.unlock()
             self.branch.unlock()
 
 opt_irker_channels = Option('irker_channels',