/****************************************************************************** Copyright (c) 2004, Perforce Software, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL PERFORCE SOFTWARE, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *******************************************************************************/ /****************************************************************************** * TMHelpUser.cpp - description * ------------------- * begin : 2005/05/26 * copyright : (C) 2005 by Harald K. Strack * copyright : (C) 2005 by Trymedia Inc. * email : hstrack@trymedia.com, strack@fhm.edu ****************************************************************************** * changes name date comment */ /* TMHelpUser: Trymedia Client User. * * The code for Message() has been taken and adapted from Tony Smith's project: * * http://public.perforce.com:8080/guest/tony_smith/perforce/p4u/main/?ac=83 * * Thanks to him, I did not need to fiddle around with this stuff. * * * This user hooks the Message() call to get the versioned paths of all reverted * files. * * */ #include "TMHelpUser.h" #include "_build.h" TMHelpUser::TMHelpUser ():TMClientUser () { } /* Set the appropriate handler */ TMHelpUser::TMHelpUser (ClientApi * a):TMClientUser (a) { } /* Delete the handler and start operations */ TMHelpUser::~TMHelpUser () { } void TMHelpUser::Message (Error * err) { // Ensure default behaviour happens if (!err->IsInfo ()) { skippedLast = 1; TMClientUser::Message (err); return; } else { //TMClientUser::Message( err ); } StrBuf m; err->Fmt (&m, EF_PLAIN); StrBuf result; StrBuf replace; StrBuf replaceWith; /* Replace p4 with ap4 and add Trymedia node - if you want it */ /*replace.Set( "p4 " ); replaceWith.Set ( "ap4 " ); StrOps::Replace (result, m, replace, replaceWith); result << "\n\tTRYMEDIA Unix Perforce client (c)\n"; */ m << "\n\tTRYMEDIA Unix Perforce client (c)\n"; m << "\t" << R_BUILD_MAJOR << "." << R_BUILD_MINOR << "." << R_BUILD_NUMBER << "." << R_BUILD_CHANGE << " [" << R_BUILD_TIME << "] " << R_BUILD_VERSION << "\n"; cout << m.Text () << endl; cout << "\t(Perforce API " << ID_REL << "/" << ID_PATCH << ")\n"; }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#3 | 5056 | harald_strack |
Directory support. Serious bug concerned to not unzipped binaries removed. Some other small bugfixes. |
||
#2 | 4980 | harald_strack |
Since I am maintaining the stuff in a local repository, I did some copy errors in the last revisions. Fixed. |
||
#1 | 4979 | harald_strack | Help output hooked. |