Changeset 7148ba9c460e…
Parent 679730894cd3…
by
Changes to 4 files · Browse files at 7148ba9c460e Showing diff from parent 679730894cd3 Diff from another changeset...
@@ -109,7 +109,9 @@ }
unsigned uTicks = 0;
+#ifdef _DEBUG
bool bFileAccessIsUnacceptablySlow = false;
+#endif
if (!::PathIsNetworkPath(qsCur.strPath))
{
@@ -118,7 +120,9 @@
if (uTicks > 5000 /* ms */)
{
+#ifdef _DEBUG
bFileAccessIsUnacceptablySlow = true;
+#endif
goto exit;
}
@@ -145,7 +149,9 @@ {
CString strReason = "ignoring slow \"" + strPath + "\"";
CTHgStatus::Error(strReason);
+#ifdef _DEBUG
bFileAccessIsUnacceptablySlow = true;
+#endif
goto exit;
}
@@ -163,6 +169,7 @@ }
exit:
+#ifdef _DEBUG
if (bFileAccessIsUnacceptablySlow)
{
ATLTRACE("****** %s('%s'): ignored, call took too long (%d ticks)\n",
@@ -172,6 +179,7 @@ {
ATLTRACE("%s('%s'): NO repo found\n", (LPCTSTR)dp, (LPCTSTR)qsCur.strPath);
}
+#endif
qsLast = qsCur;
return 0;
}
|
@@ -587,6 +587,7 @@ const char* psz = "";
const wchar_t* pszw = 0;
+#ifdef _DEBUG
CString strFlags = "?";
switch (uFlags)
{
@@ -612,6 +613,7 @@
ATLTRACE("CTortoiseHgCmenuBase::GetCommandString: idCmd = %d, uFlags = %d (%s), "
"cchMax = %d\n", idCmd, uFlags, (LPCTSTR)strFlags, cchMax);
+#endif
const CMenuIdCmdMap::CPair* p = m_mapMenuId.Lookup((UINT)idCmd);
if (p == NULL)
@@ -838,6 +840,7 @@ LaunchCommand(strHgCmd, strCwd);
}
+#ifdef _DEBUG
void CTortoiseHgCmenuBase::PrintDebugHeader(LPCITEMIDLIST pIDFolder, LPDATAOBJECT pDataObj)
{
ATLTRACE("CTortoiseHgCmenuBase::Initialize\n");
@@ -873,13 +876,16 @@ ATLTRACE(" pIDFolder: %p\n", pIDFolder);
ATLTRACE(" pDataObj: %p\n", pDataObj);
}
+#endif
STDMETHODIMP CTortoiseHgCmenuBase::Initialize(LPCITEMIDLIST pIDFolder,
LPDATAOBJECT pDataObj, HKEY hRegKey)
{
TCHAR szName[MAX_PATH + 1];
+#ifdef _DEBUG
PrintDebugHeader(pIDFolder, pDataObj);
+#endif
m_strFolder.Empty();
m_arrFiles.RemoveAll();
|
@@ -41,11 +41,13 @@ virtual void RunDialog(const CString& strCmd);
void TweakMenuForVista(HMENU hMenu);
- void PrintDebugHeader(LPCITEMIDLIST pIDFolder, LPDATAOBJECT pDataObj);
void InitMenuMaps(const CMenuDescription *pMenuDescs, int nCount);
void InsertMenuItemByName(HMENU hMenu, const CString& strName, UINT indexMenu,
UINT idCmd, UINT idCmdFirst, const CStringW& strPrefix);
void AddMenuList(UINT idCmd, const CString& strName);
+#ifdef _DEBUG
+ void PrintDebugHeader(LPCITEMIDLIST pIDFolder, LPDATAOBJECT pDataObj);
+#endif
public:
CTortoiseHgCmenuBase();
|
@@ -96,7 +96,9 @@ {
TCHAR szName[MAX_PATH + 1];
+#ifdef _DEBUG
PrintDebugHeader(pIDFolder, pDataObj);
+#endif
m_strFolder.Empty();
m_arrFiles.RemoveAll();
|
Loading...