您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ CTGitPath函数代码示例

51自学网 2021-06-01 20:06:41
  C++
这篇教程C++ CTGitPath函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中CTGitPath函数的典型用法代码示例。如果您正苦于以下问题:C++ CTGitPath函数的具体用法?C++ CTGitPath怎么用?C++ CTGitPath使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了CTGitPath函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: CTGitPath

CTGitPath CTGitPathList::GetCommonRoot() const{	if (IsEmpty())		return CTGitPath();	if (GetCount() == 1)		return m_paths[0];	// first entry is common root for itself	// (add trailing '//' to detect partial matches of the last path element)	CString root = m_paths[0].GetWinPathString() + _T('//');	int rootLength = root.GetLength();	// determine common path string prefix	for (PathVector::const_iterator it = m_paths.begin() + 1; it != m_paths.end(); ++it)	{		CString path = it->GetWinPathString() + _T('//');		int newLength = CStringUtils::GetMatchingLength(root, path);		if (newLength != rootLength)		{			root.Delete(newLength, rootLength);			rootLength = newLength;		}	}	// remove the last (partial) path element	if (rootLength > 0)		root.Delete(root.ReverseFind(_T('//')), rootLength);	// done	return CTGitPath(root);}
开发者ID:KristinaTaylor,项目名称:TortoiseSI,代码行数:33,


示例2: lock

CTGitPath CDirectoryWatcher::CloseInfoMap(HANDLE hDir){	AutoLocker lock(m_critSec);	TInfoMap::const_iterator d = watchInfoMap.find(hDir);	if (d != watchInfoMap.end())	{		CTGitPath root = CTGitPath(CTGitPath(d->second->m_DirPath).GetRootPathString());		RemovePathAndChildren(root);		BlockPath(root);	}	CloseWatchHandles();	CTGitPath path;	if (watchInfoMap.empty())		return path;	for (TInfoMap::iterator I = watchInfoMap.begin(); I != watchInfoMap.end(); ++I)	{		CDirectoryWatcher::CDirWatchInfo * info = I->second;		ScheduleForDeletion (info);	}	watchInfoMap.clear();	return path;}
开发者ID:mirror,项目名称:TortoiseGit,代码行数:26,


示例3: ConstructTempPath

CTGitPath CTempFiles::CreateTempPath (bool bRemoveAtEnd, const CTGitPath& path, bool directory){	bool succeeded = false;	for (int retryCount = 0; retryCount < MAX_RETRIES; ++retryCount)	{		CTGitPath tempfile = ConstructTempPath (path);		// now create the temp file / directory, so that subsequent calls to GetTempFile() return		// different filenames.		// Handle races, i.e. name collisions.		if (directory)		{			DeleteFile(tempfile.GetWinPath());			if (CreateDirectory(tempfile.GetWinPath(), nullptr) == FALSE)			{				if (GetLastError() != ERROR_ALREADY_EXISTS)					return CTGitPath();			}			else				succeeded = true;		}		else		{			CAutoFile hFile = CreateFile(tempfile.GetWinPath(), GENERIC_READ, FILE_SHARE_READ, nullptr, CREATE_ALWAYS, FILE_ATTRIBUTE_TEMPORARY, nullptr);			if (!hFile)			{				if (GetLastError() != ERROR_ALREADY_EXISTS)					return CTGitPath();			}			else			{				succeeded = true;			}		}		// done?		if (succeeded)		{			if (bRemoveAtEnd)				m_TempFileList.AddPath(tempfile);			return tempfile;		}	}	// give up	return CTGitPath();}
开发者ID:YueLinHo,项目名称:TortoiseGit,代码行数:51,


示例4: CTGitPath

void CRequestPullDlg::OnBnClickedButtonLocalBranch(){	// use the git log to allow selection of a version	CLogDlg dlg;	CString revision;	m_cStartRevision.GetWindowText(revision);	dlg.SetParams(CTGitPath(), CTGitPath(), revision, revision, 0);	// tell the dialog to use mode for selecting revisions	dlg.SetSelect(true);	// only one revision must be selected however	dlg.SingleSelection(true);	if ( dlg.DoModal() == IDOK )		m_cStartRevision.SetWindowText(dlg.GetSelectedHash().at(0).ToString());}
开发者ID:paulogeneses,项目名称:TortoiseGit,代码行数:14,


示例5: CTGitPath

void CSetHooks::OnBnClickedEditbutton(){	if (m_cHookList.GetSelectedCount() > 1)		return;	POSITION pos = m_cHookList.GetFirstSelectedItemPosition();	if (pos)	{		CSetHooksAdv dlg;		int index = m_cHookList.GetNextSelectedItem(pos);		dlg.key.htype = CHooks::GetHookType((LPCTSTR)m_cHookList.GetItemText(index, 0));		dlg.key.path = CTGitPath(m_cHookList.GetItemText(index, 1));		dlg.cmd.commandline = m_cHookList.GetItemText(index, 2);		dlg.cmd.bWait = (m_cHookList.GetItemText(index, 3).Compare(_T("true"))==0);		dlg.cmd.bShow = (m_cHookList.GetItemText(index, 4).Compare(_T("show"))==0);		hookkey key = dlg.key;		if (dlg.DoModal() == IDOK)		{			CHooks::Instance().Remove(key);			CHooks::Instance().Add(dlg.key.htype, dlg.key.path, dlg.cmd.commandline, dlg.cmd.bWait, dlg.cmd.bShow);			RebuildHookList();			SetModified();		}	}}
开发者ID:tribis,项目名称:TortoiseGit,代码行数:26,


示例6: CTGitPath

bool CLogFile::Open(){	if (m_maxlines == 0)		return false;	CTGitPath logfile = CTGitPath(CPathUtils::GetLocalAppDataDirectory() + _T("logfile.txt"));	return Open(logfile);}
开发者ID:tribis,项目名称:TortoiseGit,代码行数:7,


示例7: ASSERT

int CSendMailPatch::SendAsCombinedMail(CTGitPathList &list, CGitProgressList * instance){	ASSERT(instance);	CStringArray attachments;	CString body;	for (int i = 0; i < list.GetCount(); ++i)	{		CPatch patch;		if (patch.Parse((CString &)list[i].GetWinPathString()))		{			instance->ReportError(_T("Could not open/parse ") + list[i].GetWinPathString());			return -2;		}		if (m_bAttachment)		{			attachments.Add(list[i].GetWinPathString());			body += patch.m_Subject;			body += _T("/r/n");		}		else		{			try			{				g_Git.StringAppend(&body, (BYTE*)patch.m_Body.GetBuffer(), CP_UTF8, patch.m_Body.GetLength());			}			catch (CMemoryException *)			{				instance->ReportError(_T("Out of memory. Could not parse ") + list[i].GetWinPathString());				return -2;			}		}	}	return SendMail(CTGitPath(), instance, m_sSenderName, m_sSenderMail, m_sTo, m_sCC, m_sSubject, body, attachments);}
开发者ID:15375514460,项目名称:TortoiseGit,代码行数:35,


示例8: _T

/** * Returns the .git-path (if .git is a file, read the repository path and return it) * adminDir always ends with "/" */bool GitAdminDir::GetAdminDirPath(const CString &projectTopDir, CString& adminDir){	if (IsBareRepo(projectTopDir))	{		adminDir = projectTopDir;		adminDir.TrimRight('//');		adminDir.Append(_T("//"));		return true;	}	CString sDotGitPath = projectTopDir + _T("//") + GetAdminDirName();	if (CTGitPath(sDotGitPath).IsDirectory())	{		sDotGitPath.TrimRight('//');		sDotGitPath.Append(_T("//"));		adminDir = sDotGitPath;		return true;	}	else	{		CString result = ReadGitLink(projectTopDir, sDotGitPath);		if (result.IsEmpty())			return false;		adminDir = result + _T("//");		return true;	}}
开发者ID:Teivaz,项目名称:TortoiseGit,代码行数:31,


示例9: ASSERT

int CSendMailCombineable::SendAsCombinedMail(const CTGitPathList &list, CGitProgressList* instance){	ASSERT(instance);	CStringArray attachments;	CString body;	for (int i = 0; i < list.GetCount(); ++i)	{		if (m_bAttachment)		{			attachments.Add(list[i].GetWinPathString());		}		else		{			CString filename(list[i].GetWinPathString());			body += filename + _T(":/n");			if (GetFileContents(filename, body))			{				instance->ReportError(_T("Could not open ") + filename);				return -2;			}			body += _T("/n");		}	}	return SendMail(CTGitPath(), instance, m_sSenderName, m_sSenderMail, m_sTo, m_sCC, m_sSubject, body, attachments);}
开发者ID:Teivaz,项目名称:TortoiseGit,代码行数:26,


示例10: GetWindowText

BOOL CSubmoduleUpdateDlg::OnInitDialog(){    CStandAloneDialog::OnInitDialog();    CAppUtils::MarkWindowAsUnpinnable(m_hWnd);    CString sWindowTitle;    GetWindowText(sWindowTitle);    CString dir = g_Git.m_CurrentDir;    if (m_PathFilterList.size() > 0)        dir += (g_Git.m_CurrentDir.Right(1) == _T('//') ? _T("") : _T("//")) + CTGitPath(m_PathFilterList[0]).GetWinPathString();    if (m_PathFilterList.size() > 1)        dir += _T(", ...");    CAppUtils::SetWindowTitle(m_hWnd, dir, sWindowTitle);    AdjustControlSize(IDC_CHECK_SUBMODULE_INIT);    AdjustControlSize(IDC_CHECK_SUBMODULE_RECURSIVE);    AdjustControlSize(IDC_CHECK_SUBMODULE_NOFETCH);    AdjustControlSize(IDC_CHECK_SUBMODULE_MERGE);    AdjustControlSize(IDC_CHECK_SUBMODULE_REBASE);    Refresh();    UpdateData(FALSE);    return TRUE;}
开发者ID:jfjdautzenberg,项目名称:TortoiseGit,代码行数:25,


示例11: UpdateData

void CSetHooksAdv::OnOK(){	UpdateData();	int cursel = m_cHookTypeCombo.GetCurSel();	key.htype = unknown_hook;	if (cursel != CB_ERR)	{		key.htype = (hooktype)m_cHookTypeCombo.GetItemData(cursel);		key.path = CTGitPath(m_sPath);		cmd.commandline = m_sCommandLine;		cmd.bWait = !!m_bWait;		cmd.bShow = !m_bHide;	}	if (key.htype == unknown_hook)	{		m_tooltips.ShowBalloon(IDC_HOOKTYPECOMBO, IDS_ERR_NOHOOKTYPESPECIFIED, IDS_ERR_ERROR, TTI_ERROR);		return;	}	if (key.path.IsEmpty())	{		ShowEditBalloon(IDC_HOOKPATH, IDS_ERR_NOHOOKPATHSPECIFIED, IDS_ERR_ERROR, TTI_ERROR);		return;	}	if (cmd.commandline.IsEmpty())	{		ShowEditBalloon(IDC_HOOKCOMMANDLINE, IDS_ERR_NOHOOKCOMMANDPECIFIED, IDS_ERR_ERROR, TTI_ERROR);		return;	}	CResizableStandAloneDialog::OnOK();}
开发者ID:AJH16,项目名称:TortoiseGit,代码行数:31,


示例12: find

const_hookiterator CHooks::FindItem(hooktype t, const CString& workingTree) const{	hookkey key;	CTGitPath path = workingTree;	do	{		key.htype = t;		key.path = path;		auto it = find(key);		if (it != end())		{			return it;		}		path = path.GetContainingDirectory();	} while(!path.IsEmpty());	// look for a script with a path as '*'	key.htype = t;	key.path = CTGitPath(_T("*"));	auto it = find(key);	if (it != end())	{		return it;	}	return end();}
开发者ID:545546460,项目名称:TortoiseGit,代码行数:26,


示例13: CTGitPath

void CRepositoryBrowser::OnBnClickedButtonRevision(){		// use the git log to allow selection of a version		CLogDlg dlg;		dlg.SetParams(CTGitPath(), CTGitPath(), m_sRevision, m_sRevision, 0);		// tell the dialog to use mode for selecting revisions		dlg.SetSelect(true);		// only one revision must be selected however		dlg.SingleSelection(true);		if (dlg.DoModal() == IDOK)		{			// get selected hash if any			m_sRevision = dlg.GetSelectedHash();			Refresh();		}}
开发者ID:konlytest,项目名称:TortoiseGit,代码行数:16,


示例14: find

hookiterator CHooks::FindItem(hooktype t, const CTGitPathList& pathList){	hookkey key;	for (int i=0; i<pathList.GetCount(); ++i)	{		CTGitPath path = pathList[i];		do 		{			key.htype = t;			key.path = path;			hookiterator it = find(key);			if (it != end())			{				return it;			}			path = path.GetContainingDirectory();		} while(!path.IsEmpty());	}	// look for a script with a path as '*'	key.htype = t;	key.path = CTGitPath(_T("*"));	hookiterator it = find(key);	if (it != end())	{		return it;	}	return end();}
开发者ID:murank,项目名称:TortoiseGitMod,代码行数:29,


示例15: FillNewRefMap

void CSyncDlg::RunPostAction(){	if (m_bWantToExit)		return;	FillNewRefMap();	if (this->m_CurrentCmd == GIT_COMMAND_PUSH)	{		if (!m_GitCmdStatus)		{			CTGitPathList list;			list.AddPath(CTGitPath(g_Git.m_CurrentDir));			DWORD exitcode;			CString error;			if (CHooks::Instance().PostPush(list,exitcode, error))			{				if (exitcode)				{					CString temp;					temp.Format(IDS_ERR_HOOKFAILED, (LPCTSTR)error);					//ReportError(temp);					CMessageBox::Show(NULL,temp,_T("TortoiseGit"),MB_OK|MB_ICONERROR);					return;				}			}		}		EnableControlButton(true);		SwitchToInput();		this->FetchOutList(true);	}	else if (this->m_CurrentCmd == GIT_COMMAND_PULL)	{		PullComplete();	}	else if (this->m_CurrentCmd == GIT_COMMAND_FETCH || this->m_CurrentCmd == GIT_COMMAND_FETCHANDREBASE)	{		FetchComplete();	}	else if (this->m_CurrentCmd == GIT_COMMAND_SUBMODULE)	{		//this->m_ctrlCmdOut.SetSel(-1,-1);		//this->m_ctrlCmdOut.ReplaceSel(_T("Done/r/n"));		//this->m_ctrlCmdOut.SetSel(-1,-1);		EnableControlButton(true);		SwitchToInput();	}	else if (this->m_CurrentCmd == GIT_COMMAND_STASH)	{		StashComplete();	}	else if (this->m_CurrentCmd == GIT_COMMAND_REMOTE)	{		this->FetchOutList(true);		EnableControlButton(true);		SwitchToInput();		ShowTab(IDC_REFLIST);	}}
开发者ID:Blonder,项目名称:TortoiseGit,代码行数:60,


示例16: DYNAMIC_DOWNCAST

void CGitBlameLogList::GetPaths(const CGitHash& hash, std::vector<CTGitPath>& paths){	CTortoiseGitBlameView *pView = DYNAMIC_DOWNCAST(CTortoiseGitBlameView,((CMainFrame*)::AfxGetApp()->GetMainWnd())->GetActiveView());	if (pView)	{		{			std::set<CString> filenames;			int numberOfLines = pView->m_data.GetNumberOfLines();			for (int i = 0; i < numberOfLines; ++i)			{				if (pView->m_data.GetHash(i) == hash)				{					filenames.insert(pView->m_data.GetFilename(i));				}			}			for (auto it = filenames.cbegin(); it != filenames.cend(); ++it)			{				paths.push_back(CTGitPath(*it));			}		}		if (paths.empty())		{			// in case the hash does not exist in the blame output but it exists in the log follow only the file			paths.push_back(pView->GetDocument()->m_GitPath);		}	}}
开发者ID:mganss,项目名称:TortoiseGit,代码行数:27,


示例17: _T

const FileStatusCacheEntry * GitFolderStatus::GetCachedItem(const CTGitPath& filepath){	sCacheKey.assign(filepath.GetWinPath());	FileStatusMap::const_iterator iter;	const FileStatusCacheEntry *retVal;	if(m_mostRecentPath.IsEquivalentTo(CTGitPath(sCacheKey.c_str())))	{		// We've hit the same result as we were asked for last time		CTraceToOutputDebugString::Instance()(_T(__FUNCTION__) _T(": fast cache hit for %s/n"), filepath.GetWinPath());		retVal = m_mostRecentStatus;	}	else if ((iter = m_cache.find(sCacheKey)) != m_cache.end())	{		CTraceToOutputDebugString::Instance()(_T(__FUNCTION__) _T(": cache found for %s/n"), filepath.GetWinPath());		retVal = &iter->second;		m_mostRecentStatus = retVal;		m_mostRecentPath = CTGitPath(sCacheKey.c_str());	}	else	{		retVal = NULL;	}	if(retVal != NULL)	{		// We found something in a cache - check that the cache is not timed-out or force-invalidated		DWORD now = GetTickCount();		if ((now >= m_TimeStamp)&&((now - m_TimeStamp) > GetTimeoutValue()))		{			// Cache is timed-out			CTraceToOutputDebugString::Instance()(__FUNCTION__ ": Cache timed-out/n");			ClearCache();			retVal = NULL;		}		else if(WaitForSingleObject(m_hInvalidationEvent, 0) == WAIT_OBJECT_0)		{			// TortoiseGitProc has just done something which has invalidated the cache			CTraceToOutputDebugString::Instance()(__FUNCTION__ ": Cache invalidated/n");			ClearCache();			retVal = NULL;		}		return retVal;	}	return NULL;}
开发者ID:konlytest,项目名称:TortoiseGit,代码行数:47,


示例18: CTGitPath

void CFormatPatchDlg::OnBnClickedButtonTo(){	CLogDlg dlg;	CString revision;	m_cTo.GetWindowText(revision);	dlg.SetParams(CTGitPath(), CTGitPath(), revision, revision, 0);	// tell the dialog to use mode for selecting revisions	dlg.SetSelect(true);	// only one revision must be selected however	dlg.SingleSelection(true);	if (dlg.DoModal() == IDOK && !dlg.GetSelectedHash().empty())	{		m_cTo.AddString(dlg.GetSelectedHash().at(0).ToString());		CheckRadioButton(IDC_RADIO_SINCE, IDC_RADIO_RANGE, IDC_RADIO_RANGE);		OnBnClickedRadio();	}}
开发者ID:TortoiseGit,项目名称:TortoiseGit,代码行数:17,


示例19: DWORD

CGitStatusCache::CGitStatusCache(void){#define forever DWORD(-1)    AutoLocker lock(m_NoWatchPathCritSec);    TCHAR path[MAX_PATH];    SHGetFolderPath(NULL, CSIDL_COOKIES, NULL, 0, path);    m_NoWatchPaths[CTGitPath(CString(path))] = forever;    SHGetFolderPath(NULL, CSIDL_HISTORY, NULL, 0, path);    m_NoWatchPaths[CTGitPath(CString(path))] = forever;    SHGetFolderPath(NULL, CSIDL_INTERNET_CACHE, NULL, 0, path);    m_NoWatchPaths[CTGitPath(CString(path))] = forever;    SHGetFolderPath(NULL, CSIDL_SYSTEM, NULL, 0, path);    m_NoWatchPaths[CTGitPath(CString(path))] = forever;    SHGetFolderPath(NULL, CSIDL_WINDOWS, NULL, 0, path);    m_NoWatchPaths[CTGitPath(CString(path))] = forever;    m_bClearMemory = false;    m_mostRecentExpiresAt = 0;}
开发者ID:hfeeki,项目名称:TortoiseGit,代码行数:18,


示例20: findfolderstatus

git_error_t* GitFolderStatus::findfolderstatus(void * baton, const char * path, git_wc_status2_t * status, apr_pool_t * /*pool*/){    GitFolderStatus * Stat = (GitFolderStatus *)baton;    if ((Stat)&&(Stat->folderpath.IsEquivalentTo(CTGitPath(CString(path)))))    {        Stat->dirstatus = status;    }    return GIT_NO_ERROR;}
开发者ID:andmedsantana,项目名称:TortoiseGit,代码行数:10,


示例21: CTGitPath

void CRequestPullDlg::OnBnClickedButtonLocalBranch(){	// use the git log to allow selection of a version	CLogDlg dlg;	CString revision;	m_cStartRevision.GetWindowText(revision);	dlg.SetParams(CTGitPath(), CTGitPath(), revision, revision, 0);	// tell the dialog to use mode for selecting revisions	dlg.SetSelect(true);	// only one revision must be selected however	dlg.SingleSelection(true);	if ( dlg.DoModal() == IDOK )	{		// get selected hash if any		CString selectedHash = dlg.GetSelectedHash();		// load into window, do this even if empty so that it is clear that nothing has been selected		m_cStartRevision.SetWindowText( selectedHash );	}}
开发者ID:545546460,项目名称:TortoiseGit,代码行数:19,


示例22: GetWindowText

void CSubmoduleUpdateDlg::SetDlgTitle(){	if (m_sTitle.IsEmpty())		GetWindowText(m_sTitle);	CString dir = g_Git.m_CurrentDir;	if (!m_bWholeProject)	{		if (!m_PathFilterList.empty())			dir += (CStringUtils::EndsWith(g_Git.m_CurrentDir, L'//') ? L"" : L"//") + CTGitPath(m_PathFilterList[0]).GetWinPathString();		if (m_PathFilterList.size() > 1)			dir += L", ...";	}	CAppUtils::SetWindowTitle(m_hWnd, dir, m_sTitle);}
开发者ID:YueLinHo,项目名称:TortoiseGit,代码行数:14,


示例23: _T

/** * Returns the .git-path (if .git is a file, read the repository path and return it) * adminDir always ends with "/" */bool GitAdminDir::GetAdminDirPath(const CString &projectTopDir, CString &adminDir) const{	if (IsBareRepo(projectTopDir))	{		adminDir = projectTopDir;		adminDir.TrimRight('//');		adminDir.Append(_T("//"));		return true;	}	CString sDotGitPath = projectTopDir + _T("//") + g_GitAdminDir.GetAdminDirName();	if (CTGitPath(sDotGitPath).IsDirectory())	{		sDotGitPath.TrimRight('//');		sDotGitPath.Append(_T("//"));		adminDir = sDotGitPath;		return true;	}	else	{		FILE *pFile;		_tfopen_s(&pFile, sDotGitPath, _T("r"));		if (!pFile)			return false;		int size = 65536;		std::unique_ptr<char[]> buffer(new char[size]);		SecureZeroMemory(buffer.get(), size);		fread(buffer.get(), sizeof(char), size, pFile);		fclose(pFile);		CStringA gitPathA(buffer.get());		if (gitPathA.Left(8) != "gitdir: ")			return false;		CString gitPath = CUnicodeUtils::GetUnicode(gitPathA.Trim().Mid(8)); // 8 = len("gitdir: ")		gitPath.Replace('/', '//');		gitPath.TrimRight('//');		gitPath.Append(_T("//"));		if (gitPath.GetLength() > 0 && gitPath[0] == _T('.'))		{			gitPath = projectTopDir + _T("//") + gitPath;			PathCanonicalize(adminDir.GetBuffer(MAX_PATH), gitPath.GetBuffer());			adminDir.ReleaseBuffer();			gitPath.ReleaseBuffer();			return true;		}		adminDir = gitPath;		return true;	}}
开发者ID:hfeeki,项目名称:TortoiseGit,代码行数:54,


示例24: AddPath

void CTGitPathList::LoadFromAsteriskSeparatedString(const CString& sPathString){	int pos = 0;	CString temp;	for(;;)	{		temp = sPathString.Tokenize(_T("*"),pos);		if(temp.IsEmpty())		{			break;		}		AddPath(CTGitPath(CPathUtils::GetLongPathname(temp)));	}}
开发者ID:KristinaTaylor,项目名称:TortoiseSI,代码行数:14,


示例25: GetWindowText

void CSubmoduleUpdateDlg::SetDlgTitle(){	if (m_sTitle.IsEmpty())		GetWindowText(m_sTitle);	CString dir = g_Git.m_CurrentDir;	if (!m_bWholeProject)	{		if (!m_PathFilterList.empty())			dir += (g_Git.m_CurrentDir.Right(1) == _T('//') ? _T("") : _T("//")) + CTGitPath(m_PathFilterList[0]).GetWinPathString();		if (m_PathFilterList.size() > 1)			dir += _T(", ...");	}	CAppUtils::SetWindowTitle(m_hWnd, dir, m_sTitle);}
开发者ID:mhoque01,项目名称:TortoiseGit,代码行数:14,


示例26: while

void CSetBugTraq::OnBnClickedRemovebutton(){	// traversing from the end to the beginning so that the indices are not skipped	int index = m_cBugTraqList.GetItemCount()-1;	while (index >= 0)	{		if (m_cBugTraqList.GetItemState(index, LVIS_SELECTED) & LVIS_SELECTED)		{			CTGitPath path = CTGitPath(m_cBugTraqList.GetItemText(index, 0));			m_cBugTraqList.DeleteItem(index);			m_associations.RemoveByPath(path);			SetModified();		}		index--;	}}
开发者ID:Teivaz,项目名称:TortoiseGit,代码行数:16,


示例27: direnum

//this is the thread function which calls the subversion functionUINT CCacheDlg::TestThread(){	CDirFileEnum direnum(m_sRootPath);	m_filelist.RemoveAll();	CString filepath;	bool bIsDir = false;	while (direnum.NextFile(filepath, &bIsDir))		if (filepath.Find(L".git") < 0)			m_filelist.Add(filepath);	CTime starttime = CTime::GetCurrentTime();	GetDlgItem(IDC_STARTTIME)->SetWindowText(starttime.Format(L"%H:%M:%S"));	ULONGLONG startticks = GetTickCount64();	CString sNumber;	std::random_device rd;	std::mt19937 mt(rd());	std::uniform_int_distribution<INT_PTR> dist(0, max(0, m_filelist.GetCount() - 1));	std::uniform_int_distribution<INT_PTR> dist2(0, 9);	for (int i=0; i < 1; ++i)	{		CString filepath2;		//do {			filepath2 = m_filelist.GetAt(dist(mt));		//}while(filepath.Find(L".git") >= 0);		GetDlgItem(IDC_FILEPATH)->SetWindowText(filepath2);		GetStatusFromRemoteCache(CTGitPath(filepath2), true);		sNumber.Format(L"%d", i);		GetDlgItem(IDC_DONE)->SetWindowText(sNumber);		if ((GetTickCount64()%10)==1)			Sleep(10);		if (dist2(mt) == 3)			RemoveFromCache(filepath2);	}	CTime endtime = CTime::GetCurrentTime();	CString sEnd = endtime.Format(L"%H:%M:%S");	ULONGLONG endticks = GetTickCount64();	CString sEndText;	sEndText.Format(L"%s  - %I64u ms", (LPCTSTR)sEnd, endticks - startticks);	GetDlgItem(IDC_ENDTIME)->SetWindowText(sEndText);	return 0;}
开发者ID:stahta01,项目名称:wxTortoiseGit,代码行数:48,


示例28: direnum

//this is the thread function which calls the subversion functionUINT CCacheDlg::TestThread(){	CDirFileEnum direnum(m_sRootPath);	m_filelist.RemoveAll();	CString filepath;	bool bIsDir = false;	while (direnum.NextFile(filepath, &bIsDir))		if(filepath.Find(_T(".git"))<0)			m_filelist.Add(filepath);	CTime starttime = CTime::GetCurrentTime();	GetDlgItem(IDC_STARTTIME)->SetWindowText(starttime.Format(_T("%H:%M:%S")));	int filecounter = 0;	DWORD startticks = GetTickCount();	CString sNumber;	srand(GetTickCount());	for (int i=0; i < 1; ++i)	{		CString filepath;		//do {			filepath = m_filelist.GetAt(rand() % m_filelist.GetCount());		//}while(filepath.Find(_T(".git"))>=0);		GetDlgItem(IDC_FILEPATH)->SetWindowText(filepath);		GetStatusFromRemoteCache(CTGitPath(filepath), true);		sNumber.Format(_T("%d"), i);		GetDlgItem(IDC_DONE)->SetWindowText(sNumber);		if ((GetTickCount()%10)==1)			Sleep(10);		if ((rand()%10)==3)			RemoveFromCache(filepath);	}	CTime endtime = CTime::GetCurrentTime();	CString sEnd = endtime.Format(_T("%H:%M:%S"));	DWORD endticks = GetTickCount();	CString sEndText;	sEndText.Format(_T("%s  - %d ms"), sEnd, endticks-startticks);	GetDlgItem(IDC_ENDTIME)->SetWindowText(sEndText);	return 0;}
开发者ID:chengn,项目名称:TortoiseGit,代码行数:46,



注:本文中的CTGitPath函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ CTINFO2DIR函数代码示例
C++ CT2A函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。