Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in tip

fogcreek shellext: exclude debugging code from release build

Changeset 7148ba9c460e

Parent 679730894cd3

by David Golub

Changes to 4 files · Browse files at 7148ba9c460e Showing diff from parent 679730894cd3 Diff from another changeset...

 
109
110
111
 
112
 
113
114
115
 
118
119
120
 
121
 
122
123
124
 
145
146
147
 
148
 
149
150
151
 
163
164
165
 
166
167
168
 
172
173
174
 
175
176
177
 
109
110
111
112
113
114
115
116
117
 
120
121
122
123
124
125
126
127
128
 
149
150
151
152
153
154
155
156
157
 
169
170
171
172
173
174
175
 
179
180
181
182
183
184
185
@@ -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
588
589
 
590
591
592
 
612
613
614
 
615
616
617
 
838
839
840
 
841
842
843
 
873
874
875
 
876
877
878
879
880
881
 
882
 
883
884
885
 
587
588
589
590
591
592
593
 
613
614
615
616
617
618
619
 
840
841
842
843
844
845
846
 
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
@@ -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
42
43
44
45
46
47
48
 
 
 
49
50
51
 
41
42
43
 
44
45
46
47
48
49
50
51
52
53
@@ -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
97
98
 
99
 
100
101
102
 
96
97
98
99
100
101
102
103
104
@@ -96,7 +96,9 @@
 {   TCHAR szName[MAX_PATH + 1];   +#ifdef _DEBUG   PrintDebugHeader(pIDFolder, pDataObj); +#endif     m_strFolder.Empty();   m_arrFiles.RemoveAll();