2727#include "../plugins/sqPluginsSCCSVersion.h"
2828
2929#if SUBVERSION
30+ # define PREFIX "r"
3031static char SvnRawRevisionString [] = "$Rev$" ;
3132# define REV_START (SvnRawRevisionString + 6)
3233
@@ -65,6 +66,7 @@ repositoryURL()
6566# undef REV_START
6667# undef URL_START
6768#elif GIT
69+ # define PREFIX ""
6870static char GitRawRevisionString [] = "$Rev$" ;
6971# define REV_START (GitRawRevisionString + 6)
7072
@@ -103,6 +105,7 @@ repositoryURL()
103105# undef REV_START
104106# undef URL_START
105107#else /* SUBVERSION */
108+ # define PREFIX ""
106109char *
107110revisionAsString () { return "?" ; }
108111
@@ -117,7 +120,7 @@ sourceVersionString(char separator)
117120{
118121 if (!sourceVersion ) {
119122#if 1 /* a) mingw32 doesn't have asprintf and b) on Mac OS it segfaults. */
120- char * fmt = "VM: r %s %s Date: %s%cPlugins: r %s %s" ;
123+ char * fmt = "VM: " PREFIX " %s %s Date: %s%cPlugins: " PREFIX " %s %s" ;
121124 int len = strlen (fmt )
122125 + strlen (revisionAsString ())
123126 + strlen (repositoryURL ())
@@ -130,7 +133,8 @@ sourceVersionString(char separator)
130133 separator ,
131134 pluginsRevisionAsString (), pluginsRepositoryURL ());
132135#else
133- asprintf (& sourceVersion , "VM: r%s %s Date: %s%cPlugins: r%s %s" ,
136+ asprintf (& sourceVersion ,
137+ "VM: " PREFIX "%s %s Date: %s%cPlugins: " PREFIX "%s %s" ,
134138 revisionAsString (), repositoryURL (), revisionDateAsString (),
135139 separator ,
136140 pluginsRevisionAsString (), pluginsRepositoryURL ());
0 commit comments