Check-in [a1f727be9d]
Not logged in
Overview

SHA1 Hash:a1f727be9d0ffa2c3f373ce66154a41d17dec767
Date: 2008-10-18 20:29:33
User: drh
Comment:Add the "version" command to print out the source-code version number for the fossil executable.
Timelines: ancestors | descendants | both | trunk
Other Links: files | ZIP archive | manifest

Tags And Properties
Changes
[hide diffs]

Modified src/main.c from [bc031c08b3] to [c1173878a4].

@@ -426,10 +426,22 @@
   multi_column_list(aCmd, nCmd);
 }
 
 
 /*
+** COMMAND: version
+**
+** Usage:  %fossil version
+**
+** Print the source code version number for the fossil executable.
+*/
+void version_cmd(void){
+  printf("This is fossil version " MANIFEST_VERSION " " MANIFEST_DATE "\n");
+}
+
+
+/*
 ** COMMAND: help
 **
 ** Usage: %fossil help COMMAND
 **
 ** Display information on how to use COMMAND
@@ -438,11 +450,11 @@
   int rc, idx;
   const char *z;
   if( g.argc!=3 ){
     printf("Usage: %s help COMMAND.\nAvailable COMMANDs:\n", g.argv[0]);
     cmd_cmd_list();
-    printf("This is fossil version " MANIFEST_VERSION " " MANIFEST_DATE "\n");
+    version_cmd();
     return;
   }
   rc = name_search(g.argv[2], aCommand, count(aCommand), &idx);
   if( rc==1 ){
     fossil_fatal("unknown command: %s", g.argv[2]);