Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Make the mv-rm-files available without special compile-time options. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
27e5e5ce65262f5a0520cdffbd485135 |
User & Date: | drh 2018-06-26 11:21:08 |
Context
2018-06-26
| ||
16:57 | An alternative to removing FOSSIL_ENABLE_LEGACY_MV_RM that just makes it the default. ... (Closed-Leaf check-in: efb0f880 user: mistachkin tags: altLegacyMvRm) | |
11:54 | Fix compiler warnings on windows. Fix the file_directory_size() function so that it works on windows. ... (check-in: 6a7d2ad8 user: drh tags: trunk) | |
11:21 | Make the mv-rm-files available without special compile-time options. ... (check-in: 27e5e5ce user: drh tags: trunk) | |
02:26 | Fix a critical bug in the new blob_append_char() routine that was added to the previous check-in. This bug causes crashes. Also change the quoted-printable encoding to escape the ':' character so that lines in the body of an email will never be confused with a header line like "From:". ... (check-in: 122905c2 user: drh tags: trunk) | |
Changes
Changes to src/add.c.
︙ | ︙ | |||
20 21 22 23 24 25 26 | */ #include "config.h" #include "add.h" #include <assert.h> #include <dirent.h> #include "cygsup.h" | < < < < < < < < < < < < < < < < < < | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | */ #include "config.h" #include "add.h" #include <assert.h> #include <dirent.h> #include "cygsup.h" /* ** This routine returns the names of files in a working checkout that ** are created by Fossil itself, and hence should not be added, deleted, ** or merge, and should be omitted from "clean" and "extras" lists. ** ** Return the N-th name. The first name has N==0. When all names have ** been used, return 0. |
︙ | ︙ | |||
422 423 424 425 426 427 428 | ** Usage: %fossil rm|delete|forget FILE1 ?FILE2 ...? ** ** Remove one or more files or directories from the repository. ** ** The 'rm' and 'delete' commands do NOT normally remove the files from ** disk. They just mark the files as no longer being part of the project. ** In other words, future changes to the named files will not be versioned. | | > | < < < < | 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 | ** Usage: %fossil rm|delete|forget FILE1 ?FILE2 ...? ** ** Remove one or more files or directories from the repository. ** ** The 'rm' and 'delete' commands do NOT normally remove the files from ** disk. They just mark the files as no longer being part of the project. ** In other words, future changes to the named files will not be versioned. ** However, the default behavior of this command may be overridden using ** the --hard or --soft command line options or by changing the ** 'mv-rm-files' setting. ** ** The 'forget' command never removes files from disk, even when the command ** line options and/or the 'mv-rm-files' setting would otherwise require it ** to do so. ** ** 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. ** |
︙ | ︙ | |||
466 467 468 469 470 471 472 | if( g.argv[1][0]=='f' ){ /* i.e. "forget" */ removeFiles = 0; }else if( softFlag ){ removeFiles = 0; }else if( hardFlag ){ removeFiles = 1; }else{ | < < < < | 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 | if( g.argv[1][0]=='f' ){ /* i.e. "forget" */ removeFiles = 0; }else if( softFlag ){ removeFiles = 0; }else if( hardFlag ){ removeFiles = 1; }else{ removeFiles = db_get_boolean("mv-rm-files",0); } db_multi_exec("CREATE TEMP TABLE sfile(pathname TEXT PRIMARY KEY %s)", filename_collation()); for(i=2; i<g.argc; i++){ Blob treeName; char *zTreeName; |
︙ | ︙ | |||
829 830 831 832 833 834 835 | ** or: %fossil mv|rename OLDNAME... DIR ** ** Move or rename one or more files or directories within the repository tree. ** You can either rename a file or directory or move it to another subdirectory. ** ** The 'mv' command does NOT normally rename or move the files on disk. ** This command merely records the fact that file names have changed so | | | | < < < < | 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 | ** or: %fossil mv|rename OLDNAME... DIR ** ** Move or rename one or more files or directories within the repository tree. ** You can either rename a file or directory or move it to another subdirectory. ** ** The 'mv' command does NOT normally rename or move the files on disk. ** This command merely records the fact that file names have changed so ** that appropriate notations can be made at the next commit/check-in. ** This behavior can be changed using the --hard or --soft command-line ** options or by changing the 'mv-rm-files' setting. ** ** The 'rename' command never renames or moves files on disk, even when the ** command line options and/or the 'mv-rm-files' setting would otherwise ** require it to do so. ** ** 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. ** |
︙ | ︙ | |||
887 888 889 890 891 892 893 | if( g.argv[1][0]=='r' ){ /* i.e. "rename" */ moveFiles = 0; }else if( softFlag ){ moveFiles = 0; }else if( hardFlag ){ moveFiles = 1; }else{ | < < < < | 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 | if( g.argv[1][0]=='r' ){ /* i.e. "rename" */ moveFiles = 0; }else if( softFlag ){ moveFiles = 0; }else if( hardFlag ){ moveFiles = 1; }else{ moveFiles = db_get_boolean("mv-rm-files",0); } file_tree_name(zDest, &dest, 0, 1); db_multi_exec( "UPDATE vfile SET origname=pathname WHERE origname IS NULL;" ); db_multi_exec( "CREATE TEMP TABLE mv(f TEXT UNIQUE ON CONFLICT IGNORE, t TEXT);" |
︙ | ︙ |
Changes to src/db.c.
︙ | ︙ | |||
3131 3132 3133 3134 3135 3136 3137 | /* ** SETTING: mtime-changes boolean default=on ** Use file modification times (mtimes) to detect when ** files have been modified. If disabled, all managed files ** are hashed to detect changes, which can be slow for large ** projects. */ | < < | 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 | /* ** SETTING: mtime-changes boolean default=on ** Use file modification times (mtimes) to detect when ** files have been modified. If disabled, all managed files ** are hashed to detect changes, which can be slow for large ** projects. */ /* ** SETTING: mv-rm-files boolean default=off ** If enabled, the "mv" and "rename" commands will also move ** the associated files within the checkout -AND- the "rm" ** and "delete" commands will also remove the associated ** files from within the checkout. */ /* ** SETTING: pgp-command width=40 ** Command used to clear-sign manifests at check-in. ** Default value is "gpg --clearsign -o" */ /* ** SETTING: proxy width=32 default=off |
︙ | ︙ |