Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.0.1, 1.0.2, and 1.0.3

stable shellext: write TortoiseHg version to debug out on cmenu init

Changeset fb73f93cce70

Parent acd49bc5d7b8

by Adrian Buehlmann

Changes to 4 files · Browse files at fb73f93cce70 Showing diff from parent acd49bc5d7b8 Diff from another changeset...

 
8
9
10
 
11
12
13
 
871
872
873
 
 
 
 
 
 
874
875
876
 
8
9
10
11
12
13
14
 
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>   @@ -871,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