// Copyright 1999 (c) by Perforce Software, Inc. All rights reserved. // // p4wAddProcessorView: // The add processor view. // ------------------------------------- // Includes // #include <stdlib.h> #include <string.h> #include <p4wp4.h> #include "p4wAddProcessorView.h" #include "p4wCmdPane.h" #include "p4wPasswdTestPane.h" // // ------------------------------------- // Constructors and destructor. // p4wAddProcessorView::p4wAddProcessorView(p4wRequest & Request) : p4wRunView(Request) { // // Set the short and long versions of the title fShortTitle.Set( "Command Result" ); fFullTitle.Set( "Add Result" ); } p4wAddProcessorView::~p4wAddProcessorView() { } // ------------------------------------- // Control item render functions. // void p4wAddProcessorView::RenderContent() { // Build a spec to parse the add options StrBuf fileType; if( !ProcessForm() ) { RenderError("Requested URL is invalid in this context."); return; } // // Parse options and build up the command args title.Set("Add "); if( specTable.GetVar("OptionChg") ) { ArgAndTitle( "-c" ); ArgAndTitle( *specTable.GetVar("changelistVal") ); } if( specTable.GetVar("OptionFt") ) { ArgAndTitle( "-t" ); GetFileType( fileType ); ArgAndTitle( fileType ); } // // We need to check the server protocol version for 4.2+ // server. If it is 4.2+, we need to pass -f to force // the add in case the user uses special characters. const StrPtr *server = fRequest.GetProtocol( "server2" ); if (!server) { p4wPasswdTestPane dummyCmd( *this, fRequest ); fRequest.p4( "info", 0, 0, &dummyCmd ); fRequest.p4Wait(); server = fRequest.GetProtocol( "server2" ); } if( server && server->Atoi() > 17 ) ArgAndTitle( "-f" ); // // Parse the Files variable to get file arguments. Don't issue command // if this returned an error. if( !AddFileArgs() ) return; // run add p4wCmdPane cmdPane(*this, fRequest, title.Text()); fRequest.p4("add", 0, 0, &cmdPane); fRequest.p4Wait(); }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 12234 | Matt Attaway |
Rejigger P4Web project in preparation for official sunsetting The bin directory contains the last official builds of P4Web from the Perforce download site. P4Web is soon to be completely sunsetted; these builds are here for folks who don't want to build their own. To better handle the archived builds the source code has been moved into a separate src directory. |
||
//guest/perforce_software/p4web/Views/p4wAddProcessorView.cpp | |||||
#1 | 8914 | Matt Attaway | Initial add of the P4Web source code |