Cmd_LabelSynch.cpp. #1

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

// Cmd_LabelSynch.cpp

#include "stdafx.h"
#include "p4win.h"
#include "cmd_labelsynch.h"

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


IMPLEMENT_DYNCREATE(CCmd_LabelSynch, CP4Command)


CCmd_LabelSynch::CCmd_LabelSynch(CGuiClient *client) : CP4Command(client)
{
	m_ReplyMsg= WM_P4LABELSYNC;
	m_TaskName= _T("LabelSynch");
	m_Preview = FALSE;
}

BOOL CCmd_LabelSynch::Run(LPCTSTR labelName, CStringList *files, 
					BOOL whatIf, BOOL removeFromLabel, BOOL noDeletes)
{
	ASSERT(labelName != NULL);
	ASSERT(!files->IsEmpty());
	
	// Set the base of arg list
	ClearArgs();
	
	AddArg(_T("labelsync"));
	if(removeFromLabel)
		AddArg(_T("-d"));
	if(noDeletes)
		AddArg(_T("-a"));
	if(whatIf)
	{
		m_Preview = TRUE;
		AddArg(_T("-n"));
	}
	AddArg(_T("-l"));
	m_BaseArgs =AddArg(labelName);
	
	m_posStrListIn=files->GetHeadPosition();
	m_pStrListIn=files;  

	// Put the first few files into the arg list
	NextListArgs();
		
	return CP4Command::Run();
}

void CCmd_LabelSynch::OnOutputInfo(char level, LPCTSTR data, LPCTSTR msg)
{
	m_StrListOut.AddHead(data);
}



# Change User Description Committed
#1 19924 YourUncleBob Populate -o //guest/perforce_software/p4win/...
//guest/YourUncleBob/p4win/.....
//guest/perforce_software/p4win/main/gui/p4api/Cmd_LabelSynch.cpp
#1 16169 perforce_software Move files to follow new path scheme for branches.
//guest/perforce_software/p4win/gui/p4api/Cmd_LabelSynch.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.