// // Copyright 2001 Perforce Software. All rights reserved. // // This file is part of Perforce - the FAST SCM System. // // p4wLabSyncProcView: // parse & process the Create Label form #include <stdlib.h> #include <string.h> #include <p4wp4.h> #include "p4wView.h" #include "p4wLabSyncProcView.h" #include "p4wCmdPane.h" #include "p4wPreviewPane.h" p4wLabSyncProcView::p4wLabSyncProcView( p4wRequest & Request ) : p4wRunView( Request ) { // // Set flags (ie fPreview?) based on form action fAc = AC_REPLACELABEL; ProcessFormAction(); // // Add special labelsync options to parse spec.Add( "OptionLS" ); // // Set the short and the long versions of the title. // If there is no POST data the title is "Error". if( !ProcessForm() ) { fShortTitle.Set( "Error" ); fFullTitle.Set( "Error" ); return; } fShortTitle.Set( "Command Result" ); if( fPreview ) fFullTitle.Set( "Labelsync Preview Result" ); else fFullTitle.Set( "Labelsync Result" ); } p4wLabSyncProcView::~p4wLabSyncProcView() { } void p4wLabSyncProcView::RenderContent() { // // Issue labelsync command (passing the results through a // CmdPane). // Build a spec to parse the options if( !ProcessForm() ) { RenderError("Requested URL is invalid in this context."); return; } title = "labelsync "; StrPtr *option = specTable.GetVar( "OptionLS" ); if( fPreview ) ArgAndTitle( "-n" ); if( option && *option == "add" ) { ArgAndTitle( "-a" ); } else if( option && *option == "remove" ) { ArgAndTitle( "-d" ); } ArgAndTitle( "-l" ); ArgAndTitle( fRequest.GetURL().Text() ); // Process the files. If this returned an error don't issue the command if( !AddFileArgs() ) return; // Run the command. if( fPreview ) { p4wPreviewPane prevPane( *this, fRequest, title.Text() ); fRequest.p4( "labelsync", 0, 0, &prevPane ); fRequest.p4Wait(); } else { p4wCmdPane cmdPane( *this, fRequest, title.Text() ); fRequest.p4( "labelsync", 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/p4wLabSyncProcView.cpp | |||||
#1 | 8914 | Matt Attaway | Initial add of the P4Web source code |