Fossil SCM
Merge enhancements from trunk.
Commit
7e845bfd028cec40e9f5cebd1bc5c84a675174b8111bb27e079feddff1b064d6
Parent
64184f934c8defa…
29 files changed
-3
-1
+1
-8
-26
+120
-33
+1
-2
-4
+9
-11
+19
-2
+25
-8
+1
+3
-3
+17
+33
+1
-5
+1
+1
-20
-20
+20
-7
+2
-2
-2
+7
-5
+1
-10
+1
-10
-10
+2
-10
+2
-10
-4
~
Makefile.classic
~
Makefile.osx-jaguar
~
auto.def
~
src/add.c
~
src/bisect.c
~
src/cgi.c
~
src/configure.c
~
src/db.c
~
src/default.css
~
src/forum.c
~
src/fossil.dom.js
~
src/fossil.fetch.js
~
src/fossil.page.forumpost.js
~
src/json.c
~
src/main.c
~
src/main.mk
~
src/main.mk
~
src/makemake.tcl
~
src/makemake.tcl
~
src/path.c
~
src/sqlcompattest.c
~
src/th_main.c
~
src/timeline.c
~
win/Makefile.mingw
~
win/Makefile.mingw
~
win/Makefile.mingw.mistachkin
~
win/Makefile.msc
~
win/Makefile.msc
~
win/fossil.rc
-3
| --- Makefile.classic | ||
| +++ Makefile.classic | ||
| @@ -43,13 +43,10 @@ | ||
| 43 | 43 | # TCC += -DFOSSIL_ENABLE_MINIZ |
| 44 | 44 | |
| 45 | 45 | # To add support for HTTPS |
| 46 | 46 | TCC += -DFOSSIL_ENABLE_SSL |
| 47 | 47 | |
| 48 | -# To enable legacy mv/rm support | |
| 49 | -TCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1 | |
| 50 | - | |
| 51 | 48 | #### We sometimes add the -static option here so that we can build a |
| 52 | 49 | # static executable that will run in a chroot jail. |
| 53 | 50 | #LIB = -static |
| 54 | 51 | TCC += -DFOSSIL_DYNAMIC_BUILD=1 |
| 55 | 52 | |
| 56 | 53 |
| --- Makefile.classic | |
| +++ Makefile.classic | |
| @@ -43,13 +43,10 @@ | |
| 43 | # TCC += -DFOSSIL_ENABLE_MINIZ |
| 44 | |
| 45 | # To add support for HTTPS |
| 46 | TCC += -DFOSSIL_ENABLE_SSL |
| 47 | |
| 48 | # To enable legacy mv/rm support |
| 49 | TCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1 |
| 50 | |
| 51 | #### We sometimes add the -static option here so that we can build a |
| 52 | # static executable that will run in a chroot jail. |
| 53 | #LIB = -static |
| 54 | TCC += -DFOSSIL_DYNAMIC_BUILD=1 |
| 55 | |
| 56 |
| --- Makefile.classic | |
| +++ Makefile.classic | |
| @@ -43,13 +43,10 @@ | |
| 43 | # TCC += -DFOSSIL_ENABLE_MINIZ |
| 44 | |
| 45 | # To add support for HTTPS |
| 46 | TCC += -DFOSSIL_ENABLE_SSL |
| 47 | |
| 48 | #### We sometimes add the -static option here so that we can build a |
| 49 | # static executable that will run in a chroot jail. |
| 50 | #LIB = -static |
| 51 | TCC += -DFOSSIL_DYNAMIC_BUILD=1 |
| 52 | |
| 53 |
-1
| --- Makefile.osx-jaguar | ||
| +++ Makefile.osx-jaguar | ||
| @@ -57,11 +57,10 @@ | ||
| 57 | 57 | TCC += -DSQLITE_WITHOUT_ZONEMALLOC |
| 58 | 58 | TCC += -D_BSD_SOURCE=1 |
| 59 | 59 | TCC += -DWITHOUT_ICONV |
| 60 | 60 | TCC += -Dsocklen_t=int |
| 61 | 61 | TCC += -DSQLITE_MAX_MMAP_SIZE=0 |
| 62 | -TCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1 | |
| 63 | 62 | INSTALLDIR = $(DESTDIR)/usr/local/bin |
| 64 | 63 | USE_SYSTEM_SQLITE = |
| 65 | 64 | USE_LINENOISE = 1 |
| 66 | 65 | # FOSSIL_ENABLE_TCL = @FOSSIL_ENABLE_TCL@ |
| 67 | 66 | FOSSIL_ENABLE_TCL = 0 |
| 68 | 67 |
| --- Makefile.osx-jaguar | |
| +++ Makefile.osx-jaguar | |
| @@ -57,11 +57,10 @@ | |
| 57 | TCC += -DSQLITE_WITHOUT_ZONEMALLOC |
| 58 | TCC += -D_BSD_SOURCE=1 |
| 59 | TCC += -DWITHOUT_ICONV |
| 60 | TCC += -Dsocklen_t=int |
| 61 | TCC += -DSQLITE_MAX_MMAP_SIZE=0 |
| 62 | TCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1 |
| 63 | INSTALLDIR = $(DESTDIR)/usr/local/bin |
| 64 | USE_SYSTEM_SQLITE = |
| 65 | USE_LINENOISE = 1 |
| 66 | # FOSSIL_ENABLE_TCL = @FOSSIL_ENABLE_TCL@ |
| 67 | FOSSIL_ENABLE_TCL = 0 |
| 68 |
| --- Makefile.osx-jaguar | |
| +++ Makefile.osx-jaguar | |
| @@ -57,11 +57,10 @@ | |
| 57 | TCC += -DSQLITE_WITHOUT_ZONEMALLOC |
| 58 | TCC += -D_BSD_SOURCE=1 |
| 59 | TCC += -DWITHOUT_ICONV |
| 60 | TCC += -Dsocklen_t=int |
| 61 | TCC += -DSQLITE_MAX_MMAP_SIZE=0 |
| 62 | INSTALLDIR = $(DESTDIR)/usr/local/bin |
| 63 | USE_SYSTEM_SQLITE = |
| 64 | USE_LINENOISE = 1 |
| 65 | # FOSSIL_ENABLE_TCL = @FOSSIL_ENABLE_TCL@ |
| 66 | FOSSIL_ENABLE_TCL = 0 |
| 67 |
M
auto.def
+1
-8
| --- auto.def | ||
| +++ auto.def | ||
| @@ -8,11 +8,10 @@ | ||
| 8 | 8 | with-miniz=0 => {Use miniz from the source tree} |
| 9 | 9 | with-zlib:path|auto|tree |
| 10 | 10 | => {Look for zlib in the given path, automatically, or in the source tree} |
| 11 | 11 | with-exec-rel-paths=0 |
| 12 | 12 | => {Enable relative paths for external diff/gdiff} |
| 13 | - with-legacy-mv-rm=1 => {Enable legacy behavior for mv/rm (skip checkout files)} | |
| 14 | 13 | with-sanitizer: => {Build with C compiler's -fsanitize=LIST; e.g. address,enum,null,undefined} |
| 15 | 14 | with-th1-docs=0 => {Enable TH1 for embedded documentation pages} |
| 16 | 15 | with-th1-hooks=0 => {Enable TH1 hooks for commands and web pages} |
| 17 | 16 | with-tcl:path => {Enable Tcl integration, with Tcl in the specified path} |
| 18 | 17 | with-tcl-stubs=0 => {Enable Tcl integration via stubs library mechanism} |
| @@ -183,11 +182,11 @@ | ||
| 183 | 182 | user-error $result |
| 184 | 183 | } |
| 185 | 184 | file delete ./conftest__ |
| 186 | 185 | } |
| 187 | 186 | test_system_sqlite |
| 188 | - | |
| 187 | + | |
| 189 | 188 | } |
| 190 | 189 | |
| 191 | 190 | proc is_mingw {} { |
| 192 | 191 | return [string match *mingw* [get-define host]] |
| 193 | 192 | } |
| @@ -238,16 +237,10 @@ | ||
| 238 | 237 | define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_JSON |
| 239 | 238 | define FOSSIL_ENABLE_JSON |
| 240 | 239 | msg-result "JSON support enabled" |
| 241 | 240 | } |
| 242 | 241 | |
| 243 | -if {[opt-bool with-legacy-mv-rm]} { | |
| 244 | - define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_LEGACY_MV_RM=1 | |
| 245 | - define FOSSIL_ENABLE_LEGACY_MV_RM | |
| 246 | - msg-result "Legacy mv/rm support enabled" | |
| 247 | -} | |
| 248 | - | |
| 249 | 242 | if {[opt-bool with-exec-rel-paths]} { |
| 250 | 243 | define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_EXEC_REL_PATHS |
| 251 | 244 | define FOSSIL_ENABLE_EXEC_REL_PATHS |
| 252 | 245 | msg-result "Relative paths in external diff/gdiff enabled" |
| 253 | 246 | } |
| 254 | 247 |
| --- auto.def | |
| +++ auto.def | |
| @@ -8,11 +8,10 @@ | |
| 8 | with-miniz=0 => {Use miniz from the source tree} |
| 9 | with-zlib:path|auto|tree |
| 10 | => {Look for zlib in the given path, automatically, or in the source tree} |
| 11 | with-exec-rel-paths=0 |
| 12 | => {Enable relative paths for external diff/gdiff} |
| 13 | with-legacy-mv-rm=1 => {Enable legacy behavior for mv/rm (skip checkout files)} |
| 14 | with-sanitizer: => {Build with C compiler's -fsanitize=LIST; e.g. address,enum,null,undefined} |
| 15 | with-th1-docs=0 => {Enable TH1 for embedded documentation pages} |
| 16 | with-th1-hooks=0 => {Enable TH1 hooks for commands and web pages} |
| 17 | with-tcl:path => {Enable Tcl integration, with Tcl in the specified path} |
| 18 | with-tcl-stubs=0 => {Enable Tcl integration via stubs library mechanism} |
| @@ -183,11 +182,11 @@ | |
| 183 | user-error $result |
| 184 | } |
| 185 | file delete ./conftest__ |
| 186 | } |
| 187 | test_system_sqlite |
| 188 | |
| 189 | } |
| 190 | |
| 191 | proc is_mingw {} { |
| 192 | return [string match *mingw* [get-define host]] |
| 193 | } |
| @@ -238,16 +237,10 @@ | |
| 238 | define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_JSON |
| 239 | define FOSSIL_ENABLE_JSON |
| 240 | msg-result "JSON support enabled" |
| 241 | } |
| 242 | |
| 243 | if {[opt-bool with-legacy-mv-rm]} { |
| 244 | define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_LEGACY_MV_RM=1 |
| 245 | define FOSSIL_ENABLE_LEGACY_MV_RM |
| 246 | msg-result "Legacy mv/rm support enabled" |
| 247 | } |
| 248 | |
| 249 | if {[opt-bool with-exec-rel-paths]} { |
| 250 | define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_EXEC_REL_PATHS |
| 251 | define FOSSIL_ENABLE_EXEC_REL_PATHS |
| 252 | msg-result "Relative paths in external diff/gdiff enabled" |
| 253 | } |
| 254 |
| --- auto.def | |
| +++ auto.def | |
| @@ -8,11 +8,10 @@ | |
| 8 | with-miniz=0 => {Use miniz from the source tree} |
| 9 | with-zlib:path|auto|tree |
| 10 | => {Look for zlib in the given path, automatically, or in the source tree} |
| 11 | with-exec-rel-paths=0 |
| 12 | => {Enable relative paths for external diff/gdiff} |
| 13 | with-sanitizer: => {Build with C compiler's -fsanitize=LIST; e.g. address,enum,null,undefined} |
| 14 | with-th1-docs=0 => {Enable TH1 for embedded documentation pages} |
| 15 | with-th1-hooks=0 => {Enable TH1 hooks for commands and web pages} |
| 16 | with-tcl:path => {Enable Tcl integration, with Tcl in the specified path} |
| 17 | with-tcl-stubs=0 => {Enable Tcl integration via stubs library mechanism} |
| @@ -183,11 +182,11 @@ | |
| 182 | user-error $result |
| 183 | } |
| 184 | file delete ./conftest__ |
| 185 | } |
| 186 | test_system_sqlite |
| 187 | |
| 188 | } |
| 189 | |
| 190 | proc is_mingw {} { |
| 191 | return [string match *mingw* [get-define host]] |
| 192 | } |
| @@ -238,16 +237,10 @@ | |
| 237 | define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_JSON |
| 238 | define FOSSIL_ENABLE_JSON |
| 239 | msg-result "JSON support enabled" |
| 240 | } |
| 241 | |
| 242 | if {[opt-bool with-exec-rel-paths]} { |
| 243 | define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_EXEC_REL_PATHS |
| 244 | define FOSSIL_ENABLE_EXEC_REL_PATHS |
| 245 | msg-result "Relative paths in external diff/gdiff enabled" |
| 246 | } |
| 247 |
-26
| --- src/add.c | ||
| +++ src/add.c | ||
| @@ -22,28 +22,10 @@ | ||
| 22 | 22 | #include "add.h" |
| 23 | 23 | #include <assert.h> |
| 24 | 24 | #include <dirent.h> |
| 25 | 25 | #include "cygsup.h" |
| 26 | 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 | 27 | /* |
| 46 | 28 | ** This routine returns the names of files in a working checkout that |
| 47 | 29 | ** are created by Fossil itself, and hence should not be added, deleted, |
| 48 | 30 | ** or merge, and should be omitted from "clean" and "extras" lists. |
| 49 | 31 | ** |
| @@ -592,15 +574,11 @@ | ||
| 592 | 574 | }else if( softFlag ){ |
| 593 | 575 | removeFiles = 0; |
| 594 | 576 | }else if( hardFlag ){ |
| 595 | 577 | removeFiles = 1; |
| 596 | 578 | }else{ |
| 597 | -#if FOSSIL_ENABLE_LEGACY_MV_RM | |
| 598 | 579 | removeFiles = db_get_boolean("mv-rm-files",0); |
| 599 | -#else | |
| 600 | - removeFiles = FOSSIL_MV_RM_FILE; | |
| 601 | -#endif | |
| 602 | 580 | } |
| 603 | 581 | db_multi_exec("CREATE TEMP TABLE sfile(pathname TEXT PRIMARY KEY %s)", |
| 604 | 582 | filename_collation()); |
| 605 | 583 | for(i=2; i<g.argc; i++){ |
| 606 | 584 | Blob treeName; |
| @@ -1033,15 +1011,11 @@ | ||
| 1033 | 1011 | }else if( softFlag ){ |
| 1034 | 1012 | moveFiles = 0; |
| 1035 | 1013 | }else if( hardFlag ){ |
| 1036 | 1014 | moveFiles = 1; |
| 1037 | 1015 | }else{ |
| 1038 | -#if FOSSIL_ENABLE_LEGACY_MV_RM | |
| 1039 | 1016 | moveFiles = db_get_boolean("mv-rm-files",0); |
| 1040 | -#else | |
| 1041 | - moveFiles = FOSSIL_MV_RM_FILE; | |
| 1042 | -#endif | |
| 1043 | 1017 | } |
| 1044 | 1018 | file_tree_name(zDest, &dest, 0, 1); |
| 1045 | 1019 | db_multi_exec( |
| 1046 | 1020 | "UPDATE vfile SET origname=pathname WHERE origname IS NULL;" |
| 1047 | 1021 | ); |
| 1048 | 1022 |
| --- 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 | ** |
| @@ -592,15 +574,11 @@ | |
| 592 | }else if( softFlag ){ |
| 593 | removeFiles = 0; |
| 594 | }else if( hardFlag ){ |
| 595 | removeFiles = 1; |
| 596 | }else{ |
| 597 | #if FOSSIL_ENABLE_LEGACY_MV_RM |
| 598 | removeFiles = db_get_boolean("mv-rm-files",0); |
| 599 | #else |
| 600 | removeFiles = FOSSIL_MV_RM_FILE; |
| 601 | #endif |
| 602 | } |
| 603 | db_multi_exec("CREATE TEMP TABLE sfile(pathname TEXT PRIMARY KEY %s)", |
| 604 | filename_collation()); |
| 605 | for(i=2; i<g.argc; i++){ |
| 606 | Blob treeName; |
| @@ -1033,15 +1011,11 @@ | |
| 1033 | }else if( softFlag ){ |
| 1034 | moveFiles = 0; |
| 1035 | }else if( hardFlag ){ |
| 1036 | moveFiles = 1; |
| 1037 | }else{ |
| 1038 | #if FOSSIL_ENABLE_LEGACY_MV_RM |
| 1039 | moveFiles = db_get_boolean("mv-rm-files",0); |
| 1040 | #else |
| 1041 | moveFiles = FOSSIL_MV_RM_FILE; |
| 1042 | #endif |
| 1043 | } |
| 1044 | file_tree_name(zDest, &dest, 0, 1); |
| 1045 | db_multi_exec( |
| 1046 | "UPDATE vfile SET origname=pathname WHERE origname IS NULL;" |
| 1047 | ); |
| 1048 |
| --- 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 | ** |
| @@ -592,15 +574,11 @@ | |
| 574 | }else if( softFlag ){ |
| 575 | removeFiles = 0; |
| 576 | }else if( hardFlag ){ |
| 577 | removeFiles = 1; |
| 578 | }else{ |
| 579 | removeFiles = db_get_boolean("mv-rm-files",0); |
| 580 | } |
| 581 | db_multi_exec("CREATE TEMP TABLE sfile(pathname TEXT PRIMARY KEY %s)", |
| 582 | filename_collation()); |
| 583 | for(i=2; i<g.argc; i++){ |
| 584 | Blob treeName; |
| @@ -1033,15 +1011,11 @@ | |
| 1011 | }else if( softFlag ){ |
| 1012 | moveFiles = 0; |
| 1013 | }else if( hardFlag ){ |
| 1014 | moveFiles = 1; |
| 1015 | }else{ |
| 1016 | moveFiles = db_get_boolean("mv-rm-files",0); |
| 1017 | } |
| 1018 | file_tree_name(zDest, &dest, 0, 1); |
| 1019 | db_multi_exec( |
| 1020 | "UPDATE vfile SET origname=pathname WHERE origname IS NULL;" |
| 1021 | ); |
| 1022 |
+120
-33
| --- src/bisect.c | ||
| +++ src/bisect.c | ||
| @@ -37,17 +37,30 @@ | ||
| 37 | 37 | void bisect_path(void){ |
| 38 | 38 | PathNode *p; |
| 39 | 39 | bisect.bad = db_lget_int("bisect-bad", 0); |
| 40 | 40 | bisect.good = db_lget_int("bisect-good", 0); |
| 41 | 41 | if( bisect.good>0 && bisect.bad==0 ){ |
| 42 | - path_shortest(bisect.good, bisect.good, 0, 0); | |
| 42 | + path_shortest(bisect.good, bisect.good, 0, 0, 0); | |
| 43 | 43 | }else if( bisect.bad>0 && bisect.good==0 ){ |
| 44 | - path_shortest(bisect.bad, bisect.bad, 0, 0); | |
| 44 | + path_shortest(bisect.bad, bisect.bad, 0, 0, 0); | |
| 45 | 45 | }else if( bisect.bad==0 && bisect.good==0 ){ |
| 46 | 46 | fossil_fatal("neither \"good\" nor \"bad\" versions have been identified"); |
| 47 | 47 | }else{ |
| 48 | - p = path_shortest(bisect.good, bisect.bad, bisect_option("direct-only"), 0); | |
| 48 | + Bag skip; | |
| 49 | + int bDirect = bisect_option("direct-only"); | |
| 50 | + char *zLog = db_lget("bisect-log",""); | |
| 51 | + Blob log, id; | |
| 52 | + bag_init(&skip); | |
| 53 | + blob_init(&log, zLog, -1); | |
| 54 | + while( blob_token(&log, &id) ){ | |
| 55 | + if( blob_str(&id)[0]=='s' ){ | |
| 56 | + bag_insert(&skip, atoi(blob_str(&id)+1)); | |
| 57 | + } | |
| 58 | + } | |
| 59 | + blob_reset(&log); | |
| 60 | + p = path_shortest(bisect.good, bisect.bad, bDirect, 0, &skip); | |
| 61 | + bag_clear(&skip); | |
| 49 | 62 | if( p==0 ){ |
| 50 | 63 | char *zBad = db_text(0,"SELECT uuid FROM blob WHERE rid=%d",bisect.bad); |
| 51 | 64 | char *zGood = db_text(0,"SELECT uuid FROM blob WHERE rid=%d",bisect.good); |
| 52 | 65 | fossil_fatal("no path from good ([%S]) to bad ([%S]) or back", |
| 53 | 66 | zGood, zBad); |
| @@ -167,29 +180,51 @@ | ||
| 167 | 180 | db_multi_exec( |
| 168 | 181 | "REPLACE INTO vvar(name,value) VALUES('bisect-log'," |
| 169 | 182 | "COALESCE((SELECT value||' ' FROM vvar WHERE name='bisect-log'),'')" |
| 170 | 183 | " || '%d')", rid); |
| 171 | 184 | } |
| 185 | + | |
| 186 | +/* | |
| 187 | +** Append a new skip entry to the bisect log. | |
| 188 | +*/ | |
| 189 | +static void bisect_append_skip(int rid){ | |
| 190 | + db_multi_exec( | |
| 191 | + "UPDATE vvar SET value=value||' s%d' WHERE name='bisect-log'", rid | |
| 192 | + ); | |
| 193 | +} | |
| 172 | 194 | |
| 173 | 195 | /* |
| 174 | 196 | ** Create a TEMP table named "bilog" that contains the complete history |
| 175 | 197 | ** of the current bisect. |
| 198 | +** | |
| 199 | +** If iCurrent>0 then it is the RID of the current checkout and is included | |
| 200 | +** in the history table. | |
| 201 | +** | |
| 202 | +** If zDesc is not NULL, then it is the bid= query parameter to /timeline | |
| 203 | +** that describes a bisect. Use the information in zDesc rather than in | |
| 204 | +** the bisect-log variable. | |
| 205 | +** | |
| 206 | +** If bDetail is true, then also include information about every node | |
| 207 | +** in between the inner-most GOOD and BAD nodes. | |
| 176 | 208 | */ |
| 177 | -int bisect_create_bilog_table(int iCurrent, const char *zDesc){ | |
| 209 | +int bisect_create_bilog_table(int iCurrent, const char *zDesc, int bDetail){ | |
| 178 | 210 | char *zLog; |
| 179 | 211 | Blob log, id; |
| 180 | 212 | Stmt q; |
| 181 | 213 | int cnt = 0; |
| 214 | + int lastGood = -1; | |
| 215 | + int lastBad = -1; | |
| 182 | 216 | |
| 183 | 217 | if( zDesc!=0 ){ |
| 184 | 218 | blob_init(&log, 0, 0); |
| 185 | - while( zDesc[0]=='y' || zDesc[0]=='n' ){ | |
| 219 | + while( zDesc[0]=='y' || zDesc[0]=='n' || zDesc[0]=='s' ){ | |
| 186 | 220 | int i; |
| 187 | 221 | char c; |
| 188 | 222 | int rid; |
| 189 | 223 | if( blob_size(&log) ) blob_append(&log, " ", 1); |
| 190 | 224 | if( zDesc[0]=='n' ) blob_append(&log, "-", 1); |
| 225 | + if( zDesc[0]=='s' ) blob_append(&log, "s", 1); | |
| 191 | 226 | for(i=1; ((c = zDesc[i])>='0' && c<='9') || (c>='a' && c<='f'); i++){} |
| 192 | 227 | if( i==1 ) break; |
| 193 | 228 | rid = db_int(0, |
| 194 | 229 | "SELECT rid FROM blob" |
| 195 | 230 | " WHERE uuid LIKE '%.*q%%'" |
| @@ -204,30 +239,58 @@ | ||
| 204 | 239 | zLog = db_lget("bisect-log",""); |
| 205 | 240 | blob_init(&log, zLog, -1); |
| 206 | 241 | } |
| 207 | 242 | db_multi_exec( |
| 208 | 243 | "CREATE TEMP TABLE bilog(" |
| 209 | - " seq INTEGER PRIMARY KEY," /* Sequence of events */ | |
| 244 | + " rid INTEGER PRIMARY KEY," /* Sequence of events */ | |
| 210 | 245 | " stat TEXT," /* Type of occurrence */ |
| 211 | - " rid INTEGER UNIQUE" /* Check-in number */ | |
| 246 | + " seq INTEGER UNIQUE" /* Check-in number */ | |
| 212 | 247 | ");" |
| 213 | 248 | ); |
| 214 | 249 | db_prepare(&q, "INSERT OR IGNORE INTO bilog(seq,stat,rid)" |
| 215 | 250 | " VALUES(:seq,:stat,:rid)"); |
| 216 | 251 | while( blob_token(&log, &id) ){ |
| 217 | - int rid = atoi(blob_str(&id)); | |
| 252 | + int rid; | |
| 218 | 253 | db_bind_int(&q, ":seq", ++cnt); |
| 219 | - db_bind_text(&q, ":stat", rid>0 ? "GOOD" : "BAD"); | |
| 220 | - db_bind_int(&q, ":rid", rid>=0 ? rid : -rid); | |
| 254 | + if( blob_str(&id)[0]=='s' ){ | |
| 255 | + rid = atoi(blob_str(&id)+1); | |
| 256 | + db_bind_text(&q, ":stat", "SKIP"); | |
| 257 | + db_bind_int(&q, ":rid", rid); | |
| 258 | + }else{ | |
| 259 | + rid = atoi(blob_str(&id)); | |
| 260 | + if( rid>0 ){ | |
| 261 | + db_bind_text(&q, ":stat","GOOD"); | |
| 262 | + db_bind_int(&q, ":rid", rid); | |
| 263 | + lastGood = rid; | |
| 264 | + }else{ | |
| 265 | + db_bind_text(&q, ":stat", "BAD"); | |
| 266 | + db_bind_int(&q, ":rid", -rid); | |
| 267 | + lastBad = -rid; | |
| 268 | + } | |
| 269 | + } | |
| 221 | 270 | db_step(&q); |
| 222 | 271 | db_reset(&q); |
| 223 | 272 | } |
| 224 | 273 | if( iCurrent>0 ){ |
| 225 | 274 | db_bind_int(&q, ":seq", ++cnt); |
| 226 | 275 | db_bind_text(&q, ":stat", "CURRENT"); |
| 227 | 276 | db_bind_int(&q, ":rid", iCurrent); |
| 228 | 277 | db_step(&q); |
| 278 | + db_reset(&q); | |
| 279 | + } | |
| 280 | + if( bDetail && lastGood>0 && lastBad>0 ){ | |
| 281 | + PathNode *p; | |
| 282 | + p = path_shortest(lastGood, lastBad, bisect_option("direct-only"),0, 0); | |
| 283 | + while( p ){ | |
| 284 | + db_bind_null(&q, ":seq"); | |
| 285 | + db_bind_null(&q, ":stat"); | |
| 286 | + db_bind_int(&q, ":rid", p->rid); | |
| 287 | + db_step(&q); | |
| 288 | + db_reset(&q); | |
| 289 | + p = p->u.pTo; | |
| 290 | + } | |
| 291 | + path_reset(); | |
| 229 | 292 | } |
| 230 | 293 | db_finalize(&q); |
| 231 | 294 | return 1; |
| 232 | 295 | } |
| 233 | 296 | |
| @@ -244,14 +307,25 @@ | ||
| 244 | 307 | Blob log; |
| 245 | 308 | Blob link = BLOB_INITIALIZER; |
| 246 | 309 | Blob id; |
| 247 | 310 | blob_init(&log, zLog, -1); |
| 248 | 311 | while( blob_token(&log, &id) ){ |
| 249 | - int rid = atoi(blob_str(&id)); | |
| 250 | - char *zUuid = db_text(0,"SELECT lower(uuid) FROM blob WHERE rid=%d", | |
| 251 | - rid<0 ? -rid : rid); | |
| 252 | - blob_appendf(&link, "%c%.10s", rid<0 ? 'n' : 'y', zUuid); | |
| 312 | + const char *zUuid; | |
| 313 | + int rid; | |
| 314 | + char cPrefix = 'y'; | |
| 315 | + if( blob_str(&id)[0]=='s' ){ | |
| 316 | + rid = atoi(blob_str(&id)+1); | |
| 317 | + cPrefix = 's'; | |
| 318 | + }else{ | |
| 319 | + rid = atoi(blob_str(&id)); | |
| 320 | + if( rid<0 ){ | |
| 321 | + cPrefix = 'n'; | |
| 322 | + rid = -rid; | |
| 323 | + } | |
| 324 | + } | |
| 325 | + zUuid = db_text(0,"SELECT lower(uuid) FROM blob WHERE rid=%d", rid); | |
| 326 | + blob_appendf(&link, "%c%.10s", cPrefix, zUuid); | |
| 253 | 327 | } |
| 254 | 328 | zResult = mprintf("%s", blob_str(&link)); |
| 255 | 329 | blob_reset(&link); |
| 256 | 330 | blob_reset(&log); |
| 257 | 331 | blob_reset(&id); |
| @@ -263,11 +337,11 @@ | ||
| 263 | 337 | ** sorted either chronologically by bisect time, or by check-in time. |
| 264 | 338 | */ |
| 265 | 339 | static void bisect_chart(int sortByCkinTime){ |
| 266 | 340 | Stmt q; |
| 267 | 341 | int iCurrent = db_lget_int("checkout",0); |
| 268 | - bisect_create_bilog_table(iCurrent, 0); | |
| 342 | + bisect_create_bilog_table(iCurrent, 0, 0); | |
| 269 | 343 | db_prepare(&q, |
| 270 | 344 | "SELECT bilog.seq, bilog.stat," |
| 271 | 345 | " substr(blob.uuid,1,16), datetime(event.mtime)," |
| 272 | 346 | " blob.rid==%d" |
| 273 | 347 | " FROM bilog, blob, event" |
| @@ -317,13 +391,13 @@ | ||
| 317 | 391 | ** the current checkout is marked as working. |
| 318 | 392 | ** |
| 319 | 393 | ** > fossil bisect log |
| 320 | 394 | ** > fossil bisect chart |
| 321 | 395 | ** |
| 322 | -** Show a log of "good" and "bad" versions. "bisect log" shows the | |
| 323 | -** events in the order that they were tested. "bisect chart" shows | |
| 324 | -** them in order of check-in. | |
| 396 | +** Show a log of "good", "bad", and "skip" versions. "bisect log" | |
| 397 | +** shows the events in the order that they were tested. | |
| 398 | +** "bisect chart" shows them in order of check-in. | |
| 325 | 399 | ** |
| 326 | 400 | ** > fossil bisect next |
| 327 | 401 | ** |
| 328 | 402 | ** Update to the next version that is halfway between the working and |
| 329 | 403 | ** non-working versions. |
| @@ -336,34 +410,29 @@ | ||
| 336 | 410 | ** > fossil bisect reset |
| 337 | 411 | ** |
| 338 | 412 | ** Reinitialize a bisect session. This cancels prior bisect history |
| 339 | 413 | ** and allows a bisect session to start over from the beginning. |
| 340 | 414 | ** |
| 415 | +** > fossil bisect skip ?VERSION? | |
| 416 | +** | |
| 417 | +** Cause VERSION (or the current checkout if VERSION is omitted) to | |
| 418 | +** be ignored for the purpose of the current bisect. This might | |
| 419 | +** be done, for example, because VERSION does not compile correctly | |
| 420 | +** or is otherwise unsuitable to participate in this bisect. | |
| 421 | +** | |
| 341 | 422 | ** > fossil bisect vlist|ls|status ?-a|--all? |
| 342 | 423 | ** |
| 343 | -** List the versions in between "bad" and "good". | |
| 424 | +** List the versions in between the inner-most "bad" and "good". | |
| 344 | 425 | ** |
| 345 | 426 | ** > fossil bisect ui |
| 346 | 427 | ** |
| 347 | 428 | ** Like "fossil ui" except start on a timeline that shows only the |
| 348 | 429 | ** check-ins that are part of the current bisect. |
| 349 | 430 | ** |
| 350 | 431 | ** > fossil bisect undo |
| 351 | 432 | ** |
| 352 | -** Undo the most recent "good" or "bad" command. | |
| 353 | -** | |
| 354 | -** Summary: | |
| 355 | -** * fossil bisect bad ?VERSION? | |
| 356 | -** * fossil bisect good ?VERSION? | |
| 357 | -** * fossil bisect log | |
| 358 | -** * fossil bisect chart | |
| 359 | -** * fossil bisect next | |
| 360 | -** * fossil bisect options | |
| 361 | -** * fossil bisect reset | |
| 362 | -** * fossil bisect status | |
| 363 | -** * fossil bisect ui | |
| 364 | -** * fossil bisect undo | |
| 433 | +** Undo the most recent "good", "bad", or "skip" command. | |
| 365 | 434 | */ |
| 366 | 435 | void bisect_cmd(void){ |
| 367 | 436 | int n; |
| 368 | 437 | const char *zCmd; |
| 369 | 438 | int foundCmd = 0; |
| @@ -398,10 +467,28 @@ | ||
| 398 | 467 | ridGood = name_to_typed_rid(g.argv[3], "ci"); |
| 399 | 468 | } |
| 400 | 469 | if( ridGood>0 ){ |
| 401 | 470 | bisect_append_log(ridGood); |
| 402 | 471 | if( bisect_option("auto-next") && db_lget_int("bisect-bad",0)>0 ){ |
| 472 | + zCmd = "next"; | |
| 473 | + n = 4; | |
| 474 | + } | |
| 475 | + } | |
| 476 | + }else if( strncmp(zCmd, "skip", n)==0 ){ | |
| 477 | + int ridSkip; | |
| 478 | + foundCmd = 1; | |
| 479 | + if( g.argc==3 ){ | |
| 480 | + ridSkip = db_lget_int("checkout",0); | |
| 481 | + }else{ | |
| 482 | + ridSkip = name_to_typed_rid(g.argv[3], "ci"); | |
| 483 | + } | |
| 484 | + if( ridSkip>0 ){ | |
| 485 | + bisect_append_skip(ridSkip); | |
| 486 | + if( bisect_option("auto-next") | |
| 487 | + && db_lget_int("bisect-bad",0)>0 | |
| 488 | + && db_lget_int("bisect-good",0)>0 | |
| 489 | + ){ | |
| 403 | 490 | zCmd = "next"; |
| 404 | 491 | n = 4; |
| 405 | 492 | } |
| 406 | 493 | } |
| 407 | 494 | }else if( strncmp(zCmd, "undo", n)==0 ){ |
| @@ -447,11 +534,11 @@ | ||
| 447 | 534 | bisect_path(); |
| 448 | 535 | pMid = path_midpoint(); |
| 449 | 536 | if( pMid==0 ){ |
| 450 | 537 | fossil_print("bisect complete\n"); |
| 451 | 538 | }else{ |
| 452 | - int nSpan = path_length(); | |
| 539 | + int nSpan = path_length_not_hidden(); | |
| 453 | 540 | int nStep = path_search_depth(); |
| 454 | 541 | g.argv[1] = "update"; |
| 455 | 542 | g.argv[2] = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", pMid->rid); |
| 456 | 543 | g.argc = 3; |
| 457 | 544 | g.fNoSync = 1; |
| 458 | 545 |
| --- src/bisect.c | |
| +++ src/bisect.c | |
| @@ -37,17 +37,30 @@ | |
| 37 | void bisect_path(void){ |
| 38 | PathNode *p; |
| 39 | bisect.bad = db_lget_int("bisect-bad", 0); |
| 40 | bisect.good = db_lget_int("bisect-good", 0); |
| 41 | if( bisect.good>0 && bisect.bad==0 ){ |
| 42 | path_shortest(bisect.good, bisect.good, 0, 0); |
| 43 | }else if( bisect.bad>0 && bisect.good==0 ){ |
| 44 | path_shortest(bisect.bad, bisect.bad, 0, 0); |
| 45 | }else if( bisect.bad==0 && bisect.good==0 ){ |
| 46 | fossil_fatal("neither \"good\" nor \"bad\" versions have been identified"); |
| 47 | }else{ |
| 48 | p = path_shortest(bisect.good, bisect.bad, bisect_option("direct-only"), 0); |
| 49 | if( p==0 ){ |
| 50 | char *zBad = db_text(0,"SELECT uuid FROM blob WHERE rid=%d",bisect.bad); |
| 51 | char *zGood = db_text(0,"SELECT uuid FROM blob WHERE rid=%d",bisect.good); |
| 52 | fossil_fatal("no path from good ([%S]) to bad ([%S]) or back", |
| 53 | zGood, zBad); |
| @@ -167,29 +180,51 @@ | |
| 167 | db_multi_exec( |
| 168 | "REPLACE INTO vvar(name,value) VALUES('bisect-log'," |
| 169 | "COALESCE((SELECT value||' ' FROM vvar WHERE name='bisect-log'),'')" |
| 170 | " || '%d')", rid); |
| 171 | } |
| 172 | |
| 173 | /* |
| 174 | ** Create a TEMP table named "bilog" that contains the complete history |
| 175 | ** of the current bisect. |
| 176 | */ |
| 177 | int bisect_create_bilog_table(int iCurrent, const char *zDesc){ |
| 178 | char *zLog; |
| 179 | Blob log, id; |
| 180 | Stmt q; |
| 181 | int cnt = 0; |
| 182 | |
| 183 | if( zDesc!=0 ){ |
| 184 | blob_init(&log, 0, 0); |
| 185 | while( zDesc[0]=='y' || zDesc[0]=='n' ){ |
| 186 | int i; |
| 187 | char c; |
| 188 | int rid; |
| 189 | if( blob_size(&log) ) blob_append(&log, " ", 1); |
| 190 | if( zDesc[0]=='n' ) blob_append(&log, "-", 1); |
| 191 | for(i=1; ((c = zDesc[i])>='0' && c<='9') || (c>='a' && c<='f'); i++){} |
| 192 | if( i==1 ) break; |
| 193 | rid = db_int(0, |
| 194 | "SELECT rid FROM blob" |
| 195 | " WHERE uuid LIKE '%.*q%%'" |
| @@ -204,30 +239,58 @@ | |
| 204 | zLog = db_lget("bisect-log",""); |
| 205 | blob_init(&log, zLog, -1); |
| 206 | } |
| 207 | db_multi_exec( |
| 208 | "CREATE TEMP TABLE bilog(" |
| 209 | " seq INTEGER PRIMARY KEY," /* Sequence of events */ |
| 210 | " stat TEXT," /* Type of occurrence */ |
| 211 | " rid INTEGER UNIQUE" /* Check-in number */ |
| 212 | ");" |
| 213 | ); |
| 214 | db_prepare(&q, "INSERT OR IGNORE INTO bilog(seq,stat,rid)" |
| 215 | " VALUES(:seq,:stat,:rid)"); |
| 216 | while( blob_token(&log, &id) ){ |
| 217 | int rid = atoi(blob_str(&id)); |
| 218 | db_bind_int(&q, ":seq", ++cnt); |
| 219 | db_bind_text(&q, ":stat", rid>0 ? "GOOD" : "BAD"); |
| 220 | db_bind_int(&q, ":rid", rid>=0 ? rid : -rid); |
| 221 | db_step(&q); |
| 222 | db_reset(&q); |
| 223 | } |
| 224 | if( iCurrent>0 ){ |
| 225 | db_bind_int(&q, ":seq", ++cnt); |
| 226 | db_bind_text(&q, ":stat", "CURRENT"); |
| 227 | db_bind_int(&q, ":rid", iCurrent); |
| 228 | db_step(&q); |
| 229 | } |
| 230 | db_finalize(&q); |
| 231 | return 1; |
| 232 | } |
| 233 | |
| @@ -244,14 +307,25 @@ | |
| 244 | Blob log; |
| 245 | Blob link = BLOB_INITIALIZER; |
| 246 | Blob id; |
| 247 | blob_init(&log, zLog, -1); |
| 248 | while( blob_token(&log, &id) ){ |
| 249 | int rid = atoi(blob_str(&id)); |
| 250 | char *zUuid = db_text(0,"SELECT lower(uuid) FROM blob WHERE rid=%d", |
| 251 | rid<0 ? -rid : rid); |
| 252 | blob_appendf(&link, "%c%.10s", rid<0 ? 'n' : 'y', zUuid); |
| 253 | } |
| 254 | zResult = mprintf("%s", blob_str(&link)); |
| 255 | blob_reset(&link); |
| 256 | blob_reset(&log); |
| 257 | blob_reset(&id); |
| @@ -263,11 +337,11 @@ | |
| 263 | ** sorted either chronologically by bisect time, or by check-in time. |
| 264 | */ |
| 265 | static void bisect_chart(int sortByCkinTime){ |
| 266 | Stmt q; |
| 267 | int iCurrent = db_lget_int("checkout",0); |
| 268 | bisect_create_bilog_table(iCurrent, 0); |
| 269 | db_prepare(&q, |
| 270 | "SELECT bilog.seq, bilog.stat," |
| 271 | " substr(blob.uuid,1,16), datetime(event.mtime)," |
| 272 | " blob.rid==%d" |
| 273 | " FROM bilog, blob, event" |
| @@ -317,13 +391,13 @@ | |
| 317 | ** the current checkout is marked as working. |
| 318 | ** |
| 319 | ** > fossil bisect log |
| 320 | ** > fossil bisect chart |
| 321 | ** |
| 322 | ** Show a log of "good" and "bad" versions. "bisect log" shows the |
| 323 | ** events in the order that they were tested. "bisect chart" shows |
| 324 | ** them in order of check-in. |
| 325 | ** |
| 326 | ** > fossil bisect next |
| 327 | ** |
| 328 | ** Update to the next version that is halfway between the working and |
| 329 | ** non-working versions. |
| @@ -336,34 +410,29 @@ | |
| 336 | ** > fossil bisect reset |
| 337 | ** |
| 338 | ** Reinitialize a bisect session. This cancels prior bisect history |
| 339 | ** and allows a bisect session to start over from the beginning. |
| 340 | ** |
| 341 | ** > fossil bisect vlist|ls|status ?-a|--all? |
| 342 | ** |
| 343 | ** List the versions in between "bad" and "good". |
| 344 | ** |
| 345 | ** > fossil bisect ui |
| 346 | ** |
| 347 | ** Like "fossil ui" except start on a timeline that shows only the |
| 348 | ** check-ins that are part of the current bisect. |
| 349 | ** |
| 350 | ** > fossil bisect undo |
| 351 | ** |
| 352 | ** Undo the most recent "good" or "bad" command. |
| 353 | ** |
| 354 | ** Summary: |
| 355 | ** * fossil bisect bad ?VERSION? |
| 356 | ** * fossil bisect good ?VERSION? |
| 357 | ** * fossil bisect log |
| 358 | ** * fossil bisect chart |
| 359 | ** * fossil bisect next |
| 360 | ** * fossil bisect options |
| 361 | ** * fossil bisect reset |
| 362 | ** * fossil bisect status |
| 363 | ** * fossil bisect ui |
| 364 | ** * fossil bisect undo |
| 365 | */ |
| 366 | void bisect_cmd(void){ |
| 367 | int n; |
| 368 | const char *zCmd; |
| 369 | int foundCmd = 0; |
| @@ -398,10 +467,28 @@ | |
| 398 | ridGood = name_to_typed_rid(g.argv[3], "ci"); |
| 399 | } |
| 400 | if( ridGood>0 ){ |
| 401 | bisect_append_log(ridGood); |
| 402 | if( bisect_option("auto-next") && db_lget_int("bisect-bad",0)>0 ){ |
| 403 | zCmd = "next"; |
| 404 | n = 4; |
| 405 | } |
| 406 | } |
| 407 | }else if( strncmp(zCmd, "undo", n)==0 ){ |
| @@ -447,11 +534,11 @@ | |
| 447 | bisect_path(); |
| 448 | pMid = path_midpoint(); |
| 449 | if( pMid==0 ){ |
| 450 | fossil_print("bisect complete\n"); |
| 451 | }else{ |
| 452 | int nSpan = path_length(); |
| 453 | int nStep = path_search_depth(); |
| 454 | g.argv[1] = "update"; |
| 455 | g.argv[2] = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", pMid->rid); |
| 456 | g.argc = 3; |
| 457 | g.fNoSync = 1; |
| 458 |
| --- src/bisect.c | |
| +++ src/bisect.c | |
| @@ -37,17 +37,30 @@ | |
| 37 | void bisect_path(void){ |
| 38 | PathNode *p; |
| 39 | bisect.bad = db_lget_int("bisect-bad", 0); |
| 40 | bisect.good = db_lget_int("bisect-good", 0); |
| 41 | if( bisect.good>0 && bisect.bad==0 ){ |
| 42 | path_shortest(bisect.good, bisect.good, 0, 0, 0); |
| 43 | }else if( bisect.bad>0 && bisect.good==0 ){ |
| 44 | path_shortest(bisect.bad, bisect.bad, 0, 0, 0); |
| 45 | }else if( bisect.bad==0 && bisect.good==0 ){ |
| 46 | fossil_fatal("neither \"good\" nor \"bad\" versions have been identified"); |
| 47 | }else{ |
| 48 | Bag skip; |
| 49 | int bDirect = bisect_option("direct-only"); |
| 50 | char *zLog = db_lget("bisect-log",""); |
| 51 | Blob log, id; |
| 52 | bag_init(&skip); |
| 53 | blob_init(&log, zLog, -1); |
| 54 | while( blob_token(&log, &id) ){ |
| 55 | if( blob_str(&id)[0]=='s' ){ |
| 56 | bag_insert(&skip, atoi(blob_str(&id)+1)); |
| 57 | } |
| 58 | } |
| 59 | blob_reset(&log); |
| 60 | p = path_shortest(bisect.good, bisect.bad, bDirect, 0, &skip); |
| 61 | bag_clear(&skip); |
| 62 | if( p==0 ){ |
| 63 | char *zBad = db_text(0,"SELECT uuid FROM blob WHERE rid=%d",bisect.bad); |
| 64 | char *zGood = db_text(0,"SELECT uuid FROM blob WHERE rid=%d",bisect.good); |
| 65 | fossil_fatal("no path from good ([%S]) to bad ([%S]) or back", |
| 66 | zGood, zBad); |
| @@ -167,29 +180,51 @@ | |
| 180 | db_multi_exec( |
| 181 | "REPLACE INTO vvar(name,value) VALUES('bisect-log'," |
| 182 | "COALESCE((SELECT value||' ' FROM vvar WHERE name='bisect-log'),'')" |
| 183 | " || '%d')", rid); |
| 184 | } |
| 185 | |
| 186 | /* |
| 187 | ** Append a new skip entry to the bisect log. |
| 188 | */ |
| 189 | static void bisect_append_skip(int rid){ |
| 190 | db_multi_exec( |
| 191 | "UPDATE vvar SET value=value||' s%d' WHERE name='bisect-log'", rid |
| 192 | ); |
| 193 | } |
| 194 | |
| 195 | /* |
| 196 | ** Create a TEMP table named "bilog" that contains the complete history |
| 197 | ** of the current bisect. |
| 198 | ** |
| 199 | ** If iCurrent>0 then it is the RID of the current checkout and is included |
| 200 | ** in the history table. |
| 201 | ** |
| 202 | ** If zDesc is not NULL, then it is the bid= query parameter to /timeline |
| 203 | ** that describes a bisect. Use the information in zDesc rather than in |
| 204 | ** the bisect-log variable. |
| 205 | ** |
| 206 | ** If bDetail is true, then also include information about every node |
| 207 | ** in between the inner-most GOOD and BAD nodes. |
| 208 | */ |
| 209 | int bisect_create_bilog_table(int iCurrent, const char *zDesc, int bDetail){ |
| 210 | char *zLog; |
| 211 | Blob log, id; |
| 212 | Stmt q; |
| 213 | int cnt = 0; |
| 214 | int lastGood = -1; |
| 215 | int lastBad = -1; |
| 216 | |
| 217 | if( zDesc!=0 ){ |
| 218 | blob_init(&log, 0, 0); |
| 219 | while( zDesc[0]=='y' || zDesc[0]=='n' || zDesc[0]=='s' ){ |
| 220 | int i; |
| 221 | char c; |
| 222 | int rid; |
| 223 | if( blob_size(&log) ) blob_append(&log, " ", 1); |
| 224 | if( zDesc[0]=='n' ) blob_append(&log, "-", 1); |
| 225 | if( zDesc[0]=='s' ) blob_append(&log, "s", 1); |
| 226 | for(i=1; ((c = zDesc[i])>='0' && c<='9') || (c>='a' && c<='f'); i++){} |
| 227 | if( i==1 ) break; |
| 228 | rid = db_int(0, |
| 229 | "SELECT rid FROM blob" |
| 230 | " WHERE uuid LIKE '%.*q%%'" |
| @@ -204,30 +239,58 @@ | |
| 239 | zLog = db_lget("bisect-log",""); |
| 240 | blob_init(&log, zLog, -1); |
| 241 | } |
| 242 | db_multi_exec( |
| 243 | "CREATE TEMP TABLE bilog(" |
| 244 | " rid INTEGER PRIMARY KEY," /* Sequence of events */ |
| 245 | " stat TEXT," /* Type of occurrence */ |
| 246 | " seq INTEGER UNIQUE" /* Check-in number */ |
| 247 | ");" |
| 248 | ); |
| 249 | db_prepare(&q, "INSERT OR IGNORE INTO bilog(seq,stat,rid)" |
| 250 | " VALUES(:seq,:stat,:rid)"); |
| 251 | while( blob_token(&log, &id) ){ |
| 252 | int rid; |
| 253 | db_bind_int(&q, ":seq", ++cnt); |
| 254 | if( blob_str(&id)[0]=='s' ){ |
| 255 | rid = atoi(blob_str(&id)+1); |
| 256 | db_bind_text(&q, ":stat", "SKIP"); |
| 257 | db_bind_int(&q, ":rid", rid); |
| 258 | }else{ |
| 259 | rid = atoi(blob_str(&id)); |
| 260 | if( rid>0 ){ |
| 261 | db_bind_text(&q, ":stat","GOOD"); |
| 262 | db_bind_int(&q, ":rid", rid); |
| 263 | lastGood = rid; |
| 264 | }else{ |
| 265 | db_bind_text(&q, ":stat", "BAD"); |
| 266 | db_bind_int(&q, ":rid", -rid); |
| 267 | lastBad = -rid; |
| 268 | } |
| 269 | } |
| 270 | db_step(&q); |
| 271 | db_reset(&q); |
| 272 | } |
| 273 | if( iCurrent>0 ){ |
| 274 | db_bind_int(&q, ":seq", ++cnt); |
| 275 | db_bind_text(&q, ":stat", "CURRENT"); |
| 276 | db_bind_int(&q, ":rid", iCurrent); |
| 277 | db_step(&q); |
| 278 | db_reset(&q); |
| 279 | } |
| 280 | if( bDetail && lastGood>0 && lastBad>0 ){ |
| 281 | PathNode *p; |
| 282 | p = path_shortest(lastGood, lastBad, bisect_option("direct-only"),0, 0); |
| 283 | while( p ){ |
| 284 | db_bind_null(&q, ":seq"); |
| 285 | db_bind_null(&q, ":stat"); |
| 286 | db_bind_int(&q, ":rid", p->rid); |
| 287 | db_step(&q); |
| 288 | db_reset(&q); |
| 289 | p = p->u.pTo; |
| 290 | } |
| 291 | path_reset(); |
| 292 | } |
| 293 | db_finalize(&q); |
| 294 | return 1; |
| 295 | } |
| 296 | |
| @@ -244,14 +307,25 @@ | |
| 307 | Blob log; |
| 308 | Blob link = BLOB_INITIALIZER; |
| 309 | Blob id; |
| 310 | blob_init(&log, zLog, -1); |
| 311 | while( blob_token(&log, &id) ){ |
| 312 | const char *zUuid; |
| 313 | int rid; |
| 314 | char cPrefix = 'y'; |
| 315 | if( blob_str(&id)[0]=='s' ){ |
| 316 | rid = atoi(blob_str(&id)+1); |
| 317 | cPrefix = 's'; |
| 318 | }else{ |
| 319 | rid = atoi(blob_str(&id)); |
| 320 | if( rid<0 ){ |
| 321 | cPrefix = 'n'; |
| 322 | rid = -rid; |
| 323 | } |
| 324 | } |
| 325 | zUuid = db_text(0,"SELECT lower(uuid) FROM blob WHERE rid=%d", rid); |
| 326 | blob_appendf(&link, "%c%.10s", cPrefix, zUuid); |
| 327 | } |
| 328 | zResult = mprintf("%s", blob_str(&link)); |
| 329 | blob_reset(&link); |
| 330 | blob_reset(&log); |
| 331 | blob_reset(&id); |
| @@ -263,11 +337,11 @@ | |
| 337 | ** sorted either chronologically by bisect time, or by check-in time. |
| 338 | */ |
| 339 | static void bisect_chart(int sortByCkinTime){ |
| 340 | Stmt q; |
| 341 | int iCurrent = db_lget_int("checkout",0); |
| 342 | bisect_create_bilog_table(iCurrent, 0, 0); |
| 343 | db_prepare(&q, |
| 344 | "SELECT bilog.seq, bilog.stat," |
| 345 | " substr(blob.uuid,1,16), datetime(event.mtime)," |
| 346 | " blob.rid==%d" |
| 347 | " FROM bilog, blob, event" |
| @@ -317,13 +391,13 @@ | |
| 391 | ** the current checkout is marked as working. |
| 392 | ** |
| 393 | ** > fossil bisect log |
| 394 | ** > fossil bisect chart |
| 395 | ** |
| 396 | ** Show a log of "good", "bad", and "skip" versions. "bisect log" |
| 397 | ** shows the events in the order that they were tested. |
| 398 | ** "bisect chart" shows them in order of check-in. |
| 399 | ** |
| 400 | ** > fossil bisect next |
| 401 | ** |
| 402 | ** Update to the next version that is halfway between the working and |
| 403 | ** non-working versions. |
| @@ -336,34 +410,29 @@ | |
| 410 | ** > fossil bisect reset |
| 411 | ** |
| 412 | ** Reinitialize a bisect session. This cancels prior bisect history |
| 413 | ** and allows a bisect session to start over from the beginning. |
| 414 | ** |
| 415 | ** > fossil bisect skip ?VERSION? |
| 416 | ** |
| 417 | ** Cause VERSION (or the current checkout if VERSION is omitted) to |
| 418 | ** be ignored for the purpose of the current bisect. This might |
| 419 | ** be done, for example, because VERSION does not compile correctly |
| 420 | ** or is otherwise unsuitable to participate in this bisect. |
| 421 | ** |
| 422 | ** > fossil bisect vlist|ls|status ?-a|--all? |
| 423 | ** |
| 424 | ** List the versions in between the inner-most "bad" and "good". |
| 425 | ** |
| 426 | ** > fossil bisect ui |
| 427 | ** |
| 428 | ** Like "fossil ui" except start on a timeline that shows only the |
| 429 | ** check-ins that are part of the current bisect. |
| 430 | ** |
| 431 | ** > fossil bisect undo |
| 432 | ** |
| 433 | ** Undo the most recent "good", "bad", or "skip" command. |
| 434 | */ |
| 435 | void bisect_cmd(void){ |
| 436 | int n; |
| 437 | const char *zCmd; |
| 438 | int foundCmd = 0; |
| @@ -398,10 +467,28 @@ | |
| 467 | ridGood = name_to_typed_rid(g.argv[3], "ci"); |
| 468 | } |
| 469 | if( ridGood>0 ){ |
| 470 | bisect_append_log(ridGood); |
| 471 | if( bisect_option("auto-next") && db_lget_int("bisect-bad",0)>0 ){ |
| 472 | zCmd = "next"; |
| 473 | n = 4; |
| 474 | } |
| 475 | } |
| 476 | }else if( strncmp(zCmd, "skip", n)==0 ){ |
| 477 | int ridSkip; |
| 478 | foundCmd = 1; |
| 479 | if( g.argc==3 ){ |
| 480 | ridSkip = db_lget_int("checkout",0); |
| 481 | }else{ |
| 482 | ridSkip = name_to_typed_rid(g.argv[3], "ci"); |
| 483 | } |
| 484 | if( ridSkip>0 ){ |
| 485 | bisect_append_skip(ridSkip); |
| 486 | if( bisect_option("auto-next") |
| 487 | && db_lget_int("bisect-bad",0)>0 |
| 488 | && db_lget_int("bisect-good",0)>0 |
| 489 | ){ |
| 490 | zCmd = "next"; |
| 491 | n = 4; |
| 492 | } |
| 493 | } |
| 494 | }else if( strncmp(zCmd, "undo", n)==0 ){ |
| @@ -447,11 +534,11 @@ | |
| 534 | bisect_path(); |
| 535 | pMid = path_midpoint(); |
| 536 | if( pMid==0 ){ |
| 537 | fossil_print("bisect complete\n"); |
| 538 | }else{ |
| 539 | int nSpan = path_length_not_hidden(); |
| 540 | int nStep = path_search_depth(); |
| 541 | g.argv[1] = "update"; |
| 542 | g.argv[2] = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", pMid->rid); |
| 543 | g.argc = 3; |
| 544 | g.fNoSync = 1; |
| 545 |
+1
-2
| --- src/cgi.c | ||
| +++ src/cgi.c | ||
| @@ -1101,12 +1101,11 @@ | ||
| 1101 | 1101 | for(j=i; zRequestUri[j] && zRequestUri[j]!='?'; j++){} |
| 1102 | 1102 | zPathInfo = mprintf("%.*s", j-i, zRequestUri+i); |
| 1103 | 1103 | cgi_set_parameter("PATH_INFO", zPathInfo); |
| 1104 | 1104 | } |
| 1105 | 1105 | #ifdef FOSSIL_ENABLE_JSON |
| 1106 | - if(strncmp("/json",zPathInfo,5)==0 | |
| 1107 | - && (zPathInfo[5]==0 || zPathInfo[5]=='/')){ | |
| 1106 | + if(json_request_is_json_api(zPathInfo)){ | |
| 1108 | 1107 | /* We need to change some following behaviour depending on whether |
| 1109 | 1108 | ** we are operating in JSON mode or not. We cannot, however, be |
| 1110 | 1109 | ** certain whether we should/need to be in JSON mode until the |
| 1111 | 1110 | ** PATH_INFO is set up. |
| 1112 | 1111 | */ |
| 1113 | 1112 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -1101,12 +1101,11 @@ | |
| 1101 | for(j=i; zRequestUri[j] && zRequestUri[j]!='?'; j++){} |
| 1102 | zPathInfo = mprintf("%.*s", j-i, zRequestUri+i); |
| 1103 | cgi_set_parameter("PATH_INFO", zPathInfo); |
| 1104 | } |
| 1105 | #ifdef FOSSIL_ENABLE_JSON |
| 1106 | if(strncmp("/json",zPathInfo,5)==0 |
| 1107 | && (zPathInfo[5]==0 || zPathInfo[5]=='/')){ |
| 1108 | /* We need to change some following behaviour depending on whether |
| 1109 | ** we are operating in JSON mode or not. We cannot, however, be |
| 1110 | ** certain whether we should/need to be in JSON mode until the |
| 1111 | ** PATH_INFO is set up. |
| 1112 | */ |
| 1113 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -1101,12 +1101,11 @@ | |
| 1101 | for(j=i; zRequestUri[j] && zRequestUri[j]!='?'; j++){} |
| 1102 | zPathInfo = mprintf("%.*s", j-i, zRequestUri+i); |
| 1103 | cgi_set_parameter("PATH_INFO", zPathInfo); |
| 1104 | } |
| 1105 | #ifdef FOSSIL_ENABLE_JSON |
| 1106 | if(json_request_is_json_api(zPathInfo)){ |
| 1107 | /* We need to change some following behaviour depending on whether |
| 1108 | ** we are operating in JSON mode or not. We cannot, however, be |
| 1109 | ** certain whether we should/need to be in JSON mode until the |
| 1110 | ** PATH_INFO is set up. |
| 1111 | */ |
| 1112 |
-4
| --- src/configure.c | ||
| +++ src/configure.c | ||
| @@ -148,15 +148,11 @@ | ||
| 148 | 148 | { "parent-project-name", CONFIGSET_PROJ }, |
| 149 | 149 | { "hash-policy", CONFIGSET_PROJ }, |
| 150 | 150 | { "comment-format", CONFIGSET_PROJ }, |
| 151 | 151 | { "mimetypes", CONFIGSET_PROJ }, |
| 152 | 152 | { "forbid-delta-manifests", CONFIGSET_PROJ }, |
| 153 | - | |
| 154 | -#ifdef FOSSIL_ENABLE_LEGACY_MV_RM | |
| 155 | 153 | { "mv-rm-files", CONFIGSET_PROJ }, |
| 156 | -#endif | |
| 157 | - | |
| 158 | 154 | { "ticket-table", CONFIGSET_TKT }, |
| 159 | 155 | { "ticket-common", CONFIGSET_TKT }, |
| 160 | 156 | { "ticket-change", CONFIGSET_TKT }, |
| 161 | 157 | { "ticket-newpage", CONFIGSET_TKT }, |
| 162 | 158 | { "ticket-viewpage", CONFIGSET_TKT }, |
| 163 | 159 |
| --- src/configure.c | |
| +++ src/configure.c | |
| @@ -148,15 +148,11 @@ | |
| 148 | { "parent-project-name", CONFIGSET_PROJ }, |
| 149 | { "hash-policy", CONFIGSET_PROJ }, |
| 150 | { "comment-format", CONFIGSET_PROJ }, |
| 151 | { "mimetypes", CONFIGSET_PROJ }, |
| 152 | { "forbid-delta-manifests", CONFIGSET_PROJ }, |
| 153 | |
| 154 | #ifdef FOSSIL_ENABLE_LEGACY_MV_RM |
| 155 | { "mv-rm-files", CONFIGSET_PROJ }, |
| 156 | #endif |
| 157 | |
| 158 | { "ticket-table", CONFIGSET_TKT }, |
| 159 | { "ticket-common", CONFIGSET_TKT }, |
| 160 | { "ticket-change", CONFIGSET_TKT }, |
| 161 | { "ticket-newpage", CONFIGSET_TKT }, |
| 162 | { "ticket-viewpage", CONFIGSET_TKT }, |
| 163 |
| --- src/configure.c | |
| +++ src/configure.c | |
| @@ -148,15 +148,11 @@ | |
| 148 | { "parent-project-name", CONFIGSET_PROJ }, |
| 149 | { "hash-policy", CONFIGSET_PROJ }, |
| 150 | { "comment-format", CONFIGSET_PROJ }, |
| 151 | { "mimetypes", CONFIGSET_PROJ }, |
| 152 | { "forbid-delta-manifests", CONFIGSET_PROJ }, |
| 153 | { "mv-rm-files", CONFIGSET_PROJ }, |
| 154 | { "ticket-table", CONFIGSET_TKT }, |
| 155 | { "ticket-common", CONFIGSET_TKT }, |
| 156 | { "ticket-change", CONFIGSET_TKT }, |
| 157 | { "ticket-newpage", CONFIGSET_TKT }, |
| 158 | { "ticket-viewpage", CONFIGSET_TKT }, |
| 159 |
M
src/db.c
+9
-11
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -1657,11 +1657,11 @@ | ||
| 1657 | 1657 | db_open_or_attach(zDbName, "localdb"); |
| 1658 | 1658 | |
| 1659 | 1659 | /* Check to see if the checkout database has the lastest schema changes. |
| 1660 | 1660 | ** The most recent schema change (2019-01-19) is the addition of the |
| 1661 | 1661 | ** vmerge.mhash and vfile.mhash fields. If the schema has the vmerge.mhash |
| 1662 | - ** column, assume everything else is up-to-date. | |
| 1662 | + ** column, assume everything else is up-to-date. | |
| 1663 | 1663 | */ |
| 1664 | 1664 | if( db_table_has_column("localdb","vmerge","mhash") ){ |
| 1665 | 1665 | return 1; /* This is a checkout database with the latest schema */ |
| 1666 | 1666 | } |
| 1667 | 1667 | |
| @@ -1888,11 +1888,11 @@ | ||
| 1888 | 1888 | "Bisect history and undo have been lost.\n" |
| 1889 | 1889 | ); |
| 1890 | 1890 | } |
| 1891 | 1891 | } |
| 1892 | 1892 | |
| 1893 | - /* Make sure the checkout database schema migration of 2019-01-20 | |
| 1893 | + /* Make sure the checkout database schema migration of 2019-01-20 | |
| 1894 | 1894 | ** has occurred. |
| 1895 | 1895 | ** |
| 1896 | 1896 | ** The 2019-01-19 migration is the addition of the vmerge.mhash and |
| 1897 | 1897 | ** vfile.mhash columns and making the vmerge.mhash column part of the |
| 1898 | 1898 | ** PRIMARY KEY for vmerge. |
| @@ -1905,11 +1905,11 @@ | ||
| 1905 | 1905 | " WHERE mrid!=rid;" |
| 1906 | 1906 | ); |
| 1907 | 1907 | if( !db_table_has_column("localdb", "vmerge", "mhash") ){ |
| 1908 | 1908 | db_exec_sql("ALTER TABLE vmerge RENAME TO old_vmerge;"); |
| 1909 | 1909 | db_exec_sql(zLocalSchemaVmerge); |
| 1910 | - db_exec_sql( | |
| 1910 | + db_exec_sql( | |
| 1911 | 1911 | "INSERT OR IGNORE INTO vmerge(id,merge,mhash)" |
| 1912 | 1912 | " SELECT id, merge, blob.uuid FROM old_vmerge, blob" |
| 1913 | 1913 | " WHERE old_vmerge.merge=blob.rid;" |
| 1914 | 1914 | "DROP TABLE old_vmerge;" |
| 1915 | 1915 | ); |
| @@ -1928,11 +1928,11 @@ | ||
| 1928 | 1928 | */ |
| 1929 | 1929 | int db_repository_has_changed(void){ |
| 1930 | 1930 | unsigned int v; |
| 1931 | 1931 | if( !g.repositoryOpen ) return 0; |
| 1932 | 1932 | sqlite3_file_control(g.db, "repository", SQLITE_FCNTL_DATA_VERSION, &v); |
| 1933 | - return g.iRepoDataVers != v; | |
| 1933 | + return g.iRepoDataVers != v; | |
| 1934 | 1934 | } |
| 1935 | 1935 | |
| 1936 | 1936 | /* |
| 1937 | 1937 | ** Flags for the db_find_and_open_repository() function. |
| 1938 | 1938 | */ |
| @@ -3571,11 +3571,11 @@ | ||
| 3571 | 3571 | ** (c) "fossil http" with the --localauth option |
| 3572 | 3572 | ** (d) CGI with the "localauth" setting in the cgi script. |
| 3573 | 3573 | ** |
| 3574 | 3574 | ** For maximum security, set "localauth" to 1. However, because |
| 3575 | 3575 | ** of the other restrictions (2) through (4), it should be safe |
| 3576 | -** to leave "localauth" set to 0 in most installations, and | |
| 3576 | +** to leave "localauth" set to 0 in most installations, and | |
| 3577 | 3577 | ** especially on cloned repositories on workstations. Leaving |
| 3578 | 3578 | ** "localauth" at 0 makes the "fossil ui" command more convenient |
| 3579 | 3579 | ** to use. |
| 3580 | 3580 | */ |
| 3581 | 3581 | /* |
| @@ -3634,19 +3634,17 @@ | ||
| 3634 | 3634 | ** Use file modification times (mtimes) to detect when |
| 3635 | 3635 | ** files have been modified. If disabled, all managed files |
| 3636 | 3636 | ** are hashed to detect changes, which can be slow for large |
| 3637 | 3637 | ** projects. |
| 3638 | 3638 | */ |
| 3639 | -#if FOSSIL_ENABLE_LEGACY_MV_RM | |
| 3640 | 3639 | /* |
| 3641 | 3640 | ** SETTING: mv-rm-files boolean default=off |
| 3642 | 3641 | ** If enabled, the "mv" and "rename" commands will also move |
| 3643 | 3642 | ** the associated files within the checkout -AND- the "rm" |
| 3644 | 3643 | ** and "delete" commands will also remove the associated |
| 3645 | 3644 | ** files from within the checkout. |
| 3646 | 3645 | */ |
| 3647 | -#endif | |
| 3648 | 3646 | /* |
| 3649 | 3647 | ** SETTING: pgp-command width=40 |
| 3650 | 3648 | ** Command used to clear-sign manifests at check-in. |
| 3651 | 3649 | ** Default value is "gpg --clearsign -o" |
| 3652 | 3650 | */ |
| @@ -4154,11 +4152,11 @@ | ||
| 4154 | 4152 | ** the remaining fields of the RCVFROM table entry. MD5 is used for this |
| 4155 | 4153 | ** because it is 4x faster than SHA3 and 5x faster than SHA1, and there |
| 4156 | 4154 | ** are no security concerns - this is just a checksum, not a security |
| 4157 | 4155 | ** token. |
| 4158 | 4156 | */ |
| 4159 | -char *db_fingerprint(int rcvid, int iVersion){ | |
| 4157 | +char *db_fingerprint(int rcvid, int iVersion){ | |
| 4160 | 4158 | char *z = 0; |
| 4161 | 4159 | Blob sql = BLOB_INITIALIZER; |
| 4162 | 4160 | Stmt q; |
| 4163 | 4161 | if( iVersion==0 ){ |
| 4164 | 4162 | /* The original fingerprint algorithm used "quote(mtime)". But this |
| @@ -4210,18 +4208,18 @@ | ||
| 4210 | 4208 | db_find_and_open_repository(OPEN_ANY_SCHEMA,0); |
| 4211 | 4209 | if( g.argc==3 ){ |
| 4212 | 4210 | rcvid = atoi(g.argv[2]); |
| 4213 | 4211 | }else if( g.argc!=2 ){ |
| 4214 | 4212 | fossil_fatal("wrong number of arguments"); |
| 4215 | - } | |
| 4213 | + } | |
| 4216 | 4214 | fossil_print("legacy: %z\n", db_fingerprint(rcvid, 0)); |
| 4217 | 4215 | fossil_print("version-1: %z\n", db_fingerprint(rcvid, 1)); |
| 4218 | 4216 | if( g.localOpen ){ |
| 4219 | 4217 | fossil_print("localdb: %z\n", db_lget("fingerprint","(none)")); |
| 4220 | 4218 | fossil_print("db_fingerprint_ok(): %d\n", db_fingerprint_ok()); |
| 4221 | 4219 | } |
| 4222 | - fossil_print("Fossil version: %s - %.10s %.19s\n", | |
| 4220 | + fossil_print("Fossil version: %s - %.10s %.19s\n", | |
| 4223 | 4221 | RELEASE_VERSION, MANIFEST_DATE, MANIFEST_UUID); |
| 4224 | 4222 | } |
| 4225 | 4223 | |
| 4226 | 4224 | /* |
| 4227 | 4225 | ** Set the value of the "checkout" entry in the VVAR table. |
| @@ -4269,9 +4267,9 @@ | ||
| 4269 | 4267 | ** algorithm */ |
| 4270 | 4268 | if( !rc ){ |
| 4271 | 4269 | zRepo = db_fingerprint(atoi(zCkout), 0); |
| 4272 | 4270 | rc = fossil_strcmp(zCkout,zRepo)==0; |
| 4273 | 4271 | fossil_free(zRepo); |
| 4274 | - } | |
| 4272 | + } | |
| 4275 | 4273 | fossil_free(zCkout); |
| 4276 | 4274 | return rc; |
| 4277 | 4275 | } |
| 4278 | 4276 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -1657,11 +1657,11 @@ | |
| 1657 | db_open_or_attach(zDbName, "localdb"); |
| 1658 | |
| 1659 | /* Check to see if the checkout database has the lastest schema changes. |
| 1660 | ** The most recent schema change (2019-01-19) is the addition of the |
| 1661 | ** vmerge.mhash and vfile.mhash fields. If the schema has the vmerge.mhash |
| 1662 | ** column, assume everything else is up-to-date. |
| 1663 | */ |
| 1664 | if( db_table_has_column("localdb","vmerge","mhash") ){ |
| 1665 | return 1; /* This is a checkout database with the latest schema */ |
| 1666 | } |
| 1667 | |
| @@ -1888,11 +1888,11 @@ | |
| 1888 | "Bisect history and undo have been lost.\n" |
| 1889 | ); |
| 1890 | } |
| 1891 | } |
| 1892 | |
| 1893 | /* Make sure the checkout database schema migration of 2019-01-20 |
| 1894 | ** has occurred. |
| 1895 | ** |
| 1896 | ** The 2019-01-19 migration is the addition of the vmerge.mhash and |
| 1897 | ** vfile.mhash columns and making the vmerge.mhash column part of the |
| 1898 | ** PRIMARY KEY for vmerge. |
| @@ -1905,11 +1905,11 @@ | |
| 1905 | " WHERE mrid!=rid;" |
| 1906 | ); |
| 1907 | if( !db_table_has_column("localdb", "vmerge", "mhash") ){ |
| 1908 | db_exec_sql("ALTER TABLE vmerge RENAME TO old_vmerge;"); |
| 1909 | db_exec_sql(zLocalSchemaVmerge); |
| 1910 | db_exec_sql( |
| 1911 | "INSERT OR IGNORE INTO vmerge(id,merge,mhash)" |
| 1912 | " SELECT id, merge, blob.uuid FROM old_vmerge, blob" |
| 1913 | " WHERE old_vmerge.merge=blob.rid;" |
| 1914 | "DROP TABLE old_vmerge;" |
| 1915 | ); |
| @@ -1928,11 +1928,11 @@ | |
| 1928 | */ |
| 1929 | int db_repository_has_changed(void){ |
| 1930 | unsigned int v; |
| 1931 | if( !g.repositoryOpen ) return 0; |
| 1932 | sqlite3_file_control(g.db, "repository", SQLITE_FCNTL_DATA_VERSION, &v); |
| 1933 | return g.iRepoDataVers != v; |
| 1934 | } |
| 1935 | |
| 1936 | /* |
| 1937 | ** Flags for the db_find_and_open_repository() function. |
| 1938 | */ |
| @@ -3571,11 +3571,11 @@ | |
| 3571 | ** (c) "fossil http" with the --localauth option |
| 3572 | ** (d) CGI with the "localauth" setting in the cgi script. |
| 3573 | ** |
| 3574 | ** For maximum security, set "localauth" to 1. However, because |
| 3575 | ** of the other restrictions (2) through (4), it should be safe |
| 3576 | ** to leave "localauth" set to 0 in most installations, and |
| 3577 | ** especially on cloned repositories on workstations. Leaving |
| 3578 | ** "localauth" at 0 makes the "fossil ui" command more convenient |
| 3579 | ** to use. |
| 3580 | */ |
| 3581 | /* |
| @@ -3634,19 +3634,17 @@ | |
| 3634 | ** Use file modification times (mtimes) to detect when |
| 3635 | ** files have been modified. If disabled, all managed files |
| 3636 | ** are hashed to detect changes, which can be slow for large |
| 3637 | ** projects. |
| 3638 | */ |
| 3639 | #if FOSSIL_ENABLE_LEGACY_MV_RM |
| 3640 | /* |
| 3641 | ** SETTING: mv-rm-files boolean default=off |
| 3642 | ** If enabled, the "mv" and "rename" commands will also move |
| 3643 | ** the associated files within the checkout -AND- the "rm" |
| 3644 | ** and "delete" commands will also remove the associated |
| 3645 | ** files from within the checkout. |
| 3646 | */ |
| 3647 | #endif |
| 3648 | /* |
| 3649 | ** SETTING: pgp-command width=40 |
| 3650 | ** Command used to clear-sign manifests at check-in. |
| 3651 | ** Default value is "gpg --clearsign -o" |
| 3652 | */ |
| @@ -4154,11 +4152,11 @@ | |
| 4154 | ** the remaining fields of the RCVFROM table entry. MD5 is used for this |
| 4155 | ** because it is 4x faster than SHA3 and 5x faster than SHA1, and there |
| 4156 | ** are no security concerns - this is just a checksum, not a security |
| 4157 | ** token. |
| 4158 | */ |
| 4159 | char *db_fingerprint(int rcvid, int iVersion){ |
| 4160 | char *z = 0; |
| 4161 | Blob sql = BLOB_INITIALIZER; |
| 4162 | Stmt q; |
| 4163 | if( iVersion==0 ){ |
| 4164 | /* The original fingerprint algorithm used "quote(mtime)". But this |
| @@ -4210,18 +4208,18 @@ | |
| 4210 | db_find_and_open_repository(OPEN_ANY_SCHEMA,0); |
| 4211 | if( g.argc==3 ){ |
| 4212 | rcvid = atoi(g.argv[2]); |
| 4213 | }else if( g.argc!=2 ){ |
| 4214 | fossil_fatal("wrong number of arguments"); |
| 4215 | } |
| 4216 | fossil_print("legacy: %z\n", db_fingerprint(rcvid, 0)); |
| 4217 | fossil_print("version-1: %z\n", db_fingerprint(rcvid, 1)); |
| 4218 | if( g.localOpen ){ |
| 4219 | fossil_print("localdb: %z\n", db_lget("fingerprint","(none)")); |
| 4220 | fossil_print("db_fingerprint_ok(): %d\n", db_fingerprint_ok()); |
| 4221 | } |
| 4222 | fossil_print("Fossil version: %s - %.10s %.19s\n", |
| 4223 | RELEASE_VERSION, MANIFEST_DATE, MANIFEST_UUID); |
| 4224 | } |
| 4225 | |
| 4226 | /* |
| 4227 | ** Set the value of the "checkout" entry in the VVAR table. |
| @@ -4269,9 +4267,9 @@ | |
| 4269 | ** algorithm */ |
| 4270 | if( !rc ){ |
| 4271 | zRepo = db_fingerprint(atoi(zCkout), 0); |
| 4272 | rc = fossil_strcmp(zCkout,zRepo)==0; |
| 4273 | fossil_free(zRepo); |
| 4274 | } |
| 4275 | fossil_free(zCkout); |
| 4276 | return rc; |
| 4277 | } |
| 4278 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -1657,11 +1657,11 @@ | |
| 1657 | db_open_or_attach(zDbName, "localdb"); |
| 1658 | |
| 1659 | /* Check to see if the checkout database has the lastest schema changes. |
| 1660 | ** The most recent schema change (2019-01-19) is the addition of the |
| 1661 | ** vmerge.mhash and vfile.mhash fields. If the schema has the vmerge.mhash |
| 1662 | ** column, assume everything else is up-to-date. |
| 1663 | */ |
| 1664 | if( db_table_has_column("localdb","vmerge","mhash") ){ |
| 1665 | return 1; /* This is a checkout database with the latest schema */ |
| 1666 | } |
| 1667 | |
| @@ -1888,11 +1888,11 @@ | |
| 1888 | "Bisect history and undo have been lost.\n" |
| 1889 | ); |
| 1890 | } |
| 1891 | } |
| 1892 | |
| 1893 | /* Make sure the checkout database schema migration of 2019-01-20 |
| 1894 | ** has occurred. |
| 1895 | ** |
| 1896 | ** The 2019-01-19 migration is the addition of the vmerge.mhash and |
| 1897 | ** vfile.mhash columns and making the vmerge.mhash column part of the |
| 1898 | ** PRIMARY KEY for vmerge. |
| @@ -1905,11 +1905,11 @@ | |
| 1905 | " WHERE mrid!=rid;" |
| 1906 | ); |
| 1907 | if( !db_table_has_column("localdb", "vmerge", "mhash") ){ |
| 1908 | db_exec_sql("ALTER TABLE vmerge RENAME TO old_vmerge;"); |
| 1909 | db_exec_sql(zLocalSchemaVmerge); |
| 1910 | db_exec_sql( |
| 1911 | "INSERT OR IGNORE INTO vmerge(id,merge,mhash)" |
| 1912 | " SELECT id, merge, blob.uuid FROM old_vmerge, blob" |
| 1913 | " WHERE old_vmerge.merge=blob.rid;" |
| 1914 | "DROP TABLE old_vmerge;" |
| 1915 | ); |
| @@ -1928,11 +1928,11 @@ | |
| 1928 | */ |
| 1929 | int db_repository_has_changed(void){ |
| 1930 | unsigned int v; |
| 1931 | if( !g.repositoryOpen ) return 0; |
| 1932 | sqlite3_file_control(g.db, "repository", SQLITE_FCNTL_DATA_VERSION, &v); |
| 1933 | return g.iRepoDataVers != v; |
| 1934 | } |
| 1935 | |
| 1936 | /* |
| 1937 | ** Flags for the db_find_and_open_repository() function. |
| 1938 | */ |
| @@ -3571,11 +3571,11 @@ | |
| 3571 | ** (c) "fossil http" with the --localauth option |
| 3572 | ** (d) CGI with the "localauth" setting in the cgi script. |
| 3573 | ** |
| 3574 | ** For maximum security, set "localauth" to 1. However, because |
| 3575 | ** of the other restrictions (2) through (4), it should be safe |
| 3576 | ** to leave "localauth" set to 0 in most installations, and |
| 3577 | ** especially on cloned repositories on workstations. Leaving |
| 3578 | ** "localauth" at 0 makes the "fossil ui" command more convenient |
| 3579 | ** to use. |
| 3580 | */ |
| 3581 | /* |
| @@ -3634,19 +3634,17 @@ | |
| 3634 | ** Use file modification times (mtimes) to detect when |
| 3635 | ** files have been modified. If disabled, all managed files |
| 3636 | ** are hashed to detect changes, which can be slow for large |
| 3637 | ** projects. |
| 3638 | */ |
| 3639 | /* |
| 3640 | ** SETTING: mv-rm-files boolean default=off |
| 3641 | ** If enabled, the "mv" and "rename" commands will also move |
| 3642 | ** the associated files within the checkout -AND- the "rm" |
| 3643 | ** and "delete" commands will also remove the associated |
| 3644 | ** files from within the checkout. |
| 3645 | */ |
| 3646 | /* |
| 3647 | ** SETTING: pgp-command width=40 |
| 3648 | ** Command used to clear-sign manifests at check-in. |
| 3649 | ** Default value is "gpg --clearsign -o" |
| 3650 | */ |
| @@ -4154,11 +4152,11 @@ | |
| 4152 | ** the remaining fields of the RCVFROM table entry. MD5 is used for this |
| 4153 | ** because it is 4x faster than SHA3 and 5x faster than SHA1, and there |
| 4154 | ** are no security concerns - this is just a checksum, not a security |
| 4155 | ** token. |
| 4156 | */ |
| 4157 | char *db_fingerprint(int rcvid, int iVersion){ |
| 4158 | char *z = 0; |
| 4159 | Blob sql = BLOB_INITIALIZER; |
| 4160 | Stmt q; |
| 4161 | if( iVersion==0 ){ |
| 4162 | /* The original fingerprint algorithm used "quote(mtime)". But this |
| @@ -4210,18 +4208,18 @@ | |
| 4208 | db_find_and_open_repository(OPEN_ANY_SCHEMA,0); |
| 4209 | if( g.argc==3 ){ |
| 4210 | rcvid = atoi(g.argv[2]); |
| 4211 | }else if( g.argc!=2 ){ |
| 4212 | fossil_fatal("wrong number of arguments"); |
| 4213 | } |
| 4214 | fossil_print("legacy: %z\n", db_fingerprint(rcvid, 0)); |
| 4215 | fossil_print("version-1: %z\n", db_fingerprint(rcvid, 1)); |
| 4216 | if( g.localOpen ){ |
| 4217 | fossil_print("localdb: %z\n", db_lget("fingerprint","(none)")); |
| 4218 | fossil_print("db_fingerprint_ok(): %d\n", db_fingerprint_ok()); |
| 4219 | } |
| 4220 | fossil_print("Fossil version: %s - %.10s %.19s\n", |
| 4221 | RELEASE_VERSION, MANIFEST_DATE, MANIFEST_UUID); |
| 4222 | } |
| 4223 | |
| 4224 | /* |
| 4225 | ** Set the value of the "checkout" entry in the VVAR table. |
| @@ -4269,9 +4267,9 @@ | |
| 4267 | ** algorithm */ |
| 4268 | if( !rc ){ |
| 4269 | zRepo = db_fingerprint(atoi(zCkout), 0); |
| 4270 | rc = fossil_strcmp(zCkout,zRepo)==0; |
| 4271 | fossil_free(zRepo); |
| 4272 | } |
| 4273 | fossil_free(zCkout); |
| 4274 | return rc; |
| 4275 | } |
| 4276 |
+19
-2
| --- src/default.css | ||
| +++ src/default.css | ||
| @@ -764,20 +764,37 @@ | ||
| 764 | 764 | border: 1px solid black; |
| 765 | 765 | padding-left: 1ex; |
| 766 | 766 | padding-right: 1ex; |
| 767 | 767 | margin-top: 1ex; |
| 768 | 768 | } |
| 769 | -div.forumPostBody { | |
| 770 | - max-height: 40em; | |
| 769 | +div.forumHier, div.forumTime, div.forumHierRoot { | |
| 770 | + display: flex; | |
| 771 | + flex-direction: column; | |
| 772 | +} | |
| 773 | +div.forumHier > div > form, | |
| 774 | +div.forumTime > div > form, | |
| 775 | +div.forumHierRoot > div > form { | |
| 776 | + margin: 0.5em 0; | |
| 777 | +} | |
| 778 | +button.forum-post-collapser { | |
| 779 | + align-self: flex-start; | |
| 780 | + margin-top: 0.1em; | |
| 781 | +} | |
| 782 | +div.forumPostBody{ | |
| 783 | + max-height: 50em; | |
| 771 | 784 | overflow: auto; |
| 785 | +} | |
| 786 | +div.forumPostBody.expanded { | |
| 787 | + max-height: initial; | |
| 772 | 788 | } |
| 773 | 789 | div.forumSel { |
| 774 | 790 | background-color: #cef; |
| 775 | 791 | } |
| 776 | 792 | div.forumObs { |
| 777 | 793 | color: #bbb; |
| 778 | 794 | } |
| 795 | + | |
| 779 | 796 | #capabilitySummary { |
| 780 | 797 | text-align: center; |
| 781 | 798 | } |
| 782 | 799 | #capabilitySummary td { |
| 783 | 800 | padding-left: 3ex; |
| 784 | 801 |
| --- src/default.css | |
| +++ src/default.css | |
| @@ -764,20 +764,37 @@ | |
| 764 | border: 1px solid black; |
| 765 | padding-left: 1ex; |
| 766 | padding-right: 1ex; |
| 767 | margin-top: 1ex; |
| 768 | } |
| 769 | div.forumPostBody { |
| 770 | max-height: 40em; |
| 771 | overflow: auto; |
| 772 | } |
| 773 | div.forumSel { |
| 774 | background-color: #cef; |
| 775 | } |
| 776 | div.forumObs { |
| 777 | color: #bbb; |
| 778 | } |
| 779 | #capabilitySummary { |
| 780 | text-align: center; |
| 781 | } |
| 782 | #capabilitySummary td { |
| 783 | padding-left: 3ex; |
| 784 |
| --- src/default.css | |
| +++ src/default.css | |
| @@ -764,20 +764,37 @@ | |
| 764 | border: 1px solid black; |
| 765 | padding-left: 1ex; |
| 766 | padding-right: 1ex; |
| 767 | margin-top: 1ex; |
| 768 | } |
| 769 | div.forumHier, div.forumTime, div.forumHierRoot { |
| 770 | display: flex; |
| 771 | flex-direction: column; |
| 772 | } |
| 773 | div.forumHier > div > form, |
| 774 | div.forumTime > div > form, |
| 775 | div.forumHierRoot > div > form { |
| 776 | margin: 0.5em 0; |
| 777 | } |
| 778 | button.forum-post-collapser { |
| 779 | align-self: flex-start; |
| 780 | margin-top: 0.1em; |
| 781 | } |
| 782 | div.forumPostBody{ |
| 783 | max-height: 50em; |
| 784 | overflow: auto; |
| 785 | } |
| 786 | div.forumPostBody.expanded { |
| 787 | max-height: initial; |
| 788 | } |
| 789 | div.forumSel { |
| 790 | background-color: #cef; |
| 791 | } |
| 792 | div.forumObs { |
| 793 | color: #bbb; |
| 794 | } |
| 795 | |
| 796 | #capabilitySummary { |
| 797 | text-align: center; |
| 798 | } |
| 799 | #capabilitySummary td { |
| 800 | padding-left: 3ex; |
| 801 |
+25
-8
| --- src/forum.c | ||
| +++ src/forum.c | ||
| @@ -402,11 +402,10 @@ | ||
| 402 | 402 | } |
| 403 | 403 | db_reset(&q); |
| 404 | 404 | return zResult; |
| 405 | 405 | } |
| 406 | 406 | |
| 407 | - | |
| 408 | 407 | /* |
| 409 | 408 | ** Display all posts in a forum thread in chronological order |
| 410 | 409 | */ |
| 411 | 410 | static void forum_display_chronological(int froot, int target, int bRawMode){ |
| 412 | 411 | ForumThread *pThread = forumthread_create(froot, 0); |
| @@ -485,11 +484,11 @@ | ||
| 485 | 484 | forum_render(0, zMimetype, pPost->zWiki, 0, 1); |
| 486 | 485 | } |
| 487 | 486 | if( g.perm.WrForum && p->pLeaf==0 ){ |
| 488 | 487 | int sameUser = login_is_individual() |
| 489 | 488 | && fossil_strcmp(pPost->zUser, g.zLogin)==0; |
| 490 | - @ <p><form action="%R/forumedit" method="POST"> | |
| 489 | + @ <div><form action="%R/forumedit" method="POST"> | |
| 491 | 490 | @ <input type="hidden" name="fpid" value="%s(p->zUuid)"> |
| 492 | 491 | if( !isPrivate ){ |
| 493 | 492 | /* Reply and Edit are only available if the post has already |
| 494 | 493 | ** been approved */ |
| 495 | 494 | @ <input type="submit" name="reply" value="Reply"> |
| @@ -506,11 +505,11 @@ | ||
| 506 | 505 | }else if( sameUser ){ |
| 507 | 506 | /* A post that is pending moderation can be deleted by the |
| 508 | 507 | ** person who originally submitted the post */ |
| 509 | 508 | @ <input type="submit" name="reject" value="Delete"> |
| 510 | 509 | } |
| 511 | - @ </form></p> | |
| 510 | + @ </form></div> | |
| 512 | 511 | } |
| 513 | 512 | manifest_destroy(pPost); |
| 514 | 513 | @ </div> |
| 515 | 514 | } |
| 516 | 515 | |
| @@ -593,11 +592,11 @@ | ||
| 593 | 592 | 0, 1); |
| 594 | 593 | } |
| 595 | 594 | if( g.perm.WrForum && p->pLeaf==0 ){ |
| 596 | 595 | int sameUser = login_is_individual() |
| 597 | 596 | && fossil_strcmp(pPost->zUser, g.zLogin)==0; |
| 598 | - @ <p><form action="%R/forumedit" method="POST"> | |
| 597 | + @ <div><form action="%R/forumedit" method="POST"> | |
| 599 | 598 | @ <input type="hidden" name="fpid" value="%s(p->zUuid)"> |
| 600 | 599 | if( !isPrivate ){ |
| 601 | 600 | /* Reply and Edit are only available if the post has already |
| 602 | 601 | ** been approved */ |
| 603 | 602 | @ <input type="submit" name="reply" value="Reply"> |
| @@ -614,11 +613,11 @@ | ||
| 614 | 613 | }else if( sameUser ){ |
| 615 | 614 | /* A post that is pending moderation can be deleted by the |
| 616 | 615 | ** person who originally submitted the post */ |
| 617 | 616 | @ <input type="submit" name="reject" value="Delete"> |
| 618 | 617 | } |
| 619 | - @ </form></p> | |
| 618 | + @ </form></div> | |
| 620 | 619 | } |
| 621 | 620 | manifest_destroy(pPost); |
| 622 | 621 | @ </div> |
| 623 | 622 | } |
| 624 | 623 | forumthread_delete(pThread); |
| @@ -719,11 +718,11 @@ | ||
| 719 | 718 | @ <p><span class="modpending">Awaiting Moderator Approval</span></p> |
| 720 | 719 | }else{ |
| 721 | 720 | forum_render(0, pPost->zMimetype, pPost->zWiki, 0, 1); |
| 722 | 721 | } |
| 723 | 722 | if( g.perm.WrForum ){ |
| 724 | - @ <p><form action="%R/forumedit" method="POST"> | |
| 723 | + @ <div><form action="%R/forumedit" method="POST"> | |
| 725 | 724 | @ <input type="hidden" name="fpid" value="%s(zUuid)"> |
| 726 | 725 | if( !isPrivate ){ |
| 727 | 726 | /* Reply and Edit are only available if the post has already |
| 728 | 727 | ** been approved */ |
| 729 | 728 | @ <input type="submit" name="reply" value="Reply"> |
| @@ -740,18 +739,36 @@ | ||
| 740 | 739 | }else if( sameUser ){ |
| 741 | 740 | /* A post that is pending moderation can be deleted by the |
| 742 | 741 | ** person who originally submitted the post */ |
| 743 | 742 | @ <input type="submit" name="reject" value="Delete"> |
| 744 | 743 | } |
| 745 | - @ </form></p> | |
| 744 | + @ </form></div> | |
| 746 | 745 | } |
| 747 | 746 | manifest_destroy(pPost); |
| 748 | 747 | @ </div> |
| 749 | 748 | } |
| 750 | 749 | forumthread_delete(pThread); |
| 751 | 750 | return target; |
| 752 | 751 | } |
| 752 | + | |
| 753 | +/* | |
| 754 | +** The first time this is called, it emits SCRIPT tags to load various | |
| 755 | +** forum-related JavaScript. Ideally it should be called near the end | |
| 756 | +** of the page, immediately before the call to style_footer() (which | |
| 757 | +** closes the document's <BODY> and <HTML> tags). Calls after the first | |
| 758 | +** are a no-op. | |
| 759 | +*/ | |
| 760 | +static void forum_emit_page_js(){ | |
| 761 | + static int once = 0; | |
| 762 | + if(0==once){ | |
| 763 | + once = 1; | |
| 764 | + style_load_js("forum.js"); | |
| 765 | + style_emit_script_fossil_bootstrap(0); | |
| 766 | + style_emit_script_dom(0); | |
| 767 | + style_emit_script_builtin(0, "fossil.page.forumpost.js"); | |
| 768 | + } | |
| 769 | +} | |
| 753 | 770 | |
| 754 | 771 | /* |
| 755 | 772 | ** WEBPAGE: forumpost |
| 756 | 773 | ** |
| 757 | 774 | ** Show a single forum posting. The posting is shown in context with |
| @@ -877,11 +894,11 @@ | ||
| 877 | 894 | }else{ |
| 878 | 895 | style_submenu_element("Chronological", "%R/%s/%s?t=c", g.zPath, zName); |
| 879 | 896 | style_submenu_element("Unformatted", "%R/%s/%s?t=r", g.zPath, zName); |
| 880 | 897 | forum_display_hierarchical(froot, fpid); |
| 881 | 898 | } |
| 882 | - style_load_js("forum.js"); | |
| 899 | + forum_emit_page_js(); | |
| 883 | 900 | style_footer(); |
| 884 | 901 | } |
| 885 | 902 | |
| 886 | 903 | /* |
| 887 | 904 | ** Return true if a forum post should be moderated. |
| 888 | 905 |
| --- src/forum.c | |
| +++ src/forum.c | |
| @@ -402,11 +402,10 @@ | |
| 402 | } |
| 403 | db_reset(&q); |
| 404 | return zResult; |
| 405 | } |
| 406 | |
| 407 | |
| 408 | /* |
| 409 | ** Display all posts in a forum thread in chronological order |
| 410 | */ |
| 411 | static void forum_display_chronological(int froot, int target, int bRawMode){ |
| 412 | ForumThread *pThread = forumthread_create(froot, 0); |
| @@ -485,11 +484,11 @@ | |
| 485 | forum_render(0, zMimetype, pPost->zWiki, 0, 1); |
| 486 | } |
| 487 | if( g.perm.WrForum && p->pLeaf==0 ){ |
| 488 | int sameUser = login_is_individual() |
| 489 | && fossil_strcmp(pPost->zUser, g.zLogin)==0; |
| 490 | @ <p><form action="%R/forumedit" method="POST"> |
| 491 | @ <input type="hidden" name="fpid" value="%s(p->zUuid)"> |
| 492 | if( !isPrivate ){ |
| 493 | /* Reply and Edit are only available if the post has already |
| 494 | ** been approved */ |
| 495 | @ <input type="submit" name="reply" value="Reply"> |
| @@ -506,11 +505,11 @@ | |
| 506 | }else if( sameUser ){ |
| 507 | /* A post that is pending moderation can be deleted by the |
| 508 | ** person who originally submitted the post */ |
| 509 | @ <input type="submit" name="reject" value="Delete"> |
| 510 | } |
| 511 | @ </form></p> |
| 512 | } |
| 513 | manifest_destroy(pPost); |
| 514 | @ </div> |
| 515 | } |
| 516 | |
| @@ -593,11 +592,11 @@ | |
| 593 | 0, 1); |
| 594 | } |
| 595 | if( g.perm.WrForum && p->pLeaf==0 ){ |
| 596 | int sameUser = login_is_individual() |
| 597 | && fossil_strcmp(pPost->zUser, g.zLogin)==0; |
| 598 | @ <p><form action="%R/forumedit" method="POST"> |
| 599 | @ <input type="hidden" name="fpid" value="%s(p->zUuid)"> |
| 600 | if( !isPrivate ){ |
| 601 | /* Reply and Edit are only available if the post has already |
| 602 | ** been approved */ |
| 603 | @ <input type="submit" name="reply" value="Reply"> |
| @@ -614,11 +613,11 @@ | |
| 614 | }else if( sameUser ){ |
| 615 | /* A post that is pending moderation can be deleted by the |
| 616 | ** person who originally submitted the post */ |
| 617 | @ <input type="submit" name="reject" value="Delete"> |
| 618 | } |
| 619 | @ </form></p> |
| 620 | } |
| 621 | manifest_destroy(pPost); |
| 622 | @ </div> |
| 623 | } |
| 624 | forumthread_delete(pThread); |
| @@ -719,11 +718,11 @@ | |
| 719 | @ <p><span class="modpending">Awaiting Moderator Approval</span></p> |
| 720 | }else{ |
| 721 | forum_render(0, pPost->zMimetype, pPost->zWiki, 0, 1); |
| 722 | } |
| 723 | if( g.perm.WrForum ){ |
| 724 | @ <p><form action="%R/forumedit" method="POST"> |
| 725 | @ <input type="hidden" name="fpid" value="%s(zUuid)"> |
| 726 | if( !isPrivate ){ |
| 727 | /* Reply and Edit are only available if the post has already |
| 728 | ** been approved */ |
| 729 | @ <input type="submit" name="reply" value="Reply"> |
| @@ -740,18 +739,36 @@ | |
| 740 | }else if( sameUser ){ |
| 741 | /* A post that is pending moderation can be deleted by the |
| 742 | ** person who originally submitted the post */ |
| 743 | @ <input type="submit" name="reject" value="Delete"> |
| 744 | } |
| 745 | @ </form></p> |
| 746 | } |
| 747 | manifest_destroy(pPost); |
| 748 | @ </div> |
| 749 | } |
| 750 | forumthread_delete(pThread); |
| 751 | return target; |
| 752 | } |
| 753 | |
| 754 | /* |
| 755 | ** WEBPAGE: forumpost |
| 756 | ** |
| 757 | ** Show a single forum posting. The posting is shown in context with |
| @@ -877,11 +894,11 @@ | |
| 877 | }else{ |
| 878 | style_submenu_element("Chronological", "%R/%s/%s?t=c", g.zPath, zName); |
| 879 | style_submenu_element("Unformatted", "%R/%s/%s?t=r", g.zPath, zName); |
| 880 | forum_display_hierarchical(froot, fpid); |
| 881 | } |
| 882 | style_load_js("forum.js"); |
| 883 | style_footer(); |
| 884 | } |
| 885 | |
| 886 | /* |
| 887 | ** Return true if a forum post should be moderated. |
| 888 |
| --- src/forum.c | |
| +++ src/forum.c | |
| @@ -402,11 +402,10 @@ | |
| 402 | } |
| 403 | db_reset(&q); |
| 404 | return zResult; |
| 405 | } |
| 406 | |
| 407 | /* |
| 408 | ** Display all posts in a forum thread in chronological order |
| 409 | */ |
| 410 | static void forum_display_chronological(int froot, int target, int bRawMode){ |
| 411 | ForumThread *pThread = forumthread_create(froot, 0); |
| @@ -485,11 +484,11 @@ | |
| 484 | forum_render(0, zMimetype, pPost->zWiki, 0, 1); |
| 485 | } |
| 486 | if( g.perm.WrForum && p->pLeaf==0 ){ |
| 487 | int sameUser = login_is_individual() |
| 488 | && fossil_strcmp(pPost->zUser, g.zLogin)==0; |
| 489 | @ <div><form action="%R/forumedit" method="POST"> |
| 490 | @ <input type="hidden" name="fpid" value="%s(p->zUuid)"> |
| 491 | if( !isPrivate ){ |
| 492 | /* Reply and Edit are only available if the post has already |
| 493 | ** been approved */ |
| 494 | @ <input type="submit" name="reply" value="Reply"> |
| @@ -506,11 +505,11 @@ | |
| 505 | }else if( sameUser ){ |
| 506 | /* A post that is pending moderation can be deleted by the |
| 507 | ** person who originally submitted the post */ |
| 508 | @ <input type="submit" name="reject" value="Delete"> |
| 509 | } |
| 510 | @ </form></div> |
| 511 | } |
| 512 | manifest_destroy(pPost); |
| 513 | @ </div> |
| 514 | } |
| 515 | |
| @@ -593,11 +592,11 @@ | |
| 592 | 0, 1); |
| 593 | } |
| 594 | if( g.perm.WrForum && p->pLeaf==0 ){ |
| 595 | int sameUser = login_is_individual() |
| 596 | && fossil_strcmp(pPost->zUser, g.zLogin)==0; |
| 597 | @ <div><form action="%R/forumedit" method="POST"> |
| 598 | @ <input type="hidden" name="fpid" value="%s(p->zUuid)"> |
| 599 | if( !isPrivate ){ |
| 600 | /* Reply and Edit are only available if the post has already |
| 601 | ** been approved */ |
| 602 | @ <input type="submit" name="reply" value="Reply"> |
| @@ -614,11 +613,11 @@ | |
| 613 | }else if( sameUser ){ |
| 614 | /* A post that is pending moderation can be deleted by the |
| 615 | ** person who originally submitted the post */ |
| 616 | @ <input type="submit" name="reject" value="Delete"> |
| 617 | } |
| 618 | @ </form></div> |
| 619 | } |
| 620 | manifest_destroy(pPost); |
| 621 | @ </div> |
| 622 | } |
| 623 | forumthread_delete(pThread); |
| @@ -719,11 +718,11 @@ | |
| 718 | @ <p><span class="modpending">Awaiting Moderator Approval</span></p> |
| 719 | }else{ |
| 720 | forum_render(0, pPost->zMimetype, pPost->zWiki, 0, 1); |
| 721 | } |
| 722 | if( g.perm.WrForum ){ |
| 723 | @ <div><form action="%R/forumedit" method="POST"> |
| 724 | @ <input type="hidden" name="fpid" value="%s(zUuid)"> |
| 725 | if( !isPrivate ){ |
| 726 | /* Reply and Edit are only available if the post has already |
| 727 | ** been approved */ |
| 728 | @ <input type="submit" name="reply" value="Reply"> |
| @@ -740,18 +739,36 @@ | |
| 739 | }else if( sameUser ){ |
| 740 | /* A post that is pending moderation can be deleted by the |
| 741 | ** person who originally submitted the post */ |
| 742 | @ <input type="submit" name="reject" value="Delete"> |
| 743 | } |
| 744 | @ </form></div> |
| 745 | } |
| 746 | manifest_destroy(pPost); |
| 747 | @ </div> |
| 748 | } |
| 749 | forumthread_delete(pThread); |
| 750 | return target; |
| 751 | } |
| 752 | |
| 753 | /* |
| 754 | ** The first time this is called, it emits SCRIPT tags to load various |
| 755 | ** forum-related JavaScript. Ideally it should be called near the end |
| 756 | ** of the page, immediately before the call to style_footer() (which |
| 757 | ** closes the document's <BODY> and <HTML> tags). Calls after the first |
| 758 | ** are a no-op. |
| 759 | */ |
| 760 | static void forum_emit_page_js(){ |
| 761 | static int once = 0; |
| 762 | if(0==once){ |
| 763 | once = 1; |
| 764 | style_load_js("forum.js"); |
| 765 | style_emit_script_fossil_bootstrap(0); |
| 766 | style_emit_script_dom(0); |
| 767 | style_emit_script_builtin(0, "fossil.page.forumpost.js"); |
| 768 | } |
| 769 | } |
| 770 | |
| 771 | /* |
| 772 | ** WEBPAGE: forumpost |
| 773 | ** |
| 774 | ** Show a single forum posting. The posting is shown in context with |
| @@ -877,11 +894,11 @@ | |
| 894 | }else{ |
| 895 | style_submenu_element("Chronological", "%R/%s/%s?t=c", g.zPath, zName); |
| 896 | style_submenu_element("Unformatted", "%R/%s/%s?t=r", g.zPath, zName); |
| 897 | forum_display_hierarchical(froot, fpid); |
| 898 | } |
| 899 | forum_emit_page_js(); |
| 900 | style_footer(); |
| 901 | } |
| 902 | |
| 903 | /* |
| 904 | ** Return true if a forum post should be moderated. |
| 905 |
+1
| --- src/fossil.dom.js | ||
| +++ src/fossil.dom.js | ||
| @@ -72,10 +72,11 @@ | ||
| 72 | 72 | dom.footer = dom.createElemFactory('footer'); |
| 73 | 73 | dom.section = dom.createElemFactory('section'); |
| 74 | 74 | dom.span = dom.createElemFactory('span'); |
| 75 | 75 | dom.strong = dom.createElemFactory('strong'); |
| 76 | 76 | dom.em = dom.createElemFactory('em'); |
| 77 | + dom.label = dom.createElemFactory('label'); | |
| 77 | 78 | dom.img = function(src){ |
| 78 | 79 | const e = dom.create('img'); |
| 79 | 80 | if(src) e.setAttribute('src',src); |
| 80 | 81 | return e; |
| 81 | 82 | }; |
| 82 | 83 |
| --- src/fossil.dom.js | |
| +++ src/fossil.dom.js | |
| @@ -72,10 +72,11 @@ | |
| 72 | dom.footer = dom.createElemFactory('footer'); |
| 73 | dom.section = dom.createElemFactory('section'); |
| 74 | dom.span = dom.createElemFactory('span'); |
| 75 | dom.strong = dom.createElemFactory('strong'); |
| 76 | dom.em = dom.createElemFactory('em'); |
| 77 | dom.img = function(src){ |
| 78 | const e = dom.create('img'); |
| 79 | if(src) e.setAttribute('src',src); |
| 80 | return e; |
| 81 | }; |
| 82 |
| --- src/fossil.dom.js | |
| +++ src/fossil.dom.js | |
| @@ -72,10 +72,11 @@ | |
| 72 | dom.footer = dom.createElemFactory('footer'); |
| 73 | dom.section = dom.createElemFactory('section'); |
| 74 | dom.span = dom.createElemFactory('span'); |
| 75 | dom.strong = dom.createElemFactory('strong'); |
| 76 | dom.em = dom.createElemFactory('em'); |
| 77 | dom.label = dom.createElemFactory('label'); |
| 78 | dom.img = function(src){ |
| 79 | const e = dom.create('img'); |
| 80 | if(src) e.setAttribute('src',src); |
| 81 | return e; |
| 82 | }; |
| 83 |
+3
-3
| --- src/fossil.fetch.js | ||
| +++ src/fossil.fetch.js | ||
| @@ -144,13 +144,10 @@ | ||
| 144 | 144 | opt.contentType = 'application/json'; |
| 145 | 145 | } |
| 146 | 146 | } |
| 147 | 147 | const url=[F.repoUrl(uri,opt.urlParams)], |
| 148 | 148 | x=new XMLHttpRequest(); |
| 149 | - if('POST'===opt.method && 'string'===typeof opt.contentType){ | |
| 150 | - x.setRequestHeader('Content-Type',opt.contentType); | |
| 151 | - } | |
| 152 | 149 | if('json'===opt.responseType){ |
| 153 | 150 | /* 'json' is an extension to the supported XHR.responseType |
| 154 | 151 | list. We use it as a flag to tell us to JSON.parse() |
| 155 | 152 | the response. */ |
| 156 | 153 | jsonResponse = true; |
| @@ -195,14 +192,17 @@ | ||
| 195 | 192 | opt.onerror(e); |
| 196 | 193 | } |
| 197 | 194 | }; |
| 198 | 195 | try{opt.beforesend()}catch(e){/*ignore*/} |
| 199 | 196 | x.open(opt.method||'GET', url.join(''), true); |
| 197 | + if('POST'===opt.method && 'string'===typeof opt.contentType){ | |
| 198 | + x.setRequestHeader('Content-Type',opt.contentType); | |
| 199 | + } | |
| 200 | 200 | x.timeout = +opt.timeout || f.timeout; |
| 201 | 201 | if(undefined!==payload) x.send(payload); |
| 202 | 202 | else x.send(); |
| 203 | 203 | return this; |
| 204 | 204 | }; |
| 205 | 205 | |
| 206 | 206 | window.fossil.fetch.beforesend = function(){}; |
| 207 | 207 | window.fossil.fetch.aftersend = function(){}; |
| 208 | 208 | window.fossil.fetch.timeout = 15000/* Default timeout, in ms. */; |
| 209 | 209 | |
| 210 | 210 | ADDED src/fossil.page.forumpost.js |
| --- src/fossil.fetch.js | |
| +++ src/fossil.fetch.js | |
| @@ -144,13 +144,10 @@ | |
| 144 | opt.contentType = 'application/json'; |
| 145 | } |
| 146 | } |
| 147 | const url=[F.repoUrl(uri,opt.urlParams)], |
| 148 | x=new XMLHttpRequest(); |
| 149 | if('POST'===opt.method && 'string'===typeof opt.contentType){ |
| 150 | x.setRequestHeader('Content-Type',opt.contentType); |
| 151 | } |
| 152 | if('json'===opt.responseType){ |
| 153 | /* 'json' is an extension to the supported XHR.responseType |
| 154 | list. We use it as a flag to tell us to JSON.parse() |
| 155 | the response. */ |
| 156 | jsonResponse = true; |
| @@ -195,14 +192,17 @@ | |
| 195 | opt.onerror(e); |
| 196 | } |
| 197 | }; |
| 198 | try{opt.beforesend()}catch(e){/*ignore*/} |
| 199 | x.open(opt.method||'GET', url.join(''), true); |
| 200 | x.timeout = +opt.timeout || f.timeout; |
| 201 | if(undefined!==payload) x.send(payload); |
| 202 | else x.send(); |
| 203 | return this; |
| 204 | }; |
| 205 | |
| 206 | window.fossil.fetch.beforesend = function(){}; |
| 207 | window.fossil.fetch.aftersend = function(){}; |
| 208 | window.fossil.fetch.timeout = 15000/* Default timeout, in ms. */; |
| 209 | |
| 210 | DDED src/fossil.page.forumpost.js |
| --- src/fossil.fetch.js | |
| +++ src/fossil.fetch.js | |
| @@ -144,13 +144,10 @@ | |
| 144 | opt.contentType = 'application/json'; |
| 145 | } |
| 146 | } |
| 147 | const url=[F.repoUrl(uri,opt.urlParams)], |
| 148 | x=new XMLHttpRequest(); |
| 149 | if('json'===opt.responseType){ |
| 150 | /* 'json' is an extension to the supported XHR.responseType |
| 151 | list. We use it as a flag to tell us to JSON.parse() |
| 152 | the response. */ |
| 153 | jsonResponse = true; |
| @@ -195,14 +192,17 @@ | |
| 192 | opt.onerror(e); |
| 193 | } |
| 194 | }; |
| 195 | try{opt.beforesend()}catch(e){/*ignore*/} |
| 196 | x.open(opt.method||'GET', url.join(''), true); |
| 197 | if('POST'===opt.method && 'string'===typeof opt.contentType){ |
| 198 | x.setRequestHeader('Content-Type',opt.contentType); |
| 199 | } |
| 200 | x.timeout = +opt.timeout || f.timeout; |
| 201 | if(undefined!==payload) x.send(payload); |
| 202 | else x.send(); |
| 203 | return this; |
| 204 | }; |
| 205 | |
| 206 | window.fossil.fetch.beforesend = function(){}; |
| 207 | window.fossil.fetch.aftersend = function(){}; |
| 208 | window.fossil.fetch.timeout = 15000/* Default timeout, in ms. */; |
| 209 | |
| 210 | DDED src/fossil.page.forumpost.js |
| --- a/src/fossil.page.forumpost.js | ||
| +++ b/src/fossil.page.forumpost.js | ||
| @@ -0,0 +1,17 @@ | ||
| 1 | +(function(F/*the fossil object*/){ | |
| 2 | + "use strict"; | |
| 3 | + /* JS code for /HierRootfossil.page, D = fossilwidget = D.div(classList.add(); | |
| 4 | +ject*/){ | |
| 5 | + "use stri(function(F//** A double-click toggle will select "the current word" on the | |
| 6 | + post, which is minorconst getButtonbtnbtn.innerText = isE ? 'Expand...' : 'Collapse'* Install an event handler on elemecallback if the user presses the element for a brief period | |
| 7 | + (time is defined a few lines down from here). */ | |
| 8 | + const addLongpresse, callback){ | |
| 9 | + const longPressTime = 650 /*ms*/; | |
| 10 | + var timer; | |
| 11 | +clearTimer = func clearTimeout(timer); | |
| 12 | + timer = undefined; | |
| 13 | + } | |
| 14 | + }; | |
| 15 | + emousedown', function(ev){ | |
| 16 | + timer = setTimeout(function(){ | |
| 17 | + cl |
| --- a/src/fossil.page.forumpost.js | |
| +++ b/src/fossil.page.forumpost.js | |
| @@ -0,0 +1,17 @@ | |
| --- a/src/fossil.page.forumpost.js | |
| +++ b/src/fossil.page.forumpost.js | |
| @@ -0,0 +1,17 @@ | |
| 1 | (function(F/*the fossil object*/){ |
| 2 | "use strict"; |
| 3 | /* JS code for /HierRootfossil.page, D = fossilwidget = D.div(classList.add(); |
| 4 | ject*/){ |
| 5 | "use stri(function(F//** A double-click toggle will select "the current word" on the |
| 6 | post, which is minorconst getButtonbtnbtn.innerText = isE ? 'Expand...' : 'Collapse'* Install an event handler on elemecallback if the user presses the element for a brief period |
| 7 | (time is defined a few lines down from here). */ |
| 8 | const addLongpresse, callback){ |
| 9 | const longPressTime = 650 /*ms*/; |
| 10 | var timer; |
| 11 | clearTimer = func clearTimeout(timer); |
| 12 | timer = undefined; |
| 13 | } |
| 14 | }; |
| 15 | emousedown', function(ev){ |
| 16 | timer = setTimeout(function(){ |
| 17 | cl |
+33
| --- src/json.c | ||
| +++ src/json.c | ||
| @@ -51,10 +51,43 @@ | ||
| 51 | 51 | "requestId" /*requestId*/, |
| 52 | 52 | "resultCode" /*resultCode*/, |
| 53 | 53 | "resultText" /*resultText*/, |
| 54 | 54 | "timestamp" /*timestamp*/ |
| 55 | 55 | }; |
| 56 | + | |
| 57 | +/* | |
| 58 | +** Given the current request path string, this function returns true | |
| 59 | +** if it refers to a JSON API path. i.e. if (1) it starts with /json | |
| 60 | +** or (2) g.zCmdName is "server" and the path starts with | |
| 61 | +** /somereponame/json. Specifically, it returns 1 in the former case | |
| 62 | +** and 2 for the latter. | |
| 63 | +*/ | |
| 64 | +int json_request_is_json_api(const char * zPathInfo){ | |
| 65 | + int rc = 0; | |
| 66 | + if(zPathInfo==0){ | |
| 67 | + rc = 0; | |
| 68 | + }else if(0==strncmp("/json",zPathInfo,5) | |
| 69 | + && (zPathInfo[5]==0 || zPathInfo[5]=='/')){ | |
| 70 | + rc = 1; | |
| 71 | + }else if(g.zCmdName!=0 && 0==strcmp("server",g.zCmdName)){ | |
| 72 | + /* When running in server "directory" mode, zPathInfo is | |
| 73 | + ** prefixed with the repository's name, so in order to determine | |
| 74 | + ** whether or not we're really running in json mode we have to | |
| 75 | + ** try a bit harder. Problem reported here: | |
| 76 | + ** https://fossil-scm.org/forum/forumpost/e4953666d6 | |
| 77 | + */ | |
| 78 | + ReCompiled * pReg = 0; | |
| 79 | + const char * zErr = re_compile(&pReg, "^/[^/]+/json(/.*)?", 0); | |
| 80 | + assert(zErr==0 && "Regex compilation failed?"); | |
| 81 | + if(zErr==0 && | |
| 82 | + re_match(pReg, (const unsigned char *)zPathInfo, -1)){ | |
| 83 | + rc = 2; | |
| 84 | + } | |
| 85 | + re_free(pReg); | |
| 86 | + } | |
| 87 | + return rc; | |
| 88 | +} | |
| 56 | 89 | |
| 57 | 90 | /* |
| 58 | 91 | ** Returns true (non-0) if fossil appears to be running in JSON mode. |
| 59 | 92 | ** and either has JSON POSTed input awaiting consumption or fossil is |
| 60 | 93 | ** running in HTTP mode (in which case certain JSON data *might* be |
| 61 | 94 |
| --- src/json.c | |
| +++ src/json.c | |
| @@ -51,10 +51,43 @@ | |
| 51 | "requestId" /*requestId*/, |
| 52 | "resultCode" /*resultCode*/, |
| 53 | "resultText" /*resultText*/, |
| 54 | "timestamp" /*timestamp*/ |
| 55 | }; |
| 56 | |
| 57 | /* |
| 58 | ** Returns true (non-0) if fossil appears to be running in JSON mode. |
| 59 | ** and either has JSON POSTed input awaiting consumption or fossil is |
| 60 | ** running in HTTP mode (in which case certain JSON data *might* be |
| 61 |
| --- src/json.c | |
| +++ src/json.c | |
| @@ -51,10 +51,43 @@ | |
| 51 | "requestId" /*requestId*/, |
| 52 | "resultCode" /*resultCode*/, |
| 53 | "resultText" /*resultText*/, |
| 54 | "timestamp" /*timestamp*/ |
| 55 | }; |
| 56 | |
| 57 | /* |
| 58 | ** Given the current request path string, this function returns true |
| 59 | ** if it refers to a JSON API path. i.e. if (1) it starts with /json |
| 60 | ** or (2) g.zCmdName is "server" and the path starts with |
| 61 | ** /somereponame/json. Specifically, it returns 1 in the former case |
| 62 | ** and 2 for the latter. |
| 63 | */ |
| 64 | int json_request_is_json_api(const char * zPathInfo){ |
| 65 | int rc = 0; |
| 66 | if(zPathInfo==0){ |
| 67 | rc = 0; |
| 68 | }else if(0==strncmp("/json",zPathInfo,5) |
| 69 | && (zPathInfo[5]==0 || zPathInfo[5]=='/')){ |
| 70 | rc = 1; |
| 71 | }else if(g.zCmdName!=0 && 0==strcmp("server",g.zCmdName)){ |
| 72 | /* When running in server "directory" mode, zPathInfo is |
| 73 | ** prefixed with the repository's name, so in order to determine |
| 74 | ** whether or not we're really running in json mode we have to |
| 75 | ** try a bit harder. Problem reported here: |
| 76 | ** https://fossil-scm.org/forum/forumpost/e4953666d6 |
| 77 | */ |
| 78 | ReCompiled * pReg = 0; |
| 79 | const char * zErr = re_compile(&pReg, "^/[^/]+/json(/.*)?", 0); |
| 80 | assert(zErr==0 && "Regex compilation failed?"); |
| 81 | if(zErr==0 && |
| 82 | re_match(pReg, (const unsigned char *)zPathInfo, -1)){ |
| 83 | rc = 2; |
| 84 | } |
| 85 | re_free(pReg); |
| 86 | } |
| 87 | return rc; |
| 88 | } |
| 89 | |
| 90 | /* |
| 91 | ** Returns true (non-0) if fossil appears to be running in JSON mode. |
| 92 | ** and either has JSON POSTed input awaiting consumption or fossil is |
| 93 | ** running in HTTP mode (in which case certain JSON data *might* be |
| 94 |
+1
-5
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -1186,13 +1186,11 @@ | ||
| 1186 | 1186 | blob_append(pOut, "FOSSIL_DEBUG\n", -1); |
| 1187 | 1187 | #endif |
| 1188 | 1188 | #if defined(FOSSIL_ENABLE_DELTA_CKSUM_TEST) |
| 1189 | 1189 | blob_append(pOut, "FOSSIL_ENABLE_DELTA_CKSUM_TEST\n", -1); |
| 1190 | 1190 | #endif |
| 1191 | -#if defined(FOSSIL_ENABLE_LEGACY_MV_RM) | |
| 1192 | 1191 | blob_append(pOut, "FOSSIL_ENABLE_LEGACY_MV_RM\n", -1); |
| 1193 | -#endif | |
| 1194 | 1192 | #if defined(FOSSIL_ENABLE_EXEC_REL_PATHS) |
| 1195 | 1193 | blob_append(pOut, "FOSSIL_ENABLE_EXEC_REL_PATHS\n", -1); |
| 1196 | 1194 | #endif |
| 1197 | 1195 | #if defined(FOSSIL_ENABLE_TH1_DOCS) |
| 1198 | 1196 | blob_append(pOut, "FOSSIL_ENABLE_TH1_DOCS\n", -1); |
| @@ -1581,13 +1579,11 @@ | ||
| 1581 | 1579 | ** process JSON-mode POST data if we're actually in a /json |
| 1582 | 1580 | ** page). This is normally set up before this routine is called, but |
| 1583 | 1581 | ** it looks like the ssh_request_loop() approach to dispatching |
| 1584 | 1582 | ** might bypass that. |
| 1585 | 1583 | */ |
| 1586 | - if( g.json.isJsonMode==0 && zPathInfo!=0 | |
| 1587 | - && 0==strncmp("/json",zPathInfo,5) | |
| 1588 | - && (zPathInfo[5]==0 || zPathInfo[5]=='/')){ | |
| 1584 | + if( g.json.isJsonMode==0 && json_request_is_json_api(zPathInfo) ){ | |
| 1589 | 1585 | g.json.isJsonMode = 1; |
| 1590 | 1586 | } |
| 1591 | 1587 | #endif |
| 1592 | 1588 | /* If the repository has not been opened already, then find the |
| 1593 | 1589 | ** repository based on the first element of PATH_INFO and open it. |
| 1594 | 1590 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -1186,13 +1186,11 @@ | |
| 1186 | blob_append(pOut, "FOSSIL_DEBUG\n", -1); |
| 1187 | #endif |
| 1188 | #if defined(FOSSIL_ENABLE_DELTA_CKSUM_TEST) |
| 1189 | blob_append(pOut, "FOSSIL_ENABLE_DELTA_CKSUM_TEST\n", -1); |
| 1190 | #endif |
| 1191 | #if defined(FOSSIL_ENABLE_LEGACY_MV_RM) |
| 1192 | blob_append(pOut, "FOSSIL_ENABLE_LEGACY_MV_RM\n", -1); |
| 1193 | #endif |
| 1194 | #if defined(FOSSIL_ENABLE_EXEC_REL_PATHS) |
| 1195 | blob_append(pOut, "FOSSIL_ENABLE_EXEC_REL_PATHS\n", -1); |
| 1196 | #endif |
| 1197 | #if defined(FOSSIL_ENABLE_TH1_DOCS) |
| 1198 | blob_append(pOut, "FOSSIL_ENABLE_TH1_DOCS\n", -1); |
| @@ -1581,13 +1579,11 @@ | |
| 1581 | ** process JSON-mode POST data if we're actually in a /json |
| 1582 | ** page). This is normally set up before this routine is called, but |
| 1583 | ** it looks like the ssh_request_loop() approach to dispatching |
| 1584 | ** might bypass that. |
| 1585 | */ |
| 1586 | if( g.json.isJsonMode==0 && zPathInfo!=0 |
| 1587 | && 0==strncmp("/json",zPathInfo,5) |
| 1588 | && (zPathInfo[5]==0 || zPathInfo[5]=='/')){ |
| 1589 | g.json.isJsonMode = 1; |
| 1590 | } |
| 1591 | #endif |
| 1592 | /* If the repository has not been opened already, then find the |
| 1593 | ** repository based on the first element of PATH_INFO and open it. |
| 1594 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -1186,13 +1186,11 @@ | |
| 1186 | blob_append(pOut, "FOSSIL_DEBUG\n", -1); |
| 1187 | #endif |
| 1188 | #if defined(FOSSIL_ENABLE_DELTA_CKSUM_TEST) |
| 1189 | blob_append(pOut, "FOSSIL_ENABLE_DELTA_CKSUM_TEST\n", -1); |
| 1190 | #endif |
| 1191 | blob_append(pOut, "FOSSIL_ENABLE_LEGACY_MV_RM\n", -1); |
| 1192 | #if defined(FOSSIL_ENABLE_EXEC_REL_PATHS) |
| 1193 | blob_append(pOut, "FOSSIL_ENABLE_EXEC_REL_PATHS\n", -1); |
| 1194 | #endif |
| 1195 | #if defined(FOSSIL_ENABLE_TH1_DOCS) |
| 1196 | blob_append(pOut, "FOSSIL_ENABLE_TH1_DOCS\n", -1); |
| @@ -1581,13 +1579,11 @@ | |
| 1579 | ** process JSON-mode POST data if we're actually in a /json |
| 1580 | ** page). This is normally set up before this routine is called, but |
| 1581 | ** it looks like the ssh_request_loop() approach to dispatching |
| 1582 | ** might bypass that. |
| 1583 | */ |
| 1584 | if( g.json.isJsonMode==0 && json_request_is_json_api(zPathInfo) ){ |
| 1585 | g.json.isJsonMode = 1; |
| 1586 | } |
| 1587 | #endif |
| 1588 | /* If the repository has not been opened already, then find the |
| 1589 | ** repository based on the first element of PATH_INFO and open it. |
| 1590 |
+1
| --- src/main.mk | ||
| +++ src/main.mk | ||
| @@ -227,10 +227,11 @@ | ||
| 227 | 227 | $(SRCDIR)/fossil.bootstrap.js \ |
| 228 | 228 | $(SRCDIR)/fossil.confirmer.js \ |
| 229 | 229 | $(SRCDIR)/fossil.dom.js \ |
| 230 | 230 | $(SRCDIR)/fossil.fetch.js \ |
| 231 | 231 | $(SRCDIR)/fossil.page.fileedit.js \ |
| 232 | + $(SRCDIR)/fossil.page.forumpost.js \ | |
| 232 | 233 | $(SRCDIR)/fossil.storage.js \ |
| 233 | 234 | $(SRCDIR)/fossil.tabs.js \ |
| 234 | 235 | $(SRCDIR)/graph.js \ |
| 235 | 236 | $(SRCDIR)/href.js \ |
| 236 | 237 | $(SRCDIR)/login.js \ |
| 237 | 238 |
| --- src/main.mk | |
| +++ src/main.mk | |
| @@ -227,10 +227,11 @@ | |
| 227 | $(SRCDIR)/fossil.bootstrap.js \ |
| 228 | $(SRCDIR)/fossil.confirmer.js \ |
| 229 | $(SRCDIR)/fossil.dom.js \ |
| 230 | $(SRCDIR)/fossil.fetch.js \ |
| 231 | $(SRCDIR)/fossil.page.fileedit.js \ |
| 232 | $(SRCDIR)/fossil.storage.js \ |
| 233 | $(SRCDIR)/fossil.tabs.js \ |
| 234 | $(SRCDIR)/graph.js \ |
| 235 | $(SRCDIR)/href.js \ |
| 236 | $(SRCDIR)/login.js \ |
| 237 |
| --- src/main.mk | |
| +++ src/main.mk | |
| @@ -227,10 +227,11 @@ | |
| 227 | $(SRCDIR)/fossil.bootstrap.js \ |
| 228 | $(SRCDIR)/fossil.confirmer.js \ |
| 229 | $(SRCDIR)/fossil.dom.js \ |
| 230 | $(SRCDIR)/fossil.fetch.js \ |
| 231 | $(SRCDIR)/fossil.page.fileedit.js \ |
| 232 | $(SRCDIR)/fossil.page.forumpost.js \ |
| 233 | $(SRCDIR)/fossil.storage.js \ |
| 234 | $(SRCDIR)/fossil.tabs.js \ |
| 235 | $(SRCDIR)/graph.js \ |
| 236 | $(SRCDIR)/href.js \ |
| 237 | $(SRCDIR)/login.js \ |
| 238 |
+1
| --- src/main.mk | ||
| +++ src/main.mk | ||
| @@ -227,10 +227,11 @@ | ||
| 227 | 227 | $(SRCDIR)/fossil.bootstrap.js \ |
| 228 | 228 | $(SRCDIR)/fossil.confirmer.js \ |
| 229 | 229 | $(SRCDIR)/fossil.dom.js \ |
| 230 | 230 | $(SRCDIR)/fossil.fetch.js \ |
| 231 | 231 | $(SRCDIR)/fossil.page.fileedit.js \ |
| 232 | + $(SRCDIR)/fossil.page.forumpost.js \ | |
| 232 | 233 | $(SRCDIR)/fossil.storage.js \ |
| 233 | 234 | $(SRCDIR)/fossil.tabs.js \ |
| 234 | 235 | $(SRCDIR)/graph.js \ |
| 235 | 236 | $(SRCDIR)/href.js \ |
| 236 | 237 | $(SRCDIR)/login.js \ |
| 237 | 238 |
| --- src/main.mk | |
| +++ src/main.mk | |
| @@ -227,10 +227,11 @@ | |
| 227 | $(SRCDIR)/fossil.bootstrap.js \ |
| 228 | $(SRCDIR)/fossil.confirmer.js \ |
| 229 | $(SRCDIR)/fossil.dom.js \ |
| 230 | $(SRCDIR)/fossil.fetch.js \ |
| 231 | $(SRCDIR)/fossil.page.fileedit.js \ |
| 232 | $(SRCDIR)/fossil.storage.js \ |
| 233 | $(SRCDIR)/fossil.tabs.js \ |
| 234 | $(SRCDIR)/graph.js \ |
| 235 | $(SRCDIR)/href.js \ |
| 236 | $(SRCDIR)/login.js \ |
| 237 |
| --- src/main.mk | |
| +++ src/main.mk | |
| @@ -227,10 +227,11 @@ | |
| 227 | $(SRCDIR)/fossil.bootstrap.js \ |
| 228 | $(SRCDIR)/fossil.confirmer.js \ |
| 229 | $(SRCDIR)/fossil.dom.js \ |
| 230 | $(SRCDIR)/fossil.fetch.js \ |
| 231 | $(SRCDIR)/fossil.page.fileedit.js \ |
| 232 | $(SRCDIR)/fossil.page.forumpost.js \ |
| 233 | $(SRCDIR)/fossil.storage.js \ |
| 234 | $(SRCDIR)/fossil.tabs.js \ |
| 235 | $(SRCDIR)/graph.js \ |
| 236 | $(SRCDIR)/href.js \ |
| 237 | $(SRCDIR)/login.js \ |
| 238 |
-20
| --- src/makemake.tcl | ||
| +++ src/makemake.tcl | ||
| @@ -608,14 +608,10 @@ | ||
| 608 | 608 | |
| 609 | 609 | #### Enable relative paths in external diff/gdiff |
| 610 | 610 | # |
| 611 | 611 | # FOSSIL_ENABLE_EXEC_REL_PATHS = 1 |
| 612 | 612 | |
| 613 | -#### Enable legacy treatment of mv/rm (skip checkout files) | |
| 614 | -# | |
| 615 | -FOSSIL_ENABLE_LEGACY_MV_RM = 1 | |
| 616 | - | |
| 617 | 613 | #### Enable TH1 scripts in embedded documentation files |
| 618 | 614 | # |
| 619 | 615 | # FOSSIL_ENABLE_TH1_DOCS = 1 |
| 620 | 616 | |
| 621 | 617 | #### Enable hooks for commands and web pages via TH1 |
| @@ -835,16 +831,10 @@ | ||
| 835 | 831 | ifdef FOSSIL_ENABLE_EXEC_REL_PATHS |
| 836 | 832 | TCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 837 | 833 | RCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 838 | 834 | endif |
| 839 | 835 | |
| 840 | -# With legacy treatment of mv/rm | |
| 841 | -ifdef FOSSIL_ENABLE_LEGACY_MV_RM | |
| 842 | -TCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1 | |
| 843 | -RCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1 | |
| 844 | -endif | |
| 845 | - | |
| 846 | 836 | # With TH1 embedded docs support |
| 847 | 837 | ifdef FOSSIL_ENABLE_TH1_DOCS |
| 848 | 838 | TCC += -DFOSSIL_ENABLE_TH1_DOCS=1 |
| 849 | 839 | RCC += -DFOSSIL_ENABLE_TH1_DOCS=1 |
| 850 | 840 | endif |
| @@ -1526,15 +1516,10 @@ | ||
| 1526 | 1516 | # Enable the JSON API? |
| 1527 | 1517 | !ifndef FOSSIL_ENABLE_JSON |
| 1528 | 1518 | FOSSIL_ENABLE_JSON = 0 |
| 1529 | 1519 | !endif |
| 1530 | 1520 | |
| 1531 | -# Enable legacy treatment of the mv/rm commands? | |
| 1532 | -!ifndef FOSSIL_ENABLE_LEGACY_MV_RM | |
| 1533 | -FOSSIL_ENABLE_LEGACY_MV_RM = 1 | |
| 1534 | -!endif | |
| 1535 | - | |
| 1536 | 1521 | # Enable use of miniz instead of zlib? |
| 1537 | 1522 | !ifndef FOSSIL_ENABLE_MINIZ |
| 1538 | 1523 | FOSSIL_ENABLE_MINIZ = 0 |
| 1539 | 1524 | !endif |
| 1540 | 1525 | |
| @@ -1716,15 +1701,10 @@ | ||
| 1716 | 1701 | !if $(FOSSIL_ENABLE_EXEC_REL_PATHS)!=0 |
| 1717 | 1702 | TCC = $(TCC) /DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 1718 | 1703 | RCC = $(RCC) /DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 1719 | 1704 | !endif |
| 1720 | 1705 | |
| 1721 | -!if $(FOSSIL_ENABLE_LEGACY_MV_RM)!=0 | |
| 1722 | -TCC = $(TCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1 | |
| 1723 | -RCC = $(RCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1 | |
| 1724 | -!endif | |
| 1725 | - | |
| 1726 | 1706 | !if $(FOSSIL_ENABLE_TH1_DOCS)!=0 |
| 1727 | 1707 | TCC = $(TCC) /DFOSSIL_ENABLE_TH1_DOCS=1 |
| 1728 | 1708 | RCC = $(RCC) /DFOSSIL_ENABLE_TH1_DOCS=1 |
| 1729 | 1709 | !endif |
| 1730 | 1710 | |
| 1731 | 1711 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -608,14 +608,10 @@ | |
| 608 | |
| 609 | #### Enable relative paths in external diff/gdiff |
| 610 | # |
| 611 | # FOSSIL_ENABLE_EXEC_REL_PATHS = 1 |
| 612 | |
| 613 | #### Enable legacy treatment of mv/rm (skip checkout files) |
| 614 | # |
| 615 | FOSSIL_ENABLE_LEGACY_MV_RM = 1 |
| 616 | |
| 617 | #### Enable TH1 scripts in embedded documentation files |
| 618 | # |
| 619 | # FOSSIL_ENABLE_TH1_DOCS = 1 |
| 620 | |
| 621 | #### Enable hooks for commands and web pages via TH1 |
| @@ -835,16 +831,10 @@ | |
| 835 | ifdef FOSSIL_ENABLE_EXEC_REL_PATHS |
| 836 | TCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 837 | RCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 838 | endif |
| 839 | |
| 840 | # With legacy treatment of mv/rm |
| 841 | ifdef FOSSIL_ENABLE_LEGACY_MV_RM |
| 842 | TCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1 |
| 843 | RCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1 |
| 844 | endif |
| 845 | |
| 846 | # With TH1 embedded docs support |
| 847 | ifdef FOSSIL_ENABLE_TH1_DOCS |
| 848 | TCC += -DFOSSIL_ENABLE_TH1_DOCS=1 |
| 849 | RCC += -DFOSSIL_ENABLE_TH1_DOCS=1 |
| 850 | endif |
| @@ -1526,15 +1516,10 @@ | |
| 1526 | # Enable the JSON API? |
| 1527 | !ifndef FOSSIL_ENABLE_JSON |
| 1528 | FOSSIL_ENABLE_JSON = 0 |
| 1529 | !endif |
| 1530 | |
| 1531 | # Enable legacy treatment of the mv/rm commands? |
| 1532 | !ifndef FOSSIL_ENABLE_LEGACY_MV_RM |
| 1533 | FOSSIL_ENABLE_LEGACY_MV_RM = 1 |
| 1534 | !endif |
| 1535 | |
| 1536 | # Enable use of miniz instead of zlib? |
| 1537 | !ifndef FOSSIL_ENABLE_MINIZ |
| 1538 | FOSSIL_ENABLE_MINIZ = 0 |
| 1539 | !endif |
| 1540 | |
| @@ -1716,15 +1701,10 @@ | |
| 1716 | !if $(FOSSIL_ENABLE_EXEC_REL_PATHS)!=0 |
| 1717 | TCC = $(TCC) /DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 1718 | RCC = $(RCC) /DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 1719 | !endif |
| 1720 | |
| 1721 | !if $(FOSSIL_ENABLE_LEGACY_MV_RM)!=0 |
| 1722 | TCC = $(TCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1 |
| 1723 | RCC = $(RCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1 |
| 1724 | !endif |
| 1725 | |
| 1726 | !if $(FOSSIL_ENABLE_TH1_DOCS)!=0 |
| 1727 | TCC = $(TCC) /DFOSSIL_ENABLE_TH1_DOCS=1 |
| 1728 | RCC = $(RCC) /DFOSSIL_ENABLE_TH1_DOCS=1 |
| 1729 | !endif |
| 1730 | |
| 1731 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -608,14 +608,10 @@ | |
| 608 | |
| 609 | #### Enable relative paths in external diff/gdiff |
| 610 | # |
| 611 | # FOSSIL_ENABLE_EXEC_REL_PATHS = 1 |
| 612 | |
| 613 | #### Enable TH1 scripts in embedded documentation files |
| 614 | # |
| 615 | # FOSSIL_ENABLE_TH1_DOCS = 1 |
| 616 | |
| 617 | #### Enable hooks for commands and web pages via TH1 |
| @@ -835,16 +831,10 @@ | |
| 831 | ifdef FOSSIL_ENABLE_EXEC_REL_PATHS |
| 832 | TCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 833 | RCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 834 | endif |
| 835 | |
| 836 | # With TH1 embedded docs support |
| 837 | ifdef FOSSIL_ENABLE_TH1_DOCS |
| 838 | TCC += -DFOSSIL_ENABLE_TH1_DOCS=1 |
| 839 | RCC += -DFOSSIL_ENABLE_TH1_DOCS=1 |
| 840 | endif |
| @@ -1526,15 +1516,10 @@ | |
| 1516 | # Enable the JSON API? |
| 1517 | !ifndef FOSSIL_ENABLE_JSON |
| 1518 | FOSSIL_ENABLE_JSON = 0 |
| 1519 | !endif |
| 1520 | |
| 1521 | # Enable use of miniz instead of zlib? |
| 1522 | !ifndef FOSSIL_ENABLE_MINIZ |
| 1523 | FOSSIL_ENABLE_MINIZ = 0 |
| 1524 | !endif |
| 1525 | |
| @@ -1716,15 +1701,10 @@ | |
| 1701 | !if $(FOSSIL_ENABLE_EXEC_REL_PATHS)!=0 |
| 1702 | TCC = $(TCC) /DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 1703 | RCC = $(RCC) /DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 1704 | !endif |
| 1705 | |
| 1706 | !if $(FOSSIL_ENABLE_TH1_DOCS)!=0 |
| 1707 | TCC = $(TCC) /DFOSSIL_ENABLE_TH1_DOCS=1 |
| 1708 | RCC = $(RCC) /DFOSSIL_ENABLE_TH1_DOCS=1 |
| 1709 | !endif |
| 1710 | |
| 1711 |
-20
| --- src/makemake.tcl | ||
| +++ src/makemake.tcl | ||
| @@ -608,14 +608,10 @@ | ||
| 608 | 608 | |
| 609 | 609 | #### Enable relative paths in external diff/gdiff |
| 610 | 610 | # |
| 611 | 611 | # FOSSIL_ENABLE_EXEC_REL_PATHS = 1 |
| 612 | 612 | |
| 613 | -#### Enable legacy treatment of mv/rm (skip checkout files) | |
| 614 | -# | |
| 615 | -FOSSIL_ENABLE_LEGACY_MV_RM = 1 | |
| 616 | - | |
| 617 | 613 | #### Enable TH1 scripts in embedded documentation files |
| 618 | 614 | # |
| 619 | 615 | # FOSSIL_ENABLE_TH1_DOCS = 1 |
| 620 | 616 | |
| 621 | 617 | #### Enable hooks for commands and web pages via TH1 |
| @@ -835,16 +831,10 @@ | ||
| 835 | 831 | ifdef FOSSIL_ENABLE_EXEC_REL_PATHS |
| 836 | 832 | TCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 837 | 833 | RCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 838 | 834 | endif |
| 839 | 835 | |
| 840 | -# With legacy treatment of mv/rm | |
| 841 | -ifdef FOSSIL_ENABLE_LEGACY_MV_RM | |
| 842 | -TCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1 | |
| 843 | -RCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1 | |
| 844 | -endif | |
| 845 | - | |
| 846 | 836 | # With TH1 embedded docs support |
| 847 | 837 | ifdef FOSSIL_ENABLE_TH1_DOCS |
| 848 | 838 | TCC += -DFOSSIL_ENABLE_TH1_DOCS=1 |
| 849 | 839 | RCC += -DFOSSIL_ENABLE_TH1_DOCS=1 |
| 850 | 840 | endif |
| @@ -1526,15 +1516,10 @@ | ||
| 1526 | 1516 | # Enable the JSON API? |
| 1527 | 1517 | !ifndef FOSSIL_ENABLE_JSON |
| 1528 | 1518 | FOSSIL_ENABLE_JSON = 0 |
| 1529 | 1519 | !endif |
| 1530 | 1520 | |
| 1531 | -# Enable legacy treatment of the mv/rm commands? | |
| 1532 | -!ifndef FOSSIL_ENABLE_LEGACY_MV_RM | |
| 1533 | -FOSSIL_ENABLE_LEGACY_MV_RM = 1 | |
| 1534 | -!endif | |
| 1535 | - | |
| 1536 | 1521 | # Enable use of miniz instead of zlib? |
| 1537 | 1522 | !ifndef FOSSIL_ENABLE_MINIZ |
| 1538 | 1523 | FOSSIL_ENABLE_MINIZ = 0 |
| 1539 | 1524 | !endif |
| 1540 | 1525 | |
| @@ -1716,15 +1701,10 @@ | ||
| 1716 | 1701 | !if $(FOSSIL_ENABLE_EXEC_REL_PATHS)!=0 |
| 1717 | 1702 | TCC = $(TCC) /DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 1718 | 1703 | RCC = $(RCC) /DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 1719 | 1704 | !endif |
| 1720 | 1705 | |
| 1721 | -!if $(FOSSIL_ENABLE_LEGACY_MV_RM)!=0 | |
| 1722 | -TCC = $(TCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1 | |
| 1723 | -RCC = $(RCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1 | |
| 1724 | -!endif | |
| 1725 | - | |
| 1726 | 1706 | !if $(FOSSIL_ENABLE_TH1_DOCS)!=0 |
| 1727 | 1707 | TCC = $(TCC) /DFOSSIL_ENABLE_TH1_DOCS=1 |
| 1728 | 1708 | RCC = $(RCC) /DFOSSIL_ENABLE_TH1_DOCS=1 |
| 1729 | 1709 | !endif |
| 1730 | 1710 | |
| 1731 | 1711 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -608,14 +608,10 @@ | |
| 608 | |
| 609 | #### Enable relative paths in external diff/gdiff |
| 610 | # |
| 611 | # FOSSIL_ENABLE_EXEC_REL_PATHS = 1 |
| 612 | |
| 613 | #### Enable legacy treatment of mv/rm (skip checkout files) |
| 614 | # |
| 615 | FOSSIL_ENABLE_LEGACY_MV_RM = 1 |
| 616 | |
| 617 | #### Enable TH1 scripts in embedded documentation files |
| 618 | # |
| 619 | # FOSSIL_ENABLE_TH1_DOCS = 1 |
| 620 | |
| 621 | #### Enable hooks for commands and web pages via TH1 |
| @@ -835,16 +831,10 @@ | |
| 835 | ifdef FOSSIL_ENABLE_EXEC_REL_PATHS |
| 836 | TCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 837 | RCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 838 | endif |
| 839 | |
| 840 | # With legacy treatment of mv/rm |
| 841 | ifdef FOSSIL_ENABLE_LEGACY_MV_RM |
| 842 | TCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1 |
| 843 | RCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1 |
| 844 | endif |
| 845 | |
| 846 | # With TH1 embedded docs support |
| 847 | ifdef FOSSIL_ENABLE_TH1_DOCS |
| 848 | TCC += -DFOSSIL_ENABLE_TH1_DOCS=1 |
| 849 | RCC += -DFOSSIL_ENABLE_TH1_DOCS=1 |
| 850 | endif |
| @@ -1526,15 +1516,10 @@ | |
| 1526 | # Enable the JSON API? |
| 1527 | !ifndef FOSSIL_ENABLE_JSON |
| 1528 | FOSSIL_ENABLE_JSON = 0 |
| 1529 | !endif |
| 1530 | |
| 1531 | # Enable legacy treatment of the mv/rm commands? |
| 1532 | !ifndef FOSSIL_ENABLE_LEGACY_MV_RM |
| 1533 | FOSSIL_ENABLE_LEGACY_MV_RM = 1 |
| 1534 | !endif |
| 1535 | |
| 1536 | # Enable use of miniz instead of zlib? |
| 1537 | !ifndef FOSSIL_ENABLE_MINIZ |
| 1538 | FOSSIL_ENABLE_MINIZ = 0 |
| 1539 | !endif |
| 1540 | |
| @@ -1716,15 +1701,10 @@ | |
| 1716 | !if $(FOSSIL_ENABLE_EXEC_REL_PATHS)!=0 |
| 1717 | TCC = $(TCC) /DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 1718 | RCC = $(RCC) /DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 1719 | !endif |
| 1720 | |
| 1721 | !if $(FOSSIL_ENABLE_LEGACY_MV_RM)!=0 |
| 1722 | TCC = $(TCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1 |
| 1723 | RCC = $(RCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1 |
| 1724 | !endif |
| 1725 | |
| 1726 | !if $(FOSSIL_ENABLE_TH1_DOCS)!=0 |
| 1727 | TCC = $(TCC) /DFOSSIL_ENABLE_TH1_DOCS=1 |
| 1728 | RCC = $(RCC) /DFOSSIL_ENABLE_TH1_DOCS=1 |
| 1729 | !endif |
| 1730 | |
| 1731 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -608,14 +608,10 @@ | |
| 608 | |
| 609 | #### Enable relative paths in external diff/gdiff |
| 610 | # |
| 611 | # FOSSIL_ENABLE_EXEC_REL_PATHS = 1 |
| 612 | |
| 613 | #### Enable TH1 scripts in embedded documentation files |
| 614 | # |
| 615 | # FOSSIL_ENABLE_TH1_DOCS = 1 |
| 616 | |
| 617 | #### Enable hooks for commands and web pages via TH1 |
| @@ -835,16 +831,10 @@ | |
| 831 | ifdef FOSSIL_ENABLE_EXEC_REL_PATHS |
| 832 | TCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 833 | RCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 834 | endif |
| 835 | |
| 836 | # With TH1 embedded docs support |
| 837 | ifdef FOSSIL_ENABLE_TH1_DOCS |
| 838 | TCC += -DFOSSIL_ENABLE_TH1_DOCS=1 |
| 839 | RCC += -DFOSSIL_ENABLE_TH1_DOCS=1 |
| 840 | endif |
| @@ -1526,15 +1516,10 @@ | |
| 1516 | # Enable the JSON API? |
| 1517 | !ifndef FOSSIL_ENABLE_JSON |
| 1518 | FOSSIL_ENABLE_JSON = 0 |
| 1519 | !endif |
| 1520 | |
| 1521 | # Enable use of miniz instead of zlib? |
| 1522 | !ifndef FOSSIL_ENABLE_MINIZ |
| 1523 | FOSSIL_ENABLE_MINIZ = 0 |
| 1524 | !endif |
| 1525 | |
| @@ -1716,15 +1701,10 @@ | |
| 1701 | !if $(FOSSIL_ENABLE_EXEC_REL_PATHS)!=0 |
| 1702 | TCC = $(TCC) /DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 1703 | RCC = $(RCC) /DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 1704 | !endif |
| 1705 | |
| 1706 | !if $(FOSSIL_ENABLE_TH1_DOCS)!=0 |
| 1707 | TCC = $(TCC) /DFOSSIL_ENABLE_TH1_DOCS=1 |
| 1708 | RCC = $(RCC) /DFOSSIL_ENABLE_TH1_DOCS=1 |
| 1709 | !endif |
| 1710 | |
| 1711 |
+20
-7
| --- src/path.c | ||
| +++ src/path.c | ||
| @@ -44,10 +44,11 @@ | ||
| 44 | 44 | static struct { |
| 45 | 45 | PathNode *pCurrent; /* Current generation of nodes */ |
| 46 | 46 | PathNode *pAll; /* All nodes */ |
| 47 | 47 | Bag seen; /* Nodes seen before */ |
| 48 | 48 | int nStep; /* Number of steps from first to last */ |
| 49 | + int nNotHidden; /* Number of steps not counting hidden nodes */ | |
| 49 | 50 | PathNode *pStart; /* Earliest node */ |
| 50 | 51 | PathNode *pEnd; /* Most recent */ |
| 51 | 52 | } path; |
| 52 | 53 | |
| 53 | 54 | /* |
| @@ -59,10 +60,15 @@ | ||
| 59 | 60 | /* |
| 60 | 61 | ** Return the number of steps in the computed path. |
| 61 | 62 | */ |
| 62 | 63 | int path_length(void){ return path.nStep; } |
| 63 | 64 | |
| 65 | +/* | |
| 66 | +** Return the number of non-hidden steps in the computed path. | |
| 67 | +*/ | |
| 68 | +int path_length_not_hidden(void){ return path.nNotHidden; } | |
| 69 | + | |
| 64 | 70 | /* |
| 65 | 71 | ** Create a new node |
| 66 | 72 | */ |
| 67 | 73 | static PathNode *path_new_node(int rid, PathNode *pFrom, int isParent){ |
| 68 | 74 | PathNode *p; |
| @@ -121,11 +127,12 @@ | ||
| 121 | 127 | */ |
| 122 | 128 | PathNode *path_shortest( |
| 123 | 129 | int iFrom, /* Path starts here */ |
| 124 | 130 | int iTo, /* Path ends here */ |
| 125 | 131 | int directOnly, /* No merge links if true */ |
| 126 | - int oneWayOnly /* Parent->child only if true */ | |
| 132 | + int oneWayOnly, /* Parent->child only if true */ | |
| 133 | + Bag *pHidden /* Hidden nodes */ | |
| 127 | 134 | ){ |
| 128 | 135 | Stmt s; |
| 129 | 136 | PathNode *pPrev; |
| 130 | 137 | PathNode *p; |
| 131 | 138 | |
| @@ -165,14 +172,18 @@ | ||
| 165 | 172 | while( db_step(&s)==SQLITE_ROW ){ |
| 166 | 173 | int cid = db_column_int(&s, 0); |
| 167 | 174 | int isParent = db_column_int(&s, 1); |
| 168 | 175 | if( bag_find(&path.seen, cid) ) continue; |
| 169 | 176 | p = path_new_node(cid, pPrev, isParent); |
| 177 | + if( pHidden && bag_find(pHidden,cid) ) p->isHidden = 1; | |
| 170 | 178 | if( cid==iTo ){ |
| 171 | 179 | db_finalize(&s); |
| 172 | 180 | path.pEnd = p; |
| 173 | 181 | path_reverse_path(); |
| 182 | + for(p=path.pStart->u.pTo; p; p=p->u.pTo ){ | |
| 183 | + if( !p->isHidden ) path.nNotHidden++; | |
| 184 | + } | |
| 174 | 185 | return path.pStart; |
| 175 | 186 | } |
| 176 | 187 | } |
| 177 | 188 | db_reset(&s); |
| 178 | 189 | pPrev = pPrev->u.pPeer; |
| @@ -188,22 +199,24 @@ | ||
| 188 | 199 | ** 2 steps, return 0. |
| 189 | 200 | */ |
| 190 | 201 | PathNode *path_midpoint(void){ |
| 191 | 202 | PathNode *p; |
| 192 | 203 | int i; |
| 193 | - if( path.nStep<2 ) return 0; | |
| 194 | - for(p=path.pEnd, i=0; p && i<path.nStep/2; p=p->pFrom, i++){} | |
| 204 | + if( path.nNotHidden<2 ) return 0; | |
| 205 | + for(p=path.pEnd, i=0; p && (p->isHidden || i<path.nNotHidden/2); p=p->pFrom){ | |
| 206 | + if( !p->isHidden ) i++; | |
| 207 | + } | |
| 195 | 208 | return p; |
| 196 | 209 | } |
| 197 | 210 | |
| 198 | 211 | /* |
| 199 | 212 | ** Return an estimate of the number of comparisons remaining in order |
| 200 | 213 | ** to bisect path. This is based on the log2() of path.nStep. |
| 201 | 214 | */ |
| 202 | 215 | int path_search_depth(void){ |
| 203 | 216 | int i, j; |
| 204 | - for(i=0, j=1; j<path.nStep; i++, j+=j){} | |
| 217 | + for(i=0, j=1; j<path.nNotHidden; i++, j+=j){} | |
| 205 | 218 | return i; |
| 206 | 219 | } |
| 207 | 220 | |
| 208 | 221 | /* |
| 209 | 222 | ** Compute the shortest path between two check-ins and then transfer |
| @@ -215,11 +228,11 @@ | ||
| 215 | 228 | int cid /* RID for check-in at the end of the path */ |
| 216 | 229 | ){ |
| 217 | 230 | PathNode *pPath; |
| 218 | 231 | int gen = 0; |
| 219 | 232 | Stmt ins; |
| 220 | - pPath = path_shortest(cid, origid, 1, 0); | |
| 233 | + pPath = path_shortest(cid, origid, 1, 0, 0); | |
| 221 | 234 | db_multi_exec( |
| 222 | 235 | "CREATE TEMP TABLE IF NOT EXISTS ancestor(" |
| 223 | 236 | " rid INT UNIQUE," |
| 224 | 237 | " generation INTEGER PRIMARY KEY" |
| 225 | 238 | ");" |
| @@ -257,11 +270,11 @@ | ||
| 257 | 270 | directOnly = find_option("no-merge",0,0)!=0; |
| 258 | 271 | oneWay = find_option("one-way",0,0)!=0; |
| 259 | 272 | if( g.argc!=4 ) usage("VERSION1 VERSION2"); |
| 260 | 273 | iFrom = name_to_rid(g.argv[2]); |
| 261 | 274 | iTo = name_to_rid(g.argv[3]); |
| 262 | - p = path_shortest(iFrom, iTo, directOnly, oneWay); | |
| 275 | + p = path_shortest(iFrom, iTo, directOnly, oneWay, 0); | |
| 263 | 276 | if( p==0 ){ |
| 264 | 277 | fossil_fatal("no path from %s to %s", g.argv[1], g.argv[2]); |
| 265 | 278 | } |
| 266 | 279 | for(n=1, p=path.pStart; p; p=p->u.pTo, n++){ |
| 267 | 280 | char *z; |
| @@ -430,11 +443,11 @@ | ||
| 430 | 443 | }else if(0==iTo){ |
| 431 | 444 | fossil_fatal("Invalid 'to' RID: 0"); |
| 432 | 445 | } |
| 433 | 446 | if( iFrom==iTo ) return; |
| 434 | 447 | path_reset(); |
| 435 | - p = path_shortest(iFrom, iTo, 1, revOk==0); | |
| 448 | + p = path_shortest(iFrom, iTo, 1, revOk==0, 0); | |
| 436 | 449 | if( p==0 ) return; |
| 437 | 450 | path_reverse_path(); |
| 438 | 451 | db_prepare(&q1, |
| 439 | 452 | "SELECT pfnid, fnid FROM mlink" |
| 440 | 453 | " WHERE mid=:mid AND (pfnid>0 OR fid==0)" |
| 441 | 454 |
| --- src/path.c | |
| +++ src/path.c | |
| @@ -44,10 +44,11 @@ | |
| 44 | static struct { |
| 45 | PathNode *pCurrent; /* Current generation of nodes */ |
| 46 | PathNode *pAll; /* All nodes */ |
| 47 | Bag seen; /* Nodes seen before */ |
| 48 | int nStep; /* Number of steps from first to last */ |
| 49 | PathNode *pStart; /* Earliest node */ |
| 50 | PathNode *pEnd; /* Most recent */ |
| 51 | } path; |
| 52 | |
| 53 | /* |
| @@ -59,10 +60,15 @@ | |
| 59 | /* |
| 60 | ** Return the number of steps in the computed path. |
| 61 | */ |
| 62 | int path_length(void){ return path.nStep; } |
| 63 | |
| 64 | /* |
| 65 | ** Create a new node |
| 66 | */ |
| 67 | static PathNode *path_new_node(int rid, PathNode *pFrom, int isParent){ |
| 68 | PathNode *p; |
| @@ -121,11 +127,12 @@ | |
| 121 | */ |
| 122 | PathNode *path_shortest( |
| 123 | int iFrom, /* Path starts here */ |
| 124 | int iTo, /* Path ends here */ |
| 125 | int directOnly, /* No merge links if true */ |
| 126 | int oneWayOnly /* Parent->child only if true */ |
| 127 | ){ |
| 128 | Stmt s; |
| 129 | PathNode *pPrev; |
| 130 | PathNode *p; |
| 131 | |
| @@ -165,14 +172,18 @@ | |
| 165 | while( db_step(&s)==SQLITE_ROW ){ |
| 166 | int cid = db_column_int(&s, 0); |
| 167 | int isParent = db_column_int(&s, 1); |
| 168 | if( bag_find(&path.seen, cid) ) continue; |
| 169 | p = path_new_node(cid, pPrev, isParent); |
| 170 | if( cid==iTo ){ |
| 171 | db_finalize(&s); |
| 172 | path.pEnd = p; |
| 173 | path_reverse_path(); |
| 174 | return path.pStart; |
| 175 | } |
| 176 | } |
| 177 | db_reset(&s); |
| 178 | pPrev = pPrev->u.pPeer; |
| @@ -188,22 +199,24 @@ | |
| 188 | ** 2 steps, return 0. |
| 189 | */ |
| 190 | PathNode *path_midpoint(void){ |
| 191 | PathNode *p; |
| 192 | int i; |
| 193 | if( path.nStep<2 ) return 0; |
| 194 | for(p=path.pEnd, i=0; p && i<path.nStep/2; p=p->pFrom, i++){} |
| 195 | return p; |
| 196 | } |
| 197 | |
| 198 | /* |
| 199 | ** Return an estimate of the number of comparisons remaining in order |
| 200 | ** to bisect path. This is based on the log2() of path.nStep. |
| 201 | */ |
| 202 | int path_search_depth(void){ |
| 203 | int i, j; |
| 204 | for(i=0, j=1; j<path.nStep; i++, j+=j){} |
| 205 | return i; |
| 206 | } |
| 207 | |
| 208 | /* |
| 209 | ** Compute the shortest path between two check-ins and then transfer |
| @@ -215,11 +228,11 @@ | |
| 215 | int cid /* RID for check-in at the end of the path */ |
| 216 | ){ |
| 217 | PathNode *pPath; |
| 218 | int gen = 0; |
| 219 | Stmt ins; |
| 220 | pPath = path_shortest(cid, origid, 1, 0); |
| 221 | db_multi_exec( |
| 222 | "CREATE TEMP TABLE IF NOT EXISTS ancestor(" |
| 223 | " rid INT UNIQUE," |
| 224 | " generation INTEGER PRIMARY KEY" |
| 225 | ");" |
| @@ -257,11 +270,11 @@ | |
| 257 | directOnly = find_option("no-merge",0,0)!=0; |
| 258 | oneWay = find_option("one-way",0,0)!=0; |
| 259 | if( g.argc!=4 ) usage("VERSION1 VERSION2"); |
| 260 | iFrom = name_to_rid(g.argv[2]); |
| 261 | iTo = name_to_rid(g.argv[3]); |
| 262 | p = path_shortest(iFrom, iTo, directOnly, oneWay); |
| 263 | if( p==0 ){ |
| 264 | fossil_fatal("no path from %s to %s", g.argv[1], g.argv[2]); |
| 265 | } |
| 266 | for(n=1, p=path.pStart; p; p=p->u.pTo, n++){ |
| 267 | char *z; |
| @@ -430,11 +443,11 @@ | |
| 430 | }else if(0==iTo){ |
| 431 | fossil_fatal("Invalid 'to' RID: 0"); |
| 432 | } |
| 433 | if( iFrom==iTo ) return; |
| 434 | path_reset(); |
| 435 | p = path_shortest(iFrom, iTo, 1, revOk==0); |
| 436 | if( p==0 ) return; |
| 437 | path_reverse_path(); |
| 438 | db_prepare(&q1, |
| 439 | "SELECT pfnid, fnid FROM mlink" |
| 440 | " WHERE mid=:mid AND (pfnid>0 OR fid==0)" |
| 441 |
| --- src/path.c | |
| +++ src/path.c | |
| @@ -44,10 +44,11 @@ | |
| 44 | static struct { |
| 45 | PathNode *pCurrent; /* Current generation of nodes */ |
| 46 | PathNode *pAll; /* All nodes */ |
| 47 | Bag seen; /* Nodes seen before */ |
| 48 | int nStep; /* Number of steps from first to last */ |
| 49 | int nNotHidden; /* Number of steps not counting hidden nodes */ |
| 50 | PathNode *pStart; /* Earliest node */ |
| 51 | PathNode *pEnd; /* Most recent */ |
| 52 | } path; |
| 53 | |
| 54 | /* |
| @@ -59,10 +60,15 @@ | |
| 60 | /* |
| 61 | ** Return the number of steps in the computed path. |
| 62 | */ |
| 63 | int path_length(void){ return path.nStep; } |
| 64 | |
| 65 | /* |
| 66 | ** Return the number of non-hidden steps in the computed path. |
| 67 | */ |
| 68 | int path_length_not_hidden(void){ return path.nNotHidden; } |
| 69 | |
| 70 | /* |
| 71 | ** Create a new node |
| 72 | */ |
| 73 | static PathNode *path_new_node(int rid, PathNode *pFrom, int isParent){ |
| 74 | PathNode *p; |
| @@ -121,11 +127,12 @@ | |
| 127 | */ |
| 128 | PathNode *path_shortest( |
| 129 | int iFrom, /* Path starts here */ |
| 130 | int iTo, /* Path ends here */ |
| 131 | int directOnly, /* No merge links if true */ |
| 132 | int oneWayOnly, /* Parent->child only if true */ |
| 133 | Bag *pHidden /* Hidden nodes */ |
| 134 | ){ |
| 135 | Stmt s; |
| 136 | PathNode *pPrev; |
| 137 | PathNode *p; |
| 138 | |
| @@ -165,14 +172,18 @@ | |
| 172 | while( db_step(&s)==SQLITE_ROW ){ |
| 173 | int cid = db_column_int(&s, 0); |
| 174 | int isParent = db_column_int(&s, 1); |
| 175 | if( bag_find(&path.seen, cid) ) continue; |
| 176 | p = path_new_node(cid, pPrev, isParent); |
| 177 | if( pHidden && bag_find(pHidden,cid) ) p->isHidden = 1; |
| 178 | if( cid==iTo ){ |
| 179 | db_finalize(&s); |
| 180 | path.pEnd = p; |
| 181 | path_reverse_path(); |
| 182 | for(p=path.pStart->u.pTo; p; p=p->u.pTo ){ |
| 183 | if( !p->isHidden ) path.nNotHidden++; |
| 184 | } |
| 185 | return path.pStart; |
| 186 | } |
| 187 | } |
| 188 | db_reset(&s); |
| 189 | pPrev = pPrev->u.pPeer; |
| @@ -188,22 +199,24 @@ | |
| 199 | ** 2 steps, return 0. |
| 200 | */ |
| 201 | PathNode *path_midpoint(void){ |
| 202 | PathNode *p; |
| 203 | int i; |
| 204 | if( path.nNotHidden<2 ) return 0; |
| 205 | for(p=path.pEnd, i=0; p && (p->isHidden || i<path.nNotHidden/2); p=p->pFrom){ |
| 206 | if( !p->isHidden ) i++; |
| 207 | } |
| 208 | return p; |
| 209 | } |
| 210 | |
| 211 | /* |
| 212 | ** Return an estimate of the number of comparisons remaining in order |
| 213 | ** to bisect path. This is based on the log2() of path.nStep. |
| 214 | */ |
| 215 | int path_search_depth(void){ |
| 216 | int i, j; |
| 217 | for(i=0, j=1; j<path.nNotHidden; i++, j+=j){} |
| 218 | return i; |
| 219 | } |
| 220 | |
| 221 | /* |
| 222 | ** Compute the shortest path between two check-ins and then transfer |
| @@ -215,11 +228,11 @@ | |
| 228 | int cid /* RID for check-in at the end of the path */ |
| 229 | ){ |
| 230 | PathNode *pPath; |
| 231 | int gen = 0; |
| 232 | Stmt ins; |
| 233 | pPath = path_shortest(cid, origid, 1, 0, 0); |
| 234 | db_multi_exec( |
| 235 | "CREATE TEMP TABLE IF NOT EXISTS ancestor(" |
| 236 | " rid INT UNIQUE," |
| 237 | " generation INTEGER PRIMARY KEY" |
| 238 | ");" |
| @@ -257,11 +270,11 @@ | |
| 270 | directOnly = find_option("no-merge",0,0)!=0; |
| 271 | oneWay = find_option("one-way",0,0)!=0; |
| 272 | if( g.argc!=4 ) usage("VERSION1 VERSION2"); |
| 273 | iFrom = name_to_rid(g.argv[2]); |
| 274 | iTo = name_to_rid(g.argv[3]); |
| 275 | p = path_shortest(iFrom, iTo, directOnly, oneWay, 0); |
| 276 | if( p==0 ){ |
| 277 | fossil_fatal("no path from %s to %s", g.argv[1], g.argv[2]); |
| 278 | } |
| 279 | for(n=1, p=path.pStart; p; p=p->u.pTo, n++){ |
| 280 | char *z; |
| @@ -430,11 +443,11 @@ | |
| 443 | }else if(0==iTo){ |
| 444 | fossil_fatal("Invalid 'to' RID: 0"); |
| 445 | } |
| 446 | if( iFrom==iTo ) return; |
| 447 | path_reset(); |
| 448 | p = path_shortest(iFrom, iTo, 1, revOk==0, 0); |
| 449 | if( p==0 ) return; |
| 450 | path_reverse_path(); |
| 451 | db_prepare(&q1, |
| 452 | "SELECT pfnid, fnid FROM mlink" |
| 453 | " WHERE mid=:mid AND (pfnid>0 OR fid==0)" |
| 454 |
+2
-2
| --- src/sqlcompattest.c | ||
| +++ src/sqlcompattest.c | ||
| @@ -48,12 +48,12 @@ | ||
| 48 | 48 | "ENABLE_JSON1", /* Required for the check-in locking protocol */ |
| 49 | 49 | "ENABLE_DBSTAT_VTAB", /* Required by /repo-tabsize page */ |
| 50 | 50 | }; |
| 51 | 51 | |
| 52 | 52 | /* Check minimum SQLite version number */ |
| 53 | - if( sqlite3_libversion_number()<3028000 ){ | |
| 54 | - printf("found SQLite version %s but need 3.28.0 or later\n", | |
| 53 | + if( sqlite3_libversion_number()<3033000 ){ | |
| 54 | + printf("found SQLite version %s but need 3.33.0 or later\n", | |
| 55 | 55 | sqlite3_libversion()); |
| 56 | 56 | return 1; |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | for(i=0; i<sizeof(zRequiredOpts)/sizeof(zRequiredOpts[0]); i++){ |
| 60 | 60 |
| --- src/sqlcompattest.c | |
| +++ src/sqlcompattest.c | |
| @@ -48,12 +48,12 @@ | |
| 48 | "ENABLE_JSON1", /* Required for the check-in locking protocol */ |
| 49 | "ENABLE_DBSTAT_VTAB", /* Required by /repo-tabsize page */ |
| 50 | }; |
| 51 | |
| 52 | /* Check minimum SQLite version number */ |
| 53 | if( sqlite3_libversion_number()<3028000 ){ |
| 54 | printf("found SQLite version %s but need 3.28.0 or later\n", |
| 55 | sqlite3_libversion()); |
| 56 | return 1; |
| 57 | } |
| 58 | |
| 59 | for(i=0; i<sizeof(zRequiredOpts)/sizeof(zRequiredOpts[0]); i++){ |
| 60 |
| --- src/sqlcompattest.c | |
| +++ src/sqlcompattest.c | |
| @@ -48,12 +48,12 @@ | |
| 48 | "ENABLE_JSON1", /* Required for the check-in locking protocol */ |
| 49 | "ENABLE_DBSTAT_VTAB", /* Required by /repo-tabsize page */ |
| 50 | }; |
| 51 | |
| 52 | /* Check minimum SQLite version number */ |
| 53 | if( sqlite3_libversion_number()<3033000 ){ |
| 54 | printf("found SQLite version %s but need 3.33.0 or later\n", |
| 55 | sqlite3_libversion()); |
| 56 | return 1; |
| 57 | } |
| 58 | |
| 59 | for(i=0; i<sizeof(zRequiredOpts)/sizeof(zRequiredOpts[0]); i++){ |
| 60 |
-2
| --- src/th_main.c | ||
| +++ src/th_main.c | ||
| @@ -825,15 +825,13 @@ | ||
| 825 | 825 | #if defined(FOSSIL_ENABLE_SSL) |
| 826 | 826 | else if( 0 == fossil_strnicmp( zArg, "ssl\0", 4 ) ){ |
| 827 | 827 | rc = 1; |
| 828 | 828 | } |
| 829 | 829 | #endif |
| 830 | -#if defined(FOSSIL_ENABLE_LEGACY_MV_RM) | |
| 831 | 830 | else if( 0 == fossil_strnicmp( zArg, "legacyMvRm\0", 11 ) ){ |
| 832 | 831 | rc = 1; |
| 833 | 832 | } |
| 834 | -#endif | |
| 835 | 833 | #if defined(FOSSIL_ENABLE_EXEC_REL_PATHS) |
| 836 | 834 | else if( 0 == fossil_strnicmp( zArg, "execRelPaths\0", 13 ) ){ |
| 837 | 835 | rc = 1; |
| 838 | 836 | } |
| 839 | 837 | #endif |
| 840 | 838 |
| --- src/th_main.c | |
| +++ src/th_main.c | |
| @@ -825,15 +825,13 @@ | |
| 825 | #if defined(FOSSIL_ENABLE_SSL) |
| 826 | else if( 0 == fossil_strnicmp( zArg, "ssl\0", 4 ) ){ |
| 827 | rc = 1; |
| 828 | } |
| 829 | #endif |
| 830 | #if defined(FOSSIL_ENABLE_LEGACY_MV_RM) |
| 831 | else if( 0 == fossil_strnicmp( zArg, "legacyMvRm\0", 11 ) ){ |
| 832 | rc = 1; |
| 833 | } |
| 834 | #endif |
| 835 | #if defined(FOSSIL_ENABLE_EXEC_REL_PATHS) |
| 836 | else if( 0 == fossil_strnicmp( zArg, "execRelPaths\0", 13 ) ){ |
| 837 | rc = 1; |
| 838 | } |
| 839 | #endif |
| 840 |
| --- src/th_main.c | |
| +++ src/th_main.c | |
| @@ -825,15 +825,13 @@ | |
| 825 | #if defined(FOSSIL_ENABLE_SSL) |
| 826 | else if( 0 == fossil_strnicmp( zArg, "ssl\0", 4 ) ){ |
| 827 | rc = 1; |
| 828 | } |
| 829 | #endif |
| 830 | else if( 0 == fossil_strnicmp( zArg, "legacyMvRm\0", 11 ) ){ |
| 831 | rc = 1; |
| 832 | } |
| 833 | #if defined(FOSSIL_ENABLE_EXEC_REL_PATHS) |
| 834 | else if( 0 == fossil_strnicmp( zArg, "execRelPaths\0", 13 ) ){ |
| 835 | rc = 1; |
| 836 | } |
| 837 | #endif |
| 838 |
+7
-5
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -516,11 +516,11 @@ | ||
| 516 | 516 | @ <span class="modpending">(Awaiting Moderator Approval)</span> |
| 517 | 517 | } |
| 518 | 518 | if( (tmFlags & TIMELINE_BISECT)!=0 && zType[0]=='c' ){ |
| 519 | 519 | static Stmt bisectQuery; |
| 520 | 520 | db_static_prepare(&bisectQuery, |
| 521 | - "SELECT seq, stat FROM bilog WHERE rid=:rid"); | |
| 521 | + "SELECT seq, stat FROM bilog WHERE rid=:rid AND seq"); | |
| 522 | 522 | db_bind_int(&bisectQuery, ":rid", rid); |
| 523 | 523 | if( db_step(&bisectQuery)==SQLITE_ROW ){ |
| 524 | 524 | @ <b>%s(db_column_text(&bisectQuery,1))</b> |
| 525 | 525 | @ (%d(db_column_int(&bisectQuery,0))) |
| 526 | 526 | } |
| @@ -1747,11 +1747,13 @@ | ||
| 1747 | 1747 | || (bisectLocal && !g.perm.Setup) |
| 1748 | 1748 | ){ |
| 1749 | 1749 | login_needed(g.anon.Read && g.anon.RdTkt && g.anon.RdWiki); |
| 1750 | 1750 | return; |
| 1751 | 1751 | } |
| 1752 | - etag_check(ETAG_QUERY|ETAG_COOKIE|ETAG_DATA|ETAG_CONFIG, 0); | |
| 1752 | + if( !bisectLocal ){ | |
| 1753 | + etag_check(ETAG_QUERY|ETAG_COOKIE|ETAG_DATA|ETAG_CONFIG, 0); | |
| 1754 | + } | |
| 1753 | 1755 | cookie_read_parameter("y","y"); |
| 1754 | 1756 | zType = P("y"); |
| 1755 | 1757 | if( zType==0 ){ |
| 1756 | 1758 | zType = g.perm.Read ? "ci" : "all"; |
| 1757 | 1759 | cgi_set_parameter("y", zType); |
| @@ -1911,19 +1913,19 @@ | ||
| 1911 | 1913 | && fossil_strcmp(g.zIpAddr,"127.0.0.1")==0 |
| 1912 | 1914 | && db_open_local(0) |
| 1913 | 1915 | ){ |
| 1914 | 1916 | int iCurrent = db_lget_int("checkout",0); |
| 1915 | 1917 | char *zPerm = bisect_permalink(); |
| 1916 | - bisect_create_bilog_table(iCurrent, 0); | |
| 1918 | + bisect_create_bilog_table(iCurrent, 0, 1); | |
| 1917 | 1919 | tmFlags |= TIMELINE_UNHIDE | TIMELINE_BISECT | TIMELINE_FILLGAPS; |
| 1918 | 1920 | zType = "ci"; |
| 1919 | 1921 | disableY = 1; |
| 1920 | 1922 | style_submenu_element("Permalink", "%R/timeline?bid=%z", zPerm); |
| 1921 | 1923 | }else{ |
| 1922 | 1924 | bisectLocal = 0; |
| 1923 | 1925 | } |
| 1924 | - if( zBisect!=0 && bisect_create_bilog_table(0, zBisect) ){ | |
| 1926 | + if( zBisect!=0 && bisect_create_bilog_table(0, zBisect, 1) ){ | |
| 1925 | 1927 | tmFlags |= TIMELINE_UNHIDE | TIMELINE_BISECT | TIMELINE_FILLGAPS; |
| 1926 | 1928 | zType = "ci"; |
| 1927 | 1929 | disableY = 1; |
| 1928 | 1930 | }else{ |
| 1929 | 1931 | zBisect = 0; |
| @@ -1960,11 +1962,11 @@ | ||
| 1960 | 1962 | const char *zTo = 0; |
| 1961 | 1963 | Blob ins; |
| 1962 | 1964 | int nNodeOnPath = 0; |
| 1963 | 1965 | |
| 1964 | 1966 | if( from_rid && to_rid ){ |
| 1965 | - p = path_shortest(from_rid, to_rid, noMerge, 0); | |
| 1967 | + p = path_shortest(from_rid, to_rid, noMerge, 0, 0); | |
| 1966 | 1968 | zFrom = P("from"); |
| 1967 | 1969 | zTo = P("to"); |
| 1968 | 1970 | }else{ |
| 1969 | 1971 | if( path_common_ancestor(me_rid, you_rid) ){ |
| 1970 | 1972 | p = path_first(); |
| 1971 | 1973 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -516,11 +516,11 @@ | |
| 516 | @ <span class="modpending">(Awaiting Moderator Approval)</span> |
| 517 | } |
| 518 | if( (tmFlags & TIMELINE_BISECT)!=0 && zType[0]=='c' ){ |
| 519 | static Stmt bisectQuery; |
| 520 | db_static_prepare(&bisectQuery, |
| 521 | "SELECT seq, stat FROM bilog WHERE rid=:rid"); |
| 522 | db_bind_int(&bisectQuery, ":rid", rid); |
| 523 | if( db_step(&bisectQuery)==SQLITE_ROW ){ |
| 524 | @ <b>%s(db_column_text(&bisectQuery,1))</b> |
| 525 | @ (%d(db_column_int(&bisectQuery,0))) |
| 526 | } |
| @@ -1747,11 +1747,13 @@ | |
| 1747 | || (bisectLocal && !g.perm.Setup) |
| 1748 | ){ |
| 1749 | login_needed(g.anon.Read && g.anon.RdTkt && g.anon.RdWiki); |
| 1750 | return; |
| 1751 | } |
| 1752 | etag_check(ETAG_QUERY|ETAG_COOKIE|ETAG_DATA|ETAG_CONFIG, 0); |
| 1753 | cookie_read_parameter("y","y"); |
| 1754 | zType = P("y"); |
| 1755 | if( zType==0 ){ |
| 1756 | zType = g.perm.Read ? "ci" : "all"; |
| 1757 | cgi_set_parameter("y", zType); |
| @@ -1911,19 +1913,19 @@ | |
| 1911 | && fossil_strcmp(g.zIpAddr,"127.0.0.1")==0 |
| 1912 | && db_open_local(0) |
| 1913 | ){ |
| 1914 | int iCurrent = db_lget_int("checkout",0); |
| 1915 | char *zPerm = bisect_permalink(); |
| 1916 | bisect_create_bilog_table(iCurrent, 0); |
| 1917 | tmFlags |= TIMELINE_UNHIDE | TIMELINE_BISECT | TIMELINE_FILLGAPS; |
| 1918 | zType = "ci"; |
| 1919 | disableY = 1; |
| 1920 | style_submenu_element("Permalink", "%R/timeline?bid=%z", zPerm); |
| 1921 | }else{ |
| 1922 | bisectLocal = 0; |
| 1923 | } |
| 1924 | if( zBisect!=0 && bisect_create_bilog_table(0, zBisect) ){ |
| 1925 | tmFlags |= TIMELINE_UNHIDE | TIMELINE_BISECT | TIMELINE_FILLGAPS; |
| 1926 | zType = "ci"; |
| 1927 | disableY = 1; |
| 1928 | }else{ |
| 1929 | zBisect = 0; |
| @@ -1960,11 +1962,11 @@ | |
| 1960 | const char *zTo = 0; |
| 1961 | Blob ins; |
| 1962 | int nNodeOnPath = 0; |
| 1963 | |
| 1964 | if( from_rid && to_rid ){ |
| 1965 | p = path_shortest(from_rid, to_rid, noMerge, 0); |
| 1966 | zFrom = P("from"); |
| 1967 | zTo = P("to"); |
| 1968 | }else{ |
| 1969 | if( path_common_ancestor(me_rid, you_rid) ){ |
| 1970 | p = path_first(); |
| 1971 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -516,11 +516,11 @@ | |
| 516 | @ <span class="modpending">(Awaiting Moderator Approval)</span> |
| 517 | } |
| 518 | if( (tmFlags & TIMELINE_BISECT)!=0 && zType[0]=='c' ){ |
| 519 | static Stmt bisectQuery; |
| 520 | db_static_prepare(&bisectQuery, |
| 521 | "SELECT seq, stat FROM bilog WHERE rid=:rid AND seq"); |
| 522 | db_bind_int(&bisectQuery, ":rid", rid); |
| 523 | if( db_step(&bisectQuery)==SQLITE_ROW ){ |
| 524 | @ <b>%s(db_column_text(&bisectQuery,1))</b> |
| 525 | @ (%d(db_column_int(&bisectQuery,0))) |
| 526 | } |
| @@ -1747,11 +1747,13 @@ | |
| 1747 | || (bisectLocal && !g.perm.Setup) |
| 1748 | ){ |
| 1749 | login_needed(g.anon.Read && g.anon.RdTkt && g.anon.RdWiki); |
| 1750 | return; |
| 1751 | } |
| 1752 | if( !bisectLocal ){ |
| 1753 | etag_check(ETAG_QUERY|ETAG_COOKIE|ETAG_DATA|ETAG_CONFIG, 0); |
| 1754 | } |
| 1755 | cookie_read_parameter("y","y"); |
| 1756 | zType = P("y"); |
| 1757 | if( zType==0 ){ |
| 1758 | zType = g.perm.Read ? "ci" : "all"; |
| 1759 | cgi_set_parameter("y", zType); |
| @@ -1911,19 +1913,19 @@ | |
| 1913 | && fossil_strcmp(g.zIpAddr,"127.0.0.1")==0 |
| 1914 | && db_open_local(0) |
| 1915 | ){ |
| 1916 | int iCurrent = db_lget_int("checkout",0); |
| 1917 | char *zPerm = bisect_permalink(); |
| 1918 | bisect_create_bilog_table(iCurrent, 0, 1); |
| 1919 | tmFlags |= TIMELINE_UNHIDE | TIMELINE_BISECT | TIMELINE_FILLGAPS; |
| 1920 | zType = "ci"; |
| 1921 | disableY = 1; |
| 1922 | style_submenu_element("Permalink", "%R/timeline?bid=%z", zPerm); |
| 1923 | }else{ |
| 1924 | bisectLocal = 0; |
| 1925 | } |
| 1926 | if( zBisect!=0 && bisect_create_bilog_table(0, zBisect, 1) ){ |
| 1927 | tmFlags |= TIMELINE_UNHIDE | TIMELINE_BISECT | TIMELINE_FILLGAPS; |
| 1928 | zType = "ci"; |
| 1929 | disableY = 1; |
| 1930 | }else{ |
| 1931 | zBisect = 0; |
| @@ -1960,11 +1962,11 @@ | |
| 1962 | const char *zTo = 0; |
| 1963 | Blob ins; |
| 1964 | int nNodeOnPath = 0; |
| 1965 | |
| 1966 | if( from_rid && to_rid ){ |
| 1967 | p = path_shortest(from_rid, to_rid, noMerge, 0, 0); |
| 1968 | zFrom = P("from"); |
| 1969 | zTo = P("to"); |
| 1970 | }else{ |
| 1971 | if( path_common_ancestor(me_rid, you_rid) ){ |
| 1972 | p = path_first(); |
| 1973 |
+1
-10
| --- win/Makefile.mingw | ||
| +++ win/Makefile.mingw | ||
| @@ -69,14 +69,10 @@ | ||
| 69 | 69 | |
| 70 | 70 | #### Enable relative paths in external diff/gdiff |
| 71 | 71 | # |
| 72 | 72 | # FOSSIL_ENABLE_EXEC_REL_PATHS = 1 |
| 73 | 73 | |
| 74 | -#### Enable legacy treatment of mv/rm (skip checkout files) | |
| 75 | -# | |
| 76 | -FOSSIL_ENABLE_LEGACY_MV_RM = 1 | |
| 77 | - | |
| 78 | 74 | #### Enable TH1 scripts in embedded documentation files |
| 79 | 75 | # |
| 80 | 76 | # FOSSIL_ENABLE_TH1_DOCS = 1 |
| 81 | 77 | |
| 82 | 78 | #### Enable hooks for commands and web pages via TH1 |
| @@ -296,16 +292,10 @@ | ||
| 296 | 292 | ifdef FOSSIL_ENABLE_EXEC_REL_PATHS |
| 297 | 293 | TCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 298 | 294 | RCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 299 | 295 | endif |
| 300 | 296 | |
| 301 | -# With legacy treatment of mv/rm | |
| 302 | -ifdef FOSSIL_ENABLE_LEGACY_MV_RM | |
| 303 | -TCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1 | |
| 304 | -RCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1 | |
| 305 | -endif | |
| 306 | - | |
| 307 | 297 | # With TH1 embedded docs support |
| 308 | 298 | ifdef FOSSIL_ENABLE_TH1_DOCS |
| 309 | 299 | TCC += -DFOSSIL_ENABLE_TH1_DOCS=1 |
| 310 | 300 | RCC += -DFOSSIL_ENABLE_TH1_DOCS=1 |
| 311 | 301 | endif |
| @@ -649,10 +639,11 @@ | ||
| 649 | 639 | $(SRCDIR)/fossil.bootstrap.js \ |
| 650 | 640 | $(SRCDIR)/fossil.confirmer.js \ |
| 651 | 641 | $(SRCDIR)/fossil.dom.js \ |
| 652 | 642 | $(SRCDIR)/fossil.fetch.js \ |
| 653 | 643 | $(SRCDIR)/fossil.page.fileedit.js \ |
| 644 | + $(SRCDIR)/fossil.page.forumpost.js \ | |
| 654 | 645 | $(SRCDIR)/fossil.storage.js \ |
| 655 | 646 | $(SRCDIR)/fossil.tabs.js \ |
| 656 | 647 | $(SRCDIR)/graph.js \ |
| 657 | 648 | $(SRCDIR)/href.js \ |
| 658 | 649 | $(SRCDIR)/login.js \ |
| 659 | 650 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -69,14 +69,10 @@ | |
| 69 | |
| 70 | #### Enable relative paths in external diff/gdiff |
| 71 | # |
| 72 | # FOSSIL_ENABLE_EXEC_REL_PATHS = 1 |
| 73 | |
| 74 | #### Enable legacy treatment of mv/rm (skip checkout files) |
| 75 | # |
| 76 | FOSSIL_ENABLE_LEGACY_MV_RM = 1 |
| 77 | |
| 78 | #### Enable TH1 scripts in embedded documentation files |
| 79 | # |
| 80 | # FOSSIL_ENABLE_TH1_DOCS = 1 |
| 81 | |
| 82 | #### Enable hooks for commands and web pages via TH1 |
| @@ -296,16 +292,10 @@ | |
| 296 | ifdef FOSSIL_ENABLE_EXEC_REL_PATHS |
| 297 | TCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 298 | RCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 299 | endif |
| 300 | |
| 301 | # With legacy treatment of mv/rm |
| 302 | ifdef FOSSIL_ENABLE_LEGACY_MV_RM |
| 303 | TCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1 |
| 304 | RCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1 |
| 305 | endif |
| 306 | |
| 307 | # With TH1 embedded docs support |
| 308 | ifdef FOSSIL_ENABLE_TH1_DOCS |
| 309 | TCC += -DFOSSIL_ENABLE_TH1_DOCS=1 |
| 310 | RCC += -DFOSSIL_ENABLE_TH1_DOCS=1 |
| 311 | endif |
| @@ -649,10 +639,11 @@ | |
| 649 | $(SRCDIR)/fossil.bootstrap.js \ |
| 650 | $(SRCDIR)/fossil.confirmer.js \ |
| 651 | $(SRCDIR)/fossil.dom.js \ |
| 652 | $(SRCDIR)/fossil.fetch.js \ |
| 653 | $(SRCDIR)/fossil.page.fileedit.js \ |
| 654 | $(SRCDIR)/fossil.storage.js \ |
| 655 | $(SRCDIR)/fossil.tabs.js \ |
| 656 | $(SRCDIR)/graph.js \ |
| 657 | $(SRCDIR)/href.js \ |
| 658 | $(SRCDIR)/login.js \ |
| 659 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -69,14 +69,10 @@ | |
| 69 | |
| 70 | #### Enable relative paths in external diff/gdiff |
| 71 | # |
| 72 | # FOSSIL_ENABLE_EXEC_REL_PATHS = 1 |
| 73 | |
| 74 | #### Enable TH1 scripts in embedded documentation files |
| 75 | # |
| 76 | # FOSSIL_ENABLE_TH1_DOCS = 1 |
| 77 | |
| 78 | #### Enable hooks for commands and web pages via TH1 |
| @@ -296,16 +292,10 @@ | |
| 292 | ifdef FOSSIL_ENABLE_EXEC_REL_PATHS |
| 293 | TCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 294 | RCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 295 | endif |
| 296 | |
| 297 | # With TH1 embedded docs support |
| 298 | ifdef FOSSIL_ENABLE_TH1_DOCS |
| 299 | TCC += -DFOSSIL_ENABLE_TH1_DOCS=1 |
| 300 | RCC += -DFOSSIL_ENABLE_TH1_DOCS=1 |
| 301 | endif |
| @@ -649,10 +639,11 @@ | |
| 639 | $(SRCDIR)/fossil.bootstrap.js \ |
| 640 | $(SRCDIR)/fossil.confirmer.js \ |
| 641 | $(SRCDIR)/fossil.dom.js \ |
| 642 | $(SRCDIR)/fossil.fetch.js \ |
| 643 | $(SRCDIR)/fossil.page.fileedit.js \ |
| 644 | $(SRCDIR)/fossil.page.forumpost.js \ |
| 645 | $(SRCDIR)/fossil.storage.js \ |
| 646 | $(SRCDIR)/fossil.tabs.js \ |
| 647 | $(SRCDIR)/graph.js \ |
| 648 | $(SRCDIR)/href.js \ |
| 649 | $(SRCDIR)/login.js \ |
| 650 |
+1
-10
| --- win/Makefile.mingw | ||
| +++ win/Makefile.mingw | ||
| @@ -69,14 +69,10 @@ | ||
| 69 | 69 | |
| 70 | 70 | #### Enable relative paths in external diff/gdiff |
| 71 | 71 | # |
| 72 | 72 | # FOSSIL_ENABLE_EXEC_REL_PATHS = 1 |
| 73 | 73 | |
| 74 | -#### Enable legacy treatment of mv/rm (skip checkout files) | |
| 75 | -# | |
| 76 | -FOSSIL_ENABLE_LEGACY_MV_RM = 1 | |
| 77 | - | |
| 78 | 74 | #### Enable TH1 scripts in embedded documentation files |
| 79 | 75 | # |
| 80 | 76 | # FOSSIL_ENABLE_TH1_DOCS = 1 |
| 81 | 77 | |
| 82 | 78 | #### Enable hooks for commands and web pages via TH1 |
| @@ -296,16 +292,10 @@ | ||
| 296 | 292 | ifdef FOSSIL_ENABLE_EXEC_REL_PATHS |
| 297 | 293 | TCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 298 | 294 | RCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 299 | 295 | endif |
| 300 | 296 | |
| 301 | -# With legacy treatment of mv/rm | |
| 302 | -ifdef FOSSIL_ENABLE_LEGACY_MV_RM | |
| 303 | -TCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1 | |
| 304 | -RCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1 | |
| 305 | -endif | |
| 306 | - | |
| 307 | 297 | # With TH1 embedded docs support |
| 308 | 298 | ifdef FOSSIL_ENABLE_TH1_DOCS |
| 309 | 299 | TCC += -DFOSSIL_ENABLE_TH1_DOCS=1 |
| 310 | 300 | RCC += -DFOSSIL_ENABLE_TH1_DOCS=1 |
| 311 | 301 | endif |
| @@ -649,10 +639,11 @@ | ||
| 649 | 639 | $(SRCDIR)/fossil.bootstrap.js \ |
| 650 | 640 | $(SRCDIR)/fossil.confirmer.js \ |
| 651 | 641 | $(SRCDIR)/fossil.dom.js \ |
| 652 | 642 | $(SRCDIR)/fossil.fetch.js \ |
| 653 | 643 | $(SRCDIR)/fossil.page.fileedit.js \ |
| 644 | + $(SRCDIR)/fossil.page.forumpost.js \ | |
| 654 | 645 | $(SRCDIR)/fossil.storage.js \ |
| 655 | 646 | $(SRCDIR)/fossil.tabs.js \ |
| 656 | 647 | $(SRCDIR)/graph.js \ |
| 657 | 648 | $(SRCDIR)/href.js \ |
| 658 | 649 | $(SRCDIR)/login.js \ |
| 659 | 650 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -69,14 +69,10 @@ | |
| 69 | |
| 70 | #### Enable relative paths in external diff/gdiff |
| 71 | # |
| 72 | # FOSSIL_ENABLE_EXEC_REL_PATHS = 1 |
| 73 | |
| 74 | #### Enable legacy treatment of mv/rm (skip checkout files) |
| 75 | # |
| 76 | FOSSIL_ENABLE_LEGACY_MV_RM = 1 |
| 77 | |
| 78 | #### Enable TH1 scripts in embedded documentation files |
| 79 | # |
| 80 | # FOSSIL_ENABLE_TH1_DOCS = 1 |
| 81 | |
| 82 | #### Enable hooks for commands and web pages via TH1 |
| @@ -296,16 +292,10 @@ | |
| 296 | ifdef FOSSIL_ENABLE_EXEC_REL_PATHS |
| 297 | TCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 298 | RCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 299 | endif |
| 300 | |
| 301 | # With legacy treatment of mv/rm |
| 302 | ifdef FOSSIL_ENABLE_LEGACY_MV_RM |
| 303 | TCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1 |
| 304 | RCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1 |
| 305 | endif |
| 306 | |
| 307 | # With TH1 embedded docs support |
| 308 | ifdef FOSSIL_ENABLE_TH1_DOCS |
| 309 | TCC += -DFOSSIL_ENABLE_TH1_DOCS=1 |
| 310 | RCC += -DFOSSIL_ENABLE_TH1_DOCS=1 |
| 311 | endif |
| @@ -649,10 +639,11 @@ | |
| 649 | $(SRCDIR)/fossil.bootstrap.js \ |
| 650 | $(SRCDIR)/fossil.confirmer.js \ |
| 651 | $(SRCDIR)/fossil.dom.js \ |
| 652 | $(SRCDIR)/fossil.fetch.js \ |
| 653 | $(SRCDIR)/fossil.page.fileedit.js \ |
| 654 | $(SRCDIR)/fossil.storage.js \ |
| 655 | $(SRCDIR)/fossil.tabs.js \ |
| 656 | $(SRCDIR)/graph.js \ |
| 657 | $(SRCDIR)/href.js \ |
| 658 | $(SRCDIR)/login.js \ |
| 659 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -69,14 +69,10 @@ | |
| 69 | |
| 70 | #### Enable relative paths in external diff/gdiff |
| 71 | # |
| 72 | # FOSSIL_ENABLE_EXEC_REL_PATHS = 1 |
| 73 | |
| 74 | #### Enable TH1 scripts in embedded documentation files |
| 75 | # |
| 76 | # FOSSIL_ENABLE_TH1_DOCS = 1 |
| 77 | |
| 78 | #### Enable hooks for commands and web pages via TH1 |
| @@ -296,16 +292,10 @@ | |
| 292 | ifdef FOSSIL_ENABLE_EXEC_REL_PATHS |
| 293 | TCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 294 | RCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 295 | endif |
| 296 | |
| 297 | # With TH1 embedded docs support |
| 298 | ifdef FOSSIL_ENABLE_TH1_DOCS |
| 299 | TCC += -DFOSSIL_ENABLE_TH1_DOCS=1 |
| 300 | RCC += -DFOSSIL_ENABLE_TH1_DOCS=1 |
| 301 | endif |
| @@ -649,10 +639,11 @@ | |
| 639 | $(SRCDIR)/fossil.bootstrap.js \ |
| 640 | $(SRCDIR)/fossil.confirmer.js \ |
| 641 | $(SRCDIR)/fossil.dom.js \ |
| 642 | $(SRCDIR)/fossil.fetch.js \ |
| 643 | $(SRCDIR)/fossil.page.fileedit.js \ |
| 644 | $(SRCDIR)/fossil.page.forumpost.js \ |
| 645 | $(SRCDIR)/fossil.storage.js \ |
| 646 | $(SRCDIR)/fossil.tabs.js \ |
| 647 | $(SRCDIR)/graph.js \ |
| 648 | $(SRCDIR)/href.js \ |
| 649 | $(SRCDIR)/login.js \ |
| 650 |
| --- win/Makefile.mingw.mistachkin | ||
| +++ win/Makefile.mingw.mistachkin | ||
| @@ -69,14 +69,10 @@ | ||
| 69 | 69 | |
| 70 | 70 | #### Enable relative paths in external diff/gdiff |
| 71 | 71 | # |
| 72 | 72 | # FOSSIL_ENABLE_EXEC_REL_PATHS = 1 |
| 73 | 73 | |
| 74 | -#### Enable legacy treatment of mv/rm (skip checkout files) | |
| 75 | -# | |
| 76 | -FOSSIL_ENABLE_LEGACY_MV_RM = 1 | |
| 77 | - | |
| 78 | 74 | #### Enable TH1 scripts in embedded documentation files |
| 79 | 75 | # |
| 80 | 76 | FOSSIL_ENABLE_TH1_DOCS = 1 |
| 81 | 77 | |
| 82 | 78 | #### Enable hooks for commands and web pages via TH1 |
| @@ -296,16 +292,10 @@ | ||
| 296 | 292 | ifdef FOSSIL_ENABLE_EXEC_REL_PATHS |
| 297 | 293 | TCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 298 | 294 | RCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 299 | 295 | endif |
| 300 | 296 | |
| 301 | -# With legacy treatment of mv/rm | |
| 302 | -ifdef FOSSIL_ENABLE_LEGACY_MV_RM | |
| 303 | -TCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1 | |
| 304 | -RCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1 | |
| 305 | -endif | |
| 306 | - | |
| 307 | 297 | # With TH1 embedded docs support |
| 308 | 298 | ifdef FOSSIL_ENABLE_TH1_DOCS |
| 309 | 299 | TCC += -DFOSSIL_ENABLE_TH1_DOCS=1 |
| 310 | 300 | RCC += -DFOSSIL_ENABLE_TH1_DOCS=1 |
| 311 | 301 | endif |
| 312 | 302 |
| --- win/Makefile.mingw.mistachkin | |
| +++ win/Makefile.mingw.mistachkin | |
| @@ -69,14 +69,10 @@ | |
| 69 | |
| 70 | #### Enable relative paths in external diff/gdiff |
| 71 | # |
| 72 | # FOSSIL_ENABLE_EXEC_REL_PATHS = 1 |
| 73 | |
| 74 | #### Enable legacy treatment of mv/rm (skip checkout files) |
| 75 | # |
| 76 | FOSSIL_ENABLE_LEGACY_MV_RM = 1 |
| 77 | |
| 78 | #### Enable TH1 scripts in embedded documentation files |
| 79 | # |
| 80 | FOSSIL_ENABLE_TH1_DOCS = 1 |
| 81 | |
| 82 | #### Enable hooks for commands and web pages via TH1 |
| @@ -296,16 +292,10 @@ | |
| 296 | ifdef FOSSIL_ENABLE_EXEC_REL_PATHS |
| 297 | TCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 298 | RCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 299 | endif |
| 300 | |
| 301 | # With legacy treatment of mv/rm |
| 302 | ifdef FOSSIL_ENABLE_LEGACY_MV_RM |
| 303 | TCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1 |
| 304 | RCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1 |
| 305 | endif |
| 306 | |
| 307 | # With TH1 embedded docs support |
| 308 | ifdef FOSSIL_ENABLE_TH1_DOCS |
| 309 | TCC += -DFOSSIL_ENABLE_TH1_DOCS=1 |
| 310 | RCC += -DFOSSIL_ENABLE_TH1_DOCS=1 |
| 311 | endif |
| 312 |
| --- win/Makefile.mingw.mistachkin | |
| +++ win/Makefile.mingw.mistachkin | |
| @@ -69,14 +69,10 @@ | |
| 69 | |
| 70 | #### Enable relative paths in external diff/gdiff |
| 71 | # |
| 72 | # FOSSIL_ENABLE_EXEC_REL_PATHS = 1 |
| 73 | |
| 74 | #### Enable TH1 scripts in embedded documentation files |
| 75 | # |
| 76 | FOSSIL_ENABLE_TH1_DOCS = 1 |
| 77 | |
| 78 | #### Enable hooks for commands and web pages via TH1 |
| @@ -296,16 +292,10 @@ | |
| 292 | ifdef FOSSIL_ENABLE_EXEC_REL_PATHS |
| 293 | TCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 294 | RCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 295 | endif |
| 296 | |
| 297 | # With TH1 embedded docs support |
| 298 | ifdef FOSSIL_ENABLE_TH1_DOCS |
| 299 | TCC += -DFOSSIL_ENABLE_TH1_DOCS=1 |
| 300 | RCC += -DFOSSIL_ENABLE_TH1_DOCS=1 |
| 301 | endif |
| 302 |
+2
-10
| --- win/Makefile.msc | ||
| +++ win/Makefile.msc | ||
| @@ -70,15 +70,10 @@ | ||
| 70 | 70 | # Enable the JSON API? |
| 71 | 71 | !ifndef FOSSIL_ENABLE_JSON |
| 72 | 72 | FOSSIL_ENABLE_JSON = 0 |
| 73 | 73 | !endif |
| 74 | 74 | |
| 75 | -# Enable legacy treatment of the mv/rm commands? | |
| 76 | -!ifndef FOSSIL_ENABLE_LEGACY_MV_RM | |
| 77 | -FOSSIL_ENABLE_LEGACY_MV_RM = 1 | |
| 78 | -!endif | |
| 79 | - | |
| 80 | 75 | # Enable use of miniz instead of zlib? |
| 81 | 76 | !ifndef FOSSIL_ENABLE_MINIZ |
| 82 | 77 | FOSSIL_ENABLE_MINIZ = 0 |
| 83 | 78 | !endif |
| 84 | 79 | |
| @@ -260,15 +255,10 @@ | ||
| 260 | 255 | !if $(FOSSIL_ENABLE_EXEC_REL_PATHS)!=0 |
| 261 | 256 | TCC = $(TCC) /DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 262 | 257 | RCC = $(RCC) /DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 263 | 258 | !endif |
| 264 | 259 | |
| 265 | -!if $(FOSSIL_ENABLE_LEGACY_MV_RM)!=0 | |
| 266 | -TCC = $(TCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1 | |
| 267 | -RCC = $(RCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1 | |
| 268 | -!endif | |
| 269 | - | |
| 270 | 260 | !if $(FOSSIL_ENABLE_TH1_DOCS)!=0 |
| 271 | 261 | TCC = $(TCC) /DFOSSIL_ENABLE_TH1_DOCS=1 |
| 272 | 262 | RCC = $(RCC) /DFOSSIL_ENABLE_TH1_DOCS=1 |
| 273 | 263 | !endif |
| 274 | 264 | |
| @@ -570,10 +560,11 @@ | ||
| 570 | 560 | "$(SRCDIR)\fossil.bootstrap.js" \ |
| 571 | 561 | "$(SRCDIR)\fossil.confirmer.js" \ |
| 572 | 562 | "$(SRCDIR)\fossil.dom.js" \ |
| 573 | 563 | "$(SRCDIR)\fossil.fetch.js" \ |
| 574 | 564 | "$(SRCDIR)\fossil.page.fileedit.js" \ |
| 565 | + "$(SRCDIR)\fossil.page.forumpost.js" \ | |
| 575 | 566 | "$(SRCDIR)\fossil.storage.js" \ |
| 576 | 567 | "$(SRCDIR)\fossil.tabs.js" \ |
| 577 | 568 | "$(SRCDIR)\graph.js" \ |
| 578 | 569 | "$(SRCDIR)\href.js" \ |
| 579 | 570 | "$(SRCDIR)\login.js" \ |
| @@ -1160,10 +1151,11 @@ | ||
| 1160 | 1151 | echo "$(SRCDIR)\fossil.bootstrap.js" >> $@ |
| 1161 | 1152 | echo "$(SRCDIR)\fossil.confirmer.js" >> $@ |
| 1162 | 1153 | echo "$(SRCDIR)\fossil.dom.js" >> $@ |
| 1163 | 1154 | echo "$(SRCDIR)\fossil.fetch.js" >> $@ |
| 1164 | 1155 | echo "$(SRCDIR)\fossil.page.fileedit.js" >> $@ |
| 1156 | + echo "$(SRCDIR)\fossil.page.forumpost.js" >> $@ | |
| 1165 | 1157 | echo "$(SRCDIR)\fossil.storage.js" >> $@ |
| 1166 | 1158 | echo "$(SRCDIR)\fossil.tabs.js" >> $@ |
| 1167 | 1159 | echo "$(SRCDIR)\graph.js" >> $@ |
| 1168 | 1160 | echo "$(SRCDIR)\href.js" >> $@ |
| 1169 | 1161 | echo "$(SRCDIR)\login.js" >> $@ |
| 1170 | 1162 |
| --- win/Makefile.msc | |
| +++ win/Makefile.msc | |
| @@ -70,15 +70,10 @@ | |
| 70 | # Enable the JSON API? |
| 71 | !ifndef FOSSIL_ENABLE_JSON |
| 72 | FOSSIL_ENABLE_JSON = 0 |
| 73 | !endif |
| 74 | |
| 75 | # Enable legacy treatment of the mv/rm commands? |
| 76 | !ifndef FOSSIL_ENABLE_LEGACY_MV_RM |
| 77 | FOSSIL_ENABLE_LEGACY_MV_RM = 1 |
| 78 | !endif |
| 79 | |
| 80 | # Enable use of miniz instead of zlib? |
| 81 | !ifndef FOSSIL_ENABLE_MINIZ |
| 82 | FOSSIL_ENABLE_MINIZ = 0 |
| 83 | !endif |
| 84 | |
| @@ -260,15 +255,10 @@ | |
| 260 | !if $(FOSSIL_ENABLE_EXEC_REL_PATHS)!=0 |
| 261 | TCC = $(TCC) /DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 262 | RCC = $(RCC) /DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 263 | !endif |
| 264 | |
| 265 | !if $(FOSSIL_ENABLE_LEGACY_MV_RM)!=0 |
| 266 | TCC = $(TCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1 |
| 267 | RCC = $(RCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1 |
| 268 | !endif |
| 269 | |
| 270 | !if $(FOSSIL_ENABLE_TH1_DOCS)!=0 |
| 271 | TCC = $(TCC) /DFOSSIL_ENABLE_TH1_DOCS=1 |
| 272 | RCC = $(RCC) /DFOSSIL_ENABLE_TH1_DOCS=1 |
| 273 | !endif |
| 274 | |
| @@ -570,10 +560,11 @@ | |
| 570 | "$(SRCDIR)\fossil.bootstrap.js" \ |
| 571 | "$(SRCDIR)\fossil.confirmer.js" \ |
| 572 | "$(SRCDIR)\fossil.dom.js" \ |
| 573 | "$(SRCDIR)\fossil.fetch.js" \ |
| 574 | "$(SRCDIR)\fossil.page.fileedit.js" \ |
| 575 | "$(SRCDIR)\fossil.storage.js" \ |
| 576 | "$(SRCDIR)\fossil.tabs.js" \ |
| 577 | "$(SRCDIR)\graph.js" \ |
| 578 | "$(SRCDIR)\href.js" \ |
| 579 | "$(SRCDIR)\login.js" \ |
| @@ -1160,10 +1151,11 @@ | |
| 1160 | echo "$(SRCDIR)\fossil.bootstrap.js" >> $@ |
| 1161 | echo "$(SRCDIR)\fossil.confirmer.js" >> $@ |
| 1162 | echo "$(SRCDIR)\fossil.dom.js" >> $@ |
| 1163 | echo "$(SRCDIR)\fossil.fetch.js" >> $@ |
| 1164 | echo "$(SRCDIR)\fossil.page.fileedit.js" >> $@ |
| 1165 | echo "$(SRCDIR)\fossil.storage.js" >> $@ |
| 1166 | echo "$(SRCDIR)\fossil.tabs.js" >> $@ |
| 1167 | echo "$(SRCDIR)\graph.js" >> $@ |
| 1168 | echo "$(SRCDIR)\href.js" >> $@ |
| 1169 | echo "$(SRCDIR)\login.js" >> $@ |
| 1170 |
| --- win/Makefile.msc | |
| +++ win/Makefile.msc | |
| @@ -70,15 +70,10 @@ | |
| 70 | # Enable the JSON API? |
| 71 | !ifndef FOSSIL_ENABLE_JSON |
| 72 | FOSSIL_ENABLE_JSON = 0 |
| 73 | !endif |
| 74 | |
| 75 | # Enable use of miniz instead of zlib? |
| 76 | !ifndef FOSSIL_ENABLE_MINIZ |
| 77 | FOSSIL_ENABLE_MINIZ = 0 |
| 78 | !endif |
| 79 | |
| @@ -260,15 +255,10 @@ | |
| 255 | !if $(FOSSIL_ENABLE_EXEC_REL_PATHS)!=0 |
| 256 | TCC = $(TCC) /DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 257 | RCC = $(RCC) /DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 258 | !endif |
| 259 | |
| 260 | !if $(FOSSIL_ENABLE_TH1_DOCS)!=0 |
| 261 | TCC = $(TCC) /DFOSSIL_ENABLE_TH1_DOCS=1 |
| 262 | RCC = $(RCC) /DFOSSIL_ENABLE_TH1_DOCS=1 |
| 263 | !endif |
| 264 | |
| @@ -570,10 +560,11 @@ | |
| 560 | "$(SRCDIR)\fossil.bootstrap.js" \ |
| 561 | "$(SRCDIR)\fossil.confirmer.js" \ |
| 562 | "$(SRCDIR)\fossil.dom.js" \ |
| 563 | "$(SRCDIR)\fossil.fetch.js" \ |
| 564 | "$(SRCDIR)\fossil.page.fileedit.js" \ |
| 565 | "$(SRCDIR)\fossil.page.forumpost.js" \ |
| 566 | "$(SRCDIR)\fossil.storage.js" \ |
| 567 | "$(SRCDIR)\fossil.tabs.js" \ |
| 568 | "$(SRCDIR)\graph.js" \ |
| 569 | "$(SRCDIR)\href.js" \ |
| 570 | "$(SRCDIR)\login.js" \ |
| @@ -1160,10 +1151,11 @@ | |
| 1151 | echo "$(SRCDIR)\fossil.bootstrap.js" >> $@ |
| 1152 | echo "$(SRCDIR)\fossil.confirmer.js" >> $@ |
| 1153 | echo "$(SRCDIR)\fossil.dom.js" >> $@ |
| 1154 | echo "$(SRCDIR)\fossil.fetch.js" >> $@ |
| 1155 | echo "$(SRCDIR)\fossil.page.fileedit.js" >> $@ |
| 1156 | echo "$(SRCDIR)\fossil.page.forumpost.js" >> $@ |
| 1157 | echo "$(SRCDIR)\fossil.storage.js" >> $@ |
| 1158 | echo "$(SRCDIR)\fossil.tabs.js" >> $@ |
| 1159 | echo "$(SRCDIR)\graph.js" >> $@ |
| 1160 | echo "$(SRCDIR)\href.js" >> $@ |
| 1161 | echo "$(SRCDIR)\login.js" >> $@ |
| 1162 |
+2
-10
| --- win/Makefile.msc | ||
| +++ win/Makefile.msc | ||
| @@ -70,15 +70,10 @@ | ||
| 70 | 70 | # Enable the JSON API? |
| 71 | 71 | !ifndef FOSSIL_ENABLE_JSON |
| 72 | 72 | FOSSIL_ENABLE_JSON = 0 |
| 73 | 73 | !endif |
| 74 | 74 | |
| 75 | -# Enable legacy treatment of the mv/rm commands? | |
| 76 | -!ifndef FOSSIL_ENABLE_LEGACY_MV_RM | |
| 77 | -FOSSIL_ENABLE_LEGACY_MV_RM = 1 | |
| 78 | -!endif | |
| 79 | - | |
| 80 | 75 | # Enable use of miniz instead of zlib? |
| 81 | 76 | !ifndef FOSSIL_ENABLE_MINIZ |
| 82 | 77 | FOSSIL_ENABLE_MINIZ = 0 |
| 83 | 78 | !endif |
| 84 | 79 | |
| @@ -260,15 +255,10 @@ | ||
| 260 | 255 | !if $(FOSSIL_ENABLE_EXEC_REL_PATHS)!=0 |
| 261 | 256 | TCC = $(TCC) /DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 262 | 257 | RCC = $(RCC) /DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 263 | 258 | !endif |
| 264 | 259 | |
| 265 | -!if $(FOSSIL_ENABLE_LEGACY_MV_RM)!=0 | |
| 266 | -TCC = $(TCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1 | |
| 267 | -RCC = $(RCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1 | |
| 268 | -!endif | |
| 269 | - | |
| 270 | 260 | !if $(FOSSIL_ENABLE_TH1_DOCS)!=0 |
| 271 | 261 | TCC = $(TCC) /DFOSSIL_ENABLE_TH1_DOCS=1 |
| 272 | 262 | RCC = $(RCC) /DFOSSIL_ENABLE_TH1_DOCS=1 |
| 273 | 263 | !endif |
| 274 | 264 | |
| @@ -570,10 +560,11 @@ | ||
| 570 | 560 | "$(SRCDIR)\fossil.bootstrap.js" \ |
| 571 | 561 | "$(SRCDIR)\fossil.confirmer.js" \ |
| 572 | 562 | "$(SRCDIR)\fossil.dom.js" \ |
| 573 | 563 | "$(SRCDIR)\fossil.fetch.js" \ |
| 574 | 564 | "$(SRCDIR)\fossil.page.fileedit.js" \ |
| 565 | + "$(SRCDIR)\fossil.page.forumpost.js" \ | |
| 575 | 566 | "$(SRCDIR)\fossil.storage.js" \ |
| 576 | 567 | "$(SRCDIR)\fossil.tabs.js" \ |
| 577 | 568 | "$(SRCDIR)\graph.js" \ |
| 578 | 569 | "$(SRCDIR)\href.js" \ |
| 579 | 570 | "$(SRCDIR)\login.js" \ |
| @@ -1160,10 +1151,11 @@ | ||
| 1160 | 1151 | echo "$(SRCDIR)\fossil.bootstrap.js" >> $@ |
| 1161 | 1152 | echo "$(SRCDIR)\fossil.confirmer.js" >> $@ |
| 1162 | 1153 | echo "$(SRCDIR)\fossil.dom.js" >> $@ |
| 1163 | 1154 | echo "$(SRCDIR)\fossil.fetch.js" >> $@ |
| 1164 | 1155 | echo "$(SRCDIR)\fossil.page.fileedit.js" >> $@ |
| 1156 | + echo "$(SRCDIR)\fossil.page.forumpost.js" >> $@ | |
| 1165 | 1157 | echo "$(SRCDIR)\fossil.storage.js" >> $@ |
| 1166 | 1158 | echo "$(SRCDIR)\fossil.tabs.js" >> $@ |
| 1167 | 1159 | echo "$(SRCDIR)\graph.js" >> $@ |
| 1168 | 1160 | echo "$(SRCDIR)\href.js" >> $@ |
| 1169 | 1161 | echo "$(SRCDIR)\login.js" >> $@ |
| 1170 | 1162 |
| --- win/Makefile.msc | |
| +++ win/Makefile.msc | |
| @@ -70,15 +70,10 @@ | |
| 70 | # Enable the JSON API? |
| 71 | !ifndef FOSSIL_ENABLE_JSON |
| 72 | FOSSIL_ENABLE_JSON = 0 |
| 73 | !endif |
| 74 | |
| 75 | # Enable legacy treatment of the mv/rm commands? |
| 76 | !ifndef FOSSIL_ENABLE_LEGACY_MV_RM |
| 77 | FOSSIL_ENABLE_LEGACY_MV_RM = 1 |
| 78 | !endif |
| 79 | |
| 80 | # Enable use of miniz instead of zlib? |
| 81 | !ifndef FOSSIL_ENABLE_MINIZ |
| 82 | FOSSIL_ENABLE_MINIZ = 0 |
| 83 | !endif |
| 84 | |
| @@ -260,15 +255,10 @@ | |
| 260 | !if $(FOSSIL_ENABLE_EXEC_REL_PATHS)!=0 |
| 261 | TCC = $(TCC) /DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 262 | RCC = $(RCC) /DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 263 | !endif |
| 264 | |
| 265 | !if $(FOSSIL_ENABLE_LEGACY_MV_RM)!=0 |
| 266 | TCC = $(TCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1 |
| 267 | RCC = $(RCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1 |
| 268 | !endif |
| 269 | |
| 270 | !if $(FOSSIL_ENABLE_TH1_DOCS)!=0 |
| 271 | TCC = $(TCC) /DFOSSIL_ENABLE_TH1_DOCS=1 |
| 272 | RCC = $(RCC) /DFOSSIL_ENABLE_TH1_DOCS=1 |
| 273 | !endif |
| 274 | |
| @@ -570,10 +560,11 @@ | |
| 570 | "$(SRCDIR)\fossil.bootstrap.js" \ |
| 571 | "$(SRCDIR)\fossil.confirmer.js" \ |
| 572 | "$(SRCDIR)\fossil.dom.js" \ |
| 573 | "$(SRCDIR)\fossil.fetch.js" \ |
| 574 | "$(SRCDIR)\fossil.page.fileedit.js" \ |
| 575 | "$(SRCDIR)\fossil.storage.js" \ |
| 576 | "$(SRCDIR)\fossil.tabs.js" \ |
| 577 | "$(SRCDIR)\graph.js" \ |
| 578 | "$(SRCDIR)\href.js" \ |
| 579 | "$(SRCDIR)\login.js" \ |
| @@ -1160,10 +1151,11 @@ | |
| 1160 | echo "$(SRCDIR)\fossil.bootstrap.js" >> $@ |
| 1161 | echo "$(SRCDIR)\fossil.confirmer.js" >> $@ |
| 1162 | echo "$(SRCDIR)\fossil.dom.js" >> $@ |
| 1163 | echo "$(SRCDIR)\fossil.fetch.js" >> $@ |
| 1164 | echo "$(SRCDIR)\fossil.page.fileedit.js" >> $@ |
| 1165 | echo "$(SRCDIR)\fossil.storage.js" >> $@ |
| 1166 | echo "$(SRCDIR)\fossil.tabs.js" >> $@ |
| 1167 | echo "$(SRCDIR)\graph.js" >> $@ |
| 1168 | echo "$(SRCDIR)\href.js" >> $@ |
| 1169 | echo "$(SRCDIR)\login.js" >> $@ |
| 1170 |
| --- win/Makefile.msc | |
| +++ win/Makefile.msc | |
| @@ -70,15 +70,10 @@ | |
| 70 | # Enable the JSON API? |
| 71 | !ifndef FOSSIL_ENABLE_JSON |
| 72 | FOSSIL_ENABLE_JSON = 0 |
| 73 | !endif |
| 74 | |
| 75 | # Enable use of miniz instead of zlib? |
| 76 | !ifndef FOSSIL_ENABLE_MINIZ |
| 77 | FOSSIL_ENABLE_MINIZ = 0 |
| 78 | !endif |
| 79 | |
| @@ -260,15 +255,10 @@ | |
| 255 | !if $(FOSSIL_ENABLE_EXEC_REL_PATHS)!=0 |
| 256 | TCC = $(TCC) /DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 257 | RCC = $(RCC) /DFOSSIL_ENABLE_EXEC_REL_PATHS=1 |
| 258 | !endif |
| 259 | |
| 260 | !if $(FOSSIL_ENABLE_TH1_DOCS)!=0 |
| 261 | TCC = $(TCC) /DFOSSIL_ENABLE_TH1_DOCS=1 |
| 262 | RCC = $(RCC) /DFOSSIL_ENABLE_TH1_DOCS=1 |
| 263 | !endif |
| 264 | |
| @@ -570,10 +560,11 @@ | |
| 560 | "$(SRCDIR)\fossil.bootstrap.js" \ |
| 561 | "$(SRCDIR)\fossil.confirmer.js" \ |
| 562 | "$(SRCDIR)\fossil.dom.js" \ |
| 563 | "$(SRCDIR)\fossil.fetch.js" \ |
| 564 | "$(SRCDIR)\fossil.page.fileedit.js" \ |
| 565 | "$(SRCDIR)\fossil.page.forumpost.js" \ |
| 566 | "$(SRCDIR)\fossil.storage.js" \ |
| 567 | "$(SRCDIR)\fossil.tabs.js" \ |
| 568 | "$(SRCDIR)\graph.js" \ |
| 569 | "$(SRCDIR)\href.js" \ |
| 570 | "$(SRCDIR)\login.js" \ |
| @@ -1160,10 +1151,11 @@ | |
| 1151 | echo "$(SRCDIR)\fossil.bootstrap.js" >> $@ |
| 1152 | echo "$(SRCDIR)\fossil.confirmer.js" >> $@ |
| 1153 | echo "$(SRCDIR)\fossil.dom.js" >> $@ |
| 1154 | echo "$(SRCDIR)\fossil.fetch.js" >> $@ |
| 1155 | echo "$(SRCDIR)\fossil.page.fileedit.js" >> $@ |
| 1156 | echo "$(SRCDIR)\fossil.page.forumpost.js" >> $@ |
| 1157 | echo "$(SRCDIR)\fossil.storage.js" >> $@ |
| 1158 | echo "$(SRCDIR)\fossil.tabs.js" >> $@ |
| 1159 | echo "$(SRCDIR)\graph.js" >> $@ |
| 1160 | echo "$(SRCDIR)\href.js" >> $@ |
| 1161 | echo "$(SRCDIR)\login.js" >> $@ |
| 1162 |
-4
| --- win/fossil.rc | ||
| +++ win/fossil.rc | ||
| @@ -120,15 +120,11 @@ | ||
| 120 | 120 | VALUE "CommandLineIsUnicode", "Yes\0" |
| 121 | 121 | #endif /* defined(BROKEN_MINGW_CMDLINE) */ |
| 122 | 122 | #if defined(FOSSIL_ENABLE_SSL) |
| 123 | 123 | VALUE "SslEnabled", "Yes, " OPENSSL_VERSION_TEXT "\0" |
| 124 | 124 | #endif /* defined(FOSSIL_ENABLE_SSL) */ |
| 125 | -#if defined(FOSSIL_ENABLE_LEGACY_MV_RM) | |
| 126 | 125 | VALUE "LegacyMvRm", "Yes\0" |
| 127 | -#else | |
| 128 | - VALUE "LegacyMvRm", "No\0" | |
| 129 | -#endif /* defined(FOSSIL_ENABLE_LEGACY_MV_RM) */ | |
| 130 | 126 | #if defined(FOSSIL_ENABLE_EXEC_REL_PATHS) |
| 131 | 127 | VALUE "ExecRelPaths", "Yes\0" |
| 132 | 128 | #else |
| 133 | 129 | VALUE "ExecRelPaths", "No\0" |
| 134 | 130 | #endif /* defined(FOSSIL_ENABLE_EXEC_REL_PATHS) */ |
| 135 | 131 |
| --- win/fossil.rc | |
| +++ win/fossil.rc | |
| @@ -120,15 +120,11 @@ | |
| 120 | VALUE "CommandLineIsUnicode", "Yes\0" |
| 121 | #endif /* defined(BROKEN_MINGW_CMDLINE) */ |
| 122 | #if defined(FOSSIL_ENABLE_SSL) |
| 123 | VALUE "SslEnabled", "Yes, " OPENSSL_VERSION_TEXT "\0" |
| 124 | #endif /* defined(FOSSIL_ENABLE_SSL) */ |
| 125 | #if defined(FOSSIL_ENABLE_LEGACY_MV_RM) |
| 126 | VALUE "LegacyMvRm", "Yes\0" |
| 127 | #else |
| 128 | VALUE "LegacyMvRm", "No\0" |
| 129 | #endif /* defined(FOSSIL_ENABLE_LEGACY_MV_RM) */ |
| 130 | #if defined(FOSSIL_ENABLE_EXEC_REL_PATHS) |
| 131 | VALUE "ExecRelPaths", "Yes\0" |
| 132 | #else |
| 133 | VALUE "ExecRelPaths", "No\0" |
| 134 | #endif /* defined(FOSSIL_ENABLE_EXEC_REL_PATHS) */ |
| 135 |
| --- win/fossil.rc | |
| +++ win/fossil.rc | |
| @@ -120,15 +120,11 @@ | |
| 120 | VALUE "CommandLineIsUnicode", "Yes\0" |
| 121 | #endif /* defined(BROKEN_MINGW_CMDLINE) */ |
| 122 | #if defined(FOSSIL_ENABLE_SSL) |
| 123 | VALUE "SslEnabled", "Yes, " OPENSSL_VERSION_TEXT "\0" |
| 124 | #endif /* defined(FOSSIL_ENABLE_SSL) */ |
| 125 | VALUE "LegacyMvRm", "Yes\0" |
| 126 | #if defined(FOSSIL_ENABLE_EXEC_REL_PATHS) |
| 127 | VALUE "ExecRelPaths", "Yes\0" |
| 128 | #else |
| 129 | VALUE "ExecRelPaths", "No\0" |
| 130 | #endif /* defined(FOSSIL_ENABLE_EXEC_REL_PATHS) */ |
| 131 |