Fossil SCM
Merge updates from trunk.
Commit
629891a7759e31449d3367c150a6fb39fef13f63
Parent
0f3084cd16460f4…
27 files changed
+1
-1
+2
-2
+10
-3
+2
-2
+1
-1
+1
-1
+2
-2
+107
-59
+4
-4
+3
-3
+51
-25
+2
-2
+1
-1
+1
-1
+10
-5
+1
-1
+6
-6
+2
-2
+59
+2
-2
+2
-2
+8
-3
+8
-3
+36
-15
+3
-3
+18
-4
+2
~
Makefile.classic
~
auto.def
~
src/attach.c
~
src/browse.c
~
src/cache.c
~
src/captcha.c
~
src/import.c
~
src/info.c
~
src/main.c
~
src/main.mk
~
src/makemake.tcl
~
src/manifest.c
~
src/name.c
~
src/search.c
~
src/sqlite3.c
~
src/sqlite3.h
~
src/style.c
~
src/tag.c
~
test/merge6.test
~
win/Makefile.PellesCGMake
~
win/Makefile.dmc
~
win/Makefile.mingw
~
win/Makefile.mingw.mistachkin
~
win/Makefile.msc
~
win/fossil.rc
~
www/build.wiki
~
www/changes.wiki
+1
-1
| --- Makefile.classic | ||
| +++ Makefile.classic | ||
| @@ -25,11 +25,11 @@ | ||
| 25 | 25 | #### The suffix to add to final executable file. When cross-compiling |
| 26 | 26 | # to windows, make this ".exe". Otherwise leave it blank. |
| 27 | 27 | # |
| 28 | 28 | E = |
| 29 | 29 | |
| 30 | -#### C Compile and options for use in building executables that | |
| 30 | +#### C Compile and options for use in building executables that | |
| 31 | 31 | # will run on the target platform. This is usually the same |
| 32 | 32 | # as BCC, unless you are cross-compiling. This C compiler builds |
| 33 | 33 | # the finished binary for fossil. The BCC compiler above is used |
| 34 | 34 | # for building intermediate code-generator tools. |
| 35 | 35 | # |
| 36 | 36 |
| --- Makefile.classic | |
| +++ Makefile.classic | |
| @@ -25,11 +25,11 @@ | |
| 25 | #### The suffix to add to final executable file. When cross-compiling |
| 26 | # to windows, make this ".exe". Otherwise leave it blank. |
| 27 | # |
| 28 | E = |
| 29 | |
| 30 | #### C Compile and options for use in building executables that |
| 31 | # will run on the target platform. This is usually the same |
| 32 | # as BCC, unless you are cross-compiling. This C compiler builds |
| 33 | # the finished binary for fossil. The BCC compiler above is used |
| 34 | # for building intermediate code-generator tools. |
| 35 | # |
| 36 |
| --- Makefile.classic | |
| +++ Makefile.classic | |
| @@ -25,11 +25,11 @@ | |
| 25 | #### The suffix to add to final executable file. When cross-compiling |
| 26 | # to windows, make this ".exe". Otherwise leave it blank. |
| 27 | # |
| 28 | E = |
| 29 | |
| 30 | #### C Compile and options for use in building executables that |
| 31 | # will run on the target platform. This is usually the same |
| 32 | # as BCC, unless you are cross-compiling. This C compiler builds |
| 33 | # the finished binary for fossil. The BCC compiler above is used |
| 34 | # for building intermediate code-generator tools. |
| 35 | # |
| 36 |
M
auto.def
+2
-2
| --- auto.def | ||
| +++ auto.def | ||
| @@ -2,11 +2,11 @@ | ||
| 2 | 2 | |
| 3 | 3 | use cc cc-lib |
| 4 | 4 | |
| 5 | 5 | options { |
| 6 | 6 | with-openssl:path|auto|none |
| 7 | - => {Look for openssl in the given path, or auto or none} | |
| 7 | + => {Look for OpenSSL in the given path, or auto or none} | |
| 8 | 8 | with-zlib:path => {Look for zlib in the given path} |
| 9 | 9 | with-th1-hooks=0 => {Enable TH1 hooks for commands and web pages} |
| 10 | 10 | with-tcl:path => {Enable Tcl integration, with Tcl in the specified path} |
| 11 | 11 | with-tcl-stubs=0 => {Enable Tcl integration via stubs library mechanism} |
| 12 | 12 | with-tcl-private-stubs=0 |
| @@ -161,11 +161,11 @@ | ||
| 161 | 161 | define-append EXTRA_CFLAGS $cflags |
| 162 | 162 | define-append EXTRA_LDFLAGS $tclconfig(TCL_LD_FLAGS) |
| 163 | 163 | define FOSSIL_ENABLE_TCL |
| 164 | 164 | } |
| 165 | 165 | |
| 166 | -# Helper for openssl checking | |
| 166 | +# Helper for OpenSSL checking | |
| 167 | 167 | proc check-for-openssl {msg {cflags {}}} { |
| 168 | 168 | msg-checking "Checking for $msg..." |
| 169 | 169 | set rc 0 |
| 170 | 170 | msg-quiet cc-with [list -cflags $cflags -libs {-lssl -lcrypto}] { |
| 171 | 171 | if {[cc-check-includes openssl/ssl.h] && [cc-check-functions SSL_new]} { |
| 172 | 172 |
| --- auto.def | |
| +++ auto.def | |
| @@ -2,11 +2,11 @@ | |
| 2 | |
| 3 | use cc cc-lib |
| 4 | |
| 5 | options { |
| 6 | with-openssl:path|auto|none |
| 7 | => {Look for openssl in the given path, or auto or none} |
| 8 | with-zlib:path => {Look for zlib in the given path} |
| 9 | with-th1-hooks=0 => {Enable TH1 hooks for commands and web pages} |
| 10 | with-tcl:path => {Enable Tcl integration, with Tcl in the specified path} |
| 11 | with-tcl-stubs=0 => {Enable Tcl integration via stubs library mechanism} |
| 12 | with-tcl-private-stubs=0 |
| @@ -161,11 +161,11 @@ | |
| 161 | define-append EXTRA_CFLAGS $cflags |
| 162 | define-append EXTRA_LDFLAGS $tclconfig(TCL_LD_FLAGS) |
| 163 | define FOSSIL_ENABLE_TCL |
| 164 | } |
| 165 | |
| 166 | # Helper for openssl checking |
| 167 | proc check-for-openssl {msg {cflags {}}} { |
| 168 | msg-checking "Checking for $msg..." |
| 169 | set rc 0 |
| 170 | msg-quiet cc-with [list -cflags $cflags -libs {-lssl -lcrypto}] { |
| 171 | if {[cc-check-includes openssl/ssl.h] && [cc-check-functions SSL_new]} { |
| 172 |
| --- auto.def | |
| +++ auto.def | |
| @@ -2,11 +2,11 @@ | |
| 2 | |
| 3 | use cc cc-lib |
| 4 | |
| 5 | options { |
| 6 | with-openssl:path|auto|none |
| 7 | => {Look for OpenSSL in the given path, or auto or none} |
| 8 | with-zlib:path => {Look for zlib in the given path} |
| 9 | with-th1-hooks=0 => {Enable TH1 hooks for commands and web pages} |
| 10 | with-tcl:path => {Enable Tcl integration, with Tcl in the specified path} |
| 11 | with-tcl-stubs=0 => {Enable Tcl integration via stubs library mechanism} |
| 12 | with-tcl-private-stubs=0 |
| @@ -161,11 +161,11 @@ | |
| 161 | define-append EXTRA_CFLAGS $cflags |
| 162 | define-append EXTRA_LDFLAGS $tclconfig(TCL_LD_FLAGS) |
| 163 | define FOSSIL_ENABLE_TCL |
| 164 | } |
| 165 | |
| 166 | # Helper for OpenSSL checking |
| 167 | proc check-for-openssl {msg {cflags {}}} { |
| 168 | msg-checking "Checking for $msg..." |
| 169 | set rc 0 |
| 170 | msg-quiet cc-with [list -cflags $cflags -libs {-lssl -lcrypto}] { |
| 171 | if {[cc-check-includes openssl/ssl.h] && [cc-check-functions SSL_new]} { |
| 172 |
+10
-3
| --- src/attach.c | ||
| +++ src/attach.c | ||
| @@ -365,10 +365,12 @@ | ||
| 365 | 365 | int modPending; /* True if awaiting moderation */ |
| 366 | 366 | const char *zModAction; /* Moderation action or NULL */ |
| 367 | 367 | int isModerator; /* TRUE if user is the moderator */ |
| 368 | 368 | const char *zMime; /* MIME Type */ |
| 369 | 369 | Blob attach; /* Content of the attachment */ |
| 370 | + int fShowContent = 0; | |
| 371 | + const char *zLn = P("ln"); | |
| 370 | 372 | |
| 371 | 373 | login_check_credentials(); |
| 372 | 374 | if( !g.perm.RdTkt && !g.perm.RdWiki ){ login_needed(); return; } |
| 373 | 375 | rid = name_to_rid_www("name"); |
| 374 | 376 | if( rid==0 ){ fossil_redirect_home(); } |
| @@ -391,10 +393,12 @@ | ||
| 391 | 393 | zTarget = pAttach->zAttachTarget; |
| 392 | 394 | zSrc = pAttach->zAttachSrc; |
| 393 | 395 | ridSrc = db_int(0,"SELECT rid FROM blob WHERE uuid='%s'", zSrc); |
| 394 | 396 | zName = pAttach->zAttachName; |
| 395 | 397 | zDesc = pAttach->zComment; |
| 398 | + zMime = mimetype_from_name(zName); | |
| 399 | + fShowContent = zMime ? strncmp(zMime,"text/", 5)==0 : 0; | |
| 396 | 400 | if( validate16(zTarget, strlen(zTarget)) |
| 397 | 401 | && db_exists("SELECT 1 FROM ticket WHERE tkt_uuid='%s'", zTarget) |
| 398 | 402 | ){ |
| 399 | 403 | zTktUuid = zTarget; |
| 400 | 404 | if( !g.perm.RdTkt ){ login_needed(); return; } |
| @@ -464,10 +468,15 @@ | ||
| 464 | 468 | moderation_approve(rid); |
| 465 | 469 | } |
| 466 | 470 | } |
| 467 | 471 | style_header("Attachment Details"); |
| 468 | 472 | style_submenu_element("Raw", "Raw", "%R/artifact/%s", zUuid); |
| 473 | + if(fShowContent){ | |
| 474 | + style_submenu_element("Line Numbers", "Line Numbers", | |
| 475 | + "%R/ainfo/%s%s",zUuid, | |
| 476 | + ((zLn&&*zLn) ? "" : "?ln=0")); | |
| 477 | + } | |
| 469 | 478 | |
| 470 | 479 | @ <div class="section">Overview</div> |
| 471 | 480 | @ <p><table class="label-value"> |
| 472 | 481 | @ <tr><th>Artifact ID:</th> |
| 473 | 482 | @ <td>%z(href("%R/artifact/%s",zUuid))%s(zUuid)</a> |
| @@ -494,11 +503,10 @@ | ||
| 494 | 503 | @ <td>%z(href("%R/artifact/%s",zSrc))%s(zSrc)</a> |
| 495 | 504 | if( g.perm.Setup ){ |
| 496 | 505 | @ (%d(ridSrc)) |
| 497 | 506 | } |
| 498 | 507 | @ <tr><th>Filename:</th><td>%h(zName)</td></tr> |
| 499 | - zMime = mimetype_from_name(zName); | |
| 500 | 508 | if( g.perm.Setup ){ |
| 501 | 509 | @ <tr><th>MIME-Type:</th><td>%h(zMime)</td></tr> |
| 502 | 510 | } |
| 503 | 511 | @ <tr><th valign="top">Description:</th><td valign="top">%h(zDesc)</td></tr> |
| 504 | 512 | @ </table> |
| @@ -517,13 +525,12 @@ | ||
| 517 | 525 | } |
| 518 | 526 | |
| 519 | 527 | @ <div class="section">Content Appended</div> |
| 520 | 528 | @ <blockquote> |
| 521 | 529 | blob_zero(&attach); |
| 522 | - if( zMime==0 || strncmp(zMime,"text/", 5)==0 ){ | |
| 530 | + if( fShowContent ){ | |
| 523 | 531 | const char *z; |
| 524 | - const char *zLn = P("ln"); | |
| 525 | 532 | content_get(ridSrc, &attach); |
| 526 | 533 | blob_to_utf8_no_bom(&attach, 0); |
| 527 | 534 | z = blob_str(&attach); |
| 528 | 535 | if( zLn ){ |
| 529 | 536 | output_text_with_line_numbers(z, zLn); |
| 530 | 537 |
| --- src/attach.c | |
| +++ src/attach.c | |
| @@ -365,10 +365,12 @@ | |
| 365 | int modPending; /* True if awaiting moderation */ |
| 366 | const char *zModAction; /* Moderation action or NULL */ |
| 367 | int isModerator; /* TRUE if user is the moderator */ |
| 368 | const char *zMime; /* MIME Type */ |
| 369 | Blob attach; /* Content of the attachment */ |
| 370 | |
| 371 | login_check_credentials(); |
| 372 | if( !g.perm.RdTkt && !g.perm.RdWiki ){ login_needed(); return; } |
| 373 | rid = name_to_rid_www("name"); |
| 374 | if( rid==0 ){ fossil_redirect_home(); } |
| @@ -391,10 +393,12 @@ | |
| 391 | zTarget = pAttach->zAttachTarget; |
| 392 | zSrc = pAttach->zAttachSrc; |
| 393 | ridSrc = db_int(0,"SELECT rid FROM blob WHERE uuid='%s'", zSrc); |
| 394 | zName = pAttach->zAttachName; |
| 395 | zDesc = pAttach->zComment; |
| 396 | if( validate16(zTarget, strlen(zTarget)) |
| 397 | && db_exists("SELECT 1 FROM ticket WHERE tkt_uuid='%s'", zTarget) |
| 398 | ){ |
| 399 | zTktUuid = zTarget; |
| 400 | if( !g.perm.RdTkt ){ login_needed(); return; } |
| @@ -464,10 +468,15 @@ | |
| 464 | moderation_approve(rid); |
| 465 | } |
| 466 | } |
| 467 | style_header("Attachment Details"); |
| 468 | style_submenu_element("Raw", "Raw", "%R/artifact/%s", zUuid); |
| 469 | |
| 470 | @ <div class="section">Overview</div> |
| 471 | @ <p><table class="label-value"> |
| 472 | @ <tr><th>Artifact ID:</th> |
| 473 | @ <td>%z(href("%R/artifact/%s",zUuid))%s(zUuid)</a> |
| @@ -494,11 +503,10 @@ | |
| 494 | @ <td>%z(href("%R/artifact/%s",zSrc))%s(zSrc)</a> |
| 495 | if( g.perm.Setup ){ |
| 496 | @ (%d(ridSrc)) |
| 497 | } |
| 498 | @ <tr><th>Filename:</th><td>%h(zName)</td></tr> |
| 499 | zMime = mimetype_from_name(zName); |
| 500 | if( g.perm.Setup ){ |
| 501 | @ <tr><th>MIME-Type:</th><td>%h(zMime)</td></tr> |
| 502 | } |
| 503 | @ <tr><th valign="top">Description:</th><td valign="top">%h(zDesc)</td></tr> |
| 504 | @ </table> |
| @@ -517,13 +525,12 @@ | |
| 517 | } |
| 518 | |
| 519 | @ <div class="section">Content Appended</div> |
| 520 | @ <blockquote> |
| 521 | blob_zero(&attach); |
| 522 | if( zMime==0 || strncmp(zMime,"text/", 5)==0 ){ |
| 523 | const char *z; |
| 524 | const char *zLn = P("ln"); |
| 525 | content_get(ridSrc, &attach); |
| 526 | blob_to_utf8_no_bom(&attach, 0); |
| 527 | z = blob_str(&attach); |
| 528 | if( zLn ){ |
| 529 | output_text_with_line_numbers(z, zLn); |
| 530 |
| --- src/attach.c | |
| +++ src/attach.c | |
| @@ -365,10 +365,12 @@ | |
| 365 | int modPending; /* True if awaiting moderation */ |
| 366 | const char *zModAction; /* Moderation action or NULL */ |
| 367 | int isModerator; /* TRUE if user is the moderator */ |
| 368 | const char *zMime; /* MIME Type */ |
| 369 | Blob attach; /* Content of the attachment */ |
| 370 | int fShowContent = 0; |
| 371 | const char *zLn = P("ln"); |
| 372 | |
| 373 | login_check_credentials(); |
| 374 | if( !g.perm.RdTkt && !g.perm.RdWiki ){ login_needed(); return; } |
| 375 | rid = name_to_rid_www("name"); |
| 376 | if( rid==0 ){ fossil_redirect_home(); } |
| @@ -391,10 +393,12 @@ | |
| 393 | zTarget = pAttach->zAttachTarget; |
| 394 | zSrc = pAttach->zAttachSrc; |
| 395 | ridSrc = db_int(0,"SELECT rid FROM blob WHERE uuid='%s'", zSrc); |
| 396 | zName = pAttach->zAttachName; |
| 397 | zDesc = pAttach->zComment; |
| 398 | zMime = mimetype_from_name(zName); |
| 399 | fShowContent = zMime ? strncmp(zMime,"text/", 5)==0 : 0; |
| 400 | if( validate16(zTarget, strlen(zTarget)) |
| 401 | && db_exists("SELECT 1 FROM ticket WHERE tkt_uuid='%s'", zTarget) |
| 402 | ){ |
| 403 | zTktUuid = zTarget; |
| 404 | if( !g.perm.RdTkt ){ login_needed(); return; } |
| @@ -464,10 +468,15 @@ | |
| 468 | moderation_approve(rid); |
| 469 | } |
| 470 | } |
| 471 | style_header("Attachment Details"); |
| 472 | style_submenu_element("Raw", "Raw", "%R/artifact/%s", zUuid); |
| 473 | if(fShowContent){ |
| 474 | style_submenu_element("Line Numbers", "Line Numbers", |
| 475 | "%R/ainfo/%s%s",zUuid, |
| 476 | ((zLn&&*zLn) ? "" : "?ln=0")); |
| 477 | } |
| 478 | |
| 479 | @ <div class="section">Overview</div> |
| 480 | @ <p><table class="label-value"> |
| 481 | @ <tr><th>Artifact ID:</th> |
| 482 | @ <td>%z(href("%R/artifact/%s",zUuid))%s(zUuid)</a> |
| @@ -494,11 +503,10 @@ | |
| 503 | @ <td>%z(href("%R/artifact/%s",zSrc))%s(zSrc)</a> |
| 504 | if( g.perm.Setup ){ |
| 505 | @ (%d(ridSrc)) |
| 506 | } |
| 507 | @ <tr><th>Filename:</th><td>%h(zName)</td></tr> |
| 508 | if( g.perm.Setup ){ |
| 509 | @ <tr><th>MIME-Type:</th><td>%h(zMime)</td></tr> |
| 510 | } |
| 511 | @ <tr><th valign="top">Description:</th><td valign="top">%h(zDesc)</td></tr> |
| 512 | @ </table> |
| @@ -517,13 +525,12 @@ | |
| 525 | } |
| 526 | |
| 527 | @ <div class="section">Content Appended</div> |
| 528 | @ <blockquote> |
| 529 | blob_zero(&attach); |
| 530 | if( fShowContent ){ |
| 531 | const char *z; |
| 532 | content_get(ridSrc, &attach); |
| 533 | blob_to_utf8_no_bom(&attach, 0); |
| 534 | z = blob_str(&attach); |
| 535 | if( zLn ){ |
| 536 | output_text_with_line_numbers(z, zLn); |
| 537 |
+2
-2
| --- src/browse.c | ||
| +++ src/browse.c | ||
| @@ -732,11 +732,11 @@ | ||
| 732 | 732 | ** temporary table named "fileage" that contains the file-id for each |
| 733 | 733 | ** files, the pathname, the check-in where the file was added, and the |
| 734 | 734 | ** mtime on that checkin. If zGlob and *zGlob then only files matching |
| 735 | 735 | ** the given glob are computed. |
| 736 | 736 | */ |
| 737 | -int compute_fileage(int vid, char const * zGlob){ | |
| 737 | +int compute_fileage(int vid, const char* zGlob){ | |
| 738 | 738 | Manifest *pManifest; |
| 739 | 739 | ManifestFile *pFile; |
| 740 | 740 | int nFile = 0; |
| 741 | 741 | double vmtime; |
| 742 | 742 | Stmt ins; |
| @@ -815,11 +815,11 @@ | ||
| 815 | 815 | */ |
| 816 | 816 | void fileage_page(void){ |
| 817 | 817 | int rid; |
| 818 | 818 | const char *zName; |
| 819 | 819 | char *zBaseTime; |
| 820 | - char const * zGlob; | |
| 820 | + const char *zGlob; | |
| 821 | 821 | Stmt q; |
| 822 | 822 | double baseTime; |
| 823 | 823 | int lastMid = -1; |
| 824 | 824 | login_check_credentials(); |
| 825 | 825 | if( !g.perm.Read ){ login_needed(); return; } |
| 826 | 826 |
| --- src/browse.c | |
| +++ src/browse.c | |
| @@ -732,11 +732,11 @@ | |
| 732 | ** temporary table named "fileage" that contains the file-id for each |
| 733 | ** files, the pathname, the check-in where the file was added, and the |
| 734 | ** mtime on that checkin. If zGlob and *zGlob then only files matching |
| 735 | ** the given glob are computed. |
| 736 | */ |
| 737 | int compute_fileage(int vid, char const * zGlob){ |
| 738 | Manifest *pManifest; |
| 739 | ManifestFile *pFile; |
| 740 | int nFile = 0; |
| 741 | double vmtime; |
| 742 | Stmt ins; |
| @@ -815,11 +815,11 @@ | |
| 815 | */ |
| 816 | void fileage_page(void){ |
| 817 | int rid; |
| 818 | const char *zName; |
| 819 | char *zBaseTime; |
| 820 | char const * zGlob; |
| 821 | Stmt q; |
| 822 | double baseTime; |
| 823 | int lastMid = -1; |
| 824 | login_check_credentials(); |
| 825 | if( !g.perm.Read ){ login_needed(); return; } |
| 826 |
| --- src/browse.c | |
| +++ src/browse.c | |
| @@ -732,11 +732,11 @@ | |
| 732 | ** temporary table named "fileage" that contains the file-id for each |
| 733 | ** files, the pathname, the check-in where the file was added, and the |
| 734 | ** mtime on that checkin. If zGlob and *zGlob then only files matching |
| 735 | ** the given glob are computed. |
| 736 | */ |
| 737 | int compute_fileage(int vid, const char* zGlob){ |
| 738 | Manifest *pManifest; |
| 739 | ManifestFile *pFile; |
| 740 | int nFile = 0; |
| 741 | double vmtime; |
| 742 | Stmt ins; |
| @@ -815,11 +815,11 @@ | |
| 815 | */ |
| 816 | void fileage_page(void){ |
| 817 | int rid; |
| 818 | const char *zName; |
| 819 | char *zBaseTime; |
| 820 | const char *zGlob; |
| 821 | Stmt q; |
| 822 | double baseTime; |
| 823 | int lastMid = -1; |
| 824 | login_check_credentials(); |
| 825 | if( !g.perm.Read ){ login_needed(); return; } |
| 826 |
+1
-1
| --- src/cache.c | ||
| +++ src/cache.c | ||
| @@ -346,11 +346,11 @@ | ||
| 346 | 346 | " ORDER BY tm DESC" |
| 347 | 347 | ); |
| 348 | 348 | if( pStmt ){ |
| 349 | 349 | @ <ol> |
| 350 | 350 | while( sqlite3_step(pStmt)==SQLITE_ROW ){ |
| 351 | - const char *zName = sqlite3_column_text(pStmt,0); | |
| 351 | + const unsigned char *zName = sqlite3_column_text(pStmt,0); | |
| 352 | 352 | @ <li><p>%z(href("%R/cacheget?key=%T",zName))%h(zName)</a><br> |
| 353 | 353 | @ size: %s(sqlite3_column_text(pStmt,1)) |
| 354 | 354 | @ hit-count: %d(sqlite3_column_int(pStmt,2)) |
| 355 | 355 | @ last-access: %s(sqlite3_column_text(pStmt,3))</p></li> |
| 356 | 356 | } |
| 357 | 357 |
| --- src/cache.c | |
| +++ src/cache.c | |
| @@ -346,11 +346,11 @@ | |
| 346 | " ORDER BY tm DESC" |
| 347 | ); |
| 348 | if( pStmt ){ |
| 349 | @ <ol> |
| 350 | while( sqlite3_step(pStmt)==SQLITE_ROW ){ |
| 351 | const char *zName = sqlite3_column_text(pStmt,0); |
| 352 | @ <li><p>%z(href("%R/cacheget?key=%T",zName))%h(zName)</a><br> |
| 353 | @ size: %s(sqlite3_column_text(pStmt,1)) |
| 354 | @ hit-count: %d(sqlite3_column_int(pStmt,2)) |
| 355 | @ last-access: %s(sqlite3_column_text(pStmt,3))</p></li> |
| 356 | } |
| 357 |
| --- src/cache.c | |
| +++ src/cache.c | |
| @@ -346,11 +346,11 @@ | |
| 346 | " ORDER BY tm DESC" |
| 347 | ); |
| 348 | if( pStmt ){ |
| 349 | @ <ol> |
| 350 | while( sqlite3_step(pStmt)==SQLITE_ROW ){ |
| 351 | const unsigned char *zName = sqlite3_column_text(pStmt,0); |
| 352 | @ <li><p>%z(href("%R/cacheget?key=%T",zName))%h(zName)</a><br> |
| 353 | @ size: %s(sqlite3_column_text(pStmt,1)) |
| 354 | @ hit-count: %d(sqlite3_column_int(pStmt,2)) |
| 355 | @ last-access: %s(sqlite3_column_text(pStmt,3))</p></li> |
| 356 | } |
| 357 |
+1
-1
| --- src/captcha.c | ||
| +++ src/captcha.c | ||
| @@ -448,11 +448,11 @@ | ||
| 448 | 448 | /* |
| 449 | 449 | ** Translate a captcha seed value into the captcha password string. |
| 450 | 450 | ** The returned string is static and overwritten on each call to |
| 451 | 451 | ** this function. |
| 452 | 452 | */ |
| 453 | -char const *captcha_decode(unsigned int seed){ | |
| 453 | +const char *captcha_decode(unsigned int seed){ | |
| 454 | 454 | const char *zSecret; |
| 455 | 455 | const char *z; |
| 456 | 456 | Blob b; |
| 457 | 457 | static char zRes[20]; |
| 458 | 458 | |
| 459 | 459 |
| --- src/captcha.c | |
| +++ src/captcha.c | |
| @@ -448,11 +448,11 @@ | |
| 448 | /* |
| 449 | ** Translate a captcha seed value into the captcha password string. |
| 450 | ** The returned string is static and overwritten on each call to |
| 451 | ** this function. |
| 452 | */ |
| 453 | char const *captcha_decode(unsigned int seed){ |
| 454 | const char *zSecret; |
| 455 | const char *z; |
| 456 | Blob b; |
| 457 | static char zRes[20]; |
| 458 | |
| 459 |
| --- src/captcha.c | |
| +++ src/captcha.c | |
| @@ -448,11 +448,11 @@ | |
| 448 | /* |
| 449 | ** Translate a captcha seed value into the captcha password string. |
| 450 | ** The returned string is static and overwritten on each call to |
| 451 | ** this function. |
| 452 | */ |
| 453 | const char *captcha_decode(unsigned int seed){ |
| 454 | const char *zSecret; |
| 455 | const char *z; |
| 456 | Blob b; |
| 457 | static char zRes[20]; |
| 458 | |
| 459 |
+2
-2
| --- src/import.c | ||
| +++ src/import.c | ||
| @@ -214,12 +214,12 @@ | ||
| 214 | 214 | |
| 215 | 215 | /* |
| 216 | 216 | ** Compare two strings for sorting. |
| 217 | 217 | */ |
| 218 | 218 | static int string_cmp(const void *pLeft, const void *pRight){ |
| 219 | - const char *zLeft = *(char const **)pLeft; | |
| 220 | - const char *zRight = *(char const **)pRight; | |
| 219 | + const char *zLeft = *(const char **)pLeft; | |
| 220 | + const char *zRight = *(const char **)pRight; | |
| 221 | 221 | return fossil_strcmp(zLeft, zRight); |
| 222 | 222 | } |
| 223 | 223 | |
| 224 | 224 | /* Forward reference */ |
| 225 | 225 | static void import_prior_files(void); |
| 226 | 226 |
| --- src/import.c | |
| +++ src/import.c | |
| @@ -214,12 +214,12 @@ | |
| 214 | |
| 215 | /* |
| 216 | ** Compare two strings for sorting. |
| 217 | */ |
| 218 | static int string_cmp(const void *pLeft, const void *pRight){ |
| 219 | const char *zLeft = *(char const **)pLeft; |
| 220 | const char *zRight = *(char const **)pRight; |
| 221 | return fossil_strcmp(zLeft, zRight); |
| 222 | } |
| 223 | |
| 224 | /* Forward reference */ |
| 225 | static void import_prior_files(void); |
| 226 |
| --- src/import.c | |
| +++ src/import.c | |
| @@ -214,12 +214,12 @@ | |
| 214 | |
| 215 | /* |
| 216 | ** Compare two strings for sorting. |
| 217 | */ |
| 218 | static int string_cmp(const void *pLeft, const void *pRight){ |
| 219 | const char *zLeft = *(const char **)pLeft; |
| 220 | const char *zRight = *(const char **)pRight; |
| 221 | return fossil_strcmp(zLeft, zRight); |
| 222 | } |
| 223 | |
| 224 | /* Forward reference */ |
| 225 | static void import_prior_files(void); |
| 226 |
+107
-59
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -197,11 +197,11 @@ | ||
| 197 | 197 | i64 fsize; |
| 198 | 198 | int verboseFlag = find_option("verbose","v",0)!=0; |
| 199 | 199 | if( !verboseFlag ){ |
| 200 | 200 | verboseFlag = find_option("detail","l",0)!=0; /* deprecated */ |
| 201 | 201 | } |
| 202 | - | |
| 202 | + | |
| 203 | 203 | /* We should be done with options.. */ |
| 204 | 204 | verify_all_options(); |
| 205 | 205 | |
| 206 | 206 | if( g.argc==3 && (fsize = file_size(g.argv[2]))>0 && (fsize&0x1ff)==0 ){ |
| 207 | 207 | db_open_config(0); |
| @@ -1065,28 +1065,28 @@ | ||
| 1065 | 1065 | cmp = -1; |
| 1066 | 1066 | }else{ |
| 1067 | 1067 | cmp = fossil_strcmp(pFileFrom->zName, pFileTo->zName); |
| 1068 | 1068 | } |
| 1069 | 1069 | if( cmp<0 ){ |
| 1070 | - if(!zGlob || strglob(zGlob, pFileFrom->zName)){ | |
| 1070 | + if( !zGlob || sqlite3_strglob(zGlob, pFileFrom->zName)==0 ){ | |
| 1071 | 1071 | append_file_change_line(pFileFrom->zName, |
| 1072 | 1072 | pFileFrom->zUuid, 0, 0, diffFlags, pRe, 0); |
| 1073 | 1073 | } |
| 1074 | 1074 | pFileFrom = manifest_file_next(pFrom, 0); |
| 1075 | 1075 | }else if( cmp>0 ){ |
| 1076 | - if(!zGlob || strglob(zGlob, pFileTo->zName)){ | |
| 1076 | + if( !zGlob || sqlite3_strglob(zGlob, pFileTo->zName)==0 ){ | |
| 1077 | 1077 | append_file_change_line(pFileTo->zName, |
| 1078 | 1078 | 0, pFileTo->zUuid, 0, diffFlags, pRe, |
| 1079 | 1079 | manifest_file_mperm(pFileTo)); |
| 1080 | 1080 | } |
| 1081 | 1081 | pFileTo = manifest_file_next(pTo, 0); |
| 1082 | 1082 | }else if( fossil_strcmp(pFileFrom->zUuid, pFileTo->zUuid)==0 ){ |
| 1083 | 1083 | pFileFrom = manifest_file_next(pFrom, 0); |
| 1084 | 1084 | pFileTo = manifest_file_next(pTo, 0); |
| 1085 | 1085 | }else{ |
| 1086 | - if(!zGlob || (strglob(zGlob, pFileFrom->zName) | |
| 1087 | - || strglob(zGlob, pFileTo->zName))){ | |
| 1086 | + if(!zGlob || (sqlite3_strglob(zGlob, pFileFrom->zName)==0 | |
| 1087 | + || sqlite3_strglob(zGlob, pFileTo->zName)==0) ){ | |
| 1088 | 1088 | append_file_change_line(pFileFrom->zName, |
| 1089 | 1089 | pFileFrom->zUuid, |
| 1090 | 1090 | pFileTo->zUuid, 0, diffFlags, pRe, |
| 1091 | 1091 | manifest_file_mperm(pFileTo)); |
| 1092 | 1092 | } |
| @@ -1111,10 +1111,16 @@ | ||
| 1111 | 1111 | #define OBJTYPE_ATTACHMENT 0x0010 |
| 1112 | 1112 | #define OBJTYPE_EVENT 0x0020 |
| 1113 | 1113 | #define OBJTYPE_TAG 0x0040 |
| 1114 | 1114 | #define OBJTYPE_SYMLINK 0x0080 |
| 1115 | 1115 | #define OBJTYPE_EXE 0x0100 |
| 1116 | + | |
| 1117 | +/* | |
| 1118 | +** Possible flags for the second parameter to | |
| 1119 | +** object_description() | |
| 1120 | +*/ | |
| 1121 | +#define OBJDESC_DETAIL 0x0001 /* more detail */ | |
| 1116 | 1122 | #endif |
| 1117 | 1123 | |
| 1118 | 1124 | /* |
| 1119 | 1125 | ** Write a description of an object to the www reply. |
| 1120 | 1126 | ** |
| @@ -1130,19 +1136,19 @@ | ||
| 1130 | 1136 | ** * date of check-in |
| 1131 | 1137 | ** * Comment & user |
| 1132 | 1138 | */ |
| 1133 | 1139 | int object_description( |
| 1134 | 1140 | int rid, /* The artifact ID */ |
| 1135 | - int linkToView, /* Add viewer link if true */ | |
| 1141 | + u32 objdescFlags, /* Flags to control display */ | |
| 1136 | 1142 | Blob *pDownloadName /* Fill with an appropriate download name */ |
| 1137 | 1143 | ){ |
| 1138 | 1144 | Stmt q; |
| 1139 | 1145 | int cnt = 0; |
| 1140 | 1146 | int nWiki = 0; |
| 1141 | 1147 | int objType = 0; |
| 1142 | 1148 | char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 1143 | - | |
| 1149 | + int showDetail = (objdescFlags & OBJDESC_DETAIL)!=0; | |
| 1144 | 1150 | char *prevName = 0; |
| 1145 | 1151 | |
| 1146 | 1152 | db_prepare(&q, |
| 1147 | 1153 | "SELECT filename.name, datetime(event.mtime)," |
| 1148 | 1154 | " coalesce(event.ecomment,event.comment)," |
| @@ -1166,11 +1172,19 @@ | ||
| 1166 | 1172 | const char *zCom = db_column_text(&q, 2); |
| 1167 | 1173 | const char *zUser = db_column_text(&q, 3); |
| 1168 | 1174 | const char *zVers = db_column_text(&q, 4); |
| 1169 | 1175 | int mPerm = db_column_int(&q, 5); |
| 1170 | 1176 | const char *zBr = db_column_text(&q, 6); |
| 1171 | - if( !prevName || fossil_strcmp(zName, prevName) ) { | |
| 1177 | + int sameFilename = prevName!=0 && fossil_strcmp(zName,prevName)==0; | |
| 1178 | + if( sameFilename && !showDetail ){ | |
| 1179 | + if( cnt==1 ){ | |
| 1180 | + @ %z(href("%R/whatis/%s",zUuid))[more...]</a> | |
| 1181 | + } | |
| 1182 | + cnt++; | |
| 1183 | + continue; | |
| 1184 | + } | |
| 1185 | + if( !sameFilename ){ | |
| 1172 | 1186 | if( prevName ) { |
| 1173 | 1187 | @ </ul> |
| 1174 | 1188 | } |
| 1175 | 1189 | if( mPerm==PERM_LNK ){ |
| 1176 | 1190 | @ <li>Symbolic link |
| @@ -1181,21 +1195,30 @@ | ||
| 1181 | 1195 | }else{ |
| 1182 | 1196 | @ <li>File |
| 1183 | 1197 | } |
| 1184 | 1198 | objType |= OBJTYPE_CONTENT; |
| 1185 | 1199 | @ %z(href("%R/finfo?name=%T",zName))%h(zName)</a> |
| 1186 | - @ <ul> | |
| 1200 | + if( showDetail ){ | |
| 1201 | + @ <ul> | |
| 1202 | + } | |
| 1187 | 1203 | prevName = fossil_strdup(zName); |
| 1188 | 1204 | } |
| 1189 | - @ <li> | |
| 1190 | - hyperlink_to_date(zDate,""); | |
| 1191 | - @ - part of checkin | |
| 1192 | - hyperlink_to_uuid(zVers); | |
| 1205 | + if( showDetail ){ | |
| 1206 | + @ <li> | |
| 1207 | + hyperlink_to_date(zDate,""); | |
| 1208 | + @ — part of check-in | |
| 1209 | + hyperlink_to_uuid(zVers); | |
| 1210 | + }else{ | |
| 1211 | + @ — part of checkin | |
| 1212 | + hyperlink_to_uuid(zVers); | |
| 1213 | + @ at | |
| 1214 | + hyperlink_to_date(zDate,""); | |
| 1215 | + } | |
| 1193 | 1216 | if( zBr && zBr[0] ){ |
| 1194 | 1217 | @ on branch %z(href("%R/timeline?r=%T",zBr))%h(zBr)</a> |
| 1195 | 1218 | } |
| 1196 | - @ - %!w(zCom) (user: | |
| 1219 | + @ — %!w(zCom) (user: | |
| 1197 | 1220 | hyperlink_to_user(zUser,zDate,")"); |
| 1198 | 1221 | if( g.perm.Hyperlink ){ |
| 1199 | 1222 | @ %z(href("%R/finfo?name=%T&ci=%s",zName,zVers))[ancestry]</a> |
| 1200 | 1223 | @ %z(href("%R/annotate?filename=%T&checkin=%s",zName,zVers)) |
| 1201 | 1224 | @ [annotate]</a> |
| @@ -1205,11 +1228,11 @@ | ||
| 1205 | 1228 | cnt++; |
| 1206 | 1229 | if( pDownloadName && blob_size(pDownloadName)==0 ){ |
| 1207 | 1230 | blob_append(pDownloadName, zName, -1); |
| 1208 | 1231 | } |
| 1209 | 1232 | } |
| 1210 | - if( prevName ){ | |
| 1233 | + if( prevName && showDetail ){ | |
| 1211 | 1234 | @ </ul> |
| 1212 | 1235 | } |
| 1213 | 1236 | @ </ul> |
| 1214 | 1237 | free(prevName); |
| 1215 | 1238 | db_finalize(&q); |
| @@ -1333,12 +1356,10 @@ | ||
| 1333 | 1356 | if( cnt==0 ){ |
| 1334 | 1357 | @ Control artifact. |
| 1335 | 1358 | if( pDownloadName && blob_size(pDownloadName)==0 ){ |
| 1336 | 1359 | blob_appendf(pDownloadName, "%.10s.txt", zUuid); |
| 1337 | 1360 | } |
| 1338 | - }else if( linkToView && g.perm.Hyperlink ){ | |
| 1339 | - @ %z(href("%R/artifact/%s",zUuid))[view]</a> | |
| 1340 | 1361 | } |
| 1341 | 1362 | return objType; |
| 1342 | 1363 | } |
| 1343 | 1364 | |
| 1344 | 1365 | |
| @@ -1347,10 +1368,14 @@ | ||
| 1347 | 1368 | ** URL: fdiff?v1=UUID&v2=UUID&patch&sbs=BOOLEAN®ex=REGEX |
| 1348 | 1369 | ** |
| 1349 | 1370 | ** Two arguments, v1 and v2, identify the files to be diffed. Show the |
| 1350 | 1371 | ** difference between the two artifacts. Show diff side by side unless sbs |
| 1351 | 1372 | ** is 0. Generate plaintext if "patch" is present. |
| 1373 | +** | |
| 1374 | +** Additional parameters: | |
| 1375 | +** | |
| 1376 | +** verbose Show more detail when describing artifacts | |
| 1352 | 1377 | */ |
| 1353 | 1378 | void diff_page(void){ |
| 1354 | 1379 | int v1, v2; |
| 1355 | 1380 | int isPatch; |
| 1356 | 1381 | int sideBySide; |
| @@ -1358,18 +1383,20 @@ | ||
| 1358 | 1383 | char *zV2; |
| 1359 | 1384 | const char *zRe; |
| 1360 | 1385 | const char *zW; /* URL param for ignoring whitespace */ |
| 1361 | 1386 | ReCompiled *pRe = 0; |
| 1362 | 1387 | u64 diffFlags; |
| 1388 | + u32 objdescFlags = 0; | |
| 1363 | 1389 | |
| 1364 | 1390 | login_check_credentials(); |
| 1365 | 1391 | if( !g.perm.Read ){ login_needed(); return; } |
| 1366 | 1392 | v1 = name_to_rid_www("v1"); |
| 1367 | 1393 | v2 = name_to_rid_www("v2"); |
| 1368 | 1394 | if( v1==0 || v2==0 ) fossil_redirect_home(); |
| 1369 | 1395 | zRe = P("regex"); |
| 1370 | 1396 | if( zRe ) re_compile(&pRe, zRe, 0); |
| 1397 | + if( P("verbose")!=0 ) objdescFlags |= OBJDESC_DETAIL; | |
| 1371 | 1398 | isPatch = P("patch")!=0; |
| 1372 | 1399 | if( isPatch ){ |
| 1373 | 1400 | Blob c1, c2, *pOut; |
| 1374 | 1401 | pOut = cgi_output_blob(); |
| 1375 | 1402 | cgi_set_content_type("text/plain"); |
| @@ -1415,13 +1442,13 @@ | ||
| 1415 | 1442 | @ %z(href("%R/artifact/%s",zV1))[%S(zV1)]</a> To |
| 1416 | 1443 | @ %z(href("%R/artifact/%s",zV2))[%S(zV2)]</a>.</h2> |
| 1417 | 1444 | }else{ |
| 1418 | 1445 | @ <h2>Differences From |
| 1419 | 1446 | @ Artifact %z(href("%R/artifact/%s",zV1))[%S(zV1)]</a>:</h2> |
| 1420 | - object_description(v1, 0, 0); | |
| 1447 | + object_description(v1, objdescFlags, 0); | |
| 1421 | 1448 | @ <h2>To Artifact %z(href("%R/artifact/%s",zV2))[%S(zV2)]</a>:</h2> |
| 1422 | - object_description(v2, 0, 0); | |
| 1449 | + object_description(v2, objdescFlags, 0); | |
| 1423 | 1450 | } |
| 1424 | 1451 | if( pRe ){ |
| 1425 | 1452 | @ <b>Only differences that match regular expression "%h(zRe)" |
| 1426 | 1453 | @ are shown.</b> |
| 1427 | 1454 | } |
| @@ -1527,16 +1554,21 @@ | ||
| 1527 | 1554 | ** WEBPAGE: hexdump |
| 1528 | 1555 | ** URL: /hexdump?name=ARTIFACTID |
| 1529 | 1556 | ** |
| 1530 | 1557 | ** Show the complete content of a file identified by ARTIFACTID |
| 1531 | 1558 | ** as preformatted text. |
| 1559 | +** | |
| 1560 | +** Other parameters: | |
| 1561 | +** | |
| 1562 | +** verbose Show more detail when describing the object | |
| 1532 | 1563 | */ |
| 1533 | 1564 | void hexdump_page(void){ |
| 1534 | 1565 | int rid; |
| 1535 | 1566 | Blob content; |
| 1536 | 1567 | Blob downloadName; |
| 1537 | 1568 | char *zUuid; |
| 1569 | + u32 objdescFlags = 0; | |
| 1538 | 1570 | |
| 1539 | 1571 | rid = name_to_rid_www("name"); |
| 1540 | 1572 | login_check_credentials(); |
| 1541 | 1573 | if( !g.perm.Read ){ login_needed(); return; } |
| 1542 | 1574 | if( rid==0 ) fossil_redirect_home(); |
| @@ -1556,11 +1588,12 @@ | ||
| 1556 | 1588 | @ <h2>Artifact %s(zUuid) (%d(rid)):</h2> |
| 1557 | 1589 | }else{ |
| 1558 | 1590 | @ <h2>Artifact %s(zUuid):</h2> |
| 1559 | 1591 | } |
| 1560 | 1592 | blob_zero(&downloadName); |
| 1561 | - object_description(rid, 0, &downloadName); | |
| 1593 | + if( P("verbose")!=0 ) objdescFlags |= OBJDESC_DETAIL; | |
| 1594 | + object_description(rid, objdescFlags, &downloadName); | |
| 1562 | 1595 | style_submenu_element("Download", "Download", |
| 1563 | 1596 | "%s/raw/%T?name=%s", g.zTop, blob_str(&downloadName), zUuid); |
| 1564 | 1597 | @ <hr /> |
| 1565 | 1598 | content_get(rid, &content); |
| 1566 | 1599 | @ <blockquote><pre> |
| @@ -1681,22 +1714,27 @@ | ||
| 1681 | 1714 | } |
| 1682 | 1715 | } |
| 1683 | 1716 | |
| 1684 | 1717 | |
| 1685 | 1718 | /* |
| 1719 | +** WEBPAGE: whatis | |
| 1686 | 1720 | ** WEBPAGE: artifact |
| 1687 | -** URL: /artifact/ARTIFACTID | |
| 1721 | +** | |
| 1722 | +** URL: /artifact/SHA1HASH | |
| 1688 | 1723 | ** URL: /artifact?ci=CHECKIN&filename=PATH |
| 1724 | +** URL: /whatis/SHA1HASH | |
| 1689 | 1725 | ** |
| 1690 | 1726 | ** Additional query parameters: |
| 1691 | 1727 | ** |
| 1692 | 1728 | ** ln - show line numbers |
| 1693 | 1729 | ** ln=N - highlight line number N |
| 1694 | 1730 | ** ln=M-N - highlight lines M through N inclusive |
| 1731 | +** verbose - show more detail in the description | |
| 1695 | 1732 | ** |
| 1696 | -** Show the complete content of a file identified by ARTIFACTID | |
| 1697 | -** as preformatted text. | |
| 1733 | +** The /artifact page show the complete content of a file | |
| 1734 | +** identified by SHA1HASH as preformatted text. The | |
| 1735 | +** /whatis page shows only a description of the file. | |
| 1698 | 1736 | */ |
| 1699 | 1737 | void artifact_page(void){ |
| 1700 | 1738 | int rid = 0; |
| 1701 | 1739 | Blob content; |
| 1702 | 1740 | const char *zMime; |
| @@ -1704,10 +1742,13 @@ | ||
| 1704 | 1742 | int renderAsWiki = 0; |
| 1705 | 1743 | int renderAsHtml = 0; |
| 1706 | 1744 | int objType; |
| 1707 | 1745 | int asText; |
| 1708 | 1746 | const char *zUuid; |
| 1747 | + u32 objdescFlags = 0; | |
| 1748 | + int descOnly = fossil_strcmp(g.zPath,"whatis")==0; | |
| 1749 | + const char *zLn = P("ln"); | |
| 1709 | 1750 | |
| 1710 | 1751 | if( P("ci") && P("filename") ){ |
| 1711 | 1752 | rid = artifact_from_ci_and_filename_www(); |
| 1712 | 1753 | } |
| 1713 | 1754 | if( rid==0 ){ |
| @@ -1725,19 +1766,20 @@ | ||
| 1725 | 1766 | }else{ |
| 1726 | 1767 | style_submenu_element("Shun","Shun", "%s/shun?shun=%s#addshun", |
| 1727 | 1768 | g.zTop, zUuid); |
| 1728 | 1769 | } |
| 1729 | 1770 | } |
| 1730 | - style_header("Artifact Content"); | |
| 1771 | + if( descOnly || P("verbose")!=0 ) objdescFlags |= OBJDESC_DETAIL; | |
| 1772 | + style_header(descOnly ? "Artifact Description" : "Artifact Content"); | |
| 1731 | 1773 | zUuid = db_text("?", "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 1732 | 1774 | if( g.perm.Setup ){ |
| 1733 | 1775 | @ <h2>Artifact %s(zUuid) (%d(rid)):</h2> |
| 1734 | 1776 | }else{ |
| 1735 | 1777 | @ <h2>Artifact %s(zUuid):</h2> |
| 1736 | 1778 | } |
| 1737 | 1779 | blob_zero(&downloadName); |
| 1738 | - objType = object_description(rid, 0, &downloadName); | |
| 1780 | + objType = object_description(rid, objdescFlags, &downloadName); | |
| 1739 | 1781 | style_submenu_element("Download", "Download", |
| 1740 | 1782 | "%R/raw/%T?name=%s", blob_str(&downloadName), zUuid); |
| 1741 | 1783 | if( db_exists("SELECT 1 FROM mlink WHERE fid=%d", rid) ){ |
| 1742 | 1784 | style_submenu_element("Checkins Using", "Checkins Using", |
| 1743 | 1785 | "%R/timeline?n=200&uf=%s",zUuid); |
| @@ -1767,44 +1809,50 @@ | ||
| 1767 | 1809 | } |
| 1768 | 1810 | } |
| 1769 | 1811 | if( (objType & (OBJTYPE_WIKI|OBJTYPE_TICKET))!=0 ){ |
| 1770 | 1812 | style_submenu_element("Parsed", "Parsed", "%R/info/%s", zUuid); |
| 1771 | 1813 | } |
| 1772 | - @ <hr /> | |
| 1773 | - content_get(rid, &content); | |
| 1774 | - if( renderAsWiki ){ | |
| 1775 | - wiki_render_by_mimetype(&content, zMime); | |
| 1776 | - }else if( renderAsHtml ){ | |
| 1777 | - @ <iframe src="%R/raw/%T(blob_str(&downloadName))?name=%s(zUuid)" | |
| 1778 | - @ width="100%%" frameborder="0" marginwidth="0" marginheight="0" | |
| 1779 | - @ sandbox="allow-same-origin" | |
| 1780 | - @ onload="this.height = this.contentDocument.documentElement.scrollHeight;"> | |
| 1781 | - @ </iframe> | |
| 1782 | - }else{ | |
| 1783 | - style_submenu_element("Hex","Hex", "%s/hexdump?name=%s", g.zTop, zUuid); | |
| 1784 | - blob_to_utf8_no_bom(&content, 0); | |
| 1785 | - zMime = mimetype_from_content(&content); | |
| 1786 | - @ <blockquote> | |
| 1787 | - if( zMime==0 ){ | |
| 1788 | - const char *zLn = P("ln"); | |
| 1789 | - const char *z; | |
| 1790 | - z = blob_str(&content); | |
| 1791 | - if( zLn ){ | |
| 1792 | - output_text_with_line_numbers(z, zLn); | |
| 1793 | - }else{ | |
| 1794 | - @ <pre> | |
| 1795 | - @ %h(z) | |
| 1796 | - @ </pre> | |
| 1797 | - } | |
| 1798 | - }else if( strncmp(zMime, "image/", 6)==0 ){ | |
| 1799 | - @ <img src="%R/raw/%s(zUuid)?m=%s(zMime)" /> | |
| 1800 | - style_submenu_element("Image", "Image", | |
| 1801 | - "%R/raw/%s?m=%s", zUuid, zMime); | |
| 1802 | - }else{ | |
| 1803 | - @ <i>(file is %d(blob_size(&content)) bytes of binary data)</i> | |
| 1804 | - } | |
| 1805 | - @ </blockquote> | |
| 1814 | + if( descOnly ){ | |
| 1815 | + style_submenu_element("Content", "Content", "%R/artifact/%s", zUuid); | |
| 1816 | + }else{ | |
| 1817 | + style_submenu_element("Line Numbers", "Line Numbers", | |
| 1818 | + "%R/info/%s%s",zUuid, | |
| 1819 | + ((zLn&&*zLn) ? "" : "?ln=0")); | |
| 1820 | + @ <hr /> | |
| 1821 | + content_get(rid, &content); | |
| 1822 | + if( renderAsWiki ){ | |
| 1823 | + wiki_render_by_mimetype(&content, zMime); | |
| 1824 | + }else if( renderAsHtml ){ | |
| 1825 | + @ <iframe src="%R/raw/%T(blob_str(&downloadName))?name=%s(zUuid)" | |
| 1826 | + @ width="100%%" frameborder="0" marginwidth="0" marginheight="0" | |
| 1827 | + @ sandbox="allow-same-origin" | |
| 1828 | + @ onload="this.height = this.contentDocument.documentElement.scrollHeight;"> | |
| 1829 | + @ </iframe> | |
| 1830 | + }else{ | |
| 1831 | + style_submenu_element("Hex","Hex", "%s/hexdump?name=%s", g.zTop, zUuid); | |
| 1832 | + blob_to_utf8_no_bom(&content, 0); | |
| 1833 | + zMime = mimetype_from_content(&content); | |
| 1834 | + @ <blockquote> | |
| 1835 | + if( zMime==0 ){ | |
| 1836 | + const char *z; | |
| 1837 | + z = blob_str(&content); | |
| 1838 | + if( zLn ){ | |
| 1839 | + output_text_with_line_numbers(z, zLn); | |
| 1840 | + }else{ | |
| 1841 | + @ <pre> | |
| 1842 | + @ %h(z) | |
| 1843 | + @ </pre> | |
| 1844 | + } | |
| 1845 | + }else if( strncmp(zMime, "image/", 6)==0 ){ | |
| 1846 | + @ <img src="%R/raw/%s(zUuid)?m=%s(zMime)" /> | |
| 1847 | + style_submenu_element("Image", "Image", | |
| 1848 | + "%R/raw/%s?m=%s", zUuid, zMime); | |
| 1849 | + }else{ | |
| 1850 | + @ <i>(file is %d(blob_size(&content)) bytes of binary data)</i> | |
| 1851 | + } | |
| 1852 | + @ </blockquote> | |
| 1853 | + } | |
| 1806 | 1854 | } |
| 1807 | 1855 | style_footer(); |
| 1808 | 1856 | } |
| 1809 | 1857 | |
| 1810 | 1858 | /* |
| 1811 | 1859 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -197,11 +197,11 @@ | |
| 197 | i64 fsize; |
| 198 | int verboseFlag = find_option("verbose","v",0)!=0; |
| 199 | if( !verboseFlag ){ |
| 200 | verboseFlag = find_option("detail","l",0)!=0; /* deprecated */ |
| 201 | } |
| 202 | |
| 203 | /* We should be done with options.. */ |
| 204 | verify_all_options(); |
| 205 | |
| 206 | if( g.argc==3 && (fsize = file_size(g.argv[2]))>0 && (fsize&0x1ff)==0 ){ |
| 207 | db_open_config(0); |
| @@ -1065,28 +1065,28 @@ | |
| 1065 | cmp = -1; |
| 1066 | }else{ |
| 1067 | cmp = fossil_strcmp(pFileFrom->zName, pFileTo->zName); |
| 1068 | } |
| 1069 | if( cmp<0 ){ |
| 1070 | if(!zGlob || strglob(zGlob, pFileFrom->zName)){ |
| 1071 | append_file_change_line(pFileFrom->zName, |
| 1072 | pFileFrom->zUuid, 0, 0, diffFlags, pRe, 0); |
| 1073 | } |
| 1074 | pFileFrom = manifest_file_next(pFrom, 0); |
| 1075 | }else if( cmp>0 ){ |
| 1076 | if(!zGlob || strglob(zGlob, pFileTo->zName)){ |
| 1077 | append_file_change_line(pFileTo->zName, |
| 1078 | 0, pFileTo->zUuid, 0, diffFlags, pRe, |
| 1079 | manifest_file_mperm(pFileTo)); |
| 1080 | } |
| 1081 | pFileTo = manifest_file_next(pTo, 0); |
| 1082 | }else if( fossil_strcmp(pFileFrom->zUuid, pFileTo->zUuid)==0 ){ |
| 1083 | pFileFrom = manifest_file_next(pFrom, 0); |
| 1084 | pFileTo = manifest_file_next(pTo, 0); |
| 1085 | }else{ |
| 1086 | if(!zGlob || (strglob(zGlob, pFileFrom->zName) |
| 1087 | || strglob(zGlob, pFileTo->zName))){ |
| 1088 | append_file_change_line(pFileFrom->zName, |
| 1089 | pFileFrom->zUuid, |
| 1090 | pFileTo->zUuid, 0, diffFlags, pRe, |
| 1091 | manifest_file_mperm(pFileTo)); |
| 1092 | } |
| @@ -1111,10 +1111,16 @@ | |
| 1111 | #define OBJTYPE_ATTACHMENT 0x0010 |
| 1112 | #define OBJTYPE_EVENT 0x0020 |
| 1113 | #define OBJTYPE_TAG 0x0040 |
| 1114 | #define OBJTYPE_SYMLINK 0x0080 |
| 1115 | #define OBJTYPE_EXE 0x0100 |
| 1116 | #endif |
| 1117 | |
| 1118 | /* |
| 1119 | ** Write a description of an object to the www reply. |
| 1120 | ** |
| @@ -1130,19 +1136,19 @@ | |
| 1130 | ** * date of check-in |
| 1131 | ** * Comment & user |
| 1132 | */ |
| 1133 | int object_description( |
| 1134 | int rid, /* The artifact ID */ |
| 1135 | int linkToView, /* Add viewer link if true */ |
| 1136 | Blob *pDownloadName /* Fill with an appropriate download name */ |
| 1137 | ){ |
| 1138 | Stmt q; |
| 1139 | int cnt = 0; |
| 1140 | int nWiki = 0; |
| 1141 | int objType = 0; |
| 1142 | char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 1143 | |
| 1144 | char *prevName = 0; |
| 1145 | |
| 1146 | db_prepare(&q, |
| 1147 | "SELECT filename.name, datetime(event.mtime)," |
| 1148 | " coalesce(event.ecomment,event.comment)," |
| @@ -1166,11 +1172,19 @@ | |
| 1166 | const char *zCom = db_column_text(&q, 2); |
| 1167 | const char *zUser = db_column_text(&q, 3); |
| 1168 | const char *zVers = db_column_text(&q, 4); |
| 1169 | int mPerm = db_column_int(&q, 5); |
| 1170 | const char *zBr = db_column_text(&q, 6); |
| 1171 | if( !prevName || fossil_strcmp(zName, prevName) ) { |
| 1172 | if( prevName ) { |
| 1173 | @ </ul> |
| 1174 | } |
| 1175 | if( mPerm==PERM_LNK ){ |
| 1176 | @ <li>Symbolic link |
| @@ -1181,21 +1195,30 @@ | |
| 1181 | }else{ |
| 1182 | @ <li>File |
| 1183 | } |
| 1184 | objType |= OBJTYPE_CONTENT; |
| 1185 | @ %z(href("%R/finfo?name=%T",zName))%h(zName)</a> |
| 1186 | @ <ul> |
| 1187 | prevName = fossil_strdup(zName); |
| 1188 | } |
| 1189 | @ <li> |
| 1190 | hyperlink_to_date(zDate,""); |
| 1191 | @ - part of checkin |
| 1192 | hyperlink_to_uuid(zVers); |
| 1193 | if( zBr && zBr[0] ){ |
| 1194 | @ on branch %z(href("%R/timeline?r=%T",zBr))%h(zBr)</a> |
| 1195 | } |
| 1196 | @ - %!w(zCom) (user: |
| 1197 | hyperlink_to_user(zUser,zDate,")"); |
| 1198 | if( g.perm.Hyperlink ){ |
| 1199 | @ %z(href("%R/finfo?name=%T&ci=%s",zName,zVers))[ancestry]</a> |
| 1200 | @ %z(href("%R/annotate?filename=%T&checkin=%s",zName,zVers)) |
| 1201 | @ [annotate]</a> |
| @@ -1205,11 +1228,11 @@ | |
| 1205 | cnt++; |
| 1206 | if( pDownloadName && blob_size(pDownloadName)==0 ){ |
| 1207 | blob_append(pDownloadName, zName, -1); |
| 1208 | } |
| 1209 | } |
| 1210 | if( prevName ){ |
| 1211 | @ </ul> |
| 1212 | } |
| 1213 | @ </ul> |
| 1214 | free(prevName); |
| 1215 | db_finalize(&q); |
| @@ -1333,12 +1356,10 @@ | |
| 1333 | if( cnt==0 ){ |
| 1334 | @ Control artifact. |
| 1335 | if( pDownloadName && blob_size(pDownloadName)==0 ){ |
| 1336 | blob_appendf(pDownloadName, "%.10s.txt", zUuid); |
| 1337 | } |
| 1338 | }else if( linkToView && g.perm.Hyperlink ){ |
| 1339 | @ %z(href("%R/artifact/%s",zUuid))[view]</a> |
| 1340 | } |
| 1341 | return objType; |
| 1342 | } |
| 1343 | |
| 1344 | |
| @@ -1347,10 +1368,14 @@ | |
| 1347 | ** URL: fdiff?v1=UUID&v2=UUID&patch&sbs=BOOLEAN®ex=REGEX |
| 1348 | ** |
| 1349 | ** Two arguments, v1 and v2, identify the files to be diffed. Show the |
| 1350 | ** difference between the two artifacts. Show diff side by side unless sbs |
| 1351 | ** is 0. Generate plaintext if "patch" is present. |
| 1352 | */ |
| 1353 | void diff_page(void){ |
| 1354 | int v1, v2; |
| 1355 | int isPatch; |
| 1356 | int sideBySide; |
| @@ -1358,18 +1383,20 @@ | |
| 1358 | char *zV2; |
| 1359 | const char *zRe; |
| 1360 | const char *zW; /* URL param for ignoring whitespace */ |
| 1361 | ReCompiled *pRe = 0; |
| 1362 | u64 diffFlags; |
| 1363 | |
| 1364 | login_check_credentials(); |
| 1365 | if( !g.perm.Read ){ login_needed(); return; } |
| 1366 | v1 = name_to_rid_www("v1"); |
| 1367 | v2 = name_to_rid_www("v2"); |
| 1368 | if( v1==0 || v2==0 ) fossil_redirect_home(); |
| 1369 | zRe = P("regex"); |
| 1370 | if( zRe ) re_compile(&pRe, zRe, 0); |
| 1371 | isPatch = P("patch")!=0; |
| 1372 | if( isPatch ){ |
| 1373 | Blob c1, c2, *pOut; |
| 1374 | pOut = cgi_output_blob(); |
| 1375 | cgi_set_content_type("text/plain"); |
| @@ -1415,13 +1442,13 @@ | |
| 1415 | @ %z(href("%R/artifact/%s",zV1))[%S(zV1)]</a> To |
| 1416 | @ %z(href("%R/artifact/%s",zV2))[%S(zV2)]</a>.</h2> |
| 1417 | }else{ |
| 1418 | @ <h2>Differences From |
| 1419 | @ Artifact %z(href("%R/artifact/%s",zV1))[%S(zV1)]</a>:</h2> |
| 1420 | object_description(v1, 0, 0); |
| 1421 | @ <h2>To Artifact %z(href("%R/artifact/%s",zV2))[%S(zV2)]</a>:</h2> |
| 1422 | object_description(v2, 0, 0); |
| 1423 | } |
| 1424 | if( pRe ){ |
| 1425 | @ <b>Only differences that match regular expression "%h(zRe)" |
| 1426 | @ are shown.</b> |
| 1427 | } |
| @@ -1527,16 +1554,21 @@ | |
| 1527 | ** WEBPAGE: hexdump |
| 1528 | ** URL: /hexdump?name=ARTIFACTID |
| 1529 | ** |
| 1530 | ** Show the complete content of a file identified by ARTIFACTID |
| 1531 | ** as preformatted text. |
| 1532 | */ |
| 1533 | void hexdump_page(void){ |
| 1534 | int rid; |
| 1535 | Blob content; |
| 1536 | Blob downloadName; |
| 1537 | char *zUuid; |
| 1538 | |
| 1539 | rid = name_to_rid_www("name"); |
| 1540 | login_check_credentials(); |
| 1541 | if( !g.perm.Read ){ login_needed(); return; } |
| 1542 | if( rid==0 ) fossil_redirect_home(); |
| @@ -1556,11 +1588,12 @@ | |
| 1556 | @ <h2>Artifact %s(zUuid) (%d(rid)):</h2> |
| 1557 | }else{ |
| 1558 | @ <h2>Artifact %s(zUuid):</h2> |
| 1559 | } |
| 1560 | blob_zero(&downloadName); |
| 1561 | object_description(rid, 0, &downloadName); |
| 1562 | style_submenu_element("Download", "Download", |
| 1563 | "%s/raw/%T?name=%s", g.zTop, blob_str(&downloadName), zUuid); |
| 1564 | @ <hr /> |
| 1565 | content_get(rid, &content); |
| 1566 | @ <blockquote><pre> |
| @@ -1681,22 +1714,27 @@ | |
| 1681 | } |
| 1682 | } |
| 1683 | |
| 1684 | |
| 1685 | /* |
| 1686 | ** WEBPAGE: artifact |
| 1687 | ** URL: /artifact/ARTIFACTID |
| 1688 | ** URL: /artifact?ci=CHECKIN&filename=PATH |
| 1689 | ** |
| 1690 | ** Additional query parameters: |
| 1691 | ** |
| 1692 | ** ln - show line numbers |
| 1693 | ** ln=N - highlight line number N |
| 1694 | ** ln=M-N - highlight lines M through N inclusive |
| 1695 | ** |
| 1696 | ** Show the complete content of a file identified by ARTIFACTID |
| 1697 | ** as preformatted text. |
| 1698 | */ |
| 1699 | void artifact_page(void){ |
| 1700 | int rid = 0; |
| 1701 | Blob content; |
| 1702 | const char *zMime; |
| @@ -1704,10 +1742,13 @@ | |
| 1704 | int renderAsWiki = 0; |
| 1705 | int renderAsHtml = 0; |
| 1706 | int objType; |
| 1707 | int asText; |
| 1708 | const char *zUuid; |
| 1709 | |
| 1710 | if( P("ci") && P("filename") ){ |
| 1711 | rid = artifact_from_ci_and_filename_www(); |
| 1712 | } |
| 1713 | if( rid==0 ){ |
| @@ -1725,19 +1766,20 @@ | |
| 1725 | }else{ |
| 1726 | style_submenu_element("Shun","Shun", "%s/shun?shun=%s#addshun", |
| 1727 | g.zTop, zUuid); |
| 1728 | } |
| 1729 | } |
| 1730 | style_header("Artifact Content"); |
| 1731 | zUuid = db_text("?", "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 1732 | if( g.perm.Setup ){ |
| 1733 | @ <h2>Artifact %s(zUuid) (%d(rid)):</h2> |
| 1734 | }else{ |
| 1735 | @ <h2>Artifact %s(zUuid):</h2> |
| 1736 | } |
| 1737 | blob_zero(&downloadName); |
| 1738 | objType = object_description(rid, 0, &downloadName); |
| 1739 | style_submenu_element("Download", "Download", |
| 1740 | "%R/raw/%T?name=%s", blob_str(&downloadName), zUuid); |
| 1741 | if( db_exists("SELECT 1 FROM mlink WHERE fid=%d", rid) ){ |
| 1742 | style_submenu_element("Checkins Using", "Checkins Using", |
| 1743 | "%R/timeline?n=200&uf=%s",zUuid); |
| @@ -1767,44 +1809,50 @@ | |
| 1767 | } |
| 1768 | } |
| 1769 | if( (objType & (OBJTYPE_WIKI|OBJTYPE_TICKET))!=0 ){ |
| 1770 | style_submenu_element("Parsed", "Parsed", "%R/info/%s", zUuid); |
| 1771 | } |
| 1772 | @ <hr /> |
| 1773 | content_get(rid, &content); |
| 1774 | if( renderAsWiki ){ |
| 1775 | wiki_render_by_mimetype(&content, zMime); |
| 1776 | }else if( renderAsHtml ){ |
| 1777 | @ <iframe src="%R/raw/%T(blob_str(&downloadName))?name=%s(zUuid)" |
| 1778 | @ width="100%%" frameborder="0" marginwidth="0" marginheight="0" |
| 1779 | @ sandbox="allow-same-origin" |
| 1780 | @ onload="this.height = this.contentDocument.documentElement.scrollHeight;"> |
| 1781 | @ </iframe> |
| 1782 | }else{ |
| 1783 | style_submenu_element("Hex","Hex", "%s/hexdump?name=%s", g.zTop, zUuid); |
| 1784 | blob_to_utf8_no_bom(&content, 0); |
| 1785 | zMime = mimetype_from_content(&content); |
| 1786 | @ <blockquote> |
| 1787 | if( zMime==0 ){ |
| 1788 | const char *zLn = P("ln"); |
| 1789 | const char *z; |
| 1790 | z = blob_str(&content); |
| 1791 | if( zLn ){ |
| 1792 | output_text_with_line_numbers(z, zLn); |
| 1793 | }else{ |
| 1794 | @ <pre> |
| 1795 | @ %h(z) |
| 1796 | @ </pre> |
| 1797 | } |
| 1798 | }else if( strncmp(zMime, "image/", 6)==0 ){ |
| 1799 | @ <img src="%R/raw/%s(zUuid)?m=%s(zMime)" /> |
| 1800 | style_submenu_element("Image", "Image", |
| 1801 | "%R/raw/%s?m=%s", zUuid, zMime); |
| 1802 | }else{ |
| 1803 | @ <i>(file is %d(blob_size(&content)) bytes of binary data)</i> |
| 1804 | } |
| 1805 | @ </blockquote> |
| 1806 | } |
| 1807 | style_footer(); |
| 1808 | } |
| 1809 | |
| 1810 | /* |
| 1811 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -197,11 +197,11 @@ | |
| 197 | i64 fsize; |
| 198 | int verboseFlag = find_option("verbose","v",0)!=0; |
| 199 | if( !verboseFlag ){ |
| 200 | verboseFlag = find_option("detail","l",0)!=0; /* deprecated */ |
| 201 | } |
| 202 | |
| 203 | /* We should be done with options.. */ |
| 204 | verify_all_options(); |
| 205 | |
| 206 | if( g.argc==3 && (fsize = file_size(g.argv[2]))>0 && (fsize&0x1ff)==0 ){ |
| 207 | db_open_config(0); |
| @@ -1065,28 +1065,28 @@ | |
| 1065 | cmp = -1; |
| 1066 | }else{ |
| 1067 | cmp = fossil_strcmp(pFileFrom->zName, pFileTo->zName); |
| 1068 | } |
| 1069 | if( cmp<0 ){ |
| 1070 | if( !zGlob || sqlite3_strglob(zGlob, pFileFrom->zName)==0 ){ |
| 1071 | append_file_change_line(pFileFrom->zName, |
| 1072 | pFileFrom->zUuid, 0, 0, diffFlags, pRe, 0); |
| 1073 | } |
| 1074 | pFileFrom = manifest_file_next(pFrom, 0); |
| 1075 | }else if( cmp>0 ){ |
| 1076 | if( !zGlob || sqlite3_strglob(zGlob, pFileTo->zName)==0 ){ |
| 1077 | append_file_change_line(pFileTo->zName, |
| 1078 | 0, pFileTo->zUuid, 0, diffFlags, pRe, |
| 1079 | manifest_file_mperm(pFileTo)); |
| 1080 | } |
| 1081 | pFileTo = manifest_file_next(pTo, 0); |
| 1082 | }else if( fossil_strcmp(pFileFrom->zUuid, pFileTo->zUuid)==0 ){ |
| 1083 | pFileFrom = manifest_file_next(pFrom, 0); |
| 1084 | pFileTo = manifest_file_next(pTo, 0); |
| 1085 | }else{ |
| 1086 | if(!zGlob || (sqlite3_strglob(zGlob, pFileFrom->zName)==0 |
| 1087 | || sqlite3_strglob(zGlob, pFileTo->zName)==0) ){ |
| 1088 | append_file_change_line(pFileFrom->zName, |
| 1089 | pFileFrom->zUuid, |
| 1090 | pFileTo->zUuid, 0, diffFlags, pRe, |
| 1091 | manifest_file_mperm(pFileTo)); |
| 1092 | } |
| @@ -1111,10 +1111,16 @@ | |
| 1111 | #define OBJTYPE_ATTACHMENT 0x0010 |
| 1112 | #define OBJTYPE_EVENT 0x0020 |
| 1113 | #define OBJTYPE_TAG 0x0040 |
| 1114 | #define OBJTYPE_SYMLINK 0x0080 |
| 1115 | #define OBJTYPE_EXE 0x0100 |
| 1116 | |
| 1117 | /* |
| 1118 | ** Possible flags for the second parameter to |
| 1119 | ** object_description() |
| 1120 | */ |
| 1121 | #define OBJDESC_DETAIL 0x0001 /* more detail */ |
| 1122 | #endif |
| 1123 | |
| 1124 | /* |
| 1125 | ** Write a description of an object to the www reply. |
| 1126 | ** |
| @@ -1130,19 +1136,19 @@ | |
| 1136 | ** * date of check-in |
| 1137 | ** * Comment & user |
| 1138 | */ |
| 1139 | int object_description( |
| 1140 | int rid, /* The artifact ID */ |
| 1141 | u32 objdescFlags, /* Flags to control display */ |
| 1142 | Blob *pDownloadName /* Fill with an appropriate download name */ |
| 1143 | ){ |
| 1144 | Stmt q; |
| 1145 | int cnt = 0; |
| 1146 | int nWiki = 0; |
| 1147 | int objType = 0; |
| 1148 | char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 1149 | int showDetail = (objdescFlags & OBJDESC_DETAIL)!=0; |
| 1150 | char *prevName = 0; |
| 1151 | |
| 1152 | db_prepare(&q, |
| 1153 | "SELECT filename.name, datetime(event.mtime)," |
| 1154 | " coalesce(event.ecomment,event.comment)," |
| @@ -1166,11 +1172,19 @@ | |
| 1172 | const char *zCom = db_column_text(&q, 2); |
| 1173 | const char *zUser = db_column_text(&q, 3); |
| 1174 | const char *zVers = db_column_text(&q, 4); |
| 1175 | int mPerm = db_column_int(&q, 5); |
| 1176 | const char *zBr = db_column_text(&q, 6); |
| 1177 | int sameFilename = prevName!=0 && fossil_strcmp(zName,prevName)==0; |
| 1178 | if( sameFilename && !showDetail ){ |
| 1179 | if( cnt==1 ){ |
| 1180 | @ %z(href("%R/whatis/%s",zUuid))[more...]</a> |
| 1181 | } |
| 1182 | cnt++; |
| 1183 | continue; |
| 1184 | } |
| 1185 | if( !sameFilename ){ |
| 1186 | if( prevName ) { |
| 1187 | @ </ul> |
| 1188 | } |
| 1189 | if( mPerm==PERM_LNK ){ |
| 1190 | @ <li>Symbolic link |
| @@ -1181,21 +1195,30 @@ | |
| 1195 | }else{ |
| 1196 | @ <li>File |
| 1197 | } |
| 1198 | objType |= OBJTYPE_CONTENT; |
| 1199 | @ %z(href("%R/finfo?name=%T",zName))%h(zName)</a> |
| 1200 | if( showDetail ){ |
| 1201 | @ <ul> |
| 1202 | } |
| 1203 | prevName = fossil_strdup(zName); |
| 1204 | } |
| 1205 | if( showDetail ){ |
| 1206 | @ <li> |
| 1207 | hyperlink_to_date(zDate,""); |
| 1208 | @ — part of check-in |
| 1209 | hyperlink_to_uuid(zVers); |
| 1210 | }else{ |
| 1211 | @ — part of checkin |
| 1212 | hyperlink_to_uuid(zVers); |
| 1213 | @ at |
| 1214 | hyperlink_to_date(zDate,""); |
| 1215 | } |
| 1216 | if( zBr && zBr[0] ){ |
| 1217 | @ on branch %z(href("%R/timeline?r=%T",zBr))%h(zBr)</a> |
| 1218 | } |
| 1219 | @ — %!w(zCom) (user: |
| 1220 | hyperlink_to_user(zUser,zDate,")"); |
| 1221 | if( g.perm.Hyperlink ){ |
| 1222 | @ %z(href("%R/finfo?name=%T&ci=%s",zName,zVers))[ancestry]</a> |
| 1223 | @ %z(href("%R/annotate?filename=%T&checkin=%s",zName,zVers)) |
| 1224 | @ [annotate]</a> |
| @@ -1205,11 +1228,11 @@ | |
| 1228 | cnt++; |
| 1229 | if( pDownloadName && blob_size(pDownloadName)==0 ){ |
| 1230 | blob_append(pDownloadName, zName, -1); |
| 1231 | } |
| 1232 | } |
| 1233 | if( prevName && showDetail ){ |
| 1234 | @ </ul> |
| 1235 | } |
| 1236 | @ </ul> |
| 1237 | free(prevName); |
| 1238 | db_finalize(&q); |
| @@ -1333,12 +1356,10 @@ | |
| 1356 | if( cnt==0 ){ |
| 1357 | @ Control artifact. |
| 1358 | if( pDownloadName && blob_size(pDownloadName)==0 ){ |
| 1359 | blob_appendf(pDownloadName, "%.10s.txt", zUuid); |
| 1360 | } |
| 1361 | } |
| 1362 | return objType; |
| 1363 | } |
| 1364 | |
| 1365 | |
| @@ -1347,10 +1368,14 @@ | |
| 1368 | ** URL: fdiff?v1=UUID&v2=UUID&patch&sbs=BOOLEAN®ex=REGEX |
| 1369 | ** |
| 1370 | ** Two arguments, v1 and v2, identify the files to be diffed. Show the |
| 1371 | ** difference between the two artifacts. Show diff side by side unless sbs |
| 1372 | ** is 0. Generate plaintext if "patch" is present. |
| 1373 | ** |
| 1374 | ** Additional parameters: |
| 1375 | ** |
| 1376 | ** verbose Show more detail when describing artifacts |
| 1377 | */ |
| 1378 | void diff_page(void){ |
| 1379 | int v1, v2; |
| 1380 | int isPatch; |
| 1381 | int sideBySide; |
| @@ -1358,18 +1383,20 @@ | |
| 1383 | char *zV2; |
| 1384 | const char *zRe; |
| 1385 | const char *zW; /* URL param for ignoring whitespace */ |
| 1386 | ReCompiled *pRe = 0; |
| 1387 | u64 diffFlags; |
| 1388 | u32 objdescFlags = 0; |
| 1389 | |
| 1390 | login_check_credentials(); |
| 1391 | if( !g.perm.Read ){ login_needed(); return; } |
| 1392 | v1 = name_to_rid_www("v1"); |
| 1393 | v2 = name_to_rid_www("v2"); |
| 1394 | if( v1==0 || v2==0 ) fossil_redirect_home(); |
| 1395 | zRe = P("regex"); |
| 1396 | if( zRe ) re_compile(&pRe, zRe, 0); |
| 1397 | if( P("verbose")!=0 ) objdescFlags |= OBJDESC_DETAIL; |
| 1398 | isPatch = P("patch")!=0; |
| 1399 | if( isPatch ){ |
| 1400 | Blob c1, c2, *pOut; |
| 1401 | pOut = cgi_output_blob(); |
| 1402 | cgi_set_content_type("text/plain"); |
| @@ -1415,13 +1442,13 @@ | |
| 1442 | @ %z(href("%R/artifact/%s",zV1))[%S(zV1)]</a> To |
| 1443 | @ %z(href("%R/artifact/%s",zV2))[%S(zV2)]</a>.</h2> |
| 1444 | }else{ |
| 1445 | @ <h2>Differences From |
| 1446 | @ Artifact %z(href("%R/artifact/%s",zV1))[%S(zV1)]</a>:</h2> |
| 1447 | object_description(v1, objdescFlags, 0); |
| 1448 | @ <h2>To Artifact %z(href("%R/artifact/%s",zV2))[%S(zV2)]</a>:</h2> |
| 1449 | object_description(v2, objdescFlags, 0); |
| 1450 | } |
| 1451 | if( pRe ){ |
| 1452 | @ <b>Only differences that match regular expression "%h(zRe)" |
| 1453 | @ are shown.</b> |
| 1454 | } |
| @@ -1527,16 +1554,21 @@ | |
| 1554 | ** WEBPAGE: hexdump |
| 1555 | ** URL: /hexdump?name=ARTIFACTID |
| 1556 | ** |
| 1557 | ** Show the complete content of a file identified by ARTIFACTID |
| 1558 | ** as preformatted text. |
| 1559 | ** |
| 1560 | ** Other parameters: |
| 1561 | ** |
| 1562 | ** verbose Show more detail when describing the object |
| 1563 | */ |
| 1564 | void hexdump_page(void){ |
| 1565 | int rid; |
| 1566 | Blob content; |
| 1567 | Blob downloadName; |
| 1568 | char *zUuid; |
| 1569 | u32 objdescFlags = 0; |
| 1570 | |
| 1571 | rid = name_to_rid_www("name"); |
| 1572 | login_check_credentials(); |
| 1573 | if( !g.perm.Read ){ login_needed(); return; } |
| 1574 | if( rid==0 ) fossil_redirect_home(); |
| @@ -1556,11 +1588,12 @@ | |
| 1588 | @ <h2>Artifact %s(zUuid) (%d(rid)):</h2> |
| 1589 | }else{ |
| 1590 | @ <h2>Artifact %s(zUuid):</h2> |
| 1591 | } |
| 1592 | blob_zero(&downloadName); |
| 1593 | if( P("verbose")!=0 ) objdescFlags |= OBJDESC_DETAIL; |
| 1594 | object_description(rid, objdescFlags, &downloadName); |
| 1595 | style_submenu_element("Download", "Download", |
| 1596 | "%s/raw/%T?name=%s", g.zTop, blob_str(&downloadName), zUuid); |
| 1597 | @ <hr /> |
| 1598 | content_get(rid, &content); |
| 1599 | @ <blockquote><pre> |
| @@ -1681,22 +1714,27 @@ | |
| 1714 | } |
| 1715 | } |
| 1716 | |
| 1717 | |
| 1718 | /* |
| 1719 | ** WEBPAGE: whatis |
| 1720 | ** WEBPAGE: artifact |
| 1721 | ** |
| 1722 | ** URL: /artifact/SHA1HASH |
| 1723 | ** URL: /artifact?ci=CHECKIN&filename=PATH |
| 1724 | ** URL: /whatis/SHA1HASH |
| 1725 | ** |
| 1726 | ** Additional query parameters: |
| 1727 | ** |
| 1728 | ** ln - show line numbers |
| 1729 | ** ln=N - highlight line number N |
| 1730 | ** ln=M-N - highlight lines M through N inclusive |
| 1731 | ** verbose - show more detail in the description |
| 1732 | ** |
| 1733 | ** The /artifact page show the complete content of a file |
| 1734 | ** identified by SHA1HASH as preformatted text. The |
| 1735 | ** /whatis page shows only a description of the file. |
| 1736 | */ |
| 1737 | void artifact_page(void){ |
| 1738 | int rid = 0; |
| 1739 | Blob content; |
| 1740 | const char *zMime; |
| @@ -1704,10 +1742,13 @@ | |
| 1742 | int renderAsWiki = 0; |
| 1743 | int renderAsHtml = 0; |
| 1744 | int objType; |
| 1745 | int asText; |
| 1746 | const char *zUuid; |
| 1747 | u32 objdescFlags = 0; |
| 1748 | int descOnly = fossil_strcmp(g.zPath,"whatis")==0; |
| 1749 | const char *zLn = P("ln"); |
| 1750 | |
| 1751 | if( P("ci") && P("filename") ){ |
| 1752 | rid = artifact_from_ci_and_filename_www(); |
| 1753 | } |
| 1754 | if( rid==0 ){ |
| @@ -1725,19 +1766,20 @@ | |
| 1766 | }else{ |
| 1767 | style_submenu_element("Shun","Shun", "%s/shun?shun=%s#addshun", |
| 1768 | g.zTop, zUuid); |
| 1769 | } |
| 1770 | } |
| 1771 | if( descOnly || P("verbose")!=0 ) objdescFlags |= OBJDESC_DETAIL; |
| 1772 | style_header(descOnly ? "Artifact Description" : "Artifact Content"); |
| 1773 | zUuid = db_text("?", "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 1774 | if( g.perm.Setup ){ |
| 1775 | @ <h2>Artifact %s(zUuid) (%d(rid)):</h2> |
| 1776 | }else{ |
| 1777 | @ <h2>Artifact %s(zUuid):</h2> |
| 1778 | } |
| 1779 | blob_zero(&downloadName); |
| 1780 | objType = object_description(rid, objdescFlags, &downloadName); |
| 1781 | style_submenu_element("Download", "Download", |
| 1782 | "%R/raw/%T?name=%s", blob_str(&downloadName), zUuid); |
| 1783 | if( db_exists("SELECT 1 FROM mlink WHERE fid=%d", rid) ){ |
| 1784 | style_submenu_element("Checkins Using", "Checkins Using", |
| 1785 | "%R/timeline?n=200&uf=%s",zUuid); |
| @@ -1767,44 +1809,50 @@ | |
| 1809 | } |
| 1810 | } |
| 1811 | if( (objType & (OBJTYPE_WIKI|OBJTYPE_TICKET))!=0 ){ |
| 1812 | style_submenu_element("Parsed", "Parsed", "%R/info/%s", zUuid); |
| 1813 | } |
| 1814 | if( descOnly ){ |
| 1815 | style_submenu_element("Content", "Content", "%R/artifact/%s", zUuid); |
| 1816 | }else{ |
| 1817 | style_submenu_element("Line Numbers", "Line Numbers", |
| 1818 | "%R/info/%s%s",zUuid, |
| 1819 | ((zLn&&*zLn) ? "" : "?ln=0")); |
| 1820 | @ <hr /> |
| 1821 | content_get(rid, &content); |
| 1822 | if( renderAsWiki ){ |
| 1823 | wiki_render_by_mimetype(&content, zMime); |
| 1824 | }else if( renderAsHtml ){ |
| 1825 | @ <iframe src="%R/raw/%T(blob_str(&downloadName))?name=%s(zUuid)" |
| 1826 | @ width="100%%" frameborder="0" marginwidth="0" marginheight="0" |
| 1827 | @ sandbox="allow-same-origin" |
| 1828 | @ onload="this.height = this.contentDocument.documentElement.scrollHeight;"> |
| 1829 | @ </iframe> |
| 1830 | }else{ |
| 1831 | style_submenu_element("Hex","Hex", "%s/hexdump?name=%s", g.zTop, zUuid); |
| 1832 | blob_to_utf8_no_bom(&content, 0); |
| 1833 | zMime = mimetype_from_content(&content); |
| 1834 | @ <blockquote> |
| 1835 | if( zMime==0 ){ |
| 1836 | const char *z; |
| 1837 | z = blob_str(&content); |
| 1838 | if( zLn ){ |
| 1839 | output_text_with_line_numbers(z, zLn); |
| 1840 | }else{ |
| 1841 | @ <pre> |
| 1842 | @ %h(z) |
| 1843 | @ </pre> |
| 1844 | } |
| 1845 | }else if( strncmp(zMime, "image/", 6)==0 ){ |
| 1846 | @ <img src="%R/raw/%s(zUuid)?m=%s(zMime)" /> |
| 1847 | style_submenu_element("Image", "Image", |
| 1848 | "%R/raw/%s?m=%s", zUuid, zMime); |
| 1849 | }else{ |
| 1850 | @ <i>(file is %d(blob_size(&content)) bytes of binary data)</i> |
| 1851 | } |
| 1852 | @ </blockquote> |
| 1853 | } |
| 1854 | } |
| 1855 | style_footer(); |
| 1856 | } |
| 1857 | |
| 1858 | /* |
| 1859 |
+4
-4
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -940,11 +940,11 @@ | ||
| 940 | 940 | void version_cmd(void){ |
| 941 | 941 | int verboseFlag = 0; |
| 942 | 942 | |
| 943 | 943 | fossil_print("This is fossil version %s\n", get_version()); |
| 944 | 944 | verboseFlag = find_option("verbose","v",0)!=0; |
| 945 | - | |
| 945 | + | |
| 946 | 946 | /* We should be done with options.. */ |
| 947 | 947 | verify_all_options(); |
| 948 | 948 | |
| 949 | 949 | if(!verboseFlag){ |
| 950 | 950 | return; |
| @@ -1429,11 +1429,11 @@ | ||
| 1429 | 1429 | continue; |
| 1430 | 1430 | } |
| 1431 | 1431 | if( pFileGlob!=0 |
| 1432 | 1432 | && file_isfile(zRepo) |
| 1433 | 1433 | && glob_match(pFileGlob, zRepo) |
| 1434 | - && strglob("*.fossil*",zRepo)==0 | |
| 1434 | + && sqlite3_strglob("*.fossil*",zRepo)!=0 | |
| 1435 | 1435 | && (zMimetype = mimetype_from_name(zRepo))!=0 |
| 1436 | 1436 | && strcmp(zMimetype, "application/x-fossil-artifact")!=0 |
| 1437 | 1437 | ){ |
| 1438 | 1438 | Blob content; |
| 1439 | 1439 | blob_read_from_file(&content, zRepo); |
| @@ -1935,11 +1935,11 @@ | ||
| 1935 | 1935 | if( zAltBase ) set_base_url(zAltBase); |
| 1936 | 1936 | if( find_option("https",0,0)!=0 ) cgi_replace_parameter("HTTPS","on"); |
| 1937 | 1937 | zHost = find_option("host", 0, 1); |
| 1938 | 1938 | if( zHost ) cgi_replace_parameter("HTTP_HOST",zHost); |
| 1939 | 1939 | g.cgiOutput = 1; |
| 1940 | - | |
| 1940 | + | |
| 1941 | 1941 | /* We should be done with options.. */ |
| 1942 | 1942 | verify_all_options(); |
| 1943 | 1943 | |
| 1944 | 1944 | if( g.argc!=2 && g.argc!=3 && g.argc!=6 ){ |
| 1945 | 1945 | fossil_fatal("no repository specified"); |
| @@ -2125,11 +2125,11 @@ | ||
| 2125 | 2125 | set_base_url(zAltBase); |
| 2126 | 2126 | } |
| 2127 | 2127 | if( find_option("localhost", 0, 0)!=0 ){ |
| 2128 | 2128 | flags |= HTTP_SERVER_LOCALHOST; |
| 2129 | 2129 | } |
| 2130 | - | |
| 2130 | + | |
| 2131 | 2131 | /* We should be done with options.. */ |
| 2132 | 2132 | verify_all_options(); |
| 2133 | 2133 | |
| 2134 | 2134 | if( g.argc!=2 && g.argc!=3 ) usage("?REPOSITORY?"); |
| 2135 | 2135 | isUiCmd = g.argv[1][0]=='u'; |
| 2136 | 2136 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -940,11 +940,11 @@ | |
| 940 | void version_cmd(void){ |
| 941 | int verboseFlag = 0; |
| 942 | |
| 943 | fossil_print("This is fossil version %s\n", get_version()); |
| 944 | verboseFlag = find_option("verbose","v",0)!=0; |
| 945 | |
| 946 | /* We should be done with options.. */ |
| 947 | verify_all_options(); |
| 948 | |
| 949 | if(!verboseFlag){ |
| 950 | return; |
| @@ -1429,11 +1429,11 @@ | |
| 1429 | continue; |
| 1430 | } |
| 1431 | if( pFileGlob!=0 |
| 1432 | && file_isfile(zRepo) |
| 1433 | && glob_match(pFileGlob, zRepo) |
| 1434 | && strglob("*.fossil*",zRepo)==0 |
| 1435 | && (zMimetype = mimetype_from_name(zRepo))!=0 |
| 1436 | && strcmp(zMimetype, "application/x-fossil-artifact")!=0 |
| 1437 | ){ |
| 1438 | Blob content; |
| 1439 | blob_read_from_file(&content, zRepo); |
| @@ -1935,11 +1935,11 @@ | |
| 1935 | if( zAltBase ) set_base_url(zAltBase); |
| 1936 | if( find_option("https",0,0)!=0 ) cgi_replace_parameter("HTTPS","on"); |
| 1937 | zHost = find_option("host", 0, 1); |
| 1938 | if( zHost ) cgi_replace_parameter("HTTP_HOST",zHost); |
| 1939 | g.cgiOutput = 1; |
| 1940 | |
| 1941 | /* We should be done with options.. */ |
| 1942 | verify_all_options(); |
| 1943 | |
| 1944 | if( g.argc!=2 && g.argc!=3 && g.argc!=6 ){ |
| 1945 | fossil_fatal("no repository specified"); |
| @@ -2125,11 +2125,11 @@ | |
| 2125 | set_base_url(zAltBase); |
| 2126 | } |
| 2127 | if( find_option("localhost", 0, 0)!=0 ){ |
| 2128 | flags |= HTTP_SERVER_LOCALHOST; |
| 2129 | } |
| 2130 | |
| 2131 | /* We should be done with options.. */ |
| 2132 | verify_all_options(); |
| 2133 | |
| 2134 | if( g.argc!=2 && g.argc!=3 ) usage("?REPOSITORY?"); |
| 2135 | isUiCmd = g.argv[1][0]=='u'; |
| 2136 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -940,11 +940,11 @@ | |
| 940 | void version_cmd(void){ |
| 941 | int verboseFlag = 0; |
| 942 | |
| 943 | fossil_print("This is fossil version %s\n", get_version()); |
| 944 | verboseFlag = find_option("verbose","v",0)!=0; |
| 945 | |
| 946 | /* We should be done with options.. */ |
| 947 | verify_all_options(); |
| 948 | |
| 949 | if(!verboseFlag){ |
| 950 | return; |
| @@ -1429,11 +1429,11 @@ | |
| 1429 | continue; |
| 1430 | } |
| 1431 | if( pFileGlob!=0 |
| 1432 | && file_isfile(zRepo) |
| 1433 | && glob_match(pFileGlob, zRepo) |
| 1434 | && sqlite3_strglob("*.fossil*",zRepo)!=0 |
| 1435 | && (zMimetype = mimetype_from_name(zRepo))!=0 |
| 1436 | && strcmp(zMimetype, "application/x-fossil-artifact")!=0 |
| 1437 | ){ |
| 1438 | Blob content; |
| 1439 | blob_read_from_file(&content, zRepo); |
| @@ -1935,11 +1935,11 @@ | |
| 1935 | if( zAltBase ) set_base_url(zAltBase); |
| 1936 | if( find_option("https",0,0)!=0 ) cgi_replace_parameter("HTTPS","on"); |
| 1937 | zHost = find_option("host", 0, 1); |
| 1938 | if( zHost ) cgi_replace_parameter("HTTP_HOST",zHost); |
| 1939 | g.cgiOutput = 1; |
| 1940 | |
| 1941 | /* We should be done with options.. */ |
| 1942 | verify_all_options(); |
| 1943 | |
| 1944 | if( g.argc!=2 && g.argc!=3 && g.argc!=6 ){ |
| 1945 | fossil_fatal("no repository specified"); |
| @@ -2125,11 +2125,11 @@ | |
| 2125 | set_base_url(zAltBase); |
| 2126 | } |
| 2127 | if( find_option("localhost", 0, 0)!=0 ){ |
| 2128 | flags |= HTTP_SERVER_LOCALHOST; |
| 2129 | } |
| 2130 | |
| 2131 | /* We should be done with options.. */ |
| 2132 | verify_all_options(); |
| 2133 | |
| 2134 | if( g.argc!=2 && g.argc!=3 ) usage("?REPOSITORY?"); |
| 2135 | isUiCmd = g.argv[1][0]=='u'; |
| 2136 |
+3
-3
| --- src/main.mk | ||
| +++ src/main.mk | ||
| @@ -403,11 +403,11 @@ | ||
| 403 | 403 | |
| 404 | 404 | # The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set |
| 405 | 405 | # to 1. If it is set to 1, then there is no need to build or link |
| 406 | 406 | # the sqlite3.o object. Instead, the system sqlite will be linked |
| 407 | 407 | # using -lsqlite3. |
| 408 | -SQLITE3_OBJ.1 = | |
| 408 | +SQLITE3_OBJ.1 = | |
| 409 | 409 | SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o |
| 410 | 410 | SQLITE3_OBJ. = $(SQLITE3_OBJ.0) |
| 411 | 411 | |
| 412 | 412 | EXTRAOBJ = $(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) $(OBJDIR)/shell.o $(OBJDIR)/th.o $(OBJDIR)/th_lang.o $(OBJDIR)/th_tcl.o $(OBJDIR)/cson_amalgamation.o |
| 413 | 413 | |
| @@ -415,14 +415,14 @@ | ||
| 415 | 415 | $(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) |
| 416 | 416 | |
| 417 | 417 | # This rule prevents make from using its default rules to try build |
| 418 | 418 | # an executable named "manifest" out of the file named "manifest.c" |
| 419 | 419 | # |
| 420 | -$(SRCDIR)/../manifest: | |
| 420 | +$(SRCDIR)/../manifest: | |
| 421 | 421 | # noop |
| 422 | 422 | |
| 423 | -clean: | |
| 423 | +clean: | |
| 424 | 424 | rm -rf $(OBJDIR)/* $(APPNAME) |
| 425 | 425 | |
| 426 | 426 | |
| 427 | 427 | $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex |
| 428 | 428 | $(OBJDIR)/mkindex $(TRANS_SRC) >$@ |
| 429 | 429 |
| --- src/main.mk | |
| +++ src/main.mk | |
| @@ -403,11 +403,11 @@ | |
| 403 | |
| 404 | # The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set |
| 405 | # to 1. If it is set to 1, then there is no need to build or link |
| 406 | # the sqlite3.o object. Instead, the system sqlite will be linked |
| 407 | # using -lsqlite3. |
| 408 | SQLITE3_OBJ.1 = |
| 409 | SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o |
| 410 | SQLITE3_OBJ. = $(SQLITE3_OBJ.0) |
| 411 | |
| 412 | EXTRAOBJ = $(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) $(OBJDIR)/shell.o $(OBJDIR)/th.o $(OBJDIR)/th_lang.o $(OBJDIR)/th_tcl.o $(OBJDIR)/cson_amalgamation.o |
| 413 | |
| @@ -415,14 +415,14 @@ | |
| 415 | $(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) |
| 416 | |
| 417 | # This rule prevents make from using its default rules to try build |
| 418 | # an executable named "manifest" out of the file named "manifest.c" |
| 419 | # |
| 420 | $(SRCDIR)/../manifest: |
| 421 | # noop |
| 422 | |
| 423 | clean: |
| 424 | rm -rf $(OBJDIR)/* $(APPNAME) |
| 425 | |
| 426 | |
| 427 | $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex |
| 428 | $(OBJDIR)/mkindex $(TRANS_SRC) >$@ |
| 429 |
| --- src/main.mk | |
| +++ src/main.mk | |
| @@ -403,11 +403,11 @@ | |
| 403 | |
| 404 | # The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set |
| 405 | # to 1. If it is set to 1, then there is no need to build or link |
| 406 | # the sqlite3.o object. Instead, the system sqlite will be linked |
| 407 | # using -lsqlite3. |
| 408 | SQLITE3_OBJ.1 = |
| 409 | SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o |
| 410 | SQLITE3_OBJ. = $(SQLITE3_OBJ.0) |
| 411 | |
| 412 | EXTRAOBJ = $(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) $(OBJDIR)/shell.o $(OBJDIR)/th.o $(OBJDIR)/th_lang.o $(OBJDIR)/th_tcl.o $(OBJDIR)/cson_amalgamation.o |
| 413 | |
| @@ -415,14 +415,14 @@ | |
| 415 | $(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) |
| 416 | |
| 417 | # This rule prevents make from using its default rules to try build |
| 418 | # an executable named "manifest" out of the file named "manifest.c" |
| 419 | # |
| 420 | $(SRCDIR)/../manifest: |
| 421 | # noop |
| 422 | |
| 423 | clean: |
| 424 | rm -rf $(OBJDIR)/* $(APPNAME) |
| 425 | |
| 426 | |
| 427 | $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex |
| 428 | $(OBJDIR)/mkindex $(TRANS_SRC) >$@ |
| 429 |
+51
-25
| --- src/makemake.tcl | ||
| +++ src/makemake.tcl | ||
| @@ -268,11 +268,11 @@ | ||
| 268 | 268 | |
| 269 | 269 | # The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set |
| 270 | 270 | # to 1. If it is set to 1, then there is no need to build or link |
| 271 | 271 | # the sqlite3.o object. Instead, the system sqlite will be linked |
| 272 | 272 | # using -lsqlite3. |
| 273 | -SQLITE3_OBJ.1 = | |
| 273 | +SQLITE3_OBJ.1 = | |
| 274 | 274 | SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o |
| 275 | 275 | SQLITE3_OBJ. = $(SQLITE3_OBJ.0) |
| 276 | 276 | |
| 277 | 277 | EXTRAOBJ = \ |
| 278 | 278 | $(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) \ |
| @@ -286,14 +286,14 @@ | ||
| 286 | 286 | $(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) |
| 287 | 287 | |
| 288 | 288 | # This rule prevents make from using its default rules to try build |
| 289 | 289 | # an executable named "manifest" out of the file named "manifest.c" |
| 290 | 290 | # |
| 291 | -$(SRCDIR)/../manifest: | |
| 291 | +$(SRCDIR)/../manifest: | |
| 292 | 292 | # noop |
| 293 | 293 | |
| 294 | -clean: | |
| 294 | +clean: | |
| 295 | 295 | rm -rf $(OBJDIR)/* $(APPNAME) |
| 296 | 296 | |
| 297 | 297 | }] |
| 298 | 298 | |
| 299 | 299 | set mhargs {} |
| @@ -580,25 +580,30 @@ | ||
| 580 | 580 | #### We add the -static option here so that we can build a static |
| 581 | 581 | # executable that will run in a chroot jail. |
| 582 | 582 | # |
| 583 | 583 | LIB = -static |
| 584 | 584 | |
| 585 | -# MinGW: If available, use the Unicode capable runtime startup code. | |
| 585 | +#### MinGW: If available, use the Unicode capable runtime startup code. | |
| 586 | +# | |
| 586 | 587 | ifndef MINGW_IS_32BIT_ONLY |
| 587 | 588 | LIB += -municode |
| 588 | 589 | endif |
| 589 | 590 | |
| 591 | +#### SQLite: If enabled, use the system SQLite library. | |
| 592 | +# | |
| 590 | 593 | ifdef USE_SYSTEM_SQLITE |
| 591 | 594 | LIB += -lsqlite3 |
| 592 | 595 | endif |
| 593 | 596 | |
| 594 | -# OpenSSL: Add the necessary libraries required, if enabled. | |
| 597 | +#### OpenSSL: Add the necessary libraries required, if enabled. | |
| 598 | +# | |
| 595 | 599 | ifdef FOSSIL_ENABLE_SSL |
| 596 | 600 | LIB += -lssl -lcrypto -lgdi32 |
| 597 | 601 | endif |
| 598 | 602 | |
| 599 | -# Tcl: Add the necessary libraries required, if enabled. | |
| 603 | +#### Tcl: Add the necessary libraries required, if enabled. | |
| 604 | +# | |
| 600 | 605 | ifdef FOSSIL_ENABLE_TCL |
| 601 | 606 | LIB += $(LIBTCL) |
| 602 | 607 | endif |
| 603 | 608 | |
| 604 | 609 | #### Extra arguments for linking the finished binary. Fossil needs |
| @@ -921,11 +926,11 @@ | ||
| 921 | 926 | APPNAME = $(OBJDIR)\fossil$(E) |
| 922 | 927 | |
| 923 | 928 | all: $(APPNAME) |
| 924 | 929 | |
| 925 | 930 | $(APPNAME) : translate$E mkindex$E headers $(OBJ) $(OBJDIR)\link |
| 926 | - cd $(OBJDIR) | |
| 931 | + cd $(OBJDIR) | |
| 927 | 932 | $(DMDIR)\bin\link @link |
| 928 | 933 | |
| 929 | 934 | $(OBJDIR)\fossil.res: $B\win\fossil.rc |
| 930 | 935 | $(RC) $(RCFLAGS) -o$@ $** |
| 931 | 936 | |
| @@ -970,11 +975,11 @@ | ||
| 970 | 975 | cp $@ $@ |
| 971 | 976 | |
| 972 | 977 | VERSION.h : version$E $B\manifest.uuid $B\manifest $B\VERSION |
| 973 | 978 | +$** > $@ |
| 974 | 979 | |
| 975 | -page_index.h: mkindex$E $(SRC) | |
| 980 | +page_index.h: mkindex$E $(SRC) | |
| 976 | 981 | +$** > $@ |
| 977 | 982 | |
| 978 | 983 | clean: |
| 979 | 984 | -del $(OBJDIR)\*.obj |
| 980 | 985 | -del *.obj *_.c *.h *.map |
| @@ -1033,17 +1038,19 @@ | ||
| 1033 | 1038 | # |
| 1034 | 1039 | # This file is automatically generated. Instead of editing this |
| 1035 | 1040 | # file, edit "makemake.tcl" then run "tclsh makemake.tcl" |
| 1036 | 1041 | # to regenerate this file. |
| 1037 | 1042 | # |
| 1038 | -B = .. | |
| 1039 | -SRCDIR = $B\src | |
| 1040 | -OBJDIR = . | |
| 1041 | -OX = . | |
| 1042 | -O = .obj | |
| 1043 | -E = .exe | |
| 1044 | -P = .pdb | |
| 1043 | +B = .. | |
| 1044 | +SRCDIR = $B\src | |
| 1045 | +OBJDIR = . | |
| 1046 | +OX = . | |
| 1047 | +O = .obj | |
| 1048 | +E = .exe | |
| 1049 | +P = .pdb | |
| 1050 | +PERLDIR = | |
| 1051 | +PERL = perl.exe | |
| 1045 | 1052 | |
| 1046 | 1053 | # Uncomment to enable debug symbols |
| 1047 | 1054 | # DEBUG = 1 |
| 1048 | 1055 | |
| 1049 | 1056 | # Uncomment to enable JSON API |
| @@ -1057,12 +1064,13 @@ | ||
| 1057 | 1064 | |
| 1058 | 1065 | # Uncomment to enable Tcl support |
| 1059 | 1066 | # FOSSIL_ENABLE_TCL = 1 |
| 1060 | 1067 | |
| 1061 | 1068 | !ifdef FOSSIL_ENABLE_SSL |
| 1062 | -SSLINCDIR = $(B)\compat\openssl-1.0.1i\include | |
| 1063 | -SSLLIBDIR = $(B)\compat\openssl-1.0.1i\out32 | |
| 1069 | +SSLDIR = $(B)\compat\openssl-1.0.1i | |
| 1070 | +SSLINCDIR = $(SSLDIR)\include | |
| 1071 | +SSLLIBDIR = $(SSLDIR)\out32 | |
| 1064 | 1072 | SSLLIB = ssleay32.lib libeay32.lib user32.lib gdi32.lib |
| 1065 | 1073 | !endif |
| 1066 | 1074 | |
| 1067 | 1075 | !ifdef FOSSIL_ENABLE_TCL |
| 1068 | 1076 | TCLDIR = $(B)\compat\tcl-8.6 |
| @@ -1158,21 +1166,39 @@ | ||
| 1158 | 1166 | writeln -nonewline "\$(OX)\\$s\$O"; incr i |
| 1159 | 1167 | } |
| 1160 | 1168 | writeln " \\" |
| 1161 | 1169 | writeln -nonewline " \$(OX)\\fossil.res\n\n" |
| 1162 | 1170 | writeln { |
| 1163 | -APPNAME = $(OX)\fossil$(E) | |
| 1164 | -PDBNAME = $(OX)\fossil$(P) | |
| 1171 | +APPNAME = $(OX)\fossil$(E) | |
| 1172 | +PDBNAME = $(OX)\fossil$(P) | |
| 1173 | +APPTARGETS = | |
| 1165 | 1174 | |
| 1166 | 1175 | all: $(OX) $(APPNAME) |
| 1167 | 1176 | |
| 1168 | 1177 | zlib: |
| 1169 | 1178 | @echo Building zlib from "$(ZLIBDIR)"... |
| 1170 | - @pushd "$(ZLIBDIR)" && nmake /f win32\Makefile.msc $(ZLIB) && popd | |
| 1179 | + @pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc $(ZLIB) && popd | |
| 1180 | + | |
| 1181 | +!ifdef FOSSIL_ENABLE_SSL | |
| 1182 | +openssl: | |
| 1183 | + @echo Building OpenSSL from "$(SSLDIR)"... | |
| 1184 | +!if "$(PERLDIR)" != "" | |
| 1185 | + @set PATH=$(PERLDIR);$(PATH) | |
| 1186 | +!endif | |
| 1187 | + @pushd "$(SSLDIR)" && $(PERL) Configure VC-WIN32 no-asm && popd | |
| 1188 | + @pushd "$(SSLDIR)" && call ms\do_ms.bat && popd | |
| 1189 | + @pushd "$(SSLDIR)" && $(MAKE) /f ms\nt.mak all && popd | |
| 1190 | +!endif | |
| 1191 | + | |
| 1192 | +APPTARGETS = $(APPTARGETS) zlib | |
| 1193 | + | |
| 1194 | +!ifdef FOSSIL_ENABLE_SSL | |
| 1195 | +APPTARGETS = $(APPTARGETS) openssl | |
| 1196 | +!endif | |
| 1171 | 1197 | |
| 1172 | -$(APPNAME) : translate$E mkindex$E headers $(OBJ) $(OX)\linkopts zlib | |
| 1173 | - cd $(OX) | |
| 1198 | +$(APPNAME) : translate$E mkindex$E headers $(OBJ) $(OX)\linkopts $(APPTARGETS) | |
| 1199 | + cd $(OX) | |
| 1174 | 1200 | link $(LDFLAGS) /OUT:$@ $(LIBDIR) Wsetargv.obj fossil.res @linkopts |
| 1175 | 1201 | |
| 1176 | 1202 | $(OX)\linkopts: $B\win\Makefile.msc} |
| 1177 | 1203 | set redir {>} |
| 1178 | 1204 | foreach s [lsort [concat $src $AdditionalObj]] { |
| @@ -1215,11 +1241,11 @@ | ||
| 1215 | 1241 | VERSION.h : mkversion$E $B\manifest.uuid $B\manifest $B\VERSION |
| 1216 | 1242 | $** > $@ |
| 1217 | 1243 | $(OX)\cson_amalgamation$O : $(SRCDIR)\cson_amalgamation.c |
| 1218 | 1244 | $(TCC) /Fo$@ /c $** |
| 1219 | 1245 | |
| 1220 | -page_index.h: mkindex$E $(SRC) | |
| 1246 | +page_index.h: mkindex$E $(SRC) | |
| 1221 | 1247 | $** > $@ |
| 1222 | 1248 | |
| 1223 | 1249 | clean: |
| 1224 | 1250 | -del $(OX)\*.obj |
| 1225 | 1251 | -del *.obj |
| @@ -1333,13 +1359,13 @@ | ||
| 1333 | 1359 | # and |
| 1334 | 1360 | # PellesC 6.00.4 |
| 1335 | 1361 | # gmake 3.80 |
| 1336 | 1362 | # zlib sources 1.2.5 |
| 1337 | 1363 | # Windows 7 Home Premium |
| 1338 | -# | |
| 1364 | +# | |
| 1339 | 1365 | |
| 1340 | -# | |
| 1366 | +# | |
| 1341 | 1367 | PellesCDir=c:\Programme\PellesC |
| 1342 | 1368 | |
| 1343 | 1369 | # Select between 32/64 bit code, default is 32 bit |
| 1344 | 1370 | #TARGETVERSION=64 |
| 1345 | 1371 | |
| 1346 | 1372 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -268,11 +268,11 @@ | |
| 268 | |
| 269 | # The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set |
| 270 | # to 1. If it is set to 1, then there is no need to build or link |
| 271 | # the sqlite3.o object. Instead, the system sqlite will be linked |
| 272 | # using -lsqlite3. |
| 273 | SQLITE3_OBJ.1 = |
| 274 | SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o |
| 275 | SQLITE3_OBJ. = $(SQLITE3_OBJ.0) |
| 276 | |
| 277 | EXTRAOBJ = \ |
| 278 | $(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) \ |
| @@ -286,14 +286,14 @@ | |
| 286 | $(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) |
| 287 | |
| 288 | # This rule prevents make from using its default rules to try build |
| 289 | # an executable named "manifest" out of the file named "manifest.c" |
| 290 | # |
| 291 | $(SRCDIR)/../manifest: |
| 292 | # noop |
| 293 | |
| 294 | clean: |
| 295 | rm -rf $(OBJDIR)/* $(APPNAME) |
| 296 | |
| 297 | }] |
| 298 | |
| 299 | set mhargs {} |
| @@ -580,25 +580,30 @@ | |
| 580 | #### We add the -static option here so that we can build a static |
| 581 | # executable that will run in a chroot jail. |
| 582 | # |
| 583 | LIB = -static |
| 584 | |
| 585 | # MinGW: If available, use the Unicode capable runtime startup code. |
| 586 | ifndef MINGW_IS_32BIT_ONLY |
| 587 | LIB += -municode |
| 588 | endif |
| 589 | |
| 590 | ifdef USE_SYSTEM_SQLITE |
| 591 | LIB += -lsqlite3 |
| 592 | endif |
| 593 | |
| 594 | # OpenSSL: Add the necessary libraries required, if enabled. |
| 595 | ifdef FOSSIL_ENABLE_SSL |
| 596 | LIB += -lssl -lcrypto -lgdi32 |
| 597 | endif |
| 598 | |
| 599 | # Tcl: Add the necessary libraries required, if enabled. |
| 600 | ifdef FOSSIL_ENABLE_TCL |
| 601 | LIB += $(LIBTCL) |
| 602 | endif |
| 603 | |
| 604 | #### Extra arguments for linking the finished binary. Fossil needs |
| @@ -921,11 +926,11 @@ | |
| 921 | APPNAME = $(OBJDIR)\fossil$(E) |
| 922 | |
| 923 | all: $(APPNAME) |
| 924 | |
| 925 | $(APPNAME) : translate$E mkindex$E headers $(OBJ) $(OBJDIR)\link |
| 926 | cd $(OBJDIR) |
| 927 | $(DMDIR)\bin\link @link |
| 928 | |
| 929 | $(OBJDIR)\fossil.res: $B\win\fossil.rc |
| 930 | $(RC) $(RCFLAGS) -o$@ $** |
| 931 | |
| @@ -970,11 +975,11 @@ | |
| 970 | cp $@ $@ |
| 971 | |
| 972 | VERSION.h : version$E $B\manifest.uuid $B\manifest $B\VERSION |
| 973 | +$** > $@ |
| 974 | |
| 975 | page_index.h: mkindex$E $(SRC) |
| 976 | +$** > $@ |
| 977 | |
| 978 | clean: |
| 979 | -del $(OBJDIR)\*.obj |
| 980 | -del *.obj *_.c *.h *.map |
| @@ -1033,17 +1038,19 @@ | |
| 1033 | # |
| 1034 | # This file is automatically generated. Instead of editing this |
| 1035 | # file, edit "makemake.tcl" then run "tclsh makemake.tcl" |
| 1036 | # to regenerate this file. |
| 1037 | # |
| 1038 | B = .. |
| 1039 | SRCDIR = $B\src |
| 1040 | OBJDIR = . |
| 1041 | OX = . |
| 1042 | O = .obj |
| 1043 | E = .exe |
| 1044 | P = .pdb |
| 1045 | |
| 1046 | # Uncomment to enable debug symbols |
| 1047 | # DEBUG = 1 |
| 1048 | |
| 1049 | # Uncomment to enable JSON API |
| @@ -1057,12 +1064,13 @@ | |
| 1057 | |
| 1058 | # Uncomment to enable Tcl support |
| 1059 | # FOSSIL_ENABLE_TCL = 1 |
| 1060 | |
| 1061 | !ifdef FOSSIL_ENABLE_SSL |
| 1062 | SSLINCDIR = $(B)\compat\openssl-1.0.1i\include |
| 1063 | SSLLIBDIR = $(B)\compat\openssl-1.0.1i\out32 |
| 1064 | SSLLIB = ssleay32.lib libeay32.lib user32.lib gdi32.lib |
| 1065 | !endif |
| 1066 | |
| 1067 | !ifdef FOSSIL_ENABLE_TCL |
| 1068 | TCLDIR = $(B)\compat\tcl-8.6 |
| @@ -1158,21 +1166,39 @@ | |
| 1158 | writeln -nonewline "\$(OX)\\$s\$O"; incr i |
| 1159 | } |
| 1160 | writeln " \\" |
| 1161 | writeln -nonewline " \$(OX)\\fossil.res\n\n" |
| 1162 | writeln { |
| 1163 | APPNAME = $(OX)\fossil$(E) |
| 1164 | PDBNAME = $(OX)\fossil$(P) |
| 1165 | |
| 1166 | all: $(OX) $(APPNAME) |
| 1167 | |
| 1168 | zlib: |
| 1169 | @echo Building zlib from "$(ZLIBDIR)"... |
| 1170 | @pushd "$(ZLIBDIR)" && nmake /f win32\Makefile.msc $(ZLIB) && popd |
| 1171 | |
| 1172 | $(APPNAME) : translate$E mkindex$E headers $(OBJ) $(OX)\linkopts zlib |
| 1173 | cd $(OX) |
| 1174 | link $(LDFLAGS) /OUT:$@ $(LIBDIR) Wsetargv.obj fossil.res @linkopts |
| 1175 | |
| 1176 | $(OX)\linkopts: $B\win\Makefile.msc} |
| 1177 | set redir {>} |
| 1178 | foreach s [lsort [concat $src $AdditionalObj]] { |
| @@ -1215,11 +1241,11 @@ | |
| 1215 | VERSION.h : mkversion$E $B\manifest.uuid $B\manifest $B\VERSION |
| 1216 | $** > $@ |
| 1217 | $(OX)\cson_amalgamation$O : $(SRCDIR)\cson_amalgamation.c |
| 1218 | $(TCC) /Fo$@ /c $** |
| 1219 | |
| 1220 | page_index.h: mkindex$E $(SRC) |
| 1221 | $** > $@ |
| 1222 | |
| 1223 | clean: |
| 1224 | -del $(OX)\*.obj |
| 1225 | -del *.obj |
| @@ -1333,13 +1359,13 @@ | |
| 1333 | # and |
| 1334 | # PellesC 6.00.4 |
| 1335 | # gmake 3.80 |
| 1336 | # zlib sources 1.2.5 |
| 1337 | # Windows 7 Home Premium |
| 1338 | # |
| 1339 | |
| 1340 | # |
| 1341 | PellesCDir=c:\Programme\PellesC |
| 1342 | |
| 1343 | # Select between 32/64 bit code, default is 32 bit |
| 1344 | #TARGETVERSION=64 |
| 1345 | |
| 1346 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -268,11 +268,11 @@ | |
| 268 | |
| 269 | # The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set |
| 270 | # to 1. If it is set to 1, then there is no need to build or link |
| 271 | # the sqlite3.o object. Instead, the system sqlite will be linked |
| 272 | # using -lsqlite3. |
| 273 | SQLITE3_OBJ.1 = |
| 274 | SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o |
| 275 | SQLITE3_OBJ. = $(SQLITE3_OBJ.0) |
| 276 | |
| 277 | EXTRAOBJ = \ |
| 278 | $(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) \ |
| @@ -286,14 +286,14 @@ | |
| 286 | $(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) |
| 287 | |
| 288 | # This rule prevents make from using its default rules to try build |
| 289 | # an executable named "manifest" out of the file named "manifest.c" |
| 290 | # |
| 291 | $(SRCDIR)/../manifest: |
| 292 | # noop |
| 293 | |
| 294 | clean: |
| 295 | rm -rf $(OBJDIR)/* $(APPNAME) |
| 296 | |
| 297 | }] |
| 298 | |
| 299 | set mhargs {} |
| @@ -580,25 +580,30 @@ | |
| 580 | #### We add the -static option here so that we can build a static |
| 581 | # executable that will run in a chroot jail. |
| 582 | # |
| 583 | LIB = -static |
| 584 | |
| 585 | #### MinGW: If available, use the Unicode capable runtime startup code. |
| 586 | # |
| 587 | ifndef MINGW_IS_32BIT_ONLY |
| 588 | LIB += -municode |
| 589 | endif |
| 590 | |
| 591 | #### SQLite: If enabled, use the system SQLite library. |
| 592 | # |
| 593 | ifdef USE_SYSTEM_SQLITE |
| 594 | LIB += -lsqlite3 |
| 595 | endif |
| 596 | |
| 597 | #### OpenSSL: Add the necessary libraries required, if enabled. |
| 598 | # |
| 599 | ifdef FOSSIL_ENABLE_SSL |
| 600 | LIB += -lssl -lcrypto -lgdi32 |
| 601 | endif |
| 602 | |
| 603 | #### Tcl: Add the necessary libraries required, if enabled. |
| 604 | # |
| 605 | ifdef FOSSIL_ENABLE_TCL |
| 606 | LIB += $(LIBTCL) |
| 607 | endif |
| 608 | |
| 609 | #### Extra arguments for linking the finished binary. Fossil needs |
| @@ -921,11 +926,11 @@ | |
| 926 | APPNAME = $(OBJDIR)\fossil$(E) |
| 927 | |
| 928 | all: $(APPNAME) |
| 929 | |
| 930 | $(APPNAME) : translate$E mkindex$E headers $(OBJ) $(OBJDIR)\link |
| 931 | cd $(OBJDIR) |
| 932 | $(DMDIR)\bin\link @link |
| 933 | |
| 934 | $(OBJDIR)\fossil.res: $B\win\fossil.rc |
| 935 | $(RC) $(RCFLAGS) -o$@ $** |
| 936 | |
| @@ -970,11 +975,11 @@ | |
| 975 | cp $@ $@ |
| 976 | |
| 977 | VERSION.h : version$E $B\manifest.uuid $B\manifest $B\VERSION |
| 978 | +$** > $@ |
| 979 | |
| 980 | page_index.h: mkindex$E $(SRC) |
| 981 | +$** > $@ |
| 982 | |
| 983 | clean: |
| 984 | -del $(OBJDIR)\*.obj |
| 985 | -del *.obj *_.c *.h *.map |
| @@ -1033,17 +1038,19 @@ | |
| 1038 | # |
| 1039 | # This file is automatically generated. Instead of editing this |
| 1040 | # file, edit "makemake.tcl" then run "tclsh makemake.tcl" |
| 1041 | # to regenerate this file. |
| 1042 | # |
| 1043 | B = .. |
| 1044 | SRCDIR = $B\src |
| 1045 | OBJDIR = . |
| 1046 | OX = . |
| 1047 | O = .obj |
| 1048 | E = .exe |
| 1049 | P = .pdb |
| 1050 | PERLDIR = |
| 1051 | PERL = perl.exe |
| 1052 | |
| 1053 | # Uncomment to enable debug symbols |
| 1054 | # DEBUG = 1 |
| 1055 | |
| 1056 | # Uncomment to enable JSON API |
| @@ -1057,12 +1064,13 @@ | |
| 1064 | |
| 1065 | # Uncomment to enable Tcl support |
| 1066 | # FOSSIL_ENABLE_TCL = 1 |
| 1067 | |
| 1068 | !ifdef FOSSIL_ENABLE_SSL |
| 1069 | SSLDIR = $(B)\compat\openssl-1.0.1i |
| 1070 | SSLINCDIR = $(SSLDIR)\include |
| 1071 | SSLLIBDIR = $(SSLDIR)\out32 |
| 1072 | SSLLIB = ssleay32.lib libeay32.lib user32.lib gdi32.lib |
| 1073 | !endif |
| 1074 | |
| 1075 | !ifdef FOSSIL_ENABLE_TCL |
| 1076 | TCLDIR = $(B)\compat\tcl-8.6 |
| @@ -1158,21 +1166,39 @@ | |
| 1166 | writeln -nonewline "\$(OX)\\$s\$O"; incr i |
| 1167 | } |
| 1168 | writeln " \\" |
| 1169 | writeln -nonewline " \$(OX)\\fossil.res\n\n" |
| 1170 | writeln { |
| 1171 | APPNAME = $(OX)\fossil$(E) |
| 1172 | PDBNAME = $(OX)\fossil$(P) |
| 1173 | APPTARGETS = |
| 1174 | |
| 1175 | all: $(OX) $(APPNAME) |
| 1176 | |
| 1177 | zlib: |
| 1178 | @echo Building zlib from "$(ZLIBDIR)"... |
| 1179 | @pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc $(ZLIB) && popd |
| 1180 | |
| 1181 | !ifdef FOSSIL_ENABLE_SSL |
| 1182 | openssl: |
| 1183 | @echo Building OpenSSL from "$(SSLDIR)"... |
| 1184 | !if "$(PERLDIR)" != "" |
| 1185 | @set PATH=$(PERLDIR);$(PATH) |
| 1186 | !endif |
| 1187 | @pushd "$(SSLDIR)" && $(PERL) Configure VC-WIN32 no-asm && popd |
| 1188 | @pushd "$(SSLDIR)" && call ms\do_ms.bat && popd |
| 1189 | @pushd "$(SSLDIR)" && $(MAKE) /f ms\nt.mak all && popd |
| 1190 | !endif |
| 1191 | |
| 1192 | APPTARGETS = $(APPTARGETS) zlib |
| 1193 | |
| 1194 | !ifdef FOSSIL_ENABLE_SSL |
| 1195 | APPTARGETS = $(APPTARGETS) openssl |
| 1196 | !endif |
| 1197 | |
| 1198 | $(APPNAME) : translate$E mkindex$E headers $(OBJ) $(OX)\linkopts $(APPTARGETS) |
| 1199 | cd $(OX) |
| 1200 | link $(LDFLAGS) /OUT:$@ $(LIBDIR) Wsetargv.obj fossil.res @linkopts |
| 1201 | |
| 1202 | $(OX)\linkopts: $B\win\Makefile.msc} |
| 1203 | set redir {>} |
| 1204 | foreach s [lsort [concat $src $AdditionalObj]] { |
| @@ -1215,11 +1241,11 @@ | |
| 1241 | VERSION.h : mkversion$E $B\manifest.uuid $B\manifest $B\VERSION |
| 1242 | $** > $@ |
| 1243 | $(OX)\cson_amalgamation$O : $(SRCDIR)\cson_amalgamation.c |
| 1244 | $(TCC) /Fo$@ /c $** |
| 1245 | |
| 1246 | page_index.h: mkindex$E $(SRC) |
| 1247 | $** > $@ |
| 1248 | |
| 1249 | clean: |
| 1250 | -del $(OX)\*.obj |
| 1251 | -del *.obj |
| @@ -1333,13 +1359,13 @@ | |
| 1359 | # and |
| 1360 | # PellesC 6.00.4 |
| 1361 | # gmake 3.80 |
| 1362 | # zlib sources 1.2.5 |
| 1363 | # Windows 7 Home Premium |
| 1364 | # |
| 1365 | |
| 1366 | # |
| 1367 | PellesCDir=c:\Programme\PellesC |
| 1368 | |
| 1369 | # Select between 32/64 bit code, default is 32 bit |
| 1370 | #TARGETVERSION=64 |
| 1371 | |
| 1372 |
+2
-2
| --- src/manifest.c | ||
| +++ src/manifest.c | ||
| @@ -1920,12 +1920,12 @@ | ||
| 1920 | 1920 | db_multi_exec("INSERT OR IGNORE INTO pending_tkt VALUES(%Q)", |
| 1921 | 1921 | p->zTicketUuid); |
| 1922 | 1922 | } |
| 1923 | 1923 | if( p->type==CFTYPE_ATTACHMENT ){ |
| 1924 | 1924 | char *zComment = 0; |
| 1925 | - char const isAdd = (p->zAttachSrc && p->zAttachSrc[0]) ? 1 : 0; | |
| 1926 | - char const attachToType = fossil_is_uuid(p->zAttachTarget) | |
| 1925 | + const char isAdd = (p->zAttachSrc && p->zAttachSrc[0]) ? 1 : 0; | |
| 1926 | + const char attachToType = fossil_is_uuid(p->zAttachTarget) | |
| 1927 | 1927 | ? 't' /* attach to ticket */ |
| 1928 | 1928 | : 'w' /* attach to wiki page */; |
| 1929 | 1929 | db_multi_exec( |
| 1930 | 1930 | "INSERT INTO attachment(attachid, mtime, src, target," |
| 1931 | 1931 | "filename, comment, user)" |
| 1932 | 1932 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -1920,12 +1920,12 @@ | |
| 1920 | db_multi_exec("INSERT OR IGNORE INTO pending_tkt VALUES(%Q)", |
| 1921 | p->zTicketUuid); |
| 1922 | } |
| 1923 | if( p->type==CFTYPE_ATTACHMENT ){ |
| 1924 | char *zComment = 0; |
| 1925 | char const isAdd = (p->zAttachSrc && p->zAttachSrc[0]) ? 1 : 0; |
| 1926 | char const attachToType = fossil_is_uuid(p->zAttachTarget) |
| 1927 | ? 't' /* attach to ticket */ |
| 1928 | : 'w' /* attach to wiki page */; |
| 1929 | db_multi_exec( |
| 1930 | "INSERT INTO attachment(attachid, mtime, src, target," |
| 1931 | "filename, comment, user)" |
| 1932 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -1920,12 +1920,12 @@ | |
| 1920 | db_multi_exec("INSERT OR IGNORE INTO pending_tkt VALUES(%Q)", |
| 1921 | p->zTicketUuid); |
| 1922 | } |
| 1923 | if( p->type==CFTYPE_ATTACHMENT ){ |
| 1924 | char *zComment = 0; |
| 1925 | const char isAdd = (p->zAttachSrc && p->zAttachSrc[0]) ? 1 : 0; |
| 1926 | const char attachToType = fossil_is_uuid(p->zAttachTarget) |
| 1927 | ? 't' /* attach to ticket */ |
| 1928 | : 'w' /* attach to wiki page */; |
| 1929 | db_multi_exec( |
| 1930 | "INSERT INTO attachment(attachid, mtime, src, target," |
| 1931 | "filename, comment, user)" |
| 1932 |
+1
-1
| --- src/name.c | ||
| +++ src/name.c | ||
| @@ -309,11 +309,11 @@ | ||
| 309 | 309 | ** zName does not resolve, 0 is returned. If it is ambiguous, a |
| 310 | 310 | ** negative value is returned. On success the rid is returned and |
| 311 | 311 | ** pUuid (if it is not NULL) is set to the a newly-allocated string, |
| 312 | 312 | ** the full UUID, which must eventually be free()d by the caller. |
| 313 | 313 | */ |
| 314 | -int name_to_uuid2(char const *zName, const char *zType, char **pUuid){ | |
| 314 | +int name_to_uuid2(const char *zName, const char *zType, char **pUuid){ | |
| 315 | 315 | int rid = symbolic_name_to_rid(zName, zType); |
| 316 | 316 | if((rid>0) && pUuid){ |
| 317 | 317 | *pUuid = db_text(NULL, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 318 | 318 | } |
| 319 | 319 | return rid; |
| 320 | 320 |
| --- src/name.c | |
| +++ src/name.c | |
| @@ -309,11 +309,11 @@ | |
| 309 | ** zName does not resolve, 0 is returned. If it is ambiguous, a |
| 310 | ** negative value is returned. On success the rid is returned and |
| 311 | ** pUuid (if it is not NULL) is set to the a newly-allocated string, |
| 312 | ** the full UUID, which must eventually be free()d by the caller. |
| 313 | */ |
| 314 | int name_to_uuid2(char const *zName, const char *zType, char **pUuid){ |
| 315 | int rid = symbolic_name_to_rid(zName, zType); |
| 316 | if((rid>0) && pUuid){ |
| 317 | *pUuid = db_text(NULL, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 318 | } |
| 319 | return rid; |
| 320 |
| --- src/name.c | |
| +++ src/name.c | |
| @@ -309,11 +309,11 @@ | |
| 309 | ** zName does not resolve, 0 is returned. If it is ambiguous, a |
| 310 | ** negative value is returned. On success the rid is returned and |
| 311 | ** pUuid (if it is not NULL) is set to the a newly-allocated string, |
| 312 | ** the full UUID, which must eventually be free()d by the caller. |
| 313 | */ |
| 314 | int name_to_uuid2(const char *zName, const char *zType, char **pUuid){ |
| 315 | int rid = symbolic_name_to_rid(zName, zType); |
| 316 | if((rid>0) && pUuid){ |
| 317 | *pUuid = db_text(NULL, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 318 | } |
| 319 | return rid; |
| 320 |
+1
-1
| --- src/search.c | ||
| +++ src/search.c | ||
| @@ -191,11 +191,11 @@ | ||
| 191 | 191 | Stmt q; |
| 192 | 192 | int iBest; |
| 193 | 193 | char fAll = NULL != find_option("all", "a", 0); /* If set, do not lop |
| 194 | 194 | off the end of the |
| 195 | 195 | results. */ |
| 196 | - char const * zLimit = find_option("limit","n",1); | |
| 196 | + const char *zLimit = find_option("limit","n",1); | |
| 197 | 197 | const char *zWidth = find_option("width","W",1); |
| 198 | 198 | int nLimit = zLimit ? atoi(zLimit) : -1000; /* Max number of matching |
| 199 | 199 | lines/entries to list */ |
| 200 | 200 | int width; |
| 201 | 201 | if( zWidth ){ |
| 202 | 202 |
| --- src/search.c | |
| +++ src/search.c | |
| @@ -191,11 +191,11 @@ | |
| 191 | Stmt q; |
| 192 | int iBest; |
| 193 | char fAll = NULL != find_option("all", "a", 0); /* If set, do not lop |
| 194 | off the end of the |
| 195 | results. */ |
| 196 | char const * zLimit = find_option("limit","n",1); |
| 197 | const char *zWidth = find_option("width","W",1); |
| 198 | int nLimit = zLimit ? atoi(zLimit) : -1000; /* Max number of matching |
| 199 | lines/entries to list */ |
| 200 | int width; |
| 201 | if( zWidth ){ |
| 202 |
| --- src/search.c | |
| +++ src/search.c | |
| @@ -191,11 +191,11 @@ | |
| 191 | Stmt q; |
| 192 | int iBest; |
| 193 | char fAll = NULL != find_option("all", "a", 0); /* If set, do not lop |
| 194 | off the end of the |
| 195 | results. */ |
| 196 | const char *zLimit = find_option("limit","n",1); |
| 197 | const char *zWidth = find_option("width","W",1); |
| 198 | int nLimit = zLimit ? atoi(zLimit) : -1000; /* Max number of matching |
| 199 | lines/entries to list */ |
| 200 | int width; |
| 201 | if( zWidth ){ |
| 202 |
+10
-5
| --- src/sqlite3.c | ||
| +++ src/sqlite3.c | ||
| @@ -222,11 +222,11 @@ | ||
| 222 | 222 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 223 | 223 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 224 | 224 | */ |
| 225 | 225 | #define SQLITE_VERSION "3.8.6" |
| 226 | 226 | #define SQLITE_VERSION_NUMBER 3008006 |
| 227 | -#define SQLITE_SOURCE_ID "2014-08-12 16:13:37 6715991296886c2a02b9a285a1e61189ad1f79c0" | |
| 227 | +#define SQLITE_SOURCE_ID "2014-08-15 11:46:33 9491ba7d738528f168657adb43a198238abde19e" | |
| 228 | 228 | |
| 229 | 229 | /* |
| 230 | 230 | ** CAPI3REF: Run-Time Library Version Numbers |
| 231 | 231 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 232 | 232 | ** |
| @@ -30152,11 +30152,15 @@ | ||
| 30152 | 30152 | ){ |
| 30153 | 30153 | int rc = SQLITE_OK; |
| 30154 | 30154 | UNUSED_PARAMETER(NotUsed); |
| 30155 | 30155 | SimulateIOError(return SQLITE_IOERR_DELETE); |
| 30156 | 30156 | if( osUnlink(zPath)==(-1) ){ |
| 30157 | - if( errno==ENOENT ){ | |
| 30157 | + if( errno==ENOENT | |
| 30158 | +#if OS_VXWORKS | |
| 30159 | + || errno==0x380003 | |
| 30160 | +#endif | |
| 30161 | + ){ | |
| 30158 | 30162 | rc = SQLITE_IOERR_DELETE_NOENT; |
| 30159 | 30163 | }else{ |
| 30160 | 30164 | rc = unixLogError(SQLITE_IOERR_DELETE, "unlink", zPath); |
| 30161 | 30165 | } |
| 30162 | 30166 | return rc; |
| @@ -57274,11 +57278,12 @@ | ||
| 57274 | 57278 | int nSkip = (iChild ? 4 : 0); |
| 57275 | 57279 | |
| 57276 | 57280 | if( *pRC ) return; |
| 57277 | 57281 | |
| 57278 | 57282 | assert( i>=0 && i<=pPage->nCell+pPage->nOverflow ); |
| 57279 | - assert( pPage->nCell<=MX_CELL(pPage->pBt) && MX_CELL(pPage->pBt)<=10921 ); | |
| 57283 | + assert( MX_CELL(pPage->pBt)<=10921 ); | |
| 57284 | + assert( pPage->nCell<=MX_CELL(pPage->pBt) || CORRUPT_DB ); | |
| 57280 | 57285 | assert( pPage->nOverflow<=ArraySize(pPage->apOvfl) ); |
| 57281 | 57286 | assert( ArraySize(pPage->apOvfl)==ArraySize(pPage->aiOvfl) ); |
| 57282 | 57287 | assert( sqlite3_mutex_held(pPage->pBt->mutex) ); |
| 57283 | 57288 | /* The cell should normally be sized correctly. However, when moving a |
| 57284 | 57289 | ** malformed cell from a leaf page to an interior page, if the cell size |
| @@ -71515,11 +71520,11 @@ | ||
| 71515 | 71520 | ** Reposition cursor P1 so that it points to the smallest entry that |
| 71516 | 71521 | ** is greater than the key value. If there are no records greater than |
| 71517 | 71522 | ** the key and P2 is not zero, then jump to P2. |
| 71518 | 71523 | ** |
| 71519 | 71524 | ** This opcode leaves the cursor configured to move in forward order, |
| 71520 | -** from the begining toward the end. In other words, the cursor is | |
| 71525 | +** from the beginning toward the end. In other words, the cursor is | |
| 71521 | 71526 | ** configured to use Next, not Prev. |
| 71522 | 71527 | ** |
| 71523 | 71528 | ** See also: Found, NotFound, SeekLt, SeekGe, SeekLe |
| 71524 | 71529 | */ |
| 71525 | 71530 | /* Opcode: SeekLT P1 P2 P3 P4 * |
| @@ -72532,11 +72537,11 @@ | ||
| 72532 | 72537 | ** If the table or index is empty and P2>0, then jump immediately to P2. |
| 72533 | 72538 | ** If P2 is 0 or if the table or index is not empty, fall through |
| 72534 | 72539 | ** to the following instruction. |
| 72535 | 72540 | ** |
| 72536 | 72541 | ** This opcode leaves the cursor configured to move in forward order, |
| 72537 | -** from the begining toward the end. In other words, the cursor is | |
| 72542 | +** from the beginning toward the end. In other words, the cursor is | |
| 72538 | 72543 | ** configured to use Next, not Prev. |
| 72539 | 72544 | */ |
| 72540 | 72545 | case OP_Rewind: { /* jump */ |
| 72541 | 72546 | VdbeCursor *pC; |
| 72542 | 72547 | BtCursor *pCrsr; |
| 72543 | 72548 |
| --- src/sqlite3.c | |
| +++ src/sqlite3.c | |
| @@ -222,11 +222,11 @@ | |
| 222 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 223 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 224 | */ |
| 225 | #define SQLITE_VERSION "3.8.6" |
| 226 | #define SQLITE_VERSION_NUMBER 3008006 |
| 227 | #define SQLITE_SOURCE_ID "2014-08-12 16:13:37 6715991296886c2a02b9a285a1e61189ad1f79c0" |
| 228 | |
| 229 | /* |
| 230 | ** CAPI3REF: Run-Time Library Version Numbers |
| 231 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 232 | ** |
| @@ -30152,11 +30152,15 @@ | |
| 30152 | ){ |
| 30153 | int rc = SQLITE_OK; |
| 30154 | UNUSED_PARAMETER(NotUsed); |
| 30155 | SimulateIOError(return SQLITE_IOERR_DELETE); |
| 30156 | if( osUnlink(zPath)==(-1) ){ |
| 30157 | if( errno==ENOENT ){ |
| 30158 | rc = SQLITE_IOERR_DELETE_NOENT; |
| 30159 | }else{ |
| 30160 | rc = unixLogError(SQLITE_IOERR_DELETE, "unlink", zPath); |
| 30161 | } |
| 30162 | return rc; |
| @@ -57274,11 +57278,12 @@ | |
| 57274 | int nSkip = (iChild ? 4 : 0); |
| 57275 | |
| 57276 | if( *pRC ) return; |
| 57277 | |
| 57278 | assert( i>=0 && i<=pPage->nCell+pPage->nOverflow ); |
| 57279 | assert( pPage->nCell<=MX_CELL(pPage->pBt) && MX_CELL(pPage->pBt)<=10921 ); |
| 57280 | assert( pPage->nOverflow<=ArraySize(pPage->apOvfl) ); |
| 57281 | assert( ArraySize(pPage->apOvfl)==ArraySize(pPage->aiOvfl) ); |
| 57282 | assert( sqlite3_mutex_held(pPage->pBt->mutex) ); |
| 57283 | /* The cell should normally be sized correctly. However, when moving a |
| 57284 | ** malformed cell from a leaf page to an interior page, if the cell size |
| @@ -71515,11 +71520,11 @@ | |
| 71515 | ** Reposition cursor P1 so that it points to the smallest entry that |
| 71516 | ** is greater than the key value. If there are no records greater than |
| 71517 | ** the key and P2 is not zero, then jump to P2. |
| 71518 | ** |
| 71519 | ** This opcode leaves the cursor configured to move in forward order, |
| 71520 | ** from the begining toward the end. In other words, the cursor is |
| 71521 | ** configured to use Next, not Prev. |
| 71522 | ** |
| 71523 | ** See also: Found, NotFound, SeekLt, SeekGe, SeekLe |
| 71524 | */ |
| 71525 | /* Opcode: SeekLT P1 P2 P3 P4 * |
| @@ -72532,11 +72537,11 @@ | |
| 72532 | ** If the table or index is empty and P2>0, then jump immediately to P2. |
| 72533 | ** If P2 is 0 or if the table or index is not empty, fall through |
| 72534 | ** to the following instruction. |
| 72535 | ** |
| 72536 | ** This opcode leaves the cursor configured to move in forward order, |
| 72537 | ** from the begining toward the end. In other words, the cursor is |
| 72538 | ** configured to use Next, not Prev. |
| 72539 | */ |
| 72540 | case OP_Rewind: { /* jump */ |
| 72541 | VdbeCursor *pC; |
| 72542 | BtCursor *pCrsr; |
| 72543 |
| --- src/sqlite3.c | |
| +++ src/sqlite3.c | |
| @@ -222,11 +222,11 @@ | |
| 222 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 223 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 224 | */ |
| 225 | #define SQLITE_VERSION "3.8.6" |
| 226 | #define SQLITE_VERSION_NUMBER 3008006 |
| 227 | #define SQLITE_SOURCE_ID "2014-08-15 11:46:33 9491ba7d738528f168657adb43a198238abde19e" |
| 228 | |
| 229 | /* |
| 230 | ** CAPI3REF: Run-Time Library Version Numbers |
| 231 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 232 | ** |
| @@ -30152,11 +30152,15 @@ | |
| 30152 | ){ |
| 30153 | int rc = SQLITE_OK; |
| 30154 | UNUSED_PARAMETER(NotUsed); |
| 30155 | SimulateIOError(return SQLITE_IOERR_DELETE); |
| 30156 | if( osUnlink(zPath)==(-1) ){ |
| 30157 | if( errno==ENOENT |
| 30158 | #if OS_VXWORKS |
| 30159 | || errno==0x380003 |
| 30160 | #endif |
| 30161 | ){ |
| 30162 | rc = SQLITE_IOERR_DELETE_NOENT; |
| 30163 | }else{ |
| 30164 | rc = unixLogError(SQLITE_IOERR_DELETE, "unlink", zPath); |
| 30165 | } |
| 30166 | return rc; |
| @@ -57274,11 +57278,12 @@ | |
| 57278 | int nSkip = (iChild ? 4 : 0); |
| 57279 | |
| 57280 | if( *pRC ) return; |
| 57281 | |
| 57282 | assert( i>=0 && i<=pPage->nCell+pPage->nOverflow ); |
| 57283 | assert( MX_CELL(pPage->pBt)<=10921 ); |
| 57284 | assert( pPage->nCell<=MX_CELL(pPage->pBt) || CORRUPT_DB ); |
| 57285 | assert( pPage->nOverflow<=ArraySize(pPage->apOvfl) ); |
| 57286 | assert( ArraySize(pPage->apOvfl)==ArraySize(pPage->aiOvfl) ); |
| 57287 | assert( sqlite3_mutex_held(pPage->pBt->mutex) ); |
| 57288 | /* The cell should normally be sized correctly. However, when moving a |
| 57289 | ** malformed cell from a leaf page to an interior page, if the cell size |
| @@ -71515,11 +71520,11 @@ | |
| 71520 | ** Reposition cursor P1 so that it points to the smallest entry that |
| 71521 | ** is greater than the key value. If there are no records greater than |
| 71522 | ** the key and P2 is not zero, then jump to P2. |
| 71523 | ** |
| 71524 | ** This opcode leaves the cursor configured to move in forward order, |
| 71525 | ** from the beginning toward the end. In other words, the cursor is |
| 71526 | ** configured to use Next, not Prev. |
| 71527 | ** |
| 71528 | ** See also: Found, NotFound, SeekLt, SeekGe, SeekLe |
| 71529 | */ |
| 71530 | /* Opcode: SeekLT P1 P2 P3 P4 * |
| @@ -72532,11 +72537,11 @@ | |
| 72537 | ** If the table or index is empty and P2>0, then jump immediately to P2. |
| 72538 | ** If P2 is 0 or if the table or index is not empty, fall through |
| 72539 | ** to the following instruction. |
| 72540 | ** |
| 72541 | ** This opcode leaves the cursor configured to move in forward order, |
| 72542 | ** from the beginning toward the end. In other words, the cursor is |
| 72543 | ** configured to use Next, not Prev. |
| 72544 | */ |
| 72545 | case OP_Rewind: { /* jump */ |
| 72546 | VdbeCursor *pC; |
| 72547 | BtCursor *pCrsr; |
| 72548 |
+1
-1
| --- src/sqlite3.h | ||
| +++ src/sqlite3.h | ||
| @@ -107,11 +107,11 @@ | ||
| 107 | 107 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 108 | 108 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 109 | 109 | */ |
| 110 | 110 | #define SQLITE_VERSION "3.8.6" |
| 111 | 111 | #define SQLITE_VERSION_NUMBER 3008006 |
| 112 | -#define SQLITE_SOURCE_ID "2014-08-12 16:13:37 6715991296886c2a02b9a285a1e61189ad1f79c0" | |
| 112 | +#define SQLITE_SOURCE_ID "2014-08-15 11:46:33 9491ba7d738528f168657adb43a198238abde19e" | |
| 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 | |
| @@ -107,11 +107,11 @@ | |
| 107 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 108 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 109 | */ |
| 110 | #define SQLITE_VERSION "3.8.6" |
| 111 | #define SQLITE_VERSION_NUMBER 3008006 |
| 112 | #define SQLITE_SOURCE_ID "2014-08-12 16:13:37 6715991296886c2a02b9a285a1e61189ad1f79c0" |
| 113 | |
| 114 | /* |
| 115 | ** CAPI3REF: Run-Time Library Version Numbers |
| 116 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 117 | ** |
| 118 |
| --- src/sqlite3.h | |
| +++ src/sqlite3.h | |
| @@ -107,11 +107,11 @@ | |
| 107 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 108 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 109 | */ |
| 110 | #define SQLITE_VERSION "3.8.6" |
| 111 | #define SQLITE_VERSION_NUMBER 3008006 |
| 112 | #define SQLITE_SOURCE_ID "2014-08-15 11:46:33 9491ba7d738528f168657adb43a198238abde19e" |
| 113 | |
| 114 | /* |
| 115 | ** CAPI3REF: Run-Time Library Version Numbers |
| 116 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 117 | ** |
| 118 |
+6
-6
| --- src/style.c | ||
| +++ src/style.c | ||
| @@ -388,11 +388,11 @@ | ||
| 388 | 388 | } |
| 389 | 389 | style_ad_unit(); |
| 390 | 390 | @ <div class="content"> |
| 391 | 391 | cgi_destination(CGI_BODY); |
| 392 | 392 | |
| 393 | - if (sideboxUsed) { | |
| 393 | + if( sideboxUsed ){ | |
| 394 | 394 | /* Put the footer at the bottom of the page. |
| 395 | 395 | ** the additional clear/both is needed to extend the content |
| 396 | 396 | ** part to the end of an optional sidebox. |
| 397 | 397 | */ |
| 398 | 398 | @ <div class="endContent"></div> |
| @@ -657,13 +657,13 @@ | ||
| 657 | 657 | /* The following table contains bits of default CSS that must |
| 658 | 658 | ** be included if they are not found in the application-defined |
| 659 | 659 | ** CSS. |
| 660 | 660 | */ |
| 661 | 661 | const struct strctCssDefaults { |
| 662 | - char const * const elementClass; /* Name of element needed */ | |
| 663 | - char const * const comment; /* Comment text */ | |
| 664 | - char const * const value; /* CSS text */ | |
| 662 | + const char *elementClass; /* Name of element needed */ | |
| 663 | + const char *comment; /* Comment text */ | |
| 664 | + const char *value; /* CSS text */ | |
| 665 | 665 | } cssDefaultList[] = { |
| 666 | 666 | { "", |
| 667 | 667 | "", |
| 668 | 668 | zDefaultCSS |
| 669 | 669 | }, |
| @@ -1208,12 +1208,12 @@ | ||
| 1208 | 1208 | ** Append all of the default CSS to the CGI output. |
| 1209 | 1209 | */ |
| 1210 | 1210 | void cgi_append_default_css(void) { |
| 1211 | 1211 | int i; |
| 1212 | 1212 | |
| 1213 | - for (i=0;cssDefaultList[i].elementClass;i++){ | |
| 1214 | - if (cssDefaultList[i].elementClass[0]){ | |
| 1213 | + for( i=0; cssDefaultList[i].elementClass; i++ ){ | |
| 1214 | + if( cssDefaultList[i].elementClass[0] ){ | |
| 1215 | 1215 | cgi_printf("/* %s */\n%s {\n%s\n}\n\n", |
| 1216 | 1216 | cssDefaultList[i].comment, |
| 1217 | 1217 | cssDefaultList[i].elementClass, |
| 1218 | 1218 | cssDefaultList[i].value |
| 1219 | 1219 | ); |
| 1220 | 1220 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -388,11 +388,11 @@ | |
| 388 | } |
| 389 | style_ad_unit(); |
| 390 | @ <div class="content"> |
| 391 | cgi_destination(CGI_BODY); |
| 392 | |
| 393 | if (sideboxUsed) { |
| 394 | /* Put the footer at the bottom of the page. |
| 395 | ** the additional clear/both is needed to extend the content |
| 396 | ** part to the end of an optional sidebox. |
| 397 | */ |
| 398 | @ <div class="endContent"></div> |
| @@ -657,13 +657,13 @@ | |
| 657 | /* The following table contains bits of default CSS that must |
| 658 | ** be included if they are not found in the application-defined |
| 659 | ** CSS. |
| 660 | */ |
| 661 | const struct strctCssDefaults { |
| 662 | char const * const elementClass; /* Name of element needed */ |
| 663 | char const * const comment; /* Comment text */ |
| 664 | char const * const value; /* CSS text */ |
| 665 | } cssDefaultList[] = { |
| 666 | { "", |
| 667 | "", |
| 668 | zDefaultCSS |
| 669 | }, |
| @@ -1208,12 +1208,12 @@ | |
| 1208 | ** Append all of the default CSS to the CGI output. |
| 1209 | */ |
| 1210 | void cgi_append_default_css(void) { |
| 1211 | int i; |
| 1212 | |
| 1213 | for (i=0;cssDefaultList[i].elementClass;i++){ |
| 1214 | if (cssDefaultList[i].elementClass[0]){ |
| 1215 | cgi_printf("/* %s */\n%s {\n%s\n}\n\n", |
| 1216 | cssDefaultList[i].comment, |
| 1217 | cssDefaultList[i].elementClass, |
| 1218 | cssDefaultList[i].value |
| 1219 | ); |
| 1220 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -388,11 +388,11 @@ | |
| 388 | } |
| 389 | style_ad_unit(); |
| 390 | @ <div class="content"> |
| 391 | cgi_destination(CGI_BODY); |
| 392 | |
| 393 | if( sideboxUsed ){ |
| 394 | /* Put the footer at the bottom of the page. |
| 395 | ** the additional clear/both is needed to extend the content |
| 396 | ** part to the end of an optional sidebox. |
| 397 | */ |
| 398 | @ <div class="endContent"></div> |
| @@ -657,13 +657,13 @@ | |
| 657 | /* The following table contains bits of default CSS that must |
| 658 | ** be included if they are not found in the application-defined |
| 659 | ** CSS. |
| 660 | */ |
| 661 | const struct strctCssDefaults { |
| 662 | const char *elementClass; /* Name of element needed */ |
| 663 | const char *comment; /* Comment text */ |
| 664 | const char *value; /* CSS text */ |
| 665 | } cssDefaultList[] = { |
| 666 | { "", |
| 667 | "", |
| 668 | zDefaultCSS |
| 669 | }, |
| @@ -1208,12 +1208,12 @@ | |
| 1208 | ** Append all of the default CSS to the CGI output. |
| 1209 | */ |
| 1210 | void cgi_append_default_css(void) { |
| 1211 | int i; |
| 1212 | |
| 1213 | for( i=0; cssDefaultList[i].elementClass; i++ ){ |
| 1214 | if( cssDefaultList[i].elementClass[0] ){ |
| 1215 | cgi_printf("/* %s */\n%s {\n%s\n}\n\n", |
| 1216 | cssDefaultList[i].comment, |
| 1217 | cssDefaultList[i].elementClass, |
| 1218 | cssDefaultList[i].value |
| 1219 | ); |
| 1220 |
+2
-2
| --- src/tag.c | ||
| +++ src/tag.c | ||
| @@ -354,11 +354,11 @@ | ||
| 354 | 354 | ** |
| 355 | 355 | ** List all objects that use TAGNAME. TYPE can be "ci" for |
| 356 | 356 | ** checkins or "e" for events. The limit option limits the number |
| 357 | 357 | ** of results to the given value. |
| 358 | 358 | ** |
| 359 | -** %fossil tag list ?--raw? ?CHECK-IN? | |
| 359 | +** %fossil tag list|ls ?--raw? ?CHECK-IN? | |
| 360 | 360 | ** |
| 361 | 361 | ** List all tags, or if CHECK-IN is supplied, list |
| 362 | 362 | ** all tags and their values for CHECK-IN. |
| 363 | 363 | ** |
| 364 | 364 | ** The option --raw allows the manipulation of all types of tags |
| @@ -475,11 +475,11 @@ | ||
| 475 | 475 | db_finalize(&q); |
| 476 | 476 | } |
| 477 | 477 | } |
| 478 | 478 | }else |
| 479 | 479 | |
| 480 | - if( strncmp(g.argv[2],"list",n)==0 ){ | |
| 480 | + if(( strncmp(g.argv[2],"list",n)==0 )||( strncmp(g.argv[2],"ls",n)==0 )){ | |
| 481 | 481 | Stmt q; |
| 482 | 482 | if( g.argc==3 ){ |
| 483 | 483 | db_prepare(&q, |
| 484 | 484 | "SELECT tagname FROM tag" |
| 485 | 485 | " WHERE EXISTS(SELECT 1 FROM tagxref" |
| 486 | 486 | |
| 487 | 487 | ADDED test/merge6.test |
| --- src/tag.c | |
| +++ src/tag.c | |
| @@ -354,11 +354,11 @@ | |
| 354 | ** |
| 355 | ** List all objects that use TAGNAME. TYPE can be "ci" for |
| 356 | ** checkins or "e" for events. The limit option limits the number |
| 357 | ** of results to the given value. |
| 358 | ** |
| 359 | ** %fossil tag list ?--raw? ?CHECK-IN? |
| 360 | ** |
| 361 | ** List all tags, or if CHECK-IN is supplied, list |
| 362 | ** all tags and their values for CHECK-IN. |
| 363 | ** |
| 364 | ** The option --raw allows the manipulation of all types of tags |
| @@ -475,11 +475,11 @@ | |
| 475 | db_finalize(&q); |
| 476 | } |
| 477 | } |
| 478 | }else |
| 479 | |
| 480 | if( strncmp(g.argv[2],"list",n)==0 ){ |
| 481 | Stmt q; |
| 482 | if( g.argc==3 ){ |
| 483 | db_prepare(&q, |
| 484 | "SELECT tagname FROM tag" |
| 485 | " WHERE EXISTS(SELECT 1 FROM tagxref" |
| 486 | |
| 487 | DDED test/merge6.test |
| --- src/tag.c | |
| +++ src/tag.c | |
| @@ -354,11 +354,11 @@ | |
| 354 | ** |
| 355 | ** List all objects that use TAGNAME. TYPE can be "ci" for |
| 356 | ** checkins or "e" for events. The limit option limits the number |
| 357 | ** of results to the given value. |
| 358 | ** |
| 359 | ** %fossil tag list|ls ?--raw? ?CHECK-IN? |
| 360 | ** |
| 361 | ** List all tags, or if CHECK-IN is supplied, list |
| 362 | ** all tags and their values for CHECK-IN. |
| 363 | ** |
| 364 | ** The option --raw allows the manipulation of all types of tags |
| @@ -475,11 +475,11 @@ | |
| 475 | db_finalize(&q); |
| 476 | } |
| 477 | } |
| 478 | }else |
| 479 | |
| 480 | if(( strncmp(g.argv[2],"list",n)==0 )||( strncmp(g.argv[2],"ls",n)==0 )){ |
| 481 | Stmt q; |
| 482 | if( g.argc==3 ){ |
| 483 | db_prepare(&q, |
| 484 | "SELECT tagname FROM tag" |
| 485 | " WHERE EXISTS(SELECT 1 FROM tagxref" |
| 486 | |
| 487 | DDED test/merge6.test |
+59
| --- a/test/merge6.test | ||
| +++ b/test/merge6.test | ||
| @@ -0,0 +1,59 @@ | ||
| 1 | +# | |
| 2 | +# Copyright (c) 2014 D. Richard Hipp | |
| 3 | +# | |
| 4 | +# This program is free software; you can redistribute it and/or | |
| 5 | +# modify it under the terms of the Simplified BSD License (also | |
| 6 | +# known as the "2-Clause License" or "FreeBSD License".) | |
| 7 | +# | |
| 8 | +# This program is distributed in the hope that it will be useful, | |
| 9 | +# but without any warranty; without even the implied warranty of | |
| 10 | +# merchantability or fitness for a particular purpose. | |
| 11 | +# | |
| 12 | +# Author contact information: | |
| 13 | +# [email protected] | |
| 14 | +# http://www.hwaci.com/drh/ | |
| 15 | +# | |
| 16 | +############################################################################ | |
| 17 | +# | |
| 18 | +# Tests of the "merge" command | |
| 19 | +# | |
| 20 | + | |
| 21 | +#################################################################### | |
| 22 | +# TEST 1: Handle multiple merges each with one or more ADDED files # | |
| 23 | +###########################################repo_init############### | |
| 24 | + | |
| 25 | +test_setup | |
| 26 | +fossil ls | |
| 27 | + | |
| 28 | +test merge_multi-0 {[string map [list \r\_multi-0 {[normalize_result] eq {}} | |
| 29 | + | |
| 30 | +write_file f1 "f1 line" | |
| 31 | +fossil add f1 | |
| 32 | +fossil string map [list \r\_multi-1 {[normalize_result] eq {f1}} | |
| 33 | + | |
| 34 | +fossil update trunk | |
| 35 | +write_file f2 "f2 line" | |
| 36 | +fossil add f2 | |
| 37 | +fossil commit -m "branch for file f2" -b branch_for_f2 | |
| 38 | +fossistring map [list \r\] eq {f1 | |
| 39 | +f2}} | |
| 40 | + | |
| 41 | +fossil update trunk | |
| 42 | +write_file f3 "f3 line" | |
| 43 | +write_file f4 "f4 line" | |
| 44 | +fossil add f3 | |
| 45 | +fossil add f4 | |
| 46 | +fossil commit -m "branch for files f3 and f4" -b branch_for_f3_f4 | |
| 47 | +fossil ls | |
| 48 | + | |
| 49 | +test merge_multi-3 {[string map [list \r\_multi-3 {[normalize_result] eq {f1 | |
| 50 | +f3 | |
| 51 | +f4}} | |
| 52 | + | |
| 53 | +fossil update trunk | |
| 54 | +fossil merge branch_for_f2 | |
| 55 | +fossil merge branch_for_f3_f4 | |
| 56 | +fossil commit -m "new trunk files f2, string map [list \r\n \n] [string trim $RESULT]] eq {f1 | |
| 57 | +f2 | |
| 58 | +f3 | |
| 59 | +f4}} |
| --- a/test/merge6.test | |
| +++ b/test/merge6.test | |
| @@ -0,0 +1,59 @@ | |
| --- a/test/merge6.test | |
| +++ b/test/merge6.test | |
| @@ -0,0 +1,59 @@ | |
| 1 | # |
| 2 | # Copyright (c) 2014 D. Richard Hipp |
| 3 | # |
| 4 | # This program is free software; you can redistribute it and/or |
| 5 | # modify it under the terms of the Simplified BSD License (also |
| 6 | # known as the "2-Clause License" or "FreeBSD License".) |
| 7 | # |
| 8 | # This program is distributed in the hope that it will be useful, |
| 9 | # but without any warranty; without even the implied warranty of |
| 10 | # merchantability or fitness for a particular purpose. |
| 11 | # |
| 12 | # Author contact information: |
| 13 | # [email protected] |
| 14 | # http://www.hwaci.com/drh/ |
| 15 | # |
| 16 | ############################################################################ |
| 17 | # |
| 18 | # Tests of the "merge" command |
| 19 | # |
| 20 | |
| 21 | #################################################################### |
| 22 | # TEST 1: Handle multiple merges each with one or more ADDED files # |
| 23 | ###########################################repo_init############### |
| 24 | |
| 25 | test_setup |
| 26 | fossil ls |
| 27 | |
| 28 | test merge_multi-0 {[string map [list \r\_multi-0 {[normalize_result] eq {}} |
| 29 | |
| 30 | write_file f1 "f1 line" |
| 31 | fossil add f1 |
| 32 | fossil string map [list \r\_multi-1 {[normalize_result] eq {f1}} |
| 33 | |
| 34 | fossil update trunk |
| 35 | write_file f2 "f2 line" |
| 36 | fossil add f2 |
| 37 | fossil commit -m "branch for file f2" -b branch_for_f2 |
| 38 | fossistring map [list \r\] eq {f1 |
| 39 | f2}} |
| 40 | |
| 41 | fossil update trunk |
| 42 | write_file f3 "f3 line" |
| 43 | write_file f4 "f4 line" |
| 44 | fossil add f3 |
| 45 | fossil add f4 |
| 46 | fossil commit -m "branch for files f3 and f4" -b branch_for_f3_f4 |
| 47 | fossil ls |
| 48 | |
| 49 | test merge_multi-3 {[string map [list \r\_multi-3 {[normalize_result] eq {f1 |
| 50 | f3 |
| 51 | f4}} |
| 52 | |
| 53 | fossil update trunk |
| 54 | fossil merge branch_for_f2 |
| 55 | fossil merge branch_for_f3_f4 |
| 56 | fossil commit -m "new trunk files f2, string map [list \r\n \n] [string trim $RESULT]] eq {f1 |
| 57 | f2 |
| 58 | f3 |
| 59 | f4}} |
+2
-2
| --- win/Makefile.PellesCGMake | ||
| +++ win/Makefile.PellesCGMake | ||
| @@ -30,13 +30,13 @@ | ||
| 30 | 30 | # and |
| 31 | 31 | # PellesC 6.00.4 |
| 32 | 32 | # gmake 3.80 |
| 33 | 33 | # zlib sources 1.2.5 |
| 34 | 34 | # Windows 7 Home Premium |
| 35 | -# | |
| 35 | +# | |
| 36 | 36 | |
| 37 | -# | |
| 37 | +# | |
| 38 | 38 | PellesCDir=c:\Programme\PellesC |
| 39 | 39 | |
| 40 | 40 | # Select between 32/64 bit code, default is 32 bit |
| 41 | 41 | #TARGETVERSION=64 |
| 42 | 42 | |
| 43 | 43 |
| --- win/Makefile.PellesCGMake | |
| +++ win/Makefile.PellesCGMake | |
| @@ -30,13 +30,13 @@ | |
| 30 | # and |
| 31 | # PellesC 6.00.4 |
| 32 | # gmake 3.80 |
| 33 | # zlib sources 1.2.5 |
| 34 | # Windows 7 Home Premium |
| 35 | # |
| 36 | |
| 37 | # |
| 38 | PellesCDir=c:\Programme\PellesC |
| 39 | |
| 40 | # Select between 32/64 bit code, default is 32 bit |
| 41 | #TARGETVERSION=64 |
| 42 | |
| 43 |
| --- win/Makefile.PellesCGMake | |
| +++ win/Makefile.PellesCGMake | |
| @@ -30,13 +30,13 @@ | |
| 30 | # and |
| 31 | # PellesC 6.00.4 |
| 32 | # gmake 3.80 |
| 33 | # zlib sources 1.2.5 |
| 34 | # Windows 7 Home Premium |
| 35 | # |
| 36 | |
| 37 | # |
| 38 | PellesCDir=c:\Programme\PellesC |
| 39 | |
| 40 | # Select between 32/64 bit code, default is 32 bit |
| 41 | #TARGETVERSION=64 |
| 42 | |
| 43 |
+2
-2
| --- win/Makefile.dmc | ||
| +++ win/Makefile.dmc | ||
| @@ -41,11 +41,11 @@ | ||
| 41 | 41 | APPNAME = $(OBJDIR)\fossil$(E) |
| 42 | 42 | |
| 43 | 43 | all: $(APPNAME) |
| 44 | 44 | |
| 45 | 45 | $(APPNAME) : translate$E mkindex$E headers $(OBJ) $(OBJDIR)\link |
| 46 | - cd $(OBJDIR) | |
| 46 | + cd $(OBJDIR) | |
| 47 | 47 | $(DMDIR)\bin\link @link |
| 48 | 48 | |
| 49 | 49 | $(OBJDIR)\fossil.res: $B\win\fossil.rc |
| 50 | 50 | $(RC) $(RCFLAGS) -o$@ $** |
| 51 | 51 | |
| @@ -85,11 +85,11 @@ | ||
| 85 | 85 | cp $@ $@ |
| 86 | 86 | |
| 87 | 87 | VERSION.h : version$E $B\manifest.uuid $B\manifest $B\VERSION |
| 88 | 88 | +$** > $@ |
| 89 | 89 | |
| 90 | -page_index.h: mkindex$E $(SRC) | |
| 90 | +page_index.h: mkindex$E $(SRC) | |
| 91 | 91 | +$** > $@ |
| 92 | 92 | |
| 93 | 93 | clean: |
| 94 | 94 | -del $(OBJDIR)\*.obj |
| 95 | 95 | -del *.obj *_.c *.h *.map |
| 96 | 96 |
| --- win/Makefile.dmc | |
| +++ win/Makefile.dmc | |
| @@ -41,11 +41,11 @@ | |
| 41 | APPNAME = $(OBJDIR)\fossil$(E) |
| 42 | |
| 43 | all: $(APPNAME) |
| 44 | |
| 45 | $(APPNAME) : translate$E mkindex$E headers $(OBJ) $(OBJDIR)\link |
| 46 | cd $(OBJDIR) |
| 47 | $(DMDIR)\bin\link @link |
| 48 | |
| 49 | $(OBJDIR)\fossil.res: $B\win\fossil.rc |
| 50 | $(RC) $(RCFLAGS) -o$@ $** |
| 51 | |
| @@ -85,11 +85,11 @@ | |
| 85 | cp $@ $@ |
| 86 | |
| 87 | VERSION.h : version$E $B\manifest.uuid $B\manifest $B\VERSION |
| 88 | +$** > $@ |
| 89 | |
| 90 | page_index.h: mkindex$E $(SRC) |
| 91 | +$** > $@ |
| 92 | |
| 93 | clean: |
| 94 | -del $(OBJDIR)\*.obj |
| 95 | -del *.obj *_.c *.h *.map |
| 96 |
| --- win/Makefile.dmc | |
| +++ win/Makefile.dmc | |
| @@ -41,11 +41,11 @@ | |
| 41 | APPNAME = $(OBJDIR)\fossil$(E) |
| 42 | |
| 43 | all: $(APPNAME) |
| 44 | |
| 45 | $(APPNAME) : translate$E mkindex$E headers $(OBJ) $(OBJDIR)\link |
| 46 | cd $(OBJDIR) |
| 47 | $(DMDIR)\bin\link @link |
| 48 | |
| 49 | $(OBJDIR)\fossil.res: $B\win\fossil.rc |
| 50 | $(RC) $(RCFLAGS) -o$@ $** |
| 51 | |
| @@ -85,11 +85,11 @@ | |
| 85 | cp $@ $@ |
| 86 | |
| 87 | VERSION.h : version$E $B\manifest.uuid $B\manifest $B\VERSION |
| 88 | +$** > $@ |
| 89 | |
| 90 | page_index.h: mkindex$E $(SRC) |
| 91 | +$** > $@ |
| 92 | |
| 93 | clean: |
| 94 | -del $(OBJDIR)\*.obj |
| 95 | -del *.obj *_.c *.h *.map |
| 96 |
+8
-3
| --- win/Makefile.mingw | ||
| +++ win/Makefile.mingw | ||
| @@ -216,25 +216,30 @@ | ||
| 216 | 216 | #### We add the -static option here so that we can build a static |
| 217 | 217 | # executable that will run in a chroot jail. |
| 218 | 218 | # |
| 219 | 219 | LIB = -static |
| 220 | 220 | |
| 221 | -# MinGW: If available, use the Unicode capable runtime startup code. | |
| 221 | +#### MinGW: If available, use the Unicode capable runtime startup code. | |
| 222 | +# | |
| 222 | 223 | ifndef MINGW_IS_32BIT_ONLY |
| 223 | 224 | LIB += -municode |
| 224 | 225 | endif |
| 225 | 226 | |
| 227 | +#### SQLite: If enabled, use the system SQLite library. | |
| 228 | +# | |
| 226 | 229 | ifdef USE_SYSTEM_SQLITE |
| 227 | 230 | LIB += -lsqlite3 |
| 228 | 231 | endif |
| 229 | 232 | |
| 230 | -# OpenSSL: Add the necessary libraries required, if enabled. | |
| 233 | +#### OpenSSL: Add the necessary libraries required, if enabled. | |
| 234 | +# | |
| 231 | 235 | ifdef FOSSIL_ENABLE_SSL |
| 232 | 236 | LIB += -lssl -lcrypto -lgdi32 |
| 233 | 237 | endif |
| 234 | 238 | |
| 235 | -# Tcl: Add the necessary libraries required, if enabled. | |
| 239 | +#### Tcl: Add the necessary libraries required, if enabled. | |
| 240 | +# | |
| 236 | 241 | ifdef FOSSIL_ENABLE_TCL |
| 237 | 242 | LIB += $(LIBTCL) |
| 238 | 243 | endif |
| 239 | 244 | |
| 240 | 245 | #### Extra arguments for linking the finished binary. Fossil needs |
| 241 | 246 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -216,25 +216,30 @@ | |
| 216 | #### We add the -static option here so that we can build a static |
| 217 | # executable that will run in a chroot jail. |
| 218 | # |
| 219 | LIB = -static |
| 220 | |
| 221 | # MinGW: If available, use the Unicode capable runtime startup code. |
| 222 | ifndef MINGW_IS_32BIT_ONLY |
| 223 | LIB += -municode |
| 224 | endif |
| 225 | |
| 226 | ifdef USE_SYSTEM_SQLITE |
| 227 | LIB += -lsqlite3 |
| 228 | endif |
| 229 | |
| 230 | # OpenSSL: Add the necessary libraries required, if enabled. |
| 231 | ifdef FOSSIL_ENABLE_SSL |
| 232 | LIB += -lssl -lcrypto -lgdi32 |
| 233 | endif |
| 234 | |
| 235 | # Tcl: Add the necessary libraries required, if enabled. |
| 236 | ifdef FOSSIL_ENABLE_TCL |
| 237 | LIB += $(LIBTCL) |
| 238 | endif |
| 239 | |
| 240 | #### Extra arguments for linking the finished binary. Fossil needs |
| 241 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -216,25 +216,30 @@ | |
| 216 | #### We add the -static option here so that we can build a static |
| 217 | # executable that will run in a chroot jail. |
| 218 | # |
| 219 | LIB = -static |
| 220 | |
| 221 | #### MinGW: If available, use the Unicode capable runtime startup code. |
| 222 | # |
| 223 | ifndef MINGW_IS_32BIT_ONLY |
| 224 | LIB += -municode |
| 225 | endif |
| 226 | |
| 227 | #### SQLite: If enabled, use the system SQLite library. |
| 228 | # |
| 229 | ifdef USE_SYSTEM_SQLITE |
| 230 | LIB += -lsqlite3 |
| 231 | endif |
| 232 | |
| 233 | #### OpenSSL: Add the necessary libraries required, if enabled. |
| 234 | # |
| 235 | ifdef FOSSIL_ENABLE_SSL |
| 236 | LIB += -lssl -lcrypto -lgdi32 |
| 237 | endif |
| 238 | |
| 239 | #### Tcl: Add the necessary libraries required, if enabled. |
| 240 | # |
| 241 | ifdef FOSSIL_ENABLE_TCL |
| 242 | LIB += $(LIBTCL) |
| 243 | endif |
| 244 | |
| 245 | #### Extra arguments for linking the finished binary. Fossil needs |
| 246 |
+8
-3
| --- win/Makefile.mingw.mistachkin | ||
| +++ win/Makefile.mingw.mistachkin | ||
| @@ -216,25 +216,30 @@ | ||
| 216 | 216 | #### We add the -static option here so that we can build a static |
| 217 | 217 | # executable that will run in a chroot jail. |
| 218 | 218 | # |
| 219 | 219 | LIB = -static |
| 220 | 220 | |
| 221 | -# MinGW: If available, use the Unicode capable runtime startup code. | |
| 221 | +#### MinGW: If available, use the Unicode capable runtime startup code. | |
| 222 | +# | |
| 222 | 223 | ifndef MINGW_IS_32BIT_ONLY |
| 223 | 224 | LIB += -municode |
| 224 | 225 | endif |
| 225 | 226 | |
| 227 | +#### SQLite: If enabled, use the system SQLite library. | |
| 228 | +# | |
| 226 | 229 | ifdef USE_SYSTEM_SQLITE |
| 227 | 230 | LIB += -lsqlite3 |
| 228 | 231 | endif |
| 229 | 232 | |
| 230 | -# OpenSSL: Add the necessary libraries required, if enabled. | |
| 233 | +#### OpenSSL: Add the necessary libraries required, if enabled. | |
| 234 | +# | |
| 231 | 235 | ifdef FOSSIL_ENABLE_SSL |
| 232 | 236 | LIB += -lssl -lcrypto -lgdi32 |
| 233 | 237 | endif |
| 234 | 238 | |
| 235 | -# Tcl: Add the necessary libraries required, if enabled. | |
| 239 | +#### Tcl: Add the necessary libraries required, if enabled. | |
| 240 | +# | |
| 236 | 241 | ifdef FOSSIL_ENABLE_TCL |
| 237 | 242 | LIB += $(LIBTCL) |
| 238 | 243 | endif |
| 239 | 244 | |
| 240 | 245 | #### Extra arguments for linking the finished binary. Fossil needs |
| 241 | 246 |
| --- win/Makefile.mingw.mistachkin | |
| +++ win/Makefile.mingw.mistachkin | |
| @@ -216,25 +216,30 @@ | |
| 216 | #### We add the -static option here so that we can build a static |
| 217 | # executable that will run in a chroot jail. |
| 218 | # |
| 219 | LIB = -static |
| 220 | |
| 221 | # MinGW: If available, use the Unicode capable runtime startup code. |
| 222 | ifndef MINGW_IS_32BIT_ONLY |
| 223 | LIB += -municode |
| 224 | endif |
| 225 | |
| 226 | ifdef USE_SYSTEM_SQLITE |
| 227 | LIB += -lsqlite3 |
| 228 | endif |
| 229 | |
| 230 | # OpenSSL: Add the necessary libraries required, if enabled. |
| 231 | ifdef FOSSIL_ENABLE_SSL |
| 232 | LIB += -lssl -lcrypto -lgdi32 |
| 233 | endif |
| 234 | |
| 235 | # Tcl: Add the necessary libraries required, if enabled. |
| 236 | ifdef FOSSIL_ENABLE_TCL |
| 237 | LIB += $(LIBTCL) |
| 238 | endif |
| 239 | |
| 240 | #### Extra arguments for linking the finished binary. Fossil needs |
| 241 |
| --- win/Makefile.mingw.mistachkin | |
| +++ win/Makefile.mingw.mistachkin | |
| @@ -216,25 +216,30 @@ | |
| 216 | #### We add the -static option here so that we can build a static |
| 217 | # executable that will run in a chroot jail. |
| 218 | # |
| 219 | LIB = -static |
| 220 | |
| 221 | #### MinGW: If available, use the Unicode capable runtime startup code. |
| 222 | # |
| 223 | ifndef MINGW_IS_32BIT_ONLY |
| 224 | LIB += -municode |
| 225 | endif |
| 226 | |
| 227 | #### SQLite: If enabled, use the system SQLite library. |
| 228 | # |
| 229 | ifdef USE_SYSTEM_SQLITE |
| 230 | LIB += -lsqlite3 |
| 231 | endif |
| 232 | |
| 233 | #### OpenSSL: Add the necessary libraries required, if enabled. |
| 234 | # |
| 235 | ifdef FOSSIL_ENABLE_SSL |
| 236 | LIB += -lssl -lcrypto -lgdi32 |
| 237 | endif |
| 238 | |
| 239 | #### Tcl: Add the necessary libraries required, if enabled. |
| 240 | # |
| 241 | ifdef FOSSIL_ENABLE_TCL |
| 242 | LIB += $(LIBTCL) |
| 243 | endif |
| 244 | |
| 245 | #### Extra arguments for linking the finished binary. Fossil needs |
| 246 |
+36
-15
| --- win/Makefile.msc | ||
| +++ win/Makefile.msc | ||
| @@ -5,17 +5,19 @@ | ||
| 5 | 5 | # |
| 6 | 6 | # This file is automatically generated. Instead of editing this |
| 7 | 7 | # file, edit "makemake.tcl" then run "tclsh makemake.tcl" |
| 8 | 8 | # to regenerate this file. |
| 9 | 9 | # |
| 10 | -B = .. | |
| 11 | -SRCDIR = $B\src | |
| 12 | -OBJDIR = . | |
| 13 | -OX = . | |
| 14 | -O = .obj | |
| 15 | -E = .exe | |
| 16 | -P = .pdb | |
| 10 | +B = .. | |
| 11 | +SRCDIR = $B\src | |
| 12 | +OBJDIR = . | |
| 13 | +OX = . | |
| 14 | +O = .obj | |
| 15 | +E = .exe | |
| 16 | +P = .pdb | |
| 17 | +PERLDIR = | |
| 18 | +PERL = perl.exe | |
| 17 | 19 | |
| 18 | 20 | # Uncomment to enable debug symbols |
| 19 | 21 | # DEBUG = 1 |
| 20 | 22 | |
| 21 | 23 | # Uncomment to enable JSON API |
| @@ -29,12 +31,13 @@ | ||
| 29 | 31 | |
| 30 | 32 | # Uncomment to enable Tcl support |
| 31 | 33 | # FOSSIL_ENABLE_TCL = 1 |
| 32 | 34 | |
| 33 | 35 | !ifdef FOSSIL_ENABLE_SSL |
| 34 | -SSLINCDIR = $(B)\compat\openssl-1.0.1i\include | |
| 35 | -SSLLIBDIR = $(B)\compat\openssl-1.0.1i\out32 | |
| 36 | +SSLDIR = $(B)\compat\openssl-1.0.1i | |
| 37 | +SSLINCDIR = $(SSLDIR)\include | |
| 38 | +SSLLIBDIR = $(SSLDIR)\out32 | |
| 36 | 39 | SSLLIB = ssleay32.lib libeay32.lib user32.lib gdi32.lib |
| 37 | 40 | !endif |
| 38 | 41 | |
| 39 | 42 | !ifdef FOSSIL_ENABLE_TCL |
| 40 | 43 | TCLDIR = $(B)\compat\tcl-8.6 |
| @@ -349,21 +352,39 @@ | ||
| 349 | 352 | $(OX)\xfersetup$O \ |
| 350 | 353 | $(OX)\zip$O \ |
| 351 | 354 | $(OX)\fossil.res |
| 352 | 355 | |
| 353 | 356 | |
| 354 | -APPNAME = $(OX)\fossil$(E) | |
| 355 | -PDBNAME = $(OX)\fossil$(P) | |
| 357 | +APPNAME = $(OX)\fossil$(E) | |
| 358 | +PDBNAME = $(OX)\fossil$(P) | |
| 359 | +APPTARGETS = | |
| 356 | 360 | |
| 357 | 361 | all: $(OX) $(APPNAME) |
| 358 | 362 | |
| 359 | 363 | zlib: |
| 360 | 364 | @echo Building zlib from "$(ZLIBDIR)"... |
| 361 | - @pushd "$(ZLIBDIR)" && nmake /f win32\Makefile.msc $(ZLIB) && popd | |
| 365 | + @pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc $(ZLIB) && popd | |
| 362 | 366 | |
| 363 | -$(APPNAME) : translate$E mkindex$E headers $(OBJ) $(OX)\linkopts zlib | |
| 364 | - cd $(OX) | |
| 367 | +!ifdef FOSSIL_ENABLE_SSL | |
| 368 | +openssl: | |
| 369 | + @echo Building OpenSSL from "$(SSLDIR)"... | |
| 370 | +!if "$(PERLDIR)" != "" | |
| 371 | + @set PATH=$(PERLDIR);$(PATH) | |
| 372 | +!endif | |
| 373 | + @pushd "$(SSLDIR)" && $(PERL) Configure VC-WIN32 no-asm && popd | |
| 374 | + @pushd "$(SSLDIR)" && call ms\do_ms.bat && popd | |
| 375 | + @pushd "$(SSLDIR)" && $(MAKE) /f ms\nt.mak all && popd | |
| 376 | +!endif | |
| 377 | + | |
| 378 | +APPTARGETS = $(APPTARGETS) zlib | |
| 379 | + | |
| 380 | +!ifdef FOSSIL_ENABLE_SSL | |
| 381 | +APPTARGETS = $(APPTARGETS) openssl | |
| 382 | +!endif | |
| 383 | + | |
| 384 | +$(APPNAME) : translate$E mkindex$E headers $(OBJ) $(OX)\linkopts $(APPTARGETS) | |
| 385 | + cd $(OX) | |
| 365 | 386 | link $(LDFLAGS) /OUT:$@ $(LIBDIR) Wsetargv.obj fossil.res @linkopts |
| 366 | 387 | |
| 367 | 388 | $(OX)\linkopts: $B\win\Makefile.msc |
| 368 | 389 | echo $(OX)\add.obj > $@ |
| 369 | 390 | echo $(OX)\allrepo.obj >> $@ |
| @@ -517,11 +538,11 @@ | ||
| 517 | 538 | VERSION.h : mkversion$E $B\manifest.uuid $B\manifest $B\VERSION |
| 518 | 539 | $** > $@ |
| 519 | 540 | $(OX)\cson_amalgamation$O : $(SRCDIR)\cson_amalgamation.c |
| 520 | 541 | $(TCC) /Fo$@ /c $** |
| 521 | 542 | |
| 522 | -page_index.h: mkindex$E $(SRC) | |
| 543 | +page_index.h: mkindex$E $(SRC) | |
| 523 | 544 | $** > $@ |
| 524 | 545 | |
| 525 | 546 | clean: |
| 526 | 547 | -del $(OX)\*.obj |
| 527 | 548 | -del *.obj |
| 528 | 549 |
| --- win/Makefile.msc | |
| +++ win/Makefile.msc | |
| @@ -5,17 +5,19 @@ | |
| 5 | # |
| 6 | # This file is automatically generated. Instead of editing this |
| 7 | # file, edit "makemake.tcl" then run "tclsh makemake.tcl" |
| 8 | # to regenerate this file. |
| 9 | # |
| 10 | B = .. |
| 11 | SRCDIR = $B\src |
| 12 | OBJDIR = . |
| 13 | OX = . |
| 14 | O = .obj |
| 15 | E = .exe |
| 16 | P = .pdb |
| 17 | |
| 18 | # Uncomment to enable debug symbols |
| 19 | # DEBUG = 1 |
| 20 | |
| 21 | # Uncomment to enable JSON API |
| @@ -29,12 +31,13 @@ | |
| 29 | |
| 30 | # Uncomment to enable Tcl support |
| 31 | # FOSSIL_ENABLE_TCL = 1 |
| 32 | |
| 33 | !ifdef FOSSIL_ENABLE_SSL |
| 34 | SSLINCDIR = $(B)\compat\openssl-1.0.1i\include |
| 35 | SSLLIBDIR = $(B)\compat\openssl-1.0.1i\out32 |
| 36 | SSLLIB = ssleay32.lib libeay32.lib user32.lib gdi32.lib |
| 37 | !endif |
| 38 | |
| 39 | !ifdef FOSSIL_ENABLE_TCL |
| 40 | TCLDIR = $(B)\compat\tcl-8.6 |
| @@ -349,21 +352,39 @@ | |
| 349 | $(OX)\xfersetup$O \ |
| 350 | $(OX)\zip$O \ |
| 351 | $(OX)\fossil.res |
| 352 | |
| 353 | |
| 354 | APPNAME = $(OX)\fossil$(E) |
| 355 | PDBNAME = $(OX)\fossil$(P) |
| 356 | |
| 357 | all: $(OX) $(APPNAME) |
| 358 | |
| 359 | zlib: |
| 360 | @echo Building zlib from "$(ZLIBDIR)"... |
| 361 | @pushd "$(ZLIBDIR)" && nmake /f win32\Makefile.msc $(ZLIB) && popd |
| 362 | |
| 363 | $(APPNAME) : translate$E mkindex$E headers $(OBJ) $(OX)\linkopts zlib |
| 364 | cd $(OX) |
| 365 | link $(LDFLAGS) /OUT:$@ $(LIBDIR) Wsetargv.obj fossil.res @linkopts |
| 366 | |
| 367 | $(OX)\linkopts: $B\win\Makefile.msc |
| 368 | echo $(OX)\add.obj > $@ |
| 369 | echo $(OX)\allrepo.obj >> $@ |
| @@ -517,11 +538,11 @@ | |
| 517 | VERSION.h : mkversion$E $B\manifest.uuid $B\manifest $B\VERSION |
| 518 | $** > $@ |
| 519 | $(OX)\cson_amalgamation$O : $(SRCDIR)\cson_amalgamation.c |
| 520 | $(TCC) /Fo$@ /c $** |
| 521 | |
| 522 | page_index.h: mkindex$E $(SRC) |
| 523 | $** > $@ |
| 524 | |
| 525 | clean: |
| 526 | -del $(OX)\*.obj |
| 527 | -del *.obj |
| 528 |
| --- win/Makefile.msc | |
| +++ win/Makefile.msc | |
| @@ -5,17 +5,19 @@ | |
| 5 | # |
| 6 | # This file is automatically generated. Instead of editing this |
| 7 | # file, edit "makemake.tcl" then run "tclsh makemake.tcl" |
| 8 | # to regenerate this file. |
| 9 | # |
| 10 | B = .. |
| 11 | SRCDIR = $B\src |
| 12 | OBJDIR = . |
| 13 | OX = . |
| 14 | O = .obj |
| 15 | E = .exe |
| 16 | P = .pdb |
| 17 | PERLDIR = |
| 18 | PERL = perl.exe |
| 19 | |
| 20 | # Uncomment to enable debug symbols |
| 21 | # DEBUG = 1 |
| 22 | |
| 23 | # Uncomment to enable JSON API |
| @@ -29,12 +31,13 @@ | |
| 31 | |
| 32 | # Uncomment to enable Tcl support |
| 33 | # FOSSIL_ENABLE_TCL = 1 |
| 34 | |
| 35 | !ifdef FOSSIL_ENABLE_SSL |
| 36 | SSLDIR = $(B)\compat\openssl-1.0.1i |
| 37 | SSLINCDIR = $(SSLDIR)\include |
| 38 | SSLLIBDIR = $(SSLDIR)\out32 |
| 39 | SSLLIB = ssleay32.lib libeay32.lib user32.lib gdi32.lib |
| 40 | !endif |
| 41 | |
| 42 | !ifdef FOSSIL_ENABLE_TCL |
| 43 | TCLDIR = $(B)\compat\tcl-8.6 |
| @@ -349,21 +352,39 @@ | |
| 352 | $(OX)\xfersetup$O \ |
| 353 | $(OX)\zip$O \ |
| 354 | $(OX)\fossil.res |
| 355 | |
| 356 | |
| 357 | APPNAME = $(OX)\fossil$(E) |
| 358 | PDBNAME = $(OX)\fossil$(P) |
| 359 | APPTARGETS = |
| 360 | |
| 361 | all: $(OX) $(APPNAME) |
| 362 | |
| 363 | zlib: |
| 364 | @echo Building zlib from "$(ZLIBDIR)"... |
| 365 | @pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc $(ZLIB) && popd |
| 366 | |
| 367 | !ifdef FOSSIL_ENABLE_SSL |
| 368 | openssl: |
| 369 | @echo Building OpenSSL from "$(SSLDIR)"... |
| 370 | !if "$(PERLDIR)" != "" |
| 371 | @set PATH=$(PERLDIR);$(PATH) |
| 372 | !endif |
| 373 | @pushd "$(SSLDIR)" && $(PERL) Configure VC-WIN32 no-asm && popd |
| 374 | @pushd "$(SSLDIR)" && call ms\do_ms.bat && popd |
| 375 | @pushd "$(SSLDIR)" && $(MAKE) /f ms\nt.mak all && popd |
| 376 | !endif |
| 377 | |
| 378 | APPTARGETS = $(APPTARGETS) zlib |
| 379 | |
| 380 | !ifdef FOSSIL_ENABLE_SSL |
| 381 | APPTARGETS = $(APPTARGETS) openssl |
| 382 | !endif |
| 383 | |
| 384 | $(APPNAME) : translate$E mkindex$E headers $(OBJ) $(OX)\linkopts $(APPTARGETS) |
| 385 | cd $(OX) |
| 386 | link $(LDFLAGS) /OUT:$@ $(LIBDIR) Wsetargv.obj fossil.res @linkopts |
| 387 | |
| 388 | $(OX)\linkopts: $B\win\Makefile.msc |
| 389 | echo $(OX)\add.obj > $@ |
| 390 | echo $(OX)\allrepo.obj >> $@ |
| @@ -517,11 +538,11 @@ | |
| 538 | VERSION.h : mkversion$E $B\manifest.uuid $B\manifest $B\VERSION |
| 539 | $** > $@ |
| 540 | $(OX)\cson_amalgamation$O : $(SRCDIR)\cson_amalgamation.c |
| 541 | $(TCC) /Fo$@ /c $** |
| 542 | |
| 543 | page_index.h: mkindex$E $(SRC) |
| 544 | $** > $@ |
| 545 | |
| 546 | clean: |
| 547 | -del $(OX)\*.obj |
| 548 | -del *.obj |
| 549 |
+3
-3
| --- win/fossil.rc | ||
| +++ win/fossil.rc | ||
| @@ -105,11 +105,11 @@ | ||
| 105 | 105 | #endif /* defined(FOSSIL_ENABLE_SSL) */ |
| 106 | 106 | #if defined(FOSSIL_ENABLE_TH1_HOOKS) |
| 107 | 107 | VALUE "Th1Hooks", "Yes\0" |
| 108 | 108 | #else |
| 109 | 109 | VALUE "Th1Hooks", "No\0" |
| 110 | -#endif | |
| 110 | +#endif /* defined(FOSSIL_ENABLE_TH1_HOOKS) */ | |
| 111 | 111 | #if defined(FOSSIL_ENABLE_TCL) |
| 112 | 112 | VALUE "TclEnabled", "Yes, Tcl " TCL_PATCH_LEVEL "\0" |
| 113 | 113 | #if defined(USE_TCL_STUBS) |
| 114 | 114 | VALUE "UseTclStubsEnabled", "Yes\0" |
| 115 | 115 | #else |
| @@ -142,12 +142,12 @@ | ||
| 142 | 142 | * This embedded manifest is needed for Windows 8.1. |
| 143 | 143 | */ |
| 144 | 144 | |
| 145 | 145 | #ifndef RT_MANIFEST |
| 146 | 146 | #define RT_MANIFEST 24 |
| 147 | -#endif | |
| 147 | +#endif /* RT_MANIFEST */ | |
| 148 | 148 | |
| 149 | 149 | #ifndef CREATEPROCESS_MANIFEST_RESOURCE_ID |
| 150 | 150 | #define CREATEPROCESS_MANIFEST_RESOURCE_ID 1 |
| 151 | -#endif | |
| 151 | +#endif /* CREATEPROCESS_MANIFEST_RESOURCE_ID */ | |
| 152 | 152 | |
| 153 | 153 | CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "fossil.exe.manifest" |
| 154 | 154 |
| --- win/fossil.rc | |
| +++ win/fossil.rc | |
| @@ -105,11 +105,11 @@ | |
| 105 | #endif /* defined(FOSSIL_ENABLE_SSL) */ |
| 106 | #if defined(FOSSIL_ENABLE_TH1_HOOKS) |
| 107 | VALUE "Th1Hooks", "Yes\0" |
| 108 | #else |
| 109 | VALUE "Th1Hooks", "No\0" |
| 110 | #endif |
| 111 | #if defined(FOSSIL_ENABLE_TCL) |
| 112 | VALUE "TclEnabled", "Yes, Tcl " TCL_PATCH_LEVEL "\0" |
| 113 | #if defined(USE_TCL_STUBS) |
| 114 | VALUE "UseTclStubsEnabled", "Yes\0" |
| 115 | #else |
| @@ -142,12 +142,12 @@ | |
| 142 | * This embedded manifest is needed for Windows 8.1. |
| 143 | */ |
| 144 | |
| 145 | #ifndef RT_MANIFEST |
| 146 | #define RT_MANIFEST 24 |
| 147 | #endif |
| 148 | |
| 149 | #ifndef CREATEPROCESS_MANIFEST_RESOURCE_ID |
| 150 | #define CREATEPROCESS_MANIFEST_RESOURCE_ID 1 |
| 151 | #endif |
| 152 | |
| 153 | CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "fossil.exe.manifest" |
| 154 |
| --- win/fossil.rc | |
| +++ win/fossil.rc | |
| @@ -105,11 +105,11 @@ | |
| 105 | #endif /* defined(FOSSIL_ENABLE_SSL) */ |
| 106 | #if defined(FOSSIL_ENABLE_TH1_HOOKS) |
| 107 | VALUE "Th1Hooks", "Yes\0" |
| 108 | #else |
| 109 | VALUE "Th1Hooks", "No\0" |
| 110 | #endif /* defined(FOSSIL_ENABLE_TH1_HOOKS) */ |
| 111 | #if defined(FOSSIL_ENABLE_TCL) |
| 112 | VALUE "TclEnabled", "Yes, Tcl " TCL_PATCH_LEVEL "\0" |
| 113 | #if defined(USE_TCL_STUBS) |
| 114 | VALUE "UseTclStubsEnabled", "Yes\0" |
| 115 | #else |
| @@ -142,12 +142,12 @@ | |
| 142 | * This embedded manifest is needed for Windows 8.1. |
| 143 | */ |
| 144 | |
| 145 | #ifndef RT_MANIFEST |
| 146 | #define RT_MANIFEST 24 |
| 147 | #endif /* RT_MANIFEST */ |
| 148 | |
| 149 | #ifndef CREATEPROCESS_MANIFEST_RESOURCE_ID |
| 150 | #define CREATEPROCESS_MANIFEST_RESOURCE_ID 1 |
| 151 | #endif /* CREATEPROCESS_MANIFEST_RESOURCE_ID */ |
| 152 | |
| 153 | CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "fossil.exe.manifest" |
| 154 |
+18
-4
| --- www/build.wiki | ||
| +++ www/build.wiki | ||
| @@ -112,15 +112,29 @@ | ||
| 112 | 112 | "<b>make -f win/Makefile.mingw</b>". On a Windows box you will |
| 113 | 113 | need either Cygwin or Msys as build environment. On Cygwin, Linux |
| 114 | 114 | or Darwin you may want to make minor edits to win/Makefile.mingw |
| 115 | 115 | to configure the cross-compile environment. |
| 116 | 116 | |
| 117 | -<li><p><i>MSVC</i> → Use the msc makefile. First | |
| 117 | +<li><p><i>MSVC</i> → Use the MSVC makefile. First | |
| 118 | 118 | change to the "win/" subdirectory ("<b>cd win</b>") then run |
| 119 | -"<b>nmake /f Makefile.msc</b>". Alternatively, the batch file | |
| 120 | -"<b>win\buildmsvc.bat</b>" may be used and it will attempt to | |
| 121 | -detect and use the latest installed version of MSVC. | |
| 119 | +"<b>nmake /f Makefile.msc</b>".<br><br>Alternatively, the batch | |
| 120 | +file "<b>win\buildmsvc.bat</b>" may be used and it will attempt to | |
| 121 | +detect and use the latest installed version of MSVC.<br><br>To enable | |
| 122 | +the optional <a href="https://www.openssl.org/">OpenSSL</a> support, | |
| 123 | +first <a href="https://www.openssl.org/source/">download the official | |
| 124 | +source code for OpenSSL</a> and extract it to an appropriately named | |
| 125 | +"<b>openssl-X.Y.ZA</b>" subdirectory within the local | |
| 126 | +[/tree?ci=trunk&name=compat | compat] directory (e.g. | |
| 127 | +"<b>compat/openssl-1.0.1i</b>"), then make sure that some recent | |
| 128 | +<a href="http://www.perl.org/">Perl</a> binaries are installed locally, | |
| 129 | +and finally run one of the following commands: | |
| 130 | +<blockquote><pre> | |
| 131 | +nmake /f Makefile.msc FOSSIL_ENABLE_SSL=1 PERLDIR=C:\full\path\to\Perl\bin | |
| 132 | +</pre></blockquote> | |
| 133 | +<blockquote><pre> | |
| 134 | +buildmsvc.bat FOSSIL_ENABLE_SSL=1 PERLDIR=C:\full\path\to\Perl\bin | |
| 135 | +</pre></blockquote> | |
| 122 | 136 | |
| 123 | 137 | <li><p><i>Cygwin</i> → The same as other unix-like systems. It is |
| 124 | 138 | recommended to configure using: "<b>configure --disable-internal-sqlite</b>", |
| 125 | 139 | making sure you have the "libsqlite3-devel" , "zlib-devel" and |
| 126 | 140 | "openssl-devel" packages installed first. |
| 127 | 141 |
| --- www/build.wiki | |
| +++ www/build.wiki | |
| @@ -112,15 +112,29 @@ | |
| 112 | "<b>make -f win/Makefile.mingw</b>". On a Windows box you will |
| 113 | need either Cygwin or Msys as build environment. On Cygwin, Linux |
| 114 | or Darwin you may want to make minor edits to win/Makefile.mingw |
| 115 | to configure the cross-compile environment. |
| 116 | |
| 117 | <li><p><i>MSVC</i> → Use the msc makefile. First |
| 118 | change to the "win/" subdirectory ("<b>cd win</b>") then run |
| 119 | "<b>nmake /f Makefile.msc</b>". Alternatively, the batch file |
| 120 | "<b>win\buildmsvc.bat</b>" may be used and it will attempt to |
| 121 | detect and use the latest installed version of MSVC. |
| 122 | |
| 123 | <li><p><i>Cygwin</i> → The same as other unix-like systems. It is |
| 124 | recommended to configure using: "<b>configure --disable-internal-sqlite</b>", |
| 125 | making sure you have the "libsqlite3-devel" , "zlib-devel" and |
| 126 | "openssl-devel" packages installed first. |
| 127 |
| --- www/build.wiki | |
| +++ www/build.wiki | |
| @@ -112,15 +112,29 @@ | |
| 112 | "<b>make -f win/Makefile.mingw</b>". On a Windows box you will |
| 113 | need either Cygwin or Msys as build environment. On Cygwin, Linux |
| 114 | or Darwin you may want to make minor edits to win/Makefile.mingw |
| 115 | to configure the cross-compile environment. |
| 116 | |
| 117 | <li><p><i>MSVC</i> → Use the MSVC makefile. First |
| 118 | change to the "win/" subdirectory ("<b>cd win</b>") then run |
| 119 | "<b>nmake /f Makefile.msc</b>".<br><br>Alternatively, the batch |
| 120 | file "<b>win\buildmsvc.bat</b>" may be used and it will attempt to |
| 121 | detect and use the latest installed version of MSVC.<br><br>To enable |
| 122 | the optional <a href="https://www.openssl.org/">OpenSSL</a> support, |
| 123 | first <a href="https://www.openssl.org/source/">download the official |
| 124 | source code for OpenSSL</a> and extract it to an appropriately named |
| 125 | "<b>openssl-X.Y.ZA</b>" subdirectory within the local |
| 126 | [/tree?ci=trunk&name=compat | compat] directory (e.g. |
| 127 | "<b>compat/openssl-1.0.1i</b>"), then make sure that some recent |
| 128 | <a href="http://www.perl.org/">Perl</a> binaries are installed locally, |
| 129 | and finally run one of the following commands: |
| 130 | <blockquote><pre> |
| 131 | nmake /f Makefile.msc FOSSIL_ENABLE_SSL=1 PERLDIR=C:\full\path\to\Perl\bin |
| 132 | </pre></blockquote> |
| 133 | <blockquote><pre> |
| 134 | buildmsvc.bat FOSSIL_ENABLE_SSL=1 PERLDIR=C:\full\path\to\Perl\bin |
| 135 | </pre></blockquote> |
| 136 | |
| 137 | <li><p><i>Cygwin</i> → The same as other unix-like systems. It is |
| 138 | recommended to configure using: "<b>configure --disable-internal-sqlite</b>", |
| 139 | making sure you have the "libsqlite3-devel" , "zlib-devel" and |
| 140 | "openssl-devel" packages installed first. |
| 141 |
+2
| --- www/changes.wiki | ||
| +++ www/changes.wiki | ||
| @@ -20,10 +20,12 @@ | ||
| 20 | 20 | * Let [/help?cmd=new|fossil new] no longer create an initial empty commit |
| 21 | 21 | by default. The first commit after checking out an empty repository will |
| 22 | 22 | become the initial commit. (NOT PLANNED FOR 1.30, BUT DONE TO EXPOSE |
| 23 | 23 | [/help?cmd=new|fossil new --empty] TO MORE FIELD TESTING BEFORE |
| 24 | 24 | MAKING ANY DECISION ON IT!) |
| 25 | + * Added a line-number toggle option to the [/help?cmd=/info|/info] | |
| 26 | + and [/help?cmd=/artifact|/artifact] pages. | |
| 25 | 27 | |
| 26 | 28 | <h2>Changes For Version 1.29 (2014-06-12)</h2> |
| 27 | 29 | * Add the ability to display content, diffs and annotations for UTF16 |
| 28 | 30 | text files in the web interface. |
| 29 | 31 | * Add the "SaveAs..." and "Invert" buttons |
| 30 | 32 |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -20,10 +20,12 @@ | |
| 20 | * Let [/help?cmd=new|fossil new] no longer create an initial empty commit |
| 21 | by default. The first commit after checking out an empty repository will |
| 22 | become the initial commit. (NOT PLANNED FOR 1.30, BUT DONE TO EXPOSE |
| 23 | [/help?cmd=new|fossil new --empty] TO MORE FIELD TESTING BEFORE |
| 24 | MAKING ANY DECISION ON IT!) |
| 25 | |
| 26 | <h2>Changes For Version 1.29 (2014-06-12)</h2> |
| 27 | * Add the ability to display content, diffs and annotations for UTF16 |
| 28 | text files in the web interface. |
| 29 | * Add the "SaveAs..." and "Invert" buttons |
| 30 |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -20,10 +20,12 @@ | |
| 20 | * Let [/help?cmd=new|fossil new] no longer create an initial empty commit |
| 21 | by default. The first commit after checking out an empty repository will |
| 22 | become the initial commit. (NOT PLANNED FOR 1.30, BUT DONE TO EXPOSE |
| 23 | [/help?cmd=new|fossil new --empty] TO MORE FIELD TESTING BEFORE |
| 24 | MAKING ANY DECISION ON IT!) |
| 25 | * Added a line-number toggle option to the [/help?cmd=/info|/info] |
| 26 | and [/help?cmd=/artifact|/artifact] pages. |
| 27 | |
| 28 | <h2>Changes For Version 1.29 (2014-06-12)</h2> |
| 29 | * Add the ability to display content, diffs and annotations for UTF16 |
| 30 | text files in the web interface. |
| 31 | * Add the "SaveAs..." and "Invert" buttons |
| 32 |