Fossil SCM

Added basic implementation of RFE ticket [3a2a26513220342]: -verbose option for the "version" command.

stephan 2013-03-15 14:49 trunk
Commit 1be15a57f1a64478aabd54019f97db5ba1e85a73
1 file changed +26 -1
+26 -1
--- src/main.c
+++ src/main.c
@@ -742,17 +742,42 @@
742742
}
743743
744744
/*
745745
** COMMAND: version
746746
**
747
-** Usage: %fossil version
747
+** Usage: %fossil version ?-verbose|-v?
748748
**
749749
** Print the source code version number for the fossil executable.
750
+** If the verbose option is specified, additional details will
751
+** be output about what optional features this binary was compiled
752
+** with
750753
*/
751754
void version_cmd(void){
752755
fossil_print("This is fossil version " RELEASE_VERSION " "
753756
MANIFEST_VERSION " " MANIFEST_DATE " UTC\n");
757
+ if(!find_option("verbose","v",0)){
758
+ return;
759
+ }else{
760
+ fossil_print("Compiled with the following features enabled:\n",
761
+ COMPILER_NAME);
762
+ int count = 0;
763
+#if defined(FOSSIL_ENABLE_SSL)
764
+ ++count;
765
+ fossil_print("\tSSL\n");
766
+#endif
767
+#if defined(FOSSIL_ENABLE_TCL)
768
+ ++count;
769
+ fossil_print("\tTCL\n");
770
+#endif
771
+#if defined(FOSSIL_ENABLE_JSON)
772
+ ++count;
773
+ fossil_print("\tJSON\n");
774
+#endif
775
+ if(!count){
776
+ fossil_print("\tno optional features enabled.\n");
777
+ }
778
+ }
754779
}
755780
756781
757782
/*
758783
** COMMAND: help
759784
--- src/main.c
+++ src/main.c
@@ -742,17 +742,42 @@
742 }
743
744 /*
745 ** COMMAND: version
746 **
747 ** Usage: %fossil version
748 **
749 ** Print the source code version number for the fossil executable.
 
 
 
750 */
751 void version_cmd(void){
752 fossil_print("This is fossil version " RELEASE_VERSION " "
753 MANIFEST_VERSION " " MANIFEST_DATE " UTC\n");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
754 }
755
756
757 /*
758 ** COMMAND: help
759
--- src/main.c
+++ src/main.c
@@ -742,17 +742,42 @@
742 }
743
744 /*
745 ** COMMAND: version
746 **
747 ** Usage: %fossil version ?-verbose|-v?
748 **
749 ** Print the source code version number for the fossil executable.
750 ** If the verbose option is specified, additional details will
751 ** be output about what optional features this binary was compiled
752 ** with
753 */
754 void version_cmd(void){
755 fossil_print("This is fossil version " RELEASE_VERSION " "
756 MANIFEST_VERSION " " MANIFEST_DATE " UTC\n");
757 if(!find_option("verbose","v",0)){
758 return;
759 }else{
760 fossil_print("Compiled with the following features enabled:\n",
761 COMPILER_NAME);
762 int count = 0;
763 #if defined(FOSSIL_ENABLE_SSL)
764 ++count;
765 fossil_print("\tSSL\n");
766 #endif
767 #if defined(FOSSIL_ENABLE_TCL)
768 ++count;
769 fossil_print("\tTCL\n");
770 #endif
771 #if defined(FOSSIL_ENABLE_JSON)
772 ++count;
773 fossil_print("\tJSON\n");
774 #endif
775 if(!count){
776 fossil_print("\tno optional features enabled.\n");
777 }
778 }
779 }
780
781
782 /*
783 ** COMMAND: help
784

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button