/****************************************************************************** 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. *******************************************************************************/ /****************************************************************************** * TMSubmitUser.cpp - description * ------------------- * begin : 2005/04/20 * copyright : (C) 2005 by Harald K. Strack * copyright : (C) 2005 by Trymedia Inc. * email : hstrack@trymedia.com ****************************************************************************** * changes name date comment */ /* TMSubmitUser: 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 changelist number * of a submit operation. * * */ #include "TMSubmitUser.h" TMSubmitUser::TMSubmitUser() : TMClientUser() { } /* Set the appropriate handler */ TMSubmitUser::TMSubmitUser(ClientApi * a) : TMClientUser (a) { SetTMBO( SUBMIT_HANDLER ); } /* Delete the handler and start operations */ TMSubmitUser::~TMSubmitUser() { delete tmbo; } // // The message that's sent from the server to announce successful // commit of a change static StrRef commitMsg1( "%change% submitted." ); static StrRef commitMsg2( "%change% renamed %newChange% and submitted." ); // // Only called when we run the submit. Here we simply watch for the // changelist being committed, and use the new changelist number to // generate a suitable 'p4 fstat //...@change,change' command to be // used later to identify these files. // void TMSubmitUser::Message( Error *err ) { // Ensure default behaviour happens if( !err->IsInfo() ) { //skippedLast = 1; TMClientUser::Message( err ); return; } else { TMClientUser::Message( err ); } StrPtr * change = varList->GetVar( "change" ); StrPtr * nchange = varList->GetVar( "newChange" ); if( change && ( commitMsg1 == err->GetId( 0 )->fmt ) ) { StrRef c; c = *change; c += StrRef( "Change " ).Length(); StrPtr cp = (StrPtr)c; tmbo->SetChangeList((StrPtr*)&c); } else if( nchange && ( commitMsg2 == err->GetId( 0 )->fmt ) ) { StrRef c; c = *nchange; c += StrRef( "change " ).Length(); tmbo->SetChangeList((StrPtr*)&c); } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#5 | 5056 | harald_strack |
Directory support. Serious bug concerned to not unzipped binaries removed. Some other small bugfixes. |
||
#4 | 4980 | harald_strack |
Since I am maintaining the stuff in a local repository, I did some copy errors in the last revisions. Fixed. |
||
#3 | 4978 | harald_strack |
ap4 integrate implemented. Octal format is now used to save permissions. NOT backwards compatible anymore!!! |
||
#2 | 4975 | harald_strack |
Permissions are now masked to 555, so no write is possible. If you edit the Makefile and give the parameter -DFULL_PERMS, you have the old behaviour. Bugfix in ap4 revert: Edited and changed files were not reverted correctly. |
||
#1 | 4948 | harald_strack | Initial revision. |