Fossil SCM

Merge updates from trunk.

mistachkin 2015-04-10 00:42 andygoth-versioned-open merge
Commit 9cb9df0163a9a00151dd3ba3b103d40da6c3b90b
+7
--- auto.def
+++ auto.def
@@ -5,10 +5,11 @@
55
options {
66
with-openssl:path|auto|none
77
=> {Look for OpenSSL in the given path, or auto or none}
88
with-miniz=0 => {Use miniz from the source tree}
99
with-zlib:path => {Look for zlib in the given path}
10
+ with-legacy-mv-rm=0 => {Enable legacy behavior for mv/rm (skip checkout files)}
1011
with-th1-docs=0 => {Enable TH1 for embedded documentation pages}
1112
with-th1-hooks=0 => {Enable TH1 hooks for commands and web pages}
1213
with-tcl:path => {Enable Tcl integration, with Tcl in the specified path}
1314
with-tcl-stubs=0 => {Enable Tcl integration via stubs library mechanism}
1415
with-tcl-private-stubs=0
@@ -85,10 +86,16 @@
8586
# reading config.h first.
8687
define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_JSON
8788
define FOSSIL_ENABLE_JSON
8889
msg-result "JSON support enabled"
8990
}
91
+
92
+if {[opt-bool with-legacy-mv-rm]} {
93
+ define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_LEGACY_MV_RM
94
+ define FOSSIL_ENABLE_LEGACY_MV_RM
95
+ msg-result "Legacy mv/rm support enabled"
96
+}
9097
9198
if {[opt-bool with-th1-docs]} {
9299
define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_TH1_DOCS
93100
define FOSSIL_ENABLE_TH1_DOCS
94101
msg-result "TH1 embedded documentation support enabled"
95102
--- auto.def
+++ auto.def
@@ -5,10 +5,11 @@
5 options {
6 with-openssl:path|auto|none
7 => {Look for OpenSSL in the given path, or auto or none}
8 with-miniz=0 => {Use miniz from the source tree}
9 with-zlib:path => {Look for zlib in the given path}
 
10 with-th1-docs=0 => {Enable TH1 for embedded documentation pages}
11 with-th1-hooks=0 => {Enable TH1 hooks for commands and web pages}
12 with-tcl:path => {Enable Tcl integration, with Tcl in the specified path}
13 with-tcl-stubs=0 => {Enable Tcl integration via stubs library mechanism}
14 with-tcl-private-stubs=0
@@ -85,10 +86,16 @@
85 # reading config.h first.
86 define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_JSON
87 define FOSSIL_ENABLE_JSON
88 msg-result "JSON support enabled"
89 }
 
 
 
 
 
 
90
91 if {[opt-bool with-th1-docs]} {
92 define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_TH1_DOCS
93 define FOSSIL_ENABLE_TH1_DOCS
94 msg-result "TH1 embedded documentation support enabled"
95
--- auto.def
+++ auto.def
@@ -5,10 +5,11 @@
5 options {
6 with-openssl:path|auto|none
7 => {Look for OpenSSL in the given path, or auto or none}
8 with-miniz=0 => {Use miniz from the source tree}
9 with-zlib:path => {Look for zlib in the given path}
10 with-legacy-mv-rm=0 => {Enable legacy behavior for mv/rm (skip checkout files)}
11 with-th1-docs=0 => {Enable TH1 for embedded documentation pages}
12 with-th1-hooks=0 => {Enable TH1 hooks for commands and web pages}
13 with-tcl:path => {Enable Tcl integration, with Tcl in the specified path}
14 with-tcl-stubs=0 => {Enable Tcl integration via stubs library mechanism}
15 with-tcl-private-stubs=0
@@ -85,10 +86,16 @@
86 # reading config.h first.
87 define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_JSON
88 define FOSSIL_ENABLE_JSON
89 msg-result "JSON support enabled"
90 }
91
92 if {[opt-bool with-legacy-mv-rm]} {
93 define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_LEGACY_MV_RM
94 define FOSSIL_ENABLE_LEGACY_MV_RM
95 msg-result "Legacy mv/rm support enabled"
96 }
97
98 if {[opt-bool with-th1-docs]} {
99 define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_TH1_DOCS
100 define FOSSIL_ENABLE_TH1_DOCS
101 msg-result "TH1 embedded documentation support enabled"
102
+219 -16
--- src/add.c
+++ src/add.c
@@ -22,10 +22,28 @@
2222
#include "add.h"
2323
#include <assert.h>
2424
#include <dirent.h>
2525
#include "cygsup.h"
2626
27
+/*
28
+** WARNING: For Fossil version 1.x this value was always zero. For Fossil
29
+** 2.x, 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 1.x behavior when using Fossil 2.x,
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
+
2745
/*
2846
** This routine returns the names of files in a working checkout that
2947
** are created by Fossil itself, and hence should not be added, deleted,
3048
** or merge, and should be omitted from "clean" and "extras" lists.
3149
**
@@ -331,10 +349,58 @@
331349
glob_free(pClean);
332350
333351
add_files_in_sfile(vid);
334352
db_end_transaction(0);
335353
}
354
+
355
+/*
356
+** This function adds a file to list of files to delete from disk after
357
+** the other actions required for the parent operation have completed
358
+** successfully. The first time it is called for the current process,
359
+** it creates a temporary table named "fremove", to keep track of these
360
+** files.
361
+*/
362
+static void add_file_to_remove(
363
+ const char *zOldName /* The old name of the file on disk. */
364
+){
365
+ static int tableCreated = 0;
366
+ Blob fullOldName;
367
+ if( !tableCreated ){
368
+ db_multi_exec("CREATE TEMP TABLE fremove(x TEXT PRIMARY KEY %s)",
369
+ filename_collation());
370
+ tableCreated = 1;
371
+ }
372
+ file_canonical_name(zOldName, &fullOldName, 0);
373
+ db_multi_exec("INSERT INTO fremove VALUES('%q');", blob_str(&fullOldName));
374
+ blob_reset(&fullOldName);
375
+}
376
+
377
+/*
378
+** This function deletes files from the checkout, using the file names
379
+** contained in the temporary table "fremove". The temporary table is
380
+** created on demand by the add_file_to_remove() function.
381
+**
382
+** If dryRunFlag is non-zero, no files will be removed; however, their
383
+** names will still be output.
384
+**
385
+** The temporary table "fremove" is dropped after being processed.
386
+*/
387
+static void process_files_to_remove(
388
+ int dryRunFlag /* Zero to actually operate on the file-system. */
389
+){
390
+ Stmt remove;
391
+ db_prepare(&remove, "SELECT x FROM fremove ORDER BY x;");
392
+ while( db_step(&remove)==SQLITE_ROW ){
393
+ const char *zOldName = db_column_text(&remove, 0);
394
+ if( !dryRunFlag ){
395
+ file_delete(zOldName);
396
+ }
397
+ fossil_print("DELETED_FILE %s\n", zOldName);
398
+ }
399
+ db_finalize(&remove);
400
+ db_multi_exec("DROP TABLE fremove;");
401
+}
336402
337403
/*
338404
** COMMAND: rm
339405
** COMMAND: delete
340406
** COMMAND: forget*
@@ -341,28 +407,63 @@
341407
**
342408
** Usage: %fossil rm|delete|forget FILE1 ?FILE2 ...?
343409
**
344410
** Remove one or more files or directories from the repository.
345411
**
346
-** This command does NOT remove the files from disk. It just marks the
347
-** files as no longer being part of the project. In other words, future
348
-** changes to the named files will not be versioned.
412
+** The 'rm' and 'delete' commands do NOT normally remove the files from
413
+** disk. They just mark the files as no longer being part of the project.
414
+** In other words, future changes to the named files will not be versioned.
415
+** However, the default behavior of this command may be overridden via the
416
+** command line options listed below and/or the 'mv-rm-files' setting.
417
+**
418
+** The 'forget' command never removes files from disk, even when the command
419
+** line options and/or the 'mv-rm-files' setting would otherwise require it
420
+** to do so.
421
+**
422
+** WARNING: If the "--hard" option is specified -OR- the "mv-rm-files"
423
+** setting is non-zero, files WILL BE removed from disk as well.
424
+** This does NOT apply to the 'forget' command.
349425
**
350426
** Options:
427
+** --soft Skip removing files from the checkout.
428
+** This supersedes the --hard option.
429
+** --hard Remove files from the checkout.
351430
** --case-sensitive <BOOL> Override the case-sensitive setting.
431
+** -n|--dry-run If given, display instead of run actions.
352432
**
353433
** See also: addremove, add
354434
*/
355435
void delete_cmd(void){
356436
int i;
437
+ int removeFiles;
438
+ int dryRunFlag;
439
+ int softFlag;
440
+ int hardFlag;
357441
Stmt loop;
442
+
443
+ dryRunFlag = find_option("dry-run","n",0)!=0;
444
+ softFlag = find_option("soft",0,0)!=0;
445
+ hardFlag = find_option("hard",0,0)!=0;
358446
359447
/* We should be done with options.. */
360448
verify_all_options();
361449
362450
db_must_be_within_tree();
363451
db_begin_transaction();
452
+ if( g.argv[1][0]=='f' ){ /* i.e. "forget" */
453
+ removeFiles = 0;
454
+ }else if( softFlag ){
455
+ removeFiles = 0;
456
+ }else if( hardFlag ){
457
+ removeFiles = 1;
458
+ }else{
459
+#if FOSSIL_ENABLE_LEGACY_MV_RM
460
+ removeFiles = db_get_boolean("mv-rm-files",0);
461
+#else
462
+ removeFiles = FOSSIL_MV_RM_FILE;
463
+#endif
464
+ }
364465
db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY %s)",
365466
filename_collation());
366467
for(i=2; i<g.argc; i++){
367468
Blob treeName;
368469
char *zTreeName;
@@ -382,17 +483,21 @@
382483
}
383484
384485
db_prepare(&loop, "SELECT x FROM sfile");
385486
while( db_step(&loop)==SQLITE_ROW ){
386487
fossil_print("DELETED %s\n", db_column_text(&loop, 0));
488
+ if( removeFiles ) add_file_to_remove(db_column_text(&loop, 0));
387489
}
388490
db_finalize(&loop);
389
- db_multi_exec(
390
- "UPDATE vfile SET deleted=1 WHERE pathname IN sfile;"
391
- "DELETE FROM vfile WHERE rid=0 AND deleted;"
392
- );
491
+ if( !dryRunFlag ){
492
+ db_multi_exec(
493
+ "UPDATE vfile SET deleted=1 WHERE pathname IN sfile;"
494
+ "DELETE FROM vfile WHERE rid=0 AND deleted;"
495
+ );
496
+ }
393497
db_end_transaction(0);
498
+ if( removeFiles ) process_files_to_remove(dryRunFlag);
394499
}
395500
396501
/*
397502
** Capture the command-line --case-sensitive option.
398503
*/
@@ -593,11 +698,12 @@
593698
** The original name of the file is zOrig. The new filename is zNew.
594699
*/
595700
static void mv_one_file(
596701
int vid,
597702
const char *zOrig,
598
- const char *zNew
703
+ const char *zNew,
704
+ int dryRunFlag
599705
){
600706
int x = db_int(-1, "SELECT deleted FROM vfile WHERE pathname=%Q %s",
601707
zNew, filename_collation());
602708
if( x>=0 ){
603709
if( x==0 ){
@@ -607,14 +713,75 @@
607713
fossil_fatal("cannot rename '%s' to '%s' since the delete of '%s' has "
608714
"not yet been committed", zOrig, zNew, zNew);
609715
}
610716
}
611717
fossil_print("RENAME %s %s\n", zOrig, zNew);
612
- db_multi_exec(
613
- "UPDATE vfile SET pathname='%q' WHERE pathname='%q' %s AND vid=%d",
614
- zNew, zOrig, filename_collation(), vid
615
- );
718
+ if( !dryRunFlag ){
719
+ db_multi_exec(
720
+ "UPDATE vfile SET pathname='%q' WHERE pathname='%q' %s AND vid=%d",
721
+ zNew, zOrig, filename_collation(), vid
722
+ );
723
+ }
724
+}
725
+
726
+/*
727
+** This function adds a file to list of files to move on disk after the
728
+** other actions required for the parent operation have completed
729
+** successfully. The first time it is called for the current process,
730
+** it creates a temporary table named "fmove", to keep track of these
731
+** files.
732
+*/
733
+static void add_file_to_move(
734
+ const char *zOldName, /* The old name of the file on disk. */
735
+ const char *zNewName /* The new name of the file on disk. */
736
+){
737
+ static int tableCreated = 0;
738
+ Blob fullOldName;
739
+ Blob fullNewName;
740
+ if( !tableCreated ){
741
+ db_multi_exec("CREATE TEMP TABLE fmove(x TEXT PRIMARY KEY %s, y TEXT %s)",
742
+ filename_collation(), filename_collation());
743
+ tableCreated = 1;
744
+ }
745
+ file_canonical_name(zOldName, &fullOldName, 0);
746
+ file_canonical_name(zNewName, &fullNewName, 0);
747
+ db_multi_exec("INSERT INTO fmove VALUES('%q','%q');",
748
+ blob_str(&fullOldName), blob_str(&fullNewName));
749
+ blob_reset(&fullNewName);
750
+ blob_reset(&fullOldName);
751
+}
752
+
753
+/*
754
+** This function moves files within the checkout, using the file names
755
+** contained in the temporary table "fmove". The temporary table is
756
+** created on demand by the add_file_to_move() function.
757
+**
758
+** If dryRunFlag is non-zero, no files will be moved; however, their
759
+** names will still be output.
760
+**
761
+** The temporary table "fmove" is dropped after being processed.
762
+*/
763
+static void process_files_to_move(
764
+ int dryRunFlag /* Zero to actually operate on the file-system. */
765
+){
766
+ Stmt move;
767
+ db_prepare(&move, "SELECT x, y FROM fmove ORDER BY x;");
768
+ while( db_step(&move)==SQLITE_ROW ){
769
+ const char *zOldName = db_column_text(&move, 0);
770
+ const char *zNewName = db_column_text(&move, 1);
771
+ if( !dryRunFlag ){
772
+ if( file_wd_islink(zOldName) ){
773
+ symlink_copy(zOldName, zNewName);
774
+ }else{
775
+ file_copy(zOldName, zNewName);
776
+ }
777
+ file_delete(zOldName);
778
+ }
779
+ fossil_print("MOVED_FILE %s\n", zOldName);
780
+ }
781
+ db_finalize(&move);
782
+ db_multi_exec("DROP TABLE fmove;");
616783
}
617784
618785
/*
619786
** COMMAND: mv
620787
** COMMAND: rename*
@@ -623,27 +790,48 @@
623790
** or: %fossil mv|rename OLDNAME... DIR
624791
**
625792
** Move or rename one or more files or directories within the repository tree.
626793
** You can either rename a file or directory or move it to another subdirectory.
627794
**
628
-** This command does NOT rename or move the files on disk. This command merely
629
-** records the fact that filenames have changed so that appropriate notations
630
-** can be made at the next commit/check-in.
795
+** The 'mv' command does NOT normally rename or move the files on disk.
796
+** This command merely records the fact that file names have changed so
797
+** that appropriate notations can be made at the next commit/check-in.
798
+** However, the default behavior of this command may be overridden via
799
+** command line options listed below and/or the 'mv-rm-files' setting.
800
+**
801
+** The 'rename' command never renames or moves files on disk, even when the
802
+** command line options and/or the 'mv-rm-files' setting would otherwise
803
+** require it to do so.
804
+**
805
+** WARNING: If the "--hard" option is specified -OR- the "mv-rm-files"
806
+** setting is non-zero, files WILL BE renamed or moved on disk
807
+** as well. This does NOT apply to the 'rename' command.
631808
**
632809
** Options:
810
+** --soft Skip moving files within the checkout.
811
+** This supersedes the --hard option.
812
+** --hard Move files within the checkout.
633813
** --case-sensitive <BOOL> Override the case-sensitive setting.
814
+** -n|--dry-run If given, display instead of run actions.
634815
**
635816
** See also: changes, status
636817
*/
637818
void mv_cmd(void){
638819
int i;
639820
int vid;
821
+ int moveFiles;
822
+ int dryRunFlag;
823
+ int softFlag;
824
+ int hardFlag;
640825
char *zDest;
641826
Blob dest;
642827
Stmt q;
643828
644829
db_must_be_within_tree();
830
+ dryRunFlag = find_option("dry-run","n",0)!=0;
831
+ softFlag = find_option("soft",0,0)!=0;
832
+ hardFlag = find_option("hard",0,0)!=0;
645833
646834
/* We should be done with options.. */
647835
verify_all_options();
648836
649837
vid = db_lget_int("checkout", 0);
@@ -653,10 +841,23 @@
653841
if( g.argc<4 ){
654842
usage("OLDNAME NEWNAME");
655843
}
656844
zDest = g.argv[g.argc-1];
657845
db_begin_transaction();
846
+ if( g.argv[1][0]=='r' ){ /* i.e. "rename" */
847
+ moveFiles = 0;
848
+ }else if( softFlag ){
849
+ moveFiles = 0;
850
+ }else if( hardFlag ){
851
+ moveFiles = 1;
852
+ }else{
853
+#if FOSSIL_ENABLE_LEGACY_MV_RM
854
+ moveFiles = db_get_boolean("mv-rm-files",0);
855
+#else
856
+ moveFiles = FOSSIL_MV_RM_FILE;
857
+#endif
858
+ }
658859
file_tree_name(zDest, &dest, 1);
659860
db_multi_exec(
660861
"UPDATE vfile SET origname=pathname WHERE origname IS NULL;"
661862
);
662863
db_multi_exec(
@@ -711,18 +912,20 @@
711912
}
712913
db_prepare(&q, "SELECT f, t FROM mv ORDER BY f");
713914
while( db_step(&q)==SQLITE_ROW ){
714915
const char *zFrom = db_column_text(&q, 0);
715916
const char *zTo = db_column_text(&q, 1);
716
- mv_one_file(vid, zFrom, zTo);
917
+ mv_one_file(vid, zFrom, zTo, dryRunFlag);
918
+ if( moveFiles ) add_file_to_move(zFrom, zTo);
717919
}
718920
db_finalize(&q);
719921
db_end_transaction(0);
922
+ if( moveFiles ) process_files_to_move(dryRunFlag);
720923
}
721924
722925
/*
723926
** Function for stash_apply to be able to restore a file and indicate
724927
** newly ADDED state.
725928
*/
726929
int stash_add_files_in_sfile(int vid){
727930
return add_files_in_sfile(vid);
728931
}
729932
--- src/add.c
+++ src/add.c
@@ -22,10 +22,28 @@
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 **
@@ -331,10 +349,58 @@
331 glob_free(pClean);
332
333 add_files_in_sfile(vid);
334 db_end_transaction(0);
335 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
336
337 /*
338 ** COMMAND: rm
339 ** COMMAND: delete
340 ** COMMAND: forget*
@@ -341,28 +407,63 @@
341 **
342 ** Usage: %fossil rm|delete|forget FILE1 ?FILE2 ...?
343 **
344 ** Remove one or more files or directories from the repository.
345 **
346 ** This command does NOT remove the files from disk. It just marks the
347 ** files as no longer being part of the project. In other words, future
348 ** changes to the named files will not be versioned.
 
 
 
 
 
 
 
 
 
 
349 **
350 ** Options:
 
 
 
351 ** --case-sensitive <BOOL> Override the case-sensitive setting.
 
352 **
353 ** See also: addremove, add
354 */
355 void delete_cmd(void){
356 int i;
 
 
 
 
357 Stmt loop;
 
 
 
 
358
359 /* We should be done with options.. */
360 verify_all_options();
361
362 db_must_be_within_tree();
363 db_begin_transaction();
 
 
 
 
 
 
 
 
 
 
 
 
 
364 db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY %s)",
365 filename_collation());
366 for(i=2; i<g.argc; i++){
367 Blob treeName;
368 char *zTreeName;
@@ -382,17 +483,21 @@
382 }
383
384 db_prepare(&loop, "SELECT x FROM sfile");
385 while( db_step(&loop)==SQLITE_ROW ){
386 fossil_print("DELETED %s\n", db_column_text(&loop, 0));
 
387 }
388 db_finalize(&loop);
389 db_multi_exec(
390 "UPDATE vfile SET deleted=1 WHERE pathname IN sfile;"
391 "DELETE FROM vfile WHERE rid=0 AND deleted;"
392 );
 
 
393 db_end_transaction(0);
 
