43 const char* full_version_string() |
43 const char* full_version_string() |
44 { |
44 { |
45 #ifdef HG_TAG |
45 #ifdef HG_TAG |
46 return HG_TAG; |
46 return HG_TAG; |
47 #else |
47 #else |
48 static char buffer[128] = {0}; |
48 static char buffer[256] = {0}; |
49 |
49 |
50 if (buffer[0] == '\0') |
50 if (buffer[0] == '\0') |
51 { |
51 { |
52 if (strcmp (HG_BRANCH, "default") != 0) |
52 if (strcmp (HG_BRANCH, "default") != 0) |
53 snprintf (buffer, sizeof buffer, "%s-%s (%s)", version_string(), HG_NODE, HG_BRANCH); |
53 sprintf (buffer, "%s-%s (%s)", version_string(), HG_NODE, HG_BRANCH); |
54 else |
54 else |
55 snprintf (buffer, sizeof buffer, "%s-%s", version_string(), HG_NODE); |
55 sprintf (buffer, "%s-%s", version_string(), HG_NODE); |
56 } |
56 } |
57 |
57 |
58 return buffer; |
58 return buffer; |
59 #endif |
59 #endif |
60 } |
60 } |