1 // TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2008-2012 - TortoiseGit
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.
20 // SyncDlg.cpp : implementation file
24 #include "TortoiseProc.h"
27 #include "progressdlg.h"
28 #include "MessageBox.h"
29 #include "ImportPatchDlg.h"
30 #include "RebaseDlg.h"
32 #include "SmartHandle.h"
36 IMPLEMENT_DYNAMIC(CSyncDlg
, CResizableStandAloneDialog
)
38 CSyncDlg::CSyncDlg(CWnd
* pParent
/*=NULL*/)
39 : CResizableStandAloneDialog(CSyncDlg::IDD
, pParent
)
41 m_pTooltip
=&this->m_tooltips
;
44 m_bAutoLoadPuttyKey
= CAppUtils::IsSSHPutty();
53 void CSyncDlg::DoDataExchange(CDataExchange
* pDX
)
55 CDialog::DoDataExchange(pDX
);
56 DDX_Check(pDX
, IDC_CHECK_PUTTY_KEY
, m_bAutoLoadPuttyKey
);
57 DDX_Check(pDX
, IDC_CHECK_FORCE
,m_bForce
);
58 DDX_Control(pDX
, IDC_COMBOBOXEX_URL
, m_ctrlURL
);
59 DDX_Control(pDX
, IDC_BUTTON_TABCTRL
, m_ctrlDumyButton
);
60 DDX_Control(pDX
, IDC_BUTTON_PULL
, m_ctrlPull
);
61 DDX_Control(pDX
, IDC_BUTTON_PUSH
, m_ctrlPush
);
62 DDX_Control(pDX
, IDC_STATIC_STATUS
, m_ctrlStatus
);
63 DDX_Control(pDX
, IDC_PROGRESS_SYNC
, m_ctrlProgress
);
64 DDX_Control(pDX
, IDC_ANIMATE_SYNC
, m_ctrlAnimate
);
65 DDX_Control(pDX
, IDC_BUTTON_SUBMODULE
,m_ctrlSubmodule
);
70 BEGIN_MESSAGE_MAP(CSyncDlg
, CResizableStandAloneDialog
)
71 ON_BN_CLICKED(IDC_BUTTON_PULL
, &CSyncDlg::OnBnClickedButtonPull
)
72 ON_BN_CLICKED(IDC_BUTTON_PUSH
, &CSyncDlg::OnBnClickedButtonPush
)
73 ON_BN_CLICKED(IDC_BUTTON_APPLY
, &CSyncDlg::OnBnClickedButtonApply
)
74 ON_BN_CLICKED(IDC_BUTTON_EMAIL
, &CSyncDlg::OnBnClickedButtonEmail
)
75 ON_BN_CLICKED(IDC_BUTTON_MANAGE
, &CSyncDlg::OnBnClickedButtonManage
)
77 ON_CBN_EDITCHANGE(IDC_COMBOBOXEX_URL
, &CSyncDlg::OnCbnEditchangeComboboxex
)
78 ON_CBN_EDITCHANGE(IDC_COMBOBOXEX_REMOTE_BRANCH
, &CSyncDlg::OnCbnEditchangeComboboxex
)
79 ON_MESSAGE(MSG_PROGRESSDLG_UPDATE_UI
, OnProgressUpdateUI
)
80 ON_NOTIFY(LVN_COLUMNCLICK
, IDC_IN_LOGLIST
, OnLvnInLogListColumnClick
)
81 ON_BN_CLICKED(IDC_BUTTON_COMMIT
, &CSyncDlg::OnBnClickedButtonCommit
)
82 ON_BN_CLICKED(IDC_BUTTON_SUBMODULE
, &CSyncDlg::OnBnClickedButtonSubmodule
)
84 ON_REGISTERED_MESSAGE(WM_TASKBARBTNCREATED
, OnTaskbarBtnCreated
)
85 ON_BN_CLICKED(IDC_CHECK_FORCE
, &CSyncDlg::OnBnClickedCheckForce
)
86 ON_BN_CLICKED(IDC_LOG
, &CSyncDlg::OnBnClickedLog
)
90 void CSyncDlg::EnableControlButton(bool bEnabled
)
92 GetDlgItem(IDC_BUTTON_PULL
)->EnableWindow(bEnabled
);
93 GetDlgItem(IDC_BUTTON_PUSH
)->EnableWindow(bEnabled
);
94 GetDlgItem(IDC_BUTTON_APPLY
)->EnableWindow(bEnabled
);
95 GetDlgItem(IDC_BUTTON_EMAIL
)->EnableWindow(bEnabled
);
96 GetDlgItem(IDOK
)->EnableWindow(bEnabled
);
97 GetDlgItem(IDC_BUTTON_SUBMODULE
)->EnableWindow(bEnabled
);
99 // CSyncDlg message handlers
101 void CSyncDlg::OnBnClickedButtonPull()
104 CurrentEntry
= this->m_ctrlPull
.GetCurrentEntry();
105 this->m_regPullButton
= CurrentEntry
;
107 this->m_bAbort
=false;
108 this->m_GitCmdList
.clear();
113 m_oldHash
= g_Git
.GetHash(_T("HEAD"));
115 if( CurrentEntry
== 0)
117 if( g_Git
.GetHash(this->m_strLocalBranch
) != m_oldHash
)
119 CMessageBox::Show(NULL
, IDS_PROC_SYNC_PULLWRONGBRANCH
, IDS_APPNAME
, MB_OK
| MB_ICONERROR
);
124 if(this->m_strURL
.IsEmpty())
126 CMessageBox::Show(NULL
, IDS_PROC_GITCONFIG_URLEMPTY
, IDS_APPNAME
, MB_OK
| MB_ICONERROR
);
130 if(this->m_bAutoLoadPuttyKey
)
132 CAppUtils::LaunchPAgent(NULL
,&this->m_strURL
);
139 force
= _T(" --force ");
143 ShowTab(IDC_CMD_LOG
);
145 this->m_ctrlTabCtrl
.ShowTab(IDC_IN_LOGLIST
-1,false);
146 this->m_ctrlTabCtrl
.ShowTab(IDC_IN_CHANGELIST
-1,false);
147 this->m_ctrlTabCtrl
.ShowTab(IDC_IN_CONFLICT
-1,false);
149 this->GetDlgItem(IDC_BUTTON_COMMIT
)->ShowWindow(SW_HIDE
);
152 if(CurrentEntry
== 0) //Pull
154 CString remotebranch
;
155 remotebranch
= m_strRemoteBranch
;
160 configName
.Format(L
"branch.%s.merge", this->m_strLocalBranch
);
161 CString pullBranch
= CGit::StripRefName(g_Git
.GetConfigValue(configName
));
163 configName
.Format(L
"branch.%s.remote", m_strLocalBranch
);
164 CString pullRemote
= g_Git
.GetConfigValue(configName
);
166 if(pullBranch
== remotebranch
&& pullRemote
== this->m_strURL
)
167 remotebranch
.Empty();
170 if(m_Gitverion
>= 0x01070203) //above 1.7.0.2
171 force
+= _T("--progress ");
173 cmd
.Format(_T("git.exe pull -v %s \"%s\" %s"),
178 m_CurrentCmd
= GIT_COMMAND_PULL
;
179 m_GitCmdList
.push_back(cmd
);
181 m_pThread
= AfxBeginThread(ProgressThreadEntry
, this, THREAD_PRIORITY_NORMAL
,0,CREATE_SUSPENDED
);
184 // ReportError(CString(MAKEINTRESOURCE(IDS_ERR_THREADSTARTFAILED)));
188 m_pThread
->m_bAutoDelete
= TRUE
;
189 m_pThread
->ResumeThread();
195 if(CurrentEntry
== 1 || CurrentEntry
==2 ) //Fetch
197 CString remotebranch
;
198 if(this->IsURL() || m_strRemoteBranch
.IsEmpty())
200 remotebranch
=this->m_strRemoteBranch
;
205 remotebranch
.Format(_T("remotes/%s/%s"),
206 m_strURL
,m_strRemoteBranch
);
207 if(g_Git
.GetHash(remotebranch
).IsEmpty())
208 remotebranch
=m_strRemoteBranch
;
210 remotebranch
=m_strRemoteBranch
+_T(":")+remotebranch
;
213 if(m_Gitverion
>= 0x01070203) //above 1.7.0.2
214 force
+= _T("--progress ");
216 cmd
.Format(_T("git.exe fetch -v %s \"%s\" %s"),
221 if(CurrentEntry
== 1)
222 m_CurrentCmd
= GIT_COMMAND_FETCH
;
224 m_CurrentCmd
= GIT_COMMAND_FETCHANDREBASE
;
225 m_GitCmdList
.push_back(cmd
);
227 m_pThread
= AfxBeginThread(ProgressThreadEntry
, this, THREAD_PRIORITY_NORMAL
,0,CREATE_SUSPENDED
);
230 // ReportError(CString(MAKEINTRESOURCE(IDS_ERR_THREADSTARTFAILED)));
234 m_pThread
->m_bAutoDelete
= TRUE
;
235 m_pThread
->ResumeThread();
240 if(CurrentEntry
== 3)
242 m_CurrentCmd
= GIT_COMMAND_REMOTE
;
243 cmd
=_T("git.exe remote update");
244 m_GitCmdList
.push_back(cmd
);
246 InterlockedExchange(&m_bBlock
, TRUE
);
248 m_pThread
= AfxBeginThread(ProgressThreadEntry
, this, THREAD_PRIORITY_NORMAL
,0,CREATE_SUSPENDED
);
251 // ReportError(CString(MAKEINTRESOURCE(IDS_ERR_THREADSTARTFAILED)));
252 InterlockedExchange(&m_bBlock
, FALSE
);
256 m_pThread
->m_bAutoDelete
= TRUE
;
257 m_pThread
->ResumeThread();
261 ///Cleanup stale remote banches
262 if(CurrentEntry
== 4)
264 m_CurrentCmd
= GIT_COMMAND_REMOTE
;
265 cmd
.Format(_T("git.exe remote prune \"%s\""), m_strURL
);
266 m_GitCmdList
.push_back(cmd
);
268 InterlockedExchange(&m_bBlock
, TRUE
);
270 m_pThread
= AfxBeginThread(ProgressThreadEntry
, this, THREAD_PRIORITY_NORMAL
,0,CREATE_SUSPENDED
);
273 // ReportError(CString(MAKEINTRESOURCE(IDS_ERR_THREADSTARTFAILED)));
274 InterlockedExchange(&m_bBlock
, FALSE
);
278 m_pThread
->m_bAutoDelete
= TRUE
;
279 m_pThread
->ResumeThread();
284 void CSyncDlg::PullComplete()
286 EnableControlButton(true);
288 this->FetchOutList(true);
291 newhash
= g_Git
.GetHash(_T("HEAD"));
293 if( this ->m_GitCmdStatus
)
296 if(g_Git
.ListConflictFile(list
))
298 this->m_ctrlCmdOut
.SetSel(-1,-1);
299 this->m_ctrlCmdOut
.ReplaceSel(_T("Get conflict files fail\n"));
301 this->ShowTab(IDC_CMD_LOG
);
305 if(list
.GetCount()>0)
307 this->m_ConflictFileList
.Clear();
312 this->m_ConflictFileList
.GetStatus(&list
,true);
313 this->m_ConflictFileList
.Show(CTGitPath::LOGACTIONS_UNMERGED
,
314 CTGitPath::LOGACTIONS_UNMERGED
);
316 this->ShowTab(IDC_IN_CONFLICT
);
318 this->GetDlgItem(IDC_BUTTON_COMMIT
)->ShowWindow(SW_NORMAL
);
321 this->ShowTab(IDC_CMD_LOG
);
326 if(newhash
== this->m_oldHash
)
328 this->m_ctrlTabCtrl
.ShowTab(IDC_IN_CHANGELIST
-1,false);
329 this->m_InLogList
.ShowText(CString(MAKEINTRESOURCE(IDS_UPTODATE
)));
330 this->m_ctrlTabCtrl
.ShowTab(IDC_IN_LOGLIST
-1,true);
334 this->m_ctrlTabCtrl
.ShowTab(IDC_IN_CHANGELIST
-1,true);
335 this->m_ctrlTabCtrl
.ShowTab(IDC_IN_LOGLIST
-1,true);
337 CString oldhash
=m_oldHash
.ToString();
338 this->AddDiffFileList(&m_InChangeFileList
,&m_arInChangeList
,newhash
,oldhash
);
340 m_InLogList
.FillGitLog(NULL
,CGit:: LOG_INFO_STAT
| CGit::LOG_INFO_FILESTATE
| CGit::LOG_INFO_SHOW_MERGEDFILE
,
343 this->ShowTab(IDC_IN_LOGLIST
);
347 void CSyncDlg::FetchComplete()
349 EnableControlButton(true);
351 this->FetchOutList(true);
353 ShowTab(IDC_CMD_LOG
);
354 if( (!this->m_GitCmdStatus
) && this->m_CurrentCmd
== GIT_COMMAND_FETCHANDREBASE
)
357 dlg
.m_PostButtonTexts
.Add(_T("Email &Patch..."));
358 int response
= dlg
.DoModal();
364 if(response
== IDC_REBASE_POST_BUTTON
)
366 CString cmd
, out
, err
;
367 cmd
.Format(_T("git.exe format-patch -o \"%s\" %s..%s"),
369 g_Git
.FixBranchName(dlg
.m_Upstream
),
370 g_Git
.FixBranchName(dlg
.m_Branch
));
371 if (g_Git
.Run(cmd
, &out
, &err
, CP_UTF8
))
373 CMessageBox::Show(NULL
, out
+ L
"\n" + err
, _T("TortoiseGit"), MB_OK
|MB_ICONERROR
);
377 CAppUtils::SendPatchMail(cmd
,out
);
382 void CSyncDlg::OnBnClickedButtonPush()
387 if(this->m_strURL
.IsEmpty())
389 CMessageBox::Show(NULL
, IDS_PROC_GITCONFIG_URLEMPTY
, IDS_APPNAME
, MB_OK
| MB_ICONERROR
);
393 this->m_regPushButton
=this->m_ctrlPush
.GetCurrentEntry();
395 this->m_bAbort
=false;
396 this->m_GitCmdList
.clear();
398 ShowTab(IDC_CMD_LOG
);
406 list
.AddPath(CTGitPath(g_Git
.m_CurrentDir
));
408 if (CHooks::Instance().PrePush(list
,exitcode
, error
))
413 temp
.Format(IDS_ERR_HOOKFAILED
, (LPCTSTR
)error
);
415 CMessageBox::Show(NULL
,temp
,_T("TortoiseGit"),MB_OK
|MB_ICONERROR
);
420 switch (m_ctrlPush
.GetCurrentEntry())
423 arg
+= _T(" --tags ");
426 arg
+= _T(" --all ");
431 arg
+= _T(" --force ");
433 if(m_Gitverion
>= 0x01070203) //above 1.7.0.2
434 arg
+= _T("--progress ");
436 cmd
.Format(_T("git.exe push -v %s \"%s\" %s"),
439 g_Git
.FixBranchName(m_strLocalBranch
));
441 if (!m_strRemoteBranch
.IsEmpty())
443 cmd
+= _T(":") + m_strRemoteBranch
;
446 m_GitCmdList
.push_back(cmd
);
448 m_CurrentCmd
= GIT_COMMAND_PUSH
;
450 if(this->m_bAutoLoadPuttyKey
)
452 CAppUtils::LaunchPAgent(NULL
,&this->m_strURL
);
455 m_pThread
= AfxBeginThread(ProgressThreadEntry
, this, THREAD_PRIORITY_NORMAL
,0,CREATE_SUSPENDED
);
458 // ReportError(CString(MAKEINTRESOURCE(IDS_ERR_THREADSTARTFAILED)));
462 m_pThread
->m_bAutoDelete
= TRUE
;
463 m_pThread
->ResumeThread();
467 void CSyncDlg::OnBnClickedButtonApply()
470 oldhash
=g_Git
.GetHash(_T("HEAD"));
475 if(dlg
.DoModal() == IDOK
)
478 for(int i
=0;i
<dlg
.m_PathList
.GetCount();i
++)
480 cmd
.Format(_T("git.exe am \"%s\""),dlg
.m_PathList
[i
].GetGitPathString());
482 if (g_Git
.Run(cmd
, &output
, CP_UTF8
))
484 CMessageBox::Show(NULL
,output
,_T("TortoiseGit"),MB_OK
);
489 this->m_ctrlCmdOut
.SetSel(-1,-1);
490 this->m_ctrlCmdOut
.ReplaceSel(cmd
+_T("\n"));
491 this->m_ctrlCmdOut
.SetSel(-1,-1);
492 this->m_ctrlCmdOut
.ReplaceSel(output
);
495 CString newhash
=g_Git
.GetHash(_T("HEAD"));
497 this->m_InLogList
.Clear();
498 this->m_InChangeFileList
.Clear();
500 if(newhash
== oldhash
)
502 this->m_ctrlTabCtrl
.ShowTab(IDC_IN_CHANGELIST
-1,false);
503 this->m_InLogList
.ShowText(_T("No commits get from patch"));
504 this->m_ctrlTabCtrl
.ShowTab(IDC_IN_LOGLIST
-1,true);
509 this->m_ctrlTabCtrl
.ShowTab(IDC_IN_CHANGELIST
-1,true);
510 this->m_ctrlTabCtrl
.ShowTab(IDC_IN_LOGLIST
-1,true);
512 this->AddDiffFileList(&m_InChangeFileList
,&m_arInChangeList
,newhash
,oldhash
);
513 m_InLogList
.FillGitLog(NULL
,CGit:: LOG_INFO_STAT
| CGit::LOG_INFO_FILESTATE
| CGit::LOG_INFO_SHOW_MERGEDFILE
,
516 this->FetchOutList(true);
519 this->m_ctrlTabCtrl
.ShowTab(IDC_CMD_LOG
-1,true);
523 this->ShowTab(IDC_CMD_LOG
);
527 this->ShowTab(IDC_IN_LOGLIST
);
532 void CSyncDlg::OnBnClickedButtonEmail()
534 CString cmd
, out
, err
;
536 this->m_strLocalBranch
= this->m_ctrlLocalBranch
.GetString();
537 this->m_ctrlRemoteBranch
.GetWindowText(this->m_strRemoteBranch
);
538 this->m_ctrlURL
.GetWindowText(this->m_strURL
);
539 m_strURL
=m_strURL
.Trim();
540 m_strRemoteBranch
=m_strRemoteBranch
.Trim();
542 cmd
.Format(_T("git.exe format-patch -o \"%s\" %s..%s"),
544 m_strURL
+_T('/')+m_strRemoteBranch
,g_Git
.FixBranchName(m_strLocalBranch
));
546 if (g_Git
.Run(cmd
, &out
, &err
, CP_UTF8
))
548 CMessageBox::Show(NULL
, out
+ L
"\n" + err
, _T("TortoiseGit"), MB_OK
|MB_ICONERROR
);
552 CAppUtils::SendPatchMail(cmd
,out
);
555 void CSyncDlg::ShowProgressCtrl(bool bShow
)
557 int b
=bShow
?SW_NORMAL
:SW_HIDE
;
558 this->m_ctrlAnimate
.ShowWindow(b
);
559 this->m_ctrlProgress
.ShowWindow(b
);
560 this->m_ctrlAnimate
.Open(IDR_DOWNLOAD
);
562 this->m_ctrlAnimate
.Play(0,-1,-1);
564 this->m_ctrlAnimate
.Stop();
566 void CSyncDlg::ShowInputCtrl(bool bShow
)
568 int b
=bShow
?SW_NORMAL
:SW_HIDE
;
569 this->m_ctrlURL
.ShowWindow(b
);
570 this->m_ctrlLocalBranch
.ShowWindow(b
);
571 this->m_ctrlRemoteBranch
.ShowWindow(b
);
572 this->GetDlgItem(IDC_BUTTON_LOCAL_BRANCH
)->ShowWindow(b
);
573 this->GetDlgItem(IDC_BUTTON_REMOTE_BRANCH
)->ShowWindow(b
);
574 this->GetDlgItem(IDC_STATIC_LOCAL_BRANCH
)->ShowWindow(b
);
575 this->GetDlgItem(IDC_STATIC_REMOTE_BRANCH
)->ShowWindow(b
);
576 this->GetDlgItem(IDC_BUTTON_MANAGE
)->ShowWindow(b
);
577 this->GetDlgItem(IDC_CHECK_PUTTY_KEY
)->ShowWindow(b
);
578 this->GetDlgItem(IDC_CHECK_FORCE
)->ShowWindow(b
);
579 this->GetDlgItem(IDC_STATIC_REMOTE_URL
)->ShowWindow(b
);
581 BOOL
CSyncDlg::OnInitDialog()
583 CResizableStandAloneDialog::OnInitDialog();
584 CAppUtils::MarkWindowAsUnpinnable(m_hWnd
);
586 // Let the TaskbarButtonCreated message through the UIPI filter. If we don't
587 // do this, Explorer would be unable to send that message to our window if we
588 // were running elevated. It's OK to make the call all the time, since if we're
589 // not elevated, this is a no-op.
590 CHANGEFILTERSTRUCT cfs
= { sizeof(CHANGEFILTERSTRUCT
) };
591 typedef BOOL STDAPICALLTYPE
ChangeWindowMessageFilterExDFN(HWND hWnd
, UINT message
, DWORD action
, PCHANGEFILTERSTRUCT pChangeFilterStruct
);
592 CAutoLibrary hUser
= ::LoadLibrary(_T("user32.dll"));
595 ChangeWindowMessageFilterExDFN
*pfnChangeWindowMessageFilterEx
= (ChangeWindowMessageFilterExDFN
*)GetProcAddress(hUser
, "ChangeWindowMessageFilterEx");
596 if (pfnChangeWindowMessageFilterEx
)
598 pfnChangeWindowMessageFilterEx(m_hWnd
, WM_TASKBARBTNCREATED
, MSGFLT_ALLOW
, &cfs
);
601 m_pTaskbarList
.Release();
602 m_pTaskbarList
.CoCreateInstance(CLSID_TaskbarList
);
604 this->GetDlgItem(IDC_CHECK_PUTTY_KEY
)->EnableWindow(CAppUtils::IsSSHPutty());
607 this->m_ctrlAnimate.ShowWindow(SW_NORMAL);
608 this->m_ctrlAnimate.Open(IDR_DOWNLOAD);
609 this->m_ctrlAnimate.Play(0,-1,-1);
612 // ------------------ Create Tabctrl -----------
613 CWnd
*pwnd
=this->GetDlgItem(IDC_BUTTON_TABCTRL
);
615 pwnd
->GetWindowRect(&rectDummy
);
616 this->ScreenToClient(rectDummy
);
618 if (!m_ctrlTabCtrl
.Create(CMFCTabCtrl::STYLE_FLAT
, rectDummy
, this, IDC_SYNC_TAB
))
620 TRACE0("Failed to create output tab window\n");
621 return FALSE
; // fail to create
623 m_ctrlTabCtrl
.SetResizeMode(CMFCTabCtrl::RESIZE_NO
);
625 // -------------Create Command Log Ctrl ---------
627 dwStyle
= ES_MULTILINE
| ES_READONLY
| WS_CHILD
| WS_VISIBLE
| ES_AUTOHSCROLL
| ES_AUTOVSCROLL
|WS_VSCROLL
;
629 if( !m_ctrlCmdOut
.Create(dwStyle
,rectDummy
,&m_ctrlTabCtrl
,IDC_CMD_LOG
))
631 TRACE0("Failed to create Log commits window\n");
632 return FALSE
; // fail to create
635 // set the font to use in the log message view, configured in the settings dialog
637 CAppUtils::CreateFontForLogs(m_logFont
);
638 //GetDlgItem(IDC_CMD_LOG)->SetFont(&m_logFont);
639 m_ctrlCmdOut
.SetFont(&m_logFont
);
640 m_ctrlTabCtrl
.InsertTab(&m_ctrlCmdOut
, CString(MAKEINTRESOURCE(IDS_LOG
)), -1);
642 //m_ctrlCmdOut.ReplaceSel(_T("Hello"));
644 //---------- Create in coming list ctrl -----------
645 dwStyle
=LVS_REPORT
| LVS_SHOWSELALWAYS
| LVS_ALIGNLEFT
| LVS_OWNERDATA
| WS_BORDER
| WS_TABSTOP
| WS_CHILD
| WS_VISIBLE
;;
647 if( !m_InLogList
.Create(dwStyle
,rectDummy
,&m_ctrlTabCtrl
,IDC_IN_LOGLIST
))
649 TRACE0("Failed to create output commits window\n");
650 return FALSE
; // fail to create
653 m_ctrlTabCtrl
.InsertTab(&m_InLogList
, CString(MAKEINTRESOURCE(IDS_PROC_SYNC_INCOMMITS
)), -1);
655 m_InLogList
.m_ColumnRegKey
=_T("SyncIn");
656 m_InLogList
.InsertGitColumn();
658 //----------- Create In Change file list -----------
659 dwStyle
= LVS_REPORT
| LVS_SHOWSELALWAYS
| LVS_ALIGNLEFT
| WS_BORDER
| WS_TABSTOP
|LVS_SINGLESEL
|WS_CHILD
| WS_VISIBLE
;
661 if( !m_InChangeFileList
.Create(dwStyle
,rectDummy
,&m_ctrlTabCtrl
,IDC_IN_CHANGELIST
))
663 TRACE0("Failed to create output change files window\n");
664 return FALSE
; // fail to create
666 m_ctrlTabCtrl
.InsertTab(&m_InChangeFileList
, CString(MAKEINTRESOURCE(IDS_PROC_SYNC_INCHANGELIST
)), -1);
668 m_InChangeFileList
.Init(GITSLC_COLEXT
| GITSLC_COLSTATUS
|GITSLC_COLADD
|GITSLC_COLDEL
, _T("InSyncDlg"),
669 (CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDGITLC_COMPARETWO
)|
670 CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDGITLC_GNUDIFF2
)), false, true, GITSLC_COLEXT
| GITSLC_COLSTATUS
| GITSLC_COLADD
| GITSLC_COLDEL
);
673 //---------- Create Conflict List Ctrl -----------------
674 dwStyle
= LVS_REPORT
| LVS_SHOWSELALWAYS
| LVS_ALIGNLEFT
| WS_BORDER
| WS_TABSTOP
|LVS_SINGLESEL
|WS_CHILD
| WS_VISIBLE
;
676 if( !m_ConflictFileList
.Create(dwStyle
,rectDummy
,&m_ctrlTabCtrl
,IDC_IN_CONFLICT
))
678 TRACE0("Failed to create output change files window\n");
679 return FALSE
; // fail to create
681 m_ctrlTabCtrl
.InsertTab(&m_ConflictFileList
,_T("Conflict"),-1);
683 m_ConflictFileList
.Init(GITSLC_COLEXT
| GITSLC_COLSTATUS
|GITSLC_COLADD
|GITSLC_COLDEL
, _T("ConflictSyncDlg"),
684 (CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDGITLC_COMPARETWO
)|
685 CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDGITLC_GNUDIFF2
)|
686 GITSLC_POPCONFLICT
|GITSLC_POPRESOLVE
),false);
689 //---------- Create Commit Out List Ctrl---------------
691 dwStyle
=LVS_REPORT
| LVS_SHOWSELALWAYS
| LVS_ALIGNLEFT
| LVS_OWNERDATA
| WS_BORDER
| WS_TABSTOP
| WS_CHILD
| WS_VISIBLE
;;
693 if( !m_OutLogList
.Create(dwStyle
,rectDummy
,&m_ctrlTabCtrl
,IDC_OUT_LOGLIST
))
695 TRACE0("Failed to create output commits window\n");
696 return FALSE
; // fail to create
700 m_ctrlTabCtrl
.InsertTab(&m_OutLogList
, CString(MAKEINTRESOURCE(IDS_PROC_SYNC_OUTCOMMITS
)), -1);
702 m_OutLogList
.m_ColumnRegKey
= _T("SyncOut");
703 m_OutLogList
.InsertGitColumn();
705 //------------- Create Change File List Control ----------------
707 dwStyle
= LVS_REPORT
| LVS_SHOWSELALWAYS
| LVS_ALIGNLEFT
| WS_BORDER
| WS_TABSTOP
|LVS_SINGLESEL
|WS_CHILD
| WS_VISIBLE
;
709 if( !m_OutChangeFileList
.Create(dwStyle
,rectDummy
,&m_ctrlTabCtrl
,IDC_OUT_CHANGELIST
))
711 TRACE0("Failed to create output change files window\n");
712 return FALSE
; // fail to create
714 m_ctrlTabCtrl
.InsertTab(&m_OutChangeFileList
, CString(MAKEINTRESOURCE(IDS_PROC_SYNC_OUTCHANGELIST
)), -1);
716 m_OutChangeFileList
.Init(GITSLC_COLEXT
| GITSLC_COLSTATUS
| GITSLC_COLADD
| GITSLC_COLDEL
, _T("OutSyncDlg"),
717 (CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDGITLC_COMPARETWO
)|
718 CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDGITLC_GNUDIFF2
)), false, true, GITSLC_COLEXT
| GITSLC_COLSTATUS
| GITSLC_COLADD
| GITSLC_COLDEL
);
720 this->m_tooltips
.Create(this);
722 AddAnchor(IDC_SYNC_TAB
,TOP_LEFT
,BOTTOM_RIGHT
);
724 AddAnchor(IDC_GROUP_INFO
,TOP_LEFT
,TOP_RIGHT
);
725 AddAnchor(IDC_COMBOBOXEX_URL
,TOP_LEFT
,TOP_RIGHT
);
726 AddAnchor(IDC_BUTTON_MANAGE
,TOP_RIGHT
);
727 AddAnchor(IDC_BUTTON_PULL
,BOTTOM_LEFT
);
728 AddAnchor(IDC_BUTTON_PUSH
,BOTTOM_LEFT
);
729 AddAnchor(IDC_BUTTON_SUBMODULE
,BOTTOM_LEFT
);
730 AddAnchor(IDC_BUTTON_APPLY
,BOTTOM_RIGHT
);
731 AddAnchor(IDC_BUTTON_EMAIL
,BOTTOM_RIGHT
);
732 AddAnchor(IDC_PROGRESS_SYNC
,TOP_LEFT
,TOP_RIGHT
);
733 AddAnchor(IDOK
,BOTTOM_RIGHT
);
734 AddAnchor(IDHELP
,BOTTOM_RIGHT
);
735 AddAnchor(IDC_STATIC_STATUS
, BOTTOM_LEFT
, BOTTOM_RIGHT
);
736 AddAnchor(IDC_ANIMATE_SYNC
,TOP_LEFT
);
737 AddAnchor(IDC_BUTTON_COMMIT
,BOTTOM_LEFT
);
738 AddAnchor(IDC_BUTTON_LOG
, BOTTOM_LEFT
);
740 // do not use BRANCH_COMBOX_ADD_ANCHOR here, we want to have different stylings
741 AddAnchor(IDC_COMBOBOXEX_LOCAL_BRANCH
, TOP_LEFT
,TOP_CENTER
);
742 AddAnchor(IDC_COMBOBOXEX_REMOTE_BRANCH
, TOP_CENTER
, TOP_RIGHT
);
743 AddAnchor(IDC_BUTTON_LOCAL_BRANCH
, TOP_CENTER
);
744 AddAnchor(IDC_BUTTON_REMOTE_BRANCH
, TOP_RIGHT
);
745 AddAnchor(IDC_STATIC_REMOTE_BRANCH
, TOP_CENTER
);
747 this->GetDlgItem(IDC_BUTTON_COMMIT
)->ShowWindow(SW_HIDE
);
749 AdjustControlSize(IDC_CHECK_PUTTY_KEY
);
750 AdjustControlSize(IDC_CHECK_FORCE
);
752 CString WorkingDir
=g_Git
.m_CurrentDir
;
753 WorkingDir
.Replace(_T(':'),_T('_'));
754 m_RegKeyRemoteBranch
= CString(_T("Software\\TortoiseGit\\History\\SyncBranch\\"))+WorkingDir
;
757 this->AddOthersToAnchor();
759 this->m_ctrlPush
.AddEntry(CString(MAKEINTRESOURCE(IDS_PROC_SYNC_PUSH
)));
760 this->m_ctrlPush
.AddEntry(CString(MAKEINTRESOURCE(IDS_PROC_SYNC_PUSHTAGS
)));
761 ///this->m_ctrlPush.AddEntry(CString(_T("Push All")));
763 this->m_ctrlPull
.AddEntry(CString(MAKEINTRESOURCE(IDS_PROC_SYNC_PULL
)));
764 this->m_ctrlPull
.AddEntry(CString(MAKEINTRESOURCE(IDS_PROC_SYNC_FETCH
)));
765 this->m_ctrlPull
.AddEntry(CString(MAKEINTRESOURCE(IDS_PROC_SYNC_FETCHREBASE
)));
766 this->m_ctrlPull
.AddEntry(CString(MAKEINTRESOURCE(IDS_PROC_SYNC_REMOTEUPDATE
)));
767 this->m_ctrlPull
.AddEntry(CString(MAKEINTRESOURCE(IDS_PROC_SYNC_CLEANUPSTALEBRANCHES
)));
769 this->m_ctrlSubmodule
.AddEntry(CString(MAKEINTRESOURCE(IDS_PROC_SYNC_SUBKODULEUPDATE
)));
770 this->m_ctrlSubmodule
.AddEntry(CString(MAKEINTRESOURCE(IDS_PROC_SYNC_SUBKODULEINIT
)));
771 this->m_ctrlSubmodule
.AddEntry(CString(MAKEINTRESOURCE(IDS_PROC_SYNC_SUBKODULESYNC
)));
773 WorkingDir
.Replace(_T(':'),_T('_'));
776 regkey
.Format(_T("Software\\TortoiseGit\\TortoiseProc\\Sync\\%s"),WorkingDir
);
778 this->m_regPullButton
= CRegDWORD(regkey
+_T("\\Pull"),0);
779 this->m_regPushButton
= CRegDWORD(regkey
+_T("\\Push"),0);
780 this->m_regSubmoduleButton
= CRegDWORD(regkey
+_T("\\Submodule"));
781 this->m_regAutoLoadPutty
= CRegDWORD(regkey
+ _T("\\AutoLoadPutty"), CAppUtils::IsSSHPutty());
783 m_tooltips
.Create(this);
785 this->m_bAutoLoadPuttyKey
= m_regAutoLoadPutty
;
786 if(!CAppUtils::IsSSHPutty())
787 m_bAutoLoadPuttyKey
= false;
788 this->UpdateData(FALSE
);
790 this->m_ctrlPull
.SetCurrentEntry(this->m_regPullButton
);
791 this->m_ctrlPush
.SetCurrentEntry(this->m_regPushButton
);
792 this->m_ctrlSubmodule
.SetCurrentEntry(this->m_regSubmoduleButton
);
794 CString sWindowTitle
;
795 GetWindowText(sWindowTitle
);
796 CAppUtils::SetWindowTitle(m_hWnd
, g_Git
.m_CurrentDir
, sWindowTitle
);
798 EnableSaveRestore(_T("SyncDlg"));
800 this->m_ctrlURL
.LoadHistory(CString(_T("Software\\TortoiseGit\\History\\SyncURL\\"))+WorkingDir
, _T("url"));
804 if(!g_Git
.GetRemoteList(list
))
806 for(unsigned int i
=0;i
<list
.size();i
++)
808 m_ctrlURL
.AddString(list
[i
]);
811 m_ctrlURL
.SetCurSel(0);
812 m_ctrlRemoteBranch
.SetCurSel(0);
813 m_ctrlURL
.SetURLHistory(true);
815 this->LoadBranchInfo();
817 this->m_bInited
=true;
820 m_ctrlTabCtrl
.ShowTab(IDC_CMD_LOG
-1,false);
821 m_ctrlTabCtrl
.ShowTab(IDC_IN_LOGLIST
-1,false);
822 m_ctrlTabCtrl
.ShowTab(IDC_IN_CHANGELIST
-1,false);
823 m_ctrlTabCtrl
.ShowTab(IDC_IN_CONFLICT
-1,false);
825 m_ctrlRemoteBranch
.m_bWantReturn
= TRUE
;
826 m_ctrlURL
.m_bWantReturn
= TRUE
;
828 this->m_Gitverion
= CAppUtils::GetMsysgitVersion();
830 return TRUE
; // return TRUE unless you set the focus to a control
831 // EXCEPTION: OCX Property Pages should return FALSE
834 void CSyncDlg::OnBnClickedButtonManage()
836 CAppUtils::LaunchRemoteSetting();
840 void CSyncDlg::Refresh()
842 theApp
.DoWaitCursor(1);
844 int lastSelected
= m_ctrlURL
.GetCurSel();
846 this->m_ctrlURL
.GetWindowText(url
);
848 this->m_ctrlURL
.Reset();
849 CString workingDir
= g_Git
.m_CurrentDir
;
850 workingDir
.Replace(_T(':'), _T('_'));
851 this->m_ctrlURL
.LoadHistory(_T("Software\\TortoiseGit\\History\\SyncURL\\") + workingDir
, _T("url"));
855 if (!g_Git
.GetRemoteList(list
))
857 for (int i
= 0; i
< list
.size(); i
++)
859 m_ctrlURL
.AddString(list
[i
]);
864 if (lastSelected
>= 0 && !found
)
866 m_ctrlURL
.SetCurSel(0);
867 m_ctrlURL
.GetWindowText(url
);
872 this->m_ctrlLocalBranch
.GetWindowText(local
);
873 this->m_ctrlRemoteBranch
.GetWindowText(remote
);
875 this->LoadBranchInfo();
877 this->m_ctrlLocalBranch
.AddString(local
);
878 this->m_ctrlRemoteBranch
.AddString(remote
);
879 this->m_ctrlURL
.AddString(url
);
881 m_OutLogList
.ShowText(CString(MAKEINTRESOURCE(IDS_PROC_SYNC_REFRESHING
)));
882 this->FetchOutList(true);
883 theApp
.DoWaitCursor(-1);
886 BOOL
CSyncDlg::PreTranslateMessage(MSG
* pMsg
)
888 if (pMsg
->message
== WM_KEYDOWN
)
890 switch (pMsg
->wParam
)
896 return CResizableStandAloneDialog::PreTranslateMessage(pMsg
);
901 /* Avoid TAB control destroy but dialog exist*/
906 ::GetClassName(pMsg
->hwnd
,buff
,128);
908 if(_tcsnicmp(buff
,_T("RichEdit20W"),128)==0)
910 this->PostMessage(WM_KEYDOWN
,VK_ESCAPE
,0);
916 m_tooltips
.RelayEvent(pMsg
);
917 return __super::PreTranslateMessage(pMsg
);
919 void CSyncDlg::FetchOutList(bool force
)
923 m_OutChangeFileList
.Clear();
924 this->m_OutLogList
.Clear();
927 this->m_ctrlURL
.GetWindowText(remote
);
928 CString remotebranch
;
929 this->m_ctrlRemoteBranch
.GetWindowText(remotebranch
);
930 remotebranch
=remote
+_T("/")+remotebranch
;
935 str
.LoadString(IDS_PROC_SYNC_PUSH_UNKNOWN
);
936 m_OutLogList
.ShowText(str
);
937 this->m_ctrlTabCtrl
.ShowTab(m_OutChangeFileList
.GetDlgCtrlID()-1,FALSE
);
938 m_OutLocalBranch
.Empty();
939 m_OutRemoteBranch
.Empty();
941 this->GetDlgItem(IDC_BUTTON_EMAIL
)->EnableWindow(FALSE
);
945 else if(g_Git
.GetHash(remotebranch
).IsEmpty())
948 str
.Format(IDS_PROC_SYNC_PUSH_UNKNOWNBRANCH
, remotebranch
);
949 m_OutLogList
.ShowText(str
);
950 this->m_ctrlTabCtrl
.ShowTab(m_OutChangeFileList
.GetDlgCtrlID()-1,FALSE
);
951 m_OutLocalBranch
.Empty();
952 m_OutRemoteBranch
.Empty();
954 this->GetDlgItem(IDC_BUTTON_EMAIL
)->EnableWindow(FALSE
);
960 localbranch
=this->m_ctrlLocalBranch
.GetString();
962 if(localbranch
!= m_OutLocalBranch
|| m_OutRemoteBranch
!= remotebranch
|| force
)
964 m_OutLogList
.ClearText();
966 CGitHash base
, remotehash
;
967 CString cmd
, basestr
, err
;
968 cmd
.Format(_T("git.exe merge-base %s %s"), g_Git
.FixBranchName(remotebranch
), g_Git
.FixBranchName(localbranch
));
969 g_Git
.Run(cmd
, &basestr
, &err
, CP_UTF8
);
972 remotehash
= g_Git
.GetHash(remotebranch
);
973 if (remotehash
== g_Git
.GetHash(localbranch
))
976 str
.Format(IDS_PROC_SYNC_COMMITSAHEAD
, 0, remotebranch
);
977 m_OutLogList
.ShowText(str
);
978 this->m_ctrlStatus
.SetWindowText(str
);
979 this->m_ctrlTabCtrl
.ShowTab(m_OutChangeFileList
.GetDlgCtrlID()-1,FALSE
);
980 this->GetDlgItem(IDC_BUTTON_EMAIL
)->EnableWindow(FALSE
);
982 else if (remotehash
== base
|| m_bForce
)
985 m_OutLogList
.FillGitLog(NULL
, CGit::LOG_INFO_STAT
| CGit::LOG_INFO_FILESTATE
| CGit::LOG_INFO_SHOW_MERGEDFILE
, &remotebranch
, &localbranch
);
987 str
.Format(IDS_PROC_SYNC_COMMITSAHEAD
, m_OutLogList
.GetItemCount(), remotebranch
);
988 this->m_ctrlStatus
.SetWindowText(str
);
990 if (remotehash
== base
)
991 AddDiffFileList(&m_OutChangeFileList
, &m_arOutChangeList
, localbranch
, remotebranch
);
993 AddDiffFileList(&m_OutChangeFileList
, &m_arOutChangeList
, localbranch
, base
.ToString());
995 this->m_ctrlTabCtrl
.ShowTab(m_OutChangeFileList
.GetDlgCtrlID()-1,TRUE
);
996 this->GetDlgItem(IDC_BUTTON_EMAIL
)->EnableWindow(TRUE
);
1001 str
.Format(IDS_PROC_SYNC_NOFASTFORWARD
, localbranch
, remotebranch
);
1002 m_OutLogList
.ShowText(str
);
1003 this->m_ctrlStatus
.SetWindowText(str
);
1004 this->m_ctrlTabCtrl
.ShowTab(m_OutChangeFileList
.GetDlgCtrlID() - 1, FALSE
);
1005 this->GetDlgItem(IDC_BUTTON_EMAIL
)->EnableWindow(FALSE
);
1008 this->m_OutLocalBranch
=localbranch
;
1009 this->m_OutRemoteBranch
=remotebranch
;
1014 bool CSyncDlg::IsURL()
1017 this->m_ctrlURL
.GetWindowText(str
);
1018 if(str
.Find(_T('\\'))>=0 || str
.Find(_T('/'))>=0)
1023 void CSyncDlg::OnCbnEditchangeComboboxex()
1025 SetTimer(IDT_INPUT
, 1000, NULL
);
1026 this->m_OutLogList
.ShowText(CString(MAKEINTRESOURCE(IDS_PROC_SYNC_WAINTINPUT
)));
1028 //this->FetchOutList();
1031 UINT
CSyncDlg::ProgressThread()
1033 m_GitCmdStatus
=CProgressDlg::RunCmdList(this,m_GitCmdList
,true,NULL
,&this->m_bAbort
);
1034 InterlockedExchange(&m_bBlock
, FALSE
);
1039 LRESULT
CSyncDlg::OnProgressUpdateUI(WPARAM wParam
,LPARAM lParam
)
1041 if(wParam
== MSG_PROGRESSDLG_START
)
1043 m_ctrlAnimate
.Play(0,-1,-1);
1044 this->m_ctrlProgress
.SetPos(0);
1047 m_pTaskbarList
->SetProgressState(m_hWnd
, TBPF_NORMAL
);
1048 m_pTaskbarList
->SetProgressValue(m_hWnd
, 0, 100);
1052 if(wParam
== MSG_PROGRESSDLG_END
|| wParam
== MSG_PROGRESSDLG_FAILED
)
1055 m_ctrlAnimate
.Stop();
1056 m_ctrlProgress
.SetPos(100);
1057 //this->DialogEnableWindow(IDOK,TRUE);
1059 m_pTaskbarList
->SetProgressState(m_hWnd
, TBPF_NOPROGRESS
);
1061 //if(wParam == MSG_PROGRESSDLG_END)
1062 if(this->m_CurrentCmd
== GIT_COMMAND_PUSH
)
1067 list
.AddPath(CTGitPath(g_Git
.m_CurrentDir
));
1070 if (CHooks::Instance().PostPush(list
,exitcode
, error
))
1075 temp
.Format(IDS_ERR_HOOKFAILED
, (LPCTSTR
)error
);
1076 //ReportError(temp);
1077 CMessageBox::Show(NULL
,temp
,_T("TortoiseGit"),MB_OK
|MB_ICONERROR
);
1083 EnableControlButton(true);
1085 this->FetchOutList(true);
1087 if(this->m_CurrentCmd
== GIT_COMMAND_PULL
)
1091 if(this->m_CurrentCmd
== GIT_COMMAND_FETCH
|| this->m_CurrentCmd
== GIT_COMMAND_FETCHANDREBASE
)
1095 if(this->m_CurrentCmd
== GIT_COMMAND_SUBMODULE
)
1097 //this->m_ctrlCmdOut.SetSel(-1,-1);
1098 //this->m_ctrlCmdOut.ReplaceSel(_T("Done\r\n"));
1099 //this->m_ctrlCmdOut.SetSel(-1,-1);
1100 EnableControlButton(true);
1103 if(this->m_CurrentCmd
== GIT_COMMAND_REMOTE
)
1105 this->FetchOutList(true);
1106 EnableControlButton(true);
1112 ParserCmdOutput((char)lParam
);
1118 void CSyncDlg::ParserCmdOutput(char ch
)
1120 CProgressDlg::ParserCmdOutput(m_ctrlCmdOut
,m_ctrlProgress
,m_hWnd
,m_pTaskbarList
,m_LogText
,ch
);
1122 void CSyncDlg::OnBnClickedButtonCommit()
1124 CString cmd
= _T("/command:commit");
1125 cmd
+= _T(" /path:\"");
1126 cmd
+= g_Git
.m_CurrentDir
;
1129 CAppUtils::RunTortoiseProc(cmd
);
1132 void CSyncDlg::OnOK()
1136 m_ctrlURL
.SaveHistory();
1138 m_regAutoLoadPutty
= this->m_bAutoLoadPuttyKey
;
1142 void CSyncDlg::OnBnClickedButtonSubmodule()
1147 this->m_regSubmoduleButton
= this->m_ctrlSubmodule
.GetCurrentEntry();
1149 this->SwitchToRun();
1151 this->m_bAbort
=false;
1152 this->m_GitCmdList
.clear();
1154 ShowTab(IDC_CMD_LOG
);
1158 switch (m_ctrlSubmodule
.GetCurrentEntry())
1161 cmd
=_T("git.exe submodule update --init");
1164 cmd
=_T("git.exe submodule init");
1167 cmd
=_T("git.exe submodule sync");
1171 m_GitCmdList
.push_back(cmd
);
1173 m_CurrentCmd
= GIT_COMMAND_SUBMODULE
;
1175 m_pThread
= AfxBeginThread(ProgressThreadEntry
, this, THREAD_PRIORITY_NORMAL
,0,CREATE_SUSPENDED
);
1176 if (m_pThread
==NULL
)
1178 // ReportError(CString(MAKEINTRESOURCE(IDS_ERR_THREADSTARTFAILED)));
1182 m_pThread
->m_bAutoDelete
= TRUE
;
1183 m_pThread
->ResumeThread();
1187 void CSyncDlg::OnTimer(UINT_PTR nIDEvent
)
1189 if( nIDEvent
== IDT_INPUT
)
1191 KillTimer(IDT_INPUT
);
1192 this->FetchOutList(true);
1197 void CSyncDlg::OnLvnInLogListColumnClick(NMHDR
*pNMHDR
, LRESULT
*pResult
)
1202 LRESULT
CSyncDlg::OnTaskbarBtnCreated(WPARAM
/*wParam*/, LPARAM
/*lParam*/)
1204 m_pTaskbarList
.Release();
1205 m_pTaskbarList
.CoCreateInstance(CLSID_TaskbarList
);
1209 void CSyncDlg::OnBnClickedCheckForce()
1214 void CSyncDlg::OnBnClickedLog()
1216 CString cmd
= _T("/command:log");
1217 cmd
+= _T(" /path:\"");
1218 cmd
+= g_Git
.m_CurrentDir
;
1221 CAppUtils::RunTortoiseProc(cmd
);