sources/version.cpp

changeset 2
8be472cb0bca
parent 1
4dd5bde4e777
child 3
592845e6f9e8
--- a/sources/version.cpp	Wed Dec 10 19:17:00 2014 +0200
+++ b/sources/version.cpp	Wed Dec 10 19:22:51 2014 +0200
@@ -44,7 +44,13 @@
 	static char buffer[128] = {0};
 
 	if (buffer[0] == '\0')
-		snprintf (buffer, sizeof buffer, "%s-%s", version_string(), REVISION_STRING);
+	{
+		char* ptr = &buffer[0];
+		snprintf (ptr, sizeof buffer - (ptr - buffer), "%s-%s", version_string(), HG_NODE);
+
+		if (strcmp (HG_BRANCH, "default") != 0)
+			snprintf (ptr, sizeof buffer - (ptr - buffer), " (%s)", HG_BRANCH);
+	}
 
 	return buffer;
 }
@@ -52,5 +58,5 @@
 FUNCTION
 changeset_date_string() -> const char*
 {
-	return REVISION_DISPLAY_DATE;
+	return HG_DATE_STRING;
 }

mercurial