Cmd_Fixes.cpp. #1

  • //
  • guest/
  • YourUncleBob/
  • p4win/
  • main/
  • gui/
  • p4api/
  • Cmd_Fixes.cpp.
  • View
  • Commits
  • Open Download .zip Download (1 KB)
//
// Copyright 1997 Nicholas J. Irias.  All rights reserved.
//
//

// Cmd_Fixes.cpp

#include "stdafx.h"
#include "p4win.h"
#include "cmd_fixes.h"
#include "p4fix.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif


IMPLEMENT_DYNCREATE(CCmd_Fixes, CP4Command)


CCmd_Fixes::CCmd_Fixes(CGuiClient *client) : CP4Command(client)
{
	m_ReplyMsg= WM_P4FIXES;
	m_TaskName= _T("Fixes");
}

BOOL CCmd_Fixes::Run( int changeNum/*=0*/, HTREEITEM change/*=NULL*/, 
					  BOOL bJob/*=FALSE*/, LPCTSTR jobname/*=NULL*/)
{
	m_ChangeItem= change;
    m_ChangeNumber= changeNum;

	ClearArgs();
	AddArg(_T("fixes"));
	if(changeNum > 0)
	{
		AddArg(_T("-c"));
        AddArg(changeNum);
	}
	else if (bJob)
	{
		AddArg(_T("-j"));
		AddArg(jobname);
	}
	
	return CP4Command::Run();
}

void CCmd_Fixes::OnOutputInfo(char level, LPCTSTR data, LPCTSTR msg)
{
	// Parse into a CP4Change and send that back
	CP4Fix *fix= new CP4Fix;
	if( fix->Create(data) )
	    m_List.AddHead(fix);
    else
    {
         #ifdef _DEBUG
            CString errMsg;
            errMsg.Format(_T("Fix parse failed:\n%s"), data);
            TheApp()->StatusAdd(errMsg, SV_DEBUG);
        #endif
        delete fix;
    }
}



# Change User Description Committed
#1 19924 YourUncleBob Populate -o //guest/perforce_software/p4win/...
//guest/YourUncleBob/p4win/.....
//guest/perforce_software/p4win/main/gui/p4api/Cmd_Fixes.cpp
#1 16169 perforce_software Move files to follow new path scheme for branches.
//guest/perforce_software/p4win/gui/p4api/Cmd_Fixes.cpp
#1 8562 Matt Attaway These feet never stop running.

Initial commit of the P4Win source code.  To the best of our knowledge this
compiles and runs using the 2013.3 P4 API and VS 2010. Expect a few changes
as we refine the build process. Please post any build issues to the forums.