#include "IconMenu.h"\r
#include "BugTraqAssociations.h"\r
\r
+static UINT WM_GITPROGRESS = RegisterWindowMessage(_T("TORTOISEGIT_GITPROGRESS_MSG"));\r
\r
BOOL CGitProgressDlg::m_bAscending = FALSE;\r
int CGitProgressDlg::m_nSortedColumn = -1;\r
ON_NOTIFY(HDN_ITEMCLICK, 0, OnHdnItemclickSvnprogress)\r
ON_WM_SETCURSOR()\r
ON_WM_CONTEXTMENU()\r
- ON_REGISTERED_MESSAGE(WM_SVNPROGRESS, OnSVNProgress)\r
+ ON_REGISTERED_MESSAGE(WM_GITPROGRESS, OnGitProgress)\r
ON_WM_TIMER()\r
ON_EN_SETFOCUS(IDC_INFOTEXT, &CGitProgressDlg::OnEnSetfocusInfotext)\r
ON_NOTIFY(LVN_BEGINDRAG, IDC_SVNPROGRESS, &CGitProgressDlg::OnLvnBegindragSvnprogress)\r
\r
LRESULT CGitProgressDlg::OnShowConflictResolver(WPARAM /*wParam*/, LPARAM lParam)\r
{\r
+#if 0\r
CConflictResolveDlg dlg(this);\r
const svn_wc_conflict_description_t *description = (svn_wc_conflict_description_t *)lParam;\r
if (description)\r
m_bCancelled = dlg.IsCancelled();\r
return dlg.GetResult();\r
}\r
+\r
return svn_wc_conflict_choose_postpone;\r
+#endif\r
+ return 0;\r
}\r
-\r
+#if 0\r
svn_wc_conflict_choice_t CGitProgressDlg::ConflictResolveCallback(const svn_wc_conflict_description_t *description, CString& mergedfile)\r
{\r
// we only bother the user when merging\r
- if (((m_Command == SVNProgress_Merge)||(m_Command == SVNProgress_MergeAll)||(m_Command == SVNProgress_MergeReintegrate))&&(!m_AlwaysConflicted)&&(description))\r
+ if (((m_Command == GitProgress_Merge)||(m_Command == GitProgress_MergeAll)||(m_Command == GitProgress_MergeReintegrate))&&(!m_AlwaysConflicted)&&(description))\r
{\r
// we're in a worker thread here. That means we must not show a dialog from the thread\r
// but let the UI thread do it.\r
\r
return svn_wc_conflict_choose_postpone;\r
}\r
-\r
+#endif\r
void CGitProgressDlg::AddItemToList()\r
{\r
int totalcount = m_ProgList.GetItemCount();\r
}\r
}\r
\r
-BOOL CGitProgressDlg::Notify(const CTSVNPath& path, svn_wc_notify_action_t action, \r
+\r
+BOOL CGitProgressDlg::Notify(const CTGitPath& path, git_wc_notify_action_t action\r
+ /*\r
svn_node_kind_t kind, const CString& mime_type, \r
svn_wc_notify_state_t content_state, \r
svn_wc_notify_state_t prop_state, LONG rev,\r
const svn_lock_t * lock, svn_wc_notify_lock_state_t lock_state,\r
const CString& changelistname,\r
svn_merge_range_t * range,\r
- svn_error_t * err, apr_pool_t * pool)\r
+ svn_error_t * err, apr_pool_t * pool\r
+ */)\r
{\r
bool bNoNotify = false;\r
bool bDoAddData = true;\r
NotificationData * data = new NotificationData();\r
data->path = path;\r
data->action = action;\r
+ data->sPathColumnText=path.GetGitPathString();\r
+#if 0\r
data->kind = kind;\r
data->mime_type = mime_type;\r
data->content_state = content_state;\r
data->basepath = m_basePath;\r
if (range)\r
data->merge_range = *range;\r
+#endif\r
switch (data->action)\r
{\r
- case svn_wc_notify_add:\r
- case svn_wc_notify_update_add:\r
- if ((data->content_state == svn_wc_notify_state_conflicted) || (data->prop_state == svn_wc_notify_state_conflicted))\r
- {\r
- data->color = m_Colors.GetColor(CColors::Conflict);\r
- data->bConflictedActionItem = true;\r
- data->sActionColumnText.LoadString(IDS_SVNACTION_CONFLICTED);\r
- m_nConflicts++;\r
- }\r
- else\r
- {\r
- m_bMergesAddsDeletesOccurred = true;\r
+ case git_wc_notify_add:\r
+ //case svn_wc_notify_update_add:\r
+ // if ((data->content_state == svn_wc_notify_state_conflicted) || (data->prop_state == svn_wc_notify_state_conflicted))\r
+ // {\r
+ // data->color = m_Colors.GetColor(CColors::Conflict);\r
+ // data->bConflictedActionItem = true;\r
+ // data->sActionColumnText.LoadString(IDS_SVNACTION_CONFLICTED);\r
+ // m_nConflicts++;\r
+ // }\r
+ // else\r
+ // {\r
+ // m_bMergesAddsDeletesOccurred = true;\r
data->sActionColumnText.LoadString(IDS_SVNACTION_ADD);\r
data->color = m_Colors.GetColor(CColors::Added);\r
- }\r
+ // }\r
break;\r
+#if 0\r
case svn_wc_notify_commit_added:\r
data->sActionColumnText.LoadString(IDS_SVNACTION_ADDING);\r
data->color = m_Colors.GetColor(CColors::Added);\r
data->sActionColumnText.Format(IDS_SVNACTION_MERGEBEGINMULTIPLEREVERSE, data->merge_range.start, data->merge_range.end + 1);\r
data->bAuxItem = true;\r
break;\r
+#endif\r
default:\r
break;\r
} // switch (data->action)\r
{\r
m_arData.push_back(data);\r
AddItemToList();\r
- if ((!data->bAuxItem)&&(m_itemCount > 0))\r
+ if (/*(!data->bAuxItem)&&*/(m_itemCount > 0))\r
{\r
m_itemCount--;\r
\r
progControl->SetRange32(0, m_itemCountTotal);\r
}\r
}\r
- if ((action == svn_wc_notify_commit_postfix_txdelta)&&(bSecondResized == FALSE))\r
- {\r
- ResizeColumns();\r
- bSecondResized = TRUE;\r
- }\r
+ //if ((action == svn_wc_notify_commit_postfix_txdelta)&&(bSecondResized == FALSE))\r
+ //{\r
+ // ResizeColumns();\r
+ // bSecondResized = TRUE;\r
+ //}\r
}\r
\r
return TRUE;\r
}\r
\r
+\r
CString CGitProgressDlg::BuildInfoString()\r
{\r
CString infotext;\r
+#if 0\r
+ \r
CString temp;\r
int added = 0;\r
int copied = 0;\r
infotext += temp;\r
infotext.AppendFormat(_T(":%d "), resolved);\r
}\r
+#endif\r
return infotext;\r
}\r
\r
-void CGitProgressDlg::SetSelectedList(const CTSVNPathList& selPaths)\r
+void CGitProgressDlg::SetSelectedList(const CTGitPathList& selPaths)\r
{\r
m_selectedPaths = selPaths;\r
}\r
AddAnchor(IDCANCEL, BOTTOM_RIGHT);\r
AddAnchor(IDOK, BOTTOM_RIGHT);\r
AddAnchor(IDC_LOGBUTTON, BOTTOM_RIGHT);\r
- SetPromptParentWindow(this->m_hWnd);\r
+ //SetPromptParentWindow(this->m_hWnd);\r
if (hWndExplorer)\r
CenterWindow(CWnd::FromHandle(hWndExplorer));\r
EnableSaveRestore(_T("SVNProgressDlg"));\r
return CAppUtils::SetListCtrlBackgroundImage(m_ProgList.GetSafeHwnd(), nID);\r
}\r
\r
+#if 0\r
void CGitProgressDlg::ReportSVNError()\r
{\r
ReportError(GetLastErrorMessage());\r
}\r
+#endif\r
\r
void CGitProgressDlg::ReportError(const CString& sError)\r
{\r
- CSoundUtils::PlayTSVNError();\r
+ CSoundUtils::PlayTGitError();\r
ReportString(sError, CString(MAKEINTRESOURCE(IDS_ERR_ERROR)), m_Colors.GetColor(CColors::Conflict));\r
m_bErrorsOccurred = true;\r
}\r
\r
void CGitProgressDlg::ReportWarning(const CString& sWarning)\r
{\r
- CSoundUtils::PlayTSVNWarning();\r
+ CSoundUtils::PlayTGitWarning();\r
ReportString(sWarning, CString(MAKEINTRESOURCE(IDS_WARN_WARNING)), m_Colors.GetColor(CColors::Conflict));\r
}\r
\r
void CGitProgressDlg::ReportNotification(const CString& sNotification)\r
{\r
- CSoundUtils::PlayTSVNNotification();\r
+ CSoundUtils::PlayTGitNotification();\r
ReportString(sNotification, CString(MAKEINTRESOURCE(IDS_WARN_NOTE)));\r
}\r
\r
\r
DialogEnableWindow(IDOK, FALSE);\r
DialogEnableWindow(IDCANCEL, TRUE);\r
- SetAndClearProgressInfo(m_hWnd);\r
+// SetAndClearProgressInfo(m_hWnd);\r
m_itemCount = m_itemCountTotal;\r
\r
InterlockedExchange(&m_bThreadRunning, TRUE);\r
CTime startTime = CTime::GetCurrentTime();\r
switch (m_Command)\r
{\r
- case SVNProgress_Add:\r
+ case GitProgress_Add:\r
bSuccess = CmdAdd(sWindowTitle, localoperation);\r
break;\r
- case SVNProgress_Checkout:\r
+ case GitProgress_Checkout:\r
bSuccess = CmdCheckout(sWindowTitle, localoperation);\r
break;\r
- case SVNProgress_Commit:\r
+ case GitProgress_Commit:\r
bSuccess = CmdCommit(sWindowTitle, localoperation);\r
break;\r
- case SVNProgress_Copy:\r
+ case GitProgress_Copy:\r
bSuccess = CmdCopy(sWindowTitle, localoperation);\r
break;\r
- case SVNProgress_Export:\r
+ case GitProgress_Export:\r
bSuccess = CmdExport(sWindowTitle, localoperation);\r
break;\r
- case SVNProgress_Import:\r
+ case GitProgress_Import:\r
bSuccess = CmdImport(sWindowTitle, localoperation);\r
break;\r
- case SVNProgress_Lock:\r
+ case GitProgress_Lock:\r
bSuccess = CmdLock(sWindowTitle, localoperation);\r
break;\r
- case SVNProgress_Merge:\r
+ case GitProgress_Merge:\r
bSuccess = CmdMerge(sWindowTitle, localoperation);\r
break;\r
- case SVNProgress_MergeAll:\r
+ case GitProgress_MergeAll:\r
bSuccess = CmdMergeAll(sWindowTitle, localoperation);\r
break;\r
- case SVNProgress_MergeReintegrate:\r
+ case GitProgress_MergeReintegrate:\r
bSuccess = CmdMergeReintegrate(sWindowTitle, localoperation);\r
break;\r
- case SVNProgress_Rename:\r
+ case GitProgress_Rename:\r
bSuccess = CmdRename(sWindowTitle, localoperation);\r
break;\r
- case SVNProgress_Resolve:\r
+ case GitProgress_Resolve:\r
bSuccess = CmdResolve(sWindowTitle, localoperation);\r
break;\r
- case SVNProgress_Revert:\r
+ case GitProgress_Revert:\r
bSuccess = CmdRevert(sWindowTitle, localoperation);\r
break;\r
- case SVNProgress_Switch:\r
+ case GitProgress_Switch:\r
bSuccess = CmdSwitch(sWindowTitle, localoperation);\r
break;\r
- case SVNProgress_Unlock:\r
+ case GitProgress_Unlock:\r
bSuccess = CmdUnlock(sWindowTitle, localoperation);\r
break;\r
- case SVNProgress_Update:\r
+ case GitProgress_Update:\r
bSuccess = CmdUpdate(sWindowTitle, localoperation);\r
break;\r
}\r
InterlockedExchange(&m_bThreadRunning, FALSE);\r
RefreshCursor();\r
\r
- DWORD dwAutoClose = CRegStdWORD(_T("Software\\TortoiseSVN\\AutoClose"));\r
+ DWORD dwAutoClose = CRegStdWORD(_T("Software\\TortoiseGit\\AutoClose"));\r
if (m_options & ProgOptDryRun)\r
dwAutoClose = 0; // dry run means progress dialog doesn't auto close at all\r
if (!m_bLastVisible)\r
\r
void CGitProgressDlg::OnBnClickedLogbutton()\r
{\r
+#if 0\r
if (m_targetPathList.GetCount() != 1)\r
return;\r
StringRevMap::iterator it = m_UpdateStartRevMap.begin();\r
CLogDlg dlg;\r
dlg.SetParams(m_targetPathList[0], m_RevisionEnd, m_RevisionEnd, rev, 0, TRUE);\r
dlg.DoModal();\r
+#endif\r
}\r
\r
\r
\r
void CGitProgressDlg::OnNMDblclkSvnprogress(NMHDR *pNMHDR, LRESULT *pResult)\r
{\r
+#if 0\r
LPNMLISTVIEW pNMLV = reinterpret_cast<LPNMLISTVIEW>(pNMHDR);\r
*pResult = 0;\r
if (pNMLV->iItem < 0)\r
// We've double-clicked on a conflicted item - do a three-way merge on it\r
SVNDiff::StartConflictEditor(data->path);\r
}\r
- else if ((data->action == svn_wc_notify_update_update) && ((data->content_state == svn_wc_notify_state_merged)||(SVNProgress_Merge == m_Command)) || (data->action == svn_wc_notify_resolved))\r
+ else if ((data->action == svn_wc_notify_update_update) && ((data->content_state == svn_wc_notify_state_merged)||(GitProgress_Merge == m_Command)) || (data->action == svn_wc_notify_resolved))\r
{\r
// This is a modified file which has been merged on update. Diff it against base\r
- CTSVNPath temporaryFile;\r
+ CTGitPath temporaryFile;\r
SVNDiff diff(this, this->m_hWnd, true);\r
diff.SetAlternativeTool(!!(GetAsyncKeyState(VK_SHIFT) & 0x8000));\r
svn_revnum_t baseRev = 0;\r
CAppUtils::LaunchApplication(cmd, NULL, false);\r
}\r
}\r
+#endif\r
}\r
\r
void CGitProgressDlg::OnHdnItemclickSvnprogress(NMHDR *pNMHDR, LRESULT *pResult)\r
return pData->bAuxItem;\r
}\r
\r
-LRESULT CGitProgressDlg::OnSVNProgress(WPARAM /*wParam*/, LPARAM lParam)\r
+LRESULT CGitProgressDlg::OnGitProgress(WPARAM /*wParam*/, LPARAM lParam)\r
{\r
+#if 0\r
SVNProgress * pProgressData = (SVNProgress *)lParam;\r
CProgressCtrl * progControl = (CProgressCtrl *)GetDlgItem(IDC_PROGRESSBAR);\r
if ((pProgressData->total > 1000)&&(!progControl->IsWindowVisible()))\r
m_sTotalBytesTransferred.Format(IDS_SVN_PROGRESS_TOTALMBTRANSFERRED, (double)((double)pProgressData->overall_total / 1024000.0));\r
progText.Format(IDS_SVN_PROGRESS_TOTALANDSPEED, (LPCTSTR)m_sTotalBytesTransferred, (LPCTSTR)pProgressData->SpeedString);\r
SetDlgItemText(IDC_PROGRESSLABEL, progText);\r
+#endif\r
return 0;\r
}\r
\r
// Sort by path if everything else is equal\r
if (result == 0)\r
{\r
- result = CTSVNPath::Compare(pData1->path, pData2->path);\r
+ result = CTGitPath::Compare(pData1->path, pData2->path);\r
}\r
\r
if (!m_bAscending)\r
\r
void CGitProgressDlg::OnContextMenu(CWnd* pWnd, CPoint point)\r
{\r
+#if 0\r
if (m_options & ProgOptDryRun)\r
return; // don't do anything in a dry-run.\r
\r
popup.AppendMenuIcon(ID_CONFLICTUSETHEIRS, IDS_SVNPROGRESS_MENUUSETHEIRS,IDI_RESOLVE);\r
popup.AppendMenuIcon(ID_CONFLICTUSEMINE, IDS_SVNPROGRESS_MENUUSEMINE,IDI_RESOLVE);\r
}\r
- else if ((data->content_state == svn_wc_notify_state_merged)||(SVNProgress_Merge == m_Command)||(data->action == svn_wc_notify_resolved))\r
+ else if ((data->content_state == svn_wc_notify_state_merged)||(GitProgress_Merge == m_Command)||(data->action == svn_wc_notify_resolved))\r
popup.SetDefaultItem(ID_COMPARE, FALSE);\r
\r
if (m_ProgList.GetSelectedCount() == 1)\r
if (data)\r
{\r
CString sPath = GetPathFromColumnText(data->sPathColumnText);\r
- if ((!sPath.IsEmpty())&&(!SVN::PathIsURL(CTSVNPath(sPath))))\r
+ if ((!sPath.IsEmpty())&&(!SVN::PathIsURL(CTGitPath(sPath))))\r
{\r
- CTSVNPath path = CTSVNPath(sPath);\r
+ CTGitPath path = CTGitPath(sPath);\r
if (path.GetDirectory().Exists())\r
{\r
popup.AppendMenuIcon(ID_EXPLORE, IDS_SVNPROGRESS_MENUOPENPARENT, IDI_EXPLORER);\r
{\r
CString sPath = GetPathFromColumnText(data->sPathColumnText);\r
\r
- CTSVNPath path = CTSVNPath(sPath);\r
+ CTGitPath path = CTGitPath(sPath);\r
ShellExecute(m_hWnd, _T("explore"), path.GetDirectory().GetWinPath(), NULL, path.GetDirectory().GetWinPath(), SW_SHOW);\r
}\r
break;\r
// if the file was merged during update, do a three way diff between OLD, MINE, THEIRS\r
if (data->content_state == svn_wc_notify_state_merged)\r
{\r
- CTSVNPath basefile = CTempFiles::Instance().GetTempFilePath(false, data->path, rev);\r
- CTSVNPath newfile = CTempFiles::Instance().GetTempFilePath(false, data->path, SVNRev::REV_HEAD);\r
+ CTGitPath basefile = CTempFiles::Instance().GetTempFilePath(false, data->path, rev);\r
+ CTGitPath newfile = CTempFiles::Instance().GetTempFilePath(false, data->path, SVNRev::REV_HEAD);\r
SVN svn;\r
if (!svn.Cat(data->path, SVNRev(SVNRev::REV_WC), rev, basefile))\r
{\r
break;\r
}\r
// If necessary, convert the line-endings on the file before diffing\r
- if ((DWORD)CRegDWORD(_T("Software\\TortoiseSVN\\ConvertBase"), TRUE))\r
+ if ((DWORD)CRegDWORD(_T("Software\\TortoiseGit\\ConvertBase"), TRUE))\r
{\r
- CTSVNPath temporaryFile = CTempFiles::Instance().GetTempFilePath(false, data->path, SVNRev::REV_BASE);\r
+ CTGitPath temporaryFile = CTempFiles::Instance().GetTempFilePath(false, data->path, SVNRev::REV_BASE);\r
if (!svn.Cat(data->path, SVNRev(SVNRev::REV_BASE), SVNRev(SVNRev::REV_BASE), temporaryFile))\r
{\r
temporaryFile.Reset();\r
}\r
else\r
{\r
- CTSVNPath tempfile = CTempFiles::Instance().GetTempFilePath(false, data->path, rev);\r
+ CTGitPath tempfile = CTempFiles::Instance().GetTempFilePath(false, data->path, rev);\r
SVN svn;\r
if (!svn.Cat(data->path, SVNRev(SVNRev::REV_WC), rev, tempfile))\r
{\r
case ID_EDITCONFLICT:\r
{\r
CString sPath = GetPathFromColumnText(data->sPathColumnText);\r
- SVNDiff::StartConflictEditor(CTSVNPath(sPath));\r
+ SVNDiff::StartConflictEditor(CTGitPath(sPath));\r
}\r
break;\r
case ID_CONFLICTUSETHEIRS:\r
break;\r
case ID_LOG:\r
{\r
- CRegDWORD reg = CRegDWORD(_T("Software\\TortoiseSVN\\NumberOfLogs"), 100);\r
+ CRegDWORD reg = CRegDWORD(_T("Software\\TortoiseGit\\NumberOfLogs"), 100);\r
int limit = (int)(DWORD)reg;\r
svn_revnum_t rev = m_RevisionEnd;\r
if (!data->basepath.IsEmpty())\r
// the path might be inside an external folder which has its own\r
// revisions.\r
CString sPath = GetPathFromColumnText(data->sPathColumnText);\r
- dlg.SetParams(CTSVNPath(sPath), SVNRev(), SVNRev::REV_HEAD, 1, limit, TRUE);\r
+ dlg.SetParams(CTGitPath(sPath), SVNRev(), SVNRev::REV_HEAD, 1, limit, TRUE);\r
dlg.DoModal();\r
}\r
break;\r
}\r
}\r
}\r
+#endif\r
}\r
\r
void CGitProgressDlg::OnEnSetfocusInfotext()\r
void CGitProgressDlg::OnLvnBegindragSvnprogress(NMHDR* , LRESULT *pResult)\r
{\r
//LPNMLISTVIEW pNMLV = reinterpret_cast<LPNMLISTVIEW>(pNMHDR);\r
-\r
+#if 0\r
int selIndex = m_ProgList.GetSelectionMark();\r
if (selIndex < 0)\r
return;\r
{\r
dropFiles.CreateStructure();\r
}\r
-\r
+#endif\r
*pResult = 0;\r
}\r
\r
CResizableStandAloneDialog::OnSize(nType, cx, cy);\r
if ((nType == SIZE_RESTORED)&&(m_bLastVisible))\r
{\r
+ if(!m_ProgList.m_hWnd)\r
+ return;\r
+\r
int count = m_ProgList.GetItemCount();\r
if (count > 0)\r
m_ProgList.EnsureVisible(count-1, false);\r
//////////////////////////////////////////////////////////////////////////\r
bool CGitProgressDlg::CmdAdd(CString& sWindowTitle, bool& localoperation)\r
{\r
+\r
localoperation = true;\r
sWindowTitle.LoadString(IDS_PROGRS_TITLE_ADD);\r
SetWindowText(sWindowTitle);\r
SetBackgroundImage(IDI_ADD_BKG);\r
ReportCmd(CString(MAKEINTRESOURCE(IDS_PROGRS_CMD_ADD)));\r
+\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
+ 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_add);\r
+ }\r
+#if 0\r
if (!Add(m_targetPathList, &m_ProjectProperties, svn_depth_empty, FALSE, TRUE, TRUE))\r
{\r
ReportSVNError();\r
return false;\r
}\r
- CShellUpdater::Instance().AddPathsForUpdate(m_targetPathList);\r
+#endif\r
+ //CShellUpdater::Instance().AddPathsForUpdate(m_targetPathList);\r
+ m_bErrorsOccurred=false;\r
return true;\r
}\r
\r
bool CGitProgressDlg::CmdCheckout(CString& sWindowTitle, bool& /*localoperation*/)\r
{\r
+#if 0\r
ASSERT(m_targetPathList.GetCount() == 1);\r
sWindowTitle.LoadString(IDS_PROGRS_TITLE_CHECKOUT);\r
SetBackgroundImage(IDI_CHECKOUT_BKG);\r
- CTSVNPathList urls;\r
+ CTGitPathList urls;\r
urls.LoadFromAsteriskSeparatedString(m_url.GetSVNPathString());\r
- CTSVNPath checkoutdir = m_targetPathList[0];\r
+ CTGitPath checkoutdir = m_targetPathList[0];\r
for (int i=0; i<urls.GetCount(); ++i)\r
{\r
sWindowTitle = urls[i].GetUIFileOrDirectoryName()+_T(" - ")+sWindowTitle;\r
}\r
}\r
}\r
+#endif\r
return true;\r
}\r
\r
bool CGitProgressDlg::CmdCommit(CString& sWindowTitle, bool& /*localoperation*/)\r
{\r
+#if 0\r
sWindowTitle.LoadString(IDS_PROGRS_TITLE_COMMIT);\r
SetWindowText(sWindowTitle);\r
SetBackgroundImage(IDI_COMMIT_BKG);\r
return false;\r
}\r
}\r
+#endif\r
return true;\r
}\r
\r
bool CGitProgressDlg::CmdCopy(CString& sWindowTitle, bool& /*localoperation*/)\r
{\r
+#if 0\r
ASSERT(m_targetPathList.GetCount() == 1);\r
sWindowTitle.LoadString(IDS_PROGRS_TITLE_COPY);\r
SetWindowText(sWindowTitle);\r
ReportNotification(sMsg);\r
}\r
}\r
+#endif\r
return true;\r
}\r
\r
bool CGitProgressDlg::CmdExport(CString& sWindowTitle, bool& /*localoperation*/)\r
{\r
+#if 0\r
ASSERT(m_targetPathList.GetCount() == 1);\r
sWindowTitle.LoadString(IDS_PROGRS_TITLE_EXPORT);\r
sWindowTitle = m_url.GetUIFileOrDirectoryName()+_T(" - ")+sWindowTitle;\r
ReportSVNError();\r
return false;\r
}\r
+#endif\r
return true;\r
}\r
\r
bool CGitProgressDlg::CmdImport(CString& sWindowTitle, bool& /*localoperation*/)\r
{\r
+#if 0\r
ASSERT(m_targetPathList.GetCount() == 1);\r
sWindowTitle.LoadString(IDS_PROGRS_TITLE_IMPORT);\r
sWindowTitle = m_targetPathList[0].GetUIFileOrDirectoryName()+_T(" - ")+sWindowTitle;\r
ReportSVNError();\r
return false;\r
}\r
+#endif\r
return true;\r
}\r
\r
bool CGitProgressDlg::CmdLock(CString& sWindowTitle, bool& /*localoperation*/)\r
{\r
+#if 0\r
sWindowTitle.LoadString(IDS_PROGRS_TITLE_LOCK);\r
SetWindowText(sWindowTitle);\r
SetBackgroundImage(IDI_LOCK_BKG);\r
// if the locking-dialog is skipped in the settings, tell the\r
// user how to steal the lock anyway (i.e., how to get the lock\r
// dialog back without changing the settings)\r
- if (!DWORD(CRegDWORD(_T("Software\\TortoiseSVN\\ShowLockDlg"), TRUE)))\r
+ if (!DWORD(CRegDWORD(_T("Software\\TortoiseGit\\ShowLockDlg"), TRUE)))\r
{\r
ReportString(CString(MAKEINTRESOURCE(IDS_SVNPROGRESS_LOCKHINT)), CString(MAKEINTRESOURCE(IDS_WARN_NOTE)));\r
}\r
return false;\r
}\r
+#endif\r
return true;\r
}\r
\r
bool CGitProgressDlg::CmdMerge(CString& sWindowTitle, bool& /*localoperation*/)\r
{\r
+#if 0\r
bool bFailed = false;\r
ASSERT(m_targetPathList.GetCount() == 1);\r
sWindowTitle.LoadString(IDS_PROGRS_TITLE_MERGE);\r
\r
GetDlgItem(IDC_INFOTEXT)->ShowWindow(SW_HIDE);\r
GetDlgItem(IDC_NONINTERACTIVE)->ShowWindow(SW_SHOW);\r
- CRegDWORD nonint = CRegDWORD(_T("Software\\TortoiseSVN\\MergeNonInteractive"), FALSE);\r
+ CRegDWORD nonint = CRegDWORD(_T("Software\\TortoiseGit\\MergeNonInteractive"), FALSE);\r
if (DWORD(nonint))\r
{\r
::SendMessage(GetDlgItem(IDC_NONINTERACTIVE)->GetSafeHwnd(), BM_SETCHECK, BST_CHECKED, 0);\r
{\r
CString sSuggestedMessage;\r
CString sMergedLogMessage;\r
- CString sSeparator = CRegString(_T("Software\\TortoiseSVN\\MergeLogSeparator"), _T("........"));\r
+ CString sSeparator = CRegString(_T("Software\\TortoiseGit\\MergeLogSeparator"), _T("........"));\r
CString temp;\r
\r
// Merging revisions %s of %s to %s into %s, %s%s\r
GetDlgItem(IDC_NONINTERACTIVE)->ShowWindow(SW_HIDE);\r
GetDlgItem(IDC_INFOTEXT)->ShowWindow(SW_SHOW);\r
return !bFailed;\r
+#endif\r
+ return true;\r
}\r
\r
bool CGitProgressDlg::CmdMergeAll(CString& sWindowTitle, bool& /*localoperation*/)\r
{\r
+#if 0\r
ASSERT(m_targetPathList.GetCount() == 1);\r
sWindowTitle.LoadString(IDS_PROGRS_TITLE_MERGE);\r
SetBackgroundImage(IDI_MERGE_BKG);\r
CString sCmdInfo;\r
sCmdInfo.LoadString(IDS_PROGRS_INFOGETTINGINFO);\r
ReportCmd(sCmdInfo);\r
- CTSVNPathList suggestedSources;\r
+ CTGitPathList suggestedSources;\r
if (!SuggestMergeSources(m_targetPathList[0], m_Revision, suggestedSources))\r
{\r
ReportSVNError();\r
ReportCmd(sCmdInfo);\r
\r
GetDlgItem(IDC_NONINTERACTIVE)->ShowWindow(SW_SHOW);\r
- CRegDWORD nonint = CRegDWORD(_T("Software\\TortoiseSVN\\MergeNonInteractive"), FALSE);\r
+ CRegDWORD nonint = CRegDWORD(_T("Software\\TortoiseGit\\MergeNonInteractive"), FALSE);\r
if (DWORD(nonint))\r
{\r
::SendMessage(GetDlgItem(IDC_NONINTERACTIVE)->GetSafeHwnd(), BM_SETCHECK, BST_CHECKED, 0);\r
}\r
\r
GetDlgItem(IDC_NONINTERACTIVE)->ShowWindow(SW_HIDE);\r
+#endif\r
return true;\r
}\r
\r
bool CGitProgressDlg::CmdMergeReintegrate(CString& sWindowTitle, bool& /*localoperation*/)\r
{\r
+#if 0\r
ASSERT(m_targetPathList.GetCount() == 1);\r
sWindowTitle.LoadString(IDS_PROGRS_TITLE_MERGEREINTEGRATE);\r
SetBackgroundImage(IDI_MERGE_BKG);\r
ReportCmd(sCmdInfo);\r
\r
GetDlgItem(IDC_NONINTERACTIVE)->ShowWindow(SW_SHOW);\r
- CRegDWORD nonint = CRegDWORD(_T("Software\\TortoiseSVN\\MergeNonInteractive"), FALSE);\r
+ CRegDWORD nonint = CRegDWORD(_T("Software\\TortoiseGit\\MergeNonInteractive"), FALSE);\r
if (DWORD(nonint))\r
{\r
::SendMessage(GetDlgItem(IDC_NONINTERACTIVE)->GetSafeHwnd(), BM_SETCHECK, BST_CHECKED, 0);\r
}\r
\r
GetDlgItem(IDC_NONINTERACTIVE)->ShowWindow(SW_HIDE);\r
+#endif\r
return true;\r
}\r
\r
bool CGitProgressDlg::CmdRename(CString& sWindowTitle, bool& localoperation)\r
{\r
+#if 0\r
ASSERT(m_targetPathList.GetCount() == 1);\r
if ((!m_targetPathList[0].IsUrl())&&(!m_url.IsUrl()))\r
localoperation = true;\r
ReportSVNError();\r
return false;\r
}\r
+#endif\r
return true;\r
}\r
\r
bool CGitProgressDlg::CmdResolve(CString& sWindowTitle, bool& localoperation)\r
{\r
+#if 0\r
localoperation = true;\r
ASSERT(m_targetPathList.GetCount() == 1);\r
sWindowTitle.LoadString(IDS_PROGRS_TITLE_RESOLVE);\r
Resolve(m_targetPathList[fileindex], svn_wc_conflict_choose_merged, true);\r
}\r
CShellUpdater::Instance().AddPathsForUpdate(m_targetPathList);\r
+#endif\r
return true;\r
}\r
\r
bool CGitProgressDlg::CmdRevert(CString& sWindowTitle, bool& localoperation)\r
{\r
+#if 0\r
localoperation = true;\r
sWindowTitle.LoadString(IDS_PROGRS_TITLE_REVERT);\r
SetWindowText(sWindowTitle);\r
SetBackgroundImage(IDI_REVERT_BKG);\r
\r
- CTSVNPathList delList = m_selectedPaths;\r
- if (DWORD(CRegDWORD(_T("Software\\TortoiseSVN\\RevertWithRecycleBin"), TRUE)))\r
+ CTGitPathList delList = m_selectedPaths;\r
+ if (DWORD(CRegDWORD(_T("Software\\TortoiseGit\\RevertWithRecycleBin"), TRUE)))\r
delList.DeleteAllFiles(true);\r
\r
ReportCmd(CString(MAKEINTRESOURCE(IDS_PROGRS_CMD_REVERT)));\r
return false;\r
}\r
CShellUpdater::Instance().AddPathsForUpdate(m_targetPathList);\r
+#endif\r
return true;\r
}\r
\r
bool CGitProgressDlg::CmdSwitch(CString& sWindowTitle, bool& /*localoperation*/)\r
{\r
+#if 0\r
ASSERT(m_targetPathList.GetCount() == 1);\r
SVNStatus st;\r
sWindowTitle.LoadString(IDS_PROGRS_TITLE_SWITCH);\r
{\r
GetDlgItem(IDC_LOGBUTTON)->ShowWindow(SW_SHOW);\r
}\r
+#endif\r
return true;\r
}\r
\r
bool CGitProgressDlg::CmdUnlock(CString& sWindowTitle, bool& /*localoperation*/)\r
{\r
+#if 0\r
sWindowTitle.LoadString(IDS_PROGRS_TITLE_UNLOCK);\r
SetWindowText(sWindowTitle);\r
SetBackgroundImage(IDI_UNLOCK_BKG);\r
return false;\r
}\r
CShellUpdater::Instance().AddPathsForUpdate(m_targetPathList);\r
+#endif\r
return true;\r
}\r
\r
bool CGitProgressDlg::CmdUpdate(CString& sWindowTitle, bool& /*localoperation*/)\r
{\r
+#if 0\r
sWindowTitle.LoadString(IDS_PROGRS_TITLE_UPDATE);\r
SetWindowText(sWindowTitle);\r
SetBackgroundImage(IDI_UPDATE_BKG);\r
int nUUIDs = 0;\r
for(int nItem = 0; nItem < targetcount; nItem++)\r
{\r
- const CTSVNPath& targetPath = m_targetPathList[nItem];\r
+ const CTGitPath& targetPath = m_targetPathList[nItem];\r
SVNStatus st;\r
LONG headrev = -1;\r
m_Revision = revstore;\r
// so we have to update them separately\r
for(int nItem = 0; nItem < targetcount; nItem++)\r
{\r
- const CTSVNPath& targetPath = m_targetPathList[nItem];\r
+ const CTGitPath& targetPath = m_targetPathList[nItem];\r
m_basePath = targetPath;\r
CString sNotify;\r
sNotify.Format(IDS_PROGRS_UPDATEPATH, m_basePath.GetWinPath());\r
ReportString(sNotify, CString(MAKEINTRESOURCE(IDS_WARN_NOTE)));\r
- if (!Update(CTSVNPathList(targetPath), revstore, m_depth, TRUE, m_options & ProgOptIgnoreExternals))\r
+ if (!Update(CTGitPathList(targetPath), revstore, m_depth, TRUE, m_options & ProgOptIgnoreExternals))\r
{\r
ReportSVNError();\r
return false;\r
// to update all intermediate folders manually\r
if ((m_targetPathList.GetCount() == 1) && (!m_targetPathList[0].Exists()))\r
{\r
- CTSVNPath wcPath = m_targetPathList[0].GetContainingDirectory();\r
- CTSVNPath existingParentPath = wcPath.GetContainingDirectory();\r
+ CTGitPath wcPath = m_targetPathList[0].GetContainingDirectory();\r
+ CTGitPath existingParentPath = wcPath.GetContainingDirectory();\r
while (!existingParentPath.Exists() && (existingParentPath.GetWinPathString().GetLength() > 2))\r
{\r
existingParentPath = existingParentPath.GetContainingDirectory();\r
if (existingParentPath.GetWinPathString().GetLength() && !existingParentPath.IsEquivalentTo(wcPath))\r
{\r
// update all intermediate directories with depth 'empty'\r
- CTSVNPath intermediatepath = existingParentPath;\r
+ CTGitPath intermediatepath = existingParentPath;\r
bool bSuccess = true;\r
while (bSuccess && intermediatepath.IsAncestorOf(wcPath) && !intermediatepath.IsEquivalentTo(wcPath))\r
{\r
intermediatepath = wcPath;\r
else\r
intermediatepath.AppendPathString(childname);\r
- bSuccess = !!Update(CTSVNPathList(intermediatepath), m_Revision, svn_depth_empty, false, true);\r
+ bSuccess = !!Update(CTGitPathList(intermediatepath), m_Revision, svn_depth_empty, false, true);\r
}\r
\r
if (!bSuccess)\r
// (either a file or a directory)\r
if ((m_targetPathList.GetCount() == 1)&&(m_UpdateStartRevMap.size()>0))\r
GetDlgItem(IDC_LOGBUTTON)->ShowWindow(SW_SHOW);\r
-\r
+#endif\r
return true;\r
}\r
\r
{\r
LRESULT res = ::SendMessage(GetDlgItem(IDC_NONINTERACTIVE)->GetSafeHwnd(), BM_GETCHECK, 0, 0);\r
m_AlwaysConflicted = (res == BST_CHECKED);\r
- CRegDWORD nonint = CRegDWORD(_T("Software\\TortoiseSVN\\MergeNonInteractive"), FALSE);\r
+ CRegDWORD nonint = CRegDWORD(_T("Software\\TortoiseGit\\MergeNonInteractive"), FALSE);\r
nonint = m_AlwaysConflicted;\r
}\r
\r