#include "ConflictEditorCommand.h"\r
#include "CleanupCommand.h"\r
#include "RebaseCommand.h"\r
-\r
+#include "ResolveCommand.h"\r
#if 0\r
\r
\r
\r
#include "RepositoryBrowserCommand.h"\r
\r
-#include "ResolveCommand.h"\r
+\r
#include "RevertCommand.h"\r
#include "RevisiongraphCommand.h"\r
#include "RTFMCommand.h"\r
return new CleanupCommand;\r
case cmdRebase:\r
return new RebaseCommand;\r
+ case cmdResolve:\r
+ return new ResolveCommand;\r
#if 0\r
\r
case cmdCat:\r
return new RepositoryBrowserCommand;\r
\r
\r
- case cmdResolve:\r
- return new ResolveCommand;\r
+\r
\r
case cmdRevisionGraph:\r
return new RevisionGraphCommand;\r
{\r
if (dlg.m_pathList.GetCount())\r
{\r
- CSVNProgressDlg progDlg(CWnd::FromHandle(hWndExplorer));\r
+\r
+ CGitProgressDlg progDlg(CWnd::FromHandle(hWndExplorer));\r
theApp.m_pMainWnd = &progDlg;\r
- progDlg.SetCommand(CSVNProgressDlg::SVNProgress_Resolve);\r
+ progDlg.SetCommand(CGitProgressDlg::GitProgress_Resolve);\r
if (parser.HasVal(_T("closeonend")))\r
progDlg.SetAutoClose(parser.GetLongVal(_T("closeonend")));\r
progDlg.SetOptions(parser.HasKey(_T("skipcheck")) ? ProgOptSkipConflictCheck : ProgOptNone);\r
progDlg.SetPathList(dlg.m_pathList);\r
progDlg.DoModal();\r
return !progDlg.DidErrorsOccur();\r
+\r
}\r
}\r
return false;\r
#include "TortoiseProc.h"\r
#include "messagebox.h"\r
#include "ResolveDlg.h"\r
+#include "CommonResource.h"\r
\r
#define REFRESHTIMER 100\r
\r
BEGIN_MESSAGE_MAP(CResolveDlg, CResizableStandAloneDialog)\r
ON_BN_CLICKED(IDC_SELECTALL, OnBnClickedSelectall)\r
ON_BN_CLICKED(IDHELP, OnBnClickedHelp)\r
- ON_REGISTERED_MESSAGE(CSVNStatusListCtrl::SVNSLNM_NEEDSREFRESH, OnSVNStatusListCtrlNeedsRefresh)\r
- ON_REGISTERED_MESSAGE(CSVNStatusListCtrl::SVNSLNM_ADDFILE, OnFileDropped)\r
+ ON_REGISTERED_MESSAGE(CGitStatusListCtrl::SVNSLNM_NEEDSREFRESH, OnSVNStatusListCtrlNeedsRefresh)\r
+ ON_REGISTERED_MESSAGE(CGitStatusListCtrl::SVNSLNM_ADDFILE, OnFileDropped)\r
ON_WM_TIMER()\r
END_MESSAGE_MAP()\r
\r
\r
m_bCancelled = false;\r
\r
- if (!m_resolveListCtrl.GetStatus(m_pathList))\r
+ if (!m_resolveListCtrl.GetStatus(&m_pathList))\r
{\r
m_resolveListCtrl.SetEmptyString(m_resolveListCtrl.GetLastErrorMessage());\r
}\r
// When the timer expires, we start the refresh thread,\r
// but only if it isn't already running - otherwise we\r
// restart the timer.\r
- CTSVNPath path;\r
+ CTGitPath path;\r
path.SetFromWin((LPCTSTR)lParam);\r
\r
if (!m_resolveListCtrl.HasPath(path))\r
//\r
#pragma once\r
#include "StandAloneDlg.h"\r
-#include "SVNStatusListCtrl.h"\r
+#include "GitStatusListCtrl.h"\r
\r
\r
/**\r
DECLARE_MESSAGE_MAP()\r
\r
public:\r
- CTSVNPathList m_pathList;\r
+ CTGitPathList m_pathList;\r
\r
private:\r
- CSVNStatusListCtrl m_resolveListCtrl;\r
+ CGitStatusListCtrl m_resolveListCtrl;\r
volatile LONG m_bThreadRunning;\r
CButton m_SelectAll;\r
bool m_bCancelled;\r
data->color = m_Colors.GetColor(CColors::Added);\r
// }\r
break;\r
+ \r
+ case git_wc_notify_resolved:\r
+ data->sActionColumnText.LoadString(IDS_SVNACTION_RESOLVE);\r
+ break;\r
+\r
#if 0\r
case svn_wc_notify_commit_added:\r
data->sActionColumnText.LoadString(IDS_SVNACTION_ADDING);\r
case svn_wc_notify_revert:\r
data->sActionColumnText.LoadString(IDS_SVNACTION_REVERT);\r
break;\r
- case svn_wc_notify_resolved:\r
- data->sActionColumnText.LoadString(IDS_SVNACTION_RESOLVE);\r
- break;\r
case svn_wc_notify_update_replace:\r
case svn_wc_notify_commit_replaced:\r
data->sActionColumnText.LoadString(IDS_SVNACTION_REPLACED);\r
for(int i=0;i<m_targetPathList.GetCount();i++)\r
{\r
CString cmd,out;\r
- cmd.Format(_T("git.exe add \"%s\""),m_targetPathList[i].GetGitPathString());\r
+ cmd.Format(_T("git.exe add -f \"%s\""),m_targetPathList[i].GetGitPathString());\r
if(g_Git.Run(cmd,&out,CP_OEMCP))\r
{\r
CMessageBox::Show(NULL,out,_T("TortoiseGit"),MB_OK|MB_ICONERROR);\r
\r
bool CGitProgressDlg::CmdResolve(CString& sWindowTitle, bool& localoperation)\r
{\r
-#if 0\r
+\r
localoperation = true;\r
ASSERT(m_targetPathList.GetCount() == 1);\r
sWindowTitle.LoadString(IDS_PROGRS_TITLE_RESOLVE);\r
SetBackgroundImage(IDI_RESOLVE_BKG);\r
// check if the file may still have conflict markers in it.\r
BOOL bMarkers = FALSE;\r
+\r
+ for(int i=0;i<m_targetPathList.GetCount();i++)\r
+ {\r
+ CString cmd,out;\r
+ cmd.Format(_T("git.exe add -f \"%s\""),m_targetPathList[i].GetGitPathString());\r
+ if(g_Git.Run(cmd,&out,CP_OEMCP))\r
+ {\r
+ CMessageBox::Show(NULL,out,_T("TortoiseGit"),MB_OK|MB_ICONERROR);\r
+ m_bErrorsOccurred=true;\r
+ return false;\r
+ }\r
+ Notify(m_targetPathList[i],git_wc_notify_resolved);\r
+ }\r
+#if 0\r
if ((m_options & ProgOptSkipConflictCheck) == 0)\r
{\r
try\r
for (INT_PTR fileindex=0; fileindex<m_targetPathList.GetCount(); ++fileindex)\r
Resolve(m_targetPathList[fileindex], svn_wc_conflict_choose_merged, true);\r
}\r
- CShellUpdater::Instance().AddPathsForUpdate(m_targetPathList);\r
#endif\r
+ CShellUpdater::Instance().AddPathsForUpdate(m_targetPathList);\r
+\r
return true;\r
}\r
\r
typedef enum\r
{\r
git_wc_notify_add,\r
+ git_wc_notify_resolved\r
\r
}git_wc_notify_action_t;\r
/**\r
RelativePath=".\Commands\ConflictEditorCommand.h"\r
>\r
</File>\r
+ <File\r
+ RelativePath=".\Commands\ResolveCommand.cpp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\Commands\ResolveCommand.h"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\ResolveDlg.cpp"\r
+ >\r
+ </File>\r
+ <File\r
+ RelativePath=".\ResolveDlg.h"\r
+ >\r
+ </File>\r
</Filter>\r
<Filter\r
Name="Rebase"\r