//------------------------------------------------------------------------ // Copyright 2006 Kyle Turner. // // License is hereby granted to use this software and distribute it // freely, as long as this copyright notice is retained and modifications // are clearly marked. // // ALL WARRANTIES ARE HEREBY DISCLAIMED. // // $Id: //guest/kyle_turner/perforce/resolve/p4api.cpp#1 $ //------------------------------------------------------------------------ #include "p4api.h" #define NOT_USED(a) (void)(a) //------------------------------------------------------------------------ // Class: Session //------------------------------------------------------------------------ P4Session::P4Session () { } P4Session::~P4Session () { } bool P4Session::ConnectToServer () { StrBuf msg; Error err; ClientApi::Init (&err); if (err.Test ()) { err.Fmt (&msg); fprintf (stderr, "%s\n", msg.Text()); return false; } return true; } void P4Session::DisconnectFromServer () { Error err; ClientApi::Final (&err); NOT_USED (err); } void P4Session::Run (const char *cmd, int argc, char **argv, ClientUser *callbacks) { if (argc > 0) ClientApi::SetArgv (argc, argv); ClientApi::Run (cmd, callbacks); ClientApi::SetArgv (0, NULL); }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 5435 | Kyle Turner |
Initial version of "p4 resolve" extensions using C++ P4API. Extensions allow users to give more weight to the external merge program specified by the environment variable $P4MERGE. See README.txt for more information. |