394 }
395
396 /*
397 ** Capture the command-line --case-sensitive option.
398 */
@@ -593,11 +698,12 @@
593 ** The original name of the file is zOrig. The new filename is zNew.
594 */
595 static void mv_one_file(
596 int vid,
597 const char *zOrig,
598 const char *zNew
 
599 ){
600 int x = db_int(-1, "SELECT deleted FROM vfile WHERE pathname=%Q %s",
601 zNew, filename_collation());
602 if( x>=0 ){
603 if( x==0 ){
@@ -607,14 +713,75 @@
607 fossil_fatal("cannot rename '%s' to '%s' since the delete of '%s' has "
608 "not yet been committed", zOrig, zNew, zNew);
609 }
610 }
611 fossil_print("RENAME %s %s\n", zOrig, zNew);
612 db_multi_exec(
613 "UPDATE vfile SET pathname='%q' WHERE pathname='%q' %s AND vid=%d",
614 zNew, zOrig, filename_collation(), vid
615 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
616 }
617
618 /*
619 ** COMMAND: mv
620 ** COMMAND: rename*
@@ -623,27 +790,48 @@
623 ** or: %fossil mv|rename OLDNAME... DIR
624 **
625 ** Move or rename one or more files or directories within the repository tree.
626 ** You can either rename a file or directory or move it to another subdirectory.
627 **
628 ** This command does NOT rename or move the files on disk. This command merely
629 ** records the fact that filenames have changed so that appropriate notations
630 ** can be made at the next commit/check-in.
 
 
 
 
 
 
 
 
 
 
631 **
632 ** Options:
 
 
 
633 ** --case-sensitive <BOOL> Override the case-sensitive setting.
 
634 **
635 ** See also: changes, status
636 */
637 void mv_cmd(void){
638 int i;
639 int vid;
 
 
 
 
640 char *zDest;
641 Blob dest;
642 Stmt q;
643
644 db_must_be_within_tree();
 
 
 
645
646 /* We should be done with options.. */
647 verify_all_options();
648
649 vid = db_lget_int("checkout", 0);
@@ -653,10 +841,23 @@
653 if( g.argc<4 ){
654 usage("OLDNAME NEWNAME");
655 }
656 zDest = g.argv[g.argc-1];
657 db_begin_transaction();
 
 
 
 
 
 
 
 
 
 
 
 
 
658 file_tree_name(zDest, &dest, 1);
659 db_multi_exec(
660 "UPDATE vfile SET origname=pathname WHERE origname IS NULL;"
661 );
662 db_multi_exec(
@@ -711,18 +912,20 @@
711 }
712 db_prepare(&q, "SELECT f, t FROM mv ORDER BY f");
713 while( db_step(&q)==SQLITE_ROW ){
714 const char *zFrom = db_column_text(&q, 0);
715 const char *zTo = db_column_text(&q, 1);
716 mv_one_file(vid, zFrom, zTo);
 
717 }
718 db_finalize(&q);
719 db_end_transaction(0);
 
720 }
721
722 /*
723 ** Function for stash_apply to be able to restore a file and indicate
724 ** newly ADDED state.
725 */
726 int stash_add_files_in_sfile(int vid){
727 return add_files_in_sfile(vid);
728 }
729
--- src/add.c
+++ src/add.c
@@ -22,10 +22,28 @@
22 #include "add.h"
23 #include <assert.h>
24 #include <dirent.h>
25 #include "cygsup.h"
26
27 /*
28 ** WARNING: For Fossil version 1.x this value was always zero. For Fossil
29 ** 2.x, 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 1.x behavior when using Fossil 2.x,
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 **
@@ -331,10 +349,58 @@
349 glob_free(pClean);
350
351 add_files_in_sfile(vid);
352 db_end_transaction(0);
353 }
354
355 /*
356 ** This function adds a file to list of files to delete from disk after
357 ** the other actions required for the parent operation have completed
358 ** successfully. The first time it is called for the current process,
359 ** it creates a temporary table named "fremove", to keep track of these
360 ** files.
361 */
362 static void add_file_to_remove(
363 const char *zOldName /* The old name of the file on disk. */
364 ){
365 static int tableCreated = 0;
366 Blob fullOldName;
367 if( !tableCreated ){
368 db_multi_exec("CREATE TEMP TABLE fremove(x TEXT PRIMARY KEY %s)",
369 filename_collation());
370 tableCreated = 1;
371 }
372 file_canonical_name(zOldName, &fullOldName, 0);
373 db_multi_exec("INSERT INTO fremove VALUES('%q');", blob_str(&fullOldName));
374 blob_reset(&fullOldName);
375 }
376
377 /*
378 ** This function deletes files from the checkout, using the file names
379 ** contained in the temporary table "fremove". The temporary table is
380 ** created on demand by the add_file_to_remove() function.
381 **
382 ** If dryRunFlag is non-zero, no files will be removed; however, their
383 ** names will still be output.
384 **
385 ** The temporary table "fremove" is dropped after being processed.
386 */
387 static void process_files_to_remove(
388 int dryRunFlag /* Zero to actually operate on the file-system. */
389 ){
390 Stmt remove;
391 db_prepare(&remove, "SELECT x FROM fremove ORDER BY x;");
392 while( db_step(&remove)==SQLITE_ROW ){
393 const char *zOldName = db_column_text(&remove, 0);
394 if( !dryRunFlag ){
395 file_delete(zOldName);
396 }
397 fossil_print("DELETED_FILE %s\n", zOldName);
398 }
399 db_finalize(&remove);
400 db_multi_exec("DROP TABLE fremove;");
401 }
402
403 /*
404 ** COMMAND: rm
405 ** COMMAND: delete
406 ** COMMAND: forget*
@@ -341,28 +407,63 @@
407 **
408 ** Usage: %fossil rm|delete|forget FILE1 ?FILE2 ...?
409 **
410 ** Remove one or more files or directories from the repository.
411 **
412 ** The 'rm' and 'delete' commands do NOT normally remove the files from
413 ** disk. They just mark the files as no longer being part of the project.
414 ** In other words, future changes to the named files will not be versioned.
415 ** However, the default behavior of this command may be overridden via the
416 ** command line options listed below and/or the 'mv-rm-files' setting.
417 **
418 ** The 'forget' command never removes files from disk, even when the command
419 ** line options and/or the 'mv-rm-files' setting would otherwise require it
420 ** to do so.
421 **
422 ** WARNING: If the "--hard" option is specified -OR- the "mv-rm-files"
423 ** setting is non-zero, files WILL BE removed from disk as well.
424 ** This does NOT apply to the 'forget' command.
425 **
426 ** Options:
427 ** --soft Skip removing files from the checkout.
428 ** This supersedes the --hard option.
429 ** --hard Remove files from the checkout.
430 ** --case-sensitive <BOOL> Override the case-sensitive setting.
431 ** -n|--dry-run If given, display instead of run actions.
432 **
433 ** See also: addremove, add
434 */
435 void delete_cmd(void){
436 int i;
437 int removeFiles;
438 int dryRunFlag;
439 int softFlag;
440 int hardFlag;
441 Stmt loop;
442
443 dryRunFlag = find_option("dry-run","n",0)!=0;
444 softFlag = find_option("soft",0,0)!=0;
445 hardFlag = find_option("hard",0,0)!=0;
446
447 /* We should be done with options.. */
448 verify_all_options();
449
450 db_must_be_within_tree();
451 db_begin_transaction();
452 if( g.argv[1][0]=='f' ){ /* i.e. "forget" */
453 removeFiles = 0;
454 }else if( softFlag ){
455 removeFiles = 0;
456 }else if( hardFlag ){
457 removeFiles = 1;
458 }else{
459 #if FOSSIL_ENABLE_LEGACY_MV_RM
460 removeFiles = db_get_boolean("mv-rm-files",0);
461 #else
462 removeFiles = FOSSIL_MV_RM_FILE;
463 #endif
464 }
465 db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY %s)",
466 filename_collation());
467 for(i=2; i<g.argc; i++){
468 Blob treeName;
469 char *zTreeName;
@@ -382,17 +483,21 @@
483 }
484
485 db_prepare(&loop, "SELECT x FROM sfile");
486 while( db_step(&loop)==SQLITE_ROW ){
487 fossil_print("DELETED %s\n", db_column_text(&loop, 0));
488 if( removeFiles ) add_file_to_remove(db_column_text(&loop, 0));
489 }
490 db_finalize(&loop);
491 if( !dryRunFlag ){
492 db_multi_exec(
493 "UPDATE vfile SET deleted=1 WHERE pathname IN sfile;"
494 "DELETE FROM vfile WHERE rid=0 AND deleted;"
495 );
496 }
497 db_end_transaction(0);
498 if( removeFiles ) process_files_to_remove(dryRunFlag);
499 }
500
501 /*
502 ** Capture the command-line --case-sensitive option.
503 */
@@ -593,11 +698,12 @@
698 ** The original name of the file is zOrig. The new filename is zNew.
699 */
700 static void mv_one_file(
701 int vid,
702 const char *zOrig,
703 const char *zNew,
704 int dryRunFlag
705 ){
706 int x = db_int(-1, "SELECT deleted FROM vfile WHERE pathname=%Q %s",
707 zNew, filename_collation());
708 if( x>=0 ){
709 if( x==0 ){
@@ -607,14 +713,75 @@
713 fossil_fatal("cannot rename '%s' to '%s' since the delete of '%s' has "
714 "not yet been committed", zOrig, zNew, zNew);
715 }
716 }
717 fossil_print("RENAME %s %s\n", zOrig, zNew);
718 if( !dryRunFlag ){
719 db_multi_exec(
720 "UPDATE vfile SET pathname='%q' WHERE pathname='%q' %s AND vid=%d",
721 zNew, zOrig, filename_collation(), vid
722 );
723 }
724 }
725
726 /*
727 ** This function adds a file to list of files to move on disk after the
728 ** other actions required for the parent operation have completed
729 ** successfully. The first time it is called for the current process,
730 ** it creates a temporary table named "fmove", to keep track of these
731 ** files.
732 */
733 static void add_file_to_move(
734 const char *zOldName, /* The old name of the file on disk. */
735 const char *zNewName /* The new name of the file on disk. */
736 ){
737 static int tableCreated = 0;
738 Blob fullOldName;
739 Blob fullNewName;
740 if( !tableCreated ){
741 db_multi_exec("CREATE TEMP TABLE fmove(x TEXT PRIMARY KEY %s, y TEXT %s)",
742 filename_collation(), filename_collation());
743 tableCreated = 1;
744 }
745 file_canonical_name(zOldName, &fullOldName, 0);
746 file_canonical_name(zNewName, &fullNewName, 0);
747 db_multi_exec("INSERT INTO fmove VALUES('%q','%q');",
748 blob_str(&fullOldName), blob_str(&fullNewName));
749 blob_reset(&fullNewName);
750 blob_reset(&fullOldName);
751 }
752
753 /*
754 ** This function moves files within the checkout, using the file names
755 ** contained in the temporary table "fmove". The temporary table is
756 ** created on demand by the add_file_to_move() function.
757 **
758 ** If dryRunFlag is non-zero, no files will be moved; however, their
759 ** names will still be output.
760 **
761 ** The temporary table "fmove" is dropped after being processed.
762 */
763 static void process_files_to_move(
764 int dryRunFlag /* Zero to actually operate on the file-system. */
765 ){
766 Stmt move;
767 db_prepare(&move, "SELECT x, y FROM fmove ORDER BY x;");
768 while( db_step(&move)==SQLITE_ROW ){
769 const char *zOldName = db_column_text(&move, 0);
770 const char *zNewName = db_column_text(&move, 1);
771 if( !dryRunFlag ){
772 if( file_wd_islink(zOldName) ){
773 symlink_copy(zOldName, zNewName);
774 }else{
775 file_copy(zOldName, zNewName);
776 }
777 file_delete(zOldName);
778 }
779 fossil_print("MOVED_FILE %s\n", zOldName);
780 }
781 db_finalize(&move);
782 db_multi_exec("DROP TABLE fmove;");
783 }
784
785 /*
786 ** COMMAND: mv
787 ** COMMAND: rename*
@@ -623,27 +790,48 @@
790 ** or: %fossil mv|rename OLDNAME... DIR
791 **
792 ** Move or rename one or more files or directories within the repository tree.
793 ** You can either rename a file or directory or move it to another subdirectory.
794 **
795 ** The 'mv' command does NOT normally rename or move the files on disk.
796 ** This command merely records the fact that file names have changed so
797 ** that appropriate notations can be made at the next commit/check-in.
798 ** However, the default behavior of this command may be overridden via
799 ** command line options listed below and/or the 'mv-rm-files' setting.
800 **
801 ** The 'rename' command never renames or moves files on disk, even when the
802 ** command line options and/or the 'mv-rm-files' setting would otherwise
803 ** require it to do so.
804 **
805 ** WARNING: If the "--hard" option is specified -OR- the "mv-rm-files"
806 ** setting is non-zero, files WILL BE renamed or moved on disk
807 ** as well. This does NOT apply to the 'rename' command.
808 **
809 ** Options:
810 ** --soft Skip moving files within the checkout.
811 ** This supersedes the --hard option.
812 ** --hard Move files within the checkout.
813 ** --case-sensitive <BOOL> Override the case-sensitive setting.
814 ** -n|--dry-run If given, display instead of run actions.
815 **
816 ** See also: changes, status
817 */
818 void mv_cmd(void){
819 int i;
820 int vid;
821 int moveFiles;
822 int dryRunFlag;
823 int softFlag;
824 int hardFlag;
825 char *zDest;
826 Blob dest;
827 Stmt q;
828
829 db_must_be_within_tree();
830 dryRunFlag = find_option("dry-run","n",0)!=0;
831 softFlag = find_option("soft",0,0)!=0;
832 hardFlag = find_option("hard",0,0)!=0;
833
834 /* We should be done with options.. */
835 verify_all_options();
836
837 vid = db_lget_int("checkout", 0);
@@ -653,10 +841,23 @@
841 if( g.argc<4 ){
842 usage("OLDNAME NEWNAME");
843 }
844 zDest = g.argv[g.argc-1];
845 db_begin_transaction();
846 if( g.argv[1][0]=='r' ){ /* i.e. "rename" */
847 moveFiles = 0;
848 }else if( softFlag ){
849 moveFiles = 0;
850 }else if( hardFlag ){
851 moveFiles = 1;
852 }else{
853 #if FOSSIL_ENABLE_LEGACY_MV_RM
854 moveFiles = db_get_boolean("mv-rm-files",0);
855 #else
856 moveFiles = FOSSIL_MV_RM_FILE;
857 #endif
858 }
859 file_tree_name(zDest, &dest, 1);
860 db_multi_exec(
861 "UPDATE vfile SET origname=pathname WHERE origname IS NULL;"
862 );
863 db_multi_exec(
@@ -711,18 +912,20 @@
912 }
913 db_prepare(&q, "SELECT f, t FROM mv ORDER BY f");
914 while( db_step(&q)==SQLITE_ROW ){
915 const char *zFrom = db_column_text(&q, 0);
916 const char *zTo = db_column_text(&q, 1);
917 mv_one_file(vid, zFrom, zTo, dryRunFlag);
918 if( moveFiles ) add_file_to_move(zFrom, zTo);
919 }
920 db_finalize(&q);
921 db_end_transaction(0);
922 if( moveFiles ) process_files_to_move(dryRunFlag);
923 }
924
925 /*
926 ** Function for stash_apply to be able to restore a file and indicate
927 ** newly ADDED state.
928 */
929 int stash_add_files_in_sfile(int vid){
930 return add_files_in_sfile(vid);
931 }
932
+9 -2
--- src/checkin.c
+++ src/checkin.c
@@ -1840,11 +1840,10 @@
18401840
" AND value=%Q", TAG_BRANCH, vid, sCiInfo.zBranch))
18411841
){
18421842
fossil_fatal("cannot commit against a closed leaf");
18431843
}
18441844
1845
- if( useCksum ) vfile_aggregate_checksum_disk(vid, &cksum1);
18461845
if( zComment ){
18471846
blob_zero(&comment);
18481847
blob_append(&comment, zComment, -1);
18491848
}else if( zComFile ){
18501849
blob_zero(&comment);
@@ -1874,11 +1873,19 @@
18741873
db_multi_exec("REPLACE INTO vvar VALUES('ci-comment',%B)", &comment);
18751874
db_end_transaction(0);
18761875
db_begin_transaction();
18771876
}
18781877
1879
- /* Step 1: Insert records for all modified files into the blob
1878
+ /*
1879
+ ** Step 1: Compute an aggregate MD5 checksum over the disk image
1880
+ ** of every file in vid. The file names are part of the checksum.
1881
+ ** The resulting checksum is the same as is expected on the R-card
1882
+ ** of a manifest.
1883
+ */
1884
+ if( useCksum ) vfile_aggregate_checksum_disk(vid, &cksum1);
1885
+
1886
+ /* Step 2: Insert records for all modified files into the blob
18801887
** table. If there were arguments passed to this command, only
18811888
** the identified files are inserted (if they have been modified).
18821889
*/
18831890
db_prepare(&q,
18841891
"SELECT id, %Q || pathname, mrid, %s, chnged, %s, %s FROM vfile "
18851892
--- src/checkin.c
+++ src/checkin.c
@@ -1840,11 +1840,10 @@
1840 " AND value=%Q", TAG_BRANCH, vid, sCiInfo.zBranch))
1841 ){
1842 fossil_fatal("cannot commit against a closed leaf");
1843 }
1844
1845 if( useCksum ) vfile_aggregate_checksum_disk(vid, &cksum1);
1846 if( zComment ){
1847 blob_zero(&comment);
1848 blob_append(&comment, zComment, -1);
1849 }else if( zComFile ){
1850 blob_zero(&comment);
@@ -1874,11 +1873,19 @@
1874 db_multi_exec("REPLACE INTO vvar VALUES('ci-comment',%B)", &comment);
1875 db_end_transaction(0);
1876 db_begin_transaction();
1877 }
1878
1879 /* Step 1: Insert records for all modified files into the blob
 
 
 
 
 
 
 
 
1880 ** table. If there were arguments passed to this command, only
1881 ** the identified files are inserted (if they have been modified).
1882 */
1883 db_prepare(&q,
1884 "SELECT id, %Q || pathname, mrid, %s, chnged, %s, %s FROM vfile "
1885
--- src/checkin.c
+++ src/checkin.c
@@ -1840,11 +1840,10 @@
1840 " AND value=%Q", TAG_BRANCH, vid, sCiInfo.zBranch))
1841 ){
1842 fossil_fatal("cannot commit against a closed leaf");
1843 }
1844
 
