Fossil SCM
merge trunk (ongoing)
Commit
2e45fb7b3915872d7fb94e4e611a7a359f9af8e5
Parent
c0d1ed927ec2194…
36 files changed
+1
-1
+8
+18
-1
+2
-2
+1
-1
+1
-2
+3
-3
+8
+43
-67
+43
-67
+1
-1
+1
-1
+2
-2
+68
-68
+1
+14
+3
-3
+11
-1
+1
+13
-1
+23
-16
+2
-2
+6
-1
+7
-3
+1
-1
+1
+3
-3
+4
-4
+12
-12
+1
+1
+10
-4
+12
+12
+10
+67
~
Makefile.Cygwin.in
~
src/add.c
~
src/allrepo.c
~
src/attach.c
~
src/branch.c
~
src/captcha.c
~
src/checkin.c
~
src/db.c
~
src/diff.c
~
src/diff.c
~
src/diffcmd.c
~
src/diffcmd.c
~
src/event.c
~
src/info.c
~
src/loadctrl.c
~
src/login.c
~
src/main.c
~
src/main.mk
~
src/makemake.tcl
~
src/setup.c
~
src/sqlite3.c
~
src/sqlite3.h
~
src/stash.c
~
src/style.c
~
src/tag.c
~
src/tar.c
~
src/timeline.c
~
src/tkt.c
~
src/wiki.c
~
src/zip.c
~
test/tester.tcl
~
win/Makefile.dmc
~
win/Makefile.mingw
~
win/Makefile.mingw.mistachkin
~
win/Makefile.msc
~
www/server.wiki
+1
-1
| --- Makefile.Cygwin.in | ||
| +++ Makefile.Cygwin.in | ||
| @@ -36,11 +36,11 @@ | ||
| 36 | 36 | # care about testing the end result, this can be blank. |
| 37 | 37 | # |
| 38 | 38 | TCLSH = tclsh |
| 39 | 39 | |
| 40 | 40 | LIB = @LDFLAGS@ @EXTRA_LDFLAGS@ @LIBS@ |
| 41 | -TCC += @EXTRA_CFLAGS@ @CPPFLAGS@ @CFLAGS@ -DHAVE_AUTOCONFIG_H | |
| 41 | +TCC += @EXTRA_CFLAGS@ @CPPFLAGS@ @CFLAGS@ -DHAVE_AUTOCONFIG_H -DFOSSIL_OMIT_LOAD_AVERAGE | |
| 42 | 42 | INSTALLDIR =$(DESTDIR)@prefix@/bin |
| 43 | 43 | USE_SYSTEM_SQLITE = @USE_SYSTEM_SQLITE@ |
| 44 | 44 | FOSSIL_ENABLE_TCL = @FOSSIL_ENABLE_TCL@ |
| 45 | 45 | FOSSIL_ENABLE_TCL_STUBS = @FOSSIL_ENABLE_TCL_STUBS@ |
| 46 | 46 | FOSSIL_ENABLE_TCL_PRIVATE_STUBS = @FOSSIL_ENABLE_TCL_PRIVATE_STUBS@ |
| 47 | 47 |
| --- Makefile.Cygwin.in | |
| +++ Makefile.Cygwin.in | |
| @@ -36,11 +36,11 @@ | |
| 36 | # care about testing the end result, this can be blank. |
| 37 | # |
| 38 | TCLSH = tclsh |
| 39 | |
| 40 | LIB = @LDFLAGS@ @EXTRA_LDFLAGS@ @LIBS@ |
| 41 | TCC += @EXTRA_CFLAGS@ @CPPFLAGS@ @CFLAGS@ -DHAVE_AUTOCONFIG_H |
| 42 | INSTALLDIR =$(DESTDIR)@prefix@/bin |
| 43 | USE_SYSTEM_SQLITE = @USE_SYSTEM_SQLITE@ |
| 44 | FOSSIL_ENABLE_TCL = @FOSSIL_ENABLE_TCL@ |
| 45 | FOSSIL_ENABLE_TCL_STUBS = @FOSSIL_ENABLE_TCL_STUBS@ |
| 46 | FOSSIL_ENABLE_TCL_PRIVATE_STUBS = @FOSSIL_ENABLE_TCL_PRIVATE_STUBS@ |
| 47 |
| --- Makefile.Cygwin.in | |
| +++ Makefile.Cygwin.in | |
| @@ -36,11 +36,11 @@ | |
| 36 | # care about testing the end result, this can be blank. |
| 37 | # |
| 38 | TCLSH = tclsh |
| 39 | |
| 40 | LIB = @LDFLAGS@ @EXTRA_LDFLAGS@ @LIBS@ |
| 41 | TCC += @EXTRA_CFLAGS@ @CPPFLAGS@ @CFLAGS@ -DHAVE_AUTOCONFIG_H -DFOSSIL_OMIT_LOAD_AVERAGE |
| 42 | INSTALLDIR =$(DESTDIR)@prefix@/bin |
| 43 | USE_SYSTEM_SQLITE = @USE_SYSTEM_SQLITE@ |
| 44 | FOSSIL_ENABLE_TCL = @FOSSIL_ENABLE_TCL@ |
| 45 | FOSSIL_ENABLE_TCL_STUBS = @FOSSIL_ENABLE_TCL_STUBS@ |
| 46 | FOSSIL_ENABLE_TCL_PRIVATE_STUBS = @FOSSIL_ENABLE_TCL_PRIVATE_STUBS@ |
| 47 |
+8
| --- src/add.c | ||
| +++ src/add.c | ||
| @@ -692,5 +692,13 @@ | ||
| 692 | 692 | mv_one_file(vid, zFrom, zTo); |
| 693 | 693 | } |
| 694 | 694 | db_finalize(&q); |
| 695 | 695 | db_end_transaction(0); |
| 696 | 696 | } |
| 697 | + | |
| 698 | +/* | |
| 699 | +** Function for stash_apply to be able to restore a file and indicate | |
| 700 | +** newly ADDED state. | |
| 701 | +*/ | |
| 702 | +int stash_add_files_in_sfile(int vid){ | |
| 703 | + return add_files_in_sfile(vid); | |
| 704 | +} | |
| 697 | 705 |
| --- src/add.c | |
| +++ src/add.c | |
| @@ -692,5 +692,13 @@ | |
| 692 | mv_one_file(vid, zFrom, zTo); |
| 693 | } |
| 694 | db_finalize(&q); |
| 695 | db_end_transaction(0); |
| 696 | } |
| 697 |
| --- src/add.c | |
| +++ src/add.c | |
| @@ -692,5 +692,13 @@ | |
| 692 | mv_one_file(vid, zFrom, zTo); |
| 693 | } |
| 694 | db_finalize(&q); |
| 695 | db_end_transaction(0); |
| 696 | } |
| 697 | |
| 698 | /* |
| 699 | ** Function for stash_apply to be able to restore a file and indicate |
| 700 | ** newly ADDED state. |
| 701 | */ |
| 702 | int stash_add_files_in_sfile(int vid){ |
| 703 | return add_files_in_sfile(vid); |
| 704 | } |
| 705 |
+18
-1
| --- src/allrepo.c | ||
| +++ src/allrepo.c | ||
| @@ -65,10 +65,16 @@ | ||
| 65 | 65 | }else{ |
| 66 | 66 | blob_appendf(pExtra, " --%s \"\"", zArg); |
| 67 | 67 | } |
| 68 | 68 | } |
| 69 | 69 | } |
| 70 | +static void collect_argv(Blob *pExtra, int iStart){ | |
| 71 | + int i; | |
| 72 | + for(i=iStart; i<g.argc; i++){ | |
| 73 | + blob_appendf(pExtra, " %s", g.argv[i]); | |
| 74 | + } | |
| 75 | +} | |
| 70 | 76 | |
| 71 | 77 | |
| 72 | 78 | /* |
| 73 | 79 | ** COMMAND: all |
| 74 | 80 | ** |
| @@ -118,10 +124,15 @@ | ||
| 118 | 124 | ** present, are passed along verbatim. The --force and |
| 119 | 125 | ** --randomize options are not supported. |
| 120 | 126 | ** |
| 121 | 127 | ** sync Run a "sync" on all repositories. Only the --verbose |
| 122 | 128 | ** option is supported. |
| 129 | +** | |
| 130 | +** setting Run the "setting", "set", or "unset" commands on all | |
| 131 | +** set repositories. These command are particularly useful in | |
| 132 | +** unset conjunection with the "max-loadavg" setting which cannot | |
| 133 | +** otherwise be set globally. | |
| 123 | 134 | ** |
| 124 | 135 | ** Repositories are automatically added to the set of known repositories |
| 125 | 136 | ** when one of the following commands are run against the repository: |
| 126 | 137 | ** clone, info, pull, push, or sync. Even previously ignored repositories |
| 127 | 138 | ** are added back to the list of repositories by these commands. |
| @@ -155,11 +166,11 @@ | ||
| 155 | 166 | } |
| 156 | 167 | n = strlen(g.argv[2]); |
| 157 | 168 | db_open_config(1); |
| 158 | 169 | blob_zero(&extra); |
| 159 | 170 | zCmd = g.argv[2]; |
| 160 | - if( g.zLogin ) blob_appendf(&extra, " -U %s", g.zLogin); | |
| 171 | + if( !login_is_nobody() ) blob_appendf(&extra, " -U %s", g.zLogin); | |
| 161 | 172 | if( strncmp(zCmd, "list", n)==0 || strncmp(zCmd,"ls",n)==0 ){ |
| 162 | 173 | zCmd = "list"; |
| 163 | 174 | useCheckouts = find_option("ckout","c",0)!=0; |
| 164 | 175 | }else if( strncmp(zCmd, "clean", n)==0 ){ |
| 165 | 176 | zCmd = "clean --chdir"; |
| @@ -201,10 +212,16 @@ | ||
| 201 | 212 | collect_argument(&extra, "vacuum",0); |
| 202 | 213 | collect_argument(&extra, "deanalyze",0); |
| 203 | 214 | collect_argument(&extra, "analyze",0); |
| 204 | 215 | collect_argument(&extra, "wal",0); |
| 205 | 216 | collect_argument(&extra, "stats",0); |
| 217 | + }else if( strncmp(zCmd, "setting", n)==0 ){ | |
| 218 | + zCmd = "setting -R"; | |
| 219 | + collect_argv(&extra, 3); | |
| 220 | + }else if( strncmp(zCmd, "unset", n)==0 ){ | |
| 221 | + zCmd = "unset -R"; | |
| 222 | + collect_argv(&extra, 3); | |
| 206 | 223 | }else if( strncmp(zCmd, "sync", n)==0 ){ |
| 207 | 224 | zCmd = "sync -autourl -R"; |
| 208 | 225 | collect_argument(&extra, "verbose","v"); |
| 209 | 226 | }else if( strncmp(zCmd, "test-integrity", n)==0 ){ |
| 210 | 227 | collect_argument(&extra, "parse", 0); |
| 211 | 228 |
| --- src/allrepo.c | |
| +++ src/allrepo.c | |
| @@ -65,10 +65,16 @@ | |
| 65 | }else{ |
| 66 | blob_appendf(pExtra, " --%s \"\"", zArg); |
| 67 | } |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | |
| 72 | /* |
| 73 | ** COMMAND: all |
| 74 | ** |
| @@ -118,10 +124,15 @@ | |
| 118 | ** present, are passed along verbatim. The --force and |
| 119 | ** --randomize options are not supported. |
| 120 | ** |
| 121 | ** sync Run a "sync" on all repositories. Only the --verbose |
| 122 | ** option is supported. |
| 123 | ** |
| 124 | ** Repositories are automatically added to the set of known repositories |
| 125 | ** when one of the following commands are run against the repository: |
| 126 | ** clone, info, pull, push, or sync. Even previously ignored repositories |
| 127 | ** are added back to the list of repositories by these commands. |
| @@ -155,11 +166,11 @@ | |
| 155 | } |
| 156 | n = strlen(g.argv[2]); |
| 157 | db_open_config(1); |
| 158 | blob_zero(&extra); |
| 159 | zCmd = g.argv[2]; |
| 160 | if( g.zLogin ) blob_appendf(&extra, " -U %s", g.zLogin); |
| 161 | if( strncmp(zCmd, "list", n)==0 || strncmp(zCmd,"ls",n)==0 ){ |
| 162 | zCmd = "list"; |
| 163 | useCheckouts = find_option("ckout","c",0)!=0; |
| 164 | }else if( strncmp(zCmd, "clean", n)==0 ){ |
| 165 | zCmd = "clean --chdir"; |
| @@ -201,10 +212,16 @@ | |
| 201 | collect_argument(&extra, "vacuum",0); |
| 202 | collect_argument(&extra, "deanalyze",0); |
| 203 | collect_argument(&extra, "analyze",0); |
| 204 | collect_argument(&extra, "wal",0); |
| 205 | collect_argument(&extra, "stats",0); |
| 206 | }else if( strncmp(zCmd, "sync", n)==0 ){ |
| 207 | zCmd = "sync -autourl -R"; |
| 208 | collect_argument(&extra, "verbose","v"); |
| 209 | }else if( strncmp(zCmd, "test-integrity", n)==0 ){ |
| 210 | collect_argument(&extra, "parse", 0); |
| 211 |
| --- src/allrepo.c | |
| +++ src/allrepo.c | |
| @@ -65,10 +65,16 @@ | |
| 65 | }else{ |
| 66 | blob_appendf(pExtra, " --%s \"\"", zArg); |
| 67 | } |
| 68 | } |
| 69 | } |
| 70 | static void collect_argv(Blob *pExtra, int iStart){ |
| 71 | int i; |
| 72 | for(i=iStart; i<g.argc; i++){ |
| 73 | blob_appendf(pExtra, " %s", g.argv[i]); |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | |
| 78 | /* |
| 79 | ** COMMAND: all |
| 80 | ** |
| @@ -118,10 +124,15 @@ | |
| 124 | ** present, are passed along verbatim. The --force and |
| 125 | ** --randomize options are not supported. |
| 126 | ** |
| 127 | ** sync Run a "sync" on all repositories. Only the --verbose |
| 128 | ** option is supported. |
| 129 | ** |
| 130 | ** setting Run the "setting", "set", or "unset" commands on all |
| 131 | ** set repositories. These command are particularly useful in |
| 132 | ** unset conjunection with the "max-loadavg" setting which cannot |
| 133 | ** otherwise be set globally. |
| 134 | ** |
| 135 | ** Repositories are automatically added to the set of known repositories |
| 136 | ** when one of the following commands are run against the repository: |
| 137 | ** clone, info, pull, push, or sync. Even previously ignored repositories |
| 138 | ** are added back to the list of repositories by these commands. |
| @@ -155,11 +166,11 @@ | |
| 166 | } |
| 167 | n = strlen(g.argv[2]); |
| 168 | db_open_config(1); |
| 169 | blob_zero(&extra); |
| 170 | zCmd = g.argv[2]; |
| 171 | if( !login_is_nobody() ) blob_appendf(&extra, " -U %s", g.zLogin); |
| 172 | if( strncmp(zCmd, "list", n)==0 || strncmp(zCmd,"ls",n)==0 ){ |
| 173 | zCmd = "list"; |
| 174 | useCheckouts = find_option("ckout","c",0)!=0; |
| 175 | }else if( strncmp(zCmd, "clean", n)==0 ){ |
| 176 | zCmd = "clean --chdir"; |
| @@ -201,10 +212,16 @@ | |
| 212 | collect_argument(&extra, "vacuum",0); |
| 213 | collect_argument(&extra, "deanalyze",0); |
| 214 | collect_argument(&extra, "analyze",0); |
| 215 | collect_argument(&extra, "wal",0); |
| 216 | collect_argument(&extra, "stats",0); |
| 217 | }else if( strncmp(zCmd, "setting", n)==0 ){ |
| 218 | zCmd = "setting -R"; |
| 219 | collect_argv(&extra, 3); |
| 220 | }else if( strncmp(zCmd, "unset", n)==0 ){ |
| 221 | zCmd = "unset -R"; |
| 222 | collect_argv(&extra, 3); |
| 223 | }else if( strncmp(zCmd, "sync", n)==0 ){ |
| 224 | zCmd = "sync -autourl -R"; |
| 225 | collect_argument(&extra, "verbose","v"); |
| 226 | }else if( strncmp(zCmd, "test-integrity", n)==0 ){ |
| 227 | collect_argument(&extra, "parse", 0); |
| 228 |
+2
-2
| --- src/attach.c | ||
| +++ src/attach.c | ||
| @@ -309,11 +309,11 @@ | ||
| 309 | 309 | if( n>0 ){ |
| 310 | 310 | blob_appendf(&manifest, "C %#F\n", n, zComment); |
| 311 | 311 | } |
| 312 | 312 | zDate = date_in_standard_format("now"); |
| 313 | 313 | blob_appendf(&manifest, "D %s\n", zDate); |
| 314 | - blob_appendf(&manifest, "U %F\n", g.zLogin ? g.zLogin : "nobody"); | |
| 314 | + blob_appendf(&manifest, "U %F\n", login_name()); | |
| 315 | 315 | md5sum_blob(&manifest, &cksum); |
| 316 | 316 | blob_appendf(&manifest, "Z %b\n", &cksum); |
| 317 | 317 | attach_put(&manifest, rid, needModerator); |
| 318 | 318 | assert( blob_is_reset(&manifest) ); |
| 319 | 319 | db_end_transaction(0); |
| @@ -427,11 +427,11 @@ | ||
| 427 | 427 | zFile += n; |
| 428 | 428 | if( zFile[0]==0 ) zFile = "unknown"; |
| 429 | 429 | blob_appendf(&manifest, "A %F %F\n", zFile, zTarget); |
| 430 | 430 | zDate = date_in_standard_format("now"); |
| 431 | 431 | blob_appendf(&manifest, "D %s\n", zDate); |
| 432 | - blob_appendf(&manifest, "U %F\n", g.zLogin ? g.zLogin : "nobody"); | |
| 432 | + blob_appendf(&manifest, "U %F\n", login_name()); | |
| 433 | 433 | md5sum_blob(&manifest, &cksum); |
| 434 | 434 | blob_appendf(&manifest, "Z %b\n", &cksum); |
| 435 | 435 | rid = content_put(&manifest); |
| 436 | 436 | manifest_crosslink(rid, &manifest, MC_NONE); |
| 437 | 437 | db_end_transaction(0); |
| 438 | 438 |
| --- src/attach.c | |
| +++ src/attach.c | |
| @@ -309,11 +309,11 @@ | |
| 309 | if( n>0 ){ |
| 310 | blob_appendf(&manifest, "C %#F\n", n, zComment); |
| 311 | } |
| 312 | zDate = date_in_standard_format("now"); |
| 313 | blob_appendf(&manifest, "D %s\n", zDate); |
| 314 | blob_appendf(&manifest, "U %F\n", g.zLogin ? g.zLogin : "nobody"); |
| 315 | md5sum_blob(&manifest, &cksum); |
| 316 | blob_appendf(&manifest, "Z %b\n", &cksum); |
| 317 | attach_put(&manifest, rid, needModerator); |
| 318 | assert( blob_is_reset(&manifest) ); |
| 319 | db_end_transaction(0); |
| @@ -427,11 +427,11 @@ | |
| 427 | zFile += n; |
| 428 | if( zFile[0]==0 ) zFile = "unknown"; |
| 429 | blob_appendf(&manifest, "A %F %F\n", zFile, zTarget); |
| 430 | zDate = date_in_standard_format("now"); |
| 431 | blob_appendf(&manifest, "D %s\n", zDate); |
| 432 | blob_appendf(&manifest, "U %F\n", g.zLogin ? g.zLogin : "nobody"); |
| 433 | md5sum_blob(&manifest, &cksum); |
| 434 | blob_appendf(&manifest, "Z %b\n", &cksum); |
| 435 | rid = content_put(&manifest); |
| 436 | manifest_crosslink(rid, &manifest, MC_NONE); |
| 437 | db_end_transaction(0); |
| 438 |
| --- src/attach.c | |
| +++ src/attach.c | |
| @@ -309,11 +309,11 @@ | |
| 309 | if( n>0 ){ |
| 310 | blob_appendf(&manifest, "C %#F\n", n, zComment); |
| 311 | } |
| 312 | zDate = date_in_standard_format("now"); |
| 313 | blob_appendf(&manifest, "D %s\n", zDate); |
| 314 | blob_appendf(&manifest, "U %F\n", login_name()); |
| 315 | md5sum_blob(&manifest, &cksum); |
| 316 | blob_appendf(&manifest, "Z %b\n", &cksum); |
| 317 | attach_put(&manifest, rid, needModerator); |
| 318 | assert( blob_is_reset(&manifest) ); |
| 319 | db_end_transaction(0); |
| @@ -427,11 +427,11 @@ | |
| 427 | zFile += n; |
| 428 | if( zFile[0]==0 ) zFile = "unknown"; |
| 429 | blob_appendf(&manifest, "A %F %F\n", zFile, zTarget); |
| 430 | zDate = date_in_standard_format("now"); |
| 431 | blob_appendf(&manifest, "D %s\n", zDate); |
| 432 | blob_appendf(&manifest, "U %F\n", login_name()); |
| 433 | md5sum_blob(&manifest, &cksum); |
| 434 | blob_appendf(&manifest, "Z %b\n", &cksum); |
| 435 | rid = content_put(&manifest); |
| 436 | manifest_crosslink(rid, &manifest, MC_NONE); |
| 437 | db_end_transaction(0); |
| 438 |
+1
-1
| --- src/branch.c | ||
| +++ src/branch.c | ||
| @@ -134,11 +134,11 @@ | ||
| 134 | 134 | const char *zTag = db_column_text(&q, 0); |
| 135 | 135 | blob_appendf(&branch, "T -%F *\n", zTag); |
| 136 | 136 | } |
| 137 | 137 | db_finalize(&q); |
| 138 | 138 | |
| 139 | - blob_appendf(&branch, "U %F\n", zUserOvrd ? zUserOvrd : g.zLogin); | |
| 139 | + blob_appendf(&branch, "U %F\n", zUserOvrd ? zUserOvrd : login_name()); | |
| 140 | 140 | md5sum_blob(&branch, &mcksum); |
| 141 | 141 | blob_appendf(&branch, "Z %b\n", &mcksum); |
| 142 | 142 | if( !noSign && clearsign(&branch, &branch) ){ |
| 143 | 143 | Blob ans; |
| 144 | 144 | char cReply; |
| 145 | 145 |
| --- src/branch.c | |
| +++ src/branch.c | |
| @@ -134,11 +134,11 @@ | |
| 134 | const char *zTag = db_column_text(&q, 0); |
| 135 | blob_appendf(&branch, "T -%F *\n", zTag); |
| 136 | } |
| 137 | db_finalize(&q); |
| 138 | |
| 139 | blob_appendf(&branch, "U %F\n", zUserOvrd ? zUserOvrd : g.zLogin); |
| 140 | md5sum_blob(&branch, &mcksum); |
| 141 | blob_appendf(&branch, "Z %b\n", &mcksum); |
| 142 | if( !noSign && clearsign(&branch, &branch) ){ |
| 143 | Blob ans; |
| 144 | char cReply; |
| 145 |
| --- src/branch.c | |
| +++ src/branch.c | |
| @@ -134,11 +134,11 @@ | |
| 134 | const char *zTag = db_column_text(&q, 0); |
| 135 | blob_appendf(&branch, "T -%F *\n", zTag); |
| 136 | } |
| 137 | db_finalize(&q); |
| 138 | |
| 139 | blob_appendf(&branch, "U %F\n", zUserOvrd ? zUserOvrd : login_name()); |
| 140 | md5sum_blob(&branch, &mcksum); |
| 141 | blob_appendf(&branch, "Z %b\n", &mcksum); |
| 142 | if( !noSign && clearsign(&branch, &branch) ){ |
| 143 | Blob ans; |
| 144 | char cReply; |
| 145 |
+1
-2
| --- src/captcha.c | ||
| +++ src/captcha.c | ||
| @@ -482,12 +482,11 @@ | ||
| 482 | 482 | ** are user "nobody") and if the "require-captcha" setting is true. The |
| 483 | 483 | ** "require-captcha" setting is controlled on the Admin/Access page. It |
| 484 | 484 | ** defaults to true. |
| 485 | 485 | */ |
| 486 | 486 | int captcha_needed(void){ |
| 487 | - if( g.zLogin!=0 ) return 0; | |
| 488 | - return db_get_boolean("require-captcha", 1); | |
| 487 | + return login_is_nobody() && db_get_boolean("require-captcha", 1); | |
| 489 | 488 | } |
| 490 | 489 | |
| 491 | 490 | /* |
| 492 | 491 | ** If a captcha is required but the correct captcha code is not supplied |
| 493 | 492 | ** in the query parameters, then return false (0). |
| 494 | 493 |
| --- src/captcha.c | |
| +++ src/captcha.c | |
| @@ -482,12 +482,11 @@ | |
| 482 | ** are user "nobody") and if the "require-captcha" setting is true. The |
| 483 | ** "require-captcha" setting is controlled on the Admin/Access page. It |
| 484 | ** defaults to true. |
| 485 | */ |
| 486 | int captcha_needed(void){ |
| 487 | if( g.zLogin!=0 ) return 0; |
| 488 | return db_get_boolean("require-captcha", 1); |
| 489 | } |
| 490 | |
| 491 | /* |
| 492 | ** If a captcha is required but the correct captcha code is not supplied |
| 493 | ** in the query parameters, then return false (0). |
| 494 |
| --- src/captcha.c | |
| +++ src/captcha.c | |
| @@ -482,12 +482,11 @@ | |
| 482 | ** are user "nobody") and if the "require-captcha" setting is true. The |
| 483 | ** "require-captcha" setting is controlled on the Admin/Access page. It |
| 484 | ** defaults to true. |
| 485 | */ |
| 486 | int captcha_needed(void){ |
| 487 | return login_is_nobody() && db_get_boolean("require-captcha", 1); |
| 488 | } |
| 489 | |
| 490 | /* |
| 491 | ** If a captcha is required but the correct captcha code is not supplied |
| 492 | ** in the query parameters, then return false (0). |
| 493 |
+3
-3
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -801,11 +801,11 @@ | ||
| 801 | 801 | blob_append(&prompt, |
| 802 | 802 | "\n" |
| 803 | 803 | "# Enter commit message for this check-in. Lines beginning with # are ignored.\n" |
| 804 | 804 | "#\n", -1 |
| 805 | 805 | ); |
| 806 | - blob_appendf(&prompt, "# user: %s\n", p->zUserOvrd ? p->zUserOvrd : g.zLogin); | |
| 806 | + blob_appendf(&prompt, "# user: %s\n", p->zUserOvrd ? p->zUserOvrd : login_name()); | |
| 807 | 807 | if( p->zBranch && p->zBranch[0] ){ |
| 808 | 808 | blob_appendf(&prompt, "# tags: %s\n#\n", p->zBranch); |
| 809 | 809 | }else{ |
| 810 | 810 | char *zTags = info_tags_of_checkin(parent_rid, 1); |
| 811 | 811 | if( zTags ) blob_appendf(&prompt, "# tags: %z\n#\n", zTags); |
| @@ -963,11 +963,11 @@ | ||
| 963 | 963 | int verifyDate; /* Verify that child is younger */ |
| 964 | 964 | int closeFlag; /* Close the branch being committed */ |
| 965 | 965 | int integrateFlag; /* Close merged-in branches */ |
| 966 | 966 | Blob *pCksum; /* Repository checksum. May be 0 */ |
| 967 | 967 | const char *zDateOvrd; /* Date override. If 0 then use 'now' */ |
| 968 | - const char *zUserOvrd; /* User override. If 0 then use g.zLogin */ | |
| 968 | + const char *zUserOvrd; /* User override. If 0 then use login_name() */ | |
| 969 | 969 | const char *zBranch; /* Branch name. May be 0 */ |
| 970 | 970 | const char *zColor; /* One-time background color. May be 0 */ |
| 971 | 971 | const char *zBrClr; /* Persistent branch color. May be 0 */ |
| 972 | 972 | const char **azTag; /* Tags to apply to this check-in */ |
| 973 | 973 | }; |
| @@ -1189,11 +1189,11 @@ | ||
| 1189 | 1189 | const char *zBrTag = db_column_text(&q, 0); |
| 1190 | 1190 | blob_appendf(pOut, "T -%F *\n", zBrTag); |
| 1191 | 1191 | } |
| 1192 | 1192 | db_finalize(&q); |
| 1193 | 1193 | } |
| 1194 | - blob_appendf(pOut, "U %F\n", p->zUserOvrd ? p->zUserOvrd : g.zLogin); | |
| 1194 | + blob_appendf(pOut, "U %F\n", p->zUserOvrd ? p->zUserOvrd : login_name()); | |
| 1195 | 1195 | md5sum_blob(pOut, &mcksum); |
| 1196 | 1196 | blob_appendf(pOut, "Z %b\n", &mcksum); |
| 1197 | 1197 | if( pnFBcard ) *pnFBcard = nFBcard; |
| 1198 | 1198 | } |
| 1199 | 1199 | |
| 1200 | 1200 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -801,11 +801,11 @@ | |
| 801 | blob_append(&prompt, |
| 802 | "\n" |
| 803 | "# Enter commit message for this check-in. Lines beginning with # are ignored.\n" |
| 804 | "#\n", -1 |
| 805 | ); |
| 806 | blob_appendf(&prompt, "# user: %s\n", p->zUserOvrd ? p->zUserOvrd : g.zLogin); |
| 807 | if( p->zBranch && p->zBranch[0] ){ |
| 808 | blob_appendf(&prompt, "# tags: %s\n#\n", p->zBranch); |
| 809 | }else{ |
| 810 | char *zTags = info_tags_of_checkin(parent_rid, 1); |
| 811 | if( zTags ) blob_appendf(&prompt, "# tags: %z\n#\n", zTags); |
| @@ -963,11 +963,11 @@ | |
| 963 | int verifyDate; /* Verify that child is younger */ |
| 964 | int closeFlag; /* Close the branch being committed */ |
| 965 | int integrateFlag; /* Close merged-in branches */ |
| 966 | Blob *pCksum; /* Repository checksum. May be 0 */ |
| 967 | const char *zDateOvrd; /* Date override. If 0 then use 'now' */ |
| 968 | const char *zUserOvrd; /* User override. If 0 then use g.zLogin */ |
| 969 | const char *zBranch; /* Branch name. May be 0 */ |
| 970 | const char *zColor; /* One-time background color. May be 0 */ |
| 971 | const char *zBrClr; /* Persistent branch color. May be 0 */ |
| 972 | const char **azTag; /* Tags to apply to this check-in */ |
| 973 | }; |
| @@ -1189,11 +1189,11 @@ | |
| 1189 | const char *zBrTag = db_column_text(&q, 0); |
| 1190 | blob_appendf(pOut, "T -%F *\n", zBrTag); |
| 1191 | } |
| 1192 | db_finalize(&q); |
| 1193 | } |
| 1194 | blob_appendf(pOut, "U %F\n", p->zUserOvrd ? p->zUserOvrd : g.zLogin); |
| 1195 | md5sum_blob(pOut, &mcksum); |
| 1196 | blob_appendf(pOut, "Z %b\n", &mcksum); |
| 1197 | if( pnFBcard ) *pnFBcard = nFBcard; |
| 1198 | } |
| 1199 | |
| 1200 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -801,11 +801,11 @@ | |
| 801 | blob_append(&prompt, |
| 802 | "\n" |
| 803 | "# Enter commit message for this check-in. Lines beginning with # are ignored.\n" |
| 804 | "#\n", -1 |
| 805 | ); |
| 806 | blob_appendf(&prompt, "# user: %s\n", p->zUserOvrd ? p->zUserOvrd : login_name()); |
| 807 | if( p->zBranch && p->zBranch[0] ){ |
| 808 | blob_appendf(&prompt, "# tags: %s\n#\n", p->zBranch); |
| 809 | }else{ |
| 810 | char *zTags = info_tags_of_checkin(parent_rid, 1); |
| 811 | if( zTags ) blob_appendf(&prompt, "# tags: %z\n#\n", zTags); |
| @@ -963,11 +963,11 @@ | |
| 963 | int verifyDate; /* Verify that child is younger */ |
| 964 | int closeFlag; /* Close the branch being committed */ |
| 965 | int integrateFlag; /* Close merged-in branches */ |
| 966 | Blob *pCksum; /* Repository checksum. May be 0 */ |
| 967 | const char *zDateOvrd; /* Date override. If 0 then use 'now' */ |
| 968 | const char *zUserOvrd; /* User override. If 0 then use login_name() */ |
| 969 | const char *zBranch; /* Branch name. May be 0 */ |
| 970 | const char *zColor; /* One-time background color. May be 0 */ |
| 971 | const char *zBrClr; /* Persistent branch color. May be 0 */ |
| 972 | const char **azTag; /* Tags to apply to this check-in */ |
| 973 | }; |
| @@ -1189,11 +1189,11 @@ | |
| 1189 | const char *zBrTag = db_column_text(&q, 0); |
| 1190 | blob_appendf(pOut, "T -%F *\n", zBrTag); |
| 1191 | } |
| 1192 | db_finalize(&q); |
| 1193 | } |
| 1194 | blob_appendf(pOut, "U %F\n", p->zUserOvrd ? p->zUserOvrd : login_name()); |
| 1195 | md5sum_blob(pOut, &mcksum); |
| 1196 | blob_appendf(pOut, "Z %b\n", &mcksum); |
| 1197 | if( pnFBcard ) *pnFBcard = nFBcard; |
| 1198 | } |
| 1199 | |
| 1200 |
M
src/db.c
+8
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -2147,10 +2147,11 @@ | ||
| 2147 | 2147 | { "ignore-glob", 0, 40, 1, 0, "" }, |
| 2148 | 2148 | { "keep-glob", 0, 40, 1, 0, "" }, |
| 2149 | 2149 | { "localauth", 0, 0, 0, 0, "off" }, |
| 2150 | 2150 | { "main-branch", 0, 40, 0, 0, "trunk" }, |
| 2151 | 2151 | { "manifest", 0, 0, 1, 0, "off" }, |
| 2152 | + { "max-loadavg", 0, 25, 0, 0, "0.0" }, | |
| 2152 | 2153 | { "max-upload", 0, 25, 0, 0, "250000" }, |
| 2153 | 2154 | { "mtime-changes", 0, 0, 0, 0, "on" }, |
| 2154 | 2155 | { "pgp-command", 0, 40, 0, 0, "gpg --clearsign -o " }, |
| 2155 | 2156 | { "proxy", 0, 32, 0, 0, "off" }, |
| 2156 | 2157 | { "relative-paths", 0, 0, 0, 0, "on" }, |
| @@ -2296,10 +2297,17 @@ | ||
| 2296 | 2297 | ** main-branch The primary branch for the project. Default: trunk |
| 2297 | 2298 | ** |
| 2298 | 2299 | ** manifest If enabled, automatically create files "manifest" and |
| 2299 | 2300 | ** (versionable) "manifest.uuid" in every checkout. The SQLite and |
| 2300 | 2301 | ** Fossil repositories both require this. Default: off. |
| 2302 | +** | |
| 2303 | +** max-loadavg Some CPU-intensive web pages (ex: /zip, /tarball, /blame) | |
| 2304 | +** are disallowed if the system load average goes above this | |
| 2305 | +** value. "0.0" means no limit. This only works on unix. | |
| 2306 | +** Only local settings of this value make a difference since | |
| 2307 | +** when running as a web-server, Fossil does not open the | |
| 2308 | +** global configuration database. | |
| 2301 | 2309 | ** |
| 2302 | 2310 | ** max-upload A limit on the size of uplink HTTP requests. The |
| 2303 | 2311 | ** default is 250000 bytes. |
| 2304 | 2312 | ** |
| 2305 | 2313 | ** mtime-changes Use file modification times (mtimes) to detect when |
| 2306 | 2314 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -2147,10 +2147,11 @@ | |
| 2147 | { "ignore-glob", 0, 40, 1, 0, "" }, |
| 2148 | { "keep-glob", 0, 40, 1, 0, "" }, |
| 2149 | { "localauth", 0, 0, 0, 0, "off" }, |
| 2150 | { "main-branch", 0, 40, 0, 0, "trunk" }, |
| 2151 | { "manifest", 0, 0, 1, 0, "off" }, |
| 2152 | { "max-upload", 0, 25, 0, 0, "250000" }, |
| 2153 | { "mtime-changes", 0, 0, 0, 0, "on" }, |
| 2154 | { "pgp-command", 0, 40, 0, 0, "gpg --clearsign -o " }, |
| 2155 | { "proxy", 0, 32, 0, 0, "off" }, |
| 2156 | { "relative-paths", 0, 0, 0, 0, "on" }, |
| @@ -2296,10 +2297,17 @@ | |
| 2296 | ** main-branch The primary branch for the project. Default: trunk |
| 2297 | ** |
| 2298 | ** manifest If enabled, automatically create files "manifest" and |
| 2299 | ** (versionable) "manifest.uuid" in every checkout. The SQLite and |
| 2300 | ** Fossil repositories both require this. Default: off. |
| 2301 | ** |
| 2302 | ** max-upload A limit on the size of uplink HTTP requests. The |
| 2303 | ** default is 250000 bytes. |
| 2304 | ** |
| 2305 | ** mtime-changes Use file modification times (mtimes) to detect when |
| 2306 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -2147,10 +2147,11 @@ | |
| 2147 | { "ignore-glob", 0, 40, 1, 0, "" }, |
| 2148 | { "keep-glob", 0, 40, 1, 0, "" }, |
| 2149 | { "localauth", 0, 0, 0, 0, "off" }, |
| 2150 | { "main-branch", 0, 40, 0, 0, "trunk" }, |
| 2151 | { "manifest", 0, 0, 1, 0, "off" }, |
| 2152 | { "max-loadavg", 0, 25, 0, 0, "0.0" }, |
| 2153 | { "max-upload", 0, 25, 0, 0, "250000" }, |
| 2154 | { "mtime-changes", 0, 0, 0, 0, "on" }, |
| 2155 | { "pgp-command", 0, 40, 0, 0, "gpg --clearsign -o " }, |
| 2156 | { "proxy", 0, 32, 0, 0, "off" }, |
| 2157 | { "relative-paths", 0, 0, 0, 0, "on" }, |
| @@ -2296,10 +2297,17 @@ | |
| 2297 | ** main-branch The primary branch for the project. Default: trunk |
| 2298 | ** |
| 2299 | ** manifest If enabled, automatically create files "manifest" and |
| 2300 | ** (versionable) "manifest.uuid" in every checkout. The SQLite and |
| 2301 | ** Fossil repositories both require this. Default: off. |
| 2302 | ** |
| 2303 | ** max-loadavg Some CPU-intensive web pages (ex: /zip, /tarball, /blame) |
| 2304 | ** are disallowed if the system load average goes above this |
| 2305 | ** value. "0.0" means no limit. This only works on unix. |
| 2306 | ** Only local settings of this value make a difference since |
| 2307 | ** when running as a web-server, Fossil does not open the |
| 2308 | ** global configuration database. |
| 2309 | ** |
| 2310 | ** max-upload A limit on the size of uplink HTTP requests. The |
| 2311 | ** default is 250000 bytes. |
| 2312 | ** |
| 2313 | ** mtime-changes Use file modification times (mtimes) to detect when |
| 2314 |
+43
-67
| --- src/diff.c | ||
| +++ src/diff.c | ||
| @@ -78,11 +78,12 @@ | ||
| 78 | 78 | */ |
| 79 | 79 | typedef struct DLine DLine; |
| 80 | 80 | struct DLine { |
| 81 | 81 | const char *z; /* The text of the line */ |
| 82 | 82 | unsigned int h; /* Hash of the line */ |
| 83 | - unsigned short extent; /* Extent of the line. how much longer than recorded in h */ | |
| 83 | + unsigned short indent; /* Indent of the line. Only !=0 with -w/-Z option */ | |
| 84 | + unsigned short n; /* number of bytes */ | |
| 84 | 85 | unsigned int iNext; /* 1+(Index of next line with same the same hash) */ |
| 85 | 86 | |
| 86 | 87 | /* an array of DLine elements serves two purposes. The fields |
| 87 | 88 | ** above are one per line of input text. But each entry is also |
| 88 | 89 | ** a bucket in a hash table, as follows: */ |
| @@ -132,11 +133,11 @@ | ||
| 132 | 133 | ** |
| 133 | 134 | ** Profiling show that in most cases this routine consumes the bulk of |
| 134 | 135 | ** the CPU time on a diff. |
| 135 | 136 | */ |
| 136 | 137 | static DLine *break_into_lines(const char *z, int n, int *pnLine, u64 diffFlags){ |
| 137 | - int nLine, i, j, k, s, extent, x, numws; | |
| 138 | + int nLine, i, j, k, s, x; | |
| 138 | 139 | unsigned int h, h2; |
| 139 | 140 | DLine *a; |
| 140 | 141 | |
| 141 | 142 | /* Count the number of lines. Allocate space to hold |
| 142 | 143 | ** the returned array. |
| @@ -165,52 +166,27 @@ | ||
| 165 | 166 | } |
| 166 | 167 | |
| 167 | 168 | /* Fill in the array */ |
| 168 | 169 | for(i=0; i<nLine; i++){ |
| 169 | 170 | for(j=0; z[j] && z[j]!='\n'; j++){} |
| 170 | - k = j; | |
| 171 | - s = 0; | |
| 172 | - extent = 0; /* number of spaces ignored from start/end */ | |
| 173 | - numws = 0; /* number of spaces ignored in between */ | |
| 171 | + a[i].z = z; | |
| 174 | 172 | if( diffFlags & DIFF_STRIP_EOLCR ){ |
| 175 | - /* Don't do "extend++" here, because the CR needs to be stripped! */ | |
| 176 | 173 | if( k>0 && z[k-1]=='\r' ){ k--; } |
| 177 | 174 | } |
| 178 | - if( diffFlags & DIFF_IGNORE_ALLWS ){ | |
| 179 | - while( k>0 && fossil_isspace(z[k-1]) ){ k--; extent++;} | |
| 180 | - } | |
| 181 | - if( diffFlags & DIFF_IGNORE_WSCHG ){ | |
| 182 | - if( (diffFlags & DIFF_IGNORE_ALLWS)==DIFF_IGNORE_ALLWS ){ | |
| 183 | - while( s<k && fossil_isspace(z[s]) ){s++; extent++;} | |
| 184 | - for(h=0, x=s; x<k; x++){ | |
| 185 | - if( fossil_isspace(z[x]) ){ | |
| 186 | - ++numws; | |
| 187 | - }else{ | |
| 188 | - h = h ^ (h<<2) ^ z[x]; | |
| 189 | - } | |
| 190 | - } | |
| 191 | - }else{ | |
| 192 | - for(h=0, x=0; x<k; x++){ | |
| 193 | - if( fossil_isspace(z[x]) ){ | |
| 194 | - if( x>0 && !fossil_isspace(z[x-1]) ){ | |
| 195 | - ++numws; | |
| 196 | - }else{ | |
| 197 | - h = h ^ (h<<2) ^ ' '; | |
| 198 | - } | |
| 199 | - }else{ | |
| 200 | - h = h ^ (h<<2) ^ z[x]; | |
| 201 | - } | |
| 202 | - } | |
| 203 | - } | |
| 204 | - }else{ | |
| 205 | - for(h=0, x=0; x<k; x++){ | |
| 206 | - h = h ^ (h<<2) ^ z[x]; | |
| 207 | - } | |
| 208 | - } | |
| 209 | - a[i].z = z; | |
| 210 | - a[i].extent = extent+numws; | |
| 211 | - a[i].h = h = (h<<LENGTH_MASK_SZ) | (k-s-numws); | |
| 175 | + a[i].n = k = j; | |
| 176 | + s = 0; | |
| 177 | + if( diffFlags & DIFF_IGNORE_EOLWS ){ | |
| 178 | + while( k>0 && fossil_isspace(z[k-1]) ){ k--; } | |
| 179 | + } | |
| 180 | + if( (diffFlags & DIFF_IGNORE_ALLWS)==DIFF_IGNORE_ALLWS ){ | |
| 181 | + while( s<k && fossil_isspace(z[s]) ){ s++; } | |
| 182 | + } | |
| 183 | + a[i].indent = s; | |
| 184 | + for(h=0, x=s; x<k; x++){ | |
| 185 | + h = h ^ (h<<2) ^ z[x]; | |
| 186 | + } | |
| 187 | + a[i].h = h = (h<<LENGTH_MASK_SZ) | (k-s); | |
| 212 | 188 | h2 = h % nLine; |
| 213 | 189 | a[i].iNext = a[h2].iHash; |
| 214 | 190 | a[h2].iHash = i+1; |
| 215 | 191 | z += j+1; |
| 216 | 192 | } |
| @@ -263,16 +239,16 @@ | ||
| 263 | 239 | }else if( cPrefix=='+' ){ |
| 264 | 240 | blob_append(pOut, "<span class=\"diffadd\">", -1); |
| 265 | 241 | }else if( cPrefix=='-' ){ |
| 266 | 242 | blob_append(pOut, "<span class=\"diffrm\">", -1); |
| 267 | 243 | } |
| 268 | - htmlize_to_blob(pOut, pLine->z, (pLine->h & LENGTH_MASK)); | |
| 244 | + htmlize_to_blob(pOut, pLine->z, pLine->n); | |
| 269 | 245 | if( cPrefix!=' ' ){ |
| 270 | 246 | blob_append(pOut, "</span>", -1); |
| 271 | 247 | } |
| 272 | 248 | }else{ |
| 273 | - blob_append(pOut, pLine->z, (pLine->h & LENGTH_MASK) + pLine->extent); | |
| 249 | + blob_append(pOut, pLine->z, pLine->n); | |
| 274 | 250 | } |
| 275 | 251 | blob_append(pOut, "\n", 1); |
| 276 | 252 | } |
| 277 | 253 | |
| 278 | 254 | /* |
| @@ -444,11 +420,11 @@ | ||
| 444 | 420 | b += m; |
| 445 | 421 | if( i<nr-1 ){ |
| 446 | 422 | m = R[r+i*3+3]; |
| 447 | 423 | for(j=0; j<m; j++){ |
| 448 | 424 | if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html); |
| 449 | - appendDiffLine(pOut, ' ', &B[b+j], html, 0); | |
| 425 | + appendDiffLine(pOut, ' ', &A[a+j], html, 0); | |
| 450 | 426 | } |
| 451 | 427 | b += m; |
| 452 | 428 | a += m; |
| 453 | 429 | } |
| 454 | 430 | } |
| @@ -457,11 +433,11 @@ | ||
| 457 | 433 | assert( nr==i ); |
| 458 | 434 | m = R[r+nr*3]; |
| 459 | 435 | if( m>nContext ) m = nContext; |
| 460 | 436 | for(j=0; j<m; j++){ |
| 461 | 437 | if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html); |
| 462 | - appendDiffLine(pOut, ' ', &B[b+j], html, 0); | |
| 438 | + appendDiffLine(pOut, ' ', &A[a+j], html, 0); | |
| 463 | 439 | } |
| 464 | 440 | } |
| 465 | 441 | } |
| 466 | 442 | |
| 467 | 443 | /* |
| @@ -518,11 +494,11 @@ | ||
| 518 | 494 | ** This comment contains multibyte unicode characters (ü, Æ, ð) in order |
| 519 | 495 | ** to test the ability of the diff code to handle such characters. |
| 520 | 496 | */ |
| 521 | 497 | static void sbsWriteText(SbsLine *p, DLine *pLine, int col){ |
| 522 | 498 | Blob *pCol = p->apCols[col]; |
| 523 | - int n = (pLine->h & LENGTH_MASK) + pLine->extent; | |
| 499 | + int n = pLine->n; | |
| 524 | 500 | int i; /* Number of input characters consumed */ |
| 525 | 501 | int k; /* Cursor position */ |
| 526 | 502 | int needEndSpan = 0; |
| 527 | 503 | const char *zIn = pLine->z; |
| 528 | 504 | int w = p->width; |
| @@ -1882,12 +1858,12 @@ | ||
| 1882 | 1858 | ** --invert Invert the diff DIFF_INVERT |
| 1883 | 1859 | ** -n|--linenum Show line numbers DIFF_LINENO |
| 1884 | 1860 | ** --noopt Disable optimization DIFF_NOOPT |
| 1885 | 1861 | ** --strip-trailing-cr Strip trailing CR DIFF_STRIP_EOLCR |
| 1886 | 1862 | ** --unified Unified diff. ~DIFF_SIDEBYSIDE |
| 1887 | -** -W|--width N N character lines. DIFF_WIDTH_MASK | |
| 1888 | 1863 | ** -w|--ignore-all-space Ignore all white space DIFF_IGNORE_ALLWS |
| 1864 | +** -W|--width N N character lines. DIFF_WIDTH_MASK | |
| 1889 | 1865 | ** -y|--side-by-side Side-by-side diff. DIFF_SIDEBYSIDE |
| 1890 | 1866 | ** -Z|--ignore-trailing-space Ignore eol-whitespaces DIFF_IGNORE_EOLWS |
| 1891 | 1867 | */ |
| 1892 | 1868 | u64 diff_options(void){ |
| 1893 | 1869 | u64 diffFlags = 0; |
| @@ -1995,11 +1971,11 @@ | ||
| 1995 | 1971 | typedef struct Annotator Annotator; |
| 1996 | 1972 | struct Annotator { |
| 1997 | 1973 | DContext c; /* The diff-engine context */ |
| 1998 | 1974 | struct AnnLine { /* Lines of the original files... */ |
| 1999 | 1975 | const char *z; /* The text of the line */ |
| 2000 | - short int n; /* Number of bytes */ | |
| 1976 | + short int n; /* Number of bytes (omitting trailing \n) */ | |
| 2001 | 1977 | short int iVers; /* Level at which tag was set */ |
| 2002 | 1978 | } *aOrig; |
| 2003 | 1979 | int nOrig; /* Number of elements in aOrig[] */ |
| 2004 | 1980 | int nVers; /* Number of versions analyzed */ |
| 2005 | 1981 | int bLimit; /* True if the iLimit was reached */ |
| @@ -2029,11 +2005,11 @@ | ||
| 2029 | 2005 | return 1; |
| 2030 | 2006 | } |
| 2031 | 2007 | p->aOrig = fossil_malloc( sizeof(p->aOrig[0])*p->c.nTo ); |
| 2032 | 2008 | for(i=0; i<p->c.nTo; i++){ |
| 2033 | 2009 | p->aOrig[i].z = p->c.aTo[i].z; |
| 2034 | - p->aOrig[i].n = (p->c.aTo[i].h & LENGTH_MASK) + p->c.aTo[i].extent; | |
| 2010 | + p->aOrig[i].n = p->c.aTo[i].n; | |
| 2035 | 2011 | p->aOrig[i].iVers = -1; |
| 2036 | 2012 | } |
| 2037 | 2013 | p->nOrig = p->c.nTo; |
| 2038 | 2014 | return 0; |
| 2039 | 2015 | } |
| @@ -2086,13 +2062,13 @@ | ||
| 2086 | 2062 | /* Return no errors */ |
| 2087 | 2063 | return 0; |
| 2088 | 2064 | } |
| 2089 | 2065 | |
| 2090 | 2066 | |
| 2091 | -/* Annotation flags. Cannot overlap with DIFF flags */ | |
| 2092 | -#define ANN_FILE_VERS (((u64)0x40)<<32) /* Show file vers rather than commit vers */ | |
| 2093 | -#define ANN_FILE_ANCEST (((u64)0x80)<<32) /* Prefer check-ins in the ANCESTOR table */ | |
| 2067 | +/* Annotation flags (any DIFF flag can be used as Annotation flag as well) */ | |
| 2068 | +#define ANN_FILE_VERS (((u64)0x20)<<32) /* Show file vers rather than commit vers */ | |
| 2069 | +#define ANN_FILE_ANCEST (((u64)0x40)<<32) /* Prefer check-ins in the ANCESTOR table */ | |
| 2094 | 2070 | |
| 2095 | 2071 | /* |
| 2096 | 2072 | ** Compute a complete annotation on a file. The file is identified |
| 2097 | 2073 | ** by its filename number (filename.fnid) and the baseline in which |
| 2098 | 2074 | ** it was checked in (mlink.mid). |
| @@ -2100,11 +2076,11 @@ | ||
| 2100 | 2076 | static void annotate_file( |
| 2101 | 2077 | Annotator *p, /* The annotator */ |
| 2102 | 2078 | int fnid, /* The name of the file to be annotated */ |
| 2103 | 2079 | int mid, /* Use the version of the file in this check-in */ |
| 2104 | 2080 | int iLimit, /* Limit the number of levels if greater than zero */ |
| 2105 | - u64 flags /* Flags to alter the annotation/whitespace handling */ | |
| 2081 | + u64 annFlags /* Flags to alter the annotation */ | |
| 2106 | 2082 | ){ |
| 2107 | 2083 | Blob toAnnotate; /* Text of the final (mid) version of the file */ |
| 2108 | 2084 | Blob step; /* Text of previous revision */ |
| 2109 | 2085 | int rid; /* Artifact ID of the file being annotated */ |
| 2110 | 2086 | Stmt q; /* Query returning all ancestor versions */ |
| @@ -2119,11 +2095,11 @@ | ||
| 2119 | 2095 | if( !content_get(rid, &toAnnotate) ){ |
| 2120 | 2096 | fossil_fatal("unable to retrieve content of artifact #%d", rid); |
| 2121 | 2097 | } |
| 2122 | 2098 | if( iLimit<=0 ) iLimit = 1000000000; |
| 2123 | 2099 | blob_to_utf8_no_bom(&toAnnotate, 0); |
| 2124 | - annotation_start(p, &toAnnotate, flags); | |
| 2100 | + annotation_start(p, &toAnnotate, annFlags); | |
| 2125 | 2101 | db_begin_transaction(); |
| 2126 | 2102 | db_multi_exec( |
| 2127 | 2103 | "CREATE TEMP TABLE IF NOT EXISTS vseen(rid INTEGER PRIMARY KEY);" |
| 2128 | 2104 | "DELETE FROM vseen;" |
| 2129 | 2105 | ); |
| @@ -2138,11 +2114,11 @@ | ||
| 2138 | 2114 | " FROM mlink, event" |
| 2139 | 2115 | " WHERE mlink.fid=:rid" |
| 2140 | 2116 | " AND event.objid=mlink.mid" |
| 2141 | 2117 | " AND mlink.pid NOT IN vseen" |
| 2142 | 2118 | " ORDER BY %s event.mtime", |
| 2143 | - (flags & ANN_FILE_ANCEST)!=0 ? | |
| 2119 | + (annFlags & ANN_FILE_ANCEST)!=0 ? | |
| 2144 | 2120 | "(mlink.mid IN (SELECT rid FROM ancestor)) DESC,":"" |
| 2145 | 2121 | ); |
| 2146 | 2122 | |
| 2147 | 2123 | db_bind_int(&q, ":rid", rid); |
| 2148 | 2124 | if( iLimit==0 ) iLimit = 1000000000; |
| @@ -2154,11 +2130,11 @@ | ||
| 2154 | 2130 | p->aVers[p->nVers].zDate = fossil_strdup(db_column_text(&q, 2)); |
| 2155 | 2131 | p->aVers[p->nVers].zUser = fossil_strdup(db_column_text(&q, 3)); |
| 2156 | 2132 | if( p->nVers ){ |
| 2157 | 2133 | content_get(rid, &step); |
| 2158 | 2134 | blob_to_utf8_no_bom(&step, 0); |
| 2159 | - annotation_step(p, &step, p->nVers-1, flags); | |
| 2135 | + annotation_step(p, &step, p->nVers-1, annFlags); | |
| 2160 | 2136 | blob_reset(&step); |
| 2161 | 2137 | } |
| 2162 | 2138 | p->nVers++; |
| 2163 | 2139 | db_bind_int(&ins, ":rid", rid); |
| 2164 | 2140 | db_step(&ins); |
| @@ -2209,14 +2185,13 @@ | ||
| 2209 | 2185 | void annotation_page(void){ |
| 2210 | 2186 | int mid; |
| 2211 | 2187 | int fnid; |
| 2212 | 2188 | int i; |
| 2213 | 2189 | int iLimit; /* Depth limit */ |
| 2214 | - u64 flags = (ANN_FILE_ANCEST|DIFF_STRIP_EOLCR); | |
| 2190 | + u64 annFlags = (ANN_FILE_ANCEST|DIFF_STRIP_EOLCR); | |
| 2215 | 2191 | int showLog = 0; /* True to display the log */ |
| 2216 | 2192 | int ignoreWs = 0; /* Ignore whitespace */ |
| 2217 | - u64 diffFlags; /* diff flags for ignore whitespace */ | |
| 2218 | 2193 | const char *zFilename; /* Name of file to annotate */ |
| 2219 | 2194 | const char *zCI; /* The check-in containing zFilename */ |
| 2220 | 2195 | Annotator ann; |
| 2221 | 2196 | HQuery url; |
| 2222 | 2197 | struct AnnVers *p; |
| @@ -2226,25 +2201,26 @@ | ||
| 2226 | 2201 | /* Gather query parameters */ |
| 2227 | 2202 | showLog = atoi(PD("log","1")); |
| 2228 | 2203 | login_check_credentials(); |
| 2229 | 2204 | if( !g.perm.Read ){ login_needed(); return; } |
| 2230 | 2205 | if( exclude_spiders("annotate") ) return; |
| 2206 | + load_control(); | |
| 2231 | 2207 | mid = name_to_typed_rid(PD("checkin","0"),"ci"); |
| 2232 | 2208 | zFilename = P("filename"); |
| 2233 | 2209 | fnid = db_int(0, "SELECT fnid FROM filename WHERE name=%Q", zFilename); |
| 2234 | 2210 | if( mid==0 || fnid==0 ){ fossil_redirect_home(); } |
| 2235 | 2211 | iLimit = atoi(PD("limit","20")); |
| 2236 | - if( P("filevers") ) flags |= ANN_FILE_VERS; | |
| 2212 | + if( P("filevers") ) annFlags |= ANN_FILE_VERS; | |
| 2237 | 2213 | ignoreWs = P("w")!=0; |
| 2238 | - if( ignoreWs ) flags |= DIFF_IGNORE_ALLWS; | |
| 2214 | + if( ignoreWs ) annFlags |= DIFF_IGNORE_ALLWS; | |
| 2239 | 2215 | if( !db_exists("SELECT 1 FROM mlink WHERE mid=%d AND fnid=%d",mid,fnid) ){ |
| 2240 | 2216 | fossil_redirect_home(); |
| 2241 | 2217 | } |
| 2242 | 2218 | |
| 2243 | 2219 | /* compute the annotation */ |
| 2244 | 2220 | compute_direct_ancestors(mid, 10000000); |
| 2245 | - annotate_file(&ann, fnid, mid, iLimit, flags); | |
| 2221 | + annotate_file(&ann, fnid, mid, iLimit, annFlags); | |
| 2246 | 2222 | zCI = ann.aVers[0].zMUuid; |
| 2247 | 2223 | |
| 2248 | 2224 | /* generate the web page */ |
| 2249 | 2225 | style_header("Annotation For %h", zFilename); |
| 2250 | 2226 | if( bBlame ){ |
| @@ -2407,27 +2383,27 @@ | ||
| 2407 | 2383 | Annotator ann; /* The annotation of the file */ |
| 2408 | 2384 | int i; /* Loop counter */ |
| 2409 | 2385 | const char *zLimit; /* The value to the -n|--limit option */ |
| 2410 | 2386 | int iLimit; /* How far back in time to look */ |
| 2411 | 2387 | int showLog; /* True to show the log */ |
| 2412 | - u64 flags = 0; /* Flags to control annotation/whitespace handling */ | |
| 2413 | 2388 | int fileVers; /* Show file version instead of check-in versions */ |
| 2389 | + u64 annFlags = 0; /* Flags to control annotation properties */ | |
| 2414 | 2390 | int bBlame = 0; /* True for BLAME output. False for ANNOTATE. */ |
| 2415 | 2391 | |
| 2416 | 2392 | bBlame = g.argv[1][0]!='a'; |
| 2417 | 2393 | zLimit = find_option("limit","n",1); |
| 2418 | 2394 | if( zLimit==0 || zLimit[0]==0 ) zLimit = "-1"; |
| 2419 | 2395 | iLimit = atoi(zLimit); |
| 2420 | 2396 | showLog = find_option("log","l",0)!=0; |
| 2421 | 2397 | if( find_option("ignore-trailing-space","Z",0)!=0 ){ |
| 2422 | - flags = DIFF_IGNORE_EOLWS; | |
| 2398 | + annFlags = DIFF_IGNORE_EOLWS; | |
| 2423 | 2399 | } |
| 2424 | 2400 | if( find_option("ignore-space-change","b",0)!=0 ){ |
| 2425 | - flags = DIFF_IGNORE_WSCHG; /* stronger than DIFF_IGNORE_EOLWS */ | |
| 2401 | + annFlags = DIFF_IGNORE_WSCHG; /* stronger than DIFF_IGNORE_EOLWS */ | |
| 2426 | 2402 | } |
| 2427 | 2403 | if( find_option("ignore-all-space","w",0)!=0 ){ |
| 2428 | - flags = DIFF_IGNORE_ALLWS; /* stronger than DIFF_IGNORE_WSCHG */ | |
| 2404 | + annFlags = DIFF_IGNORE_ALLWS; /* stronger than DIFF_IGNORE_WSCHG */ | |
| 2429 | 2405 | } |
| 2430 | 2406 | fileVers = find_option("filevers",0,0)!=0; |
| 2431 | 2407 | db_must_be_within_tree(); |
| 2432 | 2408 | if( g.argc<3 ) { |
| 2433 | 2409 | usage("FILENAME"); |
| @@ -2453,12 +2429,12 @@ | ||
| 2453 | 2429 | " ORDER BY ancestor.generation ASC LIMIT 1", |
| 2454 | 2430 | fid, fnid); |
| 2455 | 2431 | if( mid==0 ){ |
| 2456 | 2432 | fossil_fatal("unable to find manifest"); |
| 2457 | 2433 | } |
| 2458 | - flags |= (ANN_FILE_ANCEST|DIFF_STRIP_EOLCR); | |
| 2459 | - annotate_file(&ann, fnid, mid, iLimit, flags); | |
| 2434 | + annFlags |= (ANN_FILE_ANCEST|DIFF_STRIP_EOLCR); | |
| 2435 | + annotate_file(&ann, fnid, mid, iLimit, annFlags); | |
| 2460 | 2436 | if( showLog ){ |
| 2461 | 2437 | struct AnnVers *p; |
| 2462 | 2438 | for(p=ann.aVers, i=0; i<ann.nVers; i++, p++){ |
| 2463 | 2439 | fossil_print("version %3d: %s %.10s file %.10s\n", |
| 2464 | 2440 | i+1, p->zDate, p->zMUuid, p->zFUuid); |
| 2465 | 2441 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -78,11 +78,12 @@ | |
| 78 | */ |
| 79 | typedef struct DLine DLine; |
| 80 | struct DLine { |
| 81 | const char *z; /* The text of the line */ |
| 82 | unsigned int h; /* Hash of the line */ |
| 83 | unsigned short extent; /* Extent of the line. how much longer than recorded in h */ |
| 84 | unsigned int iNext; /* 1+(Index of next line with same the same hash) */ |
| 85 | |
| 86 | /* an array of DLine elements serves two purposes. The fields |
| 87 | ** above are one per line of input text. But each entry is also |
| 88 | ** a bucket in a hash table, as follows: */ |
| @@ -132,11 +133,11 @@ | |
| 132 | ** |
| 133 | ** Profiling show that in most cases this routine consumes the bulk of |
| 134 | ** the CPU time on a diff. |
| 135 | */ |
| 136 | static DLine *break_into_lines(const char *z, int n, int *pnLine, u64 diffFlags){ |
| 137 | int nLine, i, j, k, s, extent, x, numws; |
| 138 | unsigned int h, h2; |
| 139 | DLine *a; |
| 140 | |
| 141 | /* Count the number of lines. Allocate space to hold |
| 142 | ** the returned array. |
| @@ -165,52 +166,27 @@ | |
| 165 | } |
| 166 | |
| 167 | /* Fill in the array */ |
| 168 | for(i=0; i<nLine; i++){ |
| 169 | for(j=0; z[j] && z[j]!='\n'; j++){} |
| 170 | k = j; |
| 171 | s = 0; |
| 172 | extent = 0; /* number of spaces ignored from start/end */ |
| 173 | numws = 0; /* number of spaces ignored in between */ |
| 174 | if( diffFlags & DIFF_STRIP_EOLCR ){ |
| 175 | /* Don't do "extend++" here, because the CR needs to be stripped! */ |
| 176 | if( k>0 && z[k-1]=='\r' ){ k--; } |
| 177 | } |
| 178 | if( diffFlags & DIFF_IGNORE_ALLWS ){ |
| 179 | while( k>0 && fossil_isspace(z[k-1]) ){ k--; extent++;} |
| 180 | } |
| 181 | if( diffFlags & DIFF_IGNORE_WSCHG ){ |
| 182 | if( (diffFlags & DIFF_IGNORE_ALLWS)==DIFF_IGNORE_ALLWS ){ |
| 183 | while( s<k && fossil_isspace(z[s]) ){s++; extent++;} |
| 184 | for(h=0, x=s; x<k; x++){ |
| 185 | if( fossil_isspace(z[x]) ){ |
| 186 | ++numws; |
| 187 | }else{ |
| 188 | h = h ^ (h<<2) ^ z[x]; |
| 189 | } |
| 190 | } |
| 191 | }else{ |
| 192 | for(h=0, x=0; x<k; x++){ |
| 193 | if( fossil_isspace(z[x]) ){ |
| 194 | if( x>0 && !fossil_isspace(z[x-1]) ){ |
| 195 | ++numws; |
| 196 | }else{ |
| 197 | h = h ^ (h<<2) ^ ' '; |
| 198 | } |
| 199 | }else{ |
| 200 | h = h ^ (h<<2) ^ z[x]; |
| 201 | } |
| 202 | } |
| 203 | } |
| 204 | }else{ |
| 205 | for(h=0, x=0; x<k; x++){ |
| 206 | h = h ^ (h<<2) ^ z[x]; |
| 207 | } |
| 208 | } |
| 209 | a[i].z = z; |
| 210 | a[i].extent = extent+numws; |
| 211 | a[i].h = h = (h<<LENGTH_MASK_SZ) | (k-s-numws); |
| 212 | h2 = h % nLine; |
| 213 | a[i].iNext = a[h2].iHash; |
| 214 | a[h2].iHash = i+1; |
| 215 | z += j+1; |
| 216 | } |
| @@ -263,16 +239,16 @@ | |
| 263 | }else if( cPrefix=='+' ){ |
| 264 | blob_append(pOut, "<span class=\"diffadd\">", -1); |
| 265 | }else if( cPrefix=='-' ){ |
| 266 | blob_append(pOut, "<span class=\"diffrm\">", -1); |
| 267 | } |
| 268 | htmlize_to_blob(pOut, pLine->z, (pLine->h & LENGTH_MASK)); |
| 269 | if( cPrefix!=' ' ){ |
| 270 | blob_append(pOut, "</span>", -1); |
| 271 | } |
| 272 | }else{ |
| 273 | blob_append(pOut, pLine->z, (pLine->h & LENGTH_MASK) + pLine->extent); |
| 274 | } |
| 275 | blob_append(pOut, "\n", 1); |
| 276 | } |
| 277 | |
| 278 | /* |
| @@ -444,11 +420,11 @@ | |
| 444 | b += m; |
| 445 | if( i<nr-1 ){ |
| 446 | m = R[r+i*3+3]; |
| 447 | for(j=0; j<m; j++){ |
| 448 | if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html); |
| 449 | appendDiffLine(pOut, ' ', &B[b+j], html, 0); |
| 450 | } |
| 451 | b += m; |
| 452 | a += m; |
| 453 | } |
| 454 | } |
| @@ -457,11 +433,11 @@ | |
| 457 | assert( nr==i ); |
| 458 | m = R[r+nr*3]; |
| 459 | if( m>nContext ) m = nContext; |
| 460 | for(j=0; j<m; j++){ |
| 461 | if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html); |
| 462 | appendDiffLine(pOut, ' ', &B[b+j], html, 0); |
| 463 | } |
| 464 | } |
| 465 | } |
| 466 | |
| 467 | /* |
| @@ -518,11 +494,11 @@ | |
| 518 | ** This comment contains multibyte unicode characters (ü, Æ, ð) in order |
| 519 | ** to test the ability of the diff code to handle such characters. |
| 520 | */ |
| 521 | static void sbsWriteText(SbsLine *p, DLine *pLine, int col){ |
| 522 | Blob *pCol = p->apCols[col]; |
| 523 | int n = (pLine->h & LENGTH_MASK) + pLine->extent; |
| 524 | int i; /* Number of input characters consumed */ |
| 525 | int k; /* Cursor position */ |
| 526 | int needEndSpan = 0; |
| 527 | const char *zIn = pLine->z; |
| 528 | int w = p->width; |
| @@ -1882,12 +1858,12 @@ | |
| 1882 | ** --invert Invert the diff DIFF_INVERT |
| 1883 | ** -n|--linenum Show line numbers DIFF_LINENO |
| 1884 | ** --noopt Disable optimization DIFF_NOOPT |
| 1885 | ** --strip-trailing-cr Strip trailing CR DIFF_STRIP_EOLCR |
| 1886 | ** --unified Unified diff. ~DIFF_SIDEBYSIDE |
| 1887 | ** -W|--width N N character lines. DIFF_WIDTH_MASK |
| 1888 | ** -w|--ignore-all-space Ignore all white space DIFF_IGNORE_ALLWS |
| 1889 | ** -y|--side-by-side Side-by-side diff. DIFF_SIDEBYSIDE |
| 1890 | ** -Z|--ignore-trailing-space Ignore eol-whitespaces DIFF_IGNORE_EOLWS |
| 1891 | */ |
| 1892 | u64 diff_options(void){ |
| 1893 | u64 diffFlags = 0; |
| @@ -1995,11 +1971,11 @@ | |
| 1995 | typedef struct Annotator Annotator; |
| 1996 | struct Annotator { |
| 1997 | DContext c; /* The diff-engine context */ |
| 1998 | struct AnnLine { /* Lines of the original files... */ |
| 1999 | const char *z; /* The text of the line */ |
| 2000 | short int n; /* Number of bytes */ |
| 2001 | short int iVers; /* Level at which tag was set */ |
| 2002 | } *aOrig; |
| 2003 | int nOrig; /* Number of elements in aOrig[] */ |
| 2004 | int nVers; /* Number of versions analyzed */ |
| 2005 | int bLimit; /* True if the iLimit was reached */ |
| @@ -2029,11 +2005,11 @@ | |
| 2029 | return 1; |
| 2030 | } |
| 2031 | p->aOrig = fossil_malloc( sizeof(p->aOrig[0])*p->c.nTo ); |
| 2032 | for(i=0; i<p->c.nTo; i++){ |
| 2033 | p->aOrig[i].z = p->c.aTo[i].z; |
| 2034 | p->aOrig[i].n = (p->c.aTo[i].h & LENGTH_MASK) + p->c.aTo[i].extent; |
| 2035 | p->aOrig[i].iVers = -1; |
| 2036 | } |
| 2037 | p->nOrig = p->c.nTo; |
| 2038 | return 0; |
| 2039 | } |
| @@ -2086,13 +2062,13 @@ | |
| 2086 | /* Return no errors */ |
| 2087 | return 0; |
| 2088 | } |
| 2089 | |
| 2090 | |
| 2091 | /* Annotation flags. Cannot overlap with DIFF flags */ |
| 2092 | #define ANN_FILE_VERS (((u64)0x40)<<32) /* Show file vers rather than commit vers */ |
| 2093 | #define ANN_FILE_ANCEST (((u64)0x80)<<32) /* Prefer check-ins in the ANCESTOR table */ |
| 2094 | |
| 2095 | /* |
| 2096 | ** Compute a complete annotation on a file. The file is identified |
| 2097 | ** by its filename number (filename.fnid) and the baseline in which |
| 2098 | ** it was checked in (mlink.mid). |
| @@ -2100,11 +2076,11 @@ | |
| 2100 | static void annotate_file( |
| 2101 | Annotator *p, /* The annotator */ |
| 2102 | int fnid, /* The name of the file to be annotated */ |
| 2103 | int mid, /* Use the version of the file in this check-in */ |
| 2104 | int iLimit, /* Limit the number of levels if greater than zero */ |
| 2105 | u64 flags /* Flags to alter the annotation/whitespace handling */ |
| 2106 | ){ |
| 2107 | Blob toAnnotate; /* Text of the final (mid) version of the file */ |
| 2108 | Blob step; /* Text of previous revision */ |
| 2109 | int rid; /* Artifact ID of the file being annotated */ |
| 2110 | Stmt q; /* Query returning all ancestor versions */ |
| @@ -2119,11 +2095,11 @@ | |
| 2119 | if( !content_get(rid, &toAnnotate) ){ |
| 2120 | fossil_fatal("unable to retrieve content of artifact #%d", rid); |
| 2121 | } |
| 2122 | if( iLimit<=0 ) iLimit = 1000000000; |
| 2123 | blob_to_utf8_no_bom(&toAnnotate, 0); |
| 2124 | annotation_start(p, &toAnnotate, flags); |
| 2125 | db_begin_transaction(); |
| 2126 | db_multi_exec( |
| 2127 | "CREATE TEMP TABLE IF NOT EXISTS vseen(rid INTEGER PRIMARY KEY);" |
| 2128 | "DELETE FROM vseen;" |
| 2129 | ); |
| @@ -2138,11 +2114,11 @@ | |
| 2138 | " FROM mlink, event" |
| 2139 | " WHERE mlink.fid=:rid" |
| 2140 | " AND event.objid=mlink.mid" |
| 2141 | " AND mlink.pid NOT IN vseen" |
| 2142 | " ORDER BY %s event.mtime", |
| 2143 | (flags & ANN_FILE_ANCEST)!=0 ? |
| 2144 | "(mlink.mid IN (SELECT rid FROM ancestor)) DESC,":"" |
| 2145 | ); |
| 2146 | |
| 2147 | db_bind_int(&q, ":rid", rid); |
| 2148 | if( iLimit==0 ) iLimit = 1000000000; |
| @@ -2154,11 +2130,11 @@ | |
| 2154 | p->aVers[p->nVers].zDate = fossil_strdup(db_column_text(&q, 2)); |
| 2155 | p->aVers[p->nVers].zUser = fossil_strdup(db_column_text(&q, 3)); |
| 2156 | if( p->nVers ){ |
| 2157 | content_get(rid, &step); |
| 2158 | blob_to_utf8_no_bom(&step, 0); |
| 2159 | annotation_step(p, &step, p->nVers-1, flags); |
| 2160 | blob_reset(&step); |
| 2161 | } |
| 2162 | p->nVers++; |
| 2163 | db_bind_int(&ins, ":rid", rid); |
| 2164 | db_step(&ins); |
| @@ -2209,14 +2185,13 @@ | |
| 2209 | void annotation_page(void){ |
| 2210 | int mid; |
| 2211 | int fnid; |
| 2212 | int i; |
| 2213 | int iLimit; /* Depth limit */ |
| 2214 | u64 flags = (ANN_FILE_ANCEST|DIFF_STRIP_EOLCR); |
| 2215 | int showLog = 0; /* True to display the log */ |
| 2216 | int ignoreWs = 0; /* Ignore whitespace */ |
| 2217 | u64 diffFlags; /* diff flags for ignore whitespace */ |
| 2218 | const char *zFilename; /* Name of file to annotate */ |
| 2219 | const char *zCI; /* The check-in containing zFilename */ |
| 2220 | Annotator ann; |
| 2221 | HQuery url; |
| 2222 | struct AnnVers *p; |
| @@ -2226,25 +2201,26 @@ | |
| 2226 | /* Gather query parameters */ |
| 2227 | showLog = atoi(PD("log","1")); |
| 2228 | login_check_credentials(); |
| 2229 | if( !g.perm.Read ){ login_needed(); return; } |
| 2230 | if( exclude_spiders("annotate") ) return; |
| 2231 | mid = name_to_typed_rid(PD("checkin","0"),"ci"); |
| 2232 | zFilename = P("filename"); |
| 2233 | fnid = db_int(0, "SELECT fnid FROM filename WHERE name=%Q", zFilename); |
| 2234 | if( mid==0 || fnid==0 ){ fossil_redirect_home(); } |
| 2235 | iLimit = atoi(PD("limit","20")); |
| 2236 | if( P("filevers") ) flags |= ANN_FILE_VERS; |
| 2237 | ignoreWs = P("w")!=0; |
| 2238 | if( ignoreWs ) flags |= DIFF_IGNORE_ALLWS; |
| 2239 | if( !db_exists("SELECT 1 FROM mlink WHERE mid=%d AND fnid=%d",mid,fnid) ){ |
| 2240 | fossil_redirect_home(); |
| 2241 | } |
| 2242 | |
| 2243 | /* compute the annotation */ |
| 2244 | compute_direct_ancestors(mid, 10000000); |
| 2245 | annotate_file(&ann, fnid, mid, iLimit, flags); |
| 2246 | zCI = ann.aVers[0].zMUuid; |
| 2247 | |
| 2248 | /* generate the web page */ |
| 2249 | style_header("Annotation For %h", zFilename); |
| 2250 | if( bBlame ){ |
| @@ -2407,27 +2383,27 @@ | |
| 2407 | Annotator ann; /* The annotation of the file */ |
| 2408 | int i; /* Loop counter */ |
| 2409 | const char *zLimit; /* The value to the -n|--limit option */ |
| 2410 | int iLimit; /* How far back in time to look */ |
| 2411 | int showLog; /* True to show the log */ |
| 2412 | u64 flags = 0; /* Flags to control annotation/whitespace handling */ |
| 2413 | int fileVers; /* Show file version instead of check-in versions */ |
| 2414 | int bBlame = 0; /* True for BLAME output. False for ANNOTATE. */ |
| 2415 | |
| 2416 | bBlame = g.argv[1][0]!='a'; |
| 2417 | zLimit = find_option("limit","n",1); |
| 2418 | if( zLimit==0 || zLimit[0]==0 ) zLimit = "-1"; |
| 2419 | iLimit = atoi(zLimit); |
| 2420 | showLog = find_option("log","l",0)!=0; |
| 2421 | if( find_option("ignore-trailing-space","Z",0)!=0 ){ |
| 2422 | flags = DIFF_IGNORE_EOLWS; |
| 2423 | } |
| 2424 | if( find_option("ignore-space-change","b",0)!=0 ){ |
| 2425 | flags = DIFF_IGNORE_WSCHG; /* stronger than DIFF_IGNORE_EOLWS */ |
| 2426 | } |
| 2427 | if( find_option("ignore-all-space","w",0)!=0 ){ |
| 2428 | flags = DIFF_IGNORE_ALLWS; /* stronger than DIFF_IGNORE_WSCHG */ |
| 2429 | } |
| 2430 | fileVers = find_option("filevers",0,0)!=0; |
| 2431 | db_must_be_within_tree(); |
| 2432 | if( g.argc<3 ) { |
| 2433 | usage("FILENAME"); |
| @@ -2453,12 +2429,12 @@ | |
| 2453 | " ORDER BY ancestor.generation ASC LIMIT 1", |
| 2454 | fid, fnid); |
| 2455 | if( mid==0 ){ |
| 2456 | fossil_fatal("unable to find manifest"); |
| 2457 | } |
| 2458 | flags |= (ANN_FILE_ANCEST|DIFF_STRIP_EOLCR); |
| 2459 | annotate_file(&ann, fnid, mid, iLimit, flags); |
| 2460 | if( showLog ){ |
| 2461 | struct AnnVers *p; |
| 2462 | for(p=ann.aVers, i=0; i<ann.nVers; i++, p++){ |
| 2463 | fossil_print("version %3d: %s %.10s file %.10s\n", |
| 2464 | i+1, p->zDate, p->zMUuid, p->zFUuid); |
| 2465 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -78,11 +78,12 @@ | |
| 78 | */ |
| 79 | typedef struct DLine DLine; |
| 80 | struct DLine { |
| 81 | const char *z; /* The text of the line */ |
| 82 | unsigned int h; /* Hash of the line */ |
| 83 | unsigned short indent; /* Indent of the line. Only !=0 with -w/-Z option */ |
| 84 | unsigned short n; /* number of bytes */ |
| 85 | unsigned int iNext; /* 1+(Index of next line with same the same hash) */ |
| 86 | |
| 87 | /* an array of DLine elements serves two purposes. The fields |
| 88 | ** above are one per line of input text. But each entry is also |
| 89 | ** a bucket in a hash table, as follows: */ |
| @@ -132,11 +133,11 @@ | |
| 133 | ** |
| 134 | ** Profiling show that in most cases this routine consumes the bulk of |
| 135 | ** the CPU time on a diff. |
| 136 | */ |
| 137 | static DLine *break_into_lines(const char *z, int n, int *pnLine, u64 diffFlags){ |
| 138 | int nLine, i, j, k, s, x; |
| 139 | unsigned int h, h2; |
| 140 | DLine *a; |
| 141 | |
| 142 | /* Count the number of lines. Allocate space to hold |
| 143 | ** the returned array. |
| @@ -165,52 +166,27 @@ | |
| 166 | } |
| 167 | |
| 168 | /* Fill in the array */ |
| 169 | for(i=0; i<nLine; i++){ |
| 170 | for(j=0; z[j] && z[j]!='\n'; j++){} |
| 171 | a[i].z = z; |
| 172 | if( diffFlags & DIFF_STRIP_EOLCR ){ |
| 173 | if( k>0 && z[k-1]=='\r' ){ k--; } |
| 174 | } |
| 175 | a[i].n = k = j; |
| 176 | s = 0; |
| 177 | if( diffFlags & DIFF_IGNORE_EOLWS ){ |
| 178 | while( k>0 && fossil_isspace(z[k-1]) ){ k--; } |
| 179 | } |
| 180 | if( (diffFlags & DIFF_IGNORE_ALLWS)==DIFF_IGNORE_ALLWS ){ |
| 181 | while( s<k && fossil_isspace(z[s]) ){ s++; } |
| 182 | } |
| 183 | a[i].indent = s; |
| 184 | for(h=0, x=s; x<k; x++){ |
| 185 | h = h ^ (h<<2) ^ z[x]; |
| 186 | } |
| 187 | a[i].h = h = (h<<LENGTH_MASK_SZ) | (k-s); |
| 188 | h2 = h % nLine; |
| 189 | a[i].iNext = a[h2].iHash; |
| 190 | a[h2].iHash = i+1; |
| 191 | z += j+1; |
| 192 | } |
| @@ -263,16 +239,16 @@ | |
| 239 | }else if( cPrefix=='+' ){ |
| 240 | blob_append(pOut, "<span class=\"diffadd\">", -1); |
| 241 | }else if( cPrefix=='-' ){ |
| 242 | blob_append(pOut, "<span class=\"diffrm\">", -1); |
| 243 | } |
| 244 | htmlize_to_blob(pOut, pLine->z, pLine->n); |
| 245 | if( cPrefix!=' ' ){ |
| 246 | blob_append(pOut, "</span>", -1); |
| 247 | } |
| 248 | }else{ |
| 249 | blob_append(pOut, pLine->z, pLine->n); |
| 250 | } |
| 251 | blob_append(pOut, "\n", 1); |
| 252 | } |
| 253 | |
| 254 | /* |
| @@ -444,11 +420,11 @@ | |
| 420 | b += m; |
| 421 | if( i<nr-1 ){ |
| 422 | m = R[r+i*3+3]; |
| 423 | for(j=0; j<m; j++){ |
| 424 | if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html); |
| 425 | appendDiffLine(pOut, ' ', &A[a+j], html, 0); |
| 426 | } |
| 427 | b += m; |
| 428 | a += m; |
| 429 | } |
| 430 | } |
| @@ -457,11 +433,11 @@ | |
| 433 | assert( nr==i ); |
| 434 | m = R[r+nr*3]; |
| 435 | if( m>nContext ) m = nContext; |
| 436 | for(j=0; j<m; j++){ |
| 437 | if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html); |
| 438 | appendDiffLine(pOut, ' ', &A[a+j], html, 0); |
| 439 | } |
| 440 | } |
| 441 | } |
| 442 | |
| 443 | /* |
| @@ -518,11 +494,11 @@ | |
| 494 | ** This comment contains multibyte unicode characters (ü, Æ, ð) in order |
| 495 | ** to test the ability of the diff code to handle such characters. |
| 496 | */ |
| 497 | static void sbsWriteText(SbsLine *p, DLine *pLine, int col){ |
| 498 | Blob *pCol = p->apCols[col]; |
| 499 | int n = pLine->n; |
| 500 | int i; /* Number of input characters consumed */ |
| 501 | int k; /* Cursor position */ |
| 502 | int needEndSpan = 0; |
| 503 | const char *zIn = pLine->z; |
| 504 | int w = p->width; |
| @@ -1882,12 +1858,12 @@ | |
| 1858 | ** --invert Invert the diff DIFF_INVERT |
| 1859 | ** -n|--linenum Show line numbers DIFF_LINENO |
| 1860 | ** --noopt Disable optimization DIFF_NOOPT |
| 1861 | ** --strip-trailing-cr Strip trailing CR DIFF_STRIP_EOLCR |
| 1862 | ** --unified Unified diff. ~DIFF_SIDEBYSIDE |
| 1863 | ** -w|--ignore-all-space Ignore all white space DIFF_IGNORE_ALLWS |
| 1864 | ** -W|--width N N character lines. DIFF_WIDTH_MASK |
| 1865 | ** -y|--side-by-side Side-by-side diff. DIFF_SIDEBYSIDE |
| 1866 | ** -Z|--ignore-trailing-space Ignore eol-whitespaces DIFF_IGNORE_EOLWS |
| 1867 | */ |
| 1868 | u64 diff_options(void){ |
| 1869 | u64 diffFlags = 0; |
| @@ -1995,11 +1971,11 @@ | |
| 1971 | typedef struct Annotator Annotator; |
| 1972 | struct Annotator { |
| 1973 | DContext c; /* The diff-engine context */ |
| 1974 | struct AnnLine { /* Lines of the original files... */ |
| 1975 | const char *z; /* The text of the line */ |
| 1976 | short int n; /* Number of bytes (omitting trailing \n) */ |
| 1977 | short int iVers; /* Level at which tag was set */ |
| 1978 | } *aOrig; |
| 1979 | int nOrig; /* Number of elements in aOrig[] */ |
| 1980 | int nVers; /* Number of versions analyzed */ |
| 1981 | int bLimit; /* True if the iLimit was reached */ |
| @@ -2029,11 +2005,11 @@ | |
| 2005 | return 1; |
| 2006 | } |
| 2007 | p->aOrig = fossil_malloc( sizeof(p->aOrig[0])*p->c.nTo ); |
| 2008 | for(i=0; i<p->c.nTo; i++){ |
| 2009 | p->aOrig[i].z = p->c.aTo[i].z; |
| 2010 | p->aOrig[i].n = p->c.aTo[i].n; |
| 2011 | p->aOrig[i].iVers = -1; |
| 2012 | } |
| 2013 | p->nOrig = p->c.nTo; |
| 2014 | return 0; |
| 2015 | } |
| @@ -2086,13 +2062,13 @@ | |
| 2062 | /* Return no errors */ |
| 2063 | return 0; |
| 2064 | } |
| 2065 | |
| 2066 | |
| 2067 | /* Annotation flags (any DIFF flag can be used as Annotation flag as well) */ |
| 2068 | #define ANN_FILE_VERS (((u64)0x20)<<32) /* Show file vers rather than commit vers */ |
| 2069 | #define ANN_FILE_ANCEST (((u64)0x40)<<32) /* Prefer check-ins in the ANCESTOR table */ |
| 2070 | |
| 2071 | /* |
| 2072 | ** Compute a complete annotation on a file. The file is identified |
| 2073 | ** by its filename number (filename.fnid) and the baseline in which |
| 2074 | ** it was checked in (mlink.mid). |
| @@ -2100,11 +2076,11 @@ | |
| 2076 | static void annotate_file( |
| 2077 | Annotator *p, /* The annotator */ |
| 2078 | int fnid, /* The name of the file to be annotated */ |
| 2079 | int mid, /* Use the version of the file in this check-in */ |
| 2080 | int iLimit, /* Limit the number of levels if greater than zero */ |
| 2081 | u64 annFlags /* Flags to alter the annotation */ |
| 2082 | ){ |
| 2083 | Blob toAnnotate; /* Text of the final (mid) version of the file */ |
| 2084 | Blob step; /* Text of previous revision */ |
| 2085 | int rid; /* Artifact ID of the file being annotated */ |
| 2086 | Stmt q; /* Query returning all ancestor versions */ |
| @@ -2119,11 +2095,11 @@ | |
| 2095 | if( !content_get(rid, &toAnnotate) ){ |
| 2096 | fossil_fatal("unable to retrieve content of artifact #%d", rid); |
| 2097 | } |
| 2098 | if( iLimit<=0 ) iLimit = 1000000000; |
| 2099 | blob_to_utf8_no_bom(&toAnnotate, 0); |
| 2100 | annotation_start(p, &toAnnotate, annFlags); |
| 2101 | db_begin_transaction(); |
| 2102 | db_multi_exec( |
| 2103 | "CREATE TEMP TABLE IF NOT EXISTS vseen(rid INTEGER PRIMARY KEY);" |
| 2104 | "DELETE FROM vseen;" |
| 2105 | ); |
| @@ -2138,11 +2114,11 @@ | |
| 2114 | " FROM mlink, event" |
| 2115 | " WHERE mlink.fid=:rid" |
| 2116 | " AND event.objid=mlink.mid" |
| 2117 | " AND mlink.pid NOT IN vseen" |
| 2118 | " ORDER BY %s event.mtime", |
| 2119 | (annFlags & ANN_FILE_ANCEST)!=0 ? |
| 2120 | "(mlink.mid IN (SELECT rid FROM ancestor)) DESC,":"" |
| 2121 | ); |
| 2122 | |
| 2123 | db_bind_int(&q, ":rid", rid); |
| 2124 | if( iLimit==0 ) iLimit = 1000000000; |
| @@ -2154,11 +2130,11 @@ | |
| 2130 | p->aVers[p->nVers].zDate = fossil_strdup(db_column_text(&q, 2)); |
| 2131 | p->aVers[p->nVers].zUser = fossil_strdup(db_column_text(&q, 3)); |
| 2132 | if( p->nVers ){ |
| 2133 | content_get(rid, &step); |
| 2134 | blob_to_utf8_no_bom(&step, 0); |
| 2135 | annotation_step(p, &step, p->nVers-1, annFlags); |
| 2136 | blob_reset(&step); |
| 2137 | } |
| 2138 | p->nVers++; |
| 2139 | db_bind_int(&ins, ":rid", rid); |
| 2140 | db_step(&ins); |
| @@ -2209,14 +2185,13 @@ | |
| 2185 | void annotation_page(void){ |
| 2186 | int mid; |
| 2187 | int fnid; |
| 2188 | int i; |
| 2189 | int iLimit; /* Depth limit */ |
| 2190 | u64 annFlags = (ANN_FILE_ANCEST|DIFF_STRIP_EOLCR); |
| 2191 | int showLog = 0; /* True to display the log */ |
| 2192 | int ignoreWs = 0; /* Ignore whitespace */ |
| 2193 | const char *zFilename; /* Name of file to annotate */ |
| 2194 | const char *zCI; /* The check-in containing zFilename */ |
| 2195 | Annotator ann; |
| 2196 | HQuery url; |
| 2197 | struct AnnVers *p; |
| @@ -2226,25 +2201,26 @@ | |
| 2201 | /* Gather query parameters */ |
| 2202 | showLog = atoi(PD("log","1")); |
| 2203 | login_check_credentials(); |
| 2204 | if( !g.perm.Read ){ login_needed(); return; } |
| 2205 | if( exclude_spiders("annotate") ) return; |
| 2206 | load_control(); |
| 2207 | mid = name_to_typed_rid(PD("checkin","0"),"ci"); |
| 2208 | zFilename = P("filename"); |
| 2209 | fnid = db_int(0, "SELECT fnid FROM filename WHERE name=%Q", zFilename); |
| 2210 | if( mid==0 || fnid==0 ){ fossil_redirect_home(); } |
| 2211 | iLimit = atoi(PD("limit","20")); |
| 2212 | if( P("filevers") ) annFlags |= ANN_FILE_VERS; |
| 2213 | ignoreWs = P("w")!=0; |
| 2214 | if( ignoreWs ) annFlags |= DIFF_IGNORE_ALLWS; |
| 2215 | if( !db_exists("SELECT 1 FROM mlink WHERE mid=%d AND fnid=%d",mid,fnid) ){ |
| 2216 | fossil_redirect_home(); |
| 2217 | } |
| 2218 | |
| 2219 | /* compute the annotation */ |
| 2220 | compute_direct_ancestors(mid, 10000000); |
| 2221 | annotate_file(&ann, fnid, mid, iLimit, annFlags); |
| 2222 | zCI = ann.aVers[0].zMUuid; |
| 2223 | |
| 2224 | /* generate the web page */ |
| 2225 | style_header("Annotation For %h", zFilename); |
| 2226 | if( bBlame ){ |
| @@ -2407,27 +2383,27 @@ | |
| 2383 | Annotator ann; /* The annotation of the file */ |
| 2384 | int i; /* Loop counter */ |
| 2385 | const char *zLimit; /* The value to the -n|--limit option */ |
| 2386 | int iLimit; /* How far back in time to look */ |
| 2387 | int showLog; /* True to show the log */ |
| 2388 | int fileVers; /* Show file version instead of check-in versions */ |
| 2389 | u64 annFlags = 0; /* Flags to control annotation properties */ |
| 2390 | int bBlame = 0; /* True for BLAME output. False for ANNOTATE. */ |
| 2391 | |
| 2392 | bBlame = g.argv[1][0]!='a'; |
| 2393 | zLimit = find_option("limit","n",1); |
| 2394 | if( zLimit==0 || zLimit[0]==0 ) zLimit = "-1"; |
| 2395 | iLimit = atoi(zLimit); |
| 2396 | showLog = find_option("log","l",0)!=0; |
| 2397 | if( find_option("ignore-trailing-space","Z",0)!=0 ){ |
| 2398 | annFlags = DIFF_IGNORE_EOLWS; |
| 2399 | } |
| 2400 | if( find_option("ignore-space-change","b",0)!=0 ){ |
| 2401 | annFlags = DIFF_IGNORE_WSCHG; /* stronger than DIFF_IGNORE_EOLWS */ |
| 2402 | } |
| 2403 | if( find_option("ignore-all-space","w",0)!=0 ){ |
| 2404 | annFlags = DIFF_IGNORE_ALLWS; /* stronger than DIFF_IGNORE_WSCHG */ |
| 2405 | } |
| 2406 | fileVers = find_option("filevers",0,0)!=0; |
| 2407 | db_must_be_within_tree(); |
| 2408 | if( g.argc<3 ) { |
| 2409 | usage("FILENAME"); |
| @@ -2453,12 +2429,12 @@ | |
| 2429 | " ORDER BY ancestor.generation ASC LIMIT 1", |
| 2430 | fid, fnid); |
| 2431 | if( mid==0 ){ |
| 2432 | fossil_fatal("unable to find manifest"); |
| 2433 | } |
| 2434 | annFlags |= (ANN_FILE_ANCEST|DIFF_STRIP_EOLCR); |
| 2435 | annotate_file(&ann, fnid, mid, iLimit, annFlags); |
| 2436 | if( showLog ){ |
| 2437 | struct AnnVers *p; |
| 2438 | for(p=ann.aVers, i=0; i<ann.nVers; i++, p++){ |
| 2439 | fossil_print("version %3d: %s %.10s file %.10s\n", |
| 2440 | i+1, p->zDate, p->zMUuid, p->zFUuid); |
| 2441 |
+43
-67
| --- src/diff.c | ||
| +++ src/diff.c | ||
| @@ -78,11 +78,12 @@ | ||
| 78 | 78 | */ |
| 79 | 79 | typedef struct DLine DLine; |
| 80 | 80 | struct DLine { |
| 81 | 81 | const char *z; /* The text of the line */ |
| 82 | 82 | unsigned int h; /* Hash of the line */ |
| 83 | - unsigned short extent; /* Extent of the line. how much longer than recorded in h */ | |
| 83 | + unsigned short indent; /* Indent of the line. Only !=0 with -w/-Z option */ | |
| 84 | + unsigned short n; /* number of bytes */ | |
| 84 | 85 | unsigned int iNext; /* 1+(Index of next line with same the same hash) */ |
| 85 | 86 | |
| 86 | 87 | /* an array of DLine elements serves two purposes. The fields |
| 87 | 88 | ** above are one per line of input text. But each entry is also |
| 88 | 89 | ** a bucket in a hash table, as follows: */ |
| @@ -132,11 +133,11 @@ | ||
| 132 | 133 | ** |
| 133 | 134 | ** Profiling show that in most cases this routine consumes the bulk of |
| 134 | 135 | ** the CPU time on a diff. |
| 135 | 136 | */ |
| 136 | 137 | static DLine *break_into_lines(const char *z, int n, int *pnLine, u64 diffFlags){ |
| 137 | - int nLine, i, j, k, s, extent, x, numws; | |
| 138 | + int nLine, i, j, k, s, x; | |
| 138 | 139 | unsigned int h, h2; |
| 139 | 140 | DLine *a; |
| 140 | 141 | |
| 141 | 142 | /* Count the number of lines. Allocate space to hold |
| 142 | 143 | ** the returned array. |
| @@ -165,52 +166,27 @@ | ||
| 165 | 166 | } |
| 166 | 167 | |
| 167 | 168 | /* Fill in the array */ |
| 168 | 169 | for(i=0; i<nLine; i++){ |
| 169 | 170 | for(j=0; z[j] && z[j]!='\n'; j++){} |
| 170 | - k = j; | |
| 171 | - s = 0; | |
| 172 | - extent = 0; /* number of spaces ignored from start/end */ | |
| 173 | - numws = 0; /* number of spaces ignored in between */ | |
| 171 | + a[i].z = z; | |
| 174 | 172 | if( diffFlags & DIFF_STRIP_EOLCR ){ |
| 175 | - /* Don't do "extend++" here, because the CR needs to be stripped! */ | |
| 176 | 173 | if( k>0 && z[k-1]=='\r' ){ k--; } |
| 177 | 174 | } |
| 178 | - if( diffFlags & DIFF_IGNORE_ALLWS ){ | |
| 179 | - while( k>0 && fossil_isspace(z[k-1]) ){ k--; extent++;} | |
| 180 | - } | |
| 181 | - if( diffFlags & DIFF_IGNORE_WSCHG ){ | |
| 182 | - if( (diffFlags & DIFF_IGNORE_ALLWS)==DIFF_IGNORE_ALLWS ){ | |
| 183 | - while( s<k && fossil_isspace(z[s]) ){s++; extent++;} | |
| 184 | - for(h=0, x=s; x<k; x++){ | |
| 185 | - if( fossil_isspace(z[x]) ){ | |
| 186 | - ++numws; | |
| 187 | - }else{ | |
| 188 | - h = h ^ (h<<2) ^ z[x]; | |
| 189 | - } | |
| 190 | - } | |
| 191 | - }else{ | |
| 192 | - for(h=0, x=0; x<k; x++){ | |
| 193 | - if( fossil_isspace(z[x]) ){ | |
| 194 | - if( x>0 && !fossil_isspace(z[x-1]) ){ | |
| 195 | - ++numws; | |
| 196 | - }else{ | |
| 197 | - h = h ^ (h<<2) ^ ' '; | |
| 198 | - } | |
| 199 | - }else{ | |
| 200 | - h = h ^ (h<<2) ^ z[x]; | |
| 201 | - } | |
| 202 | - } | |
| 203 | - } | |
| 204 | - }else{ | |
| 205 | - for(h=0, x=0; x<k; x++){ | |
| 206 | - h = h ^ (h<<2) ^ z[x]; | |
| 207 | - } | |
| 208 | - } | |
| 209 | - a[i].z = z; | |
| 210 | - a[i].extent = extent+numws; | |
| 211 | - a[i].h = h = (h<<LENGTH_MASK_SZ) | (k-s-numws); | |
| 175 | + a[i].n = k = j; | |
| 176 | + s = 0; | |
| 177 | + if( diffFlags & DIFF_IGNORE_EOLWS ){ | |
| 178 | + while( k>0 && fossil_isspace(z[k-1]) ){ k--; } | |
| 179 | + } | |
| 180 | + if( (diffFlags & DIFF_IGNORE_ALLWS)==DIFF_IGNORE_ALLWS ){ | |
| 181 | + while( s<k && fossil_isspace(z[s]) ){ s++; } | |
| 182 | + } | |
| 183 | + a[i].indent = s; | |
| 184 | + for(h=0, x=s; x<k; x++){ | |
| 185 | + h = h ^ (h<<2) ^ z[x]; | |
| 186 | + } | |
| 187 | + a[i].h = h = (h<<LENGTH_MASK_SZ) | (k-s); | |
| 212 | 188 | h2 = h % nLine; |
| 213 | 189 | a[i].iNext = a[h2].iHash; |
| 214 | 190 | a[h2].iHash = i+1; |
| 215 | 191 | z += j+1; |
| 216 | 192 | } |
| @@ -263,16 +239,16 @@ | ||
| 263 | 239 | }else if( cPrefix=='+' ){ |
| 264 | 240 | blob_append(pOut, "<span class=\"diffadd\">", -1); |
| 265 | 241 | }else if( cPrefix=='-' ){ |
| 266 | 242 | blob_append(pOut, "<span class=\"diffrm\">", -1); |
| 267 | 243 | } |
| 268 | - htmlize_to_blob(pOut, pLine->z, (pLine->h & LENGTH_MASK)); | |
| 244 | + htmlize_to_blob(pOut, pLine->z, pLine->n); | |
| 269 | 245 | if( cPrefix!=' ' ){ |
| 270 | 246 | blob_append(pOut, "</span>", -1); |
| 271 | 247 | } |
| 272 | 248 | }else{ |
| 273 | - blob_append(pOut, pLine->z, (pLine->h & LENGTH_MASK) + pLine->extent); | |
| 249 | + blob_append(pOut, pLine->z, pLine->n); | |
| 274 | 250 | } |
| 275 | 251 | blob_append(pOut, "\n", 1); |
| 276 | 252 | } |
| 277 | 253 | |
| 278 | 254 | /* |
| @@ -444,11 +420,11 @@ | ||
| 444 | 420 | b += m; |
| 445 | 421 | if( i<nr-1 ){ |
| 446 | 422 | m = R[r+i*3+3]; |
| 447 | 423 | for(j=0; j<m; j++){ |
| 448 | 424 | if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html); |
| 449 | - appendDiffLine(pOut, ' ', &B[b+j], html, 0); | |
| 425 | + appendDiffLine(pOut, ' ', &A[a+j], html, 0); | |
| 450 | 426 | } |
| 451 | 427 | b += m; |
| 452 | 428 | a += m; |
| 453 | 429 | } |
| 454 | 430 | } |
| @@ -457,11 +433,11 @@ | ||
| 457 | 433 | assert( nr==i ); |
| 458 | 434 | m = R[r+nr*3]; |
| 459 | 435 | if( m>nContext ) m = nContext; |
| 460 | 436 | for(j=0; j<m; j++){ |
| 461 | 437 | if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html); |
| 462 | - appendDiffLine(pOut, ' ', &B[b+j], html, 0); | |
| 438 | + appendDiffLine(pOut, ' ', &A[a+j], html, 0); | |
| 463 | 439 | } |
| 464 | 440 | } |
| 465 | 441 | } |
| 466 | 442 | |
| 467 | 443 | /* |
| @@ -518,11 +494,11 @@ | ||
| 518 | 494 | ** This comment contains multibyte unicode characters (ü, Æ, ð) in order |
| 519 | 495 | ** to test the ability of the diff code to handle such characters. |
| 520 | 496 | */ |
| 521 | 497 | static void sbsWriteText(SbsLine *p, DLine *pLine, int col){ |
| 522 | 498 | Blob *pCol = p->apCols[col]; |
| 523 | - int n = (pLine->h & LENGTH_MASK) + pLine->extent; | |
| 499 | + int n = pLine->n; | |
| 524 | 500 | int i; /* Number of input characters consumed */ |
| 525 | 501 | int k; /* Cursor position */ |
| 526 | 502 | int needEndSpan = 0; |
| 527 | 503 | const char *zIn = pLine->z; |
| 528 | 504 | int w = p->width; |
| @@ -1882,12 +1858,12 @@ | ||
| 1882 | 1858 | ** --invert Invert the diff DIFF_INVERT |
| 1883 | 1859 | ** -n|--linenum Show line numbers DIFF_LINENO |
| 1884 | 1860 | ** --noopt Disable optimization DIFF_NOOPT |
| 1885 | 1861 | ** --strip-trailing-cr Strip trailing CR DIFF_STRIP_EOLCR |
| 1886 | 1862 | ** --unified Unified diff. ~DIFF_SIDEBYSIDE |
| 1887 | -** -W|--width N N character lines. DIFF_WIDTH_MASK | |
| 1888 | 1863 | ** -w|--ignore-all-space Ignore all white space DIFF_IGNORE_ALLWS |
| 1864 | +** -W|--width N N character lines. DIFF_WIDTH_MASK | |
| 1889 | 1865 | ** -y|--side-by-side Side-by-side diff. DIFF_SIDEBYSIDE |
| 1890 | 1866 | ** -Z|--ignore-trailing-space Ignore eol-whitespaces DIFF_IGNORE_EOLWS |
| 1891 | 1867 | */ |
| 1892 | 1868 | u64 diff_options(void){ |
| 1893 | 1869 | u64 diffFlags = 0; |
| @@ -1995,11 +1971,11 @@ | ||
| 1995 | 1971 | typedef struct Annotator Annotator; |
| 1996 | 1972 | struct Annotator { |
| 1997 | 1973 | DContext c; /* The diff-engine context */ |
| 1998 | 1974 | struct AnnLine { /* Lines of the original files... */ |
| 1999 | 1975 | const char *z; /* The text of the line */ |
| 2000 | - short int n; /* Number of bytes */ | |
| 1976 | + short int n; /* Number of bytes (omitting trailing \n) */ | |
| 2001 | 1977 | short int iVers; /* Level at which tag was set */ |
| 2002 | 1978 | } *aOrig; |
| 2003 | 1979 | int nOrig; /* Number of elements in aOrig[] */ |
| 2004 | 1980 | int nVers; /* Number of versions analyzed */ |
| 2005 | 1981 | int bLimit; /* True if the iLimit was reached */ |
| @@ -2029,11 +2005,11 @@ | ||
| 2029 | 2005 | return 1; |
| 2030 | 2006 | } |
| 2031 | 2007 | p->aOrig = fossil_malloc( sizeof(p->aOrig[0])*p->c.nTo ); |
| 2032 | 2008 | for(i=0; i<p->c.nTo; i++){ |
| 2033 | 2009 | p->aOrig[i].z = p->c.aTo[i].z; |
| 2034 | - p->aOrig[i].n = (p->c.aTo[i].h & LENGTH_MASK) + p->c.aTo[i].extent; | |
| 2010 | + p->aOrig[i].n = p->c.aTo[i].n; | |
| 2035 | 2011 | p->aOrig[i].iVers = -1; |
| 2036 | 2012 | } |
| 2037 | 2013 | p->nOrig = p->c.nTo; |
| 2038 | 2014 | return 0; |
| 2039 | 2015 | } |
| @@ -2086,13 +2062,13 @@ | ||
| 2086 | 2062 | /* Return no errors */ |
| 2087 | 2063 | return 0; |
| 2088 | 2064 | } |
| 2089 | 2065 | |
| 2090 | 2066 | |
| 2091 | -/* Annotation flags. Cannot overlap with DIFF flags */ | |
| 2092 | -#define ANN_FILE_VERS (((u64)0x40)<<32) /* Show file vers rather than commit vers */ | |
| 2093 | -#define ANN_FILE_ANCEST (((u64)0x80)<<32) /* Prefer check-ins in the ANCESTOR table */ | |
| 2067 | +/* Annotation flags (any DIFF flag can be used as Annotation flag as well) */ | |
| 2068 | +#define ANN_FILE_VERS (((u64)0x20)<<32) /* Show file vers rather than commit vers */ | |
| 2069 | +#define ANN_FILE_ANCEST (((u64)0x40)<<32) /* Prefer check-ins in the ANCESTOR table */ | |
| 2094 | 2070 | |
| 2095 | 2071 | /* |
| 2096 | 2072 | ** Compute a complete annotation on a file. The file is identified |
| 2097 | 2073 | ** by its filename number (filename.fnid) and the baseline in which |
| 2098 | 2074 | ** it was checked in (mlink.mid). |
| @@ -2100,11 +2076,11 @@ | ||
| 2100 | 2076 | static void annotate_file( |
| 2101 | 2077 | Annotator *p, /* The annotator */ |
| 2102 | 2078 | int fnid, /* The name of the file to be annotated */ |
| 2103 | 2079 | int mid, /* Use the version of the file in this check-in */ |
| 2104 | 2080 | int iLimit, /* Limit the number of levels if greater than zero */ |
| 2105 | - u64 flags /* Flags to alter the annotation/whitespace handling */ | |
| 2081 | + u64 annFlags /* Flags to alter the annotation */ | |
| 2106 | 2082 | ){ |
| 2107 | 2083 | Blob toAnnotate; /* Text of the final (mid) version of the file */ |
| 2108 | 2084 | Blob step; /* Text of previous revision */ |
| 2109 | 2085 | int rid; /* Artifact ID of the file being annotated */ |
| 2110 | 2086 | Stmt q; /* Query returning all ancestor versions */ |
| @@ -2119,11 +2095,11 @@ | ||
| 2119 | 2095 | if( !content_get(rid, &toAnnotate) ){ |
| 2120 | 2096 | fossil_fatal("unable to retrieve content of artifact #%d", rid); |
| 2121 | 2097 | } |
| 2122 | 2098 | if( iLimit<=0 ) iLimit = 1000000000; |
| 2123 | 2099 | blob_to_utf8_no_bom(&toAnnotate, 0); |
| 2124 | - annotation_start(p, &toAnnotate, flags); | |
| 2100 | + annotation_start(p, &toAnnotate, annFlags); | |
| 2125 | 2101 | db_begin_transaction(); |
| 2126 | 2102 | db_multi_exec( |
| 2127 | 2103 | "CREATE TEMP TABLE IF NOT EXISTS vseen(rid INTEGER PRIMARY KEY);" |
| 2128 | 2104 | "DELETE FROM vseen;" |
| 2129 | 2105 | ); |
| @@ -2138,11 +2114,11 @@ | ||
| 2138 | 2114 | " FROM mlink, event" |
| 2139 | 2115 | " WHERE mlink.fid=:rid" |
| 2140 | 2116 | " AND event.objid=mlink.mid" |
| 2141 | 2117 | " AND mlink.pid NOT IN vseen" |
| 2142 | 2118 | " ORDER BY %s event.mtime", |
| 2143 | - (flags & ANN_FILE_ANCEST)!=0 ? | |
| 2119 | + (annFlags & ANN_FILE_ANCEST)!=0 ? | |
| 2144 | 2120 | "(mlink.mid IN (SELECT rid FROM ancestor)) DESC,":"" |
| 2145 | 2121 | ); |
| 2146 | 2122 | |
| 2147 | 2123 | db_bind_int(&q, ":rid", rid); |
| 2148 | 2124 | if( iLimit==0 ) iLimit = 1000000000; |
| @@ -2154,11 +2130,11 @@ | ||
| 2154 | 2130 | p->aVers[p->nVers].zDate = fossil_strdup(db_column_text(&q, 2)); |
| 2155 | 2131 | p->aVers[p->nVers].zUser = fossil_strdup(db_column_text(&q, 3)); |
| 2156 | 2132 | if( p->nVers ){ |
| 2157 | 2133 | content_get(rid, &step); |
| 2158 | 2134 | blob_to_utf8_no_bom(&step, 0); |
| 2159 | - annotation_step(p, &step, p->nVers-1, flags); | |
| 2135 | + annotation_step(p, &step, p->nVers-1, annFlags); | |
| 2160 | 2136 | blob_reset(&step); |
| 2161 | 2137 | } |
| 2162 | 2138 | p->nVers++; |
| 2163 | 2139 | db_bind_int(&ins, ":rid", rid); |
| 2164 | 2140 | db_step(&ins); |
| @@ -2209,14 +2185,13 @@ | ||
| 2209 | 2185 | void annotation_page(void){ |
| 2210 | 2186 | int mid; |
| 2211 | 2187 | int fnid; |
| 2212 | 2188 | int i; |
| 2213 | 2189 | int iLimit; /* Depth limit */ |
| 2214 | - u64 flags = (ANN_FILE_ANCEST|DIFF_STRIP_EOLCR); | |
| 2190 | + u64 annFlags = (ANN_FILE_ANCEST|DIFF_STRIP_EOLCR); | |
| 2215 | 2191 | int showLog = 0; /* True to display the log */ |
| 2216 | 2192 | int ignoreWs = 0; /* Ignore whitespace */ |
| 2217 | - u64 diffFlags; /* diff flags for ignore whitespace */ | |
| 2218 | 2193 | const char *zFilename; /* Name of file to annotate */ |
| 2219 | 2194 | const char *zCI; /* The check-in containing zFilename */ |
| 2220 | 2195 | Annotator ann; |
| 2221 | 2196 | HQuery url; |
| 2222 | 2197 | struct AnnVers *p; |
| @@ -2226,25 +2201,26 @@ | ||
| 2226 | 2201 | /* Gather query parameters */ |
| 2227 | 2202 | showLog = atoi(PD("log","1")); |
| 2228 | 2203 | login_check_credentials(); |
| 2229 | 2204 | if( !g.perm.Read ){ login_needed(); return; } |
| 2230 | 2205 | if( exclude_spiders("annotate") ) return; |
| 2206 | + load_control(); | |
| 2231 | 2207 | mid = name_to_typed_rid(PD("checkin","0"),"ci"); |
| 2232 | 2208 | zFilename = P("filename"); |
| 2233 | 2209 | fnid = db_int(0, "SELECT fnid FROM filename WHERE name=%Q", zFilename); |
| 2234 | 2210 | if( mid==0 || fnid==0 ){ fossil_redirect_home(); } |
| 2235 | 2211 | iLimit = atoi(PD("limit","20")); |
| 2236 | - if( P("filevers") ) flags |= ANN_FILE_VERS; | |
| 2212 | + if( P("filevers") ) annFlags |= ANN_FILE_VERS; | |
| 2237 | 2213 | ignoreWs = P("w")!=0; |
| 2238 | - if( ignoreWs ) flags |= DIFF_IGNORE_ALLWS; | |
| 2214 | + if( ignoreWs ) annFlags |= DIFF_IGNORE_ALLWS; | |
| 2239 | 2215 | if( !db_exists("SELECT 1 FROM mlink WHERE mid=%d AND fnid=%d",mid,fnid) ){ |
| 2240 | 2216 | fossil_redirect_home(); |
| 2241 | 2217 | } |
| 2242 | 2218 | |
| 2243 | 2219 | /* compute the annotation */ |
| 2244 | 2220 | compute_direct_ancestors(mid, 10000000); |
| 2245 | - annotate_file(&ann, fnid, mid, iLimit, flags); | |
| 2221 | + annotate_file(&ann, fnid, mid, iLimit, annFlags); | |
| 2246 | 2222 | zCI = ann.aVers[0].zMUuid; |
| 2247 | 2223 | |
| 2248 | 2224 | /* generate the web page */ |
| 2249 | 2225 | style_header("Annotation For %h", zFilename); |
| 2250 | 2226 | if( bBlame ){ |
| @@ -2407,27 +2383,27 @@ | ||
| 2407 | 2383 | Annotator ann; /* The annotation of the file */ |
| 2408 | 2384 | int i; /* Loop counter */ |
| 2409 | 2385 | const char *zLimit; /* The value to the -n|--limit option */ |
| 2410 | 2386 | int iLimit; /* How far back in time to look */ |
| 2411 | 2387 | int showLog; /* True to show the log */ |
| 2412 | - u64 flags = 0; /* Flags to control annotation/whitespace handling */ | |
| 2413 | 2388 | int fileVers; /* Show file version instead of check-in versions */ |
| 2389 | + u64 annFlags = 0; /* Flags to control annotation properties */ | |
| 2414 | 2390 | int bBlame = 0; /* True for BLAME output. False for ANNOTATE. */ |
| 2415 | 2391 | |
| 2416 | 2392 | bBlame = g.argv[1][0]!='a'; |
| 2417 | 2393 | zLimit = find_option("limit","n",1); |
| 2418 | 2394 | if( zLimit==0 || zLimit[0]==0 ) zLimit = "-1"; |
| 2419 | 2395 | iLimit = atoi(zLimit); |
| 2420 | 2396 | showLog = find_option("log","l",0)!=0; |
| 2421 | 2397 | if( find_option("ignore-trailing-space","Z",0)!=0 ){ |
| 2422 | - flags = DIFF_IGNORE_EOLWS; | |
| 2398 | + annFlags = DIFF_IGNORE_EOLWS; | |
| 2423 | 2399 | } |
| 2424 | 2400 | if( find_option("ignore-space-change","b",0)!=0 ){ |
| 2425 | - flags = DIFF_IGNORE_WSCHG; /* stronger than DIFF_IGNORE_EOLWS */ | |
| 2401 | + annFlags = DIFF_IGNORE_WSCHG; /* stronger than DIFF_IGNORE_EOLWS */ | |
| 2426 | 2402 | } |
| 2427 | 2403 | if( find_option("ignore-all-space","w",0)!=0 ){ |
| 2428 | - flags = DIFF_IGNORE_ALLWS; /* stronger than DIFF_IGNORE_WSCHG */ | |
| 2404 | + annFlags = DIFF_IGNORE_ALLWS; /* stronger than DIFF_IGNORE_WSCHG */ | |
| 2429 | 2405 | } |
| 2430 | 2406 | fileVers = find_option("filevers",0,0)!=0; |
| 2431 | 2407 | db_must_be_within_tree(); |
| 2432 | 2408 | if( g.argc<3 ) { |
| 2433 | 2409 | usage("FILENAME"); |
| @@ -2453,12 +2429,12 @@ | ||
| 2453 | 2429 | " ORDER BY ancestor.generation ASC LIMIT 1", |
| 2454 | 2430 | fid, fnid); |
| 2455 | 2431 | if( mid==0 ){ |
| 2456 | 2432 | fossil_fatal("unable to find manifest"); |
| 2457 | 2433 | } |
| 2458 | - flags |= (ANN_FILE_ANCEST|DIFF_STRIP_EOLCR); | |
| 2459 | - annotate_file(&ann, fnid, mid, iLimit, flags); | |
| 2434 | + annFlags |= (ANN_FILE_ANCEST|DIFF_STRIP_EOLCR); | |
| 2435 | + annotate_file(&ann, fnid, mid, iLimit, annFlags); | |
| 2460 | 2436 | if( showLog ){ |
| 2461 | 2437 | struct AnnVers *p; |
| 2462 | 2438 | for(p=ann.aVers, i=0; i<ann.nVers; i++, p++){ |
| 2463 | 2439 | fossil_print("version %3d: %s %.10s file %.10s\n", |
| 2464 | 2440 | i+1, p->zDate, p->zMUuid, p->zFUuid); |
| 2465 | 2441 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -78,11 +78,12 @@ | |
| 78 | */ |
| 79 | typedef struct DLine DLine; |
| 80 | struct DLine { |
| 81 | const char *z; /* The text of the line */ |
| 82 | unsigned int h; /* Hash of the line */ |
| 83 | unsigned short extent; /* Extent of the line. how much longer than recorded in h */ |
| 84 | unsigned int iNext; /* 1+(Index of next line with same the same hash) */ |
| 85 | |
| 86 | /* an array of DLine elements serves two purposes. The fields |
| 87 | ** above are one per line of input text. But each entry is also |
| 88 | ** a bucket in a hash table, as follows: */ |
| @@ -132,11 +133,11 @@ | |
| 132 | ** |
| 133 | ** Profiling show that in most cases this routine consumes the bulk of |
| 134 | ** the CPU time on a diff. |
| 135 | */ |
| 136 | static DLine *break_into_lines(const char *z, int n, int *pnLine, u64 diffFlags){ |
| 137 | int nLine, i, j, k, s, extent, x, numws; |
| 138 | unsigned int h, h2; |
| 139 | DLine *a; |
| 140 | |
| 141 | /* Count the number of lines. Allocate space to hold |
| 142 | ** the returned array. |
| @@ -165,52 +166,27 @@ | |
| 165 | } |
| 166 | |
| 167 | /* Fill in the array */ |
| 168 | for(i=0; i<nLine; i++){ |
| 169 | for(j=0; z[j] && z[j]!='\n'; j++){} |
| 170 | k = j; |
| 171 | s = 0; |
| 172 | extent = 0; /* number of spaces ignored from start/end */ |
| 173 | numws = 0; /* number of spaces ignored in between */ |
| 174 | if( diffFlags & DIFF_STRIP_EOLCR ){ |
| 175 | /* Don't do "extend++" here, because the CR needs to be stripped! */ |
| 176 | if( k>0 && z[k-1]=='\r' ){ k--; } |
| 177 | } |
| 178 | if( diffFlags & DIFF_IGNORE_ALLWS ){ |
| 179 | while( k>0 && fossil_isspace(z[k-1]) ){ k--; extent++;} |
| 180 | } |
| 181 | if( diffFlags & DIFF_IGNORE_WSCHG ){ |
| 182 | if( (diffFlags & DIFF_IGNORE_ALLWS)==DIFF_IGNORE_ALLWS ){ |
| 183 | while( s<k && fossil_isspace(z[s]) ){s++; extent++;} |
| 184 | for(h=0, x=s; x<k; x++){ |
| 185 | if( fossil_isspace(z[x]) ){ |
| 186 | ++numws; |
| 187 | }else{ |
| 188 | h = h ^ (h<<2) ^ z[x]; |
| 189 | } |
| 190 | } |
| 191 | }else{ |
| 192 | for(h=0, x=0; x<k; x++){ |
| 193 | if( fossil_isspace(z[x]) ){ |
| 194 | if( x>0 && !fossil_isspace(z[x-1]) ){ |
| 195 | ++numws; |
| 196 | }else{ |
| 197 | h = h ^ (h<<2) ^ ' '; |
| 198 | } |
| 199 | }else{ |
| 200 | h = h ^ (h<<2) ^ z[x]; |
| 201 | } |
| 202 | } |
| 203 | } |
| 204 | }else{ |
| 205 | for(h=0, x=0; x<k; x++){ |
| 206 | h = h ^ (h<<2) ^ z[x]; |
| 207 | } |
| 208 | } |
| 209 | a[i].z = z; |
| 210 | a[i].extent = extent+numws; |
| 211 | a[i].h = h = (h<<LENGTH_MASK_SZ) | (k-s-numws); |
| 212 | h2 = h % nLine; |
| 213 | a[i].iNext = a[h2].iHash; |
| 214 | a[h2].iHash = i+1; |
| 215 | z += j+1; |
| 216 | } |
| @@ -263,16 +239,16 @@ | |
| 263 | }else if( cPrefix=='+' ){ |
| 264 | blob_append(pOut, "<span class=\"diffadd\">", -1); |
| 265 | }else if( cPrefix=='-' ){ |
| 266 | blob_append(pOut, "<span class=\"diffrm\">", -1); |
| 267 | } |
| 268 | htmlize_to_blob(pOut, pLine->z, (pLine->h & LENGTH_MASK)); |
| 269 | if( cPrefix!=' ' ){ |
| 270 | blob_append(pOut, "</span>", -1); |
| 271 | } |
| 272 | }else{ |
| 273 | blob_append(pOut, pLine->z, (pLine->h & LENGTH_MASK) + pLine->extent); |
| 274 | } |
| 275 | blob_append(pOut, "\n", 1); |
| 276 | } |
| 277 | |
| 278 | /* |
| @@ -444,11 +420,11 @@ | |
| 444 | b += m; |
| 445 | if( i<nr-1 ){ |
| 446 | m = R[r+i*3+3]; |
| 447 | for(j=0; j<m; j++){ |
| 448 | if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html); |
| 449 | appendDiffLine(pOut, ' ', &B[b+j], html, 0); |
| 450 | } |
| 451 | b += m; |
| 452 | a += m; |
| 453 | } |
| 454 | } |
| @@ -457,11 +433,11 @@ | |
| 457 | assert( nr==i ); |
| 458 | m = R[r+nr*3]; |
| 459 | if( m>nContext ) m = nContext; |
| 460 | for(j=0; j<m; j++){ |
| 461 | if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html); |
| 462 | appendDiffLine(pOut, ' ', &B[b+j], html, 0); |
| 463 | } |
| 464 | } |
| 465 | } |
| 466 | |
| 467 | /* |
| @@ -518,11 +494,11 @@ | |
| 518 | ** This comment contains multibyte unicode characters (ü, Æ, ð) in order |
| 519 | ** to test the ability of the diff code to handle such characters. |
| 520 | */ |
| 521 | static void sbsWriteText(SbsLine *p, DLine *pLine, int col){ |
| 522 | Blob *pCol = p->apCols[col]; |
| 523 | int n = (pLine->h & LENGTH_MASK) + pLine->extent; |
| 524 | int i; /* Number of input characters consumed */ |
| 525 | int k; /* Cursor position */ |
| 526 | int needEndSpan = 0; |
| 527 | const char *zIn = pLine->z; |
| 528 | int w = p->width; |
| @@ -1882,12 +1858,12 @@ | |
| 1882 | ** --invert Invert the diff DIFF_INVERT |
| 1883 | ** -n|--linenum Show line numbers DIFF_LINENO |
| 1884 | ** --noopt Disable optimization DIFF_NOOPT |
| 1885 | ** --strip-trailing-cr Strip trailing CR DIFF_STRIP_EOLCR |
| 1886 | ** --unified Unified diff. ~DIFF_SIDEBYSIDE |
| 1887 | ** -W|--width N N character lines. DIFF_WIDTH_MASK |
| 1888 | ** -w|--ignore-all-space Ignore all white space DIFF_IGNORE_ALLWS |
| 1889 | ** -y|--side-by-side Side-by-side diff. DIFF_SIDEBYSIDE |
| 1890 | ** -Z|--ignore-trailing-space Ignore eol-whitespaces DIFF_IGNORE_EOLWS |
| 1891 | */ |
| 1892 | u64 diff_options(void){ |
| 1893 | u64 diffFlags = 0; |
| @@ -1995,11 +1971,11 @@ | |
| 1995 | typedef struct Annotator Annotator; |
| 1996 | struct Annotator { |
| 1997 | DContext c; /* The diff-engine context */ |
| 1998 | struct AnnLine { /* Lines of the original files... */ |
| 1999 | const char *z; /* The text of the line */ |
| 2000 | short int n; /* Number of bytes */ |
| 2001 | short int iVers; /* Level at which tag was set */ |
| 2002 | } *aOrig; |
| 2003 | int nOrig; /* Number of elements in aOrig[] */ |
| 2004 | int nVers; /* Number of versions analyzed */ |
| 2005 | int bLimit; /* True if the iLimit was reached */ |
| @@ -2029,11 +2005,11 @@ | |
| 2029 | return 1; |
| 2030 | } |
| 2031 | p->aOrig = fossil_malloc( sizeof(p->aOrig[0])*p->c.nTo ); |
| 2032 | for(i=0; i<p->c.nTo; i++){ |
| 2033 | p->aOrig[i].z = p->c.aTo[i].z; |
| 2034 | p->aOrig[i].n = (p->c.aTo[i].h & LENGTH_MASK) + p->c.aTo[i].extent; |
| 2035 | p->aOrig[i].iVers = -1; |
| 2036 | } |
| 2037 | p->nOrig = p->c.nTo; |
| 2038 | return 0; |
| 2039 | } |
| @@ -2086,13 +2062,13 @@ | |
| 2086 | /* Return no errors */ |
| 2087 | return 0; |
| 2088 | } |
| 2089 | |
| 2090 | |
| 2091 | /* Annotation flags. Cannot overlap with DIFF flags */ |
| 2092 | #define ANN_FILE_VERS (((u64)0x40)<<32) /* Show file vers rather than commit vers */ |
| 2093 | #define ANN_FILE_ANCEST (((u64)0x80)<<32) /* Prefer check-ins in the ANCESTOR table */ |
| 2094 | |
| 2095 | /* |
| 2096 | ** Compute a complete annotation on a file. The file is identified |
| 2097 | ** by its filename number (filename.fnid) and the baseline in which |
| 2098 | ** it was checked in (mlink.mid). |
| @@ -2100,11 +2076,11 @@ | |
| 2100 | static void annotate_file( |
| 2101 | Annotator *p, /* The annotator */ |
| 2102 | int fnid, /* The name of the file to be annotated */ |
| 2103 | int mid, /* Use the version of the file in this check-in */ |
| 2104 | int iLimit, /* Limit the number of levels if greater than zero */ |
| 2105 | u64 flags /* Flags to alter the annotation/whitespace handling */ |
| 2106 | ){ |
| 2107 | Blob toAnnotate; /* Text of the final (mid) version of the file */ |
| 2108 | Blob step; /* Text of previous revision */ |
| 2109 | int rid; /* Artifact ID of the file being annotated */ |
| 2110 | Stmt q; /* Query returning all ancestor versions */ |
| @@ -2119,11 +2095,11 @@ | |
| 2119 | if( !content_get(rid, &toAnnotate) ){ |
| 2120 | fossil_fatal("unable to retrieve content of artifact #%d", rid); |
| 2121 | } |
| 2122 | if( iLimit<=0 ) iLimit = 1000000000; |
| 2123 | blob_to_utf8_no_bom(&toAnnotate, 0); |
| 2124 | annotation_start(p, &toAnnotate, flags); |
| 2125 | db_begin_transaction(); |
| 2126 | db_multi_exec( |
| 2127 | "CREATE TEMP TABLE IF NOT EXISTS vseen(rid INTEGER PRIMARY KEY);" |
| 2128 | "DELETE FROM vseen;" |
| 2129 | ); |
| @@ -2138,11 +2114,11 @@ | |
| 2138 | " FROM mlink, event" |
| 2139 | " WHERE mlink.fid=:rid" |
| 2140 | " AND event.objid=mlink.mid" |
| 2141 | " AND mlink.pid NOT IN vseen" |
| 2142 | " ORDER BY %s event.mtime", |
| 2143 | (flags & ANN_FILE_ANCEST)!=0 ? |
| 2144 | "(mlink.mid IN (SELECT rid FROM ancestor)) DESC,":"" |
| 2145 | ); |
| 2146 | |
| 2147 | db_bind_int(&q, ":rid", rid); |
| 2148 | if( iLimit==0 ) iLimit = 1000000000; |
| @@ -2154,11 +2130,11 @@ | |
| 2154 | p->aVers[p->nVers].zDate = fossil_strdup(db_column_text(&q, 2)); |
| 2155 | p->aVers[p->nVers].zUser = fossil_strdup(db_column_text(&q, 3)); |
| 2156 | if( p->nVers ){ |
| 2157 | content_get(rid, &step); |
| 2158 | blob_to_utf8_no_bom(&step, 0); |
| 2159 | annotation_step(p, &step, p->nVers-1, flags); |
| 2160 | blob_reset(&step); |
| 2161 | } |
| 2162 | p->nVers++; |
| 2163 | db_bind_int(&ins, ":rid", rid); |
| 2164 | db_step(&ins); |
| @@ -2209,14 +2185,13 @@ | |
| 2209 | void annotation_page(void){ |
| 2210 | int mid; |
| 2211 | int fnid; |
| 2212 | int i; |
| 2213 | int iLimit; /* Depth limit */ |
| 2214 | u64 flags = (ANN_FILE_ANCEST|DIFF_STRIP_EOLCR); |
| 2215 | int showLog = 0; /* True to display the log */ |
| 2216 | int ignoreWs = 0; /* Ignore whitespace */ |
| 2217 | u64 diffFlags; /* diff flags for ignore whitespace */ |
| 2218 | const char *zFilename; /* Name of file to annotate */ |
| 2219 | const char *zCI; /* The check-in containing zFilename */ |
| 2220 | Annotator ann; |
| 2221 | HQuery url; |
| 2222 | struct AnnVers *p; |
| @@ -2226,25 +2201,26 @@ | |
| 2226 | /* Gather query parameters */ |
| 2227 | showLog = atoi(PD("log","1")); |
| 2228 | login_check_credentials(); |
| 2229 | if( !g.perm.Read ){ login_needed(); return; } |
| 2230 | if( exclude_spiders("annotate") ) return; |
| 2231 | mid = name_to_typed_rid(PD("checkin","0"),"ci"); |
| 2232 | zFilename = P("filename"); |
| 2233 | fnid = db_int(0, "SELECT fnid FROM filename WHERE name=%Q", zFilename); |
| 2234 | if( mid==0 || fnid==0 ){ fossil_redirect_home(); } |
| 2235 | iLimit = atoi(PD("limit","20")); |
| 2236 | if( P("filevers") ) flags |= ANN_FILE_VERS; |
| 2237 | ignoreWs = P("w")!=0; |
| 2238 | if( ignoreWs ) flags |= DIFF_IGNORE_ALLWS; |
| 2239 | if( !db_exists("SELECT 1 FROM mlink WHERE mid=%d AND fnid=%d",mid,fnid) ){ |
| 2240 | fossil_redirect_home(); |
| 2241 | } |
| 2242 | |
| 2243 | /* compute the annotation */ |
| 2244 | compute_direct_ancestors(mid, 10000000); |
| 2245 | annotate_file(&ann, fnid, mid, iLimit, flags); |
| 2246 | zCI = ann.aVers[0].zMUuid; |
| 2247 | |
| 2248 | /* generate the web page */ |
| 2249 | style_header("Annotation For %h", zFilename); |
| 2250 | if( bBlame ){ |
| @@ -2407,27 +2383,27 @@ | |
| 2407 | Annotator ann; /* The annotation of the file */ |
| 2408 | int i; /* Loop counter */ |
| 2409 | const char *zLimit; /* The value to the -n|--limit option */ |
| 2410 | int iLimit; /* How far back in time to look */ |
| 2411 | int showLog; /* True to show the log */ |
| 2412 | u64 flags = 0; /* Flags to control annotation/whitespace handling */ |
| 2413 | int fileVers; /* Show file version instead of check-in versions */ |
| 2414 | int bBlame = 0; /* True for BLAME output. False for ANNOTATE. */ |
| 2415 | |
| 2416 | bBlame = g.argv[1][0]!='a'; |
| 2417 | zLimit = find_option("limit","n",1); |
| 2418 | if( zLimit==0 || zLimit[0]==0 ) zLimit = "-1"; |
| 2419 | iLimit = atoi(zLimit); |
| 2420 | showLog = find_option("log","l",0)!=0; |
| 2421 | if( find_option("ignore-trailing-space","Z",0)!=0 ){ |
| 2422 | flags = DIFF_IGNORE_EOLWS; |
| 2423 | } |
| 2424 | if( find_option("ignore-space-change","b",0)!=0 ){ |
| 2425 | flags = DIFF_IGNORE_WSCHG; /* stronger than DIFF_IGNORE_EOLWS */ |
| 2426 | } |
| 2427 | if( find_option("ignore-all-space","w",0)!=0 ){ |
| 2428 | flags = DIFF_IGNORE_ALLWS; /* stronger than DIFF_IGNORE_WSCHG */ |
| 2429 | } |
| 2430 | fileVers = find_option("filevers",0,0)!=0; |
| 2431 | db_must_be_within_tree(); |
| 2432 | if( g.argc<3 ) { |
| 2433 | usage("FILENAME"); |
| @@ -2453,12 +2429,12 @@ | |
| 2453 | " ORDER BY ancestor.generation ASC LIMIT 1", |
| 2454 | fid, fnid); |
| 2455 | if( mid==0 ){ |
| 2456 | fossil_fatal("unable to find manifest"); |
| 2457 | } |
| 2458 | flags |= (ANN_FILE_ANCEST|DIFF_STRIP_EOLCR); |
| 2459 | annotate_file(&ann, fnid, mid, iLimit, flags); |
| 2460 | if( showLog ){ |
| 2461 | struct AnnVers *p; |
| 2462 | for(p=ann.aVers, i=0; i<ann.nVers; i++, p++){ |
| 2463 | fossil_print("version %3d: %s %.10s file %.10s\n", |
| 2464 | i+1, p->zDate, p->zMUuid, p->zFUuid); |
| 2465 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -78,11 +78,12 @@ | |
| 78 | */ |
| 79 | typedef struct DLine DLine; |
| 80 | struct DLine { |
| 81 | const char *z; /* The text of the line */ |
| 82 | unsigned int h; /* Hash of the line */ |
| 83 | unsigned short indent; /* Indent of the line. Only !=0 with -w/-Z option */ |
| 84 | unsigned short n; /* number of bytes */ |
| 85 | unsigned int iNext; /* 1+(Index of next line with same the same hash) */ |
| 86 | |
| 87 | /* an array of DLine elements serves two purposes. The fields |
| 88 | ** above are one per line of input text. But each entry is also |
| 89 | ** a bucket in a hash table, as follows: */ |
| @@ -132,11 +133,11 @@ | |
| 133 | ** |
| 134 | ** Profiling show that in most cases this routine consumes the bulk of |
| 135 | ** the CPU time on a diff. |
| 136 | */ |
| 137 | static DLine *break_into_lines(const char *z, int n, int *pnLine, u64 diffFlags){ |
| 138 | int nLine, i, j, k, s, x; |
| 139 | unsigned int h, h2; |
| 140 | DLine *a; |
| 141 | |
| 142 | /* Count the number of lines. Allocate space to hold |
| 143 | ** the returned array. |
| @@ -165,52 +166,27 @@ | |
| 166 | } |
| 167 | |
| 168 | /* Fill in the array */ |
| 169 | for(i=0; i<nLine; i++){ |
| 170 | for(j=0; z[j] && z[j]!='\n'; j++){} |
| 171 | a[i].z = z; |
| 172 | if( diffFlags & DIFF_STRIP_EOLCR ){ |
| 173 | if( k>0 && z[k-1]=='\r' ){ k--; } |
| 174 | } |
| 175 | a[i].n = k = j; |
| 176 | s = 0; |
| 177 | if( diffFlags & DIFF_IGNORE_EOLWS ){ |
| 178 | while( k>0 && fossil_isspace(z[k-1]) ){ k--; } |
| 179 | } |
| 180 | if( (diffFlags & DIFF_IGNORE_ALLWS)==DIFF_IGNORE_ALLWS ){ |
| 181 | while( s<k && fossil_isspace(z[s]) ){ s++; } |
| 182 | } |
| 183 | a[i].indent = s; |
| 184 | for(h=0, x=s; x<k; x++){ |
| 185 | h = h ^ (h<<2) ^ z[x]; |
| 186 | } |
| 187 | a[i].h = h = (h<<LENGTH_MASK_SZ) | (k-s); |
| 188 | h2 = h % nLine; |
| 189 | a[i].iNext = a[h2].iHash; |
| 190 | a[h2].iHash = i+1; |
| 191 | z += j+1; |
| 192 | } |
| @@ -263,16 +239,16 @@ | |
| 239 | }else if( cPrefix=='+' ){ |
| 240 | blob_append(pOut, "<span class=\"diffadd\">", -1); |
| 241 | }else if( cPrefix=='-' ){ |
| 242 | blob_append(pOut, "<span class=\"diffrm\">", -1); |
| 243 | } |
| 244 | htmlize_to_blob(pOut, pLine->z, pLine->n); |
| 245 | if( cPrefix!=' ' ){ |
| 246 | blob_append(pOut, "</span>", -1); |
| 247 | } |
| 248 | }else{ |
| 249 | blob_append(pOut, pLine->z, pLine->n); |
| 250 | } |
| 251 | blob_append(pOut, "\n", 1); |
| 252 | } |
| 253 | |
| 254 | /* |
| @@ -444,11 +420,11 @@ | |
| 420 | b += m; |
| 421 | if( i<nr-1 ){ |
| 422 | m = R[r+i*3+3]; |
| 423 | for(j=0; j<m; j++){ |
| 424 | if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html); |
| 425 | appendDiffLine(pOut, ' ', &A[a+j], html, 0); |
| 426 | } |
| 427 | b += m; |
| 428 | a += m; |
| 429 | } |
| 430 | } |
| @@ -457,11 +433,11 @@ | |
| 433 | assert( nr==i ); |
| 434 | m = R[r+nr*3]; |
| 435 | if( m>nContext ) m = nContext; |
| 436 | for(j=0; j<m; j++){ |
| 437 | if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html); |
| 438 | appendDiffLine(pOut, ' ', &A[a+j], html, 0); |
| 439 | } |
| 440 | } |
| 441 | } |
| 442 | |
| 443 | /* |
| @@ -518,11 +494,11 @@ | |
| 494 | ** This comment contains multibyte unicode characters (ü, Æ, ð) in order |
| 495 | ** to test the ability of the diff code to handle such characters. |
| 496 | */ |
| 497 | static void sbsWriteText(SbsLine *p, DLine *pLine, int col){ |
| 498 | Blob *pCol = p->apCols[col]; |
| 499 | int n = pLine->n; |
| 500 | int i; /* Number of input characters consumed */ |
| 501 | int k; /* Cursor position */ |
| 502 | int needEndSpan = 0; |
| 503 | const char *zIn = pLine->z; |
| 504 | int w = p->width; |
| @@ -1882,12 +1858,12 @@ | |
| 1858 | ** --invert Invert the diff DIFF_INVERT |
| 1859 | ** -n|--linenum Show line numbers DIFF_LINENO |
| 1860 | ** --noopt Disable optimization DIFF_NOOPT |
| 1861 | ** --strip-trailing-cr Strip trailing CR DIFF_STRIP_EOLCR |
| 1862 | ** --unified Unified diff. ~DIFF_SIDEBYSIDE |
| 1863 | ** -w|--ignore-all-space Ignore all white space DIFF_IGNORE_ALLWS |
| 1864 | ** -W|--width N N character lines. DIFF_WIDTH_MASK |
| 1865 | ** -y|--side-by-side Side-by-side diff. DIFF_SIDEBYSIDE |
| 1866 | ** -Z|--ignore-trailing-space Ignore eol-whitespaces DIFF_IGNORE_EOLWS |
| 1867 | */ |
| 1868 | u64 diff_options(void){ |
| 1869 | u64 diffFlags = 0; |
| @@ -1995,11 +1971,11 @@ | |
| 1971 | typedef struct Annotator Annotator; |
| 1972 | struct Annotator { |
| 1973 | DContext c; /* The diff-engine context */ |
| 1974 | struct AnnLine { /* Lines of the original files... */ |
| 1975 | const char *z; /* The text of the line */ |
| 1976 | short int n; /* Number of bytes (omitting trailing \n) */ |
| 1977 | short int iVers; /* Level at which tag was set */ |
| 1978 | } *aOrig; |
| 1979 | int nOrig; /* Number of elements in aOrig[] */ |
| 1980 | int nVers; /* Number of versions analyzed */ |
| 1981 | int bLimit; /* True if the iLimit was reached */ |
| @@ -2029,11 +2005,11 @@ | |
| 2005 | return 1; |
| 2006 | } |
| 2007 | p->aOrig = fossil_malloc( sizeof(p->aOrig[0])*p->c.nTo ); |
| 2008 | for(i=0; i<p->c.nTo; i++){ |
| 2009 | p->aOrig[i].z = p->c.aTo[i].z; |
| 2010 | p->aOrig[i].n = p->c.aTo[i].n; |
| 2011 | p->aOrig[i].iVers = -1; |
| 2012 | } |
| 2013 | p->nOrig = p->c.nTo; |
| 2014 | return 0; |
| 2015 | } |
| @@ -2086,13 +2062,13 @@ | |
| 2062 | /* Return no errors */ |
| 2063 | return 0; |
| 2064 | } |
| 2065 | |
| 2066 | |
| 2067 | /* Annotation flags (any DIFF flag can be used as Annotation flag as well) */ |
| 2068 | #define ANN_FILE_VERS (((u64)0x20)<<32) /* Show file vers rather than commit vers */ |
| 2069 | #define ANN_FILE_ANCEST (((u64)0x40)<<32) /* Prefer check-ins in the ANCESTOR table */ |
| 2070 | |
| 2071 | /* |
| 2072 | ** Compute a complete annotation on a file. The file is identified |
| 2073 | ** by its filename number (filename.fnid) and the baseline in which |
| 2074 | ** it was checked in (mlink.mid). |
| @@ -2100,11 +2076,11 @@ | |
| 2076 | static void annotate_file( |
| 2077 | Annotator *p, /* The annotator */ |
| 2078 | int fnid, /* The name of the file to be annotated */ |
| 2079 | int mid, /* Use the version of the file in this check-in */ |
| 2080 | int iLimit, /* Limit the number of levels if greater than zero */ |
| 2081 | u64 annFlags /* Flags to alter the annotation */ |
| 2082 | ){ |
| 2083 | Blob toAnnotate; /* Text of the final (mid) version of the file */ |
| 2084 | Blob step; /* Text of previous revision */ |
| 2085 | int rid; /* Artifact ID of the file being annotated */ |
| 2086 | Stmt q; /* Query returning all ancestor versions */ |
| @@ -2119,11 +2095,11 @@ | |
| 2095 | if( !content_get(rid, &toAnnotate) ){ |
| 2096 | fossil_fatal("unable to retrieve content of artifact #%d", rid); |
| 2097 | } |
| 2098 | if( iLimit<=0 ) iLimit = 1000000000; |
| 2099 | blob_to_utf8_no_bom(&toAnnotate, 0); |
| 2100 | annotation_start(p, &toAnnotate, annFlags); |
| 2101 | db_begin_transaction(); |
| 2102 | db_multi_exec( |
| 2103 | "CREATE TEMP TABLE IF NOT EXISTS vseen(rid INTEGER PRIMARY KEY);" |
| 2104 | "DELETE FROM vseen;" |
| 2105 | ); |
| @@ -2138,11 +2114,11 @@ | |
| 2114 | " FROM mlink, event" |
| 2115 | " WHERE mlink.fid=:rid" |
| 2116 | " AND event.objid=mlink.mid" |
| 2117 | " AND mlink.pid NOT IN vseen" |
| 2118 | " ORDER BY %s event.mtime", |
| 2119 | (annFlags & ANN_FILE_ANCEST)!=0 ? |
| 2120 | "(mlink.mid IN (SELECT rid FROM ancestor)) DESC,":"" |
| 2121 | ); |
| 2122 | |
| 2123 | db_bind_int(&q, ":rid", rid); |
| 2124 | if( iLimit==0 ) iLimit = 1000000000; |
| @@ -2154,11 +2130,11 @@ | |
| 2130 | p->aVers[p->nVers].zDate = fossil_strdup(db_column_text(&q, 2)); |
| 2131 | p->aVers[p->nVers].zUser = fossil_strdup(db_column_text(&q, 3)); |
| 2132 | if( p->nVers ){ |
| 2133 | content_get(rid, &step); |
| 2134 | blob_to_utf8_no_bom(&step, 0); |
| 2135 | annotation_step(p, &step, p->nVers-1, annFlags); |
| 2136 | blob_reset(&step); |
| 2137 | } |
| 2138 | p->nVers++; |
| 2139 | db_bind_int(&ins, ":rid", rid); |
| 2140 | db_step(&ins); |
| @@ -2209,14 +2185,13 @@ | |
| 2185 | void annotation_page(void){ |
| 2186 | int mid; |
| 2187 | int fnid; |
| 2188 | int i; |
| 2189 | int iLimit; /* Depth limit */ |
| 2190 | u64 annFlags = (ANN_FILE_ANCEST|DIFF_STRIP_EOLCR); |
| 2191 | int showLog = 0; /* True to display the log */ |
| 2192 | int ignoreWs = 0; /* Ignore whitespace */ |
| 2193 | const char *zFilename; /* Name of file to annotate */ |
| 2194 | const char *zCI; /* The check-in containing zFilename */ |
| 2195 | Annotator ann; |
| 2196 | HQuery url; |
| 2197 | struct AnnVers *p; |
| @@ -2226,25 +2201,26 @@ | |
| 2201 | /* Gather query parameters */ |
| 2202 | showLog = atoi(PD("log","1")); |
| 2203 | login_check_credentials(); |
| 2204 | if( !g.perm.Read ){ login_needed(); return; } |
| 2205 | if( exclude_spiders("annotate") ) return; |
| 2206 | load_control(); |
| 2207 | mid = name_to_typed_rid(PD("checkin","0"),"ci"); |
| 2208 | zFilename = P("filename"); |
| 2209 | fnid = db_int(0, "SELECT fnid FROM filename WHERE name=%Q", zFilename); |
| 2210 | if( mid==0 || fnid==0 ){ fossil_redirect_home(); } |
| 2211 | iLimit = atoi(PD("limit","20")); |
| 2212 | if( P("filevers") ) annFlags |= ANN_FILE_VERS; |
| 2213 | ignoreWs = P("w")!=0; |
| 2214 | if( ignoreWs ) annFlags |= DIFF_IGNORE_ALLWS; |
| 2215 | if( !db_exists("SELECT 1 FROM mlink WHERE mid=%d AND fnid=%d",mid,fnid) ){ |
| 2216 | fossil_redirect_home(); |
| 2217 | } |
| 2218 | |
| 2219 | /* compute the annotation */ |
| 2220 | compute_direct_ancestors(mid, 10000000); |
| 2221 | annotate_file(&ann, fnid, mid, iLimit, annFlags); |
| 2222 | zCI = ann.aVers[0].zMUuid; |
| 2223 | |
| 2224 | /* generate the web page */ |
| 2225 | style_header("Annotation For %h", zFilename); |
| 2226 | if( bBlame ){ |
| @@ -2407,27 +2383,27 @@ | |
| 2383 | Annotator ann; /* The annotation of the file */ |
| 2384 | int i; /* Loop counter */ |
| 2385 | const char *zLimit; /* The value to the -n|--limit option */ |
| 2386 | int iLimit; /* How far back in time to look */ |
| 2387 | int showLog; /* True to show the log */ |
| 2388 | int fileVers; /* Show file version instead of check-in versions */ |
| 2389 | u64 annFlags = 0; /* Flags to control annotation properties */ |
| 2390 | int bBlame = 0; /* True for BLAME output. False for ANNOTATE. */ |
| 2391 | |
| 2392 | bBlame = g.argv[1][0]!='a'; |
| 2393 | zLimit = find_option("limit","n",1); |
| 2394 | if( zLimit==0 || zLimit[0]==0 ) zLimit = "-1"; |
| 2395 | iLimit = atoi(zLimit); |
| 2396 | showLog = find_option("log","l",0)!=0; |
| 2397 | if( find_option("ignore-trailing-space","Z",0)!=0 ){ |
| 2398 | annFlags = DIFF_IGNORE_EOLWS; |
| 2399 | } |
| 2400 | if( find_option("ignore-space-change","b",0)!=0 ){ |
| 2401 | annFlags = DIFF_IGNORE_WSCHG; /* stronger than DIFF_IGNORE_EOLWS */ |
| 2402 | } |
| 2403 | if( find_option("ignore-all-space","w",0)!=0 ){ |
| 2404 | annFlags = DIFF_IGNORE_ALLWS; /* stronger than DIFF_IGNORE_WSCHG */ |
| 2405 | } |
| 2406 | fileVers = find_option("filevers",0,0)!=0; |
| 2407 | db_must_be_within_tree(); |
| 2408 | if( g.argc<3 ) { |
| 2409 | usage("FILENAME"); |
| @@ -2453,12 +2429,12 @@ | |
| 2429 | " ORDER BY ancestor.generation ASC LIMIT 1", |
| 2430 | fid, fnid); |
| 2431 | if( mid==0 ){ |
| 2432 | fossil_fatal("unable to find manifest"); |
| 2433 | } |
| 2434 | annFlags |= (ANN_FILE_ANCEST|DIFF_STRIP_EOLCR); |
| 2435 | annotate_file(&ann, fnid, mid, iLimit, annFlags); |
| 2436 | if( showLog ){ |
| 2437 | struct AnnVers *p; |
| 2438 | for(p=ann.aVers, i=0; i<ann.nVers; i++, p++){ |
| 2439 | fossil_print("version %3d: %s %.10s file %.10s\n", |
| 2440 | i+1, p->zDate, p->zMUuid, p->zFUuid); |
| 2441 |
+1
-1
| --- src/diffcmd.c | ||
| +++ src/diffcmd.c | ||
| @@ -1105,11 +1105,11 @@ | ||
| 1105 | 1105 | ** --to VERSION select VERSION as target for the diff |
| 1106 | 1106 | ** --unified unified diff |
| 1107 | 1107 | ** -v|--verbose output complete text of added or deleted files |
| 1108 | 1108 | ** -w|--ignore-all-space Ignore white space when comparing lines |
| 1109 | 1109 | ** -W|--width <num> Width of lines in side-by-side diff |
| 1110 | -** -Z|--ignore-trailing-space Ignore whitespace at line end | |
| 1110 | +** -Z|--ignore-trailing-space Ignore changes to end-of-line whitespace | |
| 1111 | 1111 | */ |
| 1112 | 1112 | void diff_cmd(void){ |
| 1113 | 1113 | int isGDiff; /* True for gdiff. False for normal diff */ |
| 1114 | 1114 | int isInternDiff; /* True for internal diff */ |
| 1115 | 1115 | int verboseFlag; /* True if -v or --verbose flag is used */ |
| 1116 | 1116 |
| --- src/diffcmd.c | |
| +++ src/diffcmd.c | |
| @@ -1105,11 +1105,11 @@ | |
| 1105 | ** --to VERSION select VERSION as target for the diff |
| 1106 | ** --unified unified diff |
| 1107 | ** -v|--verbose output complete text of added or deleted files |
| 1108 | ** -w|--ignore-all-space Ignore white space when comparing lines |
| 1109 | ** -W|--width <num> Width of lines in side-by-side diff |
| 1110 | ** -Z|--ignore-trailing-space Ignore whitespace at line end |
| 1111 | */ |
| 1112 | void diff_cmd(void){ |
| 1113 | int isGDiff; /* True for gdiff. False for normal diff */ |
| 1114 | int isInternDiff; /* True for internal diff */ |
| 1115 | int verboseFlag; /* True if -v or --verbose flag is used */ |
| 1116 |
| --- src/diffcmd.c | |
| +++ src/diffcmd.c | |
| @@ -1105,11 +1105,11 @@ | |
| 1105 | ** --to VERSION select VERSION as target for the diff |
| 1106 | ** --unified unified diff |
| 1107 | ** -v|--verbose output complete text of added or deleted files |
| 1108 | ** -w|--ignore-all-space Ignore white space when comparing lines |
| 1109 | ** -W|--width <num> Width of lines in side-by-side diff |
| 1110 | ** -Z|--ignore-trailing-space Ignore changes to end-of-line whitespace |
| 1111 | */ |
| 1112 | void diff_cmd(void){ |
| 1113 | int isGDiff; /* True for gdiff. False for normal diff */ |
| 1114 | int isInternDiff; /* True for internal diff */ |
| 1115 | int verboseFlag; /* True if -v or --verbose flag is used */ |
| 1116 |
+1
-1
| --- src/diffcmd.c | ||
| +++ src/diffcmd.c | ||
| @@ -1105,11 +1105,11 @@ | ||
| 1105 | 1105 | ** --to VERSION select VERSION as target for the diff |
| 1106 | 1106 | ** --unified unified diff |
| 1107 | 1107 | ** -v|--verbose output complete text of added or deleted files |
| 1108 | 1108 | ** -w|--ignore-all-space Ignore white space when comparing lines |
| 1109 | 1109 | ** -W|--width <num> Width of lines in side-by-side diff |
| 1110 | -** -Z|--ignore-trailing-space Ignore whitespace at line end | |
| 1110 | +** -Z|--ignore-trailing-space Ignore changes to end-of-line whitespace | |
| 1111 | 1111 | */ |
| 1112 | 1112 | void diff_cmd(void){ |
| 1113 | 1113 | int isGDiff; /* True for gdiff. False for normal diff */ |
| 1114 | 1114 | int isInternDiff; /* True for internal diff */ |
| 1115 | 1115 | int verboseFlag; /* True if -v or --verbose flag is used */ |
| 1116 | 1116 |
| --- src/diffcmd.c | |
| +++ src/diffcmd.c | |
| @@ -1105,11 +1105,11 @@ | |
| 1105 | ** --to VERSION select VERSION as target for the diff |
| 1106 | ** --unified unified diff |
| 1107 | ** -v|--verbose output complete text of added or deleted files |
| 1108 | ** -w|--ignore-all-space Ignore white space when comparing lines |
| 1109 | ** -W|--width <num> Width of lines in side-by-side diff |
| 1110 | ** -Z|--ignore-trailing-space Ignore whitespace at line end |
| 1111 | */ |
| 1112 | void diff_cmd(void){ |
| 1113 | int isGDiff; /* True for gdiff. False for normal diff */ |
| 1114 | int isInternDiff; /* True for internal diff */ |
| 1115 | int verboseFlag; /* True if -v or --verbose flag is used */ |
| 1116 |
| --- src/diffcmd.c | |
| +++ src/diffcmd.c | |
| @@ -1105,11 +1105,11 @@ | |
| 1105 | ** --to VERSION select VERSION as target for the diff |
| 1106 | ** --unified unified diff |
| 1107 | ** -v|--verbose output complete text of added or deleted files |
| 1108 | ** -w|--ignore-all-space Ignore white space when comparing lines |
| 1109 | ** -W|--width <num> Width of lines in side-by-side diff |
| 1110 | ** -Z|--ignore-trailing-space Ignore changes to end-of-line whitespace |
| 1111 | */ |
| 1112 | void diff_cmd(void){ |
| 1113 | int isGDiff; /* True for gdiff. False for normal diff */ |
| 1114 | int isInternDiff; /* True for internal diff */ |
| 1115 | int verboseFlag; /* True if -v or --verbose flag is used */ |
| 1116 |
+2
-2
| --- src/event.c | ||
| +++ src/event.c | ||
| @@ -342,12 +342,12 @@ | ||
| 342 | 342 | while( db_step(&q)==SQLITE_ROW ){ |
| 343 | 343 | blob_appendf(&event, "T +sym-%F *\n", db_column_text(&q, 0)); |
| 344 | 344 | } |
| 345 | 345 | db_finalize(&q); |
| 346 | 346 | } |
| 347 | - if( g.zLogin ){ | |
| 348 | - blob_appendf(&event, "U %F\n", g.zLogin); | |
| 347 | + if( !login_is_nobody() ){ | |
| 348 | + blob_appendf(&event, "U %F\n", login_name()); | |
| 349 | 349 | } |
| 350 | 350 | blob_appendf(&event, "W %d\n%s\n", strlen(zBody), zBody); |
| 351 | 351 | md5sum_blob(&event, &cksum); |
| 352 | 352 | blob_appendf(&event, "Z %b\n", &cksum); |
| 353 | 353 | blob_reset(&cksum); |
| 354 | 354 |
| --- src/event.c | |
| +++ src/event.c | |
| @@ -342,12 +342,12 @@ | |
| 342 | while( db_step(&q)==SQLITE_ROW ){ |
| 343 | blob_appendf(&event, "T +sym-%F *\n", db_column_text(&q, 0)); |
| 344 | } |
| 345 | db_finalize(&q); |
| 346 | } |
| 347 | if( g.zLogin ){ |
| 348 | blob_appendf(&event, "U %F\n", g.zLogin); |
| 349 | } |
| 350 | blob_appendf(&event, "W %d\n%s\n", strlen(zBody), zBody); |
| 351 | md5sum_blob(&event, &cksum); |
| 352 | blob_appendf(&event, "Z %b\n", &cksum); |
| 353 | blob_reset(&cksum); |
| 354 |
| --- src/event.c | |
| +++ src/event.c | |
| @@ -342,12 +342,12 @@ | |
| 342 | while( db_step(&q)==SQLITE_ROW ){ |
| 343 | blob_appendf(&event, "T +sym-%F *\n", db_column_text(&q, 0)); |
| 344 | } |
| 345 | db_finalize(&q); |
| 346 | } |
| 347 | if( !login_is_nobody() ){ |
| 348 | blob_appendf(&event, "U %F\n", login_name()); |
| 349 | } |
| 350 | blob_appendf(&event, "W %d\n%s\n", strlen(zBody), zBody); |
| 351 | md5sum_blob(&event, &cksum); |
| 352 | blob_appendf(&event, "Z %b\n", &cksum); |
| 353 | blob_reset(&cksum); |
| 354 |
+68
-68
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -500,10 +500,13 @@ | ||
| 500 | 500 | const char *zName; /* Name of the checkin to be displayed */ |
| 501 | 501 | const char *zUuid; /* UUID of zName */ |
| 502 | 502 | const char *zParent; /* UUID of the parent checkin (if any) */ |
| 503 | 503 | const char *zRe; /* regex parameter */ |
| 504 | 504 | ReCompiled *pRe = 0; /* regex */ |
| 505 | + const char *zW; /* URL param for ignoring whitespace */ | |
| 506 | + const char *zPage = "vinfo"; /* Page that shows diffs */ | |
| 507 | + const char *zPageHide = "ci"; /* Page that hides diffs */ | |
| 505 | 508 | |
| 506 | 509 | login_check_credentials(); |
| 507 | 510 | if( !g.perm.Read ){ login_needed(); return; } |
| 508 | 511 | zName = P("name"); |
| 509 | 512 | rid = name_to_rid_www("name"); |
| @@ -665,76 +668,74 @@ | ||
| 665 | 668 | style_header("Check-in Information"); |
| 666 | 669 | login_anonymous_available(); |
| 667 | 670 | } |
| 668 | 671 | db_finalize(&q1); |
| 669 | 672 | showTags(rid, ""); |
| 670 | - if( zParent ){ | |
| 671 | - const char *zW; /* URL param for ignoring whitespace */ | |
| 672 | - const char *zPage = "vinfo"; /* Page that shows diffs */ | |
| 673 | - const char *zPageHide = "ci"; /* Page that hides diffs */ | |
| 674 | - @ <div class="section">Changes</div> | |
| 675 | - @ <div class="sectionmenu"> | |
| 676 | - verboseFlag = g.zPath[0]!='c'; | |
| 677 | - if( db_get_boolean("show-version-diffs", 0)==0 ){ | |
| 678 | - verboseFlag = !verboseFlag; | |
| 679 | - zPage = "ci"; | |
| 680 | - zPageHide = "vinfo"; | |
| 681 | - } | |
| 682 | - diffFlags = construct_diff_flags(verboseFlag, sideBySide); | |
| 683 | - zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":""; | |
| 684 | - if( verboseFlag ){ | |
| 685 | - @ %z(xhref("class='button'","%R/%s/%T",zPageHide,zName)) | |
| 686 | - @ Hide Diffs</a> | |
| 687 | - if( sideBySide ){ | |
| 688 | - @ %z(xhref("class='button'","%R/%s/%T?sbs=0%s",zPage,zName,zW)) | |
| 689 | - @ Unified Diffs</a> | |
| 690 | - }else{ | |
| 691 | - @ %z(xhref("class='button'","%R/%s/%T?sbs=1%s",zPage,zName,zW)) | |
| 692 | - @ Side-by-Side Diffs</a> | |
| 693 | - } | |
| 694 | - if( *zW ){ | |
| 695 | - @ %z(xhref("class='button'","%R/%s/%T?sbs=%d",zPage,zName,sideBySide)) | |
| 696 | - @ Show Whitespace Changes</a> | |
| 697 | - }else{ | |
| 698 | - @ %z(xhref("class='button'","%R/%s/%T?sbs=%d&w",zPage,zName,sideBySide)) | |
| 699 | - @ Ignore Whitespace</a> | |
| 700 | - } | |
| 701 | - }else{ | |
| 702 | - @ %z(xhref("class='button'","%R/%s/%T?sbs=0",zPage,zName)) | |
| 703 | - @ Show Unified Diffs</a> | |
| 704 | - @ %z(xhref("class='button'","%R/%s/%T?sbs=1",zPage,zName)) | |
| 705 | - @ Show Side-by-Side Diffs</a> | |
| 706 | - } | |
| 673 | + @ <div class="section">Changes</div> | |
| 674 | + @ <div class="sectionmenu"> | |
| 675 | + verboseFlag = g.zPath[0]!='c'; | |
| 676 | + if( db_get_boolean("show-version-diffs", 0)==0 ){ | |
| 677 | + verboseFlag = !verboseFlag; | |
| 678 | + zPage = "ci"; | |
| 679 | + zPageHide = "vinfo"; | |
| 680 | + } | |
| 681 | + diffFlags = construct_diff_flags(verboseFlag, sideBySide); | |
| 682 | + zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":""; | |
| 683 | + if( verboseFlag ){ | |
| 684 | + @ %z(xhref("class='button'","%R/%s/%T",zPageHide,zName)) | |
| 685 | + @ Hide Diffs</a> | |
| 686 | + if( sideBySide ){ | |
| 687 | + @ %z(xhref("class='button'","%R/%s/%T?sbs=0%s",zPage,zName,zW)) | |
| 688 | + @ Unified Diffs</a> | |
| 689 | + }else{ | |
| 690 | + @ %z(xhref("class='button'","%R/%s/%T?sbs=1%s",zPage,zName,zW)) | |
| 691 | + @ Side-by-Side Diffs</a> | |
| 692 | + } | |
| 693 | + if( *zW ){ | |
| 694 | + @ %z(xhref("class='button'","%R/%s/%T?sbs=%d",zPage,zName,sideBySide)) | |
| 695 | + @ Show Whitespace Changes</a> | |
| 696 | + }else{ | |
| 697 | + @ %z(xhref("class='button'","%R/%s/%T?sbs=%d&w",zPage,zName,sideBySide)) | |
| 698 | + @ Ignore Whitespace</a> | |
| 699 | + } | |
| 700 | + }else{ | |
| 701 | + @ %z(xhref("class='button'","%R/%s/%T?sbs=0",zPage,zName)) | |
| 702 | + @ Show Unified Diffs</a> | |
| 703 | + @ %z(xhref("class='button'","%R/%s/%T?sbs=1",zPage,zName)) | |
| 704 | + @ Show Side-by-Side Diffs</a> | |
| 705 | + } | |
| 706 | + if( zParent ){ | |
| 707 | 707 | @ %z(xhref("class='button'","%R/vpatch?from=%S&to=%S",zParent,zUuid)) |
| 708 | - @ Patch</a></div> | |
| 709 | - if( pRe ){ | |
| 710 | - @ <p><b>Only differences that match regular expression "%h(zRe)" | |
| 711 | - @ are shown.</b></p> | |
| 712 | - } | |
| 713 | - db_prepare(&q3, | |
| 714 | - "SELECT name," | |
| 715 | - " mperm," | |
| 716 | - " (SELECT uuid FROM blob WHERE rid=mlink.pid)," | |
| 717 | - " (SELECT uuid FROM blob WHERE rid=mlink.fid)," | |
| 718 | - " (SELECT name FROM filename WHERE filename.fnid=mlink.pfnid)" | |
| 719 | - " FROM mlink JOIN filename ON filename.fnid=mlink.fnid" | |
| 720 | - " WHERE mlink.mid=%d" | |
| 721 | - " AND (mlink.fid>0" | |
| 722 | - " OR mlink.fnid NOT IN (SELECT pfnid FROM mlink WHERE mid=%d))" | |
| 723 | - " ORDER BY name /*sort*/", | |
| 724 | - rid, rid | |
| 725 | - ); | |
| 726 | - while( db_step(&q3)==SQLITE_ROW ){ | |
| 727 | - const char *zName = db_column_text(&q3,0); | |
| 728 | - int mperm = db_column_int(&q3, 1); | |
| 729 | - const char *zOld = db_column_text(&q3,2); | |
| 730 | - const char *zNew = db_column_text(&q3,3); | |
| 731 | - const char *zOldName = db_column_text(&q3, 4); | |
| 732 | - append_file_change_line(zName, zOld, zNew, zOldName, diffFlags,pRe,mperm); | |
| 733 | - } | |
| 734 | - db_finalize(&q3); | |
| 735 | - } | |
| 708 | + @ Patch</a> | |
| 709 | + } | |
| 710 | + @</div> | |
| 711 | + if( pRe ){ | |
| 712 | + @ <p><b>Only differences that match regular expression "%h(zRe)" | |
| 713 | + @ are shown.</b></p> | |
| 714 | + } | |
| 715 | + db_prepare(&q3, | |
| 716 | + "SELECT name," | |
| 717 | + " mperm," | |
| 718 | + " (SELECT uuid FROM blob WHERE rid=mlink.pid)," | |
| 719 | + " (SELECT uuid FROM blob WHERE rid=mlink.fid)," | |
| 720 | + " (SELECT name FROM filename WHERE filename.fnid=mlink.pfnid)" | |
| 721 | + " FROM mlink JOIN filename ON filename.fnid=mlink.fnid" | |
| 722 | + " WHERE mlink.mid=%d" | |
| 723 | + " AND (mlink.fid>0" | |
| 724 | + " OR mlink.fnid NOT IN (SELECT pfnid FROM mlink WHERE mid=%d))" | |
| 725 | + " ORDER BY name /*sort*/", | |
| 726 | + rid, rid | |
| 727 | + ); | |
| 728 | + while( db_step(&q3)==SQLITE_ROW ){ | |
| 729 | + const char *zName = db_column_text(&q3,0); | |
| 730 | + int mperm = db_column_int(&q3, 1); | |
| 731 | + const char *zOld = db_column_text(&q3,2); | |
| 732 | + const char *zNew = db_column_text(&q3,3); | |
| 733 | + const char *zOldName = db_column_text(&q3, 4); | |
| 734 | + append_file_change_line(zName, zOld, zNew, zOldName, diffFlags,pRe,mperm); | |
| 735 | + } | |
| 736 | + db_finalize(&q3); | |
| 736 | 737 | append_diff_javascript(sideBySide); |
| 737 | 738 | style_footer(); |
| 738 | 739 | } |
| 739 | 740 | |
| 740 | 741 | /* |
| @@ -1384,11 +1385,10 @@ | ||
| 1384 | 1385 | diffFlags = construct_diff_flags(1, sideBySide) | DIFF_HTML; |
| 1385 | 1386 | |
| 1386 | 1387 | style_header("Diff"); |
| 1387 | 1388 | zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":""; |
| 1388 | 1389 | if( *zW ){ |
| 1389 | - diffFlags |= DIFF_IGNORE_ALLWS; | |
| 1390 | 1390 | style_submenu_element("Show Whitespace Changes", "Show Whitespace Changes", |
| 1391 | 1391 | "%s/fdiff?v1=%T&v2=%T&sbs=%d", |
| 1392 | 1392 | g.zTop, P("v1"), P("v2"), sideBySide); |
| 1393 | 1393 | }else{ |
| 1394 | 1394 | style_submenu_element("Ignore Whitespace", "Ignore Whitespace", |
| @@ -1444,11 +1444,11 @@ | ||
| 1444 | 1444 | rid = name_to_rid_www("name"); |
| 1445 | 1445 | login_check_credentials(); |
| 1446 | 1446 | if( !g.perm.Read ){ login_needed(); return; } |
| 1447 | 1447 | if( rid==0 ) fossil_redirect_home(); |
| 1448 | 1448 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 1449 | - if( fossil_strcmp(P("name"), zUuid)==0 ){ | |
| 1449 | + if( fossil_strcmp(P("name"), zUuid)==0 && login_is_nobody() ){ | |
| 1450 | 1450 | g.isConst = 1; |
| 1451 | 1451 | } |
| 1452 | 1452 | free(zUuid); |
| 1453 | 1453 | zMime = P("m"); |
| 1454 | 1454 | if( zMime==0 ){ |
| @@ -2263,11 +2263,11 @@ | ||
| 2263 | 2263 | } |
| 2264 | 2264 | db_finalize(&q); |
| 2265 | 2265 | if( nChng>0 ){ |
| 2266 | 2266 | int nrid; |
| 2267 | 2267 | Blob cksum; |
| 2268 | - blob_appendf(&ctrl, "U %F\n", g.zLogin); | |
| 2268 | + blob_appendf(&ctrl, "U %F\n", login_name()); | |
| 2269 | 2269 | md5sum_blob(&ctrl, &cksum); |
| 2270 | 2270 | blob_appendf(&ctrl, "Z %b\n", &cksum); |
| 2271 | 2271 | db_begin_transaction(); |
| 2272 | 2272 | g.markPrivate = content_is_private(rid); |
| 2273 | 2273 | nrid = content_put(&ctrl); |
| 2274 | 2274 | |
| 2275 | 2275 | ADDED src/loadctrl.c |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -500,10 +500,13 @@ | |
| 500 | const char *zName; /* Name of the checkin to be displayed */ |
| 501 | const char *zUuid; /* UUID of zName */ |
| 502 | const char *zParent; /* UUID of the parent checkin (if any) */ |
| 503 | const char *zRe; /* regex parameter */ |
| 504 | ReCompiled *pRe = 0; /* regex */ |
| 505 | |
| 506 | login_check_credentials(); |
| 507 | if( !g.perm.Read ){ login_needed(); return; } |
| 508 | zName = P("name"); |
| 509 | rid = name_to_rid_www("name"); |
| @@ -665,76 +668,74 @@ | |
| 665 | style_header("Check-in Information"); |
| 666 | login_anonymous_available(); |
| 667 | } |
| 668 | db_finalize(&q1); |
| 669 | showTags(rid, ""); |
| 670 | if( zParent ){ |
| 671 | const char *zW; /* URL param for ignoring whitespace */ |
| 672 | const char *zPage = "vinfo"; /* Page that shows diffs */ |
| 673 | const char *zPageHide = "ci"; /* Page that hides diffs */ |
| 674 | @ <div class="section">Changes</div> |
| 675 | @ <div class="sectionmenu"> |
| 676 | verboseFlag = g.zPath[0]!='c'; |
| 677 | if( db_get_boolean("show-version-diffs", 0)==0 ){ |
| 678 | verboseFlag = !verboseFlag; |
| 679 | zPage = "ci"; |
| 680 | zPageHide = "vinfo"; |
| 681 | } |
| 682 | diffFlags = construct_diff_flags(verboseFlag, sideBySide); |
| 683 | zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":""; |
| 684 | if( verboseFlag ){ |
| 685 | @ %z(xhref("class='button'","%R/%s/%T",zPageHide,zName)) |
| 686 | @ Hide Diffs</a> |
| 687 | if( sideBySide ){ |
| 688 | @ %z(xhref("class='button'","%R/%s/%T?sbs=0%s",zPage,zName,zW)) |
| 689 | @ Unified Diffs</a> |
| 690 | }else{ |
| 691 | @ %z(xhref("class='button'","%R/%s/%T?sbs=1%s",zPage,zName,zW)) |
| 692 | @ Side-by-Side Diffs</a> |
| 693 | } |
| 694 | if( *zW ){ |
| 695 | @ %z(xhref("class='button'","%R/%s/%T?sbs=%d",zPage,zName,sideBySide)) |
| 696 | @ Show Whitespace Changes</a> |
| 697 | }else{ |
| 698 | @ %z(xhref("class='button'","%R/%s/%T?sbs=%d&w",zPage,zName,sideBySide)) |
| 699 | @ Ignore Whitespace</a> |
| 700 | } |
| 701 | }else{ |
| 702 | @ %z(xhref("class='button'","%R/%s/%T?sbs=0",zPage,zName)) |
| 703 | @ Show Unified Diffs</a> |
| 704 | @ %z(xhref("class='button'","%R/%s/%T?sbs=1",zPage,zName)) |
| 705 | @ Show Side-by-Side Diffs</a> |
| 706 | } |
| 707 | @ %z(xhref("class='button'","%R/vpatch?from=%S&to=%S",zParent,zUuid)) |
| 708 | @ Patch</a></div> |
| 709 | if( pRe ){ |
| 710 | @ <p><b>Only differences that match regular expression "%h(zRe)" |
| 711 | @ are shown.</b></p> |
| 712 | } |
| 713 | db_prepare(&q3, |
| 714 | "SELECT name," |
| 715 | " mperm," |
| 716 | " (SELECT uuid FROM blob WHERE rid=mlink.pid)," |
| 717 | " (SELECT uuid FROM blob WHERE rid=mlink.fid)," |
| 718 | " (SELECT name FROM filename WHERE filename.fnid=mlink.pfnid)" |
| 719 | " FROM mlink JOIN filename ON filename.fnid=mlink.fnid" |
| 720 | " WHERE mlink.mid=%d" |
| 721 | " AND (mlink.fid>0" |
| 722 | " OR mlink.fnid NOT IN (SELECT pfnid FROM mlink WHERE mid=%d))" |
| 723 | " ORDER BY name /*sort*/", |
| 724 | rid, rid |
| 725 | ); |
| 726 | while( db_step(&q3)==SQLITE_ROW ){ |
| 727 | const char *zName = db_column_text(&q3,0); |
| 728 | int mperm = db_column_int(&q3, 1); |
| 729 | const char *zOld = db_column_text(&q3,2); |
| 730 | const char *zNew = db_column_text(&q3,3); |
| 731 | const char *zOldName = db_column_text(&q3, 4); |
| 732 | append_file_change_line(zName, zOld, zNew, zOldName, diffFlags,pRe,mperm); |
| 733 | } |
| 734 | db_finalize(&q3); |
| 735 | } |
| 736 | append_diff_javascript(sideBySide); |
| 737 | style_footer(); |
| 738 | } |
| 739 | |
| 740 | /* |
| @@ -1384,11 +1385,10 @@ | |
| 1384 | diffFlags = construct_diff_flags(1, sideBySide) | DIFF_HTML; |
| 1385 | |
| 1386 | style_header("Diff"); |
| 1387 | zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":""; |
| 1388 | if( *zW ){ |
| 1389 | diffFlags |= DIFF_IGNORE_ALLWS; |
| 1390 | style_submenu_element("Show Whitespace Changes", "Show Whitespace Changes", |
| 1391 | "%s/fdiff?v1=%T&v2=%T&sbs=%d", |
| 1392 | g.zTop, P("v1"), P("v2"), sideBySide); |
| 1393 | }else{ |
| 1394 | style_submenu_element("Ignore Whitespace", "Ignore Whitespace", |
| @@ -1444,11 +1444,11 @@ | |
| 1444 | rid = name_to_rid_www("name"); |
| 1445 | login_check_credentials(); |
| 1446 | if( !g.perm.Read ){ login_needed(); return; } |
| 1447 | if( rid==0 ) fossil_redirect_home(); |
| 1448 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 1449 | if( fossil_strcmp(P("name"), zUuid)==0 ){ |
| 1450 | g.isConst = 1; |
| 1451 | } |
| 1452 | free(zUuid); |
| 1453 | zMime = P("m"); |
| 1454 | if( zMime==0 ){ |
| @@ -2263,11 +2263,11 @@ | |
| 2263 | } |
| 2264 | db_finalize(&q); |
| 2265 | if( nChng>0 ){ |
| 2266 | int nrid; |
| 2267 | Blob cksum; |
| 2268 | blob_appendf(&ctrl, "U %F\n", g.zLogin); |
| 2269 | md5sum_blob(&ctrl, &cksum); |
| 2270 | blob_appendf(&ctrl, "Z %b\n", &cksum); |
| 2271 | db_begin_transaction(); |
| 2272 | g.markPrivate = content_is_private(rid); |
| 2273 | nrid = content_put(&ctrl); |
| 2274 | |
| 2275 | DDED src/loadctrl.c |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -500,10 +500,13 @@ | |
| 500 | const char *zName; /* Name of the checkin to be displayed */ |
| 501 | const char *zUuid; /* UUID of zName */ |
| 502 | const char *zParent; /* UUID of the parent checkin (if any) */ |
| 503 | const char *zRe; /* regex parameter */ |
| 504 | ReCompiled *pRe = 0; /* regex */ |
| 505 | const char *zW; /* URL param for ignoring whitespace */ |
| 506 | const char *zPage = "vinfo"; /* Page that shows diffs */ |
| 507 | const char *zPageHide = "ci"; /* Page that hides diffs */ |
| 508 | |
| 509 | login_check_credentials(); |
| 510 | if( !g.perm.Read ){ login_needed(); return; } |
| 511 | zName = P("name"); |
| 512 | rid = name_to_rid_www("name"); |
| @@ -665,76 +668,74 @@ | |
| 668 | style_header("Check-in Information"); |
| 669 | login_anonymous_available(); |
| 670 | } |
| 671 | db_finalize(&q1); |
| 672 | showTags(rid, ""); |
| 673 | @ <div class="section">Changes</div> |
| 674 | @ <div class="sectionmenu"> |
| 675 | verboseFlag = g.zPath[0]!='c'; |
| 676 | if( db_get_boolean("show-version-diffs", 0)==0 ){ |
| 677 | verboseFlag = !verboseFlag; |
| 678 | zPage = "ci"; |
| 679 | zPageHide = "vinfo"; |
| 680 | } |
| 681 | diffFlags = construct_diff_flags(verboseFlag, sideBySide); |
| 682 | zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":""; |
| 683 | if( verboseFlag ){ |
| 684 | @ %z(xhref("class='button'","%R/%s/%T",zPageHide,zName)) |
| 685 | @ Hide Diffs</a> |
| 686 | if( sideBySide ){ |
| 687 | @ %z(xhref("class='button'","%R/%s/%T?sbs=0%s",zPage,zName,zW)) |
| 688 | @ Unified Diffs</a> |
| 689 | }else{ |
| 690 | @ %z(xhref("class='button'","%R/%s/%T?sbs=1%s",zPage,zName,zW)) |
| 691 | @ Side-by-Side Diffs</a> |
| 692 | } |
| 693 | if( *zW ){ |
| 694 | @ %z(xhref("class='button'","%R/%s/%T?sbs=%d",zPage,zName,sideBySide)) |
| 695 | @ Show Whitespace Changes</a> |
| 696 | }else{ |
| 697 | @ %z(xhref("class='button'","%R/%s/%T?sbs=%d&w",zPage,zName,sideBySide)) |
| 698 | @ Ignore Whitespace</a> |
| 699 | } |
| 700 | }else{ |
| 701 | @ %z(xhref("class='button'","%R/%s/%T?sbs=0",zPage,zName)) |
| 702 | @ Show Unified Diffs</a> |
| 703 | @ %z(xhref("class='button'","%R/%s/%T?sbs=1",zPage,zName)) |
| 704 | @ Show Side-by-Side Diffs</a> |
| 705 | } |
| 706 | if( zParent ){ |
| 707 | @ %z(xhref("class='button'","%R/vpatch?from=%S&to=%S",zParent,zUuid)) |
| 708 | @ Patch</a> |
| 709 | } |
| 710 | @</div> |
| 711 | if( pRe ){ |
| 712 | @ <p><b>Only differences that match regular expression "%h(zRe)" |
| 713 | @ are shown.</b></p> |
| 714 | } |
| 715 | db_prepare(&q3, |
| 716 | "SELECT name," |
| 717 | " mperm," |
| 718 | " (SELECT uuid FROM blob WHERE rid=mlink.pid)," |
| 719 | " (SELECT uuid FROM blob WHERE rid=mlink.fid)," |
| 720 | " (SELECT name FROM filename WHERE filename.fnid=mlink.pfnid)" |
| 721 | " FROM mlink JOIN filename ON filename.fnid=mlink.fnid" |
| 722 | " WHERE mlink.mid=%d" |
| 723 | " AND (mlink.fid>0" |
| 724 | " OR mlink.fnid NOT IN (SELECT pfnid FROM mlink WHERE mid=%d))" |
| 725 | " ORDER BY name /*sort*/", |
| 726 | rid, rid |
| 727 | ); |
| 728 | while( db_step(&q3)==SQLITE_ROW ){ |
| 729 | const char *zName = db_column_text(&q3,0); |
| 730 | int mperm = db_column_int(&q3, 1); |
| 731 | const char *zOld = db_column_text(&q3,2); |
| 732 | const char *zNew = db_column_text(&q3,3); |
| 733 | const char *zOldName = db_column_text(&q3, 4); |
| 734 | append_file_change_line(zName, zOld, zNew, zOldName, diffFlags,pRe,mperm); |
| 735 | } |
| 736 | db_finalize(&q3); |
| 737 | append_diff_javascript(sideBySide); |
| 738 | style_footer(); |
| 739 | } |
| 740 | |
| 741 | /* |
| @@ -1384,11 +1385,10 @@ | |
| 1385 | diffFlags = construct_diff_flags(1, sideBySide) | DIFF_HTML; |
| 1386 | |
| 1387 | style_header("Diff"); |
| 1388 | zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":""; |
| 1389 | if( *zW ){ |
| 1390 | style_submenu_element("Show Whitespace Changes", "Show Whitespace Changes", |
| 1391 | "%s/fdiff?v1=%T&v2=%T&sbs=%d", |
| 1392 | g.zTop, P("v1"), P("v2"), sideBySide); |
| 1393 | }else{ |
| 1394 | style_submenu_element("Ignore Whitespace", "Ignore Whitespace", |
| @@ -1444,11 +1444,11 @@ | |
| 1444 | rid = name_to_rid_www("name"); |
| 1445 | login_check_credentials(); |
| 1446 | if( !g.perm.Read ){ login_needed(); return; } |
| 1447 | if( rid==0 ) fossil_redirect_home(); |
| 1448 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 1449 | if( fossil_strcmp(P("name"), zUuid)==0 && login_is_nobody() ){ |
| 1450 | g.isConst = 1; |
| 1451 | } |
| 1452 | free(zUuid); |
| 1453 | zMime = P("m"); |
| 1454 | if( zMime==0 ){ |
| @@ -2263,11 +2263,11 @@ | |
| 2263 | } |
| 2264 | db_finalize(&q); |
| 2265 | if( nChng>0 ){ |
| 2266 | int nrid; |
| 2267 | Blob cksum; |
| 2268 | blob_appendf(&ctrl, "U %F\n", login_name()); |
| 2269 | md5sum_blob(&ctrl, &cksum); |
| 2270 | blob_appendf(&ctrl, "Z %b\n", &cksum); |
| 2271 | db_begin_transaction(); |
| 2272 | g.markPrivate = content_is_private(rid); |
| 2273 | nrid = content_put(&ctrl); |
| 2274 | |
| 2275 | DDED src/loadctrl.c |
+1
| --- a/src/loadctrl.c | ||
| +++ b/src/loadctrl.c | ||
| @@ -0,0 +1 @@ | ||
| 1 | +header(test_loadavgooter(loadavg_test"0" |
| --- a/src/loadctrl.c | |
| +++ b/src/loadctrl.c | |
| @@ -0,0 +1 @@ | |
| --- a/src/loadctrl.c | |
| +++ b/src/loadctrl.c | |
| @@ -0,0 +1 @@ | |
| 1 | header(test_loadavgooter(loadavg_test"0" |
+14
| --- src/login.c | ||
| +++ src/login.c | ||
| @@ -1142,10 +1142,24 @@ | ||
| 1142 | 1142 | /* Set the capabilities */ |
| 1143 | 1143 | login_set_capabilities(zCap, 0); |
| 1144 | 1144 | login_anon_once = 1; |
| 1145 | 1145 | login_set_anon_nobody_capabilities(); |
| 1146 | 1146 | } |
| 1147 | + | |
| 1148 | +/* | |
| 1149 | +** Return true if the user is "nobody" | |
| 1150 | +*/ | |
| 1151 | +int login_is_nobody(void){ | |
| 1152 | + return g.zLogin==0 || g.zLogin[0]==0 || fossil_strcmp(g.zLogin,"nobody")==0; | |
| 1153 | +} | |
| 1154 | + | |
| 1155 | +/* | |
| 1156 | +** Return the login name. If no login name is specified, return "nobody". | |
| 1157 | +*/ | |
| 1158 | +const char *login_name(void){ | |
| 1159 | + return (g.zLogin && g.zLogin[0]) ? g.zLogin : "nobody"; | |
| 1160 | +} | |
| 1147 | 1161 | |
| 1148 | 1162 | /* |
| 1149 | 1163 | ** Call this routine when the credential check fails. It causes |
| 1150 | 1164 | ** a redirect to the "login" page. |
| 1151 | 1165 | */ |
| 1152 | 1166 |
| --- src/login.c | |
| +++ src/login.c | |
| @@ -1142,10 +1142,24 @@ | |
| 1142 | /* Set the capabilities */ |
| 1143 | login_set_capabilities(zCap, 0); |
| 1144 | login_anon_once = 1; |
| 1145 | login_set_anon_nobody_capabilities(); |
| 1146 | } |
| 1147 | |
| 1148 | /* |
| 1149 | ** Call this routine when the credential check fails. It causes |
| 1150 | ** a redirect to the "login" page. |
| 1151 | */ |
| 1152 |
| --- src/login.c | |
| +++ src/login.c | |
| @@ -1142,10 +1142,24 @@ | |
| 1142 | /* Set the capabilities */ |
| 1143 | login_set_capabilities(zCap, 0); |
| 1144 | login_anon_once = 1; |
| 1145 | login_set_anon_nobody_capabilities(); |
| 1146 | } |
| 1147 | |
| 1148 | /* |
| 1149 | ** Return true if the user is "nobody" |
| 1150 | */ |
| 1151 | int login_is_nobody(void){ |
| 1152 | return g.zLogin==0 || g.zLogin[0]==0 || fossil_strcmp(g.zLogin,"nobody")==0; |
| 1153 | } |
| 1154 | |
| 1155 | /* |
| 1156 | ** Return the login name. If no login name is specified, return "nobody". |
| 1157 | */ |
| 1158 | const char *login_name(void){ |
| 1159 | return (g.zLogin && g.zLogin[0]) ? g.zLogin : "nobody"; |
| 1160 | } |
| 1161 | |
| 1162 | /* |
| 1163 | ** Call this routine when the credential check fails. It causes |
| 1164 | ** a redirect to the "login" page. |
| 1165 | */ |
| 1166 |
+3
-3
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -121,11 +121,11 @@ | ||
| 121 | 121 | |
| 122 | 122 | struct Global { |
| 123 | 123 | int argc; char **argv; /* Command-line arguments to the program */ |
| 124 | 124 | char *nameOfExe; /* Full path of executable. */ |
| 125 | 125 | const char *zErrlog; /* Log errors to this file, if not NULL */ |
| 126 | - int isConst; /* True if the output is unchanging */ | |
| 126 | + int isConst; /* True if the output is unchanging & cacheable */ | |
| 127 | 127 | const char *zVfsName; /* The VFS to use for database connections */ |
| 128 | 128 | sqlite3 *db; /* The connection to the databases */ |
| 129 | 129 | sqlite3 *dbConfig; /* Separate connection for global_config table */ |
| 130 | 130 | int useAttach; /* True if global_config is attached to repository */ |
| 131 | 131 | const char *zConfigDbName;/* Path of the config database. NULL if not open */ |
| @@ -193,11 +193,11 @@ | ||
| 193 | 193 | char *urlFossil; /* The fossil query parameter on ssh: */ |
| 194 | 194 | unsigned urlFlags; /* Boolean flags controlling URL processing */ |
| 195 | 195 | int useProxy; /* Used to remember that a proxy is in use */ |
| 196 | 196 | char *proxyUrlPath; |
| 197 | 197 | int proxyOrigPort; /* Tunneled port number for https through proxy */ |
| 198 | - const char *zLogin; /* Login name. "" if not logged in. */ | |
| 198 | + const char *zLogin; /* Login name. NULL or "" if not logged in. */ | |
| 199 | 199 | const char *zSSLIdentity; /* Value of --ssl-identity option, filename of |
| 200 | 200 | ** SSL client identity */ |
| 201 | 201 | int useLocalauth; /* No login required if from 127.0.0.1 */ |
| 202 | 202 | int noPswd; /* Logged in without password (on 127.0.0.1) */ |
| 203 | 203 | int userUid; /* Integer user id */ |
| @@ -1457,11 +1457,11 @@ | ||
| 1457 | 1457 | zAltRepo[jj] = 0; |
| 1458 | 1458 | zAltRepo += jj+1; |
| 1459 | 1459 | }else{ |
| 1460 | 1460 | zUser = "nobody"; |
| 1461 | 1461 | } |
| 1462 | - if( g.zLogin==0 ) zUser = "nobody"; | |
| 1462 | + if( g.zLogin==0 || g.zLogin[0]==0 ) zUser = "nobody"; | |
| 1463 | 1463 | if( zAltRepo[0]!='/' ){ |
| 1464 | 1464 | zAltRepo = mprintf("%s/../%s", g.zRepositoryName, zAltRepo); |
| 1465 | 1465 | file_simplify_name(zAltRepo, -1, 0); |
| 1466 | 1466 | } |
| 1467 | 1467 | db_close(1); |
| 1468 | 1468 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -121,11 +121,11 @@ | |
| 121 | |
| 122 | struct Global { |
| 123 | int argc; char **argv; /* Command-line arguments to the program */ |
| 124 | char *nameOfExe; /* Full path of executable. */ |
| 125 | const char *zErrlog; /* Log errors to this file, if not NULL */ |
| 126 | int isConst; /* True if the output is unchanging */ |
| 127 | const char *zVfsName; /* The VFS to use for database connections */ |
| 128 | sqlite3 *db; /* The connection to the databases */ |
| 129 | sqlite3 *dbConfig; /* Separate connection for global_config table */ |
| 130 | int useAttach; /* True if global_config is attached to repository */ |
| 131 | const char *zConfigDbName;/* Path of the config database. NULL if not open */ |
| @@ -193,11 +193,11 @@ | |
| 193 | char *urlFossil; /* The fossil query parameter on ssh: */ |
| 194 | unsigned urlFlags; /* Boolean flags controlling URL processing */ |
| 195 | int useProxy; /* Used to remember that a proxy is in use */ |
| 196 | char *proxyUrlPath; |
| 197 | int proxyOrigPort; /* Tunneled port number for https through proxy */ |
| 198 | const char *zLogin; /* Login name. "" if not logged in. */ |
| 199 | const char *zSSLIdentity; /* Value of --ssl-identity option, filename of |
| 200 | ** SSL client identity */ |
| 201 | int useLocalauth; /* No login required if from 127.0.0.1 */ |
| 202 | int noPswd; /* Logged in without password (on 127.0.0.1) */ |
| 203 | int userUid; /* Integer user id */ |
| @@ -1457,11 +1457,11 @@ | |
| 1457 | zAltRepo[jj] = 0; |
| 1458 | zAltRepo += jj+1; |
| 1459 | }else{ |
| 1460 | zUser = "nobody"; |
| 1461 | } |
| 1462 | if( g.zLogin==0 ) zUser = "nobody"; |
| 1463 | if( zAltRepo[0]!='/' ){ |
| 1464 | zAltRepo = mprintf("%s/../%s", g.zRepositoryName, zAltRepo); |
| 1465 | file_simplify_name(zAltRepo, -1, 0); |
| 1466 | } |
| 1467 | db_close(1); |
| 1468 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -121,11 +121,11 @@ | |
| 121 | |
| 122 | struct Global { |
| 123 | int argc; char **argv; /* Command-line arguments to the program */ |
| 124 | char *nameOfExe; /* Full path of executable. */ |
| 125 | const char *zErrlog; /* Log errors to this file, if not NULL */ |
| 126 | int isConst; /* True if the output is unchanging & cacheable */ |
| 127 | const char *zVfsName; /* The VFS to use for database connections */ |
| 128 | sqlite3 *db; /* The connection to the databases */ |
| 129 | sqlite3 *dbConfig; /* Separate connection for global_config table */ |
| 130 | int useAttach; /* True if global_config is attached to repository */ |
| 131 | const char *zConfigDbName;/* Path of the config database. NULL if not open */ |
| @@ -193,11 +193,11 @@ | |
| 193 | char *urlFossil; /* The fossil query parameter on ssh: */ |
| 194 | unsigned urlFlags; /* Boolean flags controlling URL processing */ |
| 195 | int useProxy; /* Used to remember that a proxy is in use */ |
| 196 | char *proxyUrlPath; |
| 197 | int proxyOrigPort; /* Tunneled port number for https through proxy */ |
| 198 | const char *zLogin; /* Login name. NULL or "" if not logged in. */ |
| 199 | const char *zSSLIdentity; /* Value of --ssl-identity option, filename of |
| 200 | ** SSL client identity */ |
| 201 | int useLocalauth; /* No login required if from 127.0.0.1 */ |
| 202 | int noPswd; /* Logged in without password (on 127.0.0.1) */ |
| 203 | int userUid; /* Integer user id */ |
| @@ -1457,11 +1457,11 @@ | |
| 1457 | zAltRepo[jj] = 0; |
| 1458 | zAltRepo += jj+1; |
| 1459 | }else{ |
| 1460 | zUser = "nobody"; |
| 1461 | } |
| 1462 | if( g.zLogin==0 || g.zLogin[0]==0 ) zUser = "nobody"; |
| 1463 | if( zAltRepo[0]!='/' ){ |
| 1464 | zAltRepo = mprintf("%s/../%s", g.zRepositoryName, zAltRepo); |
| 1465 | file_simplify_name(zAltRepo, -1, 0); |
| 1466 | } |
| 1467 | db_close(1); |
| 1468 |
+11
-1
| --- src/main.mk | ||
| +++ src/main.mk | ||
| @@ -66,10 +66,11 @@ | ||
| 66 | 66 | $(SRCDIR)/json_tag.c \ |
| 67 | 67 | $(SRCDIR)/json_timeline.c \ |
| 68 | 68 | $(SRCDIR)/json_user.c \ |
| 69 | 69 | $(SRCDIR)/json_wiki.c \ |
| 70 | 70 | $(SRCDIR)/leaf.c \ |
| 71 | + $(SRCDIR)/loadctrl.c \ | |
| 71 | 72 | $(SRCDIR)/login.c \ |
| 72 | 73 | $(SRCDIR)/lookslike.c \ |
| 73 | 74 | $(SRCDIR)/main.c \ |
| 74 | 75 | $(SRCDIR)/manifest.c \ |
| 75 | 76 | $(SRCDIR)/markdown.c \ |
| @@ -176,10 +177,11 @@ | ||
| 176 | 177 | $(OBJDIR)/json_tag_.c \ |
| 177 | 178 | $(OBJDIR)/json_timeline_.c \ |
| 178 | 179 | $(OBJDIR)/json_user_.c \ |
| 179 | 180 | $(OBJDIR)/json_wiki_.c \ |
| 180 | 181 | $(OBJDIR)/leaf_.c \ |
| 182 | + $(OBJDIR)/loadctrl_.c \ | |
| 181 | 183 | $(OBJDIR)/login_.c \ |
| 182 | 184 | $(OBJDIR)/lookslike_.c \ |
| 183 | 185 | $(OBJDIR)/main_.c \ |
| 184 | 186 | $(OBJDIR)/manifest_.c \ |
| 185 | 187 | $(OBJDIR)/markdown_.c \ |
| @@ -286,10 +288,11 @@ | ||
| 286 | 288 | $(OBJDIR)/json_tag.o \ |
| 287 | 289 | $(OBJDIR)/json_timeline.o \ |
| 288 | 290 | $(OBJDIR)/json_user.o \ |
| 289 | 291 | $(OBJDIR)/json_wiki.o \ |
| 290 | 292 | $(OBJDIR)/leaf.o \ |
| 293 | + $(OBJDIR)/loadctrl.o \ | |
| 291 | 294 | $(OBJDIR)/login.o \ |
| 292 | 295 | $(OBJDIR)/lookslike.o \ |
| 293 | 296 | $(OBJDIR)/main.o \ |
| 294 | 297 | $(OBJDIR)/manifest.o \ |
| 295 | 298 | $(OBJDIR)/markdown.o \ |
| @@ -422,11 +425,11 @@ | ||
| 422 | 425 | |
| 423 | 426 | |
| 424 | 427 | $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex |
| 425 | 428 | $(OBJDIR)/mkindex $(TRANS_SRC) >$@ |
| 426 | 429 | $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h |
| 427 | - $(OBJDIR)/makeheaders $(OBJDIR)/add_.c:$(OBJDIR)/add.h $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h $(OBJDIR)/clone_.c:$(OBJDIR)/clone.h $(OBJDIR)/comformat_.c:$(OBJDIR)/comformat.h $(OBJDIR)/configure_.c:$(OBJDIR)/configure.h $(OBJDIR)/content_.c:$(OBJDIR)/content.h $(OBJDIR)/db_.c:$(OBJDIR)/db.h $(OBJDIR)/delta_.c:$(OBJDIR)/delta.h $(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h $(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h $(OBJDIR)/diff_.c:$(OBJDIR)/diff.h $(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h $(OBJDIR)/doc_.c:$(OBJDIR)/doc.h $(OBJDIR)/encode_.c:$(OBJDIR)/encode.h $(OBJDIR)/event_.c:$(OBJDIR)/event.h $(OBJDIR)/export_.c:$(OBJDIR)/export.h $(OBJDIR)/file_.c:$(OBJDIR)/file.h $(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h $(OBJDIR)/http_.c:$(OBJDIR)/http.h $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h $(OBJDIR)/import_.c:$(OBJDIR)/import.h $(OBJDIR)/info_.c:$(OBJDIR)/info.h $(OBJDIR)/json_.c:$(OBJDIR)/json.h $(OBJDIR)/json_artifact_.c:$(OBJDIR)/json_artifact.h $(OBJDIR)/json_branch_.c:$(OBJDIR)/json_branch.h $(OBJDIR)/json_config_.c:$(OBJDIR)/json_config.h $(OBJDIR)/json_diff_.c:$(OBJDIR)/json_diff.h $(OBJDIR)/json_dir_.c:$(OBJDIR)/json_dir.h $(OBJDIR)/json_finfo_.c:$(OBJDIR)/json_finfo.h $(OBJDIR)/json_login_.c:$(OBJDIR)/json_login.h $(OBJDIR)/json_query_.c:$(OBJDIR)/json_query.h $(OBJDIR)/json_report_.c:$(OBJDIR)/json_report.h $(OBJDIR)/json_status_.c:$(OBJDIR)/json_status.h $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h $(OBJDIR)/login_.c:$(OBJDIR)/login.h $(OBJDIR)/lookslike_.c:$(OBJDIR)/lookslike.h $(OBJDIR)/main_.c:$(OBJDIR)/main.h $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h $(OBJDIR)/markdown_.c:$(OBJDIR)/markdown.h $(OBJDIR)/markdown_html_.c:$(OBJDIR)/markdown_html.h $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.h $(OBJDIR)/moderate_.c:$(OBJDIR)/moderate.h $(OBJDIR)/name_.c:$(OBJDIR)/name.h $(OBJDIR)/path_.c:$(OBJDIR)/path.h $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h $(OBJDIR)/regexp_.c:$(OBJDIR)/regexp.h $(OBJDIR)/report_.c:$(OBJDIR)/report.h $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h $(OBJDIR)/search_.c:$(OBJDIR)/search.h $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h $(OBJDIR)/sha1_.c:$(OBJDIR)/sha1.h $(OBJDIR)/shun_.c:$(OBJDIR)/shun.h $(OBJDIR)/skins_.c:$(OBJDIR)/skins.h $(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h $(OBJDIR)/stash_.c:$(OBJDIR)/stash.h $(OBJDIR)/stat_.c:$(OBJDIR)/stat.h $(OBJDIR)/style_.c:$(OBJDIR)/style.h $(OBJDIR)/sync_.c:$(OBJDIR)/sync.h $(OBJDIR)/tag_.c:$(OBJDIR)/tag.h $(OBJDIR)/tar_.c:$(OBJDIR)/tar.h $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h $(OBJDIR)/unicode_.c:$(OBJDIR)/unicode.h $(OBJDIR)/update_.c:$(OBJDIR)/update.h $(OBJDIR)/url_.c:$(OBJDIR)/url.h $(OBJDIR)/user_.c:$(OBJDIR)/user.h $(OBJDIR)/utf8_.c:$(OBJDIR)/utf8.h $(OBJDIR)/util_.c:$(OBJDIR)/util.h $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h $(OBJDIR)/vfile_.c:$(OBJDIR)/vfile.h $(OBJDIR)/wiki_.c:$(OBJDIR)/wiki.h $(OBJDIR)/wikiformat_.c:$(OBJDIR)/wikiformat.h $(OBJDIR)/winfile_.c:$(OBJDIR)/winfile.h $(OBJDIR)/winhttp_.c:$(OBJDIR)/winhttp.h $(OBJDIR)/wysiwyg_.c:$(OBJDIR)/wysiwyg.h $(OBJDIR)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/xfersetup_.c:$(OBJDIR)/xfersetup.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h | |
| 430 | + $(OBJDIR)/makeheaders $(OBJDIR)/add_.c:$(OBJDIR)/add.h $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h $(OBJDIR)/clone_.c:$(OBJDIR)/clone.h $(OBJDIR)/comformat_.c:$(OBJDIR)/comformat.h $(OBJDIR)/configure_.c:$(OBJDIR)/configure.h $(OBJDIR)/content_.c:$(OBJDIR)/content.h $(OBJDIR)/db_.c:$(OBJDIR)/db.h $(OBJDIR)/delta_.c:$(OBJDIR)/delta.h $(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h $(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h $(OBJDIR)/diff_.c:$(OBJDIR)/diff.h $(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h $(OBJDIR)/doc_.c:$(OBJDIR)/doc.h $(OBJDIR)/encode_.c:$(OBJDIR)/encode.h $(OBJDIR)/event_.c:$(OBJDIR)/event.h $(OBJDIR)/export_.c:$(OBJDIR)/export.h $(OBJDIR)/file_.c:$(OBJDIR)/file.h $(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h $(OBJDIR)/http_.c:$(OBJDIR)/http.h $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h $(OBJDIR)/import_.c:$(OBJDIR)/import.h $(OBJDIR)/info_.c:$(OBJDIR)/info.h $(OBJDIR)/json_.c:$(OBJDIR)/json.h $(OBJDIR)/json_artifact_.c:$(OBJDIR)/json_artifact.h $(OBJDIR)/json_branch_.c:$(OBJDIR)/json_branch.h $(OBJDIR)/json_config_.c:$(OBJDIR)/json_config.h $(OBJDIR)/json_diff_.c:$(OBJDIR)/json_diff.h $(OBJDIR)/json_dir_.c:$(OBJDIR)/json_dir.h $(OBJDIR)/json_finfo_.c:$(OBJDIR)/json_finfo.h $(OBJDIR)/json_login_.c:$(OBJDIR)/json_login.h $(OBJDIR)/json_query_.c:$(OBJDIR)/json_query.h $(OBJDIR)/json_report_.c:$(OBJDIR)/json_report.h $(OBJDIR)/json_status_.c:$(OBJDIR)/json_status.h $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h $(OBJDIR)/loadctrl_.c:$(OBJDIR)/loadctrl.h $(OBJDIR)/login_.c:$(OBJDIR)/login.h $(OBJDIR)/lookslike_.c:$(OBJDIR)/lookslike.h $(OBJDIR)/main_.c:$(OBJDIR)/main.h $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h $(OBJDIR)/markdown_.c:$(OBJDIR)/markdown.h $(OBJDIR)/markdown_html_.c:$(OBJDIR)/markdown_html.h $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.h $(OBJDIR)/moderate_.c:$(OBJDIR)/moderate.h $(OBJDIR)/name_.c:$(OBJDIR)/name.h $(OBJDIR)/path_.c:$(OBJDIR)/path.h $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h $(OBJDIR)/regexp_.c:$(OBJDIR)/regexp.h $(OBJDIR)/report_.c:$(OBJDIR)/report.h $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h $(OBJDIR)/search_.c:$(OBJDIR)/search.h $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h $(OBJDIR)/sha1_.c:$(OBJDIR)/sha1.h $(OBJDIR)/shun_.c:$(OBJDIR)/shun.h $(OBJDIR)/skins_.c:$(OBJDIR)/skins.h $(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h $(OBJDIR)/stash_.c:$(OBJDIR)/stash.h $(OBJDIR)/stat_.c:$(OBJDIR)/stat.h $(OBJDIR)/style_.c:$(OBJDIR)/style.h $(OBJDIR)/sync_.c:$(OBJDIR)/sync.h $(OBJDIR)/tag_.c:$(OBJDIR)/tag.h $(OBJDIR)/tar_.c:$(OBJDIR)/tar.h $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h $(OBJDIR)/unicode_.c:$(OBJDIR)/unicode.h $(OBJDIR)/update_.c:$(OBJDIR)/update.h $(OBJDIR)/url_.c:$(OBJDIR)/url.h $(OBJDIR)/user_.c:$(OBJDIR)/user.h $(OBJDIR)/utf8_.c:$(OBJDIR)/utf8.h $(OBJDIR)/util_.c:$(OBJDIR)/util.h $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h $(OBJDIR)/vfile_.c:$(OBJDIR)/vfile.h $(OBJDIR)/wiki_.c:$(OBJDIR)/wiki.h $(OBJDIR)/wikiformat_.c:$(OBJDIR)/wikiformat.h $(OBJDIR)/winfile_.c:$(OBJDIR)/winfile.h $(OBJDIR)/winhttp_.c:$(OBJDIR)/winhttp.h $(OBJDIR)/wysiwyg_.c:$(OBJDIR)/wysiwyg.h $(OBJDIR)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/xfersetup_.c:$(OBJDIR)/xfersetup.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h | |
| 428 | 431 | touch $(OBJDIR)/headers |
| 429 | 432 | $(OBJDIR)/headers: Makefile |
| 430 | 433 | $(OBJDIR)/json.o $(OBJDIR)/json_artifact.o $(OBJDIR)/json_branch.o $(OBJDIR)/json_config.o $(OBJDIR)/json_diff.o $(OBJDIR)/json_dir.o $(OBJDIR)/json_finfo.o $(OBJDIR)/json_login.o $(OBJDIR)/json_query.o $(OBJDIR)/json_report.o $(OBJDIR)/json_status.o $(OBJDIR)/json_tag.o $(OBJDIR)/json_timeline.o $(OBJDIR)/json_user.o $(OBJDIR)/json_wiki.o : $(SRCDIR)/json_detail.h |
| 431 | 434 | Makefile: |
| 432 | 435 | $(OBJDIR)/add_.c: $(SRCDIR)/add.c $(OBJDIR)/translate |
| @@ -805,10 +808,17 @@ | ||
| 805 | 808 | |
| 806 | 809 | $(OBJDIR)/leaf.o: $(OBJDIR)/leaf_.c $(OBJDIR)/leaf.h $(SRCDIR)/config.h |
| 807 | 810 | $(XTCC) -o $(OBJDIR)/leaf.o -c $(OBJDIR)/leaf_.c |
| 808 | 811 | |
| 809 | 812 | $(OBJDIR)/leaf.h: $(OBJDIR)/headers |
| 813 | +$(OBJDIR)/loadctrl_.c: $(SRCDIR)/loadctrl.c $(OBJDIR)/translate | |
| 814 | + $(OBJDIR)/translate $(SRCDIR)/loadctrl.c >$(OBJDIR)/loadctrl_.c | |
| 815 | + | |
| 816 | +$(OBJDIR)/loadctrl.o: $(OBJDIR)/loadctrl_.c $(OBJDIR)/loadctrl.h $(SRCDIR)/config.h | |
| 817 | + $(XTCC) -o $(OBJDIR)/loadctrl.o -c $(OBJDIR)/loadctrl_.c | |
| 818 | + | |
| 819 | +$(OBJDIR)/loadctrl.h: $(OBJDIR)/headers | |
| 810 | 820 | $(OBJDIR)/login_.c: $(SRCDIR)/login.c $(OBJDIR)/translate |
| 811 | 821 | $(OBJDIR)/translate $(SRCDIR)/login.c >$(OBJDIR)/login_.c |
| 812 | 822 | |
| 813 | 823 | $(OBJDIR)/login.o: $(OBJDIR)/login_.c $(OBJDIR)/login.h $(SRCDIR)/config.h |
| 814 | 824 | $(XTCC) -o $(OBJDIR)/login.o -c $(OBJDIR)/login_.c |
| 815 | 825 |
| --- src/main.mk | |
| +++ src/main.mk | |
| @@ -66,10 +66,11 @@ | |
| 66 | $(SRCDIR)/json_tag.c \ |
| 67 | $(SRCDIR)/json_timeline.c \ |
| 68 | $(SRCDIR)/json_user.c \ |
| 69 | $(SRCDIR)/json_wiki.c \ |
| 70 | $(SRCDIR)/leaf.c \ |
| 71 | $(SRCDIR)/login.c \ |
| 72 | $(SRCDIR)/lookslike.c \ |
| 73 | $(SRCDIR)/main.c \ |
| 74 | $(SRCDIR)/manifest.c \ |
| 75 | $(SRCDIR)/markdown.c \ |
| @@ -176,10 +177,11 @@ | |
| 176 | $(OBJDIR)/json_tag_.c \ |
| 177 | $(OBJDIR)/json_timeline_.c \ |
| 178 | $(OBJDIR)/json_user_.c \ |
| 179 | $(OBJDIR)/json_wiki_.c \ |
| 180 | $(OBJDIR)/leaf_.c \ |
| 181 | $(OBJDIR)/login_.c \ |
| 182 | $(OBJDIR)/lookslike_.c \ |
| 183 | $(OBJDIR)/main_.c \ |
| 184 | $(OBJDIR)/manifest_.c \ |
| 185 | $(OBJDIR)/markdown_.c \ |
| @@ -286,10 +288,11 @@ | |
| 286 | $(OBJDIR)/json_tag.o \ |
| 287 | $(OBJDIR)/json_timeline.o \ |
| 288 | $(OBJDIR)/json_user.o \ |
| 289 | $(OBJDIR)/json_wiki.o \ |
| 290 | $(OBJDIR)/leaf.o \ |
| 291 | $(OBJDIR)/login.o \ |
| 292 | $(OBJDIR)/lookslike.o \ |
| 293 | $(OBJDIR)/main.o \ |
| 294 | $(OBJDIR)/manifest.o \ |
| 295 | $(OBJDIR)/markdown.o \ |
| @@ -422,11 +425,11 @@ | |
| 422 | |
| 423 | |
| 424 | $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex |
| 425 | $(OBJDIR)/mkindex $(TRANS_SRC) >$@ |
| 426 | $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h |
| 427 | $(OBJDIR)/makeheaders $(OBJDIR)/add_.c:$(OBJDIR)/add.h $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h $(OBJDIR)/clone_.c:$(OBJDIR)/clone.h $(OBJDIR)/comformat_.c:$(OBJDIR)/comformat.h $(OBJDIR)/configure_.c:$(OBJDIR)/configure.h $(OBJDIR)/content_.c:$(OBJDIR)/content.h $(OBJDIR)/db_.c:$(OBJDIR)/db.h $(OBJDIR)/delta_.c:$(OBJDIR)/delta.h $(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h $(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h $(OBJDIR)/diff_.c:$(OBJDIR)/diff.h $(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h $(OBJDIR)/doc_.c:$(OBJDIR)/doc.h $(OBJDIR)/encode_.c:$(OBJDIR)/encode.h $(OBJDIR)/event_.c:$(OBJDIR)/event.h $(OBJDIR)/export_.c:$(OBJDIR)/export.h $(OBJDIR)/file_.c:$(OBJDIR)/file.h $(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h $(OBJDIR)/http_.c:$(OBJDIR)/http.h $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h $(OBJDIR)/import_.c:$(OBJDIR)/import.h $(OBJDIR)/info_.c:$(OBJDIR)/info.h $(OBJDIR)/json_.c:$(OBJDIR)/json.h $(OBJDIR)/json_artifact_.c:$(OBJDIR)/json_artifact.h $(OBJDIR)/json_branch_.c:$(OBJDIR)/json_branch.h $(OBJDIR)/json_config_.c:$(OBJDIR)/json_config.h $(OBJDIR)/json_diff_.c:$(OBJDIR)/json_diff.h $(OBJDIR)/json_dir_.c:$(OBJDIR)/json_dir.h $(OBJDIR)/json_finfo_.c:$(OBJDIR)/json_finfo.h $(OBJDIR)/json_login_.c:$(OBJDIR)/json_login.h $(OBJDIR)/json_query_.c:$(OBJDIR)/json_query.h $(OBJDIR)/json_report_.c:$(OBJDIR)/json_report.h $(OBJDIR)/json_status_.c:$(OBJDIR)/json_status.h $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h $(OBJDIR)/login_.c:$(OBJDIR)/login.h $(OBJDIR)/lookslike_.c:$(OBJDIR)/lookslike.h $(OBJDIR)/main_.c:$(OBJDIR)/main.h $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h $(OBJDIR)/markdown_.c:$(OBJDIR)/markdown.h $(OBJDIR)/markdown_html_.c:$(OBJDIR)/markdown_html.h $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.h $(OBJDIR)/moderate_.c:$(OBJDIR)/moderate.h $(OBJDIR)/name_.c:$(OBJDIR)/name.h $(OBJDIR)/path_.c:$(OBJDIR)/path.h $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h $(OBJDIR)/regexp_.c:$(OBJDIR)/regexp.h $(OBJDIR)/report_.c:$(OBJDIR)/report.h $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h $(OBJDIR)/search_.c:$(OBJDIR)/search.h $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h $(OBJDIR)/sha1_.c:$(OBJDIR)/sha1.h $(OBJDIR)/shun_.c:$(OBJDIR)/shun.h $(OBJDIR)/skins_.c:$(OBJDIR)/skins.h $(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h $(OBJDIR)/stash_.c:$(OBJDIR)/stash.h $(OBJDIR)/stat_.c:$(OBJDIR)/stat.h $(OBJDIR)/style_.c:$(OBJDIR)/style.h $(OBJDIR)/sync_.c:$(OBJDIR)/sync.h $(OBJDIR)/tag_.c:$(OBJDIR)/tag.h $(OBJDIR)/tar_.c:$(OBJDIR)/tar.h $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h $(OBJDIR)/unicode_.c:$(OBJDIR)/unicode.h $(OBJDIR)/update_.c:$(OBJDIR)/update.h $(OBJDIR)/url_.c:$(OBJDIR)/url.h $(OBJDIR)/user_.c:$(OBJDIR)/user.h $(OBJDIR)/utf8_.c:$(OBJDIR)/utf8.h $(OBJDIR)/util_.c:$(OBJDIR)/util.h $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h $(OBJDIR)/vfile_.c:$(OBJDIR)/vfile.h $(OBJDIR)/wiki_.c:$(OBJDIR)/wiki.h $(OBJDIR)/wikiformat_.c:$(OBJDIR)/wikiformat.h $(OBJDIR)/winfile_.c:$(OBJDIR)/winfile.h $(OBJDIR)/winhttp_.c:$(OBJDIR)/winhttp.h $(OBJDIR)/wysiwyg_.c:$(OBJDIR)/wysiwyg.h $(OBJDIR)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/xfersetup_.c:$(OBJDIR)/xfersetup.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h |
| 428 | touch $(OBJDIR)/headers |
| 429 | $(OBJDIR)/headers: Makefile |
| 430 | $(OBJDIR)/json.o $(OBJDIR)/json_artifact.o $(OBJDIR)/json_branch.o $(OBJDIR)/json_config.o $(OBJDIR)/json_diff.o $(OBJDIR)/json_dir.o $(OBJDIR)/json_finfo.o $(OBJDIR)/json_login.o $(OBJDIR)/json_query.o $(OBJDIR)/json_report.o $(OBJDIR)/json_status.o $(OBJDIR)/json_tag.o $(OBJDIR)/json_timeline.o $(OBJDIR)/json_user.o $(OBJDIR)/json_wiki.o : $(SRCDIR)/json_detail.h |
| 431 | Makefile: |
| 432 | $(OBJDIR)/add_.c: $(SRCDIR)/add.c $(OBJDIR)/translate |
| @@ -805,10 +808,17 @@ | |
| 805 | |
| 806 | $(OBJDIR)/leaf.o: $(OBJDIR)/leaf_.c $(OBJDIR)/leaf.h $(SRCDIR)/config.h |
| 807 | $(XTCC) -o $(OBJDIR)/leaf.o -c $(OBJDIR)/leaf_.c |
| 808 | |
| 809 | $(OBJDIR)/leaf.h: $(OBJDIR)/headers |
| 810 | $(OBJDIR)/login_.c: $(SRCDIR)/login.c $(OBJDIR)/translate |
| 811 | $(OBJDIR)/translate $(SRCDIR)/login.c >$(OBJDIR)/login_.c |
| 812 | |
| 813 | $(OBJDIR)/login.o: $(OBJDIR)/login_.c $(OBJDIR)/login.h $(SRCDIR)/config.h |
| 814 | $(XTCC) -o $(OBJDIR)/login.o -c $(OBJDIR)/login_.c |
| 815 |
| --- src/main.mk | |
| +++ src/main.mk | |
| @@ -66,10 +66,11 @@ | |
| 66 | $(SRCDIR)/json_tag.c \ |
| 67 | $(SRCDIR)/json_timeline.c \ |
| 68 | $(SRCDIR)/json_user.c \ |
| 69 | $(SRCDIR)/json_wiki.c \ |
| 70 | $(SRCDIR)/leaf.c \ |
| 71 | $(SRCDIR)/loadctrl.c \ |
| 72 | $(SRCDIR)/login.c \ |
| 73 | $(SRCDIR)/lookslike.c \ |
| 74 | $(SRCDIR)/main.c \ |
| 75 | $(SRCDIR)/manifest.c \ |
| 76 | $(SRCDIR)/markdown.c \ |
| @@ -176,10 +177,11 @@ | |
| 177 | $(OBJDIR)/json_tag_.c \ |
| 178 | $(OBJDIR)/json_timeline_.c \ |
| 179 | $(OBJDIR)/json_user_.c \ |
| 180 | $(OBJDIR)/json_wiki_.c \ |
| 181 | $(OBJDIR)/leaf_.c \ |
| 182 | $(OBJDIR)/loadctrl_.c \ |
| 183 | $(OBJDIR)/login_.c \ |
| 184 | $(OBJDIR)/lookslike_.c \ |
| 185 | $(OBJDIR)/main_.c \ |
| 186 | $(OBJDIR)/manifest_.c \ |
| 187 | $(OBJDIR)/markdown_.c \ |
| @@ -286,10 +288,11 @@ | |
| 288 | $(OBJDIR)/json_tag.o \ |
| 289 | $(OBJDIR)/json_timeline.o \ |
| 290 | $(OBJDIR)/json_user.o \ |
| 291 | $(OBJDIR)/json_wiki.o \ |
| 292 | $(OBJDIR)/leaf.o \ |
| 293 | $(OBJDIR)/loadctrl.o \ |
| 294 | $(OBJDIR)/login.o \ |
| 295 | $(OBJDIR)/lookslike.o \ |
| 296 | $(OBJDIR)/main.o \ |
| 297 | $(OBJDIR)/manifest.o \ |
| 298 | $(OBJDIR)/markdown.o \ |
| @@ -422,11 +425,11 @@ | |
| 425 | |
| 426 | |
| 427 | $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex |
| 428 | $(OBJDIR)/mkindex $(TRANS_SRC) >$@ |
| 429 | $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h |
| 430 | $(OBJDIR)/makeheaders $(OBJDIR)/add_.c:$(OBJDIR)/add.h $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h $(OBJDIR)/clone_.c:$(OBJDIR)/clone.h $(OBJDIR)/comformat_.c:$(OBJDIR)/comformat.h $(OBJDIR)/configure_.c:$(OBJDIR)/configure.h $(OBJDIR)/content_.c:$(OBJDIR)/content.h $(OBJDIR)/db_.c:$(OBJDIR)/db.h $(OBJDIR)/delta_.c:$(OBJDIR)/delta.h $(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h $(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h $(OBJDIR)/diff_.c:$(OBJDIR)/diff.h $(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h $(OBJDIR)/doc_.c:$(OBJDIR)/doc.h $(OBJDIR)/encode_.c:$(OBJDIR)/encode.h $(OBJDIR)/event_.c:$(OBJDIR)/event.h $(OBJDIR)/export_.c:$(OBJDIR)/export.h $(OBJDIR)/file_.c:$(OBJDIR)/file.h $(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h $(OBJDIR)/http_.c:$(OBJDIR)/http.h $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h $(OBJDIR)/import_.c:$(OBJDIR)/import.h $(OBJDIR)/info_.c:$(OBJDIR)/info.h $(OBJDIR)/json_.c:$(OBJDIR)/json.h $(OBJDIR)/json_artifact_.c:$(OBJDIR)/json_artifact.h $(OBJDIR)/json_branch_.c:$(OBJDIR)/json_branch.h $(OBJDIR)/json_config_.c:$(OBJDIR)/json_config.h $(OBJDIR)/json_diff_.c:$(OBJDIR)/json_diff.h $(OBJDIR)/json_dir_.c:$(OBJDIR)/json_dir.h $(OBJDIR)/json_finfo_.c:$(OBJDIR)/json_finfo.h $(OBJDIR)/json_login_.c:$(OBJDIR)/json_login.h $(OBJDIR)/json_query_.c:$(OBJDIR)/json_query.h $(OBJDIR)/json_report_.c:$(OBJDIR)/json_report.h $(OBJDIR)/json_status_.c:$(OBJDIR)/json_status.h $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h $(OBJDIR)/loadctrl_.c:$(OBJDIR)/loadctrl.h $(OBJDIR)/login_.c:$(OBJDIR)/login.h $(OBJDIR)/lookslike_.c:$(OBJDIR)/lookslike.h $(OBJDIR)/main_.c:$(OBJDIR)/main.h $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h $(OBJDIR)/markdown_.c:$(OBJDIR)/markdown.h $(OBJDIR)/markdown_html_.c:$(OBJDIR)/markdown_html.h $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.h $(OBJDIR)/moderate_.c:$(OBJDIR)/moderate.h $(OBJDIR)/name_.c:$(OBJDIR)/name.h $(OBJDIR)/path_.c:$(OBJDIR)/path.h $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h $(OBJDIR)/regexp_.c:$(OBJDIR)/regexp.h $(OBJDIR)/report_.c:$(OBJDIR)/report.h $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h $(OBJDIR)/search_.c:$(OBJDIR)/search.h $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h $(OBJDIR)/sha1_.c:$(OBJDIR)/sha1.h $(OBJDIR)/shun_.c:$(OBJDIR)/shun.h $(OBJDIR)/skins_.c:$(OBJDIR)/skins.h $(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h $(OBJDIR)/stash_.c:$(OBJDIR)/stash.h $(OBJDIR)/stat_.c:$(OBJDIR)/stat.h $(OBJDIR)/style_.c:$(OBJDIR)/style.h $(OBJDIR)/sync_.c:$(OBJDIR)/sync.h $(OBJDIR)/tag_.c:$(OBJDIR)/tag.h $(OBJDIR)/tar_.c:$(OBJDIR)/tar.h $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h $(OBJDIR)/unicode_.c:$(OBJDIR)/unicode.h $(OBJDIR)/update_.c:$(OBJDIR)/update.h $(OBJDIR)/url_.c:$(OBJDIR)/url.h $(OBJDIR)/user_.c:$(OBJDIR)/user.h $(OBJDIR)/utf8_.c:$(OBJDIR)/utf8.h $(OBJDIR)/util_.c:$(OBJDIR)/util.h $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h $(OBJDIR)/vfile_.c:$(OBJDIR)/vfile.h $(OBJDIR)/wiki_.c:$(OBJDIR)/wiki.h $(OBJDIR)/wikiformat_.c:$(OBJDIR)/wikiformat.h $(OBJDIR)/winfile_.c:$(OBJDIR)/winfile.h $(OBJDIR)/winhttp_.c:$(OBJDIR)/winhttp.h $(OBJDIR)/wysiwyg_.c:$(OBJDIR)/wysiwyg.h $(OBJDIR)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/xfersetup_.c:$(OBJDIR)/xfersetup.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h |
| 431 | touch $(OBJDIR)/headers |
| 432 | $(OBJDIR)/headers: Makefile |
| 433 | $(OBJDIR)/json.o $(OBJDIR)/json_artifact.o $(OBJDIR)/json_branch.o $(OBJDIR)/json_config.o $(OBJDIR)/json_diff.o $(OBJDIR)/json_dir.o $(OBJDIR)/json_finfo.o $(OBJDIR)/json_login.o $(OBJDIR)/json_query.o $(OBJDIR)/json_report.o $(OBJDIR)/json_status.o $(OBJDIR)/json_tag.o $(OBJDIR)/json_timeline.o $(OBJDIR)/json_user.o $(OBJDIR)/json_wiki.o : $(SRCDIR)/json_detail.h |
| 434 | Makefile: |
| 435 | $(OBJDIR)/add_.c: $(SRCDIR)/add.c $(OBJDIR)/translate |
| @@ -805,10 +808,17 @@ | |
| 808 | |
| 809 | $(OBJDIR)/leaf.o: $(OBJDIR)/leaf_.c $(OBJDIR)/leaf.h $(SRCDIR)/config.h |
| 810 | $(XTCC) -o $(OBJDIR)/leaf.o -c $(OBJDIR)/leaf_.c |
| 811 | |
| 812 | $(OBJDIR)/leaf.h: $(OBJDIR)/headers |
| 813 | $(OBJDIR)/loadctrl_.c: $(SRCDIR)/loadctrl.c $(OBJDIR)/translate |
| 814 | $(OBJDIR)/translate $(SRCDIR)/loadctrl.c >$(OBJDIR)/loadctrl_.c |
| 815 | |
| 816 | $(OBJDIR)/loadctrl.o: $(OBJDIR)/loadctrl_.c $(OBJDIR)/loadctrl.h $(SRCDIR)/config.h |
| 817 | $(XTCC) -o $(OBJDIR)/loadctrl.o -c $(OBJDIR)/loadctrl_.c |
| 818 | |
| 819 | $(OBJDIR)/loadctrl.h: $(OBJDIR)/headers |
| 820 | $(OBJDIR)/login_.c: $(SRCDIR)/login.c $(OBJDIR)/translate |
| 821 | $(OBJDIR)/translate $(SRCDIR)/login.c >$(OBJDIR)/login_.c |
| 822 | |
| 823 | $(OBJDIR)/login.o: $(OBJDIR)/login_.c $(OBJDIR)/login.h $(SRCDIR)/config.h |
| 824 | $(XTCC) -o $(OBJDIR)/login.o -c $(OBJDIR)/login_.c |
| 825 |
+1
| --- src/makemake.tcl | ||
| +++ src/makemake.tcl | ||
| @@ -69,10 +69,11 @@ | ||
| 69 | 69 | json_tag |
| 70 | 70 | json_timeline |
| 71 | 71 | json_user |
| 72 | 72 | json_wiki |
| 73 | 73 | leaf |
| 74 | + loadctrl | |
| 74 | 75 | login |
| 75 | 76 | lookslike |
| 76 | 77 | main |
| 77 | 78 | manifest |
| 78 | 79 | markdown |
| 79 | 80 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -69,10 +69,11 @@ | |
| 69 | json_tag |
| 70 | json_timeline |
| 71 | json_user |
| 72 | json_wiki |
| 73 | leaf |
| 74 | login |
| 75 | lookslike |
| 76 | main |
| 77 | manifest |
| 78 | markdown |
| 79 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -69,10 +69,11 @@ | |
| 69 | json_tag |
| 70 | json_timeline |
| 71 | json_user |
| 72 | json_wiki |
| 73 | leaf |
| 74 | loadctrl |
| 75 | login |
| 76 | lookslike |
| 77 | main |
| 78 | manifest |
| 79 | markdown |
| 80 |
+13
-1
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -962,10 +962,21 @@ | ||
| 962 | 962 | @ <p>Fossil tries to spend less than this many seconds gathering |
| 963 | 963 | @ the out-bound data of sync, clone, and pull packets. |
| 964 | 964 | @ If the client request takes longer, a partial reply is given similar |
| 965 | 965 | @ to the download packet limit. 30s is a reasonable default.</p> |
| 966 | 966 | |
| 967 | + @ <hr /> | |
| 968 | + entry_attribute("Server Load Average Limit", 11, "max-loadavg", "mxldavg", | |
| 969 | + "0.0", 0); | |
| 970 | + @ <p>Some expensive operations (such as computing tarballs, zip archives, | |
| 971 | + @ or annotation/blame pages) are prohibited if the load average on the host | |
| 972 | + @ computer is too large. Set the threshold for disallowing expensive | |
| 973 | + @ computations here. Set this to 0.0 to disable the load average limit. | |
| 974 | + @ This limit is only enforced on Unix servers. On Linux systems, | |
| 975 | + @ access to the /proc virtual filesystem is required, which means this limit | |
| 976 | + @ might not work inside a chroot() jail.</p> | |
| 977 | + | |
| 967 | 978 | @ <hr /> |
| 968 | 979 | onoff_attribute( |
| 969 | 980 | "Enable hyperlinks for \"nobody\" based on User-Agent and Javascript", |
| 970 | 981 | "auto-hyperlink", "autohyperlink", 1, 0); |
| 971 | 982 | @ <p>Enable hyperlinks (the equivalent of the "h" permission) for all users |
| @@ -973,11 +984,12 @@ | ||
| 973 | 984 | @ HTTP header indicates that the request is coming from an actual human |
| 974 | 985 | @ being and not a a robot or spider and (2) the user agent is able to |
| 975 | 986 | @ run Javascript in order to set the href= attribute of hyperlinks. Bots |
| 976 | 987 | @ and spiders can forge a User-Agent string that makes them seem to be a |
| 977 | 988 | @ normal browser and they can run javascript just like browsers. But most |
| 978 | - @ bots do not go to that much trouble so this is normally an effective defense.</p> | |
| 989 | + @ bots do not go to that much trouble so this is normally an effective | |
| 990 | + @ defense.</p> | |
| 979 | 991 | @ |
| 980 | 992 | @ <p>You do not normally want a bot to walk your entire repository because |
| 981 | 993 | @ if it does, your server will end up computing diffs and annotations for |
| 982 | 994 | @ every historical version of every file and creating ZIPs and tarballs of |
| 983 | 995 | @ every historical check-in, which can use a lot of CPU and bandwidth |
| 984 | 996 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -962,10 +962,21 @@ | |
| 962 | @ <p>Fossil tries to spend less than this many seconds gathering |
| 963 | @ the out-bound data of sync, clone, and pull packets. |
| 964 | @ If the client request takes longer, a partial reply is given similar |
| 965 | @ to the download packet limit. 30s is a reasonable default.</p> |
| 966 | |
| 967 | @ <hr /> |
| 968 | onoff_attribute( |
| 969 | "Enable hyperlinks for \"nobody\" based on User-Agent and Javascript", |
| 970 | "auto-hyperlink", "autohyperlink", 1, 0); |
| 971 | @ <p>Enable hyperlinks (the equivalent of the "h" permission) for all users |
| @@ -973,11 +984,12 @@ | |
| 973 | @ HTTP header indicates that the request is coming from an actual human |
| 974 | @ being and not a a robot or spider and (2) the user agent is able to |
| 975 | @ run Javascript in order to set the href= attribute of hyperlinks. Bots |
| 976 | @ and spiders can forge a User-Agent string that makes them seem to be a |
| 977 | @ normal browser and they can run javascript just like browsers. But most |
| 978 | @ bots do not go to that much trouble so this is normally an effective defense.</p> |
| 979 | @ |
| 980 | @ <p>You do not normally want a bot to walk your entire repository because |
| 981 | @ if it does, your server will end up computing diffs and annotations for |
| 982 | @ every historical version of every file and creating ZIPs and tarballs of |
| 983 | @ every historical check-in, which can use a lot of CPU and bandwidth |
| 984 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -962,10 +962,21 @@ | |
| 962 | @ <p>Fossil tries to spend less than this many seconds gathering |
| 963 | @ the out-bound data of sync, clone, and pull packets. |
| 964 | @ If the client request takes longer, a partial reply is given similar |
| 965 | @ to the download packet limit. 30s is a reasonable default.</p> |
| 966 | |
| 967 | @ <hr /> |
| 968 | entry_attribute("Server Load Average Limit", 11, "max-loadavg", "mxldavg", |
| 969 | "0.0", 0); |
| 970 | @ <p>Some expensive operations (such as computing tarballs, zip archives, |
| 971 | @ or annotation/blame pages) are prohibited if the load average on the host |
| 972 | @ computer is too large. Set the threshold for disallowing expensive |
| 973 | @ computations here. Set this to 0.0 to disable the load average limit. |
| 974 | @ This limit is only enforced on Unix servers. On Linux systems, |
| 975 | @ access to the /proc virtual filesystem is required, which means this limit |
| 976 | @ might not work inside a chroot() jail.</p> |
| 977 | |
| 978 | @ <hr /> |
| 979 | onoff_attribute( |
| 980 | "Enable hyperlinks for \"nobody\" based on User-Agent and Javascript", |
| 981 | "auto-hyperlink", "autohyperlink", 1, 0); |
| 982 | @ <p>Enable hyperlinks (the equivalent of the "h" permission) for all users |
| @@ -973,11 +984,12 @@ | |
| 984 | @ HTTP header indicates that the request is coming from an actual human |
| 985 | @ being and not a a robot or spider and (2) the user agent is able to |
| 986 | @ run Javascript in order to set the href= attribute of hyperlinks. Bots |
| 987 | @ and spiders can forge a User-Agent string that makes them seem to be a |
| 988 | @ normal browser and they can run javascript just like browsers. But most |
| 989 | @ bots do not go to that much trouble so this is normally an effective |
| 990 | @ defense.</p> |
| 991 | @ |
| 992 | @ <p>You do not normally want a bot to walk your entire repository because |
| 993 | @ if it does, your server will end up computing diffs and annotations for |
| 994 | @ every historical version of every file and creating ZIPs and tarballs of |
| 995 | @ every historical check-in, which can use a lot of CPU and bandwidth |
| 996 |
+23
-16
| --- src/sqlite3.c | ||
| +++ src/sqlite3.c | ||
| @@ -1,8 +1,8 @@ | ||
| 1 | 1 | /****************************************************************************** |
| 2 | 2 | ** This file is an amalgamation of many separate C source files from SQLite |
| 3 | -** version 3.8.4. By combining all the individual C code files into this | |
| 3 | +** version 3.8.4.1. By combining all the individual C code files into this | |
| 4 | 4 | ** single large file, the entire code can be compiled as a single translation |
| 5 | 5 | ** unit. This allows many compilers to do optimizations that would not be |
| 6 | 6 | ** possible if the files were compiled separately. Performance improvements |
| 7 | 7 | ** of 5% or more are commonly seen when SQLite is compiled as a single |
| 8 | 8 | ** translation unit. |
| @@ -220,13 +220,13 @@ | ||
| 220 | 220 | ** |
| 221 | 221 | ** See also: [sqlite3_libversion()], |
| 222 | 222 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 223 | 223 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 224 | 224 | */ |
| 225 | -#define SQLITE_VERSION "3.8.4" | |
| 225 | +#define SQLITE_VERSION "3.8.4.1" | |
| 226 | 226 | #define SQLITE_VERSION_NUMBER 3008004 |
| 227 | -#define SQLITE_SOURCE_ID "2014-03-06 13:38:37 0a4200f95cf46ad620b9fd91f4444114a0c74730" | |
| 227 | +#define SQLITE_SOURCE_ID "2014-03-11 15:27:36 018d317b1257ce68a92908b05c9c7cf1494050d0" | |
| 228 | 228 | |
| 229 | 229 | /* |
| 230 | 230 | ** CAPI3REF: Run-Time Library Version Numbers |
| 231 | 231 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 232 | 232 | ** |
| @@ -9428,15 +9428,17 @@ | ||
| 9428 | 9428 | SQLITE_PRIVATE void sqlite3VdbeSetLineNumber(Vdbe*,int); |
| 9429 | 9429 | # define VdbeCoverage(v) sqlite3VdbeSetLineNumber(v,__LINE__) |
| 9430 | 9430 | # define VdbeCoverageIf(v,x) if(x)sqlite3VdbeSetLineNumber(v,__LINE__) |
| 9431 | 9431 | # define VdbeCoverageAlwaysTaken(v) sqlite3VdbeSetLineNumber(v,2); |
| 9432 | 9432 | # define VdbeCoverageNeverTaken(v) sqlite3VdbeSetLineNumber(v,1); |
| 9433 | +# define VDBE_OFFSET_LINENO(x) (__LINE__+x) | |
| 9433 | 9434 | #else |
| 9434 | 9435 | # define VdbeCoverage(v) |
| 9435 | 9436 | # define VdbeCoverageIf(v,x) |
| 9436 | 9437 | # define VdbeCoverageAlwaysTaken(v) |
| 9437 | 9438 | # define VdbeCoverageNeverTaken(v) |
| 9439 | +# define VDBE_OFFSET_LINENO(x) 0 | |
| 9438 | 9440 | #endif |
| 9439 | 9441 | |
| 9440 | 9442 | #endif |
| 9441 | 9443 | |
| 9442 | 9444 | /************** End of vdbe.h ************************************************/ |
| @@ -44422,19 +44424,21 @@ | ||
| 44422 | 44424 | */ |
| 44423 | 44425 | rc = sqlite3OsCheckReservedLock(pPager->fd, &locked); |
| 44424 | 44426 | if( rc==SQLITE_OK && !locked ){ |
| 44425 | 44427 | Pgno nPage; /* Number of pages in database file */ |
| 44426 | 44428 | |
| 44427 | - /* Check the size of the database file. If it consists of 0 pages, | |
| 44428 | - ** then delete the journal file. See the header comment above for | |
| 44429 | - ** the reasoning here. Delete the obsolete journal file under | |
| 44430 | - ** a RESERVED lock to avoid race conditions and to avoid violating | |
| 44431 | - ** [H33020]. | |
| 44432 | - */ | |
| 44433 | 44429 | rc = pagerPagecount(pPager, &nPage); |
| 44434 | 44430 | if( rc==SQLITE_OK ){ |
| 44435 | - if( nPage==0 ){ | |
| 44431 | + /* If the database is zero pages in size, that means that either (1) the | |
| 44432 | + ** journal is a remnant from a prior database with the same name where | |
| 44433 | + ** the database file but not the journal was deleted, or (2) the initial | |
| 44434 | + ** transaction that populates a new database is being rolled back. | |
| 44435 | + ** In either case, the journal file can be deleted. However, take care | |
| 44436 | + ** not to delete the journal file if it is already open due to | |
| 44437 | + ** journal_mode=PERSIST. | |
| 44438 | + */ | |
| 44439 | + if( nPage==0 && !jrnlOpen ){ | |
| 44436 | 44440 | sqlite3BeginBenignMalloc(); |
| 44437 | 44441 | if( pagerLockDb(pPager, RESERVED_LOCK)==SQLITE_OK ){ |
| 44438 | 44442 | sqlite3OsDelete(pVfs, pPager->zJournal, 0); |
| 44439 | 44443 | if( !pPager->exclusiveMode ) pagerUnlockDb(pPager, SHARED_LOCK); |
| 44440 | 44444 | } |
| @@ -73588,11 +73592,11 @@ | ||
| 73588 | 73592 | ** |
| 73589 | 73593 | ** The sqlite3_blob_close() function finalizes the vdbe program, |
| 73590 | 73594 | ** which closes the b-tree cursor and (possibly) commits the |
| 73591 | 73595 | ** transaction. |
| 73592 | 73596 | */ |
| 73593 | - static const int iLn = __LINE__+4; | |
| 73597 | + static const int iLn = VDBE_OFFSET_LINENO(4); | |
| 73594 | 73598 | static const VdbeOpList openBlob[] = { |
| 73595 | 73599 | /* {OP_Transaction, 0, 0, 0}, // 0: Inserted separately */ |
| 73596 | 73600 | {OP_TableLock, 0, 0, 0}, /* 1: Acquire a read or write lock */ |
| 73597 | 73601 | /* One of the following two instructions is replaced by an OP_Noop. */ |
| 73598 | 73602 | {OP_OpenRead, 0, 0, 0}, /* 2: Open cursor 0 for reading */ |
| @@ -91334,11 +91338,11 @@ | ||
| 91334 | 91338 | int argc, |
| 91335 | 91339 | sqlite3_value **argv |
| 91336 | 91340 | ){ |
| 91337 | 91341 | unsigned char *z, *zOut; |
| 91338 | 91342 | int i; |
| 91339 | - zOut = z = sqlite3_malloc( argc*4 ); | |
| 91343 | + zOut = z = sqlite3_malloc( argc*4+1 ); | |
| 91340 | 91344 | if( z==0 ){ |
| 91341 | 91345 | sqlite3_result_error_nomem(context); |
| 91342 | 91346 | return; |
| 91343 | 91347 | } |
| 91344 | 91348 | for(i=0; i<argc; i++){ |
| @@ -97661,11 +97665,11 @@ | ||
| 97661 | 97665 | ** is always on by default regardless of the sign of the default cache |
| 97662 | 97666 | ** size. But continue to take the absolute value of the default cache |
| 97663 | 97667 | ** size of historical compatibility. |
| 97664 | 97668 | */ |
| 97665 | 97669 | case PragTyp_DEFAULT_CACHE_SIZE: { |
| 97666 | - static const int iLn = __LINE__+2; | |
| 97670 | + static const int iLn = VDBE_OFFSET_LINENO(2); | |
| 97667 | 97671 | static const VdbeOpList getCacheSize[] = { |
| 97668 | 97672 | { OP_Transaction, 0, 0, 0}, /* 0 */ |
| 97669 | 97673 | { OP_ReadCookie, 0, 1, BTREE_DEFAULT_CACHE_SIZE}, /* 1 */ |
| 97670 | 97674 | { OP_IfPos, 1, 8, 0}, |
| 97671 | 97675 | { OP_Integer, 0, 2, 0}, |
| @@ -97924,11 +97928,11 @@ | ||
| 97924 | 97928 | /* When setting the auto_vacuum mode to either "full" or |
| 97925 | 97929 | ** "incremental", write the value of meta[6] in the database |
| 97926 | 97930 | ** file. Before writing to meta[6], check that meta[3] indicates |
| 97927 | 97931 | ** that this really is an auto-vacuum capable database. |
| 97928 | 97932 | */ |
| 97929 | - static const int iLn = __LINE__+2; | |
| 97933 | + static const int iLn = VDBE_OFFSET_LINENO(2); | |
| 97930 | 97934 | static const VdbeOpList setMeta6[] = { |
| 97931 | 97935 | { OP_Transaction, 0, 1, 0}, /* 0 */ |
| 97932 | 97936 | { OP_ReadCookie, 0, 1, BTREE_LARGEST_ROOT_PAGE}, |
| 97933 | 97937 | { OP_If, 1, 0, 0}, /* 2 */ |
| 97934 | 97938 | { OP_Halt, SQLITE_OK, OE_Abort, 0}, /* 3 */ |
| @@ -98627,11 +98631,11 @@ | ||
| 98627 | 98631 | |
| 98628 | 98632 | /* Code that appears at the end of the integrity check. If no error |
| 98629 | 98633 | ** messages have been generated, output OK. Otherwise output the |
| 98630 | 98634 | ** error message |
| 98631 | 98635 | */ |
| 98632 | - static const int iLn = __LINE__+2; | |
| 98636 | + static const int iLn = VDBE_OFFSET_LINENO(2); | |
| 98633 | 98637 | static const VdbeOpList endCode[] = { |
| 98634 | 98638 | { OP_AddImm, 1, 0, 0}, /* 0 */ |
| 98635 | 98639 | { OP_IfNeg, 1, 0, 0}, /* 1 */ |
| 98636 | 98640 | { OP_String8, 0, 3, 0}, /* 2 */ |
| 98637 | 98641 | { OP_ResultRow, 3, 1, 0}, |
| @@ -106114,11 +106118,11 @@ | ||
| 106114 | 106118 | /* Generate code to destroy the database record of the trigger. |
| 106115 | 106119 | */ |
| 106116 | 106120 | assert( pTable!=0 ); |
| 106117 | 106121 | if( (v = sqlite3GetVdbe(pParse))!=0 ){ |
| 106118 | 106122 | int base; |
| 106119 | - static const int iLn = __LINE__+2; | |
| 106123 | + static const int iLn = VDBE_OFFSET_LINENO(2); | |
| 106120 | 106124 | static const VdbeOpList dropTrigger[] = { |
| 106121 | 106125 | { OP_Rewind, 0, ADDR(9), 0}, |
| 106122 | 106126 | { OP_String8, 0, 1, 0}, /* 1 */ |
| 106123 | 106127 | { OP_Column, 0, 1, 2}, |
| 106124 | 106128 | { OP_Ne, 2, ADDR(8), 1}, |
| @@ -113356,11 +113360,14 @@ | ||
| 113356 | 113360 | pNew->u.btree.nEq++; |
| 113357 | 113361 | pNew->u.btree.nSkip++; |
| 113358 | 113362 | pNew->aLTerm[pNew->nLTerm++] = 0; |
| 113359 | 113363 | pNew->wsFlags |= WHERE_SKIPSCAN; |
| 113360 | 113364 | nIter = sqlite3LogEst(pProbe->aiRowEst[0]/pProbe->aiRowEst[saved_nEq+1]); |
| 113365 | + pNew->rRun = rLogSize + nIter; | |
| 113366 | + pNew->nOut += nIter; | |
| 113361 | 113367 | whereLoopAddBtreeIndex(pBuilder, pSrc, pProbe, nIter); |
| 113368 | + pNew->nOut = saved_nOut; | |
| 113362 | 113369 | } |
| 113363 | 113370 | for(; rc==SQLITE_OK && pTerm!=0; pTerm = whereScanNext(&scan)){ |
| 113364 | 113371 | int nIn = 0; |
| 113365 | 113372 | #ifdef SQLITE_ENABLE_STAT3_OR_STAT4 |
| 113366 | 113373 | int nRecValid = pBuilder->nRecValid; |
| 113367 | 113374 |
| --- src/sqlite3.c | |
| +++ src/sqlite3.c | |
| @@ -1,8 +1,8 @@ | |
| 1 | /****************************************************************************** |
| 2 | ** This file is an amalgamation of many separate C source files from SQLite |
| 3 | ** version 3.8.4. By combining all the individual C code files into this |
| 4 | ** single large file, the entire code can be compiled as a single translation |
| 5 | ** unit. This allows many compilers to do optimizations that would not be |
| 6 | ** possible if the files were compiled separately. Performance improvements |
| 7 | ** of 5% or more are commonly seen when SQLite is compiled as a single |
| 8 | ** translation unit. |
| @@ -220,13 +220,13 @@ | |
| 220 | ** |
| 221 | ** See also: [sqlite3_libversion()], |
| 222 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 223 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 224 | */ |
| 225 | #define SQLITE_VERSION "3.8.4" |
| 226 | #define SQLITE_VERSION_NUMBER 3008004 |
| 227 | #define SQLITE_SOURCE_ID "2014-03-06 13:38:37 0a4200f95cf46ad620b9fd91f4444114a0c74730" |
| 228 | |
| 229 | /* |
| 230 | ** CAPI3REF: Run-Time Library Version Numbers |
| 231 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 232 | ** |
| @@ -9428,15 +9428,17 @@ | |
| 9428 | SQLITE_PRIVATE void sqlite3VdbeSetLineNumber(Vdbe*,int); |
| 9429 | # define VdbeCoverage(v) sqlite3VdbeSetLineNumber(v,__LINE__) |
| 9430 | # define VdbeCoverageIf(v,x) if(x)sqlite3VdbeSetLineNumber(v,__LINE__) |
| 9431 | # define VdbeCoverageAlwaysTaken(v) sqlite3VdbeSetLineNumber(v,2); |
| 9432 | # define VdbeCoverageNeverTaken(v) sqlite3VdbeSetLineNumber(v,1); |
| 9433 | #else |
| 9434 | # define VdbeCoverage(v) |
| 9435 | # define VdbeCoverageIf(v,x) |
| 9436 | # define VdbeCoverageAlwaysTaken(v) |
| 9437 | # define VdbeCoverageNeverTaken(v) |
| 9438 | #endif |
| 9439 | |
| 9440 | #endif |
| 9441 | |
| 9442 | /************** End of vdbe.h ************************************************/ |
| @@ -44422,19 +44424,21 @@ | |
| 44422 | */ |
| 44423 | rc = sqlite3OsCheckReservedLock(pPager->fd, &locked); |
| 44424 | if( rc==SQLITE_OK && !locked ){ |
| 44425 | Pgno nPage; /* Number of pages in database file */ |
| 44426 | |
| 44427 | /* Check the size of the database file. If it consists of 0 pages, |
| 44428 | ** then delete the journal file. See the header comment above for |
| 44429 | ** the reasoning here. Delete the obsolete journal file under |
| 44430 | ** a RESERVED lock to avoid race conditions and to avoid violating |
| 44431 | ** [H33020]. |
| 44432 | */ |
| 44433 | rc = pagerPagecount(pPager, &nPage); |
| 44434 | if( rc==SQLITE_OK ){ |
| 44435 | if( nPage==0 ){ |
| 44436 | sqlite3BeginBenignMalloc(); |
| 44437 | if( pagerLockDb(pPager, RESERVED_LOCK)==SQLITE_OK ){ |
| 44438 | sqlite3OsDelete(pVfs, pPager->zJournal, 0); |
| 44439 | if( !pPager->exclusiveMode ) pagerUnlockDb(pPager, SHARED_LOCK); |
| 44440 | } |
| @@ -73588,11 +73592,11 @@ | |
| 73588 | ** |
| 73589 | ** The sqlite3_blob_close() function finalizes the vdbe program, |
| 73590 | ** which closes the b-tree cursor and (possibly) commits the |
| 73591 | ** transaction. |
| 73592 | */ |
| 73593 | static const int iLn = __LINE__+4; |
| 73594 | static const VdbeOpList openBlob[] = { |
| 73595 | /* {OP_Transaction, 0, 0, 0}, // 0: Inserted separately */ |
| 73596 | {OP_TableLock, 0, 0, 0}, /* 1: Acquire a read or write lock */ |
| 73597 | /* One of the following two instructions is replaced by an OP_Noop. */ |
| 73598 | {OP_OpenRead, 0, 0, 0}, /* 2: Open cursor 0 for reading */ |
| @@ -91334,11 +91338,11 @@ | |
| 91334 | int argc, |
| 91335 | sqlite3_value **argv |
| 91336 | ){ |
| 91337 | unsigned char *z, *zOut; |
| 91338 | int i; |
| 91339 | zOut = z = sqlite3_malloc( argc*4 ); |
| 91340 | if( z==0 ){ |
| 91341 | sqlite3_result_error_nomem(context); |
| 91342 | return; |
| 91343 | } |
| 91344 | for(i=0; i<argc; i++){ |
| @@ -97661,11 +97665,11 @@ | |
| 97661 | ** is always on by default regardless of the sign of the default cache |
| 97662 | ** size. But continue to take the absolute value of the default cache |
| 97663 | ** size of historical compatibility. |
| 97664 | */ |
| 97665 | case PragTyp_DEFAULT_CACHE_SIZE: { |
| 97666 | static const int iLn = __LINE__+2; |
| 97667 | static const VdbeOpList getCacheSize[] = { |
| 97668 | { OP_Transaction, 0, 0, 0}, /* 0 */ |
| 97669 | { OP_ReadCookie, 0, 1, BTREE_DEFAULT_CACHE_SIZE}, /* 1 */ |
| 97670 | { OP_IfPos, 1, 8, 0}, |
| 97671 | { OP_Integer, 0, 2, 0}, |
| @@ -97924,11 +97928,11 @@ | |
| 97924 | /* When setting the auto_vacuum mode to either "full" or |
| 97925 | ** "incremental", write the value of meta[6] in the database |
| 97926 | ** file. Before writing to meta[6], check that meta[3] indicates |
| 97927 | ** that this really is an auto-vacuum capable database. |
| 97928 | */ |
| 97929 | static const int iLn = __LINE__+2; |
| 97930 | static const VdbeOpList setMeta6[] = { |
| 97931 | { OP_Transaction, 0, 1, 0}, /* 0 */ |
| 97932 | { OP_ReadCookie, 0, 1, BTREE_LARGEST_ROOT_PAGE}, |
| 97933 | { OP_If, 1, 0, 0}, /* 2 */ |
| 97934 | { OP_Halt, SQLITE_OK, OE_Abort, 0}, /* 3 */ |
| @@ -98627,11 +98631,11 @@ | |
| 98627 | |
| 98628 | /* Code that appears at the end of the integrity check. If no error |
| 98629 | ** messages have been generated, output OK. Otherwise output the |
| 98630 | ** error message |
| 98631 | */ |
| 98632 | static const int iLn = __LINE__+2; |
| 98633 | static const VdbeOpList endCode[] = { |
| 98634 | { OP_AddImm, 1, 0, 0}, /* 0 */ |
| 98635 | { OP_IfNeg, 1, 0, 0}, /* 1 */ |
| 98636 | { OP_String8, 0, 3, 0}, /* 2 */ |
| 98637 | { OP_ResultRow, 3, 1, 0}, |
| @@ -106114,11 +106118,11 @@ | |
| 106114 | /* Generate code to destroy the database record of the trigger. |
| 106115 | */ |
| 106116 | assert( pTable!=0 ); |
| 106117 | if( (v = sqlite3GetVdbe(pParse))!=0 ){ |
| 106118 | int base; |
| 106119 | static const int iLn = __LINE__+2; |
| 106120 | static const VdbeOpList dropTrigger[] = { |
| 106121 | { OP_Rewind, 0, ADDR(9), 0}, |
| 106122 | { OP_String8, 0, 1, 0}, /* 1 */ |
| 106123 | { OP_Column, 0, 1, 2}, |
| 106124 | { OP_Ne, 2, ADDR(8), 1}, |
| @@ -113356,11 +113360,14 @@ | |
| 113356 | pNew->u.btree.nEq++; |
| 113357 | pNew->u.btree.nSkip++; |
| 113358 | pNew->aLTerm[pNew->nLTerm++] = 0; |
| 113359 | pNew->wsFlags |= WHERE_SKIPSCAN; |
| 113360 | nIter = sqlite3LogEst(pProbe->aiRowEst[0]/pProbe->aiRowEst[saved_nEq+1]); |
| 113361 | whereLoopAddBtreeIndex(pBuilder, pSrc, pProbe, nIter); |
| 113362 | } |
| 113363 | for(; rc==SQLITE_OK && pTerm!=0; pTerm = whereScanNext(&scan)){ |
| 113364 | int nIn = 0; |
| 113365 | #ifdef SQLITE_ENABLE_STAT3_OR_STAT4 |
| 113366 | int nRecValid = pBuilder->nRecValid; |
| 113367 |
| --- src/sqlite3.c | |
| +++ src/sqlite3.c | |
| @@ -1,8 +1,8 @@ | |
| 1 | /****************************************************************************** |
| 2 | ** This file is an amalgamation of many separate C source files from SQLite |
| 3 | ** version 3.8.4.1. By combining all the individual C code files into this |
| 4 | ** single large file, the entire code can be compiled as a single translation |
| 5 | ** unit. This allows many compilers to do optimizations that would not be |
| 6 | ** possible if the files were compiled separately. Performance improvements |
| 7 | ** of 5% or more are commonly seen when SQLite is compiled as a single |
| 8 | ** translation unit. |
| @@ -220,13 +220,13 @@ | |
| 220 | ** |
| 221 | ** See also: [sqlite3_libversion()], |
| 222 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 223 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 224 | */ |
| 225 | #define SQLITE_VERSION "3.8.4.1" |
| 226 | #define SQLITE_VERSION_NUMBER 3008004 |
| 227 | #define SQLITE_SOURCE_ID "2014-03-11 15:27:36 018d317b1257ce68a92908b05c9c7cf1494050d0" |
| 228 | |
| 229 | /* |
| 230 | ** CAPI3REF: Run-Time Library Version Numbers |
| 231 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 232 | ** |
| @@ -9428,15 +9428,17 @@ | |
| 9428 | SQLITE_PRIVATE void sqlite3VdbeSetLineNumber(Vdbe*,int); |
| 9429 | # define VdbeCoverage(v) sqlite3VdbeSetLineNumber(v,__LINE__) |
| 9430 | # define VdbeCoverageIf(v,x) if(x)sqlite3VdbeSetLineNumber(v,__LINE__) |
| 9431 | # define VdbeCoverageAlwaysTaken(v) sqlite3VdbeSetLineNumber(v,2); |
| 9432 | # define VdbeCoverageNeverTaken(v) sqlite3VdbeSetLineNumber(v,1); |
| 9433 | # define VDBE_OFFSET_LINENO(x) (__LINE__+x) |
| 9434 | #else |
| 9435 | # define VdbeCoverage(v) |
| 9436 | # define VdbeCoverageIf(v,x) |
| 9437 | # define VdbeCoverageAlwaysTaken(v) |
| 9438 | # define VdbeCoverageNeverTaken(v) |
| 9439 | # define VDBE_OFFSET_LINENO(x) 0 |
| 9440 | #endif |
| 9441 | |
| 9442 | #endif |
| 9443 | |
| 9444 | /************** End of vdbe.h ************************************************/ |
| @@ -44422,19 +44424,21 @@ | |
| 44424 | */ |
| 44425 | rc = sqlite3OsCheckReservedLock(pPager->fd, &locked); |
| 44426 | if( rc==SQLITE_OK && !locked ){ |
| 44427 | Pgno nPage; /* Number of pages in database file */ |
| 44428 | |
| 44429 | rc = pagerPagecount(pPager, &nPage); |
| 44430 | if( rc==SQLITE_OK ){ |
| 44431 | /* If the database is zero pages in size, that means that either (1) the |
| 44432 | ** journal is a remnant from a prior database with the same name where |
| 44433 | ** the database file but not the journal was deleted, or (2) the initial |
| 44434 | ** transaction that populates a new database is being rolled back. |
| 44435 | ** In either case, the journal file can be deleted. However, take care |
| 44436 | ** not to delete the journal file if it is already open due to |
| 44437 | ** journal_mode=PERSIST. |
| 44438 | */ |
| 44439 | if( nPage==0 && !jrnlOpen ){ |
| 44440 | sqlite3BeginBenignMalloc(); |
| 44441 | if( pagerLockDb(pPager, RESERVED_LOCK)==SQLITE_OK ){ |
| 44442 | sqlite3OsDelete(pVfs, pPager->zJournal, 0); |
| 44443 | if( !pPager->exclusiveMode ) pagerUnlockDb(pPager, SHARED_LOCK); |
| 44444 | } |
| @@ -73588,11 +73592,11 @@ | |
| 73592 | ** |
| 73593 | ** The sqlite3_blob_close() function finalizes the vdbe program, |
| 73594 | ** which closes the b-tree cursor and (possibly) commits the |
| 73595 | ** transaction. |
| 73596 | */ |
| 73597 | static const int iLn = VDBE_OFFSET_LINENO(4); |
| 73598 | static const VdbeOpList openBlob[] = { |
| 73599 | /* {OP_Transaction, 0, 0, 0}, // 0: Inserted separately */ |
| 73600 | {OP_TableLock, 0, 0, 0}, /* 1: Acquire a read or write lock */ |
| 73601 | /* One of the following two instructions is replaced by an OP_Noop. */ |
| 73602 | {OP_OpenRead, 0, 0, 0}, /* 2: Open cursor 0 for reading */ |
| @@ -91334,11 +91338,11 @@ | |
| 91338 | int argc, |
| 91339 | sqlite3_value **argv |
| 91340 | ){ |
| 91341 | unsigned char *z, *zOut; |
| 91342 | int i; |
| 91343 | zOut = z = sqlite3_malloc( argc*4+1 ); |
| 91344 | if( z==0 ){ |
| 91345 | sqlite3_result_error_nomem(context); |
| 91346 | return; |
| 91347 | } |
| 91348 | for(i=0; i<argc; i++){ |
| @@ -97661,11 +97665,11 @@ | |
| 97665 | ** is always on by default regardless of the sign of the default cache |
| 97666 | ** size. But continue to take the absolute value of the default cache |
| 97667 | ** size of historical compatibility. |
| 97668 | */ |
| 97669 | case PragTyp_DEFAULT_CACHE_SIZE: { |
| 97670 | static const int iLn = VDBE_OFFSET_LINENO(2); |
| 97671 | static const VdbeOpList getCacheSize[] = { |
| 97672 | { OP_Transaction, 0, 0, 0}, /* 0 */ |
| 97673 | { OP_ReadCookie, 0, 1, BTREE_DEFAULT_CACHE_SIZE}, /* 1 */ |
| 97674 | { OP_IfPos, 1, 8, 0}, |
| 97675 | { OP_Integer, 0, 2, 0}, |
| @@ -97924,11 +97928,11 @@ | |
| 97928 | /* When setting the auto_vacuum mode to either "full" or |
| 97929 | ** "incremental", write the value of meta[6] in the database |
| 97930 | ** file. Before writing to meta[6], check that meta[3] indicates |
| 97931 | ** that this really is an auto-vacuum capable database. |
| 97932 | */ |
| 97933 | static const int iLn = VDBE_OFFSET_LINENO(2); |
| 97934 | static const VdbeOpList setMeta6[] = { |
| 97935 | { OP_Transaction, 0, 1, 0}, /* 0 */ |
| 97936 | { OP_ReadCookie, 0, 1, BTREE_LARGEST_ROOT_PAGE}, |
| 97937 | { OP_If, 1, 0, 0}, /* 2 */ |
| 97938 | { OP_Halt, SQLITE_OK, OE_Abort, 0}, /* 3 */ |
| @@ -98627,11 +98631,11 @@ | |
| 98631 | |
| 98632 | /* Code that appears at the end of the integrity check. If no error |
| 98633 | ** messages have been generated, output OK. Otherwise output the |
| 98634 | ** error message |
| 98635 | */ |
| 98636 | static const int iLn = VDBE_OFFSET_LINENO(2); |
| 98637 | static const VdbeOpList endCode[] = { |
| 98638 | { OP_AddImm, 1, 0, 0}, /* 0 */ |
| 98639 | { OP_IfNeg, 1, 0, 0}, /* 1 */ |
| 98640 | { OP_String8, 0, 3, 0}, /* 2 */ |
| 98641 | { OP_ResultRow, 3, 1, 0}, |
| @@ -106114,11 +106118,11 @@ | |
| 106118 | /* Generate code to destroy the database record of the trigger. |
| 106119 | */ |
| 106120 | assert( pTable!=0 ); |
| 106121 | if( (v = sqlite3GetVdbe(pParse))!=0 ){ |
| 106122 | int base; |
| 106123 | static const int iLn = VDBE_OFFSET_LINENO(2); |
| 106124 | static const VdbeOpList dropTrigger[] = { |
| 106125 | { OP_Rewind, 0, ADDR(9), 0}, |
| 106126 | { OP_String8, 0, 1, 0}, /* 1 */ |
| 106127 | { OP_Column, 0, 1, 2}, |
| 106128 | { OP_Ne, 2, ADDR(8), 1}, |
| @@ -113356,11 +113360,14 @@ | |
| 113360 | pNew->u.btree.nEq++; |
| 113361 | pNew->u.btree.nSkip++; |
| 113362 | pNew->aLTerm[pNew->nLTerm++] = 0; |
| 113363 | pNew->wsFlags |= WHERE_SKIPSCAN; |
| 113364 | nIter = sqlite3LogEst(pProbe->aiRowEst[0]/pProbe->aiRowEst[saved_nEq+1]); |
| 113365 | pNew->rRun = rLogSize + nIter; |
| 113366 | pNew->nOut += nIter; |
| 113367 | whereLoopAddBtreeIndex(pBuilder, pSrc, pProbe, nIter); |
| 113368 | pNew->nOut = saved_nOut; |
| 113369 | } |
| 113370 | for(; rc==SQLITE_OK && pTerm!=0; pTerm = whereScanNext(&scan)){ |
| 113371 | int nIn = 0; |
| 113372 | #ifdef SQLITE_ENABLE_STAT3_OR_STAT4 |
| 113373 | int nRecValid = pBuilder->nRecValid; |
| 113374 |
+2
-2
| --- src/sqlite3.h | ||
| +++ src/sqlite3.h | ||
| @@ -105,13 +105,13 @@ | ||
| 105 | 105 | ** |
| 106 | 106 | ** See also: [sqlite3_libversion()], |
| 107 | 107 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 108 | 108 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 109 | 109 | */ |
| 110 | -#define SQLITE_VERSION "3.8.4" | |
| 110 | +#define SQLITE_VERSION "3.8.4.1" | |
| 111 | 111 | #define SQLITE_VERSION_NUMBER 3008004 |
| 112 | -#define SQLITE_SOURCE_ID "2014-03-06 13:38:37 0a4200f95cf46ad620b9fd91f4444114a0c74730" | |
| 112 | +#define SQLITE_SOURCE_ID "2014-03-11 15:27:36 018d317b1257ce68a92908b05c9c7cf1494050d0" | |
| 113 | 113 | |
| 114 | 114 | /* |
| 115 | 115 | ** CAPI3REF: Run-Time Library Version Numbers |
| 116 | 116 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 117 | 117 | ** |
| 118 | 118 |
| --- src/sqlite3.h | |
| +++ src/sqlite3.h | |
| @@ -105,13 +105,13 @@ | |
| 105 | ** |
| 106 | ** See also: [sqlite3_libversion()], |
| 107 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 108 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 109 | */ |
| 110 | #define SQLITE_VERSION "3.8.4" |
| 111 | #define SQLITE_VERSION_NUMBER 3008004 |
| 112 | #define SQLITE_SOURCE_ID "2014-03-06 13:38:37 0a4200f95cf46ad620b9fd91f4444114a0c74730" |
| 113 | |
| 114 | /* |
| 115 | ** CAPI3REF: Run-Time Library Version Numbers |
| 116 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 117 | ** |
| 118 |
| --- src/sqlite3.h | |
| +++ src/sqlite3.h | |
| @@ -105,13 +105,13 @@ | |
| 105 | ** |
| 106 | ** See also: [sqlite3_libversion()], |
| 107 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 108 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 109 | */ |
| 110 | #define SQLITE_VERSION "3.8.4.1" |
| 111 | #define SQLITE_VERSION_NUMBER 3008004 |
| 112 | #define SQLITE_SOURCE_ID "2014-03-11 15:27:36 018d317b1257ce68a92908b05c9c7cf1494050d0" |
| 113 | |
| 114 | /* |
| 115 | ** CAPI3REF: Run-Time Library Version Numbers |
| 116 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 117 | ** |
| 118 |
+6
-1
| --- src/stash.c | ||
| +++ src/stash.c | ||
| @@ -199,16 +199,20 @@ | ||
| 199 | 199 | |
| 200 | 200 | /* |
| 201 | 201 | ** Apply a stash to the current check-out. |
| 202 | 202 | */ |
| 203 | 203 | static void stash_apply(int stashid, int nConflict){ |
| 204 | + int vid; | |
| 204 | 205 | Stmt q; |
| 205 | 206 | db_prepare(&q, |
| 206 | 207 | "SELECT rid, isRemoved, isExec, isLink, origname, newname, delta" |
| 207 | 208 | " FROM stashfile WHERE stashid=%d", |
| 208 | 209 | stashid |
| 209 | 210 | ); |
| 211 | + vid = db_lget_int("checkout",0); | |
| 212 | + db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY %s)", | |
| 213 | + filename_collation()); | |
| 210 | 214 | while( db_step(&q)==SQLITE_ROW ){ |
| 211 | 215 | int rid = db_column_int(&q, 0); |
| 212 | 216 | int isRemoved = db_column_int(&q, 1); |
| 213 | 217 | int isExec = db_column_int(&q, 2); |
| 214 | 218 | int isLink = db_column_int(&q, 3); |
| @@ -218,14 +222,14 @@ | ||
| 218 | 222 | char *zNPath = mprintf("%s%s", g.zLocalRoot, zNew); |
| 219 | 223 | Blob delta; |
| 220 | 224 | undo_save(zNew); |
| 221 | 225 | blob_zero(&delta); |
| 222 | 226 | if( rid==0 ){ |
| 227 | + db_multi_exec("INSERT OR IGNORE INTO sfile(x) VALUES(%Q)", zNew); | |
| 223 | 228 | db_ephemeral_blob(&q, 6, &delta); |
| 224 | 229 | blob_write_to_file(&delta, zNPath); |
| 225 | 230 | file_wd_setexe(zNPath, isExec); |
| 226 | - fossil_print("ADD %s\n", zNew); | |
| 227 | 231 | }else if( isRemoved ){ |
| 228 | 232 | fossil_print("DELETE %s\n", zOrig); |
| 229 | 233 | file_delete(zOPath); |
| 230 | 234 | }else{ |
| 231 | 235 | Blob a, b, out, disk; |
| @@ -276,10 +280,11 @@ | ||
| 276 | 280 | if( fossil_strcmp(zOrig,zNew)!=0 ){ |
| 277 | 281 | undo_save(zOrig); |
| 278 | 282 | file_delete(zOPath); |
| 279 | 283 | } |
| 280 | 284 | } |
| 285 | + stash_add_files_in_sfile(vid); | |
| 281 | 286 | db_finalize(&q); |
| 282 | 287 | if( nConflict ){ |
| 283 | 288 | fossil_print( |
| 284 | 289 | "WARNING: %d merge conflicts - see messages above for details.\n", |
| 285 | 290 | nConflict); |
| 286 | 291 |
| --- src/stash.c | |
| +++ src/stash.c | |
| @@ -199,16 +199,20 @@ | |
| 199 | |
| 200 | /* |
| 201 | ** Apply a stash to the current check-out. |
| 202 | */ |
| 203 | static void stash_apply(int stashid, int nConflict){ |
| 204 | Stmt q; |
| 205 | db_prepare(&q, |
| 206 | "SELECT rid, isRemoved, isExec, isLink, origname, newname, delta" |
| 207 | " FROM stashfile WHERE stashid=%d", |
| 208 | stashid |
| 209 | ); |
| 210 | while( db_step(&q)==SQLITE_ROW ){ |
| 211 | int rid = db_column_int(&q, 0); |
| 212 | int isRemoved = db_column_int(&q, 1); |
| 213 | int isExec = db_column_int(&q, 2); |
| 214 | int isLink = db_column_int(&q, 3); |
| @@ -218,14 +222,14 @@ | |
| 218 | char *zNPath = mprintf("%s%s", g.zLocalRoot, zNew); |
| 219 | Blob delta; |
| 220 | undo_save(zNew); |
| 221 | blob_zero(&delta); |
| 222 | if( rid==0 ){ |
| 223 | db_ephemeral_blob(&q, 6, &delta); |
| 224 | blob_write_to_file(&delta, zNPath); |
| 225 | file_wd_setexe(zNPath, isExec); |
| 226 | fossil_print("ADD %s\n", zNew); |
| 227 | }else if( isRemoved ){ |
| 228 | fossil_print("DELETE %s\n", zOrig); |
| 229 | file_delete(zOPath); |
| 230 | }else{ |
| 231 | Blob a, b, out, disk; |
| @@ -276,10 +280,11 @@ | |
| 276 | if( fossil_strcmp(zOrig,zNew)!=0 ){ |
| 277 | undo_save(zOrig); |
| 278 | file_delete(zOPath); |
| 279 | } |
| 280 | } |
| 281 | db_finalize(&q); |
| 282 | if( nConflict ){ |
| 283 | fossil_print( |
| 284 | "WARNING: %d merge conflicts - see messages above for details.\n", |
| 285 | nConflict); |
| 286 |
| --- src/stash.c | |
| +++ src/stash.c | |
| @@ -199,16 +199,20 @@ | |
| 199 | |
| 200 | /* |
| 201 | ** Apply a stash to the current check-out. |
| 202 | */ |
| 203 | static void stash_apply(int stashid, int nConflict){ |
| 204 | int vid; |
| 205 | Stmt q; |
| 206 | db_prepare(&q, |
| 207 | "SELECT rid, isRemoved, isExec, isLink, origname, newname, delta" |
| 208 | " FROM stashfile WHERE stashid=%d", |
| 209 | stashid |
| 210 | ); |
| 211 | vid = db_lget_int("checkout",0); |
| 212 | db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY %s)", |
| 213 | filename_collation()); |
| 214 | while( db_step(&q)==SQLITE_ROW ){ |
| 215 | int rid = db_column_int(&q, 0); |
| 216 | int isRemoved = db_column_int(&q, 1); |
| 217 | int isExec = db_column_int(&q, 2); |
| 218 | int isLink = db_column_int(&q, 3); |
| @@ -218,14 +222,14 @@ | |
| 222 | char *zNPath = mprintf("%s%s", g.zLocalRoot, zNew); |
| 223 | Blob delta; |
| 224 | undo_save(zNew); |
| 225 | blob_zero(&delta); |
| 226 | if( rid==0 ){ |
| 227 | db_multi_exec("INSERT OR IGNORE INTO sfile(x) VALUES(%Q)", zNew); |
| 228 | db_ephemeral_blob(&q, 6, &delta); |
| 229 | blob_write_to_file(&delta, zNPath); |
| 230 | file_wd_setexe(zNPath, isExec); |
| 231 | }else if( isRemoved ){ |
| 232 | fossil_print("DELETE %s\n", zOrig); |
| 233 | file_delete(zOPath); |
| 234 | }else{ |
| 235 | Blob a, b, out, disk; |
| @@ -276,10 +280,11 @@ | |
| 280 | if( fossil_strcmp(zOrig,zNew)!=0 ){ |
| 281 | undo_save(zOrig); |
| 282 | file_delete(zOPath); |
| 283 | } |
| 284 | } |
| 285 | stash_add_files_in_sfile(vid); |
| 286 | db_finalize(&q); |
| 287 | if( nConflict ){ |
| 288 | fossil_print( |
| 289 | "WARNING: %d merge conflicts - see messages above for details.\n", |
| 290 | nConflict); |
| 291 |
+7
-3
| --- src/style.c | ||
| +++ src/style.c | ||
| @@ -308,11 +308,11 @@ | ||
| 308 | 308 | Th_Store("manifest_date", MANIFEST_DATE); |
| 309 | 309 | Th_Store("compiler_name", COMPILER_NAME); |
| 310 | 310 | url_var("stylesheet", "css", "style.css"); |
| 311 | 311 | image_url_var("logo"); |
| 312 | 312 | image_url_var("background"); |
| 313 | - if( g.zLogin ){ | |
| 313 | + if( !login_is_nobody() ){ | |
| 314 | 314 | Th_Store("login", g.zLogin); |
| 315 | 315 | } |
| 316 | 316 | if( g.thTrace ) Th_Trace("BEGIN_HEADER_SCRIPT<br />\n", -1); |
| 317 | 317 | Th_Render(zHeader); |
| 318 | 318 | if( g.thTrace ) Th_Trace("END_HEADER<br />\n", -1); |
| @@ -346,12 +346,14 @@ | ||
| 346 | 346 | static void style_ad_unit(void){ |
| 347 | 347 | const char *zAd; |
| 348 | 348 | if( g.perm.Admin && db_get_boolean("adunit-omit-if-admin",0) ){ |
| 349 | 349 | return; |
| 350 | 350 | } |
| 351 | - if( g.zLogin && strcmp(g.zLogin,"anonymous")!=0 | |
| 352 | - && db_get_boolean("adunit-omit-if-user",0) ){ | |
| 351 | + if( !login_is_nobody() | |
| 352 | + && fossil_strcmp(g.zLogin,"anonymous")!=0 | |
| 353 | + && db_get_boolean("adunit-omit-if-user",0) | |
| 354 | + ){ | |
| 353 | 355 | return; |
| 354 | 356 | } |
| 355 | 357 | zAd = db_get("adunit", 0); |
| 356 | 358 | if( zAd ) cgi_append_content(zAd, -1); |
| 357 | 359 | } |
| @@ -1298,10 +1300,12 @@ | ||
| 1298 | 1300 | zCap[i] = 0; |
| 1299 | 1301 | @ g.userUid = %d(g.userUid)<br /> |
| 1300 | 1302 | @ g.zLogin = %h(g.zLogin)<br /> |
| 1301 | 1303 | @ g.isHuman = %d(g.isHuman)<br /> |
| 1302 | 1304 | @ capabilities = %s(zCap)<br /> |
| 1305 | + @ g.zRepositoryName = %h(g.zRepositoryName)<br /> | |
| 1306 | + @ load_average() = %f(load_average())<br /> | |
| 1303 | 1307 | @ <hr> |
| 1304 | 1308 | P("HTTP_USER_AGENT"); |
| 1305 | 1309 | cgi_print_all(showAll); |
| 1306 | 1310 | if( showAll && blob_size(&g.httpHeader)>0 ){ |
| 1307 | 1311 | @ <hr> |
| 1308 | 1312 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -308,11 +308,11 @@ | |
| 308 | Th_Store("manifest_date", MANIFEST_DATE); |
| 309 | Th_Store("compiler_name", COMPILER_NAME); |
| 310 | url_var("stylesheet", "css", "style.css"); |
| 311 | image_url_var("logo"); |
| 312 | image_url_var("background"); |
| 313 | if( g.zLogin ){ |
| 314 | Th_Store("login", g.zLogin); |
| 315 | } |
| 316 | if( g.thTrace ) Th_Trace("BEGIN_HEADER_SCRIPT<br />\n", -1); |
| 317 | Th_Render(zHeader); |
| 318 | if( g.thTrace ) Th_Trace("END_HEADER<br />\n", -1); |
| @@ -346,12 +346,14 @@ | |
| 346 | static void style_ad_unit(void){ |
| 347 | const char *zAd; |
| 348 | if( g.perm.Admin && db_get_boolean("adunit-omit-if-admin",0) ){ |
| 349 | return; |
| 350 | } |
| 351 | if( g.zLogin && strcmp(g.zLogin,"anonymous")!=0 |
| 352 | && db_get_boolean("adunit-omit-if-user",0) ){ |
| 353 | return; |
| 354 | } |
| 355 | zAd = db_get("adunit", 0); |
| 356 | if( zAd ) cgi_append_content(zAd, -1); |
| 357 | } |
| @@ -1298,10 +1300,12 @@ | |
| 1298 | zCap[i] = 0; |
| 1299 | @ g.userUid = %d(g.userUid)<br /> |
| 1300 | @ g.zLogin = %h(g.zLogin)<br /> |
| 1301 | @ g.isHuman = %d(g.isHuman)<br /> |
| 1302 | @ capabilities = %s(zCap)<br /> |
| 1303 | @ <hr> |
| 1304 | P("HTTP_USER_AGENT"); |
| 1305 | cgi_print_all(showAll); |
| 1306 | if( showAll && blob_size(&g.httpHeader)>0 ){ |
| 1307 | @ <hr> |
| 1308 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -308,11 +308,11 @@ | |
| 308 | Th_Store("manifest_date", MANIFEST_DATE); |
| 309 | Th_Store("compiler_name", COMPILER_NAME); |
| 310 | url_var("stylesheet", "css", "style.css"); |
| 311 | image_url_var("logo"); |
| 312 | image_url_var("background"); |
| 313 | if( !login_is_nobody() ){ |
| 314 | Th_Store("login", g.zLogin); |
| 315 | } |
| 316 | if( g.thTrace ) Th_Trace("BEGIN_HEADER_SCRIPT<br />\n", -1); |
| 317 | Th_Render(zHeader); |
| 318 | if( g.thTrace ) Th_Trace("END_HEADER<br />\n", -1); |
| @@ -346,12 +346,14 @@ | |
| 346 | static void style_ad_unit(void){ |
| 347 | const char *zAd; |
| 348 | if( g.perm.Admin && db_get_boolean("adunit-omit-if-admin",0) ){ |
| 349 | return; |
| 350 | } |
| 351 | if( !login_is_nobody() |
| 352 | && fossil_strcmp(g.zLogin,"anonymous")!=0 |
| 353 | && db_get_boolean("adunit-omit-if-user",0) |
| 354 | ){ |
| 355 | return; |
| 356 | } |
| 357 | zAd = db_get("adunit", 0); |
| 358 | if( zAd ) cgi_append_content(zAd, -1); |
| 359 | } |
| @@ -1298,10 +1300,12 @@ | |
| 1300 | zCap[i] = 0; |
| 1301 | @ g.userUid = %d(g.userUid)<br /> |
| 1302 | @ g.zLogin = %h(g.zLogin)<br /> |
| 1303 | @ g.isHuman = %d(g.isHuman)<br /> |
| 1304 | @ capabilities = %s(zCap)<br /> |
| 1305 | @ g.zRepositoryName = %h(g.zRepositoryName)<br /> |
| 1306 | @ load_average() = %f(load_average())<br /> |
| 1307 | @ <hr> |
| 1308 | P("HTTP_USER_AGENT"); |
| 1309 | cgi_print_all(showAll); |
| 1310 | if( showAll && blob_size(&g.httpHeader)>0 ){ |
| 1311 | @ <hr> |
| 1312 |
+1
-1
| --- src/tag.c | ||
| +++ src/tag.c | ||
| @@ -322,11 +322,11 @@ | ||
| 322 | 322 | if( tagtype>0 && zValue && zValue[0] ){ |
| 323 | 323 | blob_appendf(&ctrl, " %F\n", zValue); |
| 324 | 324 | }else{ |
| 325 | 325 | blob_appendf(&ctrl, "\n"); |
| 326 | 326 | } |
| 327 | - blob_appendf(&ctrl, "U %F\n", zUserOvrd ? zUserOvrd : g.zLogin); | |
| 327 | + blob_appendf(&ctrl, "U %F\n", zUserOvrd ? zUserOvrd : login_name()); | |
| 328 | 328 | md5sum_blob(&ctrl, &cksum); |
| 329 | 329 | blob_appendf(&ctrl, "Z %b\n", &cksum); |
| 330 | 330 | nrid = content_put(&ctrl); |
| 331 | 331 | manifest_crosslink(nrid, &ctrl, MC_PERMIT_HOOKS); |
| 332 | 332 | assert( blob_is_reset(&ctrl) ); |
| 333 | 333 |
| --- src/tag.c | |
| +++ src/tag.c | |
| @@ -322,11 +322,11 @@ | |
| 322 | if( tagtype>0 && zValue && zValue[0] ){ |
| 323 | blob_appendf(&ctrl, " %F\n", zValue); |
| 324 | }else{ |
| 325 | blob_appendf(&ctrl, "\n"); |
| 326 | } |
| 327 | blob_appendf(&ctrl, "U %F\n", zUserOvrd ? zUserOvrd : g.zLogin); |
| 328 | md5sum_blob(&ctrl, &cksum); |
| 329 | blob_appendf(&ctrl, "Z %b\n", &cksum); |
| 330 | nrid = content_put(&ctrl); |
| 331 | manifest_crosslink(nrid, &ctrl, MC_PERMIT_HOOKS); |
| 332 | assert( blob_is_reset(&ctrl) ); |
| 333 |
| --- src/tag.c | |
| +++ src/tag.c | |
| @@ -322,11 +322,11 @@ | |
| 322 | if( tagtype>0 && zValue && zValue[0] ){ |
| 323 | blob_appendf(&ctrl, " %F\n", zValue); |
| 324 | }else{ |
| 325 | blob_appendf(&ctrl, "\n"); |
| 326 | } |
| 327 | blob_appendf(&ctrl, "U %F\n", zUserOvrd ? zUserOvrd : login_name()); |
| 328 | md5sum_blob(&ctrl, &cksum); |
| 329 | blob_appendf(&ctrl, "Z %b\n", &cksum); |
| 330 | nrid = content_put(&ctrl); |
| 331 | manifest_crosslink(nrid, &ctrl, MC_PERMIT_HOOKS); |
| 332 | assert( blob_is_reset(&ctrl) ); |
| 333 |
+1
| --- src/tar.c | ||
| +++ src/tar.c | ||
| @@ -580,10 +580,11 @@ | ||
| 580 | 580 | int nName, nRid; |
| 581 | 581 | Blob tarball; |
| 582 | 582 | |
| 583 | 583 | login_check_credentials(); |
| 584 | 584 | if( !g.perm.Zip ){ login_needed(); return; } |
| 585 | + load_control(); | |
| 585 | 586 | zName = mprintf("%s", PD("name","")); |
| 586 | 587 | nName = strlen(zName); |
| 587 | 588 | zRid = mprintf("%s", PD("uuid","trunk")); |
| 588 | 589 | nRid = strlen(zRid); |
| 589 | 590 | if( nName>7 && fossil_strcmp(&zName[nName-7], ".tar.gz")==0 ){ |
| 590 | 591 |
| --- src/tar.c | |
| +++ src/tar.c | |
| @@ -580,10 +580,11 @@ | |
| 580 | int nName, nRid; |
| 581 | Blob tarball; |
| 582 | |
| 583 | login_check_credentials(); |
| 584 | if( !g.perm.Zip ){ login_needed(); return; } |
| 585 | zName = mprintf("%s", PD("name","")); |
| 586 | nName = strlen(zName); |
| 587 | zRid = mprintf("%s", PD("uuid","trunk")); |
| 588 | nRid = strlen(zRid); |
| 589 | if( nName>7 && fossil_strcmp(&zName[nName-7], ".tar.gz")==0 ){ |
| 590 |
| --- src/tar.c | |
| +++ src/tar.c | |
| @@ -580,10 +580,11 @@ | |
| 580 | int nName, nRid; |
| 581 | Blob tarball; |
| 582 | |
| 583 | login_check_credentials(); |
| 584 | if( !g.perm.Zip ){ login_needed(); return; } |
| 585 | load_control(); |
| 586 | zName = mprintf("%s", PD("name","")); |
| 587 | nName = strlen(zName); |
| 588 | zRid = mprintf("%s", PD("uuid","trunk")); |
| 589 | nRid = strlen(zRid); |
| 590 | if( nName>7 && fossil_strcmp(&zName[nName-7], ".tar.gz")==0 ){ |
| 591 |
+3
-3
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -592,11 +592,11 @@ | ||
| 592 | 592 | if( pGraph && pGraph->nErr==0 && pGraph->nRow>0 ){ |
| 593 | 593 | GraphRow *pRow; |
| 594 | 594 | int i; |
| 595 | 595 | char cSep; |
| 596 | 596 | |
| 597 | - @ <script> | |
| 597 | + @ <script type='text/javascript'>(function(){ | |
| 598 | 598 | @ var railPitch=%d(pGraph->iRailPitch); |
| 599 | 599 | |
| 600 | 600 | /* the rowinfo[] array contains all the information needed to generate |
| 601 | 601 | ** the graph. Each entry contains information for a single row: |
| 602 | 602 | ** |
| @@ -868,14 +868,14 @@ | ||
| 868 | 868 | @ var h = absoluteY(lastId); |
| 869 | 869 | @ if( h!=lastY ){ |
| 870 | 870 | @ renderGraph(); |
| 871 | 871 | @ lastY = h; |
| 872 | 872 | @ } |
| 873 | - @ setTimeout("checkHeight();", 1000); | |
| 873 | + @ setTimeout(arguments.callee, 1000); | |
| 874 | 874 | @ } |
| 875 | 875 | @ checkHeight(); |
| 876 | - @ </script> | |
| 876 | + @ })()</script> | |
| 877 | 877 | } |
| 878 | 878 | } |
| 879 | 879 | |
| 880 | 880 | /* |
| 881 | 881 | ** Create a temporary table suitable for storing timeline data. |
| 882 | 882 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -592,11 +592,11 @@ | |
| 592 | if( pGraph && pGraph->nErr==0 && pGraph->nRow>0 ){ |
| 593 | GraphRow *pRow; |
| 594 | int i; |
| 595 | char cSep; |
| 596 | |
| 597 | @ <script> |
| 598 | @ var railPitch=%d(pGraph->iRailPitch); |
| 599 | |
| 600 | /* the rowinfo[] array contains all the information needed to generate |
| 601 | ** the graph. Each entry contains information for a single row: |
| 602 | ** |
| @@ -868,14 +868,14 @@ | |
| 868 | @ var h = absoluteY(lastId); |
| 869 | @ if( h!=lastY ){ |
| 870 | @ renderGraph(); |
| 871 | @ lastY = h; |
| 872 | @ } |
| 873 | @ setTimeout("checkHeight();", 1000); |
| 874 | @ } |
| 875 | @ checkHeight(); |
| 876 | @ </script> |
| 877 | } |
| 878 | } |
| 879 | |
| 880 | /* |
| 881 | ** Create a temporary table suitable for storing timeline data. |
| 882 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -592,11 +592,11 @@ | |
| 592 | if( pGraph && pGraph->nErr==0 && pGraph->nRow>0 ){ |
| 593 | GraphRow *pRow; |
| 594 | int i; |
| 595 | char cSep; |
| 596 | |
| 597 | @ <script type='text/javascript'>(function(){ |
| 598 | @ var railPitch=%d(pGraph->iRailPitch); |
| 599 | |
| 600 | /* the rowinfo[] array contains all the information needed to generate |
| 601 | ** the graph. Each entry contains information for a single row: |
| 602 | ** |
| @@ -868,14 +868,14 @@ | |
| 868 | @ var h = absoluteY(lastId); |
| 869 | @ if( h!=lastY ){ |
| 870 | @ renderGraph(); |
| 871 | @ lastY = h; |
| 872 | @ } |
| 873 | @ setTimeout(arguments.callee, 1000); |
| 874 | @ } |
| 875 | @ checkHeight(); |
| 876 | @ })()</script> |
| 877 | } |
| 878 | } |
| 879 | |
| 880 | /* |
| 881 | ** Create a temporary table suitable for storing timeline data. |
| 882 |
+4
-4
| --- src/tkt.c | ||
| +++ src/tkt.c | ||
| @@ -614,11 +614,11 @@ | ||
| 614 | 614 | }else{ |
| 615 | 615 | zUuid = db_text(0, "SELECT lower(hex(randomblob(20)))"); |
| 616 | 616 | } |
| 617 | 617 | *(const char**)pUuid = zUuid; |
| 618 | 618 | blob_appendf(&tktchng, "K %s\n", zUuid); |
| 619 | - blob_appendf(&tktchng, "U %F\n", g.zLogin ? g.zLogin : ""); | |
| 619 | + blob_appendf(&tktchng, "U %F\n", login_name()); | |
| 620 | 620 | md5sum_blob(&tktchng, &cksum); |
| 621 | 621 | blob_appendf(&tktchng, "Z %b\n", &cksum); |
| 622 | 622 | if( nJ==0 ){ |
| 623 | 623 | blob_reset(&tktchng); |
| 624 | 624 | return TH_OK; |
| @@ -675,11 +675,11 @@ | ||
| 675 | 675 | login_insert_csrf_secret(); |
| 676 | 676 | if( P("date_override") && g.perm.Setup ){ |
| 677 | 677 | @ <input type="hidden" name="date_override" value="%h(P("date_override"))"> |
| 678 | 678 | } |
| 679 | 679 | zScript = ticket_newpage_code(); |
| 680 | - Th_Store("login", g.zLogin ? g.zLogin : "nobody"); | |
| 680 | + Th_Store("login", login_name()); | |
| 681 | 681 | Th_Store("date", db_text(0, "SELECT datetime('now')")); |
| 682 | 682 | Th_CreateCommand(g.interp, "submit_ticket", submitTicketCmd, |
| 683 | 683 | (void*)&zNewUuid, 0); |
| 684 | 684 | if( g.thTrace ) Th_Trace("BEGIN_TKTNEW_SCRIPT<br />\n", -1); |
| 685 | 685 | if( Th_Render(zScript)==TH_RETURN && !g.thTrace && zNewUuid ){ |
| @@ -743,11 +743,11 @@ | ||
| 743 | 743 | if( g.zPath[0]=='d' ) showAllFields(); |
| 744 | 744 | form_begin(0, "%R/%s", g.zPath); |
| 745 | 745 | @ <input type="hidden" name="name" value="%s(zName)" /> |
| 746 | 746 | login_insert_csrf_secret(); |
| 747 | 747 | zScript = ticket_editpage_code(); |
| 748 | - Th_Store("login", g.zLogin ? g.zLogin : "nobody"); | |
| 748 | + Th_Store("login", login_name()); | |
| 749 | 749 | Th_Store("date", db_text(0, "SELECT datetime('now')")); |
| 750 | 750 | Th_CreateCommand(g.interp, "append_field", appendRemarkCmd, 0, 0); |
| 751 | 751 | Th_CreateCommand(g.interp, "submit_ticket", submitTicketCmd, (void*)&zName,0); |
| 752 | 752 | if( g.thTrace ) Th_Trace("BEGIN_TKTEDIT_SCRIPT<br />\n", -1); |
| 753 | 753 | if( Th_Render(zScript)==TH_RETURN && !g.thTrace && zName ){ |
| @@ -1102,11 +1102,11 @@ | ||
| 1102 | 1102 | /* do some ints, we want to be inside a checkout */ |
| 1103 | 1103 | db_find_and_open_repository(0, 0); |
| 1104 | 1104 | user_select(); |
| 1105 | 1105 | |
| 1106 | 1106 | zUser = find_option("user-override",0,1); |
| 1107 | - if( zUser==0 ) zUser = g.zLogin; | |
| 1107 | + if( zUser==0 ) zUser = login_name(); | |
| 1108 | 1108 | zDate = find_option("date-override",0,1); |
| 1109 | 1109 | if( zDate==0 ) zDate = "now"; |
| 1110 | 1110 | zDate = date_in_standard_format(zDate); |
| 1111 | 1111 | zTktUuid = find_option("uuid-override",0,1); |
| 1112 | 1112 | if( zTktUuid && (strlen(zTktUuid)!=40 || !validate16(zTktUuid,40)) ){ |
| 1113 | 1113 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -614,11 +614,11 @@ | |
| 614 | }else{ |
| 615 | zUuid = db_text(0, "SELECT lower(hex(randomblob(20)))"); |
| 616 | } |
| 617 | *(const char**)pUuid = zUuid; |
| 618 | blob_appendf(&tktchng, "K %s\n", zUuid); |
| 619 | blob_appendf(&tktchng, "U %F\n", g.zLogin ? g.zLogin : ""); |
| 620 | md5sum_blob(&tktchng, &cksum); |
| 621 | blob_appendf(&tktchng, "Z %b\n", &cksum); |
| 622 | if( nJ==0 ){ |
| 623 | blob_reset(&tktchng); |
| 624 | return TH_OK; |
| @@ -675,11 +675,11 @@ | |
| 675 | login_insert_csrf_secret(); |
| 676 | if( P("date_override") && g.perm.Setup ){ |
| 677 | @ <input type="hidden" name="date_override" value="%h(P("date_override"))"> |
| 678 | } |
| 679 | zScript = ticket_newpage_code(); |
| 680 | Th_Store("login", g.zLogin ? g.zLogin : "nobody"); |
| 681 | Th_Store("date", db_text(0, "SELECT datetime('now')")); |
| 682 | Th_CreateCommand(g.interp, "submit_ticket", submitTicketCmd, |
| 683 | (void*)&zNewUuid, 0); |
| 684 | if( g.thTrace ) Th_Trace("BEGIN_TKTNEW_SCRIPT<br />\n", -1); |
| 685 | if( Th_Render(zScript)==TH_RETURN && !g.thTrace && zNewUuid ){ |
| @@ -743,11 +743,11 @@ | |
| 743 | if( g.zPath[0]=='d' ) showAllFields(); |
| 744 | form_begin(0, "%R/%s", g.zPath); |
| 745 | @ <input type="hidden" name="name" value="%s(zName)" /> |
| 746 | login_insert_csrf_secret(); |
| 747 | zScript = ticket_editpage_code(); |
| 748 | Th_Store("login", g.zLogin ? g.zLogin : "nobody"); |
| 749 | Th_Store("date", db_text(0, "SELECT datetime('now')")); |
| 750 | Th_CreateCommand(g.interp, "append_field", appendRemarkCmd, 0, 0); |
| 751 | Th_CreateCommand(g.interp, "submit_ticket", submitTicketCmd, (void*)&zName,0); |
| 752 | if( g.thTrace ) Th_Trace("BEGIN_TKTEDIT_SCRIPT<br />\n", -1); |
| 753 | if( Th_Render(zScript)==TH_RETURN && !g.thTrace && zName ){ |
| @@ -1102,11 +1102,11 @@ | |
| 1102 | /* do some ints, we want to be inside a checkout */ |
| 1103 | db_find_and_open_repository(0, 0); |
| 1104 | user_select(); |
| 1105 | |
| 1106 | zUser = find_option("user-override",0,1); |
| 1107 | if( zUser==0 ) zUser = g.zLogin; |
| 1108 | zDate = find_option("date-override",0,1); |
| 1109 | if( zDate==0 ) zDate = "now"; |
| 1110 | zDate = date_in_standard_format(zDate); |
| 1111 | zTktUuid = find_option("uuid-override",0,1); |
| 1112 | if( zTktUuid && (strlen(zTktUuid)!=40 || !validate16(zTktUuid,40)) ){ |
| 1113 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -614,11 +614,11 @@ | |
| 614 | }else{ |
| 615 | zUuid = db_text(0, "SELECT lower(hex(randomblob(20)))"); |
| 616 | } |
| 617 | *(const char**)pUuid = zUuid; |
| 618 | blob_appendf(&tktchng, "K %s\n", zUuid); |
| 619 | blob_appendf(&tktchng, "U %F\n", login_name()); |
| 620 | md5sum_blob(&tktchng, &cksum); |
| 621 | blob_appendf(&tktchng, "Z %b\n", &cksum); |
| 622 | if( nJ==0 ){ |
| 623 | blob_reset(&tktchng); |
| 624 | return TH_OK; |
| @@ -675,11 +675,11 @@ | |
| 675 | login_insert_csrf_secret(); |
| 676 | if( P("date_override") && g.perm.Setup ){ |
| 677 | @ <input type="hidden" name="date_override" value="%h(P("date_override"))"> |
| 678 | } |
| 679 | zScript = ticket_newpage_code(); |
| 680 | Th_Store("login", login_name()); |
| 681 | Th_Store("date", db_text(0, "SELECT datetime('now')")); |
| 682 | Th_CreateCommand(g.interp, "submit_ticket", submitTicketCmd, |
| 683 | (void*)&zNewUuid, 0); |
| 684 | if( g.thTrace ) Th_Trace("BEGIN_TKTNEW_SCRIPT<br />\n", -1); |
| 685 | if( Th_Render(zScript)==TH_RETURN && !g.thTrace && zNewUuid ){ |
| @@ -743,11 +743,11 @@ | |
| 743 | if( g.zPath[0]=='d' ) showAllFields(); |
| 744 | form_begin(0, "%R/%s", g.zPath); |
| 745 | @ <input type="hidden" name="name" value="%s(zName)" /> |
| 746 | login_insert_csrf_secret(); |
| 747 | zScript = ticket_editpage_code(); |
| 748 | Th_Store("login", login_name()); |
| 749 | Th_Store("date", db_text(0, "SELECT datetime('now')")); |
| 750 | Th_CreateCommand(g.interp, "append_field", appendRemarkCmd, 0, 0); |
| 751 | Th_CreateCommand(g.interp, "submit_ticket", submitTicketCmd, (void*)&zName,0); |
| 752 | if( g.thTrace ) Th_Trace("BEGIN_TKTEDIT_SCRIPT<br />\n", -1); |
| 753 | if( Th_Render(zScript)==TH_RETURN && !g.thTrace && zName ){ |
| @@ -1102,11 +1102,11 @@ | |
| 1102 | /* do some ints, we want to be inside a checkout */ |
| 1103 | db_find_and_open_repository(0, 0); |
| 1104 | user_select(); |
| 1105 | |
| 1106 | zUser = find_option("user-override",0,1); |
| 1107 | if( zUser==0 ) zUser = login_name(); |
| 1108 | zDate = find_option("date-override",0,1); |
| 1109 | if( zDate==0 ) zDate = "now"; |
| 1110 | zDate = date_in_standard_format(zDate); |
| 1111 | zTktUuid = find_option("uuid-override",0,1); |
| 1112 | if( zTktUuid && (strlen(zTktUuid)!=40 || !validate16(zTktUuid,40)) ){ |
| 1113 |
+12
-12
| --- src/wiki.c | ||
| +++ src/wiki.c | ||
| @@ -420,12 +420,12 @@ | ||
| 420 | 420 | if( rid ){ |
| 421 | 421 | char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 422 | 422 | blob_appendf(&wiki, "P %s\n", zUuid); |
| 423 | 423 | free(zUuid); |
| 424 | 424 | } |
| 425 | - if( g.zLogin ){ | |
| 426 | - blob_appendf(&wiki, "U %F\n", g.zLogin); | |
| 425 | + if( !login_is_nobody() ){ | |
| 426 | + blob_appendf(&wiki, "U %F\n", login_name()); | |
| 427 | 427 | } |
| 428 | 428 | blob_appendf(&wiki, "W %d\n%s\n", strlen(zBody), zBody); |
| 429 | 429 | md5sum_blob(&wiki, &cksum); |
| 430 | 430 | blob_appendf(&wiki, "Z %b\n", &cksum); |
| 431 | 431 | blob_reset(&cksum); |
| @@ -558,25 +558,25 @@ | ||
| 558 | 558 | zRemark = PD("r",""); |
| 559 | 559 | zUser = PD("u",g.zLogin); |
| 560 | 560 | if( fossil_strcmp(zMimetype, "text/x-fossil-wiki")==0 ){ |
| 561 | 561 | zId = db_text(0, "SELECT lower(hex(randomblob(8)))"); |
| 562 | 562 | blob_appendf(p, "\n\n<hr><div id=\"%s\"><i>On %s UTC %h", |
| 563 | - zId, zDate, g.zLogin); | |
| 564 | - if( zUser[0] && fossil_strcmp(zUser,g.zLogin) ){ | |
| 563 | + zId, zDate, login_name()); | |
| 564 | + if( zUser[0] && fossil_strcmp(zUser,login_name()) ){ | |
| 565 | 565 | blob_appendf(p, " (claiming to be %h)", zUser); |
| 566 | 566 | } |
| 567 | 567 | blob_appendf(p, " added:</i><br />\n%s</div id=\"%s\">", zRemark, zId); |
| 568 | 568 | }else if( fossil_strcmp(zMimetype, "text/x-markdown")==0 ){ |
| 569 | - blob_appendf(p, "\n\n------\n*On %s UTC %h", zDate, g.zLogin); | |
| 570 | - if( zUser[0] && fossil_strcmp(zUser,g.zLogin) ){ | |
| 569 | + blob_appendf(p, "\n\n------\n*On %s UTC %h", zDate, login_name()); | |
| 570 | + if( zUser[0] && fossil_strcmp(zUser,login_name()) ){ | |
| 571 | 571 | blob_appendf(p, " (claiming to be %h)", zUser); |
| 572 | 572 | } |
| 573 | 573 | blob_appendf(p, " added:*\n\n%s\n", zRemark); |
| 574 | 574 | }else{ |
| 575 | 575 | blob_appendf(p, "\n\n------------------------------------------------\n" |
| 576 | - "On %s UTC %s", zDate, g.zLogin); | |
| 577 | - if( zUser[0] && fossil_strcmp(zUser,g.zLogin) ){ | |
| 576 | + "On %s UTC %s", zDate, login_name()); | |
| 577 | + if( zUser[0] && fossil_strcmp(zUser,login_name()) ){ | |
| 578 | 578 | blob_appendf(p, " (claiming to be %s)", zUser); |
| 579 | 579 | } |
| 580 | 580 | blob_appendf(p, " added:\n\n%s\n", zRemark); |
| 581 | 581 | } |
| 582 | 582 | fossil_free(zDate); |
| @@ -650,12 +650,12 @@ | ||
| 650 | 650 | if( rid ){ |
| 651 | 651 | char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 652 | 652 | blob_appendf(&wiki, "P %s\n", zUuid); |
| 653 | 653 | free(zUuid); |
| 654 | 654 | } |
| 655 | - if( g.zLogin ){ | |
| 656 | - blob_appendf(&wiki, "U %F\n", g.zLogin); | |
| 655 | + if( !login_is_nobody() ){ | |
| 656 | + blob_appendf(&wiki, "U %F\n", login_name()); | |
| 657 | 657 | } |
| 658 | 658 | appendRemark(&body, zMimetype); |
| 659 | 659 | blob_appendf(&wiki, "W %d\n%s\n", blob_size(&body), blob_str(&body)); |
| 660 | 660 | md5sum_blob(&wiki, &cksum); |
| 661 | 661 | blob_appendf(&wiki, "Z %b\n", &cksum); |
| @@ -993,12 +993,12 @@ | ||
| 993 | 993 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 994 | 994 | blob_appendf(&wiki, "P %s\n", zUuid); |
| 995 | 995 | free(zUuid); |
| 996 | 996 | } |
| 997 | 997 | user_select(); |
| 998 | - if( g.zLogin ){ | |
| 999 | - blob_appendf(&wiki, "U %F\n", g.zLogin); | |
| 998 | + if( !login_is_nobody() ){ | |
| 999 | + blob_appendf(&wiki, "U %F\n", login_name()); | |
| 1000 | 1000 | } |
| 1001 | 1001 | blob_appendf( &wiki, "W %d\n%s\n", blob_size(pContent), |
| 1002 | 1002 | blob_str(pContent) ); |
| 1003 | 1003 | md5sum_blob(&wiki, &cksum); |
| 1004 | 1004 | blob_appendf(&wiki, "Z %b\n", &cksum); |
| 1005 | 1005 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -420,12 +420,12 @@ | |
| 420 | if( rid ){ |
| 421 | char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 422 | blob_appendf(&wiki, "P %s\n", zUuid); |
| 423 | free(zUuid); |
| 424 | } |
| 425 | if( g.zLogin ){ |
| 426 | blob_appendf(&wiki, "U %F\n", g.zLogin); |
| 427 | } |
| 428 | blob_appendf(&wiki, "W %d\n%s\n", strlen(zBody), zBody); |
| 429 | md5sum_blob(&wiki, &cksum); |
| 430 | blob_appendf(&wiki, "Z %b\n", &cksum); |
| 431 | blob_reset(&cksum); |
| @@ -558,25 +558,25 @@ | |
| 558 | zRemark = PD("r",""); |
| 559 | zUser = PD("u",g.zLogin); |
| 560 | if( fossil_strcmp(zMimetype, "text/x-fossil-wiki")==0 ){ |
| 561 | zId = db_text(0, "SELECT lower(hex(randomblob(8)))"); |
| 562 | blob_appendf(p, "\n\n<hr><div id=\"%s\"><i>On %s UTC %h", |
| 563 | zId, zDate, g.zLogin); |
| 564 | if( zUser[0] && fossil_strcmp(zUser,g.zLogin) ){ |
| 565 | blob_appendf(p, " (claiming to be %h)", zUser); |
| 566 | } |
| 567 | blob_appendf(p, " added:</i><br />\n%s</div id=\"%s\">", zRemark, zId); |
| 568 | }else if( fossil_strcmp(zMimetype, "text/x-markdown")==0 ){ |
| 569 | blob_appendf(p, "\n\n------\n*On %s UTC %h", zDate, g.zLogin); |
| 570 | if( zUser[0] && fossil_strcmp(zUser,g.zLogin) ){ |
| 571 | blob_appendf(p, " (claiming to be %h)", zUser); |
| 572 | } |
| 573 | blob_appendf(p, " added:*\n\n%s\n", zRemark); |
| 574 | }else{ |
| 575 | blob_appendf(p, "\n\n------------------------------------------------\n" |
| 576 | "On %s UTC %s", zDate, g.zLogin); |
| 577 | if( zUser[0] && fossil_strcmp(zUser,g.zLogin) ){ |
| 578 | blob_appendf(p, " (claiming to be %s)", zUser); |
| 579 | } |
| 580 | blob_appendf(p, " added:\n\n%s\n", zRemark); |
| 581 | } |
| 582 | fossil_free(zDate); |
| @@ -650,12 +650,12 @@ | |
| 650 | if( rid ){ |
| 651 | char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 652 | blob_appendf(&wiki, "P %s\n", zUuid); |
| 653 | free(zUuid); |
| 654 | } |
| 655 | if( g.zLogin ){ |
| 656 | blob_appendf(&wiki, "U %F\n", g.zLogin); |
| 657 | } |
| 658 | appendRemark(&body, zMimetype); |
| 659 | blob_appendf(&wiki, "W %d\n%s\n", blob_size(&body), blob_str(&body)); |
| 660 | md5sum_blob(&wiki, &cksum); |
| 661 | blob_appendf(&wiki, "Z %b\n", &cksum); |
| @@ -993,12 +993,12 @@ | |
| 993 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 994 | blob_appendf(&wiki, "P %s\n", zUuid); |
| 995 | free(zUuid); |
| 996 | } |
| 997 | user_select(); |
| 998 | if( g.zLogin ){ |
| 999 | blob_appendf(&wiki, "U %F\n", g.zLogin); |
| 1000 | } |
| 1001 | blob_appendf( &wiki, "W %d\n%s\n", blob_size(pContent), |
| 1002 | blob_str(pContent) ); |
| 1003 | md5sum_blob(&wiki, &cksum); |
| 1004 | blob_appendf(&wiki, "Z %b\n", &cksum); |
| 1005 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -420,12 +420,12 @@ | |
| 420 | if( rid ){ |
| 421 | char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 422 | blob_appendf(&wiki, "P %s\n", zUuid); |
| 423 | free(zUuid); |
| 424 | } |
| 425 | if( !login_is_nobody() ){ |
| 426 | blob_appendf(&wiki, "U %F\n", login_name()); |
| 427 | } |
| 428 | blob_appendf(&wiki, "W %d\n%s\n", strlen(zBody), zBody); |
| 429 | md5sum_blob(&wiki, &cksum); |
| 430 | blob_appendf(&wiki, "Z %b\n", &cksum); |
| 431 | blob_reset(&cksum); |
| @@ -558,25 +558,25 @@ | |
| 558 | zRemark = PD("r",""); |
| 559 | zUser = PD("u",g.zLogin); |
| 560 | if( fossil_strcmp(zMimetype, "text/x-fossil-wiki")==0 ){ |
| 561 | zId = db_text(0, "SELECT lower(hex(randomblob(8)))"); |
| 562 | blob_appendf(p, "\n\n<hr><div id=\"%s\"><i>On %s UTC %h", |
| 563 | zId, zDate, login_name()); |
| 564 | if( zUser[0] && fossil_strcmp(zUser,login_name()) ){ |
| 565 | blob_appendf(p, " (claiming to be %h)", zUser); |
| 566 | } |
| 567 | blob_appendf(p, " added:</i><br />\n%s</div id=\"%s\">", zRemark, zId); |
| 568 | }else if( fossil_strcmp(zMimetype, "text/x-markdown")==0 ){ |
| 569 | blob_appendf(p, "\n\n------\n*On %s UTC %h", zDate, login_name()); |
| 570 | if( zUser[0] && fossil_strcmp(zUser,login_name()) ){ |
| 571 | blob_appendf(p, " (claiming to be %h)", zUser); |
| 572 | } |
| 573 | blob_appendf(p, " added:*\n\n%s\n", zRemark); |
| 574 | }else{ |
| 575 | blob_appendf(p, "\n\n------------------------------------------------\n" |
| 576 | "On %s UTC %s", zDate, login_name()); |
| 577 | if( zUser[0] && fossil_strcmp(zUser,login_name()) ){ |
| 578 | blob_appendf(p, " (claiming to be %s)", zUser); |
| 579 | } |
| 580 | blob_appendf(p, " added:\n\n%s\n", zRemark); |
| 581 | } |
| 582 | fossil_free(zDate); |
| @@ -650,12 +650,12 @@ | |
| 650 | if( rid ){ |
| 651 | char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 652 | blob_appendf(&wiki, "P %s\n", zUuid); |
| 653 | free(zUuid); |
| 654 | } |
| 655 | if( !login_is_nobody() ){ |
| 656 | blob_appendf(&wiki, "U %F\n", login_name()); |
| 657 | } |
| 658 | appendRemark(&body, zMimetype); |
| 659 | blob_appendf(&wiki, "W %d\n%s\n", blob_size(&body), blob_str(&body)); |
| 660 | md5sum_blob(&wiki, &cksum); |
| 661 | blob_appendf(&wiki, "Z %b\n", &cksum); |
| @@ -993,12 +993,12 @@ | |
| 993 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 994 | blob_appendf(&wiki, "P %s\n", zUuid); |
| 995 | free(zUuid); |
| 996 | } |
| 997 | user_select(); |
| 998 | if( !login_is_nobody() ){ |
| 999 | blob_appendf(&wiki, "U %F\n", login_name()); |
| 1000 | } |
| 1001 | blob_appendf( &wiki, "W %d\n%s\n", blob_size(pContent), |
| 1002 | blob_str(pContent) ); |
| 1003 | md5sum_blob(&wiki, &cksum); |
| 1004 | blob_appendf(&wiki, "Z %b\n", &cksum); |
| 1005 |
+1
| --- src/zip.c | ||
| +++ src/zip.c | ||
| @@ -427,10 +427,11 @@ | ||
| 427 | 427 | int nName, nRid; |
| 428 | 428 | Blob zip; |
| 429 | 429 | |
| 430 | 430 | login_check_credentials(); |
| 431 | 431 | if( !g.perm.Zip ){ login_needed(); return; } |
| 432 | + load_control(); | |
| 432 | 433 | zName = mprintf("%s", PD("name","")); |
| 433 | 434 | nName = strlen(zName); |
| 434 | 435 | zRid = mprintf("%s", PD("uuid","trunk")); |
| 435 | 436 | nRid = strlen(zRid); |
| 436 | 437 | for(nName=strlen(zName)-1; nName>5; nName--){ |
| 437 | 438 |
| --- src/zip.c | |
| +++ src/zip.c | |
| @@ -427,10 +427,11 @@ | |
| 427 | int nName, nRid; |
| 428 | Blob zip; |
| 429 | |
| 430 | login_check_credentials(); |
| 431 | if( !g.perm.Zip ){ login_needed(); return; } |
| 432 | zName = mprintf("%s", PD("name","")); |
| 433 | nName = strlen(zName); |
| 434 | zRid = mprintf("%s", PD("uuid","trunk")); |
| 435 | nRid = strlen(zRid); |
| 436 | for(nName=strlen(zName)-1; nName>5; nName--){ |
| 437 |
| --- src/zip.c | |
| +++ src/zip.c | |
| @@ -427,10 +427,11 @@ | |
| 427 | int nName, nRid; |
| 428 | Blob zip; |
| 429 | |
| 430 | login_check_credentials(); |
| 431 | if( !g.perm.Zip ){ login_needed(); return; } |
| 432 | load_control(); |
| 433 | zName = mprintf("%s", PD("name","")); |
| 434 | nName = strlen(zName); |
| 435 | zRid = mprintf("%s", PD("uuid","trunk")); |
| 436 | nRid = strlen(zRid); |
| 437 | for(nName=strlen(zName)-1; nName>5; nName--){ |
| 438 |
+1
| --- test/tester.tcl | ||
| +++ test/tester.tcl | ||
| @@ -139,10 +139,11 @@ | ||
| 139 | 139 | catch {exec $::fossilexe close -f} |
| 140 | 140 | file delete $filename |
| 141 | 141 | exec $::fossilexe new $filename |
| 142 | 142 | exec $::fossilexe open $filename |
| 143 | 143 | exec $::fossilexe clean -f |
| 144 | + exec $::fossilexe set mtime-changes off | |
| 144 | 145 | } |
| 145 | 146 | |
| 146 | 147 | # Normalize file status lists (like those returned by 'fossil changes') |
| 147 | 148 | # so they can be compared using simple string comparison |
| 148 | 149 | # |
| 149 | 150 |
| --- test/tester.tcl | |
| +++ test/tester.tcl | |
| @@ -139,10 +139,11 @@ | |
| 139 | catch {exec $::fossilexe close -f} |
| 140 | file delete $filename |
| 141 | exec $::fossilexe new $filename |
| 142 | exec $::fossilexe open $filename |
| 143 | exec $::fossilexe clean -f |
| 144 | } |
| 145 | |
| 146 | # Normalize file status lists (like those returned by 'fossil changes') |
| 147 | # so they can be compared using simple string comparison |
| 148 | # |
| 149 |
| --- test/tester.tcl | |
| +++ test/tester.tcl | |
| @@ -139,10 +139,11 @@ | |
| 139 | catch {exec $::fossilexe close -f} |
| 140 | file delete $filename |
| 141 | exec $::fossilexe new $filename |
| 142 | exec $::fossilexe open $filename |
| 143 | exec $::fossilexe clean -f |
| 144 | exec $::fossilexe set mtime-changes off |
| 145 | } |
| 146 | |
| 147 | # Normalize file status lists (like those returned by 'fossil changes') |
| 148 | # so they can be compared using simple string comparison |
| 149 | # |
| 150 |
+10
-4
| --- win/Makefile.dmc | ||
| +++ win/Makefile.dmc | ||
| @@ -28,13 +28,13 @@ | ||
| 28 | 28 | |
| 29 | 29 | SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS |
| 30 | 30 | |
| 31 | 31 | SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=win32_access -Dgetenv=fossil_getenv -Dfopen=fossil_fopen |
| 32 | 32 | |
| 33 | -SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c | |
| 33 | +SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c loadctrl_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c | |
| 34 | 34 | |
| 35 | -OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_finfo$O $(OBJDIR)\json_login$O $(OBJDIR)\json_query$O $(OBJDIR)\json_report$O $(OBJDIR)\json_status$O $(OBJDIR)\json_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\login$O $(OBJDIR)\lookslike$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\markdown$O $(OBJDIR)\markdown_html$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\moderate$O $(OBJDIR)\name$O $(OBJDIR)\path$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\rebuild$O $(OBJDIR)\regexp$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\unicode$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$O $(OBJDIR)\util$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winfile$O $(OBJDIR)\winhttp$O $(OBJDIR)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O | |
| 35 | +OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_finfo$O $(OBJDIR)\json_login$O $(OBJDIR)\json_query$O $(OBJDIR)\json_report$O $(OBJDIR)\json_status$O $(OBJDIR)\json_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\loadctrl$O $(OBJDIR)\login$O $(OBJDIR)\lookslike$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\markdown$O $(OBJDIR)\markdown_html$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\moderate$O $(OBJDIR)\name$O $(OBJDIR)\path$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\rebuild$O $(OBJDIR)\regexp$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\unicode$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$O $(OBJDIR)\util$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winfile$O $(OBJDIR)\winhttp$O $(OBJDIR)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O | |
| 36 | 36 | |
| 37 | 37 | |
| 38 | 38 | RC=$(DMDIR)\bin\rcc |
| 39 | 39 | RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__ |
| 40 | 40 | |
| @@ -48,11 +48,11 @@ | ||
| 48 | 48 | |
| 49 | 49 | $(OBJDIR)\fossil.res: $B\win\fossil.rc |
| 50 | 50 | $(RC) $(RCFLAGS) -o$@ $** |
| 51 | 51 | |
| 52 | 52 | $(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res |
| 53 | - +echo add allrepo attach bag bisect blob branch browse captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo glob graph gzip http http_socket http_ssl http_transport import info json json_artifact json_branch json_config json_diff json_dir json_finfo json_login json_query json_report json_status json_tag json_timeline json_user json_wiki leaf login lookslike main manifest markdown markdown_html md5 merge merge3 moderate name path pivot popen pqueue printf rebuild regexp report rss schema search setup sha1 shun skins sqlcmd stash stat style sync tag tar th_main timeline tkt tktsetup undo unicode update url user utf8 util verify vfile wiki wikiformat winfile winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@ | |
| 53 | + +echo add allrepo attach bag bisect blob branch browse captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo glob graph gzip http http_socket http_ssl http_transport import info json json_artifact json_branch json_config json_diff json_dir json_finfo json_login json_query json_report json_status json_tag json_timeline json_user json_wiki leaf loadctrl login lookslike main manifest markdown markdown_html md5 merge merge3 moderate name path pivot popen pqueue printf rebuild regexp report rss schema search setup sha1 shun skins sqlcmd stash stat style sync tag tar th_main timeline tkt tktsetup undo unicode update url user utf8 util verify vfile wiki wikiformat winfile winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@ | |
| 54 | 54 | +echo fossil >> $@ |
| 55 | 55 | +echo fossil >> $@ |
| 56 | 56 | +echo $(LIBS) >> $@ |
| 57 | 57 | +echo. >> $@ |
| 58 | 58 | +echo fossil >> $@ |
| @@ -436,10 +436,16 @@ | ||
| 436 | 436 | $(OBJDIR)\leaf$O : leaf_.c leaf.h |
| 437 | 437 | $(TCC) -o$@ -c leaf_.c |
| 438 | 438 | |
| 439 | 439 | leaf_.c : $(SRCDIR)\leaf.c |
| 440 | 440 | +translate$E $** > $@ |
| 441 | + | |
| 442 | +$(OBJDIR)\loadctrl$O : loadctrl_.c loadctrl.h | |
| 443 | + $(TCC) -o$@ -c loadctrl_.c | |
| 444 | + | |
| 445 | +loadctrl_.c : $(SRCDIR)\loadctrl.c | |
| 446 | + +translate$E $** > $@ | |
| 441 | 447 | |
| 442 | 448 | $(OBJDIR)\login$O : login_.c login.h |
| 443 | 449 | $(TCC) -o$@ -c login_.c |
| 444 | 450 | |
| 445 | 451 | login_.c : $(SRCDIR)\login.c |
| @@ -762,7 +768,7 @@ | ||
| 762 | 768 | |
| 763 | 769 | zip_.c : $(SRCDIR)\zip.c |
| 764 | 770 | +translate$E $** > $@ |
| 765 | 771 | |
| 766 | 772 | headers: makeheaders$E page_index.h VERSION.h |
| 767 | - +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_status_.c:json_status.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h login_.c:login.h lookslike_.c:lookslike.h main_.c:main.h manifest_.c:manifest.h markdown_.c:markdown.h markdown_html_.c:markdown_html.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h moderate_.c:moderate.h name_.c:name.h path_.c:path.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h regexp_.c:regexp.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h unicode_.c:unicode.h update_.c:update.h url_.c:url.h user_.c:user.h utf8_.c:utf8.h util_.c:util.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winfile_.c:winfile.h winhttp_.c:winhttp.h wysiwyg_.c:wysiwyg.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h | |
| 773 | + +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_status_.c:json_status.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h loadctrl_.c:loadctrl.h login_.c:login.h lookslike_.c:lookslike.h main_.c:main.h manifest_.c:manifest.h markdown_.c:markdown.h markdown_html_.c:markdown_html.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h moderate_.c:moderate.h name_.c:name.h path_.c:path.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h regexp_.c:regexp.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h unicode_.c:unicode.h update_.c:update.h url_.c:url.h user_.c:user.h utf8_.c:utf8.h util_.c:util.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winfile_.c:winfile.h winhttp_.c:winhttp.h wysiwyg_.c:wysiwyg.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h | |
| 768 | 774 | @copy /Y nul: headers |
| 769 | 775 |
| --- win/Makefile.dmc | |
| +++ win/Makefile.dmc | |
| @@ -28,13 +28,13 @@ | |
| 28 | |
| 29 | SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS |
| 30 | |
| 31 | SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=win32_access -Dgetenv=fossil_getenv -Dfopen=fossil_fopen |
| 32 | |
| 33 | SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c |
| 34 | |
| 35 | OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_finfo$O $(OBJDIR)\json_login$O $(OBJDIR)\json_query$O $(OBJDIR)\json_report$O $(OBJDIR)\json_status$O $(OBJDIR)\json_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\login$O $(OBJDIR)\lookslike$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\markdown$O $(OBJDIR)\markdown_html$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\moderate$O $(OBJDIR)\name$O $(OBJDIR)\path$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\rebuild$O $(OBJDIR)\regexp$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\unicode$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$O $(OBJDIR)\util$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winfile$O $(OBJDIR)\winhttp$O $(OBJDIR)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O |
| 36 | |
| 37 | |
| 38 | RC=$(DMDIR)\bin\rcc |
| 39 | RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__ |
| 40 | |
| @@ -48,11 +48,11 @@ | |
| 48 | |
| 49 | $(OBJDIR)\fossil.res: $B\win\fossil.rc |
| 50 | $(RC) $(RCFLAGS) -o$@ $** |
| 51 | |
| 52 | $(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res |
| 53 | +echo add allrepo attach bag bisect blob branch browse captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo glob graph gzip http http_socket http_ssl http_transport import info json json_artifact json_branch json_config json_diff json_dir json_finfo json_login json_query json_report json_status json_tag json_timeline json_user json_wiki leaf login lookslike main manifest markdown markdown_html md5 merge merge3 moderate name path pivot popen pqueue printf rebuild regexp report rss schema search setup sha1 shun skins sqlcmd stash stat style sync tag tar th_main timeline tkt tktsetup undo unicode update url user utf8 util verify vfile wiki wikiformat winfile winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@ |
| 54 | +echo fossil >> $@ |
| 55 | +echo fossil >> $@ |
| 56 | +echo $(LIBS) >> $@ |
| 57 | +echo. >> $@ |
| 58 | +echo fossil >> $@ |
| @@ -436,10 +436,16 @@ | |
| 436 | $(OBJDIR)\leaf$O : leaf_.c leaf.h |
| 437 | $(TCC) -o$@ -c leaf_.c |
| 438 | |
| 439 | leaf_.c : $(SRCDIR)\leaf.c |
| 440 | +translate$E $** > $@ |
| 441 | |
| 442 | $(OBJDIR)\login$O : login_.c login.h |
| 443 | $(TCC) -o$@ -c login_.c |
| 444 | |
| 445 | login_.c : $(SRCDIR)\login.c |
| @@ -762,7 +768,7 @@ | |
| 762 | |
| 763 | zip_.c : $(SRCDIR)\zip.c |
| 764 | +translate$E $** > $@ |
| 765 | |
| 766 | headers: makeheaders$E page_index.h VERSION.h |
| 767 | +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_status_.c:json_status.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h login_.c:login.h lookslike_.c:lookslike.h main_.c:main.h manifest_.c:manifest.h markdown_.c:markdown.h markdown_html_.c:markdown_html.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h moderate_.c:moderate.h name_.c:name.h path_.c:path.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h regexp_.c:regexp.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h unicode_.c:unicode.h update_.c:update.h url_.c:url.h user_.c:user.h utf8_.c:utf8.h util_.c:util.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winfile_.c:winfile.h winhttp_.c:winhttp.h wysiwyg_.c:wysiwyg.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h |
| 768 | @copy /Y nul: headers |
| 769 |
| --- win/Makefile.dmc | |
| +++ win/Makefile.dmc | |
| @@ -28,13 +28,13 @@ | |
| 28 | |
| 29 | SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS |
| 30 | |
| 31 | SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=win32_access -Dgetenv=fossil_getenv -Dfopen=fossil_fopen |
| 32 | |
| 33 | SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c loadctrl_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c |
| 34 | |
| 35 | OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_finfo$O $(OBJDIR)\json_login$O $(OBJDIR)\json_query$O $(OBJDIR)\json_report$O $(OBJDIR)\json_status$O $(OBJDIR)\json_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\loadctrl$O $(OBJDIR)\login$O $(OBJDIR)\lookslike$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\markdown$O $(OBJDIR)\markdown_html$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\moderate$O $(OBJDIR)\name$O $(OBJDIR)\path$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\rebuild$O $(OBJDIR)\regexp$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\unicode$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$O $(OBJDIR)\util$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winfile$O $(OBJDIR)\winhttp$O $(OBJDIR)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O |
| 36 | |
| 37 | |
| 38 | RC=$(DMDIR)\bin\rcc |
| 39 | RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__ |
| 40 | |
| @@ -48,11 +48,11 @@ | |
| 48 | |
| 49 | $(OBJDIR)\fossil.res: $B\win\fossil.rc |
| 50 | $(RC) $(RCFLAGS) -o$@ $** |
| 51 | |
| 52 | $(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res |
| 53 | +echo add allrepo attach bag bisect blob branch browse captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo glob graph gzip http http_socket http_ssl http_transport import info json json_artifact json_branch json_config json_diff json_dir json_finfo json_login json_query json_report json_status json_tag json_timeline json_user json_wiki leaf loadctrl login lookslike main manifest markdown markdown_html md5 merge merge3 moderate name path pivot popen pqueue printf rebuild regexp report rss schema search setup sha1 shun skins sqlcmd stash stat style sync tag tar th_main timeline tkt tktsetup undo unicode update url user utf8 util verify vfile wiki wikiformat winfile winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@ |
| 54 | +echo fossil >> $@ |
| 55 | +echo fossil >> $@ |
| 56 | +echo $(LIBS) >> $@ |
| 57 | +echo. >> $@ |
| 58 | +echo fossil >> $@ |
| @@ -436,10 +436,16 @@ | |
| 436 | $(OBJDIR)\leaf$O : leaf_.c leaf.h |
| 437 | $(TCC) -o$@ -c leaf_.c |
| 438 | |
| 439 | leaf_.c : $(SRCDIR)\leaf.c |
| 440 | +translate$E $** > $@ |
| 441 | |
| 442 | $(OBJDIR)\loadctrl$O : loadctrl_.c loadctrl.h |
| 443 | $(TCC) -o$@ -c loadctrl_.c |
| 444 | |
| 445 | loadctrl_.c : $(SRCDIR)\loadctrl.c |
| 446 | +translate$E $** > $@ |
| 447 | |
| 448 | $(OBJDIR)\login$O : login_.c login.h |
| 449 | $(TCC) -o$@ -c login_.c |
| 450 | |
| 451 | login_.c : $(SRCDIR)\login.c |
| @@ -762,7 +768,7 @@ | |
| 768 | |
| 769 | zip_.c : $(SRCDIR)\zip.c |
| 770 | +translate$E $** > $@ |
| 771 | |
| 772 | headers: makeheaders$E page_index.h VERSION.h |
| 773 | +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_status_.c:json_status.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h loadctrl_.c:loadctrl.h login_.c:login.h lookslike_.c:lookslike.h main_.c:main.h manifest_.c:manifest.h markdown_.c:markdown.h markdown_html_.c:markdown_html.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h moderate_.c:moderate.h name_.c:name.h path_.c:path.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h regexp_.c:regexp.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h unicode_.c:unicode.h update_.c:update.h url_.c:url.h user_.c:user.h utf8_.c:utf8.h util_.c:util.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winfile_.c:winfile.h winhttp_.c:winhttp.h wysiwyg_.c:wysiwyg.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h |
| 774 | @copy /Y nul: headers |
| 775 |
+12
| --- win/Makefile.mingw | ||
| +++ win/Makefile.mingw | ||
| @@ -309,10 +309,11 @@ | ||
| 309 | 309 | $(SRCDIR)/json_tag.c \ |
| 310 | 310 | $(SRCDIR)/json_timeline.c \ |
| 311 | 311 | $(SRCDIR)/json_user.c \ |
| 312 | 312 | $(SRCDIR)/json_wiki.c \ |
| 313 | 313 | $(SRCDIR)/leaf.c \ |
| 314 | + $(SRCDIR)/loadctrl.c \ | |
| 314 | 315 | $(SRCDIR)/login.c \ |
| 315 | 316 | $(SRCDIR)/lookslike.c \ |
| 316 | 317 | $(SRCDIR)/main.c \ |
| 317 | 318 | $(SRCDIR)/manifest.c \ |
| 318 | 319 | $(SRCDIR)/markdown.c \ |
| @@ -419,10 +420,11 @@ | ||
| 419 | 420 | $(OBJDIR)/json_tag_.c \ |
| 420 | 421 | $(OBJDIR)/json_timeline_.c \ |
| 421 | 422 | $(OBJDIR)/json_user_.c \ |
| 422 | 423 | $(OBJDIR)/json_wiki_.c \ |
| 423 | 424 | $(OBJDIR)/leaf_.c \ |
| 425 | + $(OBJDIR)/loadctrl_.c \ | |
| 424 | 426 | $(OBJDIR)/login_.c \ |
| 425 | 427 | $(OBJDIR)/lookslike_.c \ |
| 426 | 428 | $(OBJDIR)/main_.c \ |
| 427 | 429 | $(OBJDIR)/manifest_.c \ |
| 428 | 430 | $(OBJDIR)/markdown_.c \ |
| @@ -529,10 +531,11 @@ | ||
| 529 | 531 | $(OBJDIR)/json_tag.o \ |
| 530 | 532 | $(OBJDIR)/json_timeline.o \ |
| 531 | 533 | $(OBJDIR)/json_user.o \ |
| 532 | 534 | $(OBJDIR)/json_wiki.o \ |
| 533 | 535 | $(OBJDIR)/leaf.o \ |
| 536 | + $(OBJDIR)/loadctrl.o \ | |
| 534 | 537 | $(OBJDIR)/login.o \ |
| 535 | 538 | $(OBJDIR)/lookslike.o \ |
| 536 | 539 | $(OBJDIR)/main.o \ |
| 537 | 540 | $(OBJDIR)/manifest.o \ |
| 538 | 541 | $(OBJDIR)/markdown.o \ |
| @@ -771,10 +774,11 @@ | ||
| 771 | 774 | $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h \ |
| 772 | 775 | $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h \ |
| 773 | 776 | $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h \ |
| 774 | 777 | $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h \ |
| 775 | 778 | $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h \ |
| 779 | + $(OBJDIR)/loadctrl_.c:$(OBJDIR)/loadctrl.h \ | |
| 776 | 780 | $(OBJDIR)/login_.c:$(OBJDIR)/login.h \ |
| 777 | 781 | $(OBJDIR)/lookslike_.c:$(OBJDIR)/lookslike.h \ |
| 778 | 782 | $(OBJDIR)/main_.c:$(OBJDIR)/main.h \ |
| 779 | 783 | $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h \ |
| 780 | 784 | $(OBJDIR)/markdown_.c:$(OBJDIR)/markdown.h \ |
| @@ -1265,10 +1269,18 @@ | ||
| 1265 | 1269 | |
| 1266 | 1270 | $(OBJDIR)/leaf.o: $(OBJDIR)/leaf_.c $(OBJDIR)/leaf.h $(SRCDIR)/config.h |
| 1267 | 1271 | $(XTCC) -o $(OBJDIR)/leaf.o -c $(OBJDIR)/leaf_.c |
| 1268 | 1272 | |
| 1269 | 1273 | $(OBJDIR)/leaf.h: $(OBJDIR)/headers |
| 1274 | + | |
| 1275 | +$(OBJDIR)/loadctrl_.c: $(SRCDIR)/loadctrl.c $(OBJDIR)/translate | |
| 1276 | + $(TRANSLATE) $(SRCDIR)/loadctrl.c >$(OBJDIR)/loadctrl_.c | |
| 1277 | + | |
| 1278 | +$(OBJDIR)/loadctrl.o: $(OBJDIR)/loadctrl_.c $(OBJDIR)/loadctrl.h $(SRCDIR)/config.h | |
| 1279 | + $(XTCC) -o $(OBJDIR)/loadctrl.o -c $(OBJDIR)/loadctrl_.c | |
| 1280 | + | |
| 1281 | +$(OBJDIR)/loadctrl.h: $(OBJDIR)/headers | |
| 1270 | 1282 | |
| 1271 | 1283 | $(OBJDIR)/login_.c: $(SRCDIR)/login.c $(OBJDIR)/translate |
| 1272 | 1284 | $(TRANSLATE) $(SRCDIR)/login.c >$(OBJDIR)/login_.c |
| 1273 | 1285 | |
| 1274 | 1286 | $(OBJDIR)/login.o: $(OBJDIR)/login_.c $(OBJDIR)/login.h $(SRCDIR)/config.h |
| 1275 | 1287 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -309,10 +309,11 @@ | |
| 309 | $(SRCDIR)/json_tag.c \ |
| 310 | $(SRCDIR)/json_timeline.c \ |
| 311 | $(SRCDIR)/json_user.c \ |
| 312 | $(SRCDIR)/json_wiki.c \ |
| 313 | $(SRCDIR)/leaf.c \ |
| 314 | $(SRCDIR)/login.c \ |
| 315 | $(SRCDIR)/lookslike.c \ |
| 316 | $(SRCDIR)/main.c \ |
| 317 | $(SRCDIR)/manifest.c \ |
| 318 | $(SRCDIR)/markdown.c \ |
| @@ -419,10 +420,11 @@ | |
| 419 | $(OBJDIR)/json_tag_.c \ |
| 420 | $(OBJDIR)/json_timeline_.c \ |
| 421 | $(OBJDIR)/json_user_.c \ |
| 422 | $(OBJDIR)/json_wiki_.c \ |
| 423 | $(OBJDIR)/leaf_.c \ |
| 424 | $(OBJDIR)/login_.c \ |
| 425 | $(OBJDIR)/lookslike_.c \ |
| 426 | $(OBJDIR)/main_.c \ |
| 427 | $(OBJDIR)/manifest_.c \ |
| 428 | $(OBJDIR)/markdown_.c \ |
| @@ -529,10 +531,11 @@ | |
| 529 | $(OBJDIR)/json_tag.o \ |
| 530 | $(OBJDIR)/json_timeline.o \ |
| 531 | $(OBJDIR)/json_user.o \ |
| 532 | $(OBJDIR)/json_wiki.o \ |
| 533 | $(OBJDIR)/leaf.o \ |
| 534 | $(OBJDIR)/login.o \ |
| 535 | $(OBJDIR)/lookslike.o \ |
| 536 | $(OBJDIR)/main.o \ |
| 537 | $(OBJDIR)/manifest.o \ |
| 538 | $(OBJDIR)/markdown.o \ |
| @@ -771,10 +774,11 @@ | |
| 771 | $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h \ |
| 772 | $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h \ |
| 773 | $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h \ |
| 774 | $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h \ |
| 775 | $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h \ |
| 776 | $(OBJDIR)/login_.c:$(OBJDIR)/login.h \ |
| 777 | $(OBJDIR)/lookslike_.c:$(OBJDIR)/lookslike.h \ |
| 778 | $(OBJDIR)/main_.c:$(OBJDIR)/main.h \ |
| 779 | $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h \ |
| 780 | $(OBJDIR)/markdown_.c:$(OBJDIR)/markdown.h \ |
| @@ -1265,10 +1269,18 @@ | |
| 1265 | |
| 1266 | $(OBJDIR)/leaf.o: $(OBJDIR)/leaf_.c $(OBJDIR)/leaf.h $(SRCDIR)/config.h |
| 1267 | $(XTCC) -o $(OBJDIR)/leaf.o -c $(OBJDIR)/leaf_.c |
| 1268 | |
| 1269 | $(OBJDIR)/leaf.h: $(OBJDIR)/headers |
| 1270 | |
| 1271 | $(OBJDIR)/login_.c: $(SRCDIR)/login.c $(OBJDIR)/translate |
| 1272 | $(TRANSLATE) $(SRCDIR)/login.c >$(OBJDIR)/login_.c |
| 1273 | |
| 1274 | $(OBJDIR)/login.o: $(OBJDIR)/login_.c $(OBJDIR)/login.h $(SRCDIR)/config.h |
| 1275 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -309,10 +309,11 @@ | |
| 309 | $(SRCDIR)/json_tag.c \ |
| 310 | $(SRCDIR)/json_timeline.c \ |
| 311 | $(SRCDIR)/json_user.c \ |
| 312 | $(SRCDIR)/json_wiki.c \ |
| 313 | $(SRCDIR)/leaf.c \ |
| 314 | $(SRCDIR)/loadctrl.c \ |
| 315 | $(SRCDIR)/login.c \ |
| 316 | $(SRCDIR)/lookslike.c \ |
| 317 | $(SRCDIR)/main.c \ |
| 318 | $(SRCDIR)/manifest.c \ |
| 319 | $(SRCDIR)/markdown.c \ |
| @@ -419,10 +420,11 @@ | |
| 420 | $(OBJDIR)/json_tag_.c \ |
| 421 | $(OBJDIR)/json_timeline_.c \ |
| 422 | $(OBJDIR)/json_user_.c \ |
| 423 | $(OBJDIR)/json_wiki_.c \ |
| 424 | $(OBJDIR)/leaf_.c \ |
| 425 | $(OBJDIR)/loadctrl_.c \ |
| 426 | $(OBJDIR)/login_.c \ |
| 427 | $(OBJDIR)/lookslike_.c \ |
| 428 | $(OBJDIR)/main_.c \ |
| 429 | $(OBJDIR)/manifest_.c \ |
| 430 | $(OBJDIR)/markdown_.c \ |
| @@ -529,10 +531,11 @@ | |
| 531 | $(OBJDIR)/json_tag.o \ |
| 532 | $(OBJDIR)/json_timeline.o \ |
| 533 | $(OBJDIR)/json_user.o \ |
| 534 | $(OBJDIR)/json_wiki.o \ |
| 535 | $(OBJDIR)/leaf.o \ |
| 536 | $(OBJDIR)/loadctrl.o \ |
| 537 | $(OBJDIR)/login.o \ |
| 538 | $(OBJDIR)/lookslike.o \ |
| 539 | $(OBJDIR)/main.o \ |
| 540 | $(OBJDIR)/manifest.o \ |
| 541 | $(OBJDIR)/markdown.o \ |
| @@ -771,10 +774,11 @@ | |
| 774 | $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h \ |
| 775 | $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h \ |
| 776 | $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h \ |
| 777 | $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h \ |
| 778 | $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h \ |
| 779 | $(OBJDIR)/loadctrl_.c:$(OBJDIR)/loadctrl.h \ |
| 780 | $(OBJDIR)/login_.c:$(OBJDIR)/login.h \ |
| 781 | $(OBJDIR)/lookslike_.c:$(OBJDIR)/lookslike.h \ |
| 782 | $(OBJDIR)/main_.c:$(OBJDIR)/main.h \ |
| 783 | $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h \ |
| 784 | $(OBJDIR)/markdown_.c:$(OBJDIR)/markdown.h \ |
| @@ -1265,10 +1269,18 @@ | |
| 1269 | |
| 1270 | $(OBJDIR)/leaf.o: $(OBJDIR)/leaf_.c $(OBJDIR)/leaf.h $(SRCDIR)/config.h |
| 1271 | $(XTCC) -o $(OBJDIR)/leaf.o -c $(OBJDIR)/leaf_.c |
| 1272 | |
| 1273 | $(OBJDIR)/leaf.h: $(OBJDIR)/headers |
| 1274 | |
| 1275 | $(OBJDIR)/loadctrl_.c: $(SRCDIR)/loadctrl.c $(OBJDIR)/translate |
| 1276 | $(TRANSLATE) $(SRCDIR)/loadctrl.c >$(OBJDIR)/loadctrl_.c |
| 1277 | |
| 1278 | $(OBJDIR)/loadctrl.o: $(OBJDIR)/loadctrl_.c $(OBJDIR)/loadctrl.h $(SRCDIR)/config.h |
| 1279 | $(XTCC) -o $(OBJDIR)/loadctrl.o -c $(OBJDIR)/loadctrl_.c |
| 1280 | |
| 1281 | $(OBJDIR)/loadctrl.h: $(OBJDIR)/headers |
| 1282 | |
| 1283 | $(OBJDIR)/login_.c: $(SRCDIR)/login.c $(OBJDIR)/translate |
| 1284 | $(TRANSLATE) $(SRCDIR)/login.c >$(OBJDIR)/login_.c |
| 1285 | |
| 1286 | $(OBJDIR)/login.o: $(OBJDIR)/login_.c $(OBJDIR)/login.h $(SRCDIR)/config.h |
| 1287 |
| --- win/Makefile.mingw.mistachkin | ||
| +++ win/Makefile.mingw.mistachkin | ||
| @@ -309,10 +309,11 @@ | ||
| 309 | 309 | $(SRCDIR)/json_tag.c \ |
| 310 | 310 | $(SRCDIR)/json_timeline.c \ |
| 311 | 311 | $(SRCDIR)/json_user.c \ |
| 312 | 312 | $(SRCDIR)/json_wiki.c \ |
| 313 | 313 | $(SRCDIR)/leaf.c \ |
| 314 | + $(SRCDIR)/loadctrl.c \ | |
| 314 | 315 | $(SRCDIR)/login.c \ |
| 315 | 316 | $(SRCDIR)/lookslike.c \ |
| 316 | 317 | $(SRCDIR)/main.c \ |
| 317 | 318 | $(SRCDIR)/manifest.c \ |
| 318 | 319 | $(SRCDIR)/markdown.c \ |
| @@ -419,10 +420,11 @@ | ||
| 419 | 420 | $(OBJDIR)/json_tag_.c \ |
| 420 | 421 | $(OBJDIR)/json_timeline_.c \ |
| 421 | 422 | $(OBJDIR)/json_user_.c \ |
| 422 | 423 | $(OBJDIR)/json_wiki_.c \ |
| 423 | 424 | $(OBJDIR)/leaf_.c \ |
| 425 | + $(OBJDIR)/loadctrl_.c \ | |
| 424 | 426 | $(OBJDIR)/login_.c \ |
| 425 | 427 | $(OBJDIR)/lookslike_.c \ |
| 426 | 428 | $(OBJDIR)/main_.c \ |
| 427 | 429 | $(OBJDIR)/manifest_.c \ |
| 428 | 430 | $(OBJDIR)/markdown_.c \ |
| @@ -529,10 +531,11 @@ | ||
| 529 | 531 | $(OBJDIR)/json_tag.o \ |
| 530 | 532 | $(OBJDIR)/json_timeline.o \ |
| 531 | 533 | $(OBJDIR)/json_user.o \ |
| 532 | 534 | $(OBJDIR)/json_wiki.o \ |
| 533 | 535 | $(OBJDIR)/leaf.o \ |
| 536 | + $(OBJDIR)/loadctrl.o \ | |
| 534 | 537 | $(OBJDIR)/login.o \ |
| 535 | 538 | $(OBJDIR)/lookslike.o \ |
| 536 | 539 | $(OBJDIR)/main.o \ |
| 537 | 540 | $(OBJDIR)/manifest.o \ |
| 538 | 541 | $(OBJDIR)/markdown.o \ |
| @@ -771,10 +774,11 @@ | ||
| 771 | 774 | $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h \ |
| 772 | 775 | $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h \ |
| 773 | 776 | $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h \ |
| 774 | 777 | $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h \ |
| 775 | 778 | $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h \ |
| 779 | + $(OBJDIR)/loadctrl_.c:$(OBJDIR)/loadctrl.h \ | |
| 776 | 780 | $(OBJDIR)/login_.c:$(OBJDIR)/login.h \ |
| 777 | 781 | $(OBJDIR)/lookslike_.c:$(OBJDIR)/lookslike.h \ |
| 778 | 782 | $(OBJDIR)/main_.c:$(OBJDIR)/main.h \ |
| 779 | 783 | $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h \ |
| 780 | 784 | $(OBJDIR)/markdown_.c:$(OBJDIR)/markdown.h \ |
| @@ -1265,10 +1269,18 @@ | ||
| 1265 | 1269 | |
| 1266 | 1270 | $(OBJDIR)/leaf.o: $(OBJDIR)/leaf_.c $(OBJDIR)/leaf.h $(SRCDIR)/config.h |
| 1267 | 1271 | $(XTCC) -o $(OBJDIR)/leaf.o -c $(OBJDIR)/leaf_.c |
| 1268 | 1272 | |
| 1269 | 1273 | $(OBJDIR)/leaf.h: $(OBJDIR)/headers |
| 1274 | + | |
| 1275 | +$(OBJDIR)/loadctrl_.c: $(SRCDIR)/loadctrl.c $(OBJDIR)/translate | |
| 1276 | + $(TRANSLATE) $(SRCDIR)/loadctrl.c >$(OBJDIR)/loadctrl_.c | |
| 1277 | + | |
| 1278 | +$(OBJDIR)/loadctrl.o: $(OBJDIR)/loadctrl_.c $(OBJDIR)/loadctrl.h $(SRCDIR)/config.h | |
| 1279 | + $(XTCC) -o $(OBJDIR)/loadctrl.o -c $(OBJDIR)/loadctrl_.c | |
| 1280 | + | |
| 1281 | +$(OBJDIR)/loadctrl.h: $(OBJDIR)/headers | |
| 1270 | 1282 | |
| 1271 | 1283 | $(OBJDIR)/login_.c: $(SRCDIR)/login.c $(OBJDIR)/translate |
| 1272 | 1284 | $(TRANSLATE) $(SRCDIR)/login.c >$(OBJDIR)/login_.c |
| 1273 | 1285 | |
| 1274 | 1286 | $(OBJDIR)/login.o: $(OBJDIR)/login_.c $(OBJDIR)/login.h $(SRCDIR)/config.h |
| 1275 | 1287 |
| --- win/Makefile.mingw.mistachkin | |
| +++ win/Makefile.mingw.mistachkin | |
| @@ -309,10 +309,11 @@ | |
| 309 | $(SRCDIR)/json_tag.c \ |
| 310 | $(SRCDIR)/json_timeline.c \ |
| 311 | $(SRCDIR)/json_user.c \ |
| 312 | $(SRCDIR)/json_wiki.c \ |
| 313 | $(SRCDIR)/leaf.c \ |
| 314 | $(SRCDIR)/login.c \ |
| 315 | $(SRCDIR)/lookslike.c \ |
| 316 | $(SRCDIR)/main.c \ |
| 317 | $(SRCDIR)/manifest.c \ |
| 318 | $(SRCDIR)/markdown.c \ |
| @@ -419,10 +420,11 @@ | |
| 419 | $(OBJDIR)/json_tag_.c \ |
| 420 | $(OBJDIR)/json_timeline_.c \ |
| 421 | $(OBJDIR)/json_user_.c \ |
| 422 | $(OBJDIR)/json_wiki_.c \ |
| 423 | $(OBJDIR)/leaf_.c \ |
| 424 | $(OBJDIR)/login_.c \ |
| 425 | $(OBJDIR)/lookslike_.c \ |
| 426 | $(OBJDIR)/main_.c \ |
| 427 | $(OBJDIR)/manifest_.c \ |
| 428 | $(OBJDIR)/markdown_.c \ |
| @@ -529,10 +531,11 @@ | |
| 529 | $(OBJDIR)/json_tag.o \ |
| 530 | $(OBJDIR)/json_timeline.o \ |
| 531 | $(OBJDIR)/json_user.o \ |
| 532 | $(OBJDIR)/json_wiki.o \ |
| 533 | $(OBJDIR)/leaf.o \ |
| 534 | $(OBJDIR)/login.o \ |
| 535 | $(OBJDIR)/lookslike.o \ |
| 536 | $(OBJDIR)/main.o \ |
| 537 | $(OBJDIR)/manifest.o \ |
| 538 | $(OBJDIR)/markdown.o \ |
| @@ -771,10 +774,11 @@ | |
| 771 | $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h \ |
| 772 | $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h \ |
| 773 | $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h \ |
| 774 | $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h \ |
| 775 | $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h \ |
| 776 | $(OBJDIR)/login_.c:$(OBJDIR)/login.h \ |
| 777 | $(OBJDIR)/lookslike_.c:$(OBJDIR)/lookslike.h \ |
| 778 | $(OBJDIR)/main_.c:$(OBJDIR)/main.h \ |
| 779 | $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h \ |
| 780 | $(OBJDIR)/markdown_.c:$(OBJDIR)/markdown.h \ |
| @@ -1265,10 +1269,18 @@ | |
| 1265 | |
| 1266 | $(OBJDIR)/leaf.o: $(OBJDIR)/leaf_.c $(OBJDIR)/leaf.h $(SRCDIR)/config.h |
| 1267 | $(XTCC) -o $(OBJDIR)/leaf.o -c $(OBJDIR)/leaf_.c |
| 1268 | |
| 1269 | $(OBJDIR)/leaf.h: $(OBJDIR)/headers |
| 1270 | |
| 1271 | $(OBJDIR)/login_.c: $(SRCDIR)/login.c $(OBJDIR)/translate |
| 1272 | $(TRANSLATE) $(SRCDIR)/login.c >$(OBJDIR)/login_.c |
| 1273 | |
| 1274 | $(OBJDIR)/login.o: $(OBJDIR)/login_.c $(OBJDIR)/login.h $(SRCDIR)/config.h |
| 1275 |
| --- win/Makefile.mingw.mistachkin | |
| +++ win/Makefile.mingw.mistachkin | |
| @@ -309,10 +309,11 @@ | |
| 309 | $(SRCDIR)/json_tag.c \ |
| 310 | $(SRCDIR)/json_timeline.c \ |
| 311 | $(SRCDIR)/json_user.c \ |
| 312 | $(SRCDIR)/json_wiki.c \ |
| 313 | $(SRCDIR)/leaf.c \ |
| 314 | $(SRCDIR)/loadctrl.c \ |
| 315 | $(SRCDIR)/login.c \ |
| 316 | $(SRCDIR)/lookslike.c \ |
| 317 | $(SRCDIR)/main.c \ |
| 318 | $(SRCDIR)/manifest.c \ |
| 319 | $(SRCDIR)/markdown.c \ |
| @@ -419,10 +420,11 @@ | |
| 420 | $(OBJDIR)/json_tag_.c \ |
| 421 | $(OBJDIR)/json_timeline_.c \ |
| 422 | $(OBJDIR)/json_user_.c \ |
| 423 | $(OBJDIR)/json_wiki_.c \ |
| 424 | $(OBJDIR)/leaf_.c \ |
| 425 | $(OBJDIR)/loadctrl_.c \ |
| 426 | $(OBJDIR)/login_.c \ |
| 427 | $(OBJDIR)/lookslike_.c \ |
| 428 | $(OBJDIR)/main_.c \ |
| 429 | $(OBJDIR)/manifest_.c \ |
| 430 | $(OBJDIR)/markdown_.c \ |
| @@ -529,10 +531,11 @@ | |
| 531 | $(OBJDIR)/json_tag.o \ |
| 532 | $(OBJDIR)/json_timeline.o \ |
| 533 | $(OBJDIR)/json_user.o \ |
| 534 | $(OBJDIR)/json_wiki.o \ |
| 535 | $(OBJDIR)/leaf.o \ |
| 536 | $(OBJDIR)/loadctrl.o \ |
| 537 | $(OBJDIR)/login.o \ |
| 538 | $(OBJDIR)/lookslike.o \ |
| 539 | $(OBJDIR)/main.o \ |
| 540 | $(OBJDIR)/manifest.o \ |
| 541 | $(OBJDIR)/markdown.o \ |
| @@ -771,10 +774,11 @@ | |
| 774 | $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h \ |
| 775 | $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h \ |
| 776 | $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h \ |
| 777 | $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h \ |
| 778 | $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h \ |
| 779 | $(OBJDIR)/loadctrl_.c:$(OBJDIR)/loadctrl.h \ |
| 780 | $(OBJDIR)/login_.c:$(OBJDIR)/login.h \ |
| 781 | $(OBJDIR)/lookslike_.c:$(OBJDIR)/lookslike.h \ |
| 782 | $(OBJDIR)/main_.c:$(OBJDIR)/main.h \ |
| 783 | $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h \ |
| 784 | $(OBJDIR)/markdown_.c:$(OBJDIR)/markdown.h \ |
| @@ -1265,10 +1269,18 @@ | |
| 1269 | |
| 1270 | $(OBJDIR)/leaf.o: $(OBJDIR)/leaf_.c $(OBJDIR)/leaf.h $(SRCDIR)/config.h |
| 1271 | $(XTCC) -o $(OBJDIR)/leaf.o -c $(OBJDIR)/leaf_.c |
| 1272 | |
| 1273 | $(OBJDIR)/leaf.h: $(OBJDIR)/headers |
| 1274 | |
| 1275 | $(OBJDIR)/loadctrl_.c: $(SRCDIR)/loadctrl.c $(OBJDIR)/translate |
| 1276 | $(TRANSLATE) $(SRCDIR)/loadctrl.c >$(OBJDIR)/loadctrl_.c |
| 1277 | |
| 1278 | $(OBJDIR)/loadctrl.o: $(OBJDIR)/loadctrl_.c $(OBJDIR)/loadctrl.h $(SRCDIR)/config.h |
| 1279 | $(XTCC) -o $(OBJDIR)/loadctrl.o -c $(OBJDIR)/loadctrl_.c |
| 1280 | |
| 1281 | $(OBJDIR)/loadctrl.h: $(OBJDIR)/headers |
| 1282 | |
| 1283 | $(OBJDIR)/login_.c: $(SRCDIR)/login.c $(OBJDIR)/translate |
| 1284 | $(TRANSLATE) $(SRCDIR)/login.c >$(OBJDIR)/login_.c |
| 1285 | |
| 1286 | $(OBJDIR)/login.o: $(OBJDIR)/login_.c $(OBJDIR)/login.h $(SRCDIR)/config.h |
| 1287 |
+10
| --- win/Makefile.msc | ||
| +++ win/Makefile.msc | ||
| @@ -160,10 +160,11 @@ | ||
| 160 | 160 | json_tag_.c \ |
| 161 | 161 | json_timeline_.c \ |
| 162 | 162 | json_user_.c \ |
| 163 | 163 | json_wiki_.c \ |
| 164 | 164 | leaf_.c \ |
| 165 | + loadctrl_.c \ | |
| 165 | 166 | login_.c \ |
| 166 | 167 | lookslike_.c \ |
| 167 | 168 | main_.c \ |
| 168 | 169 | manifest_.c \ |
| 169 | 170 | markdown_.c \ |
| @@ -270,10 +271,11 @@ | ||
| 270 | 271 | $(OX)\json_tag$O \ |
| 271 | 272 | $(OX)\json_timeline$O \ |
| 272 | 273 | $(OX)\json_user$O \ |
| 273 | 274 | $(OX)\json_wiki$O \ |
| 274 | 275 | $(OX)\leaf$O \ |
| 276 | + $(OX)\loadctrl$O \ | |
| 275 | 277 | $(OX)\login$O \ |
| 276 | 278 | $(OX)\lookslike$O \ |
| 277 | 279 | $(OX)\main$O \ |
| 278 | 280 | $(OX)\manifest$O \ |
| 279 | 281 | $(OX)\markdown$O \ |
| @@ -403,10 +405,11 @@ | ||
| 403 | 405 | echo $(OX)\json_tag.obj >> $@ |
| 404 | 406 | echo $(OX)\json_timeline.obj >> $@ |
| 405 | 407 | echo $(OX)\json_user.obj >> $@ |
| 406 | 408 | echo $(OX)\json_wiki.obj >> $@ |
| 407 | 409 | echo $(OX)\leaf.obj >> $@ |
| 410 | + echo $(OX)\loadctrl.obj >> $@ | |
| 408 | 411 | echo $(OX)\login.obj >> $@ |
| 409 | 412 | echo $(OX)\lookslike.obj >> $@ |
| 410 | 413 | echo $(OX)\main.obj >> $@ |
| 411 | 414 | echo $(OX)\manifest.obj >> $@ |
| 412 | 415 | echo $(OX)\markdown.obj >> $@ |
| @@ -864,10 +867,16 @@ | ||
| 864 | 867 | $(OX)\leaf$O : leaf_.c leaf.h |
| 865 | 868 | $(TCC) /Fo$@ -c leaf_.c |
| 866 | 869 | |
| 867 | 870 | leaf_.c : $(SRCDIR)\leaf.c |
| 868 | 871 | translate$E $** > $@ |
| 872 | + | |
| 873 | +$(OX)\loadctrl$O : loadctrl_.c loadctrl.h | |
| 874 | + $(TCC) /Fo$@ -c loadctrl_.c | |
| 875 | + | |
| 876 | +loadctrl_.c : $(SRCDIR)\loadctrl.c | |
| 877 | + translate$E $** > $@ | |
| 869 | 878 | |
| 870 | 879 | $(OX)\login$O : login_.c login.h |
| 871 | 880 | $(TCC) /Fo$@ -c login_.c |
| 872 | 881 | |
| 873 | 882 | login_.c : $(SRCDIR)\login.c |
| @@ -1247,10 +1256,11 @@ | ||
| 1247 | 1256 | json_tag_.c:json_tag.h \ |
| 1248 | 1257 | json_timeline_.c:json_timeline.h \ |
| 1249 | 1258 | json_user_.c:json_user.h \ |
| 1250 | 1259 | json_wiki_.c:json_wiki.h \ |
| 1251 | 1260 | leaf_.c:leaf.h \ |
| 1261 | + loadctrl_.c:loadctrl.h \ | |
| 1252 | 1262 | login_.c:login.h \ |
| 1253 | 1263 | lookslike_.c:lookslike.h \ |
| 1254 | 1264 | main_.c:main.h \ |
| 1255 | 1265 | manifest_.c:manifest.h \ |
| 1256 | 1266 | markdown_.c:markdown.h \ |
| 1257 | 1267 |
| --- win/Makefile.msc | |
| +++ win/Makefile.msc | |
| @@ -160,10 +160,11 @@ | |
| 160 | json_tag_.c \ |
| 161 | json_timeline_.c \ |
| 162 | json_user_.c \ |
| 163 | json_wiki_.c \ |
| 164 | leaf_.c \ |
| 165 | login_.c \ |
| 166 | lookslike_.c \ |
| 167 | main_.c \ |
| 168 | manifest_.c \ |
| 169 | markdown_.c \ |
| @@ -270,10 +271,11 @@ | |
| 270 | $(OX)\json_tag$O \ |
| 271 | $(OX)\json_timeline$O \ |
| 272 | $(OX)\json_user$O \ |
| 273 | $(OX)\json_wiki$O \ |
| 274 | $(OX)\leaf$O \ |
| 275 | $(OX)\login$O \ |
| 276 | $(OX)\lookslike$O \ |
| 277 | $(OX)\main$O \ |
| 278 | $(OX)\manifest$O \ |
| 279 | $(OX)\markdown$O \ |
| @@ -403,10 +405,11 @@ | |
| 403 | echo $(OX)\json_tag.obj >> $@ |
| 404 | echo $(OX)\json_timeline.obj >> $@ |
| 405 | echo $(OX)\json_user.obj >> $@ |
| 406 | echo $(OX)\json_wiki.obj >> $@ |
| 407 | echo $(OX)\leaf.obj >> $@ |
| 408 | echo $(OX)\login.obj >> $@ |
| 409 | echo $(OX)\lookslike.obj >> $@ |
| 410 | echo $(OX)\main.obj >> $@ |
| 411 | echo $(OX)\manifest.obj >> $@ |
| 412 | echo $(OX)\markdown.obj >> $@ |
| @@ -864,10 +867,16 @@ | |
| 864 | $(OX)\leaf$O : leaf_.c leaf.h |
| 865 | $(TCC) /Fo$@ -c leaf_.c |
| 866 | |
| 867 | leaf_.c : $(SRCDIR)\leaf.c |
| 868 | translate$E $** > $@ |
| 869 | |
| 870 | $(OX)\login$O : login_.c login.h |
| 871 | $(TCC) /Fo$@ -c login_.c |
| 872 | |
| 873 | login_.c : $(SRCDIR)\login.c |
| @@ -1247,10 +1256,11 @@ | |
| 1247 | json_tag_.c:json_tag.h \ |
| 1248 | json_timeline_.c:json_timeline.h \ |
| 1249 | json_user_.c:json_user.h \ |
| 1250 | json_wiki_.c:json_wiki.h \ |
| 1251 | leaf_.c:leaf.h \ |
| 1252 | login_.c:login.h \ |
| 1253 | lookslike_.c:lookslike.h \ |
| 1254 | main_.c:main.h \ |
| 1255 | manifest_.c:manifest.h \ |
| 1256 | markdown_.c:markdown.h \ |
| 1257 |
| --- win/Makefile.msc | |
| +++ win/Makefile.msc | |
| @@ -160,10 +160,11 @@ | |
| 160 | json_tag_.c \ |
| 161 | json_timeline_.c \ |
| 162 | json_user_.c \ |
| 163 | json_wiki_.c \ |
| 164 | leaf_.c \ |
| 165 | loadctrl_.c \ |
| 166 | login_.c \ |
| 167 | lookslike_.c \ |
| 168 | main_.c \ |
| 169 | manifest_.c \ |
| 170 | markdown_.c \ |
| @@ -270,10 +271,11 @@ | |
| 271 | $(OX)\json_tag$O \ |
| 272 | $(OX)\json_timeline$O \ |
| 273 | $(OX)\json_user$O \ |
| 274 | $(OX)\json_wiki$O \ |
| 275 | $(OX)\leaf$O \ |
| 276 | $(OX)\loadctrl$O \ |
| 277 | $(OX)\login$O \ |
| 278 | $(OX)\lookslike$O \ |
| 279 | $(OX)\main$O \ |
| 280 | $(OX)\manifest$O \ |
| 281 | $(OX)\markdown$O \ |
| @@ -403,10 +405,11 @@ | |
| 405 | echo $(OX)\json_tag.obj >> $@ |
| 406 | echo $(OX)\json_timeline.obj >> $@ |
| 407 | echo $(OX)\json_user.obj >> $@ |
| 408 | echo $(OX)\json_wiki.obj >> $@ |
| 409 | echo $(OX)\leaf.obj >> $@ |
| 410 | echo $(OX)\loadctrl.obj >> $@ |
| 411 | echo $(OX)\login.obj >> $@ |
| 412 | echo $(OX)\lookslike.obj >> $@ |
| 413 | echo $(OX)\main.obj >> $@ |
| 414 | echo $(OX)\manifest.obj >> $@ |
| 415 | echo $(OX)\markdown.obj >> $@ |
| @@ -864,10 +867,16 @@ | |
| 867 | $(OX)\leaf$O : leaf_.c leaf.h |
| 868 | $(TCC) /Fo$@ -c leaf_.c |
| 869 | |
| 870 | leaf_.c : $(SRCDIR)\leaf.c |
| 871 | translate$E $** > $@ |
| 872 | |
| 873 | $(OX)\loadctrl$O : loadctrl_.c loadctrl.h |
| 874 | $(TCC) /Fo$@ -c loadctrl_.c |
| 875 | |
| 876 | loadctrl_.c : $(SRCDIR)\loadctrl.c |
| 877 | translate$E $** > $@ |
| 878 | |
| 879 | $(OX)\login$O : login_.c login.h |
| 880 | $(TCC) /Fo$@ -c login_.c |
| 881 | |
| 882 | login_.c : $(SRCDIR)\login.c |
| @@ -1247,10 +1256,11 @@ | |
| 1256 | json_tag_.c:json_tag.h \ |
| 1257 | json_timeline_.c:json_timeline.h \ |
| 1258 | json_user_.c:json_user.h \ |
| 1259 | json_wiki_.c:json_wiki.h \ |
| 1260 | leaf_.c:leaf.h \ |
| 1261 | loadctrl_.c:loadctrl.h \ |
| 1262 | login_.c:login.h \ |
| 1263 | lookslike_.c:lookslike.h \ |
| 1264 | main_.c:main.h \ |
| 1265 | manifest_.c:manifest.h \ |
| 1266 | markdown_.c:markdown.h \ |
| 1267 |
+67
| --- www/server.wiki | ||
| +++ www/server.wiki | ||
| @@ -241,6 +241,73 @@ | ||
| 241 | 241 | <p> |
| 242 | 242 | For more information, see <a href="./ssl.wiki">Using SSL with Fossil</a>. |
| 243 | 243 | </p> |
| 244 | 244 | </blockquote> |
| 245 | 245 | |
| 246 | +<a name="loadmgmt"></a> | |
| 247 | +<h2>Managing Server Load</h2><blockquote> | |
| 248 | +<p> | |
| 249 | +A Fossil server is very efficient and normally presents a very light | |
| 250 | +load on the server. | |
| 251 | +The Fossil [./selfhost.wiki | self-host server] is a 1/24th slice VM at | |
| 252 | +[http://www.linode.com | Linode.com] hosting 65 other repositories in | |
| 253 | +addition to Fossil (and including some very high-traffic sites such | |
| 254 | +as [http://www.sqlite.org] and [http://system.data.sqlite.org]) and | |
| 255 | +it has a typical load of 0.05 to 0.1. A single HTTP request to Fossil | |
| 256 | +normally takes less than 10 milliseconds of CPU time to complete. So | |
| 257 | +requests can be arriving at a continuous rate of 20 or more per second | |
| 258 | +and the CPU can still be mostly idle. | |
| 259 | +<p> | |
| 260 | +However, there are some Fossil web pages that can consume large | |
| 261 | +amounts of CPU time, expecially on repositories with a large number | |
| 262 | +of files or with long revision histories. High CPU usage pages include | |
| 263 | +[/help?cmd=/zip | /zip], [/help?cmd=/tarball | /tarball], | |
| 264 | +[/help?cmd=/annotate | /annotate] and others. On very large repositories, | |
| 265 | +these commands can take 15 seconds or more of CPU time. | |
| 266 | +If these kinds of requests arrive too quickly, the load average on the | |
| 267 | +server can grow dramatically, making the server unresponsive. | |
| 268 | +<p> | |
| 269 | +To help avoid problems, Fossil has the ability to fail CPU-intensive | |
| 270 | +web page requests with a | |
| 271 | +[http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.3 | "503 Server Overload"] | |
| 272 | +HTTP error if an expensive request is received while the host load | |
| 273 | +average is too high. To activate this | |
| 274 | +feature, visit the /Admin/Access setup page in the administrative web | |
| 275 | +interface and in the "<b>Server Load Average Limit</b>" box | |
| 276 | +enter the load average threshold above which "503 Server | |
| 277 | +Overload" replies will be issued for expensive requests. On the | |
| 278 | +self-host Fossil server, that value is set to 1.5. But you could easily | |
| 279 | +set it higher on a multi-core server. | |
| 280 | +<p> | |
| 281 | +The maximum load average can also be set on the command line using | |
| 282 | +commands like this: | |
| 283 | +<blockquote><pre> | |
| 284 | +fossil set max-loadavg 1.5 | |
| 285 | +fossil all set max-loadavg 1.5 | |
| 286 | +</pre></blockquote> | |
| 287 | +The second form is especially useful for changing the maximum load average | |
| 288 | +simultaneously on a large number of repositories. | |
| 289 | +<p> | |
| 290 | +Note that this load-average limiting feature is only available on operating | |
| 291 | +systems that support the "getloadavg()" API. Most modern unix systems have | |
| 292 | +this interface, but Windows does not, so the feature will not work on Windows. | |
| 293 | +Note also that Linux implements "getloadavg()" by accessing the "/proc/loadavg" | |
| 294 | +file in the "proc" virtual filesystem. If you are running a Fossil instance | |
| 295 | +inside a chroot() jail on Linux, you will need to make the "/proc" file | |
| 296 | +system available inside that jail in order for this feature to work. On | |
| 297 | +the self-hosting Fossil repository, this was accomplished by adding a line | |
| 298 | +to the "/etc/mtab" file that looks like: | |
| 299 | +<blockquote><pre> | |
| 300 | +chroot_jail_proc /home/www/proc proc r 0 0 | |
| 301 | +</pre></blockquote> | |
| 302 | +Pathnames should be adjusted for individual systems, of course. | |
| 303 | +<p> | |
| 304 | +To see if the load-average limiter is functional, visit the [/test_env] page | |
| 305 | +of the server to view the current load average. If the value for the load | |
| 306 | +average is greater than zero, that means that it is possible to activate | |
| 307 | +the load-average limiter on that repository. If the load average shows | |
| 308 | +exactly "0.0", then that means that Fossil is unable to find the load average | |
| 309 | +(either because it is in a chroot() jail without /proc access, or because | |
| 310 | +it is running on a system that does not support "getloadavg()") and so the | |
| 311 | +load-average limiter will not function. | |
| 312 | + | |
| 246 | 313 | </blockquote> |
| 247 | 314 |
| --- www/server.wiki | |
| +++ www/server.wiki | |
| @@ -241,6 +241,73 @@ | |
| 241 | <p> |
| 242 | For more information, see <a href="./ssl.wiki">Using SSL with Fossil</a>. |
| 243 | </p> |
| 244 | </blockquote> |
| 245 | |
| 246 | </blockquote> |
| 247 |
| --- www/server.wiki | |
| +++ www/server.wiki | |
| @@ -241,6 +241,73 @@ | |
| 241 | <p> |
| 242 | For more information, see <a href="./ssl.wiki">Using SSL with Fossil</a>. |
| 243 | </p> |
| 244 | </blockquote> |
| 245 | |
| 246 | <a name="loadmgmt"></a> |
| 247 | <h2>Managing Server Load</h2><blockquote> |
| 248 | <p> |
| 249 | A Fossil server is very efficient and normally presents a very light |
| 250 | load on the server. |
| 251 | The Fossil [./selfhost.wiki | self-host server] is a 1/24th slice VM at |
| 252 | [http://www.linode.com | Linode.com] hosting 65 other repositories in |
| 253 | addition to Fossil (and including some very high-traffic sites such |
| 254 | as [http://www.sqlite.org] and [http://system.data.sqlite.org]) and |
| 255 | it has a typical load of 0.05 to 0.1. A single HTTP request to Fossil |
| 256 | normally takes less than 10 milliseconds of CPU time to complete. So |
| 257 | requests can be arriving at a continuous rate of 20 or more per second |
| 258 | and the CPU can still be mostly idle. |
| 259 | <p> |
| 260 | However, there are some Fossil web pages that can consume large |
| 261 | amounts of CPU time, expecially on repositories with a large number |
| 262 | of files or with long revision histories. High CPU usage pages include |
| 263 | [/help?cmd=/zip | /zip], [/help?cmd=/tarball | /tarball], |
| 264 | [/help?cmd=/annotate | /annotate] and others. On very large repositories, |
| 265 | these commands can take 15 seconds or more of CPU time. |
| 266 | If these kinds of requests arrive too quickly, the load average on the |
| 267 | server can grow dramatically, making the server unresponsive. |
| 268 | <p> |
| 269 | To help avoid problems, Fossil has the ability to fail CPU-intensive |
| 270 | web page requests with a |
| 271 | [http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.3 | "503 Server Overload"] |
| 272 | HTTP error if an expensive request is received while the host load |
| 273 | average is too high. To activate this |
| 274 | feature, visit the /Admin/Access setup page in the administrative web |
| 275 | interface and in the "<b>Server Load Average Limit</b>" box |
| 276 | enter the load average threshold above which "503 Server |
| 277 | Overload" replies will be issued for expensive requests. On the |
| 278 | self-host Fossil server, that value is set to 1.5. But you could easily |
| 279 | set it higher on a multi-core server. |
| 280 | <p> |
| 281 | The maximum load average can also be set on the command line using |
| 282 | commands like this: |
| 283 | <blockquote><pre> |
| 284 | fossil set max-loadavg 1.5 |
| 285 | fossil all set max-loadavg 1.5 |
| 286 | </pre></blockquote> |
| 287 | The second form is especially useful for changing the maximum load average |
| 288 | simultaneously on a large number of repositories. |
| 289 | <p> |
| 290 | Note that this load-average limiting feature is only available on operating |
| 291 | systems that support the "getloadavg()" API. Most modern unix systems have |
| 292 | this interface, but Windows does not, so the feature will not work on Windows. |
| 293 | Note also that Linux implements "getloadavg()" by accessing the "/proc/loadavg" |
| 294 | file in the "proc" virtual filesystem. If you are running a Fossil instance |
| 295 | inside a chroot() jail on Linux, you will need to make the "/proc" file |
| 296 | system available inside that jail in order for this feature to work. On |
| 297 | the self-hosting Fossil repository, this was accomplished by adding a line |
| 298 | to the "/etc/mtab" file that looks like: |
| 299 | <blockquote><pre> |
| 300 | chroot_jail_proc /home/www/proc proc r 0 0 |
| 301 | </pre></blockquote> |
| 302 | Pathnames should be adjusted for individual systems, of course. |
| 303 | <p> |
| 304 | To see if the load-average limiter is functional, visit the [/test_env] page |
| 305 | of the server to view the current load average. If the value for the load |
| 306 | average is greater than zero, that means that it is possible to activate |
| 307 | the load-average limiter on that repository. If the load average shows |
| 308 | exactly "0.0", then that means that Fossil is unable to find the load average |
| 309 | (either because it is in a chroot() jail without /proc access, or because |
| 310 | it is running on a system that does not support "getloadavg()") and so the |
| 311 | load-average limiter will not function. |
| 312 | |
| 313 | </blockquote> |
| 314 |