Fossil SCM
Make sure that the 'open' command honors the global 'allow-symlinks' setting in addition to the versioned and per-repository ones.
Commit
8aed22a23167e5e3c2d2ab0f6e43851988781f2e
Parent
6ee986b1d73a766…
1 file changed
+5
-6
M
src/db.c
+5
-6
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -2247,16 +2247,10 @@ | ||
| 2247 | 2247 | }else if( db_exists("SELECT 1 FROM event WHERE type='ci'") ){ |
| 2248 | 2248 | g.zOpenRevision = db_get("main-branch", "trunk"); |
| 2249 | 2249 | } |
| 2250 | 2250 | } |
| 2251 | 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 | 2252 | #if defined(_WIN32) || defined(__CYGWIN__) |
| 2259 | 2253 | # define LOCALDB_NAME "./_FOSSIL_" |
| 2260 | 2254 | #else |
| 2261 | 2255 | # define LOCALDB_NAME "./.fslckout" |
| 2262 | 2256 | #endif |
| @@ -2265,10 +2259,15 @@ | ||
| 2265 | 2259 | "COMMIT; PRAGMA journal_mode=WAL; BEGIN;", |
| 2266 | 2260 | #endif |
| 2267 | 2261 | (char*)0); |
| 2268 | 2262 | db_delete_on_failure(LOCALDB_NAME); |
| 2269 | 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 | + } | |
| 2270 | 2269 | db_lset("repository", g.argv[2]); |
| 2271 | 2270 | db_record_repository_filename(g.argv[2]); |
| 2272 | 2271 | db_lset_int("checkout", 0); |
| 2273 | 2272 | azNewArgv[0] = g.argv[0]; |
| 2274 | 2273 | g.argv = azNewArgv; |
| 2275 | 2274 |
| --- 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; |
| 2275 |
| --- 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; |
| 2274 |