1845 if( zComment ){
1846 blob_zero(&comment);
1847 blob_append(&comment, zComment, -1);
1848 }else if( zComFile ){
1849 blob_zero(&comment);
@@ -1874,11 +1873,19 @@
1873 db_multi_exec("REPLACE INTO vvar VALUES('ci-comment',%B)", &comment);
1874 db_end_transaction(0);
1875 db_begin_transaction();
1876 }
1877
1878 /*
1879 ** Step 1: Compute an aggregate MD5 checksum over the disk image
1880 ** of every file in vid. The file names are part of the checksum.
1881 ** The resulting checksum is the same as is expected on the R-card
1882 ** of a manifest.
1883 */
1884 if( useCksum ) vfile_aggregate_checksum_disk(vid, &cksum1);
1885
1886 /* Step 2: Insert records for all modified files into the blob
1887 ** table. If there were arguments passed to this command, only
1888 ** the identified files are inserted (if they have been modified).
1889 */
1890 db_prepare(&q,
1891 "SELECT id, %Q || pathname, mrid, %s, chnged, %s, %s FROM vfile "
1892
--- src/configure.c
+++ src/configure.c
@@ -126,10 +126,14 @@
126126
{ "crnl-glob", CONFIGSET_PROJ },
127127
{ "encoding-glob", CONFIGSET_PROJ },
128128
{ "empty-dirs", CONFIGSET_PROJ },
129129
{ "allow-symlinks", CONFIGSET_PROJ },
130130
{ "dotfiles", CONFIGSET_PROJ },
131
+
132
+#ifdef FOSSIL_ENABLE_LEGACY_MV_RM
133
+ { "mv-rm-files", CONFIGSET_PROJ },
134
+#endif
131135
132136
{ "ticket-table", CONFIGSET_TKT },
133137
{ "ticket-common", CONFIGSET_TKT },
134138
{ "ticket-change", CONFIGSET_TKT },
135139
{ "ticket-newpage", CONFIGSET_TKT },
136140
--- src/configure.c
+++ src/configure.c
@@ -126,10 +126,14 @@
126 { "crnl-glob", CONFIGSET_PROJ },
127 { "encoding-glob", CONFIGSET_PROJ },
128 { "empty-dirs", CONFIGSET_PROJ },
129 { "allow-symlinks", CONFIGSET_PROJ },
130 { "dotfiles", CONFIGSET_PROJ },
 
 
 
 
131
132 { "ticket-table", CONFIGSET_TKT },
133 { "ticket-common", CONFIGSET_TKT },
134 { "ticket-change", CONFIGSET_TKT },
135 { "ticket-newpage", CONFIGSET_TKT },
136
--- src/configure.c
+++ src/configure.c
@@ -126,10 +126,14 @@
126 { "crnl-glob", CONFIGSET_PROJ },
127 { "encoding-glob", CONFIGSET_PROJ },
128 { "empty-dirs", CONFIGSET_PROJ },
129 { "allow-symlinks", CONFIGSET_PROJ },
130 { "dotfiles", CONFIGSET_PROJ },
131
132 #ifdef FOSSIL_ENABLE_LEGACY_MV_RM
133 { "mv-rm-files", CONFIGSET_PROJ },
134 #endif
135
136 { "ticket-table", CONFIGSET_TKT },
137 { "ticket-common", CONFIGSET_TKT },
138 { "ticket-change", CONFIGSET_TKT },
139 { "ticket-newpage", CONFIGSET_TKT },
140
+9
--- src/db.c
+++ src/db.c
@@ -2393,10 +2393,13 @@
23932393
{ "main-branch", 0, 40, 0, 0, "trunk" },
23942394
{ "manifest", 0, 0, 1, 0, "off" },
23952395
{ "max-loadavg", 0, 25, 0, 0, "0.0" },
23962396
{ "max-upload", 0, 25, 0, 0, "250000" },
23972397
{ "mtime-changes", 0, 0, 0, 0, "on" },
2398
+#if FOSSIL_ENABLE_LEGACY_MV_RM
2399
+ { "mv-rm-files", 0, 0, 0, 0, "off" },
2400
+#endif
23982401
{ "pgp-command", 0, 40, 0, 0, "gpg --clearsign -o " },
23992402
{ "proxy", 0, 32, 0, 0, "off" },
24002403
{ "relative-paths", 0, 0, 0, 0, "on" },
24012404
{ "repo-cksum", 0, 0, 0, 0, "on" },
24022405
{ "self-register", 0, 0, 0, 0, "off" },
@@ -2603,10 +2606,16 @@
26032606
** max-upload A limit on the size of uplink HTTP requests. The
26042607
** default is 250000 bytes.
26052608
**
26062609
** mtime-changes Use file modification times (mtimes) to detect when
26072610
** files have been modified. (Default "on".)
2611
+**
2612
+** mv-rm-files If enabled (and Fossil was compiled with legacy "mv/rm"
2613
+** support), the "mv" and "rename" commands will also move
2614
+** the associated files within the checkout -AND- the "rm"
2615
+** and "delete" commands will also remove the associated
2616
+** files from within the checkout. Default: off.
26082617
**
26092618
** pgp-command Command used to clear-sign manifests at check-in.
26102619
** The default is "gpg --clearsign -o ".
26112620
**
26122621
** proxy URL of the HTTP proxy. If undefined or "off" then
26132622
--- src/db.c
+++ src/db.c
@@ -2393,10 +2393,13 @@
2393 { "main-branch", 0, 40, 0, 0, "trunk" },
2394 { "manifest", 0, 0, 1, 0, "off" },
2395 { "max-loadavg", 0, 25, 0, 0, "0.0" },
2396 { "max-upload", 0, 25, 0, 0, "250000" },
2397 { "mtime-changes", 0, 0, 0, 0, "on" },
 
 
 
2398 { "pgp-command", 0, 40, 0, 0, "gpg --clearsign -o " },
2399 { "proxy", 0, 32, 0, 0, "off" },
2400 { "relative-paths", 0, 0, 0, 0, "on" },
2401 { "repo-cksum", 0, 0, 0, 0, "on" },
2402 { "self-register", 0, 0, 0, 0, "off" },
@@ -2603,10 +2606,16 @@
2603 ** max-upload A limit on the size of uplink HTTP requests. The
2604 ** default is 250000 bytes.
2605 **
2606 ** mtime-changes Use file modification times (mtimes) to detect when
2607 ** files have been modified. (Default "on".)
 
 
 
 
 
 
2608 **
2609 ** pgp-command Command used to clear-sign manifests at check-in.
2610 ** The default is "gpg --clearsign -o ".
2611 **
2612 ** proxy URL of the HTTP proxy. If undefined or "off" then
2613
--- src/db.c
+++ src/db.c
@@ -2393,10 +2393,13 @@
2393 { "main-branch", 0, 40, 0, 0, "trunk" },
2394 { "manifest", 0, 0, 1, 0, "off" },
2395 { "max-loadavg", 0, 25, 0, 0, "0.0" },
2396 { "max-upload", 0, 25, 0, 0, "250000" },
2397 { "mtime-changes", 0, 0, 0, 0, "on" },
2398 #if FOSSIL_ENABLE_LEGACY_MV_RM
2399 { "mv-rm-files", 0, 0, 0, 0, "off" },
2400 #endif
2401 { "pgp-command", 0, 40, 0, 0, "gpg --clearsign -o " },
2402 { "proxy", 0, 32, 0, 0, "off" },
2403 { "relative-paths", 0, 0, 0, 0, "on" },
2404 { "repo-cksum", 0, 0, 0, 0, "on" },
2405 { "self-register", 0, 0, 0, 0, "off" },
@@ -2603,10 +2606,16 @@
2606 ** max-upload A limit on the size of uplink HTTP requests. The
2607 ** default is 250000 bytes.
2608 **
2609 ** mtime-changes Use file modification times (mtimes) to detect when
2610 ** files have been modified. (Default "on".)
2611 **
2612 ** mv-rm-files If enabled (and Fossil was compiled with legacy "mv/rm"
2613 ** support), the "mv" and "rename" commands will also move
2614 ** the associated files within the checkout -AND- the "rm"
2615 ** and "delete" commands will also remove the associated
2616 ** files from within the checkout. Default: off.
2617 **
2618 ** pgp-command Command used to clear-sign manifests at check-in.
2619 ** The default is "gpg --clearsign -o ".
2620 **
2621 ** proxy URL of the HTTP proxy. If undefined or "off" then
2622
+9
--- src/db.c
+++ src/db.c
@@ -2393,10 +2393,13 @@
23932393
{ "main-branch", 0, 40, 0, 0, "trunk" },
23942394
{ "manifest", 0, 0, 1, 0, "off" },
23952395
{ "max-loadavg", 0, 25, 0, 0, "0.0" },
23962396
{ "max-upload", 0, 25, 0, 0, "250000" },
23972397
{ "mtime-changes", 0, 0, 0, 0, "on" },
2398
+#if FOSSIL_ENABLE_LEGACY_MV_RM
2399
+ { "mv-rm-files", 0, 0, 0, 0, "off" },
2400
+#endif
23982401
{ "pgp-command", 0, 40, 0, 0, "gpg --clearsign -o " },
23992402
{ "proxy", 0, 32, 0, 0, "off" },
24002403
{ "relative-paths", 0, 0, 0, 0, "on" },
24012404
{ "repo-cksum", 0, 0, 0, 0, "on" },
24022405
{ "self-register", 0, 0, 0, 0, "off" },
@@ -2603,10 +2606,16 @@
26032606
** max-upload A limit on the size of uplink HTTP requests. The
26042607
** default is 250000 bytes.
26052608
**
26062609
** mtime-changes Use file modification times (mtimes) to detect when
26072610
** files have been modified. (Default "on".)
2611
+**
2612
+** mv-rm-files If enabled (and Fossil was compiled with legacy "mv/rm"
2613
+** support), the "mv" and "rename" commands will also move
2614
+** the associated files within the checkout -AND- the "rm"
2615
+** and "delete" commands will also remove the associated
2616
+** files from within the checkout. Default: off.
26082617
**
26092618
** pgp-command Command used to clear-sign manifests at check-in.
26102619
** The default is "gpg --clearsign -o ".
26112620
**
26122621
** proxy URL of the HTTP proxy. If undefined or "off" then
26132622
--- src/db.c
+++ src/db.c
@@ -2393,10 +2393,13 @@
2393 { "main-branch", 0, 40, 0, 0, "trunk" },
2394 { "manifest", 0, 0, 1, 0, "off" },
2395 { "max-loadavg", 0, 25, 0, 0, "0.0" },
2396 { "max-upload", 0, 25, 0, 0, "250000" },
2397 { "mtime-changes", 0, 0, 0, 0, "on" },
 
 
 
2398 { "pgp-command", 0, 40, 0, 0, "gpg --clearsign -o " },
2399 { "proxy", 0, 32, 0, 0, "off" },
2400 { "relative-paths", 0, 0, 0, 0, "on" },
2401 { "repo-cksum", 0, 0, 0, 0, "on" },
2402 { "self-register", 0, 0, 0, 0, "off" },
@@ -2603,10 +2606,16 @@
2603 ** max-upload A limit on the size of uplink HTTP requests. The
2604 ** default is 250000 bytes.
2605 **
2606 ** mtime-changes Use file modification times (mtimes) to detect when
2607 ** files have been modified. (Default "on".)
 
 
 
 
 
 
2608 **
2609 ** pgp-command Command used to clear-sign manifests at check-in.
2610 ** The default is "gpg --clearsign -o ".
2611 **
2612 ** proxy URL of the HTTP proxy. If undefined or "off" then
2613
--- src/db.c
+++ src/db.c
@@ -2393,10 +2393,13 @@
2393 { "main-branch", 0, 40, 0, 0, "trunk" },
2394 { "manifest", 0, 0, 1, 0, "off" },
2395 { "max-loadavg", 0, 25, 0, 0, "0.0" },
2396 { "max-upload", 0, 25, 0, 0, "250000" },
2397 { "mtime-changes", 0, 0, 0, 0, "on" },
2398 #if FOSSIL_ENABLE_LEGACY_MV_RM
2399 { "mv-rm-files", 0, 0, 0, 0, "off" },
2400 #endif
2401 { "pgp-command", 0, 40, 0, 0, "gpg --clearsign -o " },
2402 { "proxy", 0, 32, 0, 0, "off" },
2403 { "relative-paths", 0, 0, 0, 0, "on" },
2404 { "repo-cksum", 0, 0, 0, 0, "on" },
2405 { "self-register", 0, 0, 0, 0, "off" },
@@ -2603,10 +2606,16 @@
2606 ** max-upload A limit on the size of uplink HTTP requests. The
2607 ** default is 250000 bytes.
2608 **
2609 ** mtime-changes Use file modification times (mtimes) to detect when
2610 ** files have been modified. (Default "on".)
2611 **
2612 ** mv-rm-files If enabled (and Fossil was compiled with legacy "mv/rm"
2613 ** support), the "mv" and "rename" commands will also move
2614 ** the associated files within the checkout -AND- the "rm"
2615 ** and "delete" commands will also remove the associated
2616 ** files from within the checkout. Default: off.
2617 **
2618 ** pgp-command Command used to clear-sign manifests at check-in.
2619 ** The default is "gpg --clearsign -o ".
2620 **
2621 ** proxy URL of the HTTP proxy. If undefined or "off" then
2622
+3
--- src/main.c
+++ src/main.c
@@ -1008,10 +1008,13 @@
10081008
#else
10091009
fossil_print("zlib %s, loaded %s\n", ZLIB_VERSION, zlibVersion());
10101010
#endif
10111011
#if defined(FOSSIL_ENABLE_SSL)
10121012
fossil_print("SSL (%s)\n", SSLeay_version(SSLEAY_VERSION));
1013
+#endif
1014
+#if defined(FOSSIL_ENABLE_LEGACY_MV_RM)
1015
+ fossil_print("LEGACY_MV_RM\n");
10131016
#endif
10141017
#if defined(FOSSIL_ENABLE_TH1_DOCS)
10151018
fossil_print("TH1_DOCS\n");
10161019
#endif
10171020
#if defined(FOSSIL_ENABLE_TH1_HOOKS)
10181021
--- src/main.c
+++ src/main.c
@@ -1008,10 +1008,13 @@
1008 #else
1009 fossil_print("zlib %s, loaded %s\n", ZLIB_VERSION, zlibVersion());
1010 #endif
1011 #if defined(FOSSIL_ENABLE_SSL)
1012 fossil_print("SSL (%s)\n", SSLeay_version(SSLEAY_VERSION));
 
 
 
1013 #endif
1014 #if defined(FOSSIL_ENABLE_TH1_DOCS)
1015 fossil_print("TH1_DOCS\n");
1016 #endif
1017 #if defined(FOSSIL_ENABLE_TH1_HOOKS)
1018
--- src/main.c
+++ src/main.c
@@ -1008,10 +1008,13 @@
1008 #else
1009 fossil_print("zlib %s, loaded %s\n", ZLIB_VERSION, zlibVersion());
1010 #endif
1011 #if defined(FOSSIL_ENABLE_SSL)
1012 fossil_print("SSL (%s)\n", SSLeay_version(SSLEAY_VERSION));
1013 #endif
1014 #if defined(FOSSIL_ENABLE_LEGACY_MV_RM)
1015 fossil_print("LEGACY_MV_RM\n");
1016 #endif
1017 #if defined(FOSSIL_ENABLE_TH1_DOCS)
1018 fossil_print("TH1_DOCS\n");
1019 #endif
1020 #if defined(FOSSIL_ENABLE_TH1_HOOKS)
1021
+3
--- src/main.c
+++ src/main.c
@@ -1008,10 +1008,13 @@
10081008
#else
10091009
fossil_print("zlib %s, loaded %s\n", ZLIB_VERSION, zlibVersion());
10101010
#endif
10111011
#if defined(FOSSIL_ENABLE_SSL)
10121012
fossil_print("SSL (%s)\n", SSLeay_version(SSLEAY_VERSION));
1013
+#endif
1014
+#if defined(FOSSIL_ENABLE_LEGACY_MV_RM)
1015
+ fossil_print("LEGACY_MV_RM\n");
10131016
#endif
10141017
#if defined(FOSSIL_ENABLE_TH1_DOCS)
10151018
fossil_print("TH1_DOCS\n");
10161019
#endif
10171020
#if defined(FOSSIL_ENABLE_TH1_HOOKS)
10181021
--- src/main.c
+++ src/main.c
@@ -1008,10 +1008,13 @@
1008 #else
1009 fossil_print("zlib %s, loaded %s\n", ZLIB_VERSION, zlibVersion());
1010 #endif
1011 #if defined(FOSSIL_ENABLE_SSL)
1012 fossil_print("SSL (%s)\n", SSLeay_version(SSLEAY_VERSION));
 
 
 
1013 #endif
1014 #if defined(FOSSIL_ENABLE_TH1_DOCS)
1015 fossil_print("TH1_DOCS\n");
1016 #endif
1017 #if defined(FOSSIL_ENABLE_TH1_HOOKS)
1018
--- src/main.c
+++ src/main.c
@@ -1008,10 +1008,13 @@
1008 #else
1009 fossil_print("zlib %s, loaded %s\n", ZLIB_VERSION, zlibVersion());
1010 #endif
1011 #if defined(FOSSIL_ENABLE_SSL)
1012 fossil_print("SSL (%s)\n", SSLeay_version(SSLEAY_VERSION));
1013 #endif
1014 #if defined(FOSSIL_ENABLE_LEGACY_MV_RM)
1015 fossil_print("LEGACY_MV_RM\n");
1016 #endif
1017 #if defined(FOSSIL_ENABLE_TH1_DOCS)
1018 fossil_print("TH1_DOCS\n");
1019 #endif
1020 #if defined(FOSSIL_ENABLE_TH1_HOOKS)
1021
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -493,10 +493,14 @@
493493
494494
#### Automatically build OpenSSL when building Fossil (causes rebuild
495495
# issues when building incrementally).
496496
#
497497
# FOSSIL_BUILD_SSL = 1
498
+
499
+#### Enable legacy treatment of mv/rm (skip checkout files)
500
+#
501
+# FOSSIL_ENABLE_LEGACY_MV_RM = 1
498502
499503
#### Enable TH1 scripts in embedded documentation files
500504
#
501505
# FOSSIL_ENABLE_TH1_DOCS = 1
502506
@@ -692,10 +696,16 @@
692696
# With HTTPS support
693697
ifdef FOSSIL_ENABLE_SSL
694698
TCC += -DFOSSIL_ENABLE_SSL=1
695699
RCC += -DFOSSIL_ENABLE_SSL=1
696700
endif
701
+
702
+# With legacy treatment of mv/rm
703
+ifdef FOSSIL_ENABLE_LEGACY_MV_RM
704
+TCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1
705
+RCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1
706
+endif
697707
698708
# With TH1 embedded docs support
699709
ifdef FOSSIL_ENABLE_TH1_DOCS
700710
TCC += -DFOSSIL_ENABLE_TH1_DOCS=1
701711
RCC += -DFOSSIL_ENABLE_TH1_DOCS=1
@@ -1309,10 +1319,13 @@
13091319
# Uncomment to enable SSL support
13101320
# FOSSIL_ENABLE_SSL = 1
13111321
13121322
# Uncomment to build SSL libraries
13131323
# FOSSIL_BUILD_SSL = 1
1324
+
1325
+# Uncomment to enable legacy treatment of mv/rm
1326
+# FOSSIL_ENABLE_LEGACY_MV_RM = 1
13141327
13151328
# Uncomment to enable TH1 scripts in embedded documentation files
13161329
# FOSSIL_ENABLE_TH1_DOCS = 1
13171330
13181331
# Uncomment to enable TH1 hooks
@@ -1425,10 +1438,15 @@
14251438
TCC = $(TCC) /DFOSSIL_ENABLE_SSL=1
14261439
RCC = $(RCC) /DFOSSIL_ENABLE_SSL=1
14271440
LIBS = $(LIBS) $(SSLLIB)
14281441
LIBDIR = $(LIBDIR) /LIBPATH:$(SSLLIBDIR)
14291442
!endif
1443
+
1444
+!ifdef FOSSIL_ENABLE_LEGACY_MV_RM
1445
+TCC = $(TCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1
1446
+RCC = $(RCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1
1447
+!endif
14301448
14311449
!ifdef FOSSIL_ENABLE_TH1_DOCS
14321450
TCC = $(TCC) /DFOSSIL_ENABLE_TH1_DOCS=1
14331451
RCC = $(RCC) /DFOSSIL_ENABLE_TH1_DOCS=1
14341452
!endif
14351453
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -493,10 +493,14 @@
493
494 #### Automatically build OpenSSL when building Fossil (causes rebuild
495 # issues when building incrementally).
496 #
497 # FOSSIL_BUILD_SSL = 1
 
 
 
 
498
499 #### Enable TH1 scripts in embedded documentation files
500 #
501 # FOSSIL_ENABLE_TH1_DOCS = 1
502
@@ -692,10 +696,16 @@
692 # With HTTPS support
693 ifdef FOSSIL_ENABLE_SSL
694 TCC += -DFOSSIL_ENABLE_SSL=1
695 RCC += -DFOSSIL_ENABLE_SSL=1
696 endif
 
 
 
 
 
 
697
698 # With TH1 embedded docs support
699 ifdef FOSSIL_ENABLE_TH1_DOCS
700 TCC += -DFOSSIL_ENABLE_TH1_DOCS=1
701 RCC += -DFOSSIL_ENABLE_TH1_DOCS=1
@@ -1309,10 +1319,13 @@
1309 # Uncomment to enable SSL support
1310 # FOSSIL_ENABLE_SSL = 1
1311
1312 # Uncomment to build SSL libraries
1313 # FOSSIL_BUILD_SSL = 1
 
 
 
1314
1315 # Uncomment to enable TH1 scripts in embedded documentation files
1316 # FOSSIL_ENABLE_TH1_DOCS = 1
1317
1318 # Uncomment to enable TH1 hooks
@@ -1425,10 +1438,15 @@
1425 TCC = $(TCC) /DFOSSIL_ENABLE_SSL=1
1426 RCC = $(RCC) /DFOSSIL_ENABLE_SSL=1
1427 LIBS = $(LIBS) $(SSLLIB)
1428 LIBDIR = $(LIBDIR) /LIBPATH:$(SSLLIBDIR)
1429 !endif
 
 
 
 
 
1430
1431 !ifdef FOSSIL_ENABLE_TH1_DOCS
1432 TCC = $(TCC) /DFOSSIL_ENABLE_TH1_DOCS=1
1433 RCC = $(RCC) /DFOSSIL_ENABLE_TH1_DOCS=1
1434 !endif
1435
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -493,10 +493,14 @@
493
494 #### Automatically build OpenSSL when building Fossil (causes rebuild
495 # issues when building incrementally).
496 #
497 # FOSSIL_BUILD_SSL = 1
498
499 #### Enable legacy treatment of mv/rm (skip checkout files)
500 #
501 # FOSSIL_ENABLE_LEGACY_MV_RM = 1
502
503 #### Enable TH1 scripts in embedded documentation files
504 #
505 # FOSSIL_ENABLE_TH1_DOCS = 1
506
@@ -692,10 +696,16 @@
696 # With HTTPS support
697 ifdef FOSSIL_ENABLE_SSL
698 TCC += -DFOSSIL_ENABLE_SSL=1
699 RCC += -DFOSSIL_ENABLE_SSL=1
700 endif
701
702 # With legacy treatment of mv/rm
703 ifdef FOSSIL_ENABLE_LEGACY_MV_RM
704 TCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1
705 RCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1
706 endif
707
708 # With TH1 embedded docs support
709 ifdef FOSSIL_ENABLE_TH1_DOCS
710 TCC += -DFOSSIL_ENABLE_TH1_DOCS=1
711 RCC += -DFOSSIL_ENABLE_TH1_DOCS=1
@@ -1309,10 +1319,13 @@
1319 # Uncomment to enable SSL support
1320 # FOSSIL_ENABLE_SSL = 1
1321
1322 # Uncomment to build SSL libraries
1323 # FOSSIL_BUILD_SSL = 1
1324
1325 # Uncomment to enable legacy treatment of mv/rm
1326 # FOSSIL_ENABLE_LEGACY_MV_RM = 1
1327
1328 # Uncomment to enable TH1 scripts in embedded documentation files
1329 # FOSSIL_ENABLE_TH1_DOCS = 1
1330
1331 # Uncomment to enable TH1 hooks
@@ -1425,10 +1438,15 @@
1438 TCC = $(TCC) /DFOSSIL_ENABLE_SSL=1
1439 RCC = $(RCC) /DFOSSIL_ENABLE_SSL=1
1440 LIBS = $(LIBS) $(SSLLIB)
1441 LIBDIR = $(LIBDIR) /LIBPATH:$(SSLLIBDIR)
1442 !endif
1443
1444 !ifdef FOSSIL_ENABLE_LEGACY_MV_RM
1445 TCC = $(TCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1
1446 RCC = $(RCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1
1447 !endif
1448
1449 !ifdef FOSSIL_ENABLE_TH1_DOCS
1450 TCC = $(TCC) /DFOSSIL_ENABLE_TH1_DOCS=1
1451 RCC = $(RCC) /DFOSSIL_ENABLE_TH1_DOCS=1
1452 !endif
1453
+24 -10
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -317,11 +317,11 @@
317317
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
318318
** [sqlite_version()] and [sqlite_source_id()].
319319
*/
320320
#define SQLITE_VERSION "3.8.9"
321321
#define SQLITE_VERSION_NUMBER 3008009
322
-#define SQLITE_SOURCE_ID "2015-04-06 11:04:51 3ad829e50faca538db3abb2afb898b5521550c5c"
322
+#define SQLITE_SOURCE_ID "2015-04-08 12:16:33 8a8ffc862e96f57aa698f93de10dee28e69f6e09"
323323
324324
/*
325325
** CAPI3REF: Run-Time Library Version Numbers
326326
** KEYWORDS: sqlite3_version, sqlite3_sourceid
327327
**
@@ -21524,19 +21524,23 @@
2152421524
}else{
2152521525
width = va_arg(ap,int);
2152621526
}
2152721527
if( width<0 ){
2152821528
flag_leftjustify = 1;
21529
- width = -width;
21529
+ width = width >= -2147483647 ? -width : 0;
2153021530
}
2153121531
c = *++fmt;
2153221532
}else{
21533
+ unsigned wx = 0;
2153321534
while( c>='0' && c<='9' ){
21534
- width = width*10 + c - '0';
21535
+ wx = wx*10 + c - '0';
2153521536
c = *++fmt;
2153621537
}
21538
+ testcase( wx>0x7fffffff );
21539
+ width = wx & 0x7fffffff;
2153721540
}
21541
+
2153821542
/* Get the precision */
2153921543
if( c=='.' ){
2154021544
precision = 0;
2154121545
c = *++fmt;
2154221546
if( c=='*' ){
@@ -21543,17 +21547,22 @@
2154321547
if( bArgList ){
2154421548
precision = (int)getIntArg(pArgList);
2154521549
}else{
2154621550
precision = va_arg(ap,int);
2154721551
}
21548
- if( precision<0 ) precision = -precision;
2154921552
c = *++fmt;
21553
+ if( precision<0 ){
21554
+ precision = precision >= -2147483647 ? -precision : -1;
21555
+ }
2155021556
}else{
21557
+ unsigned px = 0;
2155121558
while( c>='0' && c<='9' ){
21552
- precision = precision*10 + c - '0';
21559
+ px = px*10 + c - '0';
2155321560
c = *++fmt;
2155421561
}
21562
+ testcase( px>0x7fffffff );
21563
+ precision = px & 0x7fffffff;
2155521564
}
2155621565
}else{
2155721566
precision = -1;
2155821567
}
2155921568
/* Get the conversion type modifier */
@@ -21713,11 +21722,12 @@
2171321722
if( flag_plussign ) prefix = '+';
2171421723
else if( flag_blanksign ) prefix = ' ';
2171521724
else prefix = 0;
2171621725
}
2171721726
if( xtype==etGENERIC && precision>0 ) precision--;
21718
- for(idx=precision, rounder=0.5; idx>0; idx--, rounder*=0.1){}
21727
+ testcase( precision>0xfff );
21728
+ for(idx=precision&0xfff, rounder=0.5; idx>0; idx--, rounder*=0.1){}
2171921729
if( xtype==etFLOAT ) realvalue += rounder;
2172021730
/* Normalize realvalue to within 10.0 > realvalue >= 1.0 */
2172121731
exp = 0;
2172221732
if( sqlite3IsNaN((double)realvalue) ){
2172321733
bufpt = "NaN";
@@ -21768,12 +21778,13 @@
2176821778
if( xtype==etEXP ){
2176921779
e2 = 0;
2177021780
}else{
2177121781
e2 = exp;
2177221782
}
21773
- if( MAX(e2,0)+precision+width > etBUFSIZE - 15 ){
21774
- bufpt = zExtra = sqlite3Malloc( MAX(e2,0)+precision+width+15 );
21783
+ if( MAX(e2,0)+(i64)precision+(i64)width > etBUFSIZE - 15 ){
21784
+ bufpt = zExtra
21785
+ = sqlite3Malloc( MAX(e2,0)+(i64)precision+(i64)width+15 );
2177521786
if( bufpt==0 ){
2177621787
setStrAccumError(pAccum, STRACCUM_NOMEM);
2177721788
return;
2177821789
}
2177921790
}
@@ -22001,11 +22012,11 @@
2200122012
** Return the number of bytes of text that StrAccum is able to accept
2200222013
** after the attempted enlargement. The value returned might be zero.
2200322014
*/
2200422015
static int sqlite3StrAccumEnlarge(StrAccum *p, int N){
2200522016
char *zNew;
22006
- assert( p->nChar+N >= p->nAlloc ); /* Only called if really needed */
22017
+ assert( p->nChar+(i64)N >= p->nAlloc ); /* Only called if really needed */
2200722018
if( p->accError ){
2200822019
testcase(p->accError==STRACCUM_TOOBIG);
2200922020
testcase(p->accError==STRACCUM_NOMEM);
2201022021
return 0;
2201122022
}
@@ -22050,11 +22061,14 @@
2205022061
2205122062
/*
2205222063
** Append N copies of character c to the given string buffer.
2205322064
*/
2205422065
SQLITE_PRIVATE void sqlite3AppendChar(StrAccum *p, int N, char c){
22055
- if( p->nChar+N >= p->nAlloc && (N = sqlite3StrAccumEnlarge(p, N))<=0 ) return;
22066
+ testcase( p->nChar + (i64)N > 0x7fffffff );
22067
+ if( p->nChar+(i64)N >= p->nAlloc && (N = sqlite3StrAccumEnlarge(p, N))<=0 ){
22068
+ return;
22069
+ }
2205622070
while( (N--)>0 ) p->zText[p->nChar++] = c;
2205722071
}
2205822072
2205922073
/*
2206022074
** The StrAccum "p" is not large enough to accept N new bytes of z[].
2206122075
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -317,11 +317,11 @@
317 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
318 ** [sqlite_version()] and [sqlite_source_id()].
319 */
320 #define SQLITE_VERSION "3.8.9"
321 #define SQLITE_VERSION_NUMBER 3008009
322 #define SQLITE_SOURCE_ID "2015-04-06 11:04:51 3ad829e50faca538db3abb2afb898b5521550c5c"
323
324 /*
325 ** CAPI3REF: Run-Time Library Version Numbers
326 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
327 **
@@ -21524,19 +21524,23 @@
21524 }else{
21525 width = va_arg(ap,int);
21526 }
21527 if( width<0 ){
21528 flag_leftjustify = 1;
21529 width = -width;
21530 }
21531 c = *++fmt;
21532 }else{
 
21533 while( c>='0' && c<='9' ){
21534 width = width*10 + c - '0';
21535 c = *++fmt;
21536 }
 
 
21537 }
 
21538 /* Get the precision */
21539 if( c=='.' ){
21540 precision = 0;
21541 c = *++fmt;
21542 if( c=='*' ){
@@ -21543,17 +21547,22 @@
21543 if( bArgList ){
21544 precision = (int)getIntArg(pArgList);
21545 }else{
21546 precision = va_arg(ap,int);
21547 }
21548 if( precision<0 ) precision = -precision;
21549 c = *++fmt;
 
 
 
21550 }else{
 
21551 while( c>='0' && c<='9' ){
21552 precision = precision*10 + c - '0';
21553 c = *++fmt;
21554 }
 
 
21555 }
21556 }else{
21557 precision = -1;
21558 }
21559 /* Get the conversion type modifier */
@@ -21713,11 +21722,12 @@
21713 if( flag_plussign ) prefix = '+';
21714 else if( flag_blanksign ) prefix = ' ';
21715 else prefix = 0;
21716 }
21717 if( xtype==etGENERIC && precision>0 ) precision--;
21718 for(idx=precision, rounder=0.5; idx>0; idx--, rounder*=0.1){}
 
21719 if( xtype==etFLOAT ) realvalue += rounder;
21720 /* Normalize realvalue to within 10.0 > realvalue >= 1.0 */
21721 exp = 0;
21722 if( sqlite3IsNaN((double)realvalue) ){
21723 bufpt = "NaN";
@@ -21768,12 +21778,13 @@
21768 if( xtype==etEXP ){
21769 e2 = 0;
21770 }else{
21771 e2 = exp;
21772 }
21773 if( MAX(e2,0)+precision+width > etBUFSIZE - 15 ){
21774 bufpt = zExtra = sqlite3Malloc( MAX(e2,0)+precision+width+15 );
 
21775 if( bufpt==0 ){
21776 setStrAccumError(pAccum, STRACCUM_NOMEM);
21777 return;
21778 }
21779 }
@@ -22001,11 +22012,11 @@
22001 ** Return the number of bytes of text that StrAccum is able to accept
22002 ** after the attempted enlargement. The value returned might be zero.
22003 */
22004 static int sqlite3StrAccumEnlarge(StrAccum *p, int N){
22005 char *zNew;
22006 assert( p->nChar+N >= p->nAlloc ); /* Only called if really needed */
22007 if( p->accError ){
22008 testcase(p->accError==STRACCUM_TOOBIG);
22009 testcase(p->accError==STRACCUM_NOMEM);
22010 return 0;
22011 }
@@ -22050,11 +22061,14 @@
22050
22051 /*
22052 ** Append N copies of character c to the given string buffer.
22053 */
22054 SQLITE_PRIVATE void sqlite3AppendChar(StrAccum *p, int N, char c){
22055 if( p->nChar+N >= p->nAlloc && (N = sqlite3StrAccumEnlarge(p, N))<=0 ) return;
 
 
 
22056 while( (N--)>0 ) p->zText[p->nChar++] = c;
22057 }
22058
22059 /*
22060 ** The StrAccum "p" is not large enough to accept N new bytes of z[].
22061
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -317,11 +317,11 @@
317 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
318 ** [sqlite_version()] and [sqlite_source_id()].
319 */
320 #define SQLITE_VERSION "3.8.9"
321 #define SQLITE_VERSION_NUMBER 3008009
322 #define SQLITE_SOURCE_ID "2015-04-08 12:16:33 8a8ffc862e96f57aa698f93de10dee28e69f6e09"
323
324 /*
325 ** CAPI3REF: Run-Time Library Version Numbers
326 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
327 **
@@ -21524,19 +21524,23 @@
21524 }else{
21525 width = va_arg(ap,int);
21526 }
21527 if( width<0 ){
21528 flag_leftjustify = 1;
21529 width = width >= -2147483647 ? -width : 0;
21530 }
21531 c = *++fmt;
21532 }else{
21533 unsigned wx = 0;
21534 while( c>='0' && c<='9' ){
21535 wx = wx*10 + c - '0';
21536 c = *++fmt;
21537 }
21538 testcase( wx>0x7fffffff );
21539 width = wx & 0x7fffffff;
21540 }
21541
21542 /* Get the precision */
21543 if( c=='.' ){
21544 precision = 0;
21545 c = *++fmt;
21546 if( c=='*' ){
@@ -21543,17 +21547,22 @@
21547 if( bArgList ){
21548 precision = (int)getIntArg(pArgList);
21549 }else{
21550 precision = va_arg(ap,int);
21551 }
 
21552 c = *++fmt;
21553 if( precision<0 ){
21554 precision = precision >= -2147483647 ? -precision : -1;
21555 }
21556 }else{
21557 unsigned px = 0;
21558 while( c>='0' && c<='9' ){
21559 px = px*10 + c - '0';
21560 c = *++fmt;
21561 }
21562 testcase( px>0x7fffffff );
21563 precision = px & 0x7fffffff;
21564 }
21565 }else{
21566 precision = -1;
21567 }
21568 /* Get the conversion type modifier */
@@ -21713,11 +21722,12 @@
21722 if( flag_plussign ) prefix = '+';
21723 else if( flag_blanksign ) prefix = ' ';
21724 else prefix = 0;
21725 }
21726 if( xtype==etGENERIC && precision>0 ) precision--;
21727 testcase( precision>0xfff );
21728 for(idx=precision&0xfff, rounder=0.5; idx>0; idx--, rounder*=0.1){}
21729 if( xtype==etFLOAT ) realvalue += rounder;
21730 /* Normalize realvalue to within 10.0 > realvalue >= 1.0 */
21731 exp = 0;
21732 if( sqlite3IsNaN((double)realvalue) ){
21733 bufpt = "NaN";
@@ -21768,12 +21778,13 @@
21778 if( xtype==etEXP ){
21779 e2 = 0;
21780 }else{
21781 e2 = exp;
21782 }
21783 if( MAX(e2,0)+(i64)precision+(i64)width > etBUFSIZE - 15 ){
21784 bufpt = zExtra
21785 = sqlite3Malloc( MAX(e2,0)+(i64)precision+(i64)width+15 );
21786 if( bufpt==0 ){
21787 setStrAccumError(pAccum, STRACCUM_NOMEM);
21788 return;
21789 }
21790 }
@@ -22001,11 +22012,11 @@
22012 ** Return the number of bytes of text that StrAccum is able to accept
22013 ** after the attempted enlargement. The value returned might be zero.
22014 */
22015 static int sqlite3StrAccumEnlarge(StrAccum *p, int N){
22016 char *zNew;
22017 assert( p->nChar+(i64)N >= p->nAlloc ); /* Only called if really needed */
22018 if( p->accError ){
22019 testcase(p->accError==STRACCUM_TOOBIG);
22020 testcase(p->accError==STRACCUM_NOMEM);
22021 return 0;
22022 }
@@ -22050,11 +22061,14 @@
22061
22062 /*
22063 ** Append N copies of character c to the given string buffer.
22064 */
22065 SQLITE_PRIVATE void sqlite3AppendChar(StrAccum *p, int N, char c){
22066 testcase( p->nChar + (i64)N > 0x7fffffff );
22067 if( p->nChar+(i64)N >= p->nAlloc && (N = sqlite3StrAccumEnlarge(p, N))<=0 ){
22068 return;
22069 }
22070 while( (N--)>0 ) p->zText[p->nChar++] = c;
22071 }
22072
22073 /*
22074 ** The StrAccum "p" is not large enough to accept N new bytes of z[].
22075
+1 -1
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -111,11 +111,11 @@
111111
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
112112
** [sqlite_version()] and [sqlite_source_id()].
113113
*/
114114
#define SQLITE_VERSION "3.8.9"
115115
#define SQLITE_VERSION_NUMBER 3008009
116
-#define SQLITE_SOURCE_ID "2015-04-06 11:04:51 3ad829e50faca538db3abb2afb898b5521550c5c"
116
+#define SQLITE_SOURCE_ID "2015-04-08 12:16:33 8a8ffc862e96f57aa698f93de10dee28e69f6e09"
117117
118118
/*
119119
** CAPI3REF: Run-Time Library Version Numbers
120120
** KEYWORDS: sqlite3_version, sqlite3_sourceid
121121
**
122122
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -111,11 +111,11 @@
111 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
112 ** [sqlite_version()] and [sqlite_source_id()].
113 */
114 #define SQLITE_VERSION "3.8.9"
115 #define SQLITE_VERSION_NUMBER 3008009
116 #define SQLITE_SOURCE_ID "2015-04-06 11:04:51 3ad829e50faca538db3abb2afb898b5521550c5c"
117
118 /*
119 ** CAPI3REF: Run-Time Library Version Numbers
120 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
121 **
122
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -111,11 +111,11 @@
111 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
112 ** [sqlite_version()] and [sqlite_source_id()].
113 */
114 #define SQLITE_VERSION "3.8.9"
115 #define SQLITE_VERSION_NUMBER 3008009
116 #define SQLITE_SOURCE_ID "2015-04-08 12:16:33 8a8ffc862e96f57aa698f93de10dee28e69f6e09"
117
118 /*
119 ** CAPI3REF: Run-Time Library Version Numbers
120 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
121 **
122
--- src/th_main.c
+++ src/th_main.c
@@ -507,10 +507,11 @@
507507
**
508508
** Return true if the fossil binary has the given compile-time feature
509509
** enabled. The set of features includes:
510510
**
511511
** "ssl" = FOSSIL_ENABLE_SSL
512
+** "legacyMvRm" = FOSSIL_ENABLE_LEGACY_MV_RM
512513
** "th1Docs" = FOSSIL_ENABLE_TH1_DOCS
513514
** "th1Hooks" = FOSSIL_ENABLE_TH1_HOOKS
514515
** "tcl" = FOSSIL_ENABLE_TCL
515516
** "useTclStubs" = USE_TCL_STUBS
516517
** "tclStubs" = FOSSIL_ENABLE_TCL_STUBS
@@ -538,10 +539,15 @@
538539
}
539540
#if defined(FOSSIL_ENABLE_SSL)
540541
else if( 0 == fossil_strnicmp( zArg, "ssl\0", 4 ) ){
541542
rc = 1;
542543
}
544
+#endif
545
+#if defined(FOSSIL_ENABLE_LEGACY_MV_RM)
546
+ else if( 0 == fossil_strnicmp( zArg, "legacyMvRm\0", 11 ) ){
547
+ rc = 1;
548
+ }
543549
#endif
544550
#if defined(FOSSIL_ENABLE_TH1_DOCS)
545551
else if( 0 == fossil_strnicmp( zArg, "th1Docs\0", 8 ) ){
546552
rc = 1;
547553
}
548554
--- src/th_main.c
+++ src/th_main.c
@@ -507,10 +507,11 @@
507 **
508 ** Return true if the fossil binary has the given compile-time feature
509 ** enabled. The set of features includes:
510 **
511 ** "ssl" = FOSSIL_ENABLE_SSL
 
512 ** "th1Docs" = FOSSIL_ENABLE_TH1_DOCS
513 ** "th1Hooks" = FOSSIL_ENABLE_TH1_HOOKS
514 ** "tcl" = FOSSIL_ENABLE_TCL
515 ** "useTclStubs" = USE_TCL_STUBS
516 ** "tclStubs" = FOSSIL_ENABLE_TCL_STUBS
@@ -538,10 +539,15 @@
538 }
539 #if defined(FOSSIL_ENABLE_SSL)
540 else if( 0 == fossil_strnicmp( zArg, "ssl\0", 4 ) ){
541 rc = 1;
542 }
 
 
 
 
 
543 #endif
544 #if defined(FOSSIL_ENABLE_TH1_DOCS)
545 else if( 0 == fossil_strnicmp( zArg, "th1Docs\0", 8 ) ){
546 rc = 1;
547 }
548
--- src/th_main.c
+++ src/th_main.c
@@ -507,10 +507,11 @@
507 **
508 ** Return true if the fossil binary has the given compile-time feature
509 ** enabled. The set of features includes:
510 **
511 ** "ssl" = FOSSIL_ENABLE_SSL
512 ** "legacyMvRm" = FOSSIL_ENABLE_LEGACY_MV_RM
513 ** "th1Docs" = FOSSIL_ENABLE_TH1_DOCS
514 ** "th1Hooks" = FOSSIL_ENABLE_TH1_HOOKS
515 ** "tcl" = FOSSIL_ENABLE_TCL
516 ** "useTclStubs" = USE_TCL_STUBS
517 ** "tclStubs" = FOSSIL_ENABLE_TCL_STUBS
@@ -538,10 +539,15 @@
539 }
540 #if defined(FOSSIL_ENABLE_SSL)
541 else if( 0 == fossil_strnicmp( zArg, "ssl\0", 4 ) ){
542 rc = 1;
543 }
544 #endif
545 #if defined(FOSSIL_ENABLE_LEGACY_MV_RM)
546 else if( 0 == fossil_strnicmp( zArg, "legacyMvRm\0", 11 ) ){
547 rc = 1;
548 }
549 #endif
550 #if defined(FOSSIL_ENABLE_TH1_DOCS)
551 else if( 0 == fossil_strnicmp( zArg, "th1Docs\0", 8 ) ){
552 rc = 1;
553 }
554
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -52,10 +52,14 @@
5252
5353
#### Automatically build OpenSSL when building Fossil (causes rebuild
5454
# issues when building incrementally).
5555
#
5656
# FOSSIL_BUILD_SSL = 1
57
+
58
+#### Enable legacy treatment of mv/rm (skip checkout files)
59
+#
60
+# FOSSIL_ENABLE_LEGACY_MV_RM = 1
5761
5862
#### Enable TH1 scripts in embedded documentation files
5963
#
6064
# FOSSIL_ENABLE_TH1_DOCS = 1
6165
@@ -251,10 +255,16 @@
251255
# With HTTPS support
252256
ifdef FOSSIL_ENABLE_SSL
253257
TCC += -DFOSSIL_ENABLE_SSL=1
254258
RCC += -DFOSSIL_ENABLE_SSL=1
255259
endif
260
+
261
+# With legacy treatment of mv/rm
262
+ifdef FOSSIL_ENABLE_LEGACY_MV_RM
263
+TCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1
264
+RCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1
265
+endif
256266
257267
# With TH1 embedded docs support
258268
ifdef FOSSIL_ENABLE_TH1_DOCS
259269
TCC += -DFOSSIL_ENABLE_TH1_DOCS=1
260270
RCC += -DFOSSIL_ENABLE_TH1_DOCS=1
261271
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -52,10 +52,14 @@
52
53 #### Automatically build OpenSSL when building Fossil (causes rebuild
54 # issues when building incrementally).
55 #
56 # FOSSIL_BUILD_SSL = 1
 
 
 
 
57
58 #### Enable TH1 scripts in embedded documentation files
59 #
60 # FOSSIL_ENABLE_TH1_DOCS = 1
61
@@ -251,10 +255,16 @@
251 # With HTTPS support
252 ifdef FOSSIL_ENABLE_SSL
253 TCC += -DFOSSIL_ENABLE_SSL=1
254 RCC += -DFOSSIL_ENABLE_SSL=1
255 endif
 
 
 
 
 
 
256
257 # With TH1 embedded docs support
258 ifdef FOSSIL_ENABLE_TH1_DOCS
259 TCC += -DFOSSIL_ENABLE_TH1_DOCS=1
260 RCC += -DFOSSIL_ENABLE_TH1_DOCS=1
261
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -52,10 +52,14 @@
52
53 #### Automatically build OpenSSL when building Fossil (causes rebuild
54 # issues when building incrementally).
55 #
56 # FOSSIL_BUILD_SSL = 1
57
58 #### Enable legacy treatment of mv/rm (skip checkout files)
59 #
60 # FOSSIL_ENABLE_LEGACY_MV_RM = 1
61
62 #### Enable TH1 scripts in embedded documentation files
63 #
64 # FOSSIL_ENABLE_TH1_DOCS = 1
65
@@ -251,10 +255,16 @@
255 # With HTTPS support
256 ifdef FOSSIL_ENABLE_SSL
257 TCC += -DFOSSIL_ENABLE_SSL=1
258 RCC += -DFOSSIL_ENABLE_SSL=1
259 endif
260
261 # With legacy treatment of mv/rm
262 ifdef FOSSIL_ENABLE_LEGACY_MV_RM
263 TCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1
264 RCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1
265 endif
266
267 # With TH1 embedded docs support
268 ifdef FOSSIL_ENABLE_TH1_DOCS
269 TCC += -DFOSSIL_ENABLE_TH1_DOCS=1
270 RCC += -DFOSSIL_ENABLE_TH1_DOCS=1
271
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -52,10 +52,14 @@
5252
5353
#### Automatically build OpenSSL when building Fossil (causes rebuild
5454
# issues when building incrementally).
5555
#
5656
# FOSSIL_BUILD_SSL = 1
57
+
58
+#### Enable legacy treatment of mv/rm (skip checkout files)
59
+#
60
+FOSSIL_ENABLE_LEGACY_MV_RM = 1
5761
5862
#### Enable TH1 scripts in embedded documentation files
5963
#
6064
FOSSIL_ENABLE_TH1_DOCS = 1
6165
@@ -251,10 +255,16 @@
251255
# With HTTPS support
252256
ifdef FOSSIL_ENABLE_SSL
253257
TCC += -DFOSSIL_ENABLE_SSL=1
254258
RCC += -DFOSSIL_ENABLE_SSL=1
255259
endif
260
+
261
+# With legacy treatment of mv/rm
262
+ifdef FOSSIL_ENABLE_LEGACY_MV_RM
263
+TCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1
264
+RCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1
265
+endif
256266
257267
# With TH1 embedded docs support
258268
ifdef FOSSIL_ENABLE_TH1_DOCS
259269
TCC += -DFOSSIL_ENABLE_TH1_DOCS=1
260270
RCC += -DFOSSIL_ENABLE_TH1_DOCS=1
261271
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -52,10 +52,14 @@
52
53 #### Automatically build OpenSSL when building Fossil (causes rebuild
54 # issues when building incrementally).
55 #
56 # FOSSIL_BUILD_SSL = 1
 
 
 
 
57
58 #### Enable TH1 scripts in embedded documentation files
59 #
60 FOSSIL_ENABLE_TH1_DOCS = 1
61
@@ -251,10 +255,16 @@
251 # With HTTPS support
252 ifdef FOSSIL_ENABLE_SSL
253 TCC += -DFOSSIL_ENABLE_SSL=1
254 RCC += -DFOSSIL_ENABLE_SSL=1
255 endif
 
 
 
 
 
 
256
257 # With TH1 embedded docs support
258 ifdef FOSSIL_ENABLE_TH1_DOCS
259 TCC += -DFOSSIL_ENABLE_TH1_DOCS=1
260 RCC += -DFOSSIL_ENABLE_TH1_DOCS=1
261
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -52,10 +52,14 @@
52
53 #### Automatically build OpenSSL when building Fossil (causes rebuild
54 # issues when building incrementally).
55 #
56 # FOSSIL_BUILD_SSL = 1
57
58 #### Enable legacy treatment of mv/rm (skip checkout files)
59 #
60 FOSSIL_ENABLE_LEGACY_MV_RM = 1
61
62 #### Enable TH1 scripts in embedded documentation files
63 #
64 FOSSIL_ENABLE_TH1_DOCS = 1
65
@@ -251,10 +255,16 @@
255 # With HTTPS support
256 ifdef FOSSIL_ENABLE_SSL
257 TCC += -DFOSSIL_ENABLE_SSL=1
258 RCC += -DFOSSIL_ENABLE_SSL=1
259 endif
260
261 # With legacy treatment of mv/rm
262 ifdef FOSSIL_ENABLE_LEGACY_MV_RM
263 TCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1
264 RCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1
265 endif
266
267 # With TH1 embedded docs support
268 ifdef FOSSIL_ENABLE_TH1_DOCS
269 TCC += -DFOSSIL_ENABLE_TH1_DOCS=1
270 RCC += -DFOSSIL_ENABLE_TH1_DOCS=1
271
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -44,10 +44,13 @@
4444
# Uncomment to enable SSL support
4545
# FOSSIL_ENABLE_SSL = 1
4646
4747
# Uncomment to build SSL libraries
4848
# FOSSIL_BUILD_SSL = 1
49
+
50
+# Uncomment to enable legacy treatment of mv/rm
51
+# FOSSIL_ENABLE_LEGACY_MV_RM = 1
4952
5053
# Uncomment to enable TH1 scripts in embedded documentation files
5154
# FOSSIL_ENABLE_TH1_DOCS = 1
5255
5356
# Uncomment to enable TH1 hooks
@@ -160,10 +163,15 @@
160163
TCC = $(TCC) /DFOSSIL_ENABLE_SSL=1
161164
RCC = $(RCC) /DFOSSIL_ENABLE_SSL=1
162165
LIBS = $(LIBS) $(SSLLIB)
163166
LIBDIR = $(LIBDIR) /LIBPATH:$(SSLLIBDIR)
164167
!endif
168
+
169
+!ifdef FOSSIL_ENABLE_LEGACY_MV_RM
170
+TCC = $(TCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1
171
+RCC = $(RCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1
172
+!endif
165173
166174
!ifdef FOSSIL_ENABLE_TH1_DOCS
167175
TCC = $(TCC) /DFOSSIL_ENABLE_TH1_DOCS=1
168176
RCC = $(RCC) /DFOSSIL_ENABLE_TH1_DOCS=1
169177
!endif
170178
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -44,10 +44,13 @@
44 # Uncomment to enable SSL support
45 # FOSSIL_ENABLE_SSL = 1
46
47 # Uncomment to build SSL libraries
48 # FOSSIL_BUILD_SSL = 1
 
 
 
49
50 # Uncomment to enable TH1 scripts in embedded documentation files
51 # FOSSIL_ENABLE_TH1_DOCS = 1
52
53 # Uncomment to enable TH1 hooks
@@ -160,10 +163,15 @@
160 TCC = $(TCC) /DFOSSIL_ENABLE_SSL=1
161 RCC = $(RCC) /DFOSSIL_ENABLE_SSL=1
162 LIBS = $(LIBS) $(SSLLIB)
163 LIBDIR = $(LIBDIR) /LIBPATH:$(SSLLIBDIR)
164 !endif
 
 
 
 
 
165
166 !ifdef FOSSIL_ENABLE_TH1_DOCS
167 TCC = $(TCC) /DFOSSIL_ENABLE_TH1_DOCS=1
168 RCC = $(RCC) /DFOSSIL_ENABLE_TH1_DOCS=1
169 !endif
170
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -44,10 +44,13 @@
44 # Uncomment to enable SSL support
45 # FOSSIL_ENABLE_SSL = 1
46
47 # Uncomment to build SSL libraries
48 # FOSSIL_BUILD_SSL = 1
49
50 # Uncomment to enable legacy treatment of mv/rm
51 # FOSSIL_ENABLE_LEGACY_MV_RM = 1
52
53 # Uncomment to enable TH1 scripts in embedded documentation files
54 # FOSSIL_ENABLE_TH1_DOCS = 1
55
56 # Uncomment to enable TH1 hooks
@@ -160,10 +163,15 @@
163 TCC = $(TCC) /DFOSSIL_ENABLE_SSL=1
164 RCC = $(RCC) /DFOSSIL_ENABLE_SSL=1
165 LIBS = $(LIBS) $(SSLLIB)
166 LIBDIR = $(LIBDIR) /LIBPATH:$(SSLLIBDIR)
167 !endif
168
169 !ifdef FOSSIL_ENABLE_LEGACY_MV_RM
170 TCC = $(TCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1
171 RCC = $(RCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1
172 !endif
173
174 !ifdef FOSSIL_ENABLE_TH1_DOCS
175 TCC = $(TCC) /DFOSSIL_ENABLE_TH1_DOCS=1
176 RCC = $(RCC) /DFOSSIL_ENABLE_TH1_DOCS=1
177 !endif
178
--- win/fossil.rc
+++ win/fossil.rc
@@ -115,10 +115,15 @@
115115
VALUE "CommandLineIsUnicode", "Yes\0"
116116
#endif /* defined(BROKEN_MINGW_CMDLINE) */
117117
#if defined(FOSSIL_ENABLE_SSL)
118118
VALUE "SslEnabled", "Yes, " OPENSSL_VERSION_TEXT "\0"
119119
#endif /* defined(FOSSIL_ENABLE_SSL) */
120
+#if defined(FOSSIL_ENABLE_LEGACY_MV_RM)
121
+ VALUE "LegacyMvRm", "Yes\0"
122
+#else
123
+ VALUE "LegacyMvRm", "No\0"
124
+#endif /* defined(FOSSIL_ENABLE_LEGACY_MV_RM) */
120125
#if defined(FOSSIL_ENABLE_TH1_DOCS)
121126
VALUE "Th1Docs", "Yes\0"
122127
#else
123128
VALUE "Th1Docs", "No\0"
124129
#endif /* defined(FOSSIL_ENABLE_TH1_DOCS) */
125130
--- win/fossil.rc
+++ win/fossil.rc
@@ -115,10 +115,15 @@
115 VALUE "CommandLineIsUnicode", "Yes\0"
116 #endif /* defined(BROKEN_MINGW_CMDLINE) */
117 #if defined(FOSSIL_ENABLE_SSL)
118 VALUE "SslEnabled", "Yes, " OPENSSL_VERSION_TEXT "\0"
119 #endif /* defined(FOSSIL_ENABLE_SSL) */
 
 
 
 
 
120 #if defined(FOSSIL_ENABLE_TH1_DOCS)
121 VALUE "Th1Docs", "Yes\0"
122 #else
123 VALUE "Th1Docs", "No\0"
124 #endif /* defined(FOSSIL_ENABLE_TH1_DOCS) */
125
--- win/fossil.rc
+++ win/fossil.rc
@@ -115,10 +115,15 @@
115 VALUE "CommandLineIsUnicode", "Yes\0"
116 #endif /* defined(BROKEN_MINGW_CMDLINE) */
117 #if defined(FOSSIL_ENABLE_SSL)
118 VALUE "SslEnabled", "Yes, " OPENSSL_VERSION_TEXT "\0"
119 #endif /* defined(FOSSIL_ENABLE_SSL) */
120 #if defined(FOSSIL_ENABLE_LEGACY_MV_RM)
121 VALUE "LegacyMvRm", "Yes\0"
122 #else
123 VALUE "LegacyMvRm", "No\0"
124 #endif /* defined(FOSSIL_ENABLE_LEGACY_MV_RM) */
125 #if defined(FOSSIL_ENABLE_TH1_DOCS)
126 VALUE "Th1Docs", "Yes\0"
127 #else
128 VALUE "Th1Docs", "No\0"
129 #endif /* defined(FOSSIL_ENABLE_TH1_DOCS) */
130
+1
--- www/th1.md
+++ www/th1.md
@@ -283,10 +283,11 @@
283283
284284
Returns true if the binary has the given compile-time feature enabled.
285285
The possible features are:
286286
287287
1. **ssl** -- _Support for the HTTPS transport._
288
+ 1. **legacyMvRm** -- _Support for legacy mv/rm command behavior._
288289
1. **th1Docs** -- _Support for TH1 in embedded documentation._
289290
1. **th1Hooks** -- _Support for TH1 command and web page hooks._
290291
1. **tcl** -- _Support for Tcl integration._
291292
1. **useTclStubs** -- _Tcl stubs enabled in the Tcl headers._
292293
1. **tclStubs** -- _Uses Tcl stubs (i.e. linking with stubs library)._
293294
--- www/th1.md
+++ www/th1.md
@@ -283,10 +283,11 @@
283
284 Returns true if the binary has the given compile-time feature enabled.
285 The possible features are:
286
287 1. **ssl** -- _Support for the HTTPS transport._
 
288 1. **th1Docs** -- _Support for TH1 in embedded documentation._
289 1. **th1Hooks** -- _Support for TH1 command and web page hooks._
290 1. **tcl** -- _Support for Tcl integration._
291 1. **useTclStubs** -- _Tcl stubs enabled in the Tcl headers._
292 1. **tclStubs** -- _Uses Tcl stubs (i.e. linking with stubs library)._
293
--- www/th1.md
+++ www/th1.md
@@ -283,10 +283,11 @@
283
284 Returns true if the binary has the given compile-time feature enabled.
285 The possible features are:
286
287 1. **ssl** -- _Support for the HTTPS transport._
288 1. **legacyMvRm** -- _Support for legacy mv/rm command behavior._
289 1. **th1Docs** -- _Support for TH1 in embedded documentation._
290 1. **th1Hooks** -- _Support for TH1 command and web page hooks._
291 1. **tcl** -- _Support for Tcl integration._
292 1. **useTclStubs** -- _Tcl stubs enabled in the Tcl headers._
293 1. **tclStubs** -- _Uses Tcl stubs (i.e. linking with stubs library)._
294

Keyboard Shortcuts

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