Differences From:
File
src/main.c
part of check-in
[0be54823ba]
- Add defenses against cross-site request forgery attacks.
by
drh on
2008-10-18 12:55:44.
[view]
To:
File
src/main.c
part of check-in
[a1f727be9d]
- Add the "version" command to print out the source-code version number for the
fossil executable.
by
drh on
2008-10-18 20:29:33.
[view]
@@ -427,8 +427,20 @@
}
/*
+** 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
**
@@ -439,9 +451,9 @@
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 ){