Rev 187: Refactored PQMInfo. in http://bzr.daniel-watkins.co.uk/pqm/xmlrpc

Daniel Watkins daniel at daniel-watkins.co.uk
Thu Jul 31 06:59:22 BST 2008


At http://bzr.daniel-watkins.co.uk/pqm/xmlrpc

------------------------------------------------------------
revno: 187
revision-id: daniel at daniel-watkins.co.uk-20080731055747-op9g507dv9epc3fg
parent: daniel at daniel-watkins.co.uk-20080731052622-2d52xs5btmr1jgnz
committer: Daniel Watkins <daniel at daniel-watkins.co.uk>
branch nick: xmlrpc
timestamp: Thu 2008-07-31 06:57:47 +0100
message:
  Refactored PQMInfo.
-------------- next part --------------
=== modified file 'pqm/ui/twistd.py'
--- a/pqm/ui/twistd.py	2008-07-31 04:17:14 +0000
+++ b/pqm/ui/twistd.py	2008-07-31 05:57:47 +0000
@@ -158,14 +158,16 @@
     def __init__(self, filenames):
         self.filenames = filenames
         self.messages = []
+        self.configp = ConfigParser()
+        self.configp.read(self.filenames)
+        self.queuedir = pqm.get_queuedir(self.configp, logging, [])
 
     def refresh(self):
-        configp = ConfigParser()
-        configp.read(self.filenames)
-        handler = pqm.BranchSpecOptionHandler(configp)
-        queuedir = pqm.get_queuedir(configp, logging, [])
+        self.configp.read(self.filenames)
+        handler = pqm.BranchSpecOptionHandler(self.configp)
+        self.queuedir = pqm.get_queuedir(self.configp, logging, [])
         self.messages = pqm.find_patches(
-            queuedir, logging, handler, configp, FakeOptions())
+            self.queuedir, logging, handler, self.configp, FakeOptions())
         try:
             [message.getSender() for message in self.messages]
         except:



More information about the bazaar-commits mailing list