4 #include "StandAloneDlg.h"
5 #include "GitStatusListCtrl.h"
7 #include "SplitterControl.h"
8 #include "HistoryCombo.h"
10 #include "GitLogList.h"
12 #define IDC_REBASE_TAB 0x1000000
14 #define REBASE_TAB_CONFLICT 0
15 #define REBASE_TAB_MESSAGE 1
16 #define REBASE_TAB_LOG 2
18 #define MSG_REBASE_UPDATE_UI (WM_USER+151)
20 class CRebaseDlg
: public CResizableStandAloneDialog
22 DECLARE_DYNAMIC(CRebaseDlg
)
25 CRebaseDlg(CWnd
* pParent
= NULL
); // standard constructor
26 virtual ~CRebaseDlg();
29 enum { IDD
= IDD_REBASE
};
34 CHOOSE_COMMIT_PICK_MODE
,
42 REBASE_SQUASH_CONFLICT
,
46 virtual void DoDataExchange(CDataExchange
* pDX
); // DDX/DDV support
47 virtual BOOL
OnInitDialog();
49 virtual LRESULT
DefWindowProc(UINT message
, WPARAM wParam
, LPARAM lParam
);
50 LRESULT
OnRebaseUpdateUI(WPARAM wParam
, LPARAM lParam
);
51 void DoSize(int delta
);
52 void AddRebaseAnchor();
55 void SetSplitterRange();
56 void SaveSplitterPos();
58 void LoadBranchInfo();
60 void SetAllRebaseAction(int action
);
64 CRect m_CommitListOrigRect
;
65 BOOL
PreTranslateMessage(MSG
* pMsg
);
67 CSciEdit m_wndOutputRebase
;
68 void SetContinueButtonText();
69 void SetControlEnable();
70 void UpdateProgress();
71 void UpdateCurrentStatus();
72 void ListConflictFile();
74 volatile LONG m_bThreadRunning
;
76 static UINT
RebaseThreadEntry(LPVOID pVoid
){return ((CRebaseDlg
*)pVoid
)->RebaseThread();};
79 CString m_OrigBranchHash
;
80 CString m_OrigUpstreamHash
;
82 int VerifyNoConflict();
83 CString
GetRebaseModeName(int rebasemode
);
85 CString m_SquashMessage
;
87 int CheckNextCommitIsSquash();
88 int GetCurrentCommitID();
92 afx_msg
void OnBnClickedPickAll();
93 afx_msg
void OnBnClickedSquashAll();
94 afx_msg
void OnBnClickedEditAll();
95 afx_msg
void OnBnClickedRebaseSplit();
96 afx_msg
void OnSize(UINT nType
, int cx
, int cy
);
97 afx_msg
void OnCbnSelchangeBranch();
98 afx_msg
void OnCbnSelchangeUpstream();
99 afx_msg
void OnBnClickedContinue();
100 afx_msg
void OnBnClickedAbort();
102 CProgressCtrl m_ProgressBar
;
103 CStatic m_CtrlStatusText
;
110 CSplitterControl m_wndSplitter
;
111 CMFCTabCtrl m_ctrlTabCtrl
;
112 CGitStatusListCtrl m_FileListCtrl
;
113 CSciEdit m_LogMessageCtrl
;
115 CGitLogList m_CommitList
;
117 CHistoryCombo m_BranchCtrl
;
118 CHistoryCombo m_UpstreamCtrl
;
123 REBASE_STAGE m_RebaseStage
;
125 void AddBranchToolTips(CHistoryCombo
*pBranch
);
126 void AddLogString(CString str
);
128 int CheckRebaseCondition();
129 int m_CurrentRebaseIndex
;