Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch no-dir-symlinks Excluding Merge-Ins
This is equivalent to a diff from e6f64f5eeb to aff4363d1c
2017-09-19
| ||
01:36 | Change the content_deltify() routine so that looks an array of candidate source artifacts and picks the one that gives the best delta. ... (check-in: a4047a91e3 user: drh tags: trunk) | |
2017-09-11
| ||
16:44 | Restore the --no-dir-symlinks option. ... (Closed-Leaf check-in: aff4363d1c user: mistachkin tags: no-dir-symlinks) | |
2017-09-08
| ||
04:05 | Moved the check for iconv(3) in -liconv up within auto.def. If it happens after the checks for OpenSSL on certain macOS configurations, autosetup can be fooled into believing it doesn't need -liconv on that platform. This checkin splits up the group of cc-check-functions calls, so the moved call is now documented as to why its segregated. ... (check-in: e6f64f5eeb user: wyoung tags: trunk) | |
00:10 | Correct handling of mtime updates for UV push. ... (check-in: 669cd4041b user: drh tags: trunk) | |
2017-08-30
| ||
14:15 | Removed dead reference to g.fNoDirSymlinks. ... (check-in: 949d777d76 user: stephan tags: trunk) | |
12:02 | Remove the --no-dir-symlinks option. This is a back-out of check-in [2375d6cbce933267] together with other cleanup changes. ... (check-in: b7272185ca user: drh tags: trunk) | |
Changes to src/add.c.
︙ | ︙ | |||
274 275 276 277 278 279 280 281 282 283 284 285 286 287 | ** --case-sensitive <BOOL> Override the case-sensitive setting. ** --dotfiles include files beginning with a dot (".") ** -f|--force Add files without prompting ** --ignore <CSG> Ignore unmanaged files matching patterns from ** the comma separated list of glob patterns. ** --clean <CSG> Also ignore files matching patterns from ** the comma separated list of glob patterns. ** ** See also: addremove, rm */ void add_cmd(void){ int i; /* Loop counter */ int vid; /* Currently checked out version */ int nRoot; /* Full path characters in g.zLocalRoot */ | > | 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 | ** --case-sensitive <BOOL> Override the case-sensitive setting. ** --dotfiles include files beginning with a dot (".") ** -f|--force Add files without prompting ** --ignore <CSG> Ignore unmanaged files matching patterns from ** the comma separated list of glob patterns. ** --clean <CSG> Also ignore files matching patterns from ** the comma separated list of glob patterns. ** --no-dir-symlinks Disables support for directory symlinks. ** ** See also: addremove, rm */ void add_cmd(void){ int i; /* Loop counter */ int vid; /* Currently checked out version */ int nRoot; /* Full path characters in g.zLocalRoot */ |
︙ | ︙ | |||
439 440 441 442 443 444 445 446 447 448 449 450 451 452 | ** ** Options: ** --soft Skip removing files from the checkout. ** This supersedes the --hard option. ** --hard Remove files from the checkout. ** --case-sensitive <BOOL> Override the case-sensitive setting. ** -n|--dry-run If given, display instead of run actions. ** ** See also: addremove, add */ void delete_cmd(void){ int i; int removeFiles; int dryRunFlag; | > | 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 | ** ** Options: ** --soft Skip removing files from the checkout. ** This supersedes the --hard option. ** --hard Remove files from the checkout. ** --case-sensitive <BOOL> Override the case-sensitive setting. ** -n|--dry-run If given, display instead of run actions. ** --no-dir-symlinks Disables support for directory symlinks. ** ** See also: addremove, add */ void delete_cmd(void){ int i; int removeFiles; int dryRunFlag; |
︙ | ︙ | |||
620 621 622 623 624 625 626 627 628 629 630 631 632 633 | ** --case-sensitive <BOOL> Override the case-sensitive setting. ** --dotfiles Include files beginning with a dot (".") ** --ignore <CSG> Ignore unmanaged files matching patterns from ** the comma separated list of glob patterns. ** --clean <CSG> Also ignore files matching patterns from ** the comma separated list of glob patterns. ** -n|--dry-run If given, display instead of run actions. ** ** See also: add, rm */ void addremove_cmd(void){ Blob path; const char *zCleanFlag = find_option("clean",0,1); const char *zIgnoreFlag = find_option("ignore",0,1); | > | 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 | ** --case-sensitive <BOOL> Override the case-sensitive setting. ** --dotfiles Include files beginning with a dot (".") ** --ignore <CSG> Ignore unmanaged files matching patterns from ** the comma separated list of glob patterns. ** --clean <CSG> Also ignore files matching patterns from ** the comma separated list of glob patterns. ** -n|--dry-run If given, display instead of run actions. ** --no-dir-symlinks Disables support for directory symlinks. ** ** See also: add, rm */ void addremove_cmd(void){ Blob path; const char *zCleanFlag = find_option("clean",0,1); const char *zIgnoreFlag = find_option("ignore",0,1); |
︙ | ︙ | |||
847 848 849 850 851 852 853 854 855 856 857 858 859 860 | ** ** Options: ** --soft Skip moving files within the checkout. ** This supersedes the --hard option. ** --hard Move files within the checkout. ** --case-sensitive <BOOL> Override the case-sensitive setting. ** -n|--dry-run If given, display instead of run actions. ** ** See also: changes, status */ void mv_cmd(void){ int i; int vid; int moveFiles; | > | 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 | ** ** Options: ** --soft Skip moving files within the checkout. ** This supersedes the --hard option. ** --hard Move files within the checkout. ** --case-sensitive <BOOL> Override the case-sensitive setting. ** -n|--dry-run If given, display instead of run actions. ** --no-dir-symlinks Disables support for directory symlinks. ** ** See also: changes, status */ void mv_cmd(void){ int i; int vid; int moveFiles; |
︙ | ︙ |
Changes to src/checkin.c.
︙ | ︙ | |||
415 416 417 418 419 420 421 422 423 424 425 426 427 428 | ** --rel-paths Display pathnames relative to the current working ** directory. ** --hash Verify file status using hashing rather than ** relying on file mtimes. ** --case-sensitive <BOOL> Override case-sensitive setting. ** --dotfiles Include unmanaged files beginning with a dot. ** --ignore <CSG> Ignore unmanaged files matching CSG glob patterns. ** ** Options specific to the changes command: ** --header Identify the repository if report is non-empty. ** -v|--verbose Say "(none)" if the change report is empty. ** --classify Start each line with the file's change type. ** --no-classify Do not print file change types. ** | > | 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 | ** --rel-paths Display pathnames relative to the current working ** directory. ** --hash Verify file status using hashing rather than ** relying on file mtimes. ** --case-sensitive <BOOL> Override case-sensitive setting. ** --dotfiles Include unmanaged files beginning with a dot. ** --ignore <CSG> Ignore unmanaged files matching CSG glob patterns. ** --no-dir-symlinks Disables support for directory symlinks. ** ** Options specific to the changes command: ** --header Identify the repository if report is non-empty. ** -v|--verbose Say "(none)" if the change report is empty. ** --classify Start each line with the file's change type. ** --no-classify Do not print file change types. ** |
︙ | ︙ | |||
823 824 825 826 827 828 829 830 831 832 833 834 835 836 | ** ** Options: ** --abs-paths Display absolute pathnames. ** --case-sensitive <BOOL> override case-sensitive setting ** --dotfiles include files beginning with a dot (".") ** --header Identify the repository if there are extras ** --ignore <CSG> ignore files matching patterns from the argument ** --rel-paths Display pathnames relative to the current working ** directory. ** ** See also: changes, clean, status */ void extras_cmd(void){ Blob report = BLOB_INITIALIZER; | > | 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 | ** ** Options: ** --abs-paths Display absolute pathnames. ** --case-sensitive <BOOL> override case-sensitive setting ** --dotfiles include files beginning with a dot (".") ** --header Identify the repository if there are extras ** --ignore <CSG> ignore files matching patterns from the argument ** --no-dir-symlinks Disables support for directory symlinks. ** --rel-paths Display pathnames relative to the current working ** directory. ** ** See also: changes, clean, status */ void extras_cmd(void){ Blob report = BLOB_INITIALIZER; |
︙ | ︙ | |||
852 853 854 855 856 857 858 | /* We should be done with options.. */ verify_all_options(); if( zIgnoreFlag==0 ){ zIgnoreFlag = db_get("ignore-glob", 0); } pIgnore = glob_create(zIgnoreFlag); | < < | 854 855 856 857 858 859 860 861 862 863 864 865 866 867 | /* We should be done with options.. */ verify_all_options(); if( zIgnoreFlag==0 ){ zIgnoreFlag = db_get("ignore-glob", 0); } pIgnore = glob_create(zIgnoreFlag); locate_unmanaged_files(g.argc-2, g.argv+2, scanFlags, pIgnore); glob_free(pIgnore); blob_zero(&report); status_report(&report, flags); if( blob_size(&report) ){ if( showHdr ){ |
︙ | ︙ | |||
899 900 901 902 903 904 905 | ** ever be deleted. Files and subdirectories whose names begin with "." ** are automatically ignored unless the --dotfiles option is used. ** ** The default values for --clean, --ignore, and --keep are determined by ** the (versionable) clean-glob, ignore-glob, and keep-glob settings. ** ** The --verily option ignores the keep-glob and ignore-glob settings and | | | > | | 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 | ** ever be deleted. Files and subdirectories whose names begin with "." ** are automatically ignored unless the --dotfiles option is used. ** ** The default values for --clean, --ignore, and --keep are determined by ** the (versionable) clean-glob, ignore-glob, and keep-glob settings. ** ** The --verily option ignores the keep-glob and ignore-glob settings and ** turns on the options --force, --emptydirs, --dotfiles, --disable-undo, ** and --no-dir-symlinks. Use the --verily option when you really want ** to clean up everything. Extreme care should be exercised when using ** the --verily option. ** ** Options: ** --allckouts Check for empty directories within any checkouts ** that may be nested within the current one. This ** option should be used with great care because the ** empty-dirs setting (and other applicable settings) ** belonging to the other repositories, if any, will |
︙ | ︙ | |||
931 932 933 934 935 936 937 | ** that were removed will be removed as well. ** -f|--force Remove files without prompting. ** -i|--prompt Prompt before removing each file. This option ** implies the --disable-undo option. ** -x|--verily WARNING: Removes everything that is not a managed ** file or the repository itself. This option ** implies the --force, --emptydirs, --dotfiles, and | | > | 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 | ** that were removed will be removed as well. ** -f|--force Remove files without prompting. ** -i|--prompt Prompt before removing each file. This option ** implies the --disable-undo option. ** -x|--verily WARNING: Removes everything that is not a managed ** file or the repository itself. This option ** implies the --force, --emptydirs, --dotfiles, and ** --disable-undo, and --no-dir-symlinks options. ** Furthermore, it completely disregards the keep-glob ** and ignore-glob settings. However, it does honor ** the --ignore and --keep options. ** --clean <CSG> WARNING: Never prompt to delete any files matching ** this comma separated list of glob patterns. Also, ** deletions of any files matching this pattern list ** cannot be undone. ** --ignore <CSG> Ignore files matching patterns from the ** comma separated list of glob patterns. ** --keep <CSG> Keep files matching this comma separated ** list of glob patterns. ** -n|--dry-run Delete nothing, but display what would have been ** deleted. ** --no-prompt This option disables prompting the user for input ** and assumes an answer of 'No' for every question. ** --no-dir-symlinks Disables support for directory symlinks. ** --temp Remove only Fossil-generated temporary files. ** -v|--verbose Show all files as they are removed. ** ** See also: addremove, extras, status */ void clean_cmd(void){ int allFileFlag, allDirFlag, dryRunFlag, verboseFlag; |
︙ | ︙ | |||
995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 | db_must_be_within_tree(); if( find_option("verily","x",0)!=0 ){ verilyFlag = allFileFlag = allDirFlag = 1; emptyDirsFlag = 1; disableUndo = 1; scanFlags |= SCAN_ALL; zCleanFlag = 0; } if( zIgnoreFlag==0 && !verilyFlag ){ zIgnoreFlag = db_get("ignore-glob", 0); } if( zKeepFlag==0 && !verilyFlag ){ zKeepFlag = db_get("keep-glob", 0); } if( zCleanFlag==0 && !verilyFlag ){ zCleanFlag = db_get("clean-glob", 0); } if( db_get_boolean("dotfiles", 0) ) scanFlags |= SCAN_ALL; verify_all_options(); pIgnore = glob_create(zIgnoreFlag); pKeep = glob_create(zKeepFlag); pClean = glob_create(zCleanFlag); nRoot = (int)strlen(g.zLocalRoot); | > > < < | 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 | db_must_be_within_tree(); if( find_option("verily","x",0)!=0 ){ verilyFlag = allFileFlag = allDirFlag = 1; emptyDirsFlag = 1; disableUndo = 1; scanFlags |= SCAN_ALL; zCleanFlag = 0; g.fNoDirSymlinks = 1; /* Forbid symlink directory traversal. */ g.allowSymlinks = 1; /* Treat symlink files as content. */ } if( zIgnoreFlag==0 && !verilyFlag ){ zIgnoreFlag = db_get("ignore-glob", 0); } if( zKeepFlag==0 && !verilyFlag ){ zKeepFlag = db_get("keep-glob", 0); } if( zCleanFlag==0 && !verilyFlag ){ zCleanFlag = db_get("clean-glob", 0); } if( db_get_boolean("dotfiles", 0) ) scanFlags |= SCAN_ALL; verify_all_options(); pIgnore = glob_create(zIgnoreFlag); pKeep = glob_create(zKeepFlag); pClean = glob_create(zCleanFlag); nRoot = (int)strlen(g.zLocalRoot); if( !dirsOnlyFlag ){ Stmt q; Blob repo; if( !dryRunFlag && !disableUndo ) undo_begin(); locate_unmanaged_files(g.argc-2, g.argv+2, scanFlags, pIgnore); db_prepare(&q, "SELECT %Q || pathname FROM sfile" |
︙ | ︙ |
Changes to src/db.c.
︙ | ︙ | |||
1473 1474 1475 1476 1477 1478 1479 | return 1; #endif } /* ** Returns non-zero if support for symlinks is currently enabled. */ | | > > > > | > | 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 | return 1; #endif } /* ** Returns non-zero if support for symlinks is currently enabled. */ int db_allow_symlinks(int traversal){ if( traversal ){ if( g.allowSymlinks ) return 1; return g.fNoDirSymlinks; }else{ return g.allowSymlinks; } } /* ** Open the repository database given by zDbName. If zDbName==NULL then ** get the name from the already open local database. */ void db_open_repository(const char *zDbName){ |
︙ | ︙ |
Changes to src/file.c.
︙ | ︙ | |||
86 87 88 89 90 91 92 | ** Fill stat buf with information received from stat() or lstat(). ** lstat() is called on Unix if isWd is TRUE and allow-symlinks setting is on. ** */ static int fossil_stat( const char *zFilename, /* name of file or directory to inspect. */ struct fossilStat *buf, /* pointer to buffer where info should go. */ | | > | | 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | ** Fill stat buf with information received from stat() or lstat(). ** lstat() is called on Unix if isWd is TRUE and allow-symlinks setting is on. ** */ static int fossil_stat( const char *zFilename, /* name of file or directory to inspect. */ struct fossilStat *buf, /* pointer to buffer where info should go. */ int isWd, /* non-zero to consider look at symlink itself. */ int forceWd /* non-zero to force look at symlink itself. */ ){ int rc; void *zMbcs = fossil_utf8_to_path(zFilename, 0); #if !defined(_WIN32) if( isWd && (forceWd || db_allow_symlinks(0)) ){ rc = lstat(zMbcs, buf); }else{ rc = stat(zMbcs, buf); } #else rc = win32_stat(zMbcs, buf, isWd); #endif |
︙ | ︙ | |||
125 126 127 128 129 130 131 | ** Return the number of errors. No error messages are generated. */ static int getStat(const char *zFilename, int isWd){ int rc = 0; if( zFilename==0 ){ if( fileStatValid==0 ) rc = 1; }else{ | | | 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | ** Return the number of errors. No error messages are generated. */ static int getStat(const char *zFilename, int isWd){ int rc = 0; if( zFilename==0 ){ if( fileStatValid==0 ) rc = 1; }else{ if( fossil_stat(zFilename, &fileStat, isWd, 0)!=0 ){ fileStatValid = 0; rc = 1; }else{ fileStatValid = 1; rc = 0; } } |
︙ | ︙ | |||
217 218 219 220 221 222 223 | ** Create symlink to file on Unix, or plain-text file with ** symlink target if "allow-symlinks" is off or we're on Windows. ** ** Arguments: target file (symlink will point to it), link file **/ void symlink_create(const char *zTargetFile, const char *zLinkFile){ #if !defined(_WIN32) | | | 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 | ** Create symlink to file on Unix, or plain-text file with ** symlink target if "allow-symlinks" is off or we're on Windows. ** ** Arguments: target file (symlink will point to it), link file **/ void symlink_create(const char *zTargetFile, const char *zLinkFile){ #if !defined(_WIN32) if( db_allow_symlinks(0) ){ int i, nName; char *zName, zBuf[1000]; nName = strlen(zLinkFile); if( nName>=sizeof(zBuf) ){ zName = mprintf("%s", zLinkFile); }else{ |
︙ | ︙ | |||
274 275 276 277 278 279 280 | ** - PERM_REG for all other cases (regular file, directory, fifo, etc). */ int file_wd_perm(const char *zFilename){ #if !defined(_WIN32) if( !getStat(zFilename, 1) ){ if( S_ISREG(fileStat.st_mode) && ((S_IXUSR)&fileStat.st_mode)!=0 ) return PERM_EXE; | | | 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 | ** - PERM_REG for all other cases (regular file, directory, fifo, etc). */ int file_wd_perm(const char *zFilename){ #if !defined(_WIN32) if( !getStat(zFilename, 1) ){ if( S_ISREG(fileStat.st_mode) && ((S_IXUSR)&fileStat.st_mode)!=0 ) return PERM_EXE; else if( db_allow_symlinks(0) && S_ISLNK(fileStat.st_mode) ) return PERM_LNK; } #endif return PERM_REG; } /* |
︙ | ︙ | |||
327 328 329 330 331 332 333 334 335 336 | ** zFilename is a directory -OR- a symlink that points to a directory. ** Return 0 if zFilename does not exist. Return 2 if zFilename exists ** but is something other than a directory. */ int file_wd_isdir(const char *zFilename){ int rc; char *zFN; zFN = mprintf("%s", zFilename); file_simplify_name(zFN, -1, 0); | > > | | | | 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 | ** zFilename is a directory -OR- a symlink that points to a directory. ** Return 0 if zFilename does not exist. Return 2 if zFilename exists ** but is something other than a directory. */ int file_wd_isdir(const char *zFilename){ int rc; char *zFN; struct fossilStat dirFileStat; zFN = mprintf("%s", zFilename); file_simplify_name(zFN, -1, 0); memset(&dirFileStat, 0, sizeof(struct fossilStat)); rc = fossil_stat(zFN, &dirFileStat, 1, 1); if( rc ){ rc = 0; /* It does not exist at all. */ }else if( S_ISDIR(dirFileStat.st_mode) ){ rc = 1; /* It exists and is a real directory. */ }else if( !db_allow_symlinks(1) && S_ISLNK(dirFileStat.st_mode) ){ Blob content; blob_read_link(&content, zFN); /* It exists and is a link. */ rc = file_wd_isdir(blob_str(&content)); /* Points to directory? */ blob_reset(&content); }else{ rc = 2; /* It exists and is something else. */ } |
︙ | ︙ | |||
506 507 508 509 510 511 512 | ** Set or clear the execute bit on a file. Return true if a change ** occurred and false if this routine is a no-op. */ int file_wd_setexe(const char *zFilename, int onoff){ int rc = 0; #if !defined(_WIN32) struct stat buf; | | | 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 | ** Set or clear the execute bit on a file. Return true if a change ** occurred and false if this routine is a no-op. */ int file_wd_setexe(const char *zFilename, int onoff){ int rc = 0; #if !defined(_WIN32) struct stat buf; if( fossil_stat(zFilename, &buf, 1, 0)!=0 || S_ISLNK(buf.st_mode) ) return 0; if( onoff ){ int targetMode = (buf.st_mode & 0444)>>2; if( (buf.st_mode & 0100)==0 ){ chmod(zFilename, buf.st_mode | targetMode); rc = 1; } }else{ |
︙ | ︙ | |||
973 974 975 976 977 978 979 | file_canonical_name(zPath, &x, slash); fossil_print("%s[%s] -> [%s]\n", raw ? "RAW " : "", zPath, blob_buffer(&x)); blob_reset(&x); if( raw ){ int rc; struct fossilStat testFileStat; memset(&testFileStat, 0, sizeof(struct fossilStat)); | | | | 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 | file_canonical_name(zPath, &x, slash); fossil_print("%s[%s] -> [%s]\n", raw ? "RAW " : "", zPath, blob_buffer(&x)); blob_reset(&x); if( raw ){ int rc; struct fossilStat testFileStat; memset(&testFileStat, 0, sizeof(struct fossilStat)); rc = fossil_stat(zPath, &testFileStat, 0, 0); fossil_print(" stat_rc = %d\n", rc); sqlite3_snprintf(sizeof(zBuf), zBuf, "%lld", testFileStat.st_size); fossil_print(" stat_size = %s\n", zBuf); sqlite3_snprintf(sizeof(zBuf), zBuf, "%lld", testFileStat.st_mtime); fossil_print(" stat_mtime = %s\n", zBuf); fossil_print(" stat_mode = %d\n", testFileStat.st_mode); memset(&testFileStat, 0, sizeof(struct fossilStat)); rc = fossil_stat(zPath, &testFileStat, 1, 1); fossil_print(" l_stat_rc = %d\n", rc); sqlite3_snprintf(sizeof(zBuf), zBuf, "%lld", testFileStat.st_size); fossil_print(" l_stat_size = %s\n", zBuf); sqlite3_snprintf(sizeof(zBuf), zBuf, "%lld", testFileStat.st_mtime); fossil_print(" l_stat_mtime = %s\n", zBuf); fossil_print(" l_stat_mode = %d\n", testFileStat.st_mode); }else{ |
︙ | ︙ | |||
1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 | ** display file system information about the files specified, if any. ** ** Options: ** ** --open-config Open the configuration database first. ** --slash Trailing slashes, if any, are retained. ** --reset Reset cached stat() info for each file. */ void cmd_test_file_environment(void){ int i; int slashFlag = find_option("slash",0,0)!=0; int resetFlag = find_option("reset",0,0)!=0; if( find_option("open-config", 0, 0)!=0 ){ Th_OpenConfig(1); } fossil_print("filenames_are_case_sensitive() = %d\n", filenames_are_case_sensitive()); fossil_print("db_allow_symlinks_by_default() = %d\n", db_allow_symlinks_by_default()); | > > > > > > > > > | > > > > > > > < > | > > < | < < < < < < < < < < < < | 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 | ** display file system information about the files specified, if any. ** ** Options: ** ** --open-config Open the configuration database first. ** --slash Trailing slashes, if any, are retained. ** --reset Reset cached stat() info for each file. ** --symlinks BOOLEAN Force allow-symlinks on or off */ void cmd_test_file_environment(void){ int i; int slashFlag = find_option("slash",0,0)!=0; int resetFlag = find_option("reset",0,0)!=0; const char *forceSymlinks = find_option("symlinks",0,1); if( find_option("open-config", 0, 0)!=0 ){ Th_OpenConfig(1); } if( forceSymlinks ){ if( is_truth(forceSymlinks) ) g.allowSymlinks = 1; if( is_false(forceSymlinks) ) g.allowSymlinks = 0; } fossil_print("Th_IsLocalOpen() = %d\n", Th_IsLocalOpen()); fossil_print("Th_IsRepositoryOpen() = %d\n", Th_IsRepositoryOpen()); fossil_print("Th_IsConfigOpen() = %d\n", Th_IsConfigOpen()); fossil_print("filenames_are_case_sensitive() = %d\n", filenames_are_case_sensitive()); fossil_print("db_allow_symlinks_by_default() = %d\n", db_allow_symlinks_by_default()); fossil_print("db_allow_symlinks(0) = %d\n", db_allow_symlinks(0)); fossil_print("db_allow_symlinks(1) = %d\n", db_allow_symlinks(1)); for(i=2; i<g.argc; i++){ emitFileStat(g.argv[i], 1, slashFlag, resetFlag); emitFileStat(g.argv[i], 0, slashFlag, resetFlag); } } /* ** COMMAND: test-canonical-name ** ** Usage: %fossil test-canonical-name FILENAME... ** ** Test the operation of the canonical name generator. ** Also test Fossil's ability to measure attributes of a file. ** ** Options: ** ** --open-config Open the configuration database first. ** --slash Trailing slashes, if any, are retained. ** --reset Reset cached stat() info for each file. */ void cmd_test_canonical_name(void){ int i; int slashFlag = find_option("slash",0,0)!=0; int resetFlag = find_option("reset",0,0)!=0; if( find_option("open-config", 0, 0)!=0 ){ Th_OpenConfig(1); } for(i=2; i<g.argc; i++){ emitFileStat(g.argv[i], 0, slashFlag, resetFlag); } } /* ** Return TRUE if the given filename is canonical. ** ** Canonical names are full pathnames using "/" not "\" and which |
︙ | ︙ | |||
1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 | } } /* ** COMMAND: test-relative-name ** ** Test the operation of the relative name generator. */ void cmd_test_relative_name(void){ int i; Blob x; int slashFlag = find_option("slash",0,0)!=0; blob_zero(&x); for(i=2; i<g.argc; i++){ | > > > > | 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 | } } /* ** COMMAND: test-relative-name ** ** Test the operation of the relative name generator. ** ** Options: ** ** --slash Trailing slashes, if any, are retained. */ void cmd_test_relative_name(void){ int i; Blob x; int slashFlag = find_option("slash",0,0)!=0; blob_zero(&x); for(i=2; i<g.argc; i++){ |
︙ | ︙ | |||
1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 | ** ** Test the operation of the tree name generator. ** ** Options: ** --absolute Return an absolute path instead of a relative one. ** --case-sensitive B Enable or disable case-sensitive filenames. B is ** a boolean: "yes", "no", "true", "false", etc. */ void cmd_test_tree_name(void){ int i; Blob x; int absoluteFlag = find_option("absolute",0,0)!=0; db_find_and_open_repository(0,0); blob_zero(&x); | > | 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 | ** ** Test the operation of the tree name generator. ** ** Options: ** --absolute Return an absolute path instead of a relative one. ** --case-sensitive B Enable or disable case-sensitive filenames. B is ** a boolean: "yes", "no", "true", "false", etc. ** --no-dir-symlinks Disables support for directory symlinks. */ void cmd_test_tree_name(void){ int i; Blob x; int absoluteFlag = find_option("absolute",0,0)!=0; db_find_and_open_repository(0,0); blob_zero(&x); |
︙ | ︙ |
Changes to src/finfo.c.
︙ | ︙ | |||
43 44 45 46 47 48 49 50 51 52 53 54 55 56 | ** Options: ** -b|--brief display a brief (one line / revision) summary ** --case-sensitive B Enable or disable case-sensitive filenames. B is a ** boolean: "yes", "no", "true", "false", etc. ** -l|--log select log mode (the default) ** -n|--limit N Display the first N changes (default unlimited). ** N<=0 means no limit. ** --offset P skip P changes ** -p|--print select print mode ** -r|--revision R print the given revision (or ckout, if none is given) ** to stdout (only in print mode) ** -s|--status select status mode (print a status indicator for FILE) ** -W|--width <num> Width of lines (default is to auto-detect). Must be ** >22 or 0 (= no limit, resulting in a single line per | > | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | ** Options: ** -b|--brief display a brief (one line / revision) summary ** --case-sensitive B Enable or disable case-sensitive filenames. B is a ** boolean: "yes", "no", "true", "false", etc. ** -l|--log select log mode (the default) ** -n|--limit N Display the first N changes (default unlimited). ** N<=0 means no limit. ** --no-dir-symlinks Disables support for directory symlinks. ** --offset P skip P changes ** -p|--print select print mode ** -r|--revision R print the given revision (or ckout, if none is given) ** to stdout (only in print mode) ** -s|--status select status mode (print a status indicator for FILE) ** -W|--width <num> Width of lines (default is to auto-detect). Must be ** >22 or 0 (= no limit, resulting in a single line per |
︙ | ︙ |
Changes to src/json.c.
︙ | ︙ | |||
1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 | VAL(capabilities, json_cap_value()); INT(g, argc); INT(g, isConst); CSTR(g, zConfigDbName); INT(g, repositoryOpen); INT(g, localOpen); INT(g, minPrefix); INT(g, fSqlTrace); INT(g, fSqlStats); INT(g, fSqlPrint); INT(g, fQuiet); INT(g, fHttpTrace); INT(g, fSystemTrace); INT(g, fNoSync); | > | 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 | VAL(capabilities, json_cap_value()); INT(g, argc); INT(g, isConst); CSTR(g, zConfigDbName); INT(g, repositoryOpen); INT(g, localOpen); INT(g, minPrefix); INT(g, fNoDirSymlinks); INT(g, fSqlTrace); INT(g, fSqlStats); INT(g, fSqlPrint); INT(g, fQuiet); INT(g, fHttpTrace); INT(g, fSystemTrace); INT(g, fNoSync); |
︙ | ︙ |
Changes to src/main.c.
︙ | ︙ | |||
139 140 141 142 143 144 145 146 147 148 149 150 151 152 | char *zRepositoryName; /* Name of the repository database file */ char *zLocalDbName; /* Name of the local database file */ char *zOpenRevision; /* Check-in version to use during database open */ int localOpen; /* True if the local database is open */ char *zLocalRoot; /* The directory holding the local database */ int minPrefix; /* Number of digits needed for a distinct UUID */ int eHashPolicy; /* Current hash policy. One of HPOLICY_* */ int fSqlTrace; /* True if --sqltrace flag is present */ int fSqlStats; /* True if --sqltrace or --sqlstats are present */ int fSqlPrint; /* True if -sqlprint flag is present */ int fQuiet; /* True if -quiet flag is present */ int fJail; /* True if running with a chroot jail */ int fHttpTrace; /* Trace outbound HTTP requests */ int fAnyTrace; /* Any kind of tracing */ | > | 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | char *zRepositoryName; /* Name of the repository database file */ char *zLocalDbName; /* Name of the local database file */ char *zOpenRevision; /* Check-in version to use during database open */ int localOpen; /* True if the local database is open */ char *zLocalRoot; /* The directory holding the local database */ int minPrefix; /* Number of digits needed for a distinct UUID */ int eHashPolicy; /* Current hash policy. One of HPOLICY_* */ int fNoDirSymlinks; /* True if --no-dir-symlinks flag is present */ int fSqlTrace; /* True if --sqltrace flag is present */ int fSqlStats; /* True if --sqltrace or --sqlstats are present */ int fSqlPrint; /* True if -sqlprint flag is present */ int fQuiet; /* True if -quiet flag is present */ int fJail; /* True if running with a chroot jail */ int fHttpTrace; /* Trace outbound HTTP requests */ int fAnyTrace; /* Any kind of tracing */ |
︙ | ︙ | |||
619 620 621 622 623 624 625 626 627 628 629 630 631 632 | "another flag and is treated as such. --args FILENAME may be used\n" "in conjunction with any other flags.\n"); fossil_exit(1); }else{ const char *zChdir = find_option("chdir",0,1); g.isHTTP = 0; g.rcvid = 0; g.fQuiet = find_option("quiet", 0, 0)!=0; g.fSqlTrace = find_option("sqltrace", 0, 0)!=0; g.fSqlStats = find_option("sqlstats", 0, 0)!=0; g.fSystemTrace = find_option("systemtrace", 0, 0)!=0; g.fSshTrace = find_option("sshtrace", 0, 0)!=0; g.fSshClient = 0; g.zSshCmd = 0; | > | 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 | "another flag and is treated as such. --args FILENAME may be used\n" "in conjunction with any other flags.\n"); fossil_exit(1); }else{ const char *zChdir = find_option("chdir",0,1); g.isHTTP = 0; g.rcvid = 0; g.fNoDirSymlinks = find_option("no-dir-symlinks", 0, 0)!=0; g.fQuiet = find_option("quiet", 0, 0)!=0; g.fSqlTrace = find_option("sqltrace", 0, 0)!=0; g.fSqlStats = find_option("sqlstats", 0, 0)!=0; g.fSystemTrace = find_option("systemtrace", 0, 0)!=0; g.fSshTrace = find_option("sshtrace", 0, 0)!=0; g.fSshClient = 0; g.zSshCmd = 0; |
︙ | ︙ |
Changes to src/merge.c.
︙ | ︙ | |||
203 204 205 206 207 208 209 210 211 212 213 214 215 216 | ** to be the same file. ** ** -f|--force Force the merge even if it would be a no-op. ** ** --force-missing Force the merge even if there is missing content. ** ** --integrate Merged branch will be closed when committing. ** ** -n|--dry-run If given, display instead of run actions ** ** -v|--verbose Show additional details of the merge */ void merge_cmd(void){ int vid; /* Current version "V" */ | > > | 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 | ** to be the same file. ** ** -f|--force Force the merge even if it would be a no-op. ** ** --force-missing Force the merge even if there is missing content. ** ** --integrate Merged branch will be closed when committing. ** ** --no-dir-symlinks Disables support for directory symlinks. ** ** -n|--dry-run If given, display instead of run actions ** ** -v|--verbose Show additional details of the merge */ void merge_cmd(void){ int vid; /* Current version "V" */ |
︙ | ︙ |
Changes to src/th_main.c.
︙ | ︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 | ** (an independent project) and fossil. */ #include "config.h" #include "th_main.h" #include "sqlite3.h" #if INTERFACE /* ** Flag parameters to the Th_FossilInit() routine used to control the ** interpreter creation and initialization process. */ #define TH_INIT_NONE ((u32)0x00000000) /* No flags. */ #define TH_INIT_NEED_CONFIG ((u32)0x00000001) /* Open configuration first? */ #define TH_INIT_FORCE_TCL ((u32)0x00000002) /* Force Tcl to be enabled? */ | > > > > > > > > | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | ** (an independent project) and fossil. */ #include "config.h" #include "th_main.h" #include "sqlite3.h" #if INTERFACE /* ** These macros are used within this file to detect if the repository and ** configuration ("user") database are currently open. */ #define Th_IsLocalOpen() (g.localOpen) #define Th_IsRepositoryOpen() (g.repositoryOpen) #define Th_IsConfigOpen() (g.zConfigDbName!=0) /* ** Flag parameters to the Th_FossilInit() routine used to control the ** interpreter creation and initialization process. */ #define TH_INIT_NONE ((u32)0x00000000) /* No flags. */ #define TH_INIT_NEED_CONFIG ((u32)0x00000001) /* Open configuration first? */ #define TH_INIT_FORCE_TCL ((u32)0x00000002) /* Force Tcl to be enabled? */ |
︙ | ︙ | |||
57 58 59 60 61 62 63 | ** page, respectively. If one of these errors is seen, it will not be sent ** or displayed to the remote user or local interactive user, respectively. */ #define NO_COMMAND_HOOK_ERROR "no such command: command_hook" #define NO_WEBPAGE_HOOK_ERROR "no such command: webpage_hook" #endif | < < < < < < < | 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | ** page, respectively. If one of these errors is seen, it will not be sent ** or displayed to the remote user or local interactive user, respectively. */ #define NO_COMMAND_HOOK_ERROR "no such command: command_hook" #define NO_WEBPAGE_HOOK_ERROR "no such command: webpage_hook" #endif /* ** Global variable counting the number of outstanding calls to malloc() ** made by the th1 implementation. This is used to catch memory leaks ** in the interpreter. Obviously, it also means th1 is not threadsafe. */ static int nOutstandingMalloc = 0; |
︙ | ︙ |
Changes to src/update.c.
︙ | ︙ | |||
93 94 95 96 97 98 99 100 101 102 103 104 105 106 | ** unchanged files in addition to those file that actually do change. ** ** Options: ** --case-sensitive <BOOL> override case-sensitive setting ** --debug print debug information on stdout ** --latest acceptable in place of VERSION, update to latest version ** --force-missing force update if missing content after sync ** -n|--dry-run If given, display instead of run actions ** -v|--verbose print status information about all files ** -W|--width <num> Width of lines (default is to auto-detect). Must be >20 ** or 0 (= no limit, resulting in a single line per entry). ** ** See also: revert */ | > | 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | ** unchanged files in addition to those file that actually do change. ** ** Options: ** --case-sensitive <BOOL> override case-sensitive setting ** --debug print debug information on stdout ** --latest acceptable in place of VERSION, update to latest version ** --force-missing force update if missing content after sync ** --no-dir-symlinks Disables support for directory symlinks. ** -n|--dry-run If given, display instead of run actions ** -v|--verbose print status information about all files ** -W|--width <num> Width of lines (default is to auto-detect). Must be >20 ** or 0 (= no limit, resulting in a single line per entry). ** ** See also: revert */ |
︙ | ︙ |