##// END OF EJS Templates
unmarshal p4 -G output to list
vivainio -
Show More
@@ -12,7 +12,15 b' import ipy_stock_completers'
12
12
13 def p4_f(self, parameter_s=''):
13 def p4_f(self, parameter_s=''):
14 cmd = 'p4 -G ' + parameter_s
14 cmd = 'p4 -G ' + parameter_s
15 return marshal.load(os.popen(cmd))
15 fobj = os.popen(cmd)
16 out = []
17 while 1:
18 try:
19 out.append(marshal.load(fobj))
20 except EOFError:
21 break
22
23 return out
16
24
17 ip.expose_magic('p4', p4_f)
25 ip.expose_magic('p4', p4_f)
18
26
@@ -30,5 +38,5 b' def p4_completer(self,event):'
30 return ipy_stock_completers.vcs_completer(p4_commands, event)
38 return ipy_stock_completers.vcs_completer(p4_commands, event)
31
39
32 ip.set_hook('complete_command', p4_completer, str_key = '%p4')
40 ip.set_hook('complete_command', p4_completer, str_key = '%p4')
33
41 ip.set_hook('complete_command', p4_completer, str_key = 'p4')
34
42
General Comments 0
You need to be logged in to leave comments. Login now