Fossil SCM

Further enhancements.

mistachkin 2017-02-14 00:13 UTC symlinks
Commit a3409470aa85bf4b8d4673ab899fe81a586d0e1d
2 files changed +18 +7 -7
+18
--- src/file.c
+++ src/file.c
@@ -947,16 +947,26 @@
947947
**
948948
** Usage: %fossil test-file-environment FILENAME...
949949
**
950950
** Display the effective file handling subsystem "settings" and then
951951
** 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.
952957
*/
953958
void cmd_test_file_environment(void){
954959
int i;
955960
Blob x;
956961
int slashFlag = find_option("slash",0,0)!=0;
962
+ if( find_option("open-config", 0, 0)!=0 ){
963
+ Th_OpenConfig(1);
964
+ }
957965
blob_zero(&x);
966
+ fossil_print("Th_IsRepositoryOpen() = %d\n", Th_IsRepositoryOpen());
967
+ fossil_print("Th_IsConfigOpen() = %d\n", Th_IsConfigOpen());
958968
fossil_print("filenames_are_case_sensitive() = %d\n",
959969
filenames_are_case_sensitive());
960970
fossil_print("db_allow_symlinks_by_default() = %d\n",
961971
db_allow_symlinks_by_default());
962972
fossil_print("db_allow_symlinks(0) = %d\n", db_allow_symlinks(0));
@@ -993,10 +1003,14 @@
9931003
**
9941004
** Usage: %fossil test-canonical-name FILENAME...
9951005
**
9961006
** Test the operation of the canonical name generator.
9971007
** Also test Fossil's ability to measure attributes of a file.
1008
+**
1009
+** Options:
1010
+**
1011
+** --slash Trailing slashes, if any, are retained.
9981012
*/
9991013
void cmd_test_canonical_name(void){
10001014
int i;
10011015
Blob x;
10021016
int slashFlag = find_option("slash",0,0)!=0;
@@ -1128,10 +1142,14 @@
11281142
11291143
/*
11301144
** COMMAND: test-relative-name
11311145
**
11321146
** Test the operation of the relative name generator.
1147
+**
1148
+** Options:
1149
+**
1150
+** --slash Trailing slashes, if any, are retained.
11331151
*/
11341152
void cmd_test_relative_name(void){
11351153
int i;
11361154
Blob x;
11371155
int slashFlag = find_option("slash",0,0)!=0;
11381156
--- 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 @@
2121
#include "config.h"
2222
#include "th_main.h"
2323
#include "sqlite3.h"
2424
2525
#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
+
2633
/*
2734
** Flag parameters to the Th_FossilInit() routine used to control the
2835
** interpreter creation and initialization process.
2936
*/
3037
#define TH_INIT_NONE ((u32)0x00000000) /* No flags. */
@@ -59,17 +66,10 @@
5966
*/
6067
#define NO_COMMAND_HOOK_ERROR "no such command: command_hook"
6168
#define NO_WEBPAGE_HOOK_ERROR "no such command: webpage_hook"
6269
#endif
6370
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
-
7171
/*
7272
** Global variable counting the number of outstanding calls to malloc()
7373
** made by the th1 implementation. This is used to catch memory leaks
7474
** in the interpreter. Obviously, it also means th1 is not threadsafe.
7575
*/
7676
--- 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

Keyboard Shortcuts

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