Fossil SCM

Enable symlinks by default on non-Windows platforms and make sure that the 'open' command honors the global 'allow-symlinks' setting in addition to the versioned and per-repository ones.

mistachkin 2015-11-03 21:50 trunk merge
Commit 9ecbfb372498ae6d770b92f77257b1dc15d4d5ee
1 file changed +9 -6
+9 -6
--- src/db.c
+++ src/db.c
@@ -2247,16 +2247,10 @@
22472247
}else if( db_exists("SELECT 1 FROM event WHERE type='ci'") ){
22482248
g.zOpenRevision = db_get("main-branch", "trunk");
22492249
}
22502250
}
22512251
2252
- if( g.zOpenRevision ){
2253
- /* Since the repository is open and we know the revision now,
2254
- ** refresh the allow-symlinks flag. */
2255
- g.allowSymlinks = db_get_boolean("allow-symlinks", 0);
2256
- }
2257
-
22582252
#if defined(_WIN32) || defined(__CYGWIN__)
22592253
# define LOCALDB_NAME "./_FOSSIL_"
22602254
#else
22612255
# define LOCALDB_NAME "./.fslckout"
22622256
#endif
@@ -2265,10 +2259,15 @@
22652259
"COMMIT; PRAGMA journal_mode=WAL; BEGIN;",
22662260
#endif
22672261
(char*)0);
22682262
db_delete_on_failure(LOCALDB_NAME);
22692263
db_open_local(0);
2264
+ if( g.zOpenRevision ){
2265
+ /* Since the repository is open and we know the revision now,
2266
+ ** refresh the allow-symlinks flag. */
2267
+ g.allowSymlinks = db_get_boolean("allow-symlinks", 0);
2268
+ }
22702269
db_lset("repository", g.argv[2]);
22712270
db_record_repository_filename(g.argv[2]);
22722271
db_lset_int("checkout", 0);
22732272
azNewArgv[0] = g.argv[0];
22742273
g.argv = azNewArgv;
@@ -2356,11 +2355,15 @@
23562355
#endif /* INTERFACE */
23572356
23582357
const Setting aSetting[] = {
23592358
{ "access-log", 0, 0, 0, 0, "off" },
23602359
{ "admin-log", 0, 0, 0, 0, "off" },
2360
+#if defined(_WIN32)
23612361
{ "allow-symlinks", 0, 0, 1, 0, "off" },
2362
+#else
2363
+ { "allow-symlinks", 0, 0, 1, 0, "on" },
2364
+#endif
23622365
{ "auto-captcha", "autocaptcha", 0, 0, 0, "on" },
23632366
{ "auto-hyperlink", 0, 0, 0, 0, "on", },
23642367
{ "auto-shun", 0, 0, 0, 0, "on" },
23652368
{ "autosync", 0, 0, 0, 0, "on" },
23662369
{ "autosync-tries", 0, 16, 0, 0, "1" },
23672370
--- src/db.c
+++ src/db.c
@@ -2247,16 +2247,10 @@
2247 }else if( db_exists("SELECT 1 FROM event WHERE type='ci'") ){
2248 g.zOpenRevision = db_get("main-branch", "trunk");
2249 }
2250 }
2251
2252 if( g.zOpenRevision ){
2253 /* Since the repository is open and we know the revision now,
2254 ** refresh the allow-symlinks flag. */
2255 g.allowSymlinks = db_get_boolean("allow-symlinks", 0);
2256 }
2257
2258 #if defined(_WIN32) || defined(__CYGWIN__)
2259 # define LOCALDB_NAME "./_FOSSIL_"
2260 #else
2261 # define LOCALDB_NAME "./.fslckout"
2262 #endif
@@ -2265,10 +2259,15 @@
2265 "COMMIT; PRAGMA journal_mode=WAL; BEGIN;",
2266 #endif
2267 (char*)0);
2268 db_delete_on_failure(LOCALDB_NAME);
2269 db_open_local(0);
 
 
 
 
 
2270 db_lset("repository", g.argv[2]);
2271 db_record_repository_filename(g.argv[2]);
2272 db_lset_int("checkout", 0);
2273 azNewArgv[0] = g.argv[0];
2274 g.argv = azNewArgv;
@@ -2356,11 +2355,15 @@
2356 #endif /* INTERFACE */
2357
2358 const Setting aSetting[] = {
2359 { "access-log", 0, 0, 0, 0, "off" },
2360 { "admin-log", 0, 0, 0, 0, "off" },
 
2361 { "allow-symlinks", 0, 0, 1, 0, "off" },
 
 
 
2362 { "auto-captcha", "autocaptcha", 0, 0, 0, "on" },
2363 { "auto-hyperlink", 0, 0, 0, 0, "on", },
2364 { "auto-shun", 0, 0, 0, 0, "on" },
2365 { "autosync", 0, 0, 0, 0, "on" },
2366 { "autosync-tries", 0, 16, 0, 0, "1" },
2367
--- src/db.c
+++ src/db.c
@@ -2247,16 +2247,10 @@
2247 }else if( db_exists("SELECT 1 FROM event WHERE type='ci'") ){
2248 g.zOpenRevision = db_get("main-branch", "trunk");
2249 }
2250 }
2251
 
 
 
 
 
 
2252 #if defined(_WIN32) || defined(__CYGWIN__)
2253 # define LOCALDB_NAME "./_FOSSIL_"
2254 #else
2255 # define LOCALDB_NAME "./.fslckout"
2256 #endif
@@ -2265,10 +2259,15 @@
2259 "COMMIT; PRAGMA journal_mode=WAL; BEGIN;",
2260 #endif
2261 (char*)0);
2262 db_delete_on_failure(LOCALDB_NAME);
2263 db_open_local(0);
2264 if( g.zOpenRevision ){
2265 /* Since the repository is open and we know the revision now,
2266 ** refresh the allow-symlinks flag. */
2267 g.allowSymlinks = db_get_boolean("allow-symlinks", 0);
2268 }
2269 db_lset("repository", g.argv[2]);
2270 db_record_repository_filename(g.argv[2]);
2271 db_lset_int("checkout", 0);
2272 azNewArgv[0] = g.argv[0];
2273 g.argv = azNewArgv;
@@ -2356,11 +2355,15 @@
2355 #endif /* INTERFACE */
2356
2357 const Setting aSetting[] = {
2358 { "access-log", 0, 0, 0, 0, "off" },
2359 { "admin-log", 0, 0, 0, 0, "off" },
2360 #if defined(_WIN32)
2361 { "allow-symlinks", 0, 0, 1, 0, "off" },
2362 #else
2363 { "allow-symlinks", 0, 0, 1, 0, "on" },
2364 #endif
2365 { "auto-captcha", "autocaptcha", 0, 0, 0, "on" },
2366 { "auto-hyperlink", 0, 0, 0, 0, "on", },
2367 { "auto-shun", 0, 0, 0, 0, "on" },
2368 { "autosync", 0, 0, 0, 0, "on" },
2369 { "autosync-tries", 0, 16, 0, 0, "1" },
2370

Keyboard Shortcuts

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