PERFORCE change 123876 for review
Andrew Turner
andrew at FreeBSD.org
Sun Jul 22 03:22:33 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=123876
Change 123876 by andrew at andrew_hermies on 2007/07/22 03:22:29
Support list_installed in the front end
Remove the Downloaded item from the tree view as it is unused
Affected files ...
.. //depot/projects/soc2007/andrew-update/frontend/facund/computer.py#5 edit
Differences ...
==== //depot/projects/soc2007/andrew-update/frontend/facund/computer.py#5 (text+ko) ====
@@ -51,7 +51,7 @@
self.__dirs = []
self.__connected = False
self.__connection = None
- self.__commands = ['Avaliable', 'Downloaded', 'Installed']
+ self.__commands = ['Avaliable', 'Installed']
def __str__(self):
return self.__name + ": " + self.__host
@@ -83,6 +83,8 @@
print self.__commands[command]
if self.__commands[command] == 'Avaliable':
return self.getUpdateList(dir)
+ elif self.__commands[command] == 'Installed':
+ return self.getInstalledList(dir)
else:
print 'TODO: Handle this command (%d)' % (command,);
@@ -102,6 +104,22 @@
call.releaseLock()
return call.getResponse()
+ def getInstalledList(self, dir = None):
+ if dir is None:
+ for dir in self.__dirs:
+ args = None
+ else:
+ args = facund.Array()
+ args.append(facund.String("base"))
+ args.append(facund.String(dir))
+
+ call = facund.Call("list_installed", args)
+ self.__connection.doCall(call)
+ # Wait for the response
+ call.acquireLock()
+ call.releaseLock()
+ return call.getResponse()
+
def connect(self):
'''Connects to the remote computer'''
if self.__connection is not None:
More information about the p4-projects
mailing list