134:eca2fc0acaa2 | 135:8b9132fea327 |
---|---|
31 #include "commands.h" | 31 #include "commands.h" |
32 #include "stringTable.h" | 32 #include "stringTable.h" |
33 #include "dataBuffer.h" | 33 #include "dataBuffer.h" |
34 #include "parser.h" | 34 #include "parser.h" |
35 #include "lexer.h" | 35 #include "lexer.h" |
36 #include "gitinfo.h" | 36 #include "hginfo.h" |
37 | 37 |
38 int main (int argc, char** argv) | 38 int main (int argc, char** argv) |
39 { | 39 { |
40 try | 40 try |
41 { | 41 { |
68 | 68 |
69 // Print header | 69 // Print header |
70 String header; | 70 String header; |
71 String headerline; | 71 String headerline; |
72 header = format (APPNAME " version %1", versionString (true)); | 72 header = format (APPNAME " version %1", versionString (true)); |
73 | |
74 if (String (GIT_BRANCH) != "master") | |
75 { | |
76 header += " ("; | |
77 header += GIT_BRANCH; | |
78 header += " branch"; | |
79 } | |
80 | 73 |
81 #ifdef DEBUG | 74 #ifdef DEBUG |
82 if (header.firstIndexOf ("(") != -1) | 75 if (header.firstIndexOf ("(") != -1) |
83 header += ", "; | 76 header += ", "; |
84 else | 77 else |
194 return ver; | 187 return ver; |
195 } | 188 } |
196 | 189 |
197 // ============================================================================= | 190 // ============================================================================= |
198 // | 191 // |
199 String versionString (bool longform) | 192 String versionString (bool) |
200 { | 193 { |
201 #if defined(GIT_DESCRIPTION) and defined (DEBUG) | 194 #if defined(GIT_DESCRIPTION) and defined (DEBUG) |
202 String tag (GIT_DESCRIPTION); | 195 String tag (GIT_DESCRIPTION); |
203 String version = tag; | 196 String version = tag; |
204 | 197 |