Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.1, 1.1.1, and 1.1.2

Merge with stable

Changeset 6d1f7432424c

Parents b2245f94a8fd

Parents 0fe7f965f9e3

by Adrian Buehlmann

Changes to 5 files · Browse files at 6d1f7432424c Showing diff from parent b2245f94a8fd 0fe7f965f9e3 Diff from another changeset...

 
8
9
10
 
11
12
13
 
107
108
109
110
 
111
112
113
 
196
197
198
 
 
199
 
200
201
202
 
226
227
228
229
230
231
232
 
276
277
278
279
280
281
282
 
870
871
872
 
 
 
 
 
 
873
874
875
 
8
9
10
11
12
13
14
 
108
109
110
 
111
112
113
114
 
197
198
199
200
201
202
203
204
205
206
 
230
231
232
 
233
234
235
 
279
280
281
 
282
283
284
 
872
873
874
875
876
877
878
879
880
881
882
883
@@ -8,6 +8,7 @@
 #include "ShellExt.h"  #include "RegistryConfig.h"  #include "TortoiseIconBitmap.h" +#include "ThgVersion.h"    #include <map>   @@ -107,7 +108,7 @@
  /* Add new items here */     // template - {"", L"", L"", ".ico", 0}, + //{"", L"", L"", ".ico", 0},  };    const char* const RepoNoFilesMenu = @@ -196,7 +197,10 @@
  MenuDescription md = menuDescList[i];     if (md.name.size() == 0) + { + TDEBUG_TRACE("**** InitMenuMaps: ignoring entry with empty name");   break; + }     TDEBUG_TRACE("InitMenuMaps: adding " << md.name);   @@ -226,7 +230,6 @@
    if (SysInfo::Instance().IsVistaOrLater())   { - TDEBUG_TRACE(" InsertMenuItemWithIcon1: Vista or later detected, using modern context menu style");   HBITMAP hBmp = GetTortoiseIconBitmap(iconName);   if (hBmp)   { @@ -276,7 +279,6 @@
    if (SysInfo::Instance().IsVistaOrLater())   { - TDEBUG_TRACE(" InsertMenuItemWithIcon1: Vista or later detected, using modern context menu style");   HBITMAP hBmp = GetTortoiseIconBitmap(iconName);   if (hBmp)   { @@ -870,6 +872,12 @@
  TCHAR name[MAX_PATH+1];     TDEBUG_TRACE("CShellExtCMenu::Initialize"); + + TDEBUG_TRACEW( + L"---- TortoiseHg shell extension version " + << ThgVersion::get() << L"----" + ); +   TDEBUG_TRACE(" pIDFolder: " << pIDFolder);   TDEBUG_TRACE(" pDataObj: " << pDataObj);  
 
21
22
23
24
 
 
25
26
27
 
48
49
50
51
 
 
 
 
52
53
54
55
56
 
21
22
23
 
24
25
26
27
28
 
49
50
51
 
52
53
54
55
56
 
57
58
59
@@ -21,7 +21,8 @@
  Dirstatecache.obj \   DirectoryStatus.obj \   Thgstatus.obj \ - QueryDirstate.obj + QueryDirstate.obj \ + ThgVersion.obj    OBJECTS_TERMINATE = Thgstatus.obj \   RegistryConfig.obj \ @@ -48,9 +49,11 @@
 clean:   del *.obj *.dll *.exe *.lib *.exp *.manifest *.res parentid.h ThgCLSIDs.wxi   -$(THGSHELL_TARGET): $(OBJECTS_THGSGELL) +ThgVersion: + create-parentid-h.cmd + +$(THGSHELL_TARGET): ThgVersion $(OBJECTS_THGSGELL)   cl /EP ThgCLSIDs-template.wxi > ThgCLSIDs.wxi - create-parentid-h.cmd   rc /dTHG_SHELL_FNAME="$@" $(THG_EXTRA_RCFLAGS) shellext.rc   link /OUT:$@ $(LDFLAGS_THGSHELL) $** shellext.res   mt -nologo -manifest $@.manifest -outputresource:"$@;#2"
Change 1 of 1 Show Entire File win32/​shellext/​ThgVersion.cpp Stacked
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
@@ -0,0 +1,12 @@
+#include "ThgVersion.h" +#include "parentid.h" + +#define TOSTR(x) L ## #x +#define TOSTR2(x) TOSTR(x) + +#define THG_PARENT_ID_STRING TOSTR2(THG_PARENT_ID) + +std::wstring ThgVersion::get() +{ + return THG_PARENT_ID_STRING; +}
Change 1 of 1 Show Entire File win32/​shellext/​ThgVersion.h Stacked
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
@@ -0,0 +1,12 @@
+#ifndef _THGVERSION_H +#define _THGVERSION_H + +#include <string> + +class ThgVersion +{ +public: + static std::wstring get(); +}; + +#endif
 
23
24
25
 
 
 
 
 
 
 
 
26
27
28
29
30
31
 
32
33
34
35
36
37
 
38
39
40
 
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
 
39
40
41
42
43
44
 
45
46
47
48
@@ -23,18 +23,26 @@
 #ifdef THG_DEBUG   #include <sstream>   + #ifdef _M_X64 + #define THG_PREFIX "[THGx64] " + #define THG_PREFIXL L"[THGx64] " + #else + #define THG_PREFIX "[THGx86] " + #define THG_PREFIXL L"[THGx86] " + #endif +   // TDEBUG_TRACE() prints debugging messages to Windows' debugger display.   // The messages can be viewed with Sysinternals DebugView, which may be   // downloaded from Microsoft TechNet.   #define TDEBUG_TRACE(s) if (ThgDebug::enabled()) { \   std::stringstream _the_msg; \ - _the_msg << "[THG] " << s; \ + _the_msg << THG_PREFIX << s; \   std::string _the_str = _the_msg.str(); \   OutputDebugStringA(_the_str.c_str()); \   }   #define TDEBUG_TRACEW(s) if (ThgDebug::enabled()) { \   std::basic_stringstream<wchar_t> _the_msg; \ - _the_msg << L"[THG] " << s; \ + _the_msg << THG_PREFIXL << s; \   std::wstring _the_str = _the_msg.str(); \   OutputDebugStringW(_the_str.c_str()); \   }