Enable security checks and features
[TortoiseGit.git] / src / TortoiseProc / Commands / ResolveCommand.cpp
blobc3f2d553ee25e04d69ed2935aa33c1425246b6ca
1 // TortoiseSVN - a Windows shell extension for easy version control
3 // Copyright (C) 2007-2008 - TortoiseSVN
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software Foundation,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 #include "StdAfx.h"
20 #include "ResolveCommand.h"
22 #include "ResolveDlg.h"
23 #include "SVNProgressDlg.h"
25 bool ResolveCommand::Execute()
27 CResolveDlg dlg;
28 dlg.m_pathList = pathList;
29 INT_PTR ret = IDOK;
30 if (!parser.HasKey(_T("noquestion")))
31 ret = dlg.DoModal();
32 if (ret == IDOK)
34 if (dlg.m_pathList.GetCount())
37 CGitProgressDlg progDlg(CWnd::FromHandle(hWndExplorer));
38 theApp.m_pMainWnd = &progDlg;
39 progDlg.SetCommand(CGitProgressDlg::GitProgress_Resolve);
40 if (parser.HasVal(_T("closeonend")))
41 progDlg.SetAutoClose(parser.GetLongVal(_T("closeonend")));
42 progDlg.SetOptions(parser.HasKey(_T("skipcheck")) ? ProgOptSkipConflictCheck : ProgOptNone);
43 progDlg.SetPathList(dlg.m_pathList);
44 progDlg.DoModal();
45 return !progDlg.DidErrorsOccur();
49 return false;