Table of Contents Preface About This Manual Please give us feedback Chapter 1 P4Ruby Introduction System Requirements Installing P4Ruby Programming with P4Ruby Connecting to SSL-enabled servers P4Ruby classes P4 P4Exception P4::DepotFile P4::Revision P4::Integration P4::Map P4::MergeData P4::Message P4::OutputHandler P4::Progress P4::Spec Class P4 Description Class Methods P4.identify -> aString P4.new -> aP4 Instance Methods p4.api_level= anInteger -> anInteger p4.api_level -> anInteger p4.at_exception_level( lev ) { ... } -> self p4.charset= aString -> aString p4.charset -> aString p4.client= aString -> aString p4.client -> aString p4.connect -> aBool p4.connected? -> aBool p4.cwd= aString -> aString p4.cwd -> aString p4.delete_<spectype>( [options], name ) -> anArray p4.disconnect -> true p4.each_spectype (arguments) -> anArray p4.env -> string p4.errors -> anArray p4.exception_level= anInteger -> anInteger p4.exception_level -> aNumber p4.fetch_<spectype>( [name] ) -> aP4::Spec p4.format_spec( <spectype>, aHash )-> aString p4.format_<spectype> aHash -> aHash p4.handler= aHandler -> aHandler p4.handler -> aHandler p4.host= aString -> aString p4.host -> aString p4.input= ( aString|aHash|anArray ) -> aString|aHash|anArray p4.maxlocktime= anInteger -> anInteger p4.maxlocktime -> anInteger p4.maxresults= anInteger -> anInteger p4.maxresults -> anInteger p4.maxscanrows= anInteger -> anInteger p4.maxscanrows -> anInteger p4.messages -> aP4::Message p4.p4config_file -> aString p4.parse_<spectype> ( aString ) -> aP4::Spec p4.parse_spec( <spectype>, aString ) -> aP4::Spec p4.password= aString -> aString p4.password -> aString p4.port= aString -> aString p4.port -> aString p4.prog= aString -> aString p4.prog -> aString p4.progress= aProgress -> aProgress p4.progress -> aProgress p4.run_cmd( arguments ) -> anArray p4.run( aCommand, arguments... ) -> anArray p4.run_filelog( fileSpec ) -> anArray p4.run_login( arg... ) -> anArray p4.run_password( oldpass, newpass ) -> anArray p4.run_resolve( args ) [ block ] -> anArray p4.run_submit( [aHash], [arg...] ) -> anArray p4.save_<spectype>( hashOrString, [options] ) -> anArray p4.server_case_sensitive? -> aBool p4.server_level -> anInteger p4.server_unicode? -> aBool p4.set_env= ( aString, aString ) -> aBool p4.streams= -> aBool p4.streams? -> aBool p4.tagged( aBool ) { block } p4.tagged= aBool -> aBool p4.tagged? -> aBool p4.ticketfile= aString -> aString p4.ticketfile -> aString p4.track= -> aBool p4.track? -> aBool p4.track_output -> anArray p4.user= aString -> aString p4.user -> aString p4.version= aString -> aString p4.version -> aString p4.warnings -> anArray Class P4Exception Class Methods Instance Methods Class P4::DepotFile Description Class Methods Instance Methods df.depot_file -> aString df.each_revision { |rev| block } -> revArray df.revisions -> aArray Class P4::Revision Description Class Methods Instance Methods rev.action -> aString rev.change -> aNumber rev.client -> aString rev.depot_file -> aString rev.desc -> aString rev.digest -> aString rev.each_integration { |integ| block } -> integArray rev.filesize -> aNumber rev.integrations -> integArray rev.rev -> aNumber rev.time -> aTime rev.type -> aString rev.user -> aString Class P4::Integration Description Class Methods Instance Methods integ.how -> aString integ.file -> aPath integ.srev -> aNumber integ.erev -> aNumber Class P4::Map Description Class Methods Map.new ( [ anArray ] ) -> aMap Map.join ( map1, map2 ) -> aMap Instance Methods map.clear -> true map.count -> anInteger map.empty? -> aBool map.insert( aString, [ aString ] ) -> aMap map.translate ( aString, [ aBool ] )-> aString map.includes? ( aString ) -> aBool map.reverse -> aMap map.lhs -> anArray map.rhs -> anArray map.to_a -> anArray Class P4::MergeData Description Class Methods Instance Methods md.your_name() -> aString md.their_name() -> aString md.base_name() -> aString md.your_path() -> aString md.their_path() -> aString md.base_path() -> aString md.result_path() -> aString md.merge_hint() -> aString md.run_merge() -> aBool Class P4::Message Description Class methods Instance methods message.severity() -> anInteger message.generic() -> anInteger message.msgid() -> anInteger message.to_s() -> aString message.inspect() -> aString Class P4::OutputHandler Description Class Methods new P4::MyHandler.new -> aP4::OutputHandler Instance Methods outputBinary -> int outputInfo -> int outputMessage -> int outputStat -> int outputText -> int Class P4::Progress Description Class Methods new P4::MyProgress.new -> aP4::Progress Instance Methods init -> int description -> int update -> int total -> int done -> int Class P4::Spec Description Class Methods new P4::Spec.new( anArray ) -> aP4::Spec Instance Methods spec._<fieldname> -> aValue spec._<fieldname>= aValue -> aValue spec.permitted_fields -> anArray Chapter 2 P4Perl Introduction System Requirements Installing P4Perl Programming with P4Perl Connecting to Perforce over SSL P4Perl Classes P4 P4::DepotFile P4::Revision P4::Integration P4::Map P4::MergeData P4::Message P4::OutputHandler P4::Progress P4::Resolver P4::Spec Class P4 Description Base methods P4::new() -> P4 P4::Identify() -> string P4::ClearHandler() -> undef P4::Connect() -> bool P4::Disconnect() -> undef P4::ErrorCount() -> integer P4::Errors() -> list P4::Fetch<spectype>( [name] ) -> hashref P4::Format<spectype>( hash ) -> string P4::FormatSpec( $spectype, $string ) -> string P4::GetApiLevel() -> integer P4::GetCharset() -> string P4::GetClient() -> string P4::GetCwd() -> string P4::GetEnv( $var ) -> string P4::GetHandler() -> Handler P4::GetHost() -> string P4::GetMaxLockTime( $value ) -> integer P4::GetMaxResults( $value ) -> integer P4::GetMaxScanRows( $value ) -> integer P4::GetPassword() -> string P4::GetPort() -> string P4::GetProg() -> string P4::GetProgress() -> Progress P4::GetTicketFile( [$string] ) -> string P4::GetUser() -> String P4::GetVersion ( $string ) -> string P4::IsConnected() -> bool P4::IsStreams() -> bool P4::IsTagged() -> bool P4::IsTrack() -> bool P4::Iterate<Spectype> (arguments) -> object P4::Messages() -> list P4::P4ConfigFile() -> string P4::Parse<Spectype>( $string ) -> hashref P4::ParseSpec( $spectype, $string ) -> hashref P4::Run<cmd>( [ $arg... ] ) -> list | arrayref P4::Run( cmd, [ $arg... ] ) -> list | arrayref P4::RunFilelog ( [$args ...], $fileSpec ... ) -> list | arrayref P4::RunLogin (...) -> list | arrayref P4::RunPassword ( $oldpass, $newpass ) -> list | arrayref P4::RunResolve ( [$resolver], [$args ...] ) -> string P4::RunSubmit ( $arg | $hashref, ...) -> list | arrayref P4::RunTickets() -> list P4::Save<Spectype>() -> list | arrayref P4::ServerCaseSensitive() -> integer P4::ServerLevel() -> integer P4::ServerUnicode() -> integer P4::SetApiLevel( $integer ) -> undef P4::SetCharset( $charset ) -> undef P4::SetClient( $client ) -> undef P4::SetCwd( $path ) -> undef P4::SetEnv( $var, $value ) -> undef P4::SetHandler( Handler ) -> Handler P4::SetHost( $hostname ) -> undef P4::SetInput( $string | $hashref | $arrayref ) -> undef P4::SetMaxLockTime( $integer ) -> undef P4::SetMaxResults( $integer ) -> undef P4::SetMaxScanRows( $integer ) -> undef P4::SetPassword( $password ) -> undef P4::SetPort( $port ) -> undef P4::SetProg( $program_name ) -> undef P4::SetProgress( Progress ) -> Progress P4::SetStreams( 0 | 1 ) -> undef P4::SetTicketFile( [$string] ) -> string P4::SetTrack( 0 | 1 ) -> undef P4::SetUser( $username ) -> undef P4::SetVersion ( $version ) -> undef P4::Tagged( 0 | 1 | $coderef ) -> undef P4::TrackOutput() -> list P4::WarningCount() -> integer P4::Warnings() -> list Class P4::DepotFile Description Class Methods Instance Methods $df->DepotFile() -> string $df->Revisions() -> array Class P4::Revision Description Class Methods $rev->Integrations() -> array Instance Methods $rev->Action() -> string $rev->Change() -> integer $rev->Client() -> string $rev->DepotFile() -> string $rev->Desc() -> string $rev->Digest() -> string $rev->FileSize() -> string $rev->Rev() -> integer $rev->Time() -> string $rev->Type() -> string $rev->User() -> string Class P4::Integration Description Class Methods Instance Methods $integ->How() -> string $integ->File() -> string $integ->SRev() -> integer $integ->ERev() -> integer Class P4::Map Description Class Methods $map = new P4::Map( [ array ] ) -> aMap $map->Join( map1, map2 ) -> aMap Instance Methods $map->Clear() -> undef $map->Count() -> integer $map->IsEmpty() -> bool $map->Insert( string ... ) -> undef $map->Translate( string, [ bool ] ) -> string $map->Includes( string ) -> bool $map->Reverse() -> aMap $map->Lhs() -> array $map->Rhs() -> array $map->AsArray() -> array Class P4::MergeData Description Class Methods Instance Methods $md.YourName() -> string $md.TheirName() -> string $md.BaseName() -> string $md.YourPath() -> string $md.TheirPath() -> string $md.BasePath() -> string $md.ResultPath() -> string $md.MergeHint() -> string $md.RunMergeTool() -> integer Class P4::Message Description Class methods Instance methods $message.GetSeverity() -> int $message.GetGeneric() -> int $message.GetId() -> int $message.GetText() -> int Class P4::OutputHandler Description Class Methods Instance Methods $handler.OutputBinary() -> int $handler.OutputInfo() -> int $handler.OutputMessage() -> int $handler.OutputStat()-> int $handler.OutputText() -> int Class P4::Progress Description Class Methods Instance Methods $progress.Init() -> int $progress.Description( string, int ) -> int $progress.Update() -> int $progress.Total()-> int $progress.Done() -> int Class P4::Resolver Description Class Methods Instance Methods $resolver.Resolve() -> string Class P4::Spec Description Class Methods $spec = new P4::Spec( $fieldMap ) -> array Instance Methods $spec->_<fieldname> -> string $spec->_<fieldname>( $string )-> string $spec->PermittedFields() -> array Chapter 3 P4Python Introduction System Requirements Installing P4Python Programming with P4Python Submitting a Changelist Logging into Perforce using ticket-based authentication Connecting to Perforce over SSL Changing your password Timestamp conversion Working with comments in specs P4Python Classes P4 P4.P4Exception P4.DepotFile P4.Revision P4.Integration P4.Map P4.MergeData P4.Message P4.OutputHandler P4.Progress P4.Resolver P4.Spec Class P4 Description Instance Attributes p4.api_level -> int p4.charset -> string p4.client -> string p4.cwd -> string p4.encoding -> string p4.errors -> list (read-only) p4.exception_level -> int p4.handler -> handler p4.host -> string p4.input -> string | dict | list p4.iterate_spectype (arguments) -> P4.Spec p4.maxlocktime -> int p4.maxresults -> int p4.maxscanrows -> int p4.messages -> list (read-only) p4.p4config_file -> string (read-only) p4.password -> string p4.port -> string p4.prog -> string p4.progress -> progress p4.server_case_insensitive -> boolean p4.server_level -> int (read-only) p4.server_unicode -> boolean p4.streams -> int p4.tagged -> int p4.ticket_file -> string p4.track -> boolean p4.track_output -> list (read-only) p4.user -> string p4.version -> string p4.warnings -> list (read-only) Class Methods P4.P4() P4.identify() Instance Methods p4.at_exception_level() p4.connect() p4.connected() -> boolean p4.delete_<spectype>( [ options ], name ) -> list p4.disconnect() p4.env( var ) p4.fetch_<spectype>() -> P4.Spec p4.format_spec( <spectype>, dict ) -> string p4.format_<spectype>( dict ) -> string p4.parse_spec( <spectype>, string ) -> P4.Spec p4.parse_<spectype>( string ) -> P4.Spec p4.run(cmd, [arg, ...]) p4.run_<cmd>() p4.run_filelog(<fileSpec >) -> list p4.run_login( arg... ) -> list p4.run_password( oldpass, newpass ) -> list p4.run_resolve( [resolver], [arg...] ) -> list p4.run_submit( [ hash ], [ arg... ] ) -> list p4.run_tickets( ) -> list p4.save_<spectype>()> p4.set_env( var, value ) p4.while_tagged( boolean ) Class P4.P4Exception Description Class Attributes Class Methods Class P4.DepotFile Description Instance Attributes df.depotFile -> string df.revisions -> list Class Methods Instance Methods Class P4.Revision Description Instance Attributes rev.action -> string rev.change -> int rev.client -> string rev.depotFile -> string rev.desc -> string rev.digest -> string rev.fileSize -> string rev.integrations -> list rev.rev -> int rev.time -> datetime rev.type -> string rev.user -> string Class Methods Instance Methods Class P4.Integration Description Instance Attributes integ.how -> string integ.file -> string integ.srev -> int integ.erev -> int Class Methods Instance Methods Class P4.Map Description Instance Attributes Class Methods P4.Map( [ list ] ) -> P4.Map P4.Map.join ( map1, map2 ) -> P4.Map Instance Methods map.clear() map.count() -> int map.is_empty() -> boolean map.insert( string ... ) map.translate ( string, [ boolean ] )-> string map.includes( string ) -> boolean map.reverse() -> P4.Map map.lhs() -> list map.rhs() -> list map.as_array() -> list Class P4.MergeData Description Instance Attributes md.your_name -> string md.their_name -> string md.base_name -> string md.your_path -> string md.their_path -> string md.base_path -> string md.result_path -> string md.merge_hint -> string Instance Methods md.run_merge() -> boolean Class P4.Message Description Class Methods Instance Attributes message.severity -> int message.generic -> int message.msgid -> int message.str -> string message.repr -> string Class P4.OutputHandler Description Class Methods class MyHandler( P4.OutputHandler ) Instance Methods outputBinary -> int outputInfo -> int outputMessage -> int outputStat -> int outputText -> int Class P4.Progress Description Instance Attributes Class Methods class MyProgress( P4.Progress ) Instance Methods progress.init() -> int progress.description( string, int ) -> int progress.update() -> int progress.total() -> int progress.done() -> int Class P4.Resolver Description Instance Attributes Class Methods Instance Methods resolver.resolve(self, mergeData) -> string Class P4.Spec Description Instance Attributes spec._<fieldname> -> string spec.comment -> dict spec.permitted_fields -> dict Class Methods P4.Spec.new( dict ) ->P4.Spec Instance Methods Chapter 4 P4PHP Introduction System Requirements Installing P4PHP Programming with P4PHP Submitting a Changelist Logging into Perforce using ticket-based authentication Connecting to Perforce over SSL Changing your password P4PHP Classes P4 P4_Exception P4_DepotFile P4_Revision P4_Integration P4_Map P4_MergeData P4_OutputHandlerAbstract P4_Resolver Class P4 Description Properties P4::api_level -> int P4::charset -> string P4::client -> string P4::cwd -> string P4::errors -> array (read-only) P4::exception_level -> int P4::expand_sequences -> bool P4::handler -> handler P4::host -> string P4::input -> string | array P4::maxlocktime -> int P4::maxresults -> int P4::maxscanrows -> int P4::p4config_file -> string (read-only) P4::password -> string P4::port -> string P4::prog -> string P4::server_level -> int (read-only) P4::streams -> bool P4::tagged -> bool P4::ticket_file -> string P4::user -> string P4::version -> string P4::warnings -> array (read-only) Constructor P4::__construct Static Methods P4::identify() -> string Instance Methods P4::connect() -> bool P4::connected() -> bool P4::delete_<spectype>( [ options ], name ) -> array P4::disconnect() -> void P4::env( var ) -> string P4::fetch_<spectype>() -> array P4::format_spec( <spectype>, array ) -> string P4::format_<spectype>( array ) -> string P4::parse_spec( <spectype>, string ) -> array P4::parse_<spectype>( string ) -> array P4::run(cmd, [arg, ...]) -> mixed P4::run_<cmd>() -> mixed P4::run_filelog(<fileSpec >) -> array P4::run_login( arg... ) -> array P4::run_password( oldpass, newpass ) -> array P4::run_resolve( [resolver], [arg...] ) -> array P4::run_submit( [ array ], [ arg... ] ) -> array P4::save_<spectype>()> Class P4_Exception Description Class Attributes Static Methods Class P4_DepotFile Description Properties $df->depotFile -> string $df->revisions -> array Static Methods Instance Methods Class P4_Revision Description Properties $rev->action -> string $rev->change -> long $rev->client -> string $rev->depotFile -> string $rev->desc -> string $rev->digest -> string $rev->fileSize -> long $rev->integrations -> array $rev->rev -> long $rev->time -> string $rev->type -> string $rev->user -> string Static Methods Instance Methods Class P4_Integration Description Properties $integ->how -> string $integ->file -> string $integ->srev -> int $integ->erev -> int Static Methods Instance Methods Class P4_Map Description Properties Constructor P4_Map::__construct( [ array ] ) -> P4_Map Static Methods P4_Map::join ( map1, map2 ) -> P4_Map Instance Methods $map->clear() -> void $map->count() -> int $map->is_empty() -> bool $map->insert( string ... ) -> void $map->translate ( string, [ bool ] )-> string $map->includes( string ) -> bool $map->reverse() -> P4_Map $map->lhs() -> array $map->rhs() -> array $map->as_array() -> array Class P4_MergeData Description Properties $md->your_name -> string $md->their_name -> string $md->base_name -> string $md->your_path -> string $md->their_path -> string $md->base_path -> string $md->result_path -> string $md->merge_hint -> string Class P4_OutputHandlerAbstract Description Class Methods class MyHandler extends P4_OutputHandlerAbstract Instance Methods $handler->outputBinary -> int $handler->outputInfo -> int $handler->outputMessage -> int $handler->outputStat -> int $handler->outputText -> int Class P4_Resolver Description Properties Static Methods Instance Methods $resolver->resolve(self, mergeData) -> string