lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


A while back, someone provided me with P4Lua, obviously based on the same code P4Ruby, P4Perl, and P4Python come from. I upgraded it to the latest P4API and fixed a couple bugs, but I can't determine anymore where the code came from to submit the patches. If you are the author, contact me.

As an aside, since this doesn't appear to be available anywhere and the license allows me to do so, I'm making it publicly available from svn://svn.luaplus.org/LuaPlus/work51/Src/Modules/p4. There is a docs/ directory with full documentation.

It contains all the functionality in P4Ruby/P4Perl/P4Python with a few extra tidbits. For instance, there is a p4.keepalive function that lets you abort an in-progress Perforce command. There is also a p4.retrieve_gui_connections() function that analyzes the P4V settings and gives you back a list of the connections P4V has used. One of my favorites is the single table argument version of p4:run(); it allows specification of callbacks for OutputText, OutputWarning, and OutputError so you can give the user real-time feedback on the API operation. In P4Ruby/P4Perl/P4Python, the operation is silent and blocking until it is finished.

Josh