[p4] Java interface to Perforce / P4API for Java
karish at well.com
Wed Oct 31 22:03:05 PST 2001
At 06:02 PM 10/31/2001 -0500, Chris Patti wrote:
>All of what you say is completely true and I hope you'll understand that I'm *NOT* arguing with any of it (In fact see my endorsement of your suggestion below :)
>However, doing the parsing by hand (even with -s, which is marginally useful at best.. It considers a sync with no files needing to be synced an error, whereas some REAL errors are marked info. Useless, or nearly so) is not only a drag but a recipe for disaster.
What you need to be able to script from a command line interface are consistency
and completeness. If you know the utility well enough to wrap it up you know how
to account for the times when its output is arcane.
>A better solution is needed. Perforce's inclusion of the undocumented -G option for Python scripters is proof positive that at least on some level they're aware of this.
It's not undocumented any more ...
>I agree that the C++ api approach is severely flawed as well for most normal scripting applications - if faced with a choice between that extremely complex, event driven API (Way, *WAY* too heavyweight for what script writers want) and the command line flawed though it may be for scripting purposes, I'll choose the command line any day of the week.
Chuck Karish karish at well.com (415) 317-0182
More information about the perforce-user