Fossil SCM

Make the mv-rm-files available without special compile-time options.

drh 2018-06-26 11:21 trunk
Commit 27e5e5ce65262f5a0520cdffbd4851359849d2b604b756ce3fd4b41568660a47
2 files changed +6 -39 -2
+6 -39
--- src/add.c
+++ src/add.c
@@ -22,28 +22,10 @@
2222
#include "add.h"
2323
#include <assert.h>
2424
#include <dirent.h>
2525
#include "cygsup.h"
2626
27
-/*
28
-** WARNING: For Fossil version x.x this value was always zero. For Fossil-NG
29
-** it will probably always be one. When this value is zero,
30
-** files in the checkout will not be moved by the "mv" command and
31
-** files in the checkout will not be removed by the "rm" command.
32
-**
33
-** If the FOSSIL_ENABLE_LEGACY_MV_RM compile-time option is used,
34
-** the "mv-rm-files" setting will be consulted instead of using
35
-** this value.
36
-**
37
-** To retain the Fossil version 2.x behavior when using Fossil-NG
38
-** the FOSSIL_ENABLE_LEGACY_MV_RM compile-time option must be used
39
-** -AND- the "mv-rm-files" setting must be set to zero.
40
-*/
41
-#ifndef FOSSIL_MV_RM_FILE
42
-#define FOSSIL_MV_RM_FILE (0)
43
-#endif
44
-
4527
/*
4628
** This routine returns the names of files in a working checkout that
4729
** are created by Fossil itself, and hence should not be added, deleted,
4830
** or merge, and should be omitted from "clean" and "extras" lists.
4931
**
@@ -424,21 +406,18 @@
424406
** Remove one or more files or directories from the repository.
425407
**
426408
** The 'rm' and 'delete' commands do NOT normally remove the files from
427409
** disk. They just mark the files as no longer being part of the project.
428410
** In other words, future changes to the named files will not be versioned.
429
-** However, the default behavior of this command may be overridden via the
430
-** command line options listed below and/or the 'mv-rm-files' setting.
411
+** However, the default behavior of this command may be overridden using
412
+** the --hard or --soft command line options or by changing the
413
+** 'mv-rm-files' setting.
431414
**
432415
** The 'forget' command never removes files from disk, even when the command
433416
** line options and/or the 'mv-rm-files' setting would otherwise require it
434417
** to do so.
435418
**
436
-** WARNING: If the "--hard" option is specified -OR- the "mv-rm-files"
437
-** setting is non-zero, files WILL BE removed from disk as well.
438
-** This does NOT apply to the 'forget' command.
439
-**
440419
** Options:
441420
** --soft Skip removing files from the checkout.
442421
** This supersedes the --hard option.
443422
** --hard Remove files from the checkout.
444423
** --case-sensitive <BOOL> Override the case-sensitive setting.
@@ -468,15 +447,11 @@
468447
}else if( softFlag ){
469448
removeFiles = 0;
470449
}else if( hardFlag ){
471450
removeFiles = 1;
472451
}else{
473
-#if FOSSIL_ENABLE_LEGACY_MV_RM
474452
removeFiles = db_get_boolean("mv-rm-files",0);
475
-#else
476
- removeFiles = FOSSIL_MV_RM_FILE;
477
-#endif
478453
}
479454
db_multi_exec("CREATE TEMP TABLE sfile(pathname TEXT PRIMARY KEY %s)",
480455
filename_collation());
481456
for(i=2; i<g.argc; i++){
482457
Blob treeName;
@@ -831,22 +806,18 @@
831806
** Move or rename one or more files or directories within the repository tree.
832807
** You can either rename a file or directory or move it to another subdirectory.
833808
**
834809
** The 'mv' command does NOT normally rename or move the files on disk.
835810
** This command merely records the fact that file names have changed so
836
-** that appropriate notations can be made at the next commit/check-in.
837
-** However, the default behavior of this command may be overridden via
838
-** command line options listed below and/or the 'mv-rm-files' setting.
811
+** that appropriate notations can be made at the next commit/check-in.
812
+** This behavior can be changed using the --hard or --soft command-line
813
+** options or by changing the 'mv-rm-files' setting.
839814
**
840815
** The 'rename' command never renames or moves files on disk, even when the
841816
** command line options and/or the 'mv-rm-files' setting would otherwise
842817
** require it to do so.
843818
**
844
-** WARNING: If the "--hard" option is specified -OR- the "mv-rm-files"
845
-** setting is non-zero, files WILL BE renamed or moved on disk
846
-** as well. This does NOT apply to the 'rename' command.
847
-**
848819
** Options:
849820
** --soft Skip moving files within the checkout.
850821
** This supersedes the --hard option.
851822
** --hard Move files within the checkout.
852823
** --case-sensitive <BOOL> Override the case-sensitive setting.
@@ -889,15 +860,11 @@
889860
}else if( softFlag ){
890861
moveFiles = 0;
891862
}else if( hardFlag ){
892863
moveFiles = 1;
893864
}else{
894
-#if FOSSIL_ENABLE_LEGACY_MV_RM
895865
moveFiles = db_get_boolean("mv-rm-files",0);
896
-#else
897
- moveFiles = FOSSIL_MV_RM_FILE;
898
-#endif
899866
}
900867
file_tree_name(zDest, &dest, 0, 1);
901868
db_multi_exec(
902869
"UPDATE vfile SET origname=pathname WHERE origname IS NULL;"
903870
);
904871
--- src/add.c
+++ src/add.c
@@ -22,28 +22,10 @@
22 #include "add.h"
23 #include <assert.h>
24 #include <dirent.h>
25 #include "cygsup.h"
26
27 /*
28 ** WARNING: For Fossil version x.x this value was always zero. For Fossil-NG
29 ** it will probably always be one. When this value is zero,
30 ** files in the checkout will not be moved by the "mv" command and
31 ** files in the checkout will not be removed by the "rm" command.
32 **
33 ** If the FOSSIL_ENABLE_LEGACY_MV_RM compile-time option is used,
34 ** the "mv-rm-files" setting will be consulted instead of using
35 ** this value.
36 **
37 ** To retain the Fossil version 2.x behavior when using Fossil-NG
38 ** the FOSSIL_ENABLE_LEGACY_MV_RM compile-time option must be used
39 ** -AND- the "mv-rm-files" setting must be set to zero.
40 */
41 #ifndef FOSSIL_MV_RM_FILE
42 #define FOSSIL_MV_RM_FILE (0)
43 #endif
44
45 /*
46 ** This routine returns the names of files in a working checkout that
47 ** are created by Fossil itself, and hence should not be added, deleted,
48 ** or merge, and should be omitted from "clean" and "extras" lists.
49 **
@@ -424,21 +406,18 @@
424 ** Remove one or more files or directories from the repository.
425 **
426 ** The 'rm' and 'delete' commands do NOT normally remove the files from
427 ** disk. They just mark the files as no longer being part of the project.
428 ** In other words, future changes to the named files will not be versioned.
429 ** However, the default behavior of this command may be overridden via the
430 ** command line options listed below and/or the 'mv-rm-files' setting.
 
431 **
432 ** The 'forget' command never removes files from disk, even when the command
433 ** line options and/or the 'mv-rm-files' setting would otherwise require it
434 ** to do so.
435 **
436 ** WARNING: If the "--hard" option is specified -OR- the "mv-rm-files"
437 ** setting is non-zero, files WILL BE removed from disk as well.
438 ** This does NOT apply to the 'forget' command.
439 **
440 ** Options:
441 ** --soft Skip removing files from the checkout.
442 ** This supersedes the --hard option.
443 ** --hard Remove files from the checkout.
444 ** --case-sensitive <BOOL> Override the case-sensitive setting.
@@ -468,15 +447,11 @@
468 }else if( softFlag ){
469 removeFiles = 0;
470 }else if( hardFlag ){
471 removeFiles = 1;
472 }else{
473 #if FOSSIL_ENABLE_LEGACY_MV_RM
474 removeFiles = db_get_boolean("mv-rm-files",0);
475 #else
476 removeFiles = FOSSIL_MV_RM_FILE;
477 #endif
478 }
479 db_multi_exec("CREATE TEMP TABLE sfile(pathname TEXT PRIMARY KEY %s)",
480 filename_collation());
481 for(i=2; i<g.argc; i++){
482 Blob treeName;
@@ -831,22 +806,18 @@
831 ** Move or rename one or more files or directories within the repository tree.
832 ** You can either rename a file or directory or move it to another subdirectory.
833 **
834 ** The 'mv' command does NOT normally rename or move the files on disk.
835 ** This command merely records the fact that file names have changed so
836 ** that appropriate notations can be made at the next commit/check-in.
837 ** However, the default behavior of this command may be overridden via
838 ** command line options listed below and/or the 'mv-rm-files' setting.
839 **
840 ** The 'rename' command never renames or moves files on disk, even when the
841 ** command line options and/or the 'mv-rm-files' setting would otherwise
842 ** require it to do so.
843 **
844 ** WARNING: If the "--hard" option is specified -OR- the "mv-rm-files"
845 ** setting is non-zero, files WILL BE renamed or moved on disk
846 ** as well. This does NOT apply to the 'rename' command.
847 **
848 ** Options:
849 ** --soft Skip moving files within the checkout.
850 ** This supersedes the --hard option.
851 ** --hard Move files within the checkout.
852 ** --case-sensitive <BOOL> Override the case-sensitive setting.
@@ -889,15 +860,11 @@
889 }else if( softFlag ){
890 moveFiles = 0;
891 }else if( hardFlag ){
892 moveFiles = 1;
893 }else{
894 #if FOSSIL_ENABLE_LEGACY_MV_RM
895 moveFiles = db_get_boolean("mv-rm-files",0);
896 #else
897 moveFiles = FOSSIL_MV_RM_FILE;
898 #endif
899 }
900 file_tree_name(zDest, &dest, 0, 1);
901 db_multi_exec(
902 "UPDATE vfile SET origname=pathname WHERE origname IS NULL;"
903 );
904
--- src/add.c
+++ src/add.c
@@ -22,28 +22,10 @@
22 #include "add.h"
23 #include <assert.h>
24 #include <dirent.h>
25 #include "cygsup.h"
26
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27 /*
28 ** This routine returns the names of files in a working checkout that
29 ** are created by Fossil itself, and hence should not be added, deleted,
30 ** or merge, and should be omitted from "clean" and "extras" lists.
31 **
@@ -424,21 +406,18 @@
406 ** Remove one or more files or directories from the repository.
407 **
408 ** The 'rm' and 'delete' commands do NOT normally remove the files from
409 ** disk. They just mark the files as no longer being part of the project.
410 ** In other words, future changes to the named files will not be versioned.
411 ** However, the default behavior of this command may be overridden using
412 ** the --hard or --soft command line options or by changing the
413 ** 'mv-rm-files' setting.
414 **
415 ** The 'forget' command never removes files from disk, even when the command
416 ** line options and/or the 'mv-rm-files' setting would otherwise require it
417 ** to do so.
418 **
 
 
 
 
419 ** Options:
420 ** --soft Skip removing files from the checkout.
421 ** This supersedes the --hard option.
422 ** --hard Remove files from the checkout.
423 ** --case-sensitive <BOOL> Override the case-sensitive setting.
@@ -468,15 +447,11 @@
447 }else if( softFlag ){
448 removeFiles = 0;
449 }else if( hardFlag ){
450 removeFiles = 1;
451 }else{
 
452 removeFiles = db_get_boolean("mv-rm-files",0);
 
 
 
453 }
454 db_multi_exec("CREATE TEMP TABLE sfile(pathname TEXT PRIMARY KEY %s)",
455 filename_collation());
456 for(i=2; i<g.argc; i++){
457 Blob treeName;
@@ -831,22 +806,18 @@
806 ** Move or rename one or more files or directories within the repository tree.
807 ** You can either rename a file or directory or move it to another subdirectory.
808 **
809 ** The 'mv' command does NOT normally rename or move the files on disk.
810 ** This command merely records the fact that file names have changed so
811 ** that appropriate notations can be made at the next commit/check-in.
812 ** This behavior can be changed using the --hard or --soft command-line
813 ** options or by changing the 'mv-rm-files' setting.
814 **
815 ** The 'rename' command never renames or moves files on disk, even when the
816 ** command line options and/or the 'mv-rm-files' setting would otherwise
817 ** require it to do so.
818 **
 
 
 
 
819 ** Options:
820 ** --soft Skip moving files within the checkout.
821 ** This supersedes the --hard option.
822 ** --hard Move files within the checkout.
823 ** --case-sensitive <BOOL> Override the case-sensitive setting.
@@ -889,15 +860,11 @@
860 }else if( softFlag ){
861 moveFiles = 0;
862 }else if( hardFlag ){
863 moveFiles = 1;
864 }else{
 
865 moveFiles = db_get_boolean("mv-rm-files",0);
 
 
 
866 }
867 file_tree_name(zDest, &dest, 0, 1);
868 db_multi_exec(
869 "UPDATE vfile SET origname=pathname WHERE origname IS NULL;"
870 );
871
-2
--- src/db.c
+++ src/db.c
@@ -3133,19 +3133,17 @@
31333133
** Use file modification times (mtimes) to detect when
31343134
** files have been modified. If disabled, all managed files
31353135
** are hashed to detect changes, which can be slow for large
31363136
** projects.
31373137
*/
3138
-#if FOSSIL_ENABLE_LEGACY_MV_RM
31393138
/*
31403139
** SETTING: mv-rm-files boolean default=off
31413140
** If enabled, the "mv" and "rename" commands will also move
31423141
** the associated files within the checkout -AND- the "rm"
31433142
** and "delete" commands will also remove the associated
31443143
** files from within the checkout.
31453144
*/
3146
-#endif
31473145
/*
31483146
** SETTING: pgp-command width=40
31493147
** Command used to clear-sign manifests at check-in.
31503148
** Default value is "gpg --clearsign -o"
31513149
*/
31523150
--- src/db.c
+++ src/db.c
@@ -3133,19 +3133,17 @@
3133 ** Use file modification times (mtimes) to detect when
3134 ** files have been modified. If disabled, all managed files
3135 ** are hashed to detect changes, which can be slow for large
3136 ** projects.
3137 */
3138 #if FOSSIL_ENABLE_LEGACY_MV_RM
3139 /*
3140 ** SETTING: mv-rm-files boolean default=off
3141 ** If enabled, the "mv" and "rename" commands will also move
3142 ** the associated files within the checkout -AND- the "rm"
3143 ** and "delete" commands will also remove the associated
3144 ** files from within the checkout.
3145 */
3146 #endif
3147 /*
3148 ** SETTING: pgp-command width=40
3149 ** Command used to clear-sign manifests at check-in.
3150 ** Default value is "gpg --clearsign -o"
3151 */
3152
--- src/db.c
+++ src/db.c
@@ -3133,19 +3133,17 @@
3133 ** Use file modification times (mtimes) to detect when
3134 ** files have been modified. If disabled, all managed files
3135 ** are hashed to detect changes, which can be slow for large
3136 ** projects.
3137 */
 
3138 /*
3139 ** SETTING: mv-rm-files boolean default=off
3140 ** If enabled, the "mv" and "rename" commands will also move
3141 ** the associated files within the checkout -AND- the "rm"
3142 ** and "delete" commands will also remove the associated
3143 ** files from within the checkout.
3144 */
 
3145 /*
3146 ** SETTING: pgp-command width=40
3147 ** Command used to clear-sign manifests at check-in.
3148 ** Default value is "gpg --clearsign -o"
3149 */
3150

Keyboard Shortcuts

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