Fossil SCM
Further enhancements.
Commit
a3409470aa85bf4b8d4673ab899fe81a586d0e1d
Parent
804bb55f0756bf2…
2 files changed
+18
+7
-7
+18
| --- src/file.c | ||
| +++ src/file.c | ||
| @@ -947,16 +947,26 @@ | ||
| 947 | 947 | ** |
| 948 | 948 | ** Usage: %fossil test-file-environment FILENAME... |
| 949 | 949 | ** |
| 950 | 950 | ** Display the effective file handling subsystem "settings" and then |
| 951 | 951 | ** display file system information about the files specified, if any. |
| 952 | +** | |
| 953 | +** Options: | |
| 954 | +** | |
| 955 | +** --open-config Open the configuration database first. | |
| 956 | +** --slash Trailing slashes, if any, are retained. | |
| 952 | 957 | */ |
| 953 | 958 | void cmd_test_file_environment(void){ |
| 954 | 959 | int i; |
| 955 | 960 | Blob x; |
| 956 | 961 | int slashFlag = find_option("slash",0,0)!=0; |
| 962 | + if( find_option("open-config", 0, 0)!=0 ){ | |
| 963 | + Th_OpenConfig(1); | |
| 964 | + } | |
| 957 | 965 | blob_zero(&x); |
| 966 | + fossil_print("Th_IsRepositoryOpen() = %d\n", Th_IsRepositoryOpen()); | |
| 967 | + fossil_print("Th_IsConfigOpen() = %d\n", Th_IsConfigOpen()); | |
| 958 | 968 | fossil_print("filenames_are_case_sensitive() = %d\n", |
| 959 | 969 | filenames_are_case_sensitive()); |
| 960 | 970 | fossil_print("db_allow_symlinks_by_default() = %d\n", |
| 961 | 971 | db_allow_symlinks_by_default()); |
| 962 | 972 | fossil_print("db_allow_symlinks(0) = %d\n", db_allow_symlinks(0)); |
| @@ -993,10 +1003,14 @@ | ||
| 993 | 1003 | ** |
| 994 | 1004 | ** Usage: %fossil test-canonical-name FILENAME... |
| 995 | 1005 | ** |
| 996 | 1006 | ** Test the operation of the canonical name generator. |
| 997 | 1007 | ** Also test Fossil's ability to measure attributes of a file. |
| 1008 | +** | |
| 1009 | +** Options: | |
| 1010 | +** | |
| 1011 | +** --slash Trailing slashes, if any, are retained. | |
| 998 | 1012 | */ |
| 999 | 1013 | void cmd_test_canonical_name(void){ |
| 1000 | 1014 | int i; |
| 1001 | 1015 | Blob x; |
| 1002 | 1016 | int slashFlag = find_option("slash",0,0)!=0; |
| @@ -1128,10 +1142,14 @@ | ||
| 1128 | 1142 | |
| 1129 | 1143 | /* |
| 1130 | 1144 | ** COMMAND: test-relative-name |
| 1131 | 1145 | ** |
| 1132 | 1146 | ** Test the operation of the relative name generator. |
| 1147 | +** | |
| 1148 | +** Options: | |
| 1149 | +** | |
| 1150 | +** --slash Trailing slashes, if any, are retained. | |
| 1133 | 1151 | */ |
| 1134 | 1152 | void cmd_test_relative_name(void){ |
| 1135 | 1153 | int i; |
| 1136 | 1154 | Blob x; |
| 1137 | 1155 | int slashFlag = find_option("slash",0,0)!=0; |
| 1138 | 1156 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -947,16 +947,26 @@ | |
| 947 | ** |
| 948 | ** Usage: %fossil test-file-environment FILENAME... |
| 949 | ** |
| 950 | ** Display the effective file handling subsystem "settings" and then |
| 951 | ** display file system information about the files specified, if any. |
| 952 | */ |
| 953 | void cmd_test_file_environment(void){ |
| 954 | int i; |
| 955 | Blob x; |
| 956 | int slashFlag = find_option("slash",0,0)!=0; |
| 957 | blob_zero(&x); |
| 958 | fossil_print("filenames_are_case_sensitive() = %d\n", |
| 959 | filenames_are_case_sensitive()); |
| 960 | fossil_print("db_allow_symlinks_by_default() = %d\n", |
| 961 | db_allow_symlinks_by_default()); |
| 962 | fossil_print("db_allow_symlinks(0) = %d\n", db_allow_symlinks(0)); |
| @@ -993,10 +1003,14 @@ | |
| 993 | ** |
| 994 | ** Usage: %fossil test-canonical-name FILENAME... |
| 995 | ** |
| 996 | ** Test the operation of the canonical name generator. |
| 997 | ** Also test Fossil's ability to measure attributes of a file. |
| 998 | */ |
| 999 | void cmd_test_canonical_name(void){ |
| 1000 | int i; |
| 1001 | Blob x; |
| 1002 | int slashFlag = find_option("slash",0,0)!=0; |
| @@ -1128,10 +1142,14 @@ | |
| 1128 | |
| 1129 | /* |
| 1130 | ** COMMAND: test-relative-name |
| 1131 | ** |
| 1132 | ** Test the operation of the relative name generator. |
| 1133 | */ |
| 1134 | void cmd_test_relative_name(void){ |
| 1135 | int i; |
| 1136 | Blob x; |
| 1137 | int slashFlag = find_option("slash",0,0)!=0; |
| 1138 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -947,16 +947,26 @@ | |
| 947 | ** |
| 948 | ** Usage: %fossil test-file-environment FILENAME... |
| 949 | ** |
| 950 | ** Display the effective file handling subsystem "settings" and then |
| 951 | ** display file system information about the files specified, if any. |
| 952 | ** |
| 953 | ** Options: |
| 954 | ** |
| 955 | ** --open-config Open the configuration database first. |
| 956 | ** --slash Trailing slashes, if any, are retained. |
| 957 | */ |
| 958 | void cmd_test_file_environment(void){ |
| 959 | int i; |
| 960 | Blob x; |
| 961 | int slashFlag = find_option("slash",0,0)!=0; |
| 962 | if( find_option("open-config", 0, 0)!=0 ){ |
| 963 | Th_OpenConfig(1); |
| 964 | } |
| 965 | blob_zero(&x); |
| 966 | fossil_print("Th_IsRepositoryOpen() = %d\n", Th_IsRepositoryOpen()); |
| 967 | fossil_print("Th_IsConfigOpen() = %d\n", Th_IsConfigOpen()); |
| 968 | fossil_print("filenames_are_case_sensitive() = %d\n", |
| 969 | filenames_are_case_sensitive()); |
| 970 | fossil_print("db_allow_symlinks_by_default() = %d\n", |
| 971 | db_allow_symlinks_by_default()); |
| 972 | fossil_print("db_allow_symlinks(0) = %d\n", db_allow_symlinks(0)); |
| @@ -993,10 +1003,14 @@ | |
| 1003 | ** |
| 1004 | ** Usage: %fossil test-canonical-name FILENAME... |
| 1005 | ** |
| 1006 | ** Test the operation of the canonical name generator. |
| 1007 | ** Also test Fossil's ability to measure attributes of a file. |
| 1008 | ** |
| 1009 | ** Options: |
| 1010 | ** |
| 1011 | ** --slash Trailing slashes, if any, are retained. |
| 1012 | */ |
| 1013 | void cmd_test_canonical_name(void){ |
| 1014 | int i; |
| 1015 | Blob x; |
| 1016 | int slashFlag = find_option("slash",0,0)!=0; |
| @@ -1128,10 +1142,14 @@ | |
| 1142 | |
| 1143 | /* |
| 1144 | ** COMMAND: test-relative-name |
| 1145 | ** |
| 1146 | ** Test the operation of the relative name generator. |
| 1147 | ** |
| 1148 | ** Options: |
| 1149 | ** |
| 1150 | ** --slash Trailing slashes, if any, are retained. |
| 1151 | */ |
| 1152 | void cmd_test_relative_name(void){ |
| 1153 | int i; |
| 1154 | Blob x; |
| 1155 | int slashFlag = find_option("slash",0,0)!=0; |
| 1156 |
+7
-7
| --- src/th_main.c | ||
| +++ src/th_main.c | ||
| @@ -21,10 +21,17 @@ | ||
| 21 | 21 | #include "config.h" |
| 22 | 22 | #include "th_main.h" |
| 23 | 23 | #include "sqlite3.h" |
| 24 | 24 | |
| 25 | 25 | #if INTERFACE |
| 26 | +/* | |
| 27 | +** These macros are used within this file to detect if the repository and | |
| 28 | +** configuration ("user") database are currently open. | |
| 29 | +*/ | |
| 30 | +#define Th_IsRepositoryOpen() (g.repositoryOpen) | |
| 31 | +#define Th_IsConfigOpen() (g.zConfigDbName!=0) | |
| 32 | + | |
| 26 | 33 | /* |
| 27 | 34 | ** Flag parameters to the Th_FossilInit() routine used to control the |
| 28 | 35 | ** interpreter creation and initialization process. |
| 29 | 36 | */ |
| 30 | 37 | #define TH_INIT_NONE ((u32)0x00000000) /* No flags. */ |
| @@ -59,17 +66,10 @@ | ||
| 59 | 66 | */ |
| 60 | 67 | #define NO_COMMAND_HOOK_ERROR "no such command: command_hook" |
| 61 | 68 | #define NO_WEBPAGE_HOOK_ERROR "no such command: webpage_hook" |
| 62 | 69 | #endif |
| 63 | 70 | |
| 64 | -/* | |
| 65 | -** These macros are used within this file to detect if the repository and | |
| 66 | -** configuration ("user") database are currently open. | |
| 67 | -*/ | |
| 68 | -#define Th_IsRepositoryOpen() (g.repositoryOpen) | |
| 69 | -#define Th_IsConfigOpen() (g.zConfigDbName!=0) | |
| 70 | - | |
| 71 | 71 | /* |
| 72 | 72 | ** Global variable counting the number of outstanding calls to malloc() |
| 73 | 73 | ** made by the th1 implementation. This is used to catch memory leaks |
| 74 | 74 | ** in the interpreter. Obviously, it also means th1 is not threadsafe. |
| 75 | 75 | */ |
| 76 | 76 |
| --- src/th_main.c | |
| +++ src/th_main.c | |
| @@ -21,10 +21,17 @@ | |
| 21 | #include "config.h" |
| 22 | #include "th_main.h" |
| 23 | #include "sqlite3.h" |
| 24 | |
| 25 | #if INTERFACE |
| 26 | /* |
| 27 | ** Flag parameters to the Th_FossilInit() routine used to control the |
| 28 | ** interpreter creation and initialization process. |
| 29 | */ |
| 30 | #define TH_INIT_NONE ((u32)0x00000000) /* No flags. */ |
| @@ -59,17 +66,10 @@ | |
| 59 | */ |
| 60 | #define NO_COMMAND_HOOK_ERROR "no such command: command_hook" |
| 61 | #define NO_WEBPAGE_HOOK_ERROR "no such command: webpage_hook" |
| 62 | #endif |
| 63 | |
| 64 | /* |
| 65 | ** These macros are used within this file to detect if the repository and |
| 66 | ** configuration ("user") database are currently open. |
| 67 | */ |
| 68 | #define Th_IsRepositoryOpen() (g.repositoryOpen) |
| 69 | #define Th_IsConfigOpen() (g.zConfigDbName!=0) |
| 70 | |
| 71 | /* |
| 72 | ** Global variable counting the number of outstanding calls to malloc() |
| 73 | ** made by the th1 implementation. This is used to catch memory leaks |
| 74 | ** in the interpreter. Obviously, it also means th1 is not threadsafe. |
| 75 | */ |
| 76 |
| --- src/th_main.c | |
| +++ src/th_main.c | |
| @@ -21,10 +21,17 @@ | |
| 21 | #include "config.h" |
| 22 | #include "th_main.h" |
| 23 | #include "sqlite3.h" |
| 24 | |
| 25 | #if INTERFACE |
| 26 | /* |
| 27 | ** These macros are used within this file to detect if the repository and |
| 28 | ** configuration ("user") database are currently open. |
| 29 | */ |
| 30 | #define Th_IsRepositoryOpen() (g.repositoryOpen) |
| 31 | #define Th_IsConfigOpen() (g.zConfigDbName!=0) |
| 32 | |
| 33 | /* |
| 34 | ** Flag parameters to the Th_FossilInit() routine used to control the |
| 35 | ** interpreter creation and initialization process. |
| 36 | */ |
| 37 | #define TH_INIT_NONE ((u32)0x00000000) /* No flags. */ |
| @@ -59,17 +66,10 @@ | |
| 66 | */ |
| 67 | #define NO_COMMAND_HOOK_ERROR "no such command: command_hook" |
| 68 | #define NO_WEBPAGE_HOOK_ERROR "no such command: webpage_hook" |
| 69 | #endif |
| 70 | |
| 71 | /* |
| 72 | ** Global variable counting the number of outstanding calls to malloc() |
| 73 | ** made by the th1 implementation. This is used to catch memory leaks |
| 74 | ** in the interpreter. Obviously, it also means th1 is not threadsafe. |
| 75 | */ |
| 76 |