本文整理汇总了C++中SVN::ResolveTextConflict方法的典型用法代码示例。如果您正苦于以下问题:C++ SVN::ResolveTextConflict方法的具体用法?C++ SVN::ResolveTextConflict怎么用?C++ SVN::ResolveTextConflict使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SVN
的用法示例。
在下文中一共展示了SVN::ResolveTextConflict方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnButtonClicked
HRESULT CTextConflictEditorDlg::OnButtonClicked(HWND hWnd, int id)
{
if (id == 1000)
{
// Edit conflicts
CTSVNPath theirs, mine, base;
m_merged = m_conflictInfo->GetPath();
m_conflictInfo->GetTextContentFiles(base, theirs, mine);
m_mergedCreationTime = m_merged.GetLastWriteTime();
::SendMessage(hWnd, TDM_ENABLE_BUTTON, 100 + svn_client_conflict_option_merged_text, 0);
CString filename, n1, n2, n3, n4;
filename = m_merged.GetUIFileOrDirectoryName();
n1.Format(IDS_DIFF_WCNAME, (LPCTSTR)filename);
n2.Format(IDS_DIFF_BASENAME, (LPCTSTR)filename);
n3.Format(IDS_DIFF_REMOTENAME, (LPCTSTR)filename);
n4.Format(IDS_DIFF_MERGEDNAME, (LPCTSTR)filename);
CAppUtils::MergeFlags flags;
flags.AlternativeTool((GetKeyState(VK_SHIFT) & 0x8000) != 0);
flags.PreventSVNResolve(true);
CAppUtils::StartExtMerge(flags,
base, theirs, mine, m_merged, true, n1, n1, n3, n4, filename);
return S_FALSE;
}
for (SVNConflictOptions::const_iterator it = m_options.begin(); it != m_options.end(); ++it)
{
svn_client_conflict_option_id_t optionId = (*it)->GetId();
int buttonID = 100 + optionId;
if (buttonID == id)
{
if (m_svn)
{
if (!m_svn->ResolveTextConflict(*m_conflictInfo, *it->get()))
{
m_svn->ShowErrorDialog(hWnd);
return S_FALSE;
}
}
else
{
SVN svn;
if (!svn.ResolveTextConflict(*m_conflictInfo, *it->get()))
{
svn.ShowErrorDialog(hWnd);
return S_FALSE;
}
}
m_choice = optionId;
return S_OK;
}
}
return S_OK;
}