[p4python] API Changes in 2005.2

Robert Cowham robert at vaccaperna.co.uk
Fri Jan 6 07:06:23 PST 2006


Will have a poke around and see what has changed.

Meanwhile don't forget that for fetch_client/save_client to work you need to
call p4.parse_forms() before the connect...

> -----Original Message-----
> From: p4python-bounces at perforce.com 
> [mailto:p4python-bounces at perforce.com] On Behalf Of 
> sjm.19898948 at bloglines.com
> Sent: 06 January 2006 13:21
> To: p4python at perforce.com
> Subject: [p4python] API Changes in 2005.2
> 
> Turned out the problems I was having in my MacOS build were 
> actually problems due to the changes in the API in 2005.2.
> 
> The release notes say that many
> commands now feature tagged output so some code I had to 
> parse the textual output of, eg "p4 have", needed changing 
> and then they work OK.
> 
> However
> I still can't create a new client through the new API. The 
> code that works with 2005.1 is basically
> 
> p = p4.P4()
> p.client = newclientname
> p.connect()
> 
> spec = p.fetch_client()
> ... update spec ...
> p.save_client(spec)
> 
> However
> this doesn't work on 2005.2, it says that the Client 
> attribute is missing.
> If I print the spec before I save it though I can see it is there.
> 
> So for
> now I'm using the feature that allows you to talk the 2005.1 
> protocol even when using 2005.2 API and server which is:
> 
> p = p4.P4()
> p.p4c.SetProtocol("api","57")
> 
> 
> If anyone knows what's going wrong then that would be nice.
> 
> Cheers,
> 
> 
> -- Simon Middleton
> ANT Software Limited





More information about the p4python mailing list