Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | merge trunk |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | cleanX |
Files: | files | file ages | folders |
SHA1: |
23024b4a6c160dbdece056731bdd7a55 |
User & Date: | jan.nijtmans 2015-11-03 04:47:00.000 |
Context
2015-11-03
| ||
22:50 | merge trunk ... (check-in: c7fbeb7a user: jan.nijtmans tags: cleanX) | |
05:47 | merge cleanX ... (check-in: 346d62a4 user: jan.nijtmans tags: cleanX-no-clean-glob) | |
04:47 | merge trunk ... (check-in: 23024b4a user: jan.nijtmans tags: cleanX) | |
03:47 | Simplify and enhance changes from the previous check-in. ... (check-in: 653b6b92 user: mistachkin tags: trunk) | |
2015-09-04
| ||
11:45 | merge trunk ... (check-in: 45cbbad4 user: jan.nijtmans tags: cleanX) | |
Changes
Changes to Dockerfile.
1 2 3 4 5 6 7 8 | ### # Dockerfile for Fossil ### FROM fedora:22 ### Now install some additional parts we will need for the build RUN dnf update -y && dnf install -y gcc make zlib-devel openssl-devel tar && dnf clean all && groupadd -r fossil -g 433 && useradd -u 431 -r -g fossil -d /opt/fossil -s /sbin/nologin -c "Fossil user" fossil | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ### # Dockerfile for Fossil ### FROM fedora:22 ### Now install some additional parts we will need for the build RUN dnf update -y && dnf install -y gcc make zlib-devel openssl-devel tar && dnf clean all && groupadd -r fossil -g 433 && useradd -u 431 -r -g fossil -d /opt/fossil -s /sbin/nologin -c "Fossil user" fossil ### If you want to build "trunk", change the next line accordingly. ENV FOSSIL_INSTALL_VERSION release RUN curl "http://core.tcl.tk/tcl/tarball/tcl-src.tar.gz?name=tcl-src&uuid=release" | tar zx RUN cd tcl-src/unix && ./configure --prefix=/usr --disable-shared --disable-threads --disable-load && make && make install RUN curl "http://www.fossil-scm.org/index.html/tarball/fossil-src.tar.gz?name=fossil-src&uuid=${FOSSIL_INSTALL_VERSION}" | tar zx RUN cd fossil-src && ./configure --disable-fusefs --json --with-th1-docs --with-th1-hooks --with-tcl RUN cd fossil-src/src && mv main.c main.c.orig && sed s/\"now\"/0/ <main.c.orig >main.c RUN cd fossil-src && make && strip fossil && cp fossil /usr/bin && cd .. && rm -rf fossil-src && chmod a+rx /usr/bin/fossil && mkdir -p /opt/fossil && chown fossil:fossil /opt/fossil |
︙ | ︙ |
Changes to Makefile.classic.
︙ | ︙ | |||
50 51 52 53 54 55 56 | TCC += -DFOSSIL_DYNAMIC_BUILD=1 #### Extra arguments for linking the finished binary. Fossil needs # to link against the Z-Lib compression library unless the miniz # library in the source tree is being used. There are no other # required dependencies. ZLIB_LIB.0 = -lz | | | 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | TCC += -DFOSSIL_DYNAMIC_BUILD=1 #### Extra arguments for linking the finished binary. Fossil needs # to link against the Z-Lib compression library unless the miniz # library in the source tree is being used. There are no other # required dependencies. ZLIB_LIB.0 = -lz ZLIB_LIB.1 = ZLIB_LIB. = $(ZLIB_LIB.0) # If using zlib: LIB += $(ZLIB_LIB.$(FOSSIL_ENABLE_MINIZ)) $(LDFLAGS) # If using HTTPS: LIB += -lcrypto -lssl |
︙ | ︙ |
Changes to VERSION.
|
| | | 1 | 1.34 |
Changes to ajax/i-test/rhino-test.js.
︙ | ︙ | |||
40 41 42 43 44 45 46 | if(!TestApp.verbose) return; print("ERROR: "+WhAjaj.stringify(opt)); }; cb.onResponse = function(resp,req){ if(!TestApp.verbose) return; print("GOT RESPONSE: "+(('string'===typeof resp) ? resp : WhAjaj.stringify(resp))); }; | | | 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | if(!TestApp.verbose) return; print("ERROR: "+WhAjaj.stringify(opt)); }; cb.onResponse = function(resp,req){ if(!TestApp.verbose) return; print("GOT RESPONSE: "+(('string'===typeof resp) ? resp : WhAjaj.stringify(resp))); }; })(); /** Throws an exception of cond is a falsy value. */ function assert(cond, descr){ descr = descr || "Undescribed condition."; |
︙ | ︙ | |||
125 126 127 128 129 130 131 | } testHAI.description = 'Get server version info.'; function testIAmNobody(){ TestApp.fossil.whoami('/json/whoami'); assert('nobody' === TestApp.fossil.auth.name, 'User == nobody.' ); assert(!TestApp.fossil.auth.authToken, 'authToken is not set.' ); | | | 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | } testHAI.description = 'Get server version info.'; function testIAmNobody(){ TestApp.fossil.whoami('/json/whoami'); assert('nobody' === TestApp.fossil.auth.name, 'User == nobody.' ); assert(!TestApp.fossil.auth.authToken, 'authToken is not set.' ); } testIAmNobody.description = 'Ensure that current user is "nobody".'; function testAnonymousLogin(){ TestApp.fossil.login(); assert('string' === typeof TestApp.fossil.auth.authToken, 'authToken = '+TestApp.fossil.auth.authToken); |
︙ | ︙ | |||
219 220 221 222 223 224 225 | osb.write(json,0, json.length); osb.close(); req = json = outs = osr = osb = undefined; var ins = p.getInputStream(); var isr = new java.io.InputStreamReader(ins); var br = new java.io.BufferedReader(isr); var line; | | | 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 | osb.write(json,0, json.length); osb.close(); req = json = outs = osr = osb = undefined; var ins = p.getInputStream(); var isr = new java.io.InputStreamReader(ins); var br = new java.io.BufferedReader(isr); var line; while( null !== (line=br.readLine())){ print(line); } br.close(); isr.close(); ins.close(); p.waitFor(); |
︙ | ︙ |
Changes to ajax/index.html.
1 2 3 4 5 6 7 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Fossil/JSON raw request sending</title> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Fossil/JSON raw request sending</title> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> <script type="text/javascript" src="js/whajaj.js"></script> <script type="text/javascript" src="js/fossil-ajaj.js"></script> <style type='text/css'> th { text-align: left; background-color: #ececec; } .dangerWillRobinson { background-color: yellow; } </style> |
︙ | ︙ |
Changes to ajax/wiki-editor.html.
1 2 3 4 5 6 7 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Fossil/JSON Wiki Editor Prototype</title> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Fossil/JSON Wiki Editor Prototype</title> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript" src="js/whajaj.js"></script> <script type="text/javascript" src="js/fossil-ajaj.js"></script> <style type='text/css'> th { text-align: left; background-color: #ececec; } .dangerWillRobinson { background-color: yellow; } .wikiPageLink { |
︙ | ︙ | |||
213 214 215 216 217 218 219 | TheApp.refreshPageListView = function(){ var list = (function(){ var k, v, li = []; for( k in TheApp.pages ){ if(!TheApp.pages.hasOwnProperty(k)) continue; li.push(k); } | | | 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 | TheApp.refreshPageListView = function(){ var list = (function(){ var k, v, li = []; for( k in TheApp.pages ){ if(!TheApp.pages.hasOwnProperty(k)) continue; li.push(k); } return li; })(); var i, p, a, tgt = TheApp.jqe.pageListArea; tgt.text(''); function makeLink(name){ var link = jQuery('<span></span>'); link.text(name); link.addClass('wikiPageLink'); |
︙ | ︙ | |||
320 321 322 323 324 325 326 | See also: <a href='index.html'>main test page</a>. <br> <b>Login:</b> <br/> <input type='button' value='Anon. Login' onclick='TheApp.cgi.login()' /> | | | 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 | See also: <a href='index.html'>main test page</a>. <br> <b>Login:</b> <br/> <input type='button' value='Anon. Login' onclick='TheApp.cgi.login()' /> or: name:<input type='text' id='textUser' value='json-demo' size='12'/> pw:<input type='password' id='textPassword' value='json-demo' size='12'/> <input type='button' value='login' onclick='TheApp.cgi.login(jQuery("#textUser").val(),jQuery("#textPassword").val(),{onResponse:TheApp.onLogin})' /> <input type='button' value='logout' onclick='TheApp.cgi.logout()' /> <br/> <span id='currentAuthToken' style='font-family:monospaced'></span> |
︙ | ︙ |
Changes to auto.def.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # System autoconfiguration. Try: ./configure --help use cc cc-lib options { with-openssl:path|auto|none => {Look for OpenSSL in the given path, or auto or none} with-miniz=0 => {Use miniz from the source tree} with-zlib:path => {Look for zlib in the given path} with-legacy-mv-rm=0 => {Enable legacy behavior for mv/rm (skip checkout files)} with-th1-docs=0 => {Enable TH1 for embedded documentation pages} with-th1-hooks=0 => {Enable TH1 hooks for commands and web pages} with-tcl:path => {Enable Tcl integration, with Tcl in the specified path} with-tcl-stubs=0 => {Enable Tcl integration via stubs library mechanism} with-tcl-private-stubs=0 => {Enable Tcl integration via private stubs mechanism} | > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # System autoconfiguration. Try: ./configure --help use cc cc-lib options { with-openssl:path|auto|none => {Look for OpenSSL in the given path, or auto or none} with-miniz=0 => {Use miniz from the source tree} with-zlib:path => {Look for zlib in the given path} with-exec-rel-paths=0 => {Enable relative paths for external diff/gdiff} with-legacy-mv-rm=0 => {Enable legacy behavior for mv/rm (skip checkout files)} with-th1-docs=0 => {Enable TH1 for embedded documentation pages} with-th1-hooks=0 => {Enable TH1 hooks for commands and web pages} with-tcl:path => {Enable Tcl integration, with Tcl in the specified path} with-tcl-stubs=0 => {Enable Tcl integration via stubs library mechanism} with-tcl-private-stubs=0 => {Enable Tcl integration via private stubs mechanism} |
︙ | ︙ | |||
89 90 91 92 93 94 95 96 97 98 99 100 101 102 | } if {[opt-bool with-legacy-mv-rm]} { define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_LEGACY_MV_RM define FOSSIL_ENABLE_LEGACY_MV_RM msg-result "Legacy mv/rm support enabled" } if {[opt-bool with-th1-docs]} { define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_TH1_DOCS define FOSSIL_ENABLE_TH1_DOCS msg-result "TH1 embedded documentation support enabled" } | > > > > > > | 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | } if {[opt-bool with-legacy-mv-rm]} { define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_LEGACY_MV_RM define FOSSIL_ENABLE_LEGACY_MV_RM msg-result "Legacy mv/rm support enabled" } if {[opt-bool with-exec-rel-paths]} { define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_EXEC_REL_PATHS define FOSSIL_ENABLE_EXEC_REL_PATHS msg-result "Relative paths in external diff/gdiff enabled" } if {[opt-bool with-th1-docs]} { define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_TH1_DOCS define FOSSIL_ENABLE_TH1_DOCS msg-result "TH1 embedded documentation support enabled" } |
︙ | ︙ | |||
154 155 156 157 158 159 160 161 162 | define FOSSIL_ENABLE_TCL_STUBS define USE_TCL_STUBS } else { set libs "$tclconfig(TCL_LIB_SPEC) $tclconfig(TCL_LIBS)" } set cflags $tclconfig(TCL_INCLUDE_SPEC) if {!$tclprivatestubs} { cc-with [list -cflags $cflags -libs $libs] { if {$tclstubs} { | > | > > > > > > > > > > > > > > | > > | | | > > > > > > > | | > | 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 | define FOSSIL_ENABLE_TCL_STUBS define USE_TCL_STUBS } else { set libs "$tclconfig(TCL_LIB_SPEC) $tclconfig(TCL_LIBS)" } set cflags $tclconfig(TCL_INCLUDE_SPEC) if {!$tclprivatestubs} { set foundtcl 0; # Did we find a working Tcl library? cc-with [list -cflags $cflags -libs $libs] { if {$tclstubs} { if {[cc-check-functions Tcl_InitStubs]} { set foundtcl 1 } } else { if {[cc-check-functions Tcl_CreateInterp]} { set foundtcl 1 } } } if {!$foundtcl && [string match *-lieee* $libs]} { # On some systems, using "-lieee" from TCL_LIB_SPEC appears # to cause issues. msg-result "Removing \"-lieee\" and retrying for Tcl..." set libs [string map [list -lieee ""] $libs] cc-with [list -cflags $cflags -libs $libs] { if {$tclstubs} { if {[cc-check-functions Tcl_InitStubs]} { set foundtcl 1 } } else { if {[cc-check-functions Tcl_CreateInterp]} { set foundtcl 1 } } } } if {!$foundtcl} { if {$tclstubs} { user-error "Cannot find a usable Tcl stubs library $msg" } else { user-error "Cannot find a usable Tcl library $msg" } } } set version $tclconfig(TCL_VERSION)$tclconfig(TCL_PATCH_LEVEL) msg-result "Found Tcl $version at $tclconfig(TCL_PREFIX)" if {!$tclprivatestubs} { define-append LIBS $libs } |
︙ | ︙ |
Changes to fossil.1.
︙ | ︙ | |||
12 13 14 15 16 17 18 | \fICOMMAND [OPTIONS]\fR .SH DESCRIPTION Fossil is a distributed version control system (DVCS) with built-in wiki, ticket tracker, CGI/http interface, and http server. .SH Common COMMANDs: | | | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | \fICOMMAND [OPTIONS]\fR .SH DESCRIPTION Fossil is a distributed version control system (DVCS) with built-in wiki, ticket tracker, CGI/http interface, and http server. .SH Common COMMANDs: add clean import pull stash .br addremove clone info purge status .br all commit init push sync .br annotate diff json rebuild tag .br |
︙ | ︙ |
Changes to setup/fossil.nsi.
︙ | ︙ | |||
10 11 12 13 14 15 16 | Name "Fossil" ; The file to write OutFile "fossil-setup.exe" ; The default installation directory InstallDir $PROGRAMFILES\Fossil | | | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | Name "Fossil" ; The file to write OutFile "fossil-setup.exe" ; The default installation directory InstallDir $PROGRAMFILES\Fossil ; Registry key to check for directory (so if you install again, it will ; overwrite the old one automatically) InstallDirRegKey HKLM SOFTWARE\Fossil "Install_Dir" ; The text to prompt the user to enter a directory ComponentText "This will install fossil on your computer." ; The text to prompt the user to enter a directory DirText "Choose a directory to install in to:" |
︙ | ︙ |
Changes to skins/README.md.
︙ | ︙ | |||
27 28 29 30 31 32 33 | 5. Type "make" to rebuild. Development Hints ----------------- One way to develop a new skin is to copy the baseline files (css.txt, | | | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | 5. Type "make" to rebuild. Development Hints ----------------- One way to develop a new skin is to copy the baseline files (css.txt, details.txt, footer.txt, and header.txt) into a working directory $WORKDIR then launch Fossil with a command-line option "--skin $WORKDIR". Example: cp -r skins/default newskin fossil ui --skin ./newskin When the argument to --skin contains one or more '/' characters, the appropriate skin files are read from disk from the directory specified. |
︙ | ︙ |
Changes to skins/blitz/css.txt.
︙ | ︙ | |||
1060 1061 1062 1063 1064 1065 1066 | border-right: 1px solid #ddd; } tr.timelineSelected { border-left: 2px solid orange; background-color: #ffffe8; border-bottom: 1px solid #ddd; | | | 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 | border-right: 1px solid #ddd; } tr.timelineSelected { border-left: 2px solid orange; background-color: #ffffe8; border-bottom: 1px solid #ddd; border-right: 1px solid #ddd; } tr.timelineCurrent td.timelineTableCell { } tr.timelineSpacer { } |
︙ | ︙ |
Changes to skins/blitz/ticket.txt.
︙ | ︙ | |||
83 84 85 86 87 88 89 | username AS xusername FROM ticketchng WHERE tkt_id=$tkt_id AND length(icomment)>0} { if {$seenRow eq "0"} { html "<h5>User Comments</h5>\n" set seenRow 1 } | | | 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | username AS xusername FROM ticketchng WHERE tkt_id=$tkt_id AND length(icomment)>0} { if {$seenRow eq "0"} { html "<h5>User Comments</h5>\n" set seenRow 1 } html "<div class='tktComment'>\n" html "<div class='tktCommentHeader'>\n" html "<div class='pull-right'>$xdate</div>\n" html "<span class='tktCommentLogin'>[htmlize $xlogin]</span>" if {$xlogin ne $xusername && [string length $xusername]>0} { html " (claiming to be <span class='tktCommentLogin'>[htmlize $xusername]</span>)" } html " commented</div>\n" |
︙ | ︙ |
Changes to skins/blitz_no_logo/ticket.txt.
︙ | ︙ | |||
83 84 85 86 87 88 89 | username AS xusername FROM ticketchng WHERE tkt_id=$tkt_id AND length(icomment)>0} { if {$seenRow eq "0"} { html "<h5>User Comments</h5>\n" set seenRow 1 } | | | 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | username AS xusername FROM ticketchng WHERE tkt_id=$tkt_id AND length(icomment)>0} { if {$seenRow eq "0"} { html "<h5>User Comments</h5>\n" set seenRow 1 } html "<div class='tktComment'>\n" html "<div class='tktCommentHeader'>\n" html "<div class='pull-right'>$xdate</div>\n" html "<span class='tktCommentLogin'>[htmlize $xlogin]</span>" if {$xlogin ne $xusername && [string length $xusername]>0} { html " (claiming to be <span class='tktCommentLogin'>[htmlize $xusername]</span>)" } html " commented</div>\n" |
︙ | ︙ |
Changes to skins/xekri/css.txt.
1 2 3 | /****************************************************************************** * Xekri * | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | /****************************************************************************** * Xekri * * To adjust the width of the contents for this skin, look for the "max-width" * property and change its value. (It's in the "Main Area" section) The value * determines how much of the browser window to use. Some like 100%, so that * the entire window is used. Others prefer 80%, which makes the contents * easier to read for them. */ /************************************** * General HTML */ |
︙ | ︙ | |||
929 930 931 932 933 934 935 | span.wikiruleHead { font-weight: bold; } /* format for user color input on checkin edit page */ input.checkinUserColor { | | | | | | 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 | span.wikiruleHead { font-weight: bold; } /* format for user color input on checkin edit page */ input.checkinUserColor { /* no special definitions, class defined, to enable color pickers, * f.e.: * ** add the color picker found at http:jscolor.com as java script * include * ** to the header and configure the java script file with * ** 1. use as bindClass :checkinUserColor * ** 2. change the default hash adding behaviour to ON * ** or change the class defition of element identified by * id="clrcust" * ** to a standard jscolor definition with java script in the footer. * */ } /* format for end of content area, to be used to clear page flow. */ div.endContent { clear: both; } |
︙ | ︙ |
Changes to src/add.c.
︙ | ︙ | |||
711 712 713 714 715 716 717 | const char *zNew, int dryRunFlag ){ int x = db_int(-1, "SELECT deleted FROM vfile WHERE pathname=%Q %s", zNew, filename_collation()); if( x>=0 ){ if( x==0 ){ | > > > | | > | 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 | const char *zNew, int dryRunFlag ){ int x = db_int(-1, "SELECT deleted FROM vfile WHERE pathname=%Q %s", zNew, filename_collation()); if( x>=0 ){ if( x==0 ){ if( !filenames_are_case_sensitive() && fossil_stricmp(zOrig,zNew)==0 ){ /* Case change only */ }else{ fossil_fatal("cannot rename '%s' to '%s' since another file named '%s'" " is currently under management", zOrig, zNew, zNew); } }else{ fossil_fatal("cannot rename '%s' to '%s' since the delete of '%s' has " "not yet been committed", zOrig, zNew, zNew); } } fossil_print("RENAME %s %s\n", zOrig, zNew); if( !dryRunFlag ){ |
︙ | ︙ | |||
741 742 743 744 745 746 747 748 749 750 751 752 753 754 | static void add_file_to_move( const char *zOldName, /* The old name of the file on disk. */ const char *zNewName /* The new name of the file on disk. */ ){ static int tableCreated = 0; Blob fullOldName; Blob fullNewName; if( !tableCreated ){ db_multi_exec("CREATE TEMP TABLE fmove(x TEXT PRIMARY KEY %s, y TEXT %s)", filename_collation(), filename_collation()); tableCreated = 1; } file_tree_name(zOldName, &fullOldName, 1, 1); file_tree_name(zNewName, &fullNewName, 1, 1); | > > > > | < > | 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 | static void add_file_to_move( const char *zOldName, /* The old name of the file on disk. */ const char *zNewName /* The new name of the file on disk. */ ){ static int tableCreated = 0; Blob fullOldName; Blob fullNewName; char *zOld, *zNew; if( !tableCreated ){ db_multi_exec("CREATE TEMP TABLE fmove(x TEXT PRIMARY KEY %s, y TEXT %s)", filename_collation(), filename_collation()); tableCreated = 1; } file_tree_name(zOldName, &fullOldName, 1, 1); zOld = blob_str(&fullOldName); file_tree_name(zNewName, &fullNewName, 1, 1); zNew = blob_str(&fullNewName); if( filenames_are_case_sensitive() || fossil_stricmp(zOld,zNew)!=0 ){ db_multi_exec("INSERT INTO fmove VALUES('%q','%q');", zOld, zNew); } blob_reset(&fullNewName); blob_reset(&fullOldName); } /* ** This function moves files within the checkout, using the file names ** contained in the temporary table "fmove". The temporary table is |
︙ | ︙ |
Changes to src/bisect.c.
︙ | ︙ | |||
175 176 177 178 179 180 181 182 183 184 185 186 | ** sorted either chronologically by bisect time, or by check-in time. */ static void bisect_chart(int sortByCkinTime){ char *zLog = db_lget("bisect-log",""); Blob log, id; Stmt q; int cnt = 0; blob_init(&log, zLog, -1); db_multi_exec( "CREATE TEMP TABLE bilog(" " seq INTEGER PRIMARY KEY," /* Sequence of events */ " stat TEXT," /* Type of occurrence */ | > | | | > | > | > | | | | 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 | ** sorted either chronologically by bisect time, or by check-in time. */ static void bisect_chart(int sortByCkinTime){ char *zLog = db_lget("bisect-log",""); Blob log, id; Stmt q; int cnt = 0; int iCurrent = db_lget_int("checkout",0); blob_init(&log, zLog, -1); db_multi_exec( "CREATE TEMP TABLE bilog(" " seq INTEGER PRIMARY KEY," /* Sequence of events */ " stat TEXT," /* Type of occurrence */ " rid INTEGER UNIQUE" /* Check-in number */ ");" ); db_prepare(&q, "INSERT OR IGNORE INTO bilog(seq,stat,rid)" " VALUES(:seq,:stat,:rid)"); while( blob_token(&log, &id) ){ int rid = atoi(blob_str(&id)); db_bind_int(&q, ":seq", ++cnt); db_bind_text(&q, ":stat", rid>0 ? "GOOD" : "BAD"); db_bind_int(&q, ":rid", rid>=0 ? rid : -rid); db_step(&q); db_reset(&q); } db_bind_int(&q, ":seq", ++cnt); db_bind_text(&q, ":stat", "CURRENT"); db_bind_int(&q, ":rid", iCurrent); db_step(&q); db_finalize(&q); db_prepare(&q, "SELECT bilog.seq, bilog.stat," " substr(blob.uuid,1,16), datetime(event.mtime)," " blob.rid==%d" " FROM bilog, blob, event" " WHERE blob.rid=bilog.rid AND event.objid=bilog.rid" " AND event.type='ci'" " ORDER BY %s bilog.rowid ASC", iCurrent, (sortByCkinTime ? "event.mtime DESC, " : "") ); while( db_step(&q)==SQLITE_ROW ){ const char *zGoodBad = db_column_text(&q, 1); fossil_print("%3d %-7s %s %s%s\n", db_column_int(&q, 0), zGoodBad, db_column_text(&q, 3), db_column_text(&q, 2), (db_column_int(&q, 4) && zGoodBad[0]!='C') ? " CURRENT" : ""); } db_finalize(&q); } /* ** COMMAND: bisect ** |
︙ | ︙ |
Changes to src/checkin.c.
︙ | ︙ | |||
1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 | ** -n|--dry-run If given, display instead of run actions ** --no-warnings omit all warnings about file contents ** --nosign do not attempt to sign this commit with gpg ** --private do not sync changes and their descendants ** --sha1sum verify file status using SHA1 hashing rather ** than relying on file mtimes ** --tag TAG-NAME assign given tag TAG-NAME to the check-in ** ** See also: branch, changes, checkout, extras, sync */ void commit_cmd(void){ int hasChanges; /* True if unsaved changes exist */ int vid; /* blob-id of parent version */ int nrid; /* blob-id of a modified file */ | > > | 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 | ** -n|--dry-run If given, display instead of run actions ** --no-warnings omit all warnings about file contents ** --nosign do not attempt to sign this commit with gpg ** --private do not sync changes and their descendants ** --sha1sum verify file status using SHA1 hashing rather ** than relying on file mtimes ** --tag TAG-NAME assign given tag TAG-NAME to the check-in ** --date-override DATE DATE to use instead of 'now' ** --user-override USER USER to use instead of the current default ** ** See also: branch, changes, checkout, extras, sync */ void commit_cmd(void){ int hasChanges; /* True if unsaved changes exist */ int vid; /* blob-id of parent version */ int nrid; /* blob-id of a modified file */ |
︙ | ︙ |
Changes to src/db.c.
︙ | ︙ | |||
1991 1992 1993 1994 1995 1996 1997 | ** repository and local databases. ** ** If no such variable exists, return zDefault. Or, if zName is the name ** of a setting, then the zDefault is ignored and the default value of the ** setting is returned instead. If zName is a versioned setting, then ** versioned value takes priority. */ | | | | | | 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 | ** repository and local databases. ** ** If no such variable exists, return zDefault. Or, if zName is the name ** of a setting, then the zDefault is ignored and the default value of the ** setting is returned instead. If zName is a versioned setting, then ** versioned value takes priority. */ char *db_get(const char *zName, const char *zDefault){ char *z = 0; const Setting *pSetting = db_find_setting(zName, 0); if( g.repositoryOpen ){ z = db_text(0, "SELECT value FROM config WHERE name=%Q", zName); } if( z==0 && g.zConfigDbName ){ db_swap_connections(); z = db_text(0, "SELECT value FROM global_config WHERE name=%Q", zName); db_swap_connections(); } if( pSetting!=0 && pSetting->versionable ){ /* This is a versionable setting, try and get the info from a ** checked out file */ z = db_get_versioned(zName, z); } if( z==0 ){ if( zDefault==0 && pSetting && pSetting->def[0] ){ z = fossil_strdup(pSetting->def); }else{ z = fossil_strdup(zDefault); } } return z; } char *db_get_mtime(const char *zName, const char *zFormat, const char *zDefault){ char *z = 0; if( g.repositoryOpen ){ z = db_text(0, "SELECT mtime FROM config WHERE name=%Q", zName); } if( z==0 ){ z = fossil_strdup(zDefault); }else if( zFormat!=0 ){ z = db_text(0, "SELECT strftime(%Q,%Q,'unixepoch');", zFormat, z); } return z; } void db_set(const char *zName, const char *zValue, int globalFlag){ db_begin_transaction(); |
︙ | ︙ | |||
2108 2109 2110 2111 2112 2113 2114 | } int db_get_boolean(const char *zName, int dflt){ char *zVal = db_get(zName, dflt ? "on" : "off"); if( is_truth(zVal) ) return 1; if( is_false(zVal) ) return 0; return dflt; } | | | | 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 | } int db_get_boolean(const char *zName, int dflt){ char *zVal = db_get(zName, dflt ? "on" : "off"); if( is_truth(zVal) ) return 1; if( is_false(zVal) ) return 0; return dflt; } char *db_lget(const char *zName, const char *zDefault){ return db_text(zDefault, "SELECT value FROM vvar WHERE name=%Q", zName); } void db_lset(const char *zName, const char *zValue){ db_multi_exec("REPLACE INTO vvar(name,value) VALUES(%Q,%Q)", zName, zValue); } int db_lget_int(const char *zName, int dflt){ return db_int(dflt, "SELECT value FROM vvar WHERE name=%Q", zName); |
︙ | ︙ | |||
2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 | { "diff-binary", 0, 0, 0, 0, "on" }, { "diff-command", 0, 40, 0, 0, "" }, { "dont-push", 0, 0, 0, 0, "off" }, { "dotfiles", 0, 0, 1, 0, "off" }, { "editor", 0, 32, 0, 0, "" }, { "empty-dirs", 0, 40, 1, 0, "" }, { "encoding-glob", 0, 40, 1, 0, "" }, { "gdiff-command", 0, 40, 0, 0, "gdiff" }, { "gmerge-command", 0, 40, 0, 0, "" }, { "hash-digits", 0, 5, 0, 0, "10" }, { "http-port", 0, 16, 0, 0, "8080" }, { "https-login", 0, 0, 0, 0, "off" }, { "ignore-glob", 0, 40, 1, 0, "" }, { "keep-glob", 0, 40, 1, 0, "" }, | > > > > > | 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 | { "diff-binary", 0, 0, 0, 0, "on" }, { "diff-command", 0, 40, 0, 0, "" }, { "dont-push", 0, 0, 0, 0, "off" }, { "dotfiles", 0, 0, 1, 0, "off" }, { "editor", 0, 32, 0, 0, "" }, { "empty-dirs", 0, 40, 1, 0, "" }, { "encoding-glob", 0, 40, 1, 0, "" }, #if defined(FOSSIL_ENABLE_EXEC_REL_PATHS) { "exec-rel-paths", 0, 0, 0, 0, "on" }, #else { "exec-rel-paths", 0, 0, 0, 0, "off" }, #endif { "gdiff-command", 0, 40, 0, 0, "gdiff" }, { "gmerge-command", 0, 40, 0, 0, "" }, { "hash-digits", 0, 5, 0, 0, "10" }, { "http-port", 0, 16, 0, 0, "8080" }, { "https-login", 0, 0, 0, 0, "off" }, { "ignore-glob", 0, 40, 1, 0, "" }, { "keep-glob", 0, 40, 1, 0, "" }, |
︙ | ︙ | |||
2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 | ** created. ** ** encoding-glob The VALUE is a comma or newline-separated list of GLOB ** (versionable) patterns specifying files that the "commit" command will ** ignore when issuing warnings about text files that may ** use another encoding than ASCII or UTF-8. Set to "*" ** to disable encoding checking. ** ** gdiff-command External command to run when performing a graphical ** diff. If undefined, text diff will be used. ** ** gmerge-command A graphical merge conflict resolver command operating ** on four files. ** Ex: kdiff3 "%baseline" "%original" "%merge" -o "%output" | > > > | 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 | ** created. ** ** encoding-glob The VALUE is a comma or newline-separated list of GLOB ** (versionable) patterns specifying files that the "commit" command will ** ignore when issuing warnings about text files that may ** use another encoding than ASCII or UTF-8. Set to "*" ** to disable encoding checking. ** ** exec-rel-paths When executing certain external commands (e.g. diff and ** gdiff), use relative paths. ** ** gdiff-command External command to run when performing a graphical ** diff. If undefined, text diff will be used. ** ** gmerge-command A graphical merge conflict resolver command operating ** on four files. ** Ex: kdiff3 "%baseline" "%original" "%merge" -o "%output" |
︙ | ︙ |
Changes to src/delta.c.
︙ | ︙ | |||
618 619 620 621 622 623 624 | (void)getInt(&zDelta, &lenDelta); if( *zDelta!='\n' ){ /* ERROR: size integer not terminated by "\n" */ return -1; } zDelta++; lenDelta--; while( *zDelta && lenDelta>0 ){ | | | | 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 | (void)getInt(&zDelta, &lenDelta); if( *zDelta!='\n' ){ /* ERROR: size integer not terminated by "\n" */ return -1; } zDelta++; lenDelta--; while( *zDelta && lenDelta>0 ){ unsigned int cnt; cnt = getInt(&zDelta, &lenDelta); switch( zDelta[0] ){ case '@': { zDelta++; lenDelta--; (void)getInt(&zDelta, &lenDelta); if( lenDelta>0 && zDelta[0]!=',' ){ /* ERROR: copy command not terminated by ',' */ return -1; } zDelta++; lenDelta--; nCopy += cnt; break; |
︙ | ︙ |
Changes to src/diffcmd.c.
︙ | ︙ | |||
30 31 32 33 34 35 36 37 38 39 40 41 42 43 | # define NULL_DEVICE "/dev/null" #endif /* ** Used when the name for the diff is unknown. */ #define DIFF_NO_NAME "(unknown)" /* ** Print the "Index:" message that patches wants to see at the top of a diff. */ void diff_print_index(const char *zFile, u64 diffFlags){ if( (diffFlags & (DIFF_SIDEBYSIDE|DIFF_BRIEF))==0 ){ char *z = mprintf("Index: %s\n%.66c\n", zFile, '='); | > > > > > > > > > > > > > > > > > > > > > > | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | # define NULL_DEVICE "/dev/null" #endif /* ** Used when the name for the diff is unknown. */ #define DIFF_NO_NAME "(unknown)" /* ** Use the "exec-rel-paths" setting and the --exec-abs-paths and ** --exec-rel-paths command line options to determine whether ** certain external commands are executed using relative paths. */ static int determine_exec_relative_option(int force) { static int relativePaths = -1; if( force || relativePaths==-1 ){ int relPathOption = find_option("exec-rel-paths", 0, 0)!=0; int absPathOption = find_option("exec-abs-paths", 0, 0)!=0; #if defined(FOSSIL_ENABLE_EXEC_REL_PATHS) relativePaths = db_get_boolean("exec-rel-paths", 1); #else relativePaths = db_get_boolean("exec-rel-paths", 0); #endif if( relPathOption ){ relativePaths = 1; } if( absPathOption ){ relativePaths = 0; } } return relativePaths; } /* ** Print the "Index:" message that patches wants to see at the top of a diff. */ void diff_print_index(const char *zFile, u64 diffFlags){ if( (diffFlags & (DIFF_SIDEBYSIDE|DIFF_BRIEF))==0 ){ char *z = mprintf("Index: %s\n%.66c\n", zFile, '='); |
︙ | ︙ | |||
274 275 276 277 278 279 280 | file_delete(zTemp1); file_delete(zTemp2); blob_reset(&cmd); } } /* | | | | | | | 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 | file_delete(zTemp1); file_delete(zTemp2); blob_reset(&cmd); } } /* ** Do a diff against a single file named in zFile from version zFrom ** against the same file on disk. ** ** Use the internal diff logic if zDiffCmd is NULL. Otherwise call the ** command zDiffCmd to do the diffing. ** ** When using an external diff program, zBinGlob contains the GLOB patterns ** for file names to treat as binary. If fIncludeBinary is zero, these files ** will be skipped in addition to files that may contain binary content. */ static void diff_one_against_disk( const char *zFrom, /* Version tag for the "before" file */ const char *zDiffCmd, /* Use this "diff" command */ const char *zBinGlob, /* Treat file names matching this as binary */ int fIncludeBinary, /* Include binary files for external diff */ u64 diffFlags, /* Diff control flags */ const char *zFile /* Name of the file to be diffed */ ){ Blob fname; Blob content; int isLink; int isBin; file_tree_name(zFile, &fname, 0, 1); historical_version_of_file(zFrom, blob_str(&fname), &content, &isLink, 0, fIncludeBinary ? 0 : &isBin, 0); if( !isLink != !file_wd_islink(zFrom) ){ fossil_print("%s",DIFF_CANNOT_COMPUTE_SYMLINK); }else{ diff_file(&content, isBin, zFile, zFile, zDiffCmd, zBinGlob, fIncludeBinary, diffFlags); } blob_reset(&content); blob_reset(&fname); } /* |
︙ | ︙ | |||
382 383 384 385 386 387 388 | while( db_step(&q)==SQLITE_ROW ){ const char *zPathname = db_column_text(&q,0); int isDeleted = db_column_int(&q, 1); int isChnged = db_column_int(&q,2); int isNew = db_column_int(&q,3); int srcid = db_column_int(&q, 4); int isLink = db_column_int(&q, 5); | < | > > > > > > > > > > > > > > | 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 | while( db_step(&q)==SQLITE_ROW ){ const char *zPathname = db_column_text(&q,0); int isDeleted = db_column_int(&q, 1); int isChnged = db_column_int(&q,2); int isNew = db_column_int(&q,3); int srcid = db_column_int(&q, 4); int isLink = db_column_int(&q, 5); const char *zFullName; int showDiff = 1; Blob fname; if( determine_exec_relative_option(0) ){ blob_zero(&fname); file_relative_name(zPathname, &fname, 1); }else{ blob_set(&fname, g.zLocalRoot); blob_append(&fname, zPathname, -1); } zFullName = blob_str(&fname); if( isDeleted ){ fossil_print("DELETED %s\n", zPathname); if( !asNewFile ){ showDiff = 0; zFullName = NULL_DEVICE; } }else if( file_access(zFullName, F_OK) ){ fossil_print("MISSING %s\n", zPathname); if( !asNewFile ){ showDiff = 0; } }else if( isNew ){ fossil_print("ADDED %s\n", zPathname); srcid = 0; if( !asNewFile ){ showDiff = 0; } }else if( isChnged==3 ){ fossil_print("ADDED_BY_MERGE %s\n", zPathname); srcid = 0; if( !asNewFile ){ showDiff = 0; } }else if( isChnged==5 ){ fossil_print("ADDED_BY_INTEGRATE %s\n", zPathname); srcid = 0; if( !asNewFile ){ showDiff = 0; } } if( showDiff ){ Blob content; int isBin; if( !isLink != !file_wd_islink(zFullName) ){ diff_print_index(zPathname, diffFlags); |
︙ | ︙ | |||
420 421 422 423 424 425 426 | } isBin = fIncludeBinary ? 0 : looks_like_binary(&content); diff_print_index(zPathname, diffFlags); diff_file(&content, isBin, zFullName, zPathname, zDiffCmd, zBinGlob, fIncludeBinary, diffFlags); blob_reset(&content); } | | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | | | | | | | | | 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 | } isBin = fIncludeBinary ? 0 : looks_like_binary(&content); diff_print_index(zPathname, diffFlags); diff_file(&content, isBin, zFullName, zPathname, zDiffCmd, zBinGlob, fIncludeBinary, diffFlags); blob_reset(&content); } blob_reset(&fname); } db_finalize(&q); db_end_transaction(1); /* ROLLBACK */ } /* ** Do a diff of a single file named in zFile against the ** version of this file held in the undo buffer. ** ** Use the internal diff logic if zDiffCmd is NULL. Otherwise call the ** command zDiffCmd to do the diffing. ** ** When using an external diff program, zBinGlob contains the GLOB patterns ** for file names to treat as binary. If fIncludeBinary is zero, these files ** will be skipped in addition to files that may contain binary content. */ static void diff_one_against_undo( const char *zDiffCmd, /* Use this "diff" command */ const char *zBinGlob, /* Treat file names matching this as binary */ int fIncludeBinary, /* Include binary files for external diff */ u64 diffFlags, /* Diff control flags */ const char *zFile /* Name of the file to be diffed */ ){ Blob fname; Blob content; blob_init(&content, 0, 0); file_tree_name(zFile, &fname, 0, 1); db_blob(&content, "SELECT content FROM undo WHERE pathname=%Q", blob_str(&fname)); if( blob_size(&content) ){ diff_file(&content, 0, zFile, zFile, zDiffCmd, zBinGlob, fIncludeBinary, diffFlags); } blob_reset(&content); blob_reset(&fname); } /* ** Run a diff between the undo buffer and files on disk. ** ** Use the internal diff logic if zDiffCmd is NULL. Otherwise call the ** command zDiffCmd to do the diffing. ** ** When using an external diff program, zBinGlob contains the GLOB patterns ** for file names to treat as binary. If fIncludeBinary is zero, these files ** will be skipped in addition to files that may contain binary content. */ static void diff_all_against_undo( const char *zDiffCmd, /* Use this diff command. NULL for built-in */ const char *zBinGlob, /* Treat file names matching this as binary */ int fIncludeBinary, /* Treat file names matching this as binary */ u64 diffFlags /* Flags controlling diff output */ ){ Stmt q; Blob content; db_prepare(&q, "SELECT pathname, content FROM undo"); blob_init(&content, 0, 0); while( db_step(&q)==SQLITE_ROW ){ const char *zFile = (const char*)db_column_text(&q, 0); char *zFullName = mprintf("%s%s", g.zLocalRoot, zFile); db_column_blob(&q, 1, &content); diff_file(&content, 0, zFullName, zFile, zDiffCmd, zBinGlob, fIncludeBinary, diffFlags); fossil_free(zFullName); blob_reset(&content); } db_finalize(&q); } /* ** Output the differences between two versions of a single file. ** zFrom and zTo are the check-ins containing the two file versions. ** ** Use the internal diff logic if zDiffCmd is NULL. Otherwise call the ** command zDiffCmd to do the diffing. ** ** When using an external diff program, zBinGlob contains the GLOB patterns ** for file names to treat as binary. If fIncludeBinary is zero, these files ** will be skipped in addition to files that may contain binary content. */ static void diff_one_two_versions( const char *zFrom, /* Version tag for the "before" file */ const char *zTo, /* Version tag for the "after" file */ const char *zDiffCmd, /* Use this "diff" command */ const char *zBinGlob, /* GLOB pattern for files that are binary */ int fIncludeBinary, /* True to show binary files */ u64 diffFlags, /* Diff flags */ const char *zFile /* Name of the file to be diffed */ ){ char *zName; Blob fname; Blob v1, v2; int isLink1, isLink2; int isBin1, isBin2; if( diffFlags & DIFF_BRIEF ) return; file_tree_name(zFile, &fname, 0, 1); zName = blob_str(&fname); historical_version_of_file(zFrom, zName, &v1, &isLink1, 0, fIncludeBinary ? 0 : &isBin1, 0); historical_version_of_file(zTo, zName, &v2, &isLink2, 0, fIncludeBinary ? 0 : &isBin2, 0); if( isLink1 != isLink2 ){ diff_print_filenames(zName, zName, diffFlags); |
︙ | ︙ | |||
598 599 600 601 602 603 604 | } /* ** Return the name of the external diff command, or return NULL if ** no external diff command is defined. */ const char *diff_command_external(int guiDiff){ | | | 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 | } /* ** Return the name of the external diff command, or return NULL if ** no external diff command is defined. */ const char *diff_command_external(int guiDiff){ const char *zDefault; const char *zName; if( guiDiff ){ #if defined(_WIN32) zDefault = "WinDiff.exe"; #else zDefault = 0; |
︙ | ︙ | |||
745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 | ** ** Options: ** --binary PATTERN Treat files that match the glob PATTERN as binary ** --branch BRANCH Show diff of all changes on BRANCH ** --brief Show filenames only ** --context|-c N Use N lines of context ** --diff-binary BOOL Include binary files when using external commands ** --from|-r VERSION select VERSION as source for the diff ** --internal|-i use internal diff logic ** --side-by-side|-y side-by-side diff ** --strip-trailing-cr Strip trailing CR ** --tk Launch a Tcl/Tk GUI for display ** --to VERSION select VERSION as target for the diff ** --unified unified diff ** -v|--verbose output complete text of added or deleted files ** -w|--ignore-all-space Ignore white space when comparing lines ** -W|--width <num> Width of lines in side-by-side diff ** -Z|--ignore-trailing-space Ignore changes to end-of-line whitespace */ void diff_cmd(void){ int isGDiff; /* True for gdiff. False for normal diff */ int isInternDiff; /* True for internal diff */ int verboseFlag; /* True if -v or --verbose flag is used */ const char *zFrom; /* Source version number */ const char *zTo; /* Target version number */ const char *zBranch; /* Branch to diff */ const char *zDiffCmd = 0; /* External diff command. NULL for internal diff */ const char *zBinGlob = 0; /* Treat file names matching this as binary */ int fIncludeBinary = 0; /* Include binary files for external diff */ u64 diffFlags = 0; /* Flags to control the DIFF */ | > > > > < > > > > | > > > > > | | | | | > | > > > > > > | > > > > > > > > > > > | < < < < < < < < < > | | | 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 | ** ** Options: ** --binary PATTERN Treat files that match the glob PATTERN as binary ** --branch BRANCH Show diff of all changes on BRANCH ** --brief Show filenames only ** --context|-c N Use N lines of context ** --diff-binary BOOL Include binary files when using external commands ** --exec-abs-paths Force absolute path names with external commands. ** --exec-rel-paths Force relative path names with external commands. ** --from|-r VERSION select VERSION as source for the diff ** --internal|-i use internal diff logic ** --side-by-side|-y side-by-side diff ** --strip-trailing-cr Strip trailing CR ** --tk Launch a Tcl/Tk GUI for display ** --to VERSION select VERSION as target for the diff ** --undo Diff against the "undo" buffer ** --unified unified diff ** -v|--verbose output complete text of added or deleted files ** -w|--ignore-all-space Ignore white space when comparing lines ** -W|--width <num> Width of lines in side-by-side diff ** -Z|--ignore-trailing-space Ignore changes to end-of-line whitespace */ void diff_cmd(void){ int isGDiff; /* True for gdiff. False for normal diff */ int isInternDiff; /* True for internal diff */ int verboseFlag; /* True if -v or --verbose flag is used */ const char *zFrom; /* Source version number */ const char *zTo; /* Target version number */ const char *zBranch; /* Branch to diff */ const char *zDiffCmd = 0; /* External diff command. NULL for internal diff */ const char *zBinGlob = 0; /* Treat file names matching this as binary */ int fIncludeBinary = 0; /* Include binary files for external diff */ int againstUndo = 0; /* Diff against files in the undo buffer */ u64 diffFlags = 0; /* Flags to control the DIFF */ if( find_option("tk",0,0)!=0 ){ diff_tk("diff", 2); return; } isGDiff = g.argv[1][0]=='g'; isInternDiff = find_option("internal","i",0)!=0; zFrom = find_option("from", "r", 1); zTo = find_option("to", 0, 1); zBranch = find_option("branch", 0, 1); againstUndo = find_option("undo",0,0)!=0; diffFlags = diff_options(); verboseFlag = find_option("verbose","v",0)!=0; if( !verboseFlag ){ verboseFlag = find_option("new-file","N",0)!=0; /* deprecated */ } if( verboseFlag ) diffFlags |= DIFF_VERBOSE; if( againstUndo && (zFrom!=0 || zTo!=0 || zBranch!=0) ){ fossil_fatal("cannot use --undo together with --from or --to or --branch"); } if( zBranch ){ if( zTo || zFrom ){ fossil_fatal("cannot use --from or --to with --branch"); } zTo = zBranch; zFrom = mprintf("root:%s", zBranch); } if( zTo==0 || againstUndo ){ db_must_be_within_tree(); }else if( zFrom==0 ){ fossil_fatal("must use --from if --to is present"); }else{ db_find_and_open_repository(0, 0); } if( !isInternDiff ){ zDiffCmd = diff_command_external(isGDiff); } zBinGlob = diff_get_binary_glob(); fIncludeBinary = diff_include_binary_files(); determine_exec_relative_option(1); verify_all_options(); if( againstUndo ){ if( db_lget_int("undo_available",0)==0 ){ fossil_print("No undo or redo is available\n"); return; } if( g.argc>=3 ){ int i; for(i=2; i<g.argc; i++){ diff_one_against_undo(zDiffCmd, zBinGlob, fIncludeBinary, diffFlags, g.argv[i]); } }else{ diff_all_against_undo(zDiffCmd, zBinGlob, fIncludeBinary, diffFlags); } }else if( zTo==0 ){ if( g.argc>=3 ){ int i; for(i=2; i<g.argc; i++){ diff_one_against_disk(zFrom, zDiffCmd, zBinGlob, fIncludeBinary, diffFlags, g.argv[i]); } }else{ diff_all_against_disk(zFrom, zDiffCmd, zBinGlob, fIncludeBinary, diffFlags); } }else{ if( g.argc>=3 ){ int i; for(i=2; i<g.argc; i++){ diff_one_two_versions(zFrom, zTo, zDiffCmd, zBinGlob, fIncludeBinary, diffFlags, g.argv[i]); } }else{ diff_all_two_versions(zFrom, zTo, zDiffCmd, zBinGlob, fIncludeBinary, diffFlags); } } } |
︙ | ︙ |
Changes to src/doc.c.
︙ | ︙ | |||
158 159 160 161 162 163 164 | { "kar", 3, "audio/midi" }, { "latex", 5, "application/x-latex" }, { "lha", 3, "application/octet-stream" }, { "lsp", 3, "application/x-lisp" }, { "lzh", 3, "application/octet-stream" }, { "m", 1, "text/plain" }, { "m3u", 3, "audio/x-mpegurl" }, | | > | 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 | { "kar", 3, "audio/midi" }, { "latex", 5, "application/x-latex" }, { "lha", 3, "application/octet-stream" }, { "lsp", 3, "application/x-lisp" }, { "lzh", 3, "application/octet-stream" }, { "m", 1, "text/plain" }, { "m3u", 3, "audio/x-mpegurl" }, { "man", 3, "text/plain" }, { "markdown", 8, "text/x-markdown" }, { "md", 2, "text/x-markdown" }, { "me", 2, "application/x-troff-me" }, { "mesh", 4, "model/mesh" }, { "mid", 3, "audio/midi" }, { "midi", 4, "audio/midi" }, { "mif", 3, "application/x-mif" }, { "mime", 4, "www/mime" }, { "mkd", 3, "text/x-markdown" }, { "mov", 3, "video/quicktime" }, { "movie", 5, "video/x-sgi-movie" }, { "mp2", 3, "audio/mpeg" }, { "mp3", 3, "audio/mpeg" }, { "mp4", 3, "video/mp4" }, { "mpe", 3, "video/mpeg" }, { "mpeg", 4, "video/mpeg" }, { "mpg", 3, "video/mpeg" }, { "mpga", 4, "audio/mpeg" }, { "ms", 2, "application/x-troff-ms" }, { "msh", 3, "model/mesh" }, { "n", 1, "text/plain" }, { "nc", 2, "application/x-netcdf" }, { "oda", 3, "application/oda" }, { "odp", 3, "application/vnd.oasis.opendocument.presentation" }, { "ods", 3, "application/vnd.oasis.opendocument.spreadsheet" }, { "odt", 3, "application/vnd.oasis.opendocument.text" }, { "ogg", 3, "application/ogg" }, { "ogm", 3, "application/ogg" }, |
︙ | ︙ | |||
542 543 544 545 546 547 548 | Blob filebody; /* Content of the documentation file */ Blob title; /* Document title */ int nMiss = (-1); /* Failed attempts to find the document */ static const char *const azSuffix[] = { "index.html", "index.wiki", "index.md" #ifdef FOSSIL_ENABLE_TH1_DOCS , "index.th1" | | | 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 | Blob filebody; /* Content of the documentation file */ Blob title; /* Document title */ int nMiss = (-1); /* Failed attempts to find the document */ static const char *const azSuffix[] = { "index.html", "index.wiki", "index.md" #ifdef FOSSIL_ENABLE_TH1_DOCS , "index.th1" #endif }; login_check_credentials(); if( !g.perm.Read ){ login_needed(g.anon.Read); return; } blob_init(&title, 0, 0); db_begin_transaction(); while( rid==0 && (++nMiss)<=ArraySize(azSuffix) ){ |
︙ | ︙ |
Changes to src/http_transport.c.
︙ | ︙ | |||
76 77 78 79 80 81 82 | } } /* ** Default SSH command */ #ifdef _WIN32 | | | | | 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | } } /* ** Default SSH command */ #ifdef _WIN32 static const char zDefaultSshCmd[] = "plink -ssh -T"; #else static const char zDefaultSshCmd[] = "ssh -e none -T"; #endif /* ** SSH initialization of the transport layer */ int transport_ssh_open(UrlData *pUrlData){ /* For SSH we need to create and run SSH fossil http ** to talk to the remote machine. */ char *zSsh; /* The base SSH command */ Blob zCmd; /* The SSH command */ char *zHost; /* The host name to contact */ int n; /* Size of prefix string */ socket_ssh_resolve_addr(pUrlData); zSsh = db_get("ssh-command", zDefaultSshCmd); blob_init(&zCmd, zSsh, -1); |
︙ | ︙ |
Changes to src/json.c.
︙ | ︙ | |||
695 696 697 698 699 700 701 | */ void json_main_bootstrap(){ cson_value * v; assert( (NULL == g.json.gc.v) && "json_main_bootstrap() was called twice!" ); g.json.timerId = fossil_timer_start(); | | | 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 | */ void json_main_bootstrap(){ cson_value * v; assert( (NULL == g.json.gc.v) && "json_main_bootstrap() was called twice!" ); g.json.timerId = fossil_timer_start(); /* g.json.gc is our "garbage collector" - where we put JSON values which need a long lifetime but don't have a logical parent to put them in. */ v = cson_value_new_array(); g.json.gc.v = v; g.json.gc.a = cson_value_get_array(v); |
︙ | ︙ |
Changes to src/json_timeline.c.
︙ | ︙ | |||
324 325 326 327 328 329 330 | " (fid==0) AS isdel," " (SELECT name FROM filename WHERE fnid=mlink.fnid) AS name," " blob.uuid as uuid," " (SELECT uuid FROM blob WHERE rid=pid) as parent," " blob.size as size" " FROM mlink, blob" " WHERE mid=%d AND pid!=fid" | | | 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 | " (fid==0) AS isdel," " (SELECT name FROM filename WHERE fnid=mlink.fnid) AS name," " blob.uuid as uuid," " (SELECT uuid FROM blob WHERE rid=pid) as parent," " blob.size as size" " FROM mlink, blob" " WHERE mid=%d AND pid!=fid" " AND blob.rid=fid AND NOT mlink.isaux" " ORDER BY name /*sort*/", rid ); while( (SQLITE_ROW == db_step(&q)) ){ cson_value * rowV = cson_value_new_object(); cson_object * row = cson_value_get_object(rowV); int const isNew = db_column_int(&q,0); |
︙ | ︙ |
Changes to src/linenoise.c.
︙ | ︙ | |||
116 117 118 119 120 121 122 | #include <sys/types.h> #include <sys/ioctl.h> #include <unistd.h> #include "linenoise.h" #define LINENOISE_DEFAULT_HISTORY_MAX_LEN 100 #define LINENOISE_MAX_LINE 4096 | | | 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | #include <sys/types.h> #include <sys/ioctl.h> #include <unistd.h> #include "linenoise.h" #define LINENOISE_DEFAULT_HISTORY_MAX_LEN 100 #define LINENOISE_MAX_LINE 4096 static const char *unsupported_term[] = {"dumb","cons25","emacs",NULL}; static linenoiseCompletionCallback *completionCallback = NULL; static struct termios orig_termios; /* In order to restore at exit.*/ static int rawmode = 0; /* For atexit() function to check if restore is needed*/ static int mlmode = 0; /* Multi line mode. Default is single line. */ static int atexit_registered = 0; /* Register atexit just 1 time. */ static int history_max_len = LINENOISE_DEFAULT_HISTORY_MAX_LEN; |
︙ | ︙ | |||
918 919 920 921 922 923 924 | nread = read(STDIN_FILENO,&c,1); if (nread <= 0) continue; memmove(quit,quit+1,sizeof(quit)-1); /* shift string to left. */ quit[sizeof(quit)-1] = c; /* Insert current char on the right. */ if (memcmp(quit,"quit",sizeof(quit)) == 0) break; printf("'%c' %02x (%d) (type quit to exit)\n", | | | 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 | nread = read(STDIN_FILENO,&c,1); if (nread <= 0) continue; memmove(quit,quit+1,sizeof(quit)-1); /* shift string to left. */ quit[sizeof(quit)-1] = c; /* Insert current char on the right. */ if (memcmp(quit,"quit",sizeof(quit)) == 0) break; printf("'%c' %02x (%d) (type quit to exit)\n", isprint((int)c) ? c : '?', (int)c, (int)c); printf("\r"); /* Go left edge manually, we are in raw mode. */ fflush(stdout); } disableRawMode(STDIN_FILENO); } /* This function calls the line editing function linenoiseEdit() using |
︙ | ︙ |
Changes to src/login.c.
︙ | ︙ | |||
214 215 216 217 218 219 220 | char *zSha1Pw = sha1_shared_secret(zPasswd, zUsername, 0); int const uid = db_int(0, "SELECT uid FROM user" " WHERE login=%Q" " AND length(cap)>0 AND length(pw)>0" " AND login NOT IN ('anonymous','nobody','developer','reader')" | | > > | 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 | char *zSha1Pw = sha1_shared_secret(zPasswd, zUsername, 0); int const uid = db_int(0, "SELECT uid FROM user" " WHERE login=%Q" " AND length(cap)>0 AND length(pw)>0" " AND login NOT IN ('anonymous','nobody','developer','reader')" " AND (pw=%Q OR (length(pw)<>40 AND pw=%Q))" " AND (info NOT LIKE '%%expires 20%%'" " OR substr(info,instr(lower(info),'expires')+8,10)>datetime('now'))", zUsername, zSha1Pw, zPasswd ); free(zSha1Pw); return uid; } /* |
︙ | ︙ |
Changes to src/main.c.
︙ | ︙ | |||
876 877 878 879 880 881 882 | break; } } return zReturn; } /* | | | 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 | break; } } return zReturn; } /* ** Look for multiple occurrences of a command-line option with the ** corresponding argument. ** ** Return a malloc allocated array of pointers to the arguments. ** ** pnUsedArgs is used to store the number of matched arguments. ** ** Caller is responsible to free allocated memory. |
︙ | ︙ | |||
1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 | fossil_print("zlib %s, loaded %s\n", ZLIB_VERSION, zlibVersion()); #endif #if defined(FOSSIL_ENABLE_SSL) fossil_print("SSL (%s)\n", SSLeay_version(SSLEAY_VERSION)); #endif #if defined(FOSSIL_ENABLE_LEGACY_MV_RM) fossil_print("LEGACY_MV_RM\n"); #endif #if defined(FOSSIL_ENABLE_TH1_DOCS) fossil_print("TH1_DOCS\n"); #endif #if defined(FOSSIL_ENABLE_TH1_HOOKS) fossil_print("TH1_HOOKS\n"); #endif | > > > | 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 | fossil_print("zlib %s, loaded %s\n", ZLIB_VERSION, zlibVersion()); #endif #if defined(FOSSIL_ENABLE_SSL) fossil_print("SSL (%s)\n", SSLeay_version(SSLEAY_VERSION)); #endif #if defined(FOSSIL_ENABLE_LEGACY_MV_RM) fossil_print("LEGACY_MV_RM\n"); #endif #if defined(FOSSIL_ENABLE_EXEC_REL_PATHS) fossil_print("EXEC_REL_PATHS\n"); #endif #if defined(FOSSIL_ENABLE_TH1_DOCS) fossil_print("TH1_DOCS\n"); #endif #if defined(FOSSIL_ENABLE_TH1_HOOKS) fossil_print("TH1_HOOKS\n"); #endif |
︙ | ︙ |
Changes to src/main.mk.
︙ | ︙ | |||
476 477 478 479 480 481 482 | -DSQLITE_ENABLE_LOCKING_STYLE=0 \ -DSQLITE_THREADSAFE=0 \ -DSQLITE_DEFAULT_FILE_FORMAT=4 \ -DSQLITE_OMIT_DEPRECATED \ -DSQLITE_ENABLE_EXPLAIN_COMMENTS \ -DSQLITE_ENABLE_FTS4 \ -DSQLITE_ENABLE_FTS3_PARENTHESIS \ | | > > | 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 | -DSQLITE_ENABLE_LOCKING_STYLE=0 \ -DSQLITE_THREADSAFE=0 \ -DSQLITE_DEFAULT_FILE_FORMAT=4 \ -DSQLITE_OMIT_DEPRECATED \ -DSQLITE_ENABLE_EXPLAIN_COMMENTS \ -DSQLITE_ENABLE_FTS4 \ -DSQLITE_ENABLE_FTS3_PARENTHESIS \ -DSQLITE_ENABLE_DBSTAT_VTAB \ -DSQLITE_ENABLE_JSON1 \ -DSQLITE_ENABLE_FTS5 # Setup the options used to compile the included SQLite shell. SHELL_OPTIONS = -Dmain=sqlite3_shell \ -DSQLITE_OMIT_LOAD_EXTENSION=1 \ -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) \ -DSQLITE_SHELL_DBNAME_PROC=fossil_open |
︙ | ︙ |
Changes to src/makemake.tcl.
︙ | ︙ | |||
159 160 161 162 163 164 165 166 167 168 169 170 171 172 | -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_DBSTAT_VTAB } #lappend SQLITE_OPTIONS -DSQLITE_ENABLE_FTS3=1 #lappend SQLITE_OPTIONS -DSQLITE_ENABLE_STAT4 #lappend SQLITE_OPTIONS -DSQLITE_WIN32_NO_ANSI #lappend SQLITE_OPTIONS -DSQLITE_WINNT_MAX_PATH_CHARS=4096 # Options used to compile the included SQLite shell. | > > | 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS5 } #lappend SQLITE_OPTIONS -DSQLITE_ENABLE_FTS3=1 #lappend SQLITE_OPTIONS -DSQLITE_ENABLE_STAT4 #lappend SQLITE_OPTIONS -DSQLITE_WIN32_NO_ANSI #lappend SQLITE_OPTIONS -DSQLITE_WINNT_MAX_PATH_CHARS=4096 # Options used to compile the included SQLite shell. |
︙ | ︙ | |||
501 502 503 504 505 506 507 508 509 510 511 512 513 514 | # # FOSSIL_ENABLE_SSL = 1 #### Automatically build OpenSSL when building Fossil (causes rebuild # issues when building incrementally). # # FOSSIL_BUILD_SSL = 1 #### Enable legacy treatment of mv/rm (skip checkout files) # # FOSSIL_ENABLE_LEGACY_MV_RM = 1 #### Enable TH1 scripts in embedded documentation files # | > > > > | 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 | # # FOSSIL_ENABLE_SSL = 1 #### Automatically build OpenSSL when building Fossil (causes rebuild # issues when building incrementally). # # FOSSIL_BUILD_SSL = 1 #### Enable relative paths in external diff/gdiff # # FOSSIL_ENABLE_EXEC_REL_PATHS = 1 #### Enable legacy treatment of mv/rm (skip checkout files) # # FOSSIL_ENABLE_LEGACY_MV_RM = 1 #### Enable TH1 scripts in embedded documentation files # |
︙ | ︙ | |||
706 707 708 709 710 711 712 713 714 715 716 717 718 719 | endif # With HTTPS support ifdef FOSSIL_ENABLE_SSL TCC += -DFOSSIL_ENABLE_SSL=1 RCC += -DFOSSIL_ENABLE_SSL=1 endif # With legacy treatment of mv/rm ifdef FOSSIL_ENABLE_LEGACY_MV_RM TCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1 RCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1 endif | > > > > > > | 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 | endif # With HTTPS support ifdef FOSSIL_ENABLE_SSL TCC += -DFOSSIL_ENABLE_SSL=1 RCC += -DFOSSIL_ENABLE_SSL=1 endif # With relative paths in external diff/gdiff ifdef FOSSIL_ENABLE_EXEC_REL_PATHS TCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1 RCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1 endif # With legacy treatment of mv/rm ifdef FOSSIL_ENABLE_LEGACY_MV_RM TCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1 RCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1 endif |
︙ | ︙ | |||
1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 | FOSSIL_BUILD_ZLIB = 1 !endif # Link everything except SQLite dynamically? !ifndef FOSSIL_DYNAMIC_BUILD FOSSIL_DYNAMIC_BUILD = 0 !endif # Enable the JSON API? !ifndef FOSSIL_ENABLE_JSON FOSSIL_ENABLE_JSON = 0 !endif # Enable legacy treatment of the mv/rm commands? | > > > > > | 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 | FOSSIL_BUILD_ZLIB = 1 !endif # Link everything except SQLite dynamically? !ifndef FOSSIL_DYNAMIC_BUILD FOSSIL_DYNAMIC_BUILD = 0 !endif # Enable relative paths in external diff/gdiff? !ifndef FOSSIL_ENABLE_EXEC_REL_PATHS FOSSIL_ENABLE_EXEC_REL_PATHS = 0 !endif # Enable the JSON API? !ifndef FOSSIL_ENABLE_JSON FOSSIL_ENABLE_JSON = 0 !endif # Enable legacy treatment of the mv/rm commands? |
︙ | ︙ | |||
1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 | !if $(FOSSIL_ENABLE_SSL)!=0 TCC = $(TCC) /DFOSSIL_ENABLE_SSL=1 RCC = $(RCC) /DFOSSIL_ENABLE_SSL=1 LIBS = $(LIBS) $(SSLLIB) LIBDIR = $(LIBDIR) /LIBPATH:$(SSLLIBDIR) !endif !if $(FOSSIL_ENABLE_LEGACY_MV_RM)!=0 TCC = $(TCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1 RCC = $(RCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1 !endif !if $(FOSSIL_ENABLE_TH1_DOCS)!=0 | > > > > > | 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 | !if $(FOSSIL_ENABLE_SSL)!=0 TCC = $(TCC) /DFOSSIL_ENABLE_SSL=1 RCC = $(RCC) /DFOSSIL_ENABLE_SSL=1 LIBS = $(LIBS) $(SSLLIB) LIBDIR = $(LIBDIR) /LIBPATH:$(SSLLIBDIR) !endif !if $(FOSSIL_ENABLE_EXEC_REL_PATHS)!=0 TCC = $(TCC) /DFOSSIL_ENABLE_EXEC_REL_PATHS=1 RCC = $(RCC) /DFOSSIL_ENABLE_EXEC_REL_PATHS=1 !endif !if $(FOSSIL_ENABLE_LEGACY_MV_RM)!=0 TCC = $(TCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1 RCC = $(RCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1 !endif !if $(FOSSIL_ENABLE_TH1_DOCS)!=0 |
︙ | ︙ |
Changes to src/markdown.md.
1 2 | # Markdown formatting rules | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | # Markdown formatting rules In addition to its native Wiki formatting syntax, Fossil supports Markdown syntax as specified by [John Gruber's original Markdown implementation](http://daringfireball.net/projects/markdown/). For lots of examples - not repeated here - please refer to its [syntax description](http://daringfireball.net/projects/markdown/syntax), of which the page you are reading is an extract. This page itself uses Markdown formatting. ## Summary - Block elements * A **paragraph** is a group of consecutive lines. Paragraphs are separated by blank lines. * A **Header** is a line of text underlined with equal signs or hyphens, or prefixed by a number of hash marks. * **Block quotes** are blocks of text prefixed by '>'. * **Ordered list** items are prefixed by a number and a period. **Unordered list** items are prefixed by a hyphen, asterisk or plus sign. Prefix and item text are separated by whitespace. * **Code blocks** are formed by lines of text (possibly including empty lines) prefixed by at least 4 spaces or a tab. * A **horizontal rule** is a line consisting of 3 or more asterisks, hyphens or underscores, with optional whitespace between them. - Span elements * 3 types of **links** exist: - **automatic links** are URLs or email addresses enclosed in angle brackets ('<' and '>'), and are displayed as such. - **inline links** consist of the displayed link text in square brackets ('[' and ']'), followed by the link target in parentheses. - **reference links** separate _link instance_ from _link definition_. A link instance consists of the displayed link text in square brackets, followed by a link definition name in square brackets. The corresponding link definition can occur anywhere on the page, and consists of the link definition name in square brackets followed by a colon, whitespace and the link target. * **Emphasis** can be given by wrapping text in one or two asterisks or underscores - use one for HTML `<em>`, and two for `<strong>` emphasis. * A **code span** is text wrapped in backticks ('`'). * **Images** use a syntax much like inline or reference links, but with alt attribute text ('img alt=...') instead of link text, and the first pair of square brackets in an image instance prefixed by an exclamation mark. - **Inline HTML** is mostly interpreted automatically. - **Escaping** Markdown punctuation characters is done by prefixing them by a backslash ('\\'). |
︙ | ︙ | |||
86 87 88 89 90 91 92 | level. ### Block quotes Not every line in a paragraph needs to be prefixed by '>' in order to make it a block quote, only the first line. | | | | | | 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | level. ### Block quotes Not every line in a paragraph needs to be prefixed by '>' in order to make it a block quote, only the first line. Block quoted paragraphs can be nested by using multiple '>' characters as prefix. Within a block quote, Markdown formatting (e.g. lists, emphasis) still works as normal. ### Lists A list item prefix need not occur first on its line; up to 3 leading spaces are allowed (4 spaces would make a code block out of the following text). For unordered lists, asterisks, hyphens and plus signs can be used interchangeably. For ordered lists, arbitrary numbers can be used as part of an item prefix; the items will be renumbered during rendering. However, future implementations may demand that the number used for the first item in a list indicates an offset to be used for subsequent items. For list items spanning multiple lines, subsequent lines can be indented using an arbitrary amount of whitespace. List items will be wrapped in HTML `<p>` tags if they are separated by blank lines. A list item may span multiple paragraphs. At least the first line of each such paragraph must be indented using at least 4 spaces or a tab character. Block quotes within list items must have their '>' delimiters indented using 4 up to 7 spaces. Code blocks within list items need to be indented _twice_, that is, using 8 spaces or 2 tab characters. |
︙ | ︙ | |||
129 130 131 132 133 134 135 | Regular Markdown syntax is not processed within code blocks. ### Links #### Automatic links | | | | | | | | | 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | Regular Markdown syntax is not processed within code blocks. ### Links #### Automatic links When rendering automatic links to email addresses, HTML encoding obfuscation is used to prevent some spambots from harvesting. #### Inline links Links to resources on the same server can use relative paths (i.e. can start with a '/'). An optional title for the link (e.g. to have mouseover text in the browser) may be given behind the link target but within the parentheses, in single and double quotes, and separated from the link target by whitespace. #### Reference links > Each reference link consists of > > - one or more _link instances_ at appropriate locations in the page text > - a single _link definition_ at an arbitrary location on the page > > During rendering, each link instance is resolved, and the corresponding definition is > filled in. No separate link definition clauses occur in the rendered output. > > There are 3 fields involved in link instances and definitions: > > - link text (i.e. the text that is displayed at the resulting link) > - link definition name (i.e. an unique ID binding link instances to link definition) > - link target (a target URL for the link) Multiple link instances may reference the same link definition using its link definition |
︙ | ︙ | |||
195 196 197 198 199 200 201 | side of emphasis start or end punctuation characters. ### Code spans To include a literal backtick character in a code span, use multiple backticks as opening and closing delimiters. | | | | | 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 | side of emphasis start or end punctuation characters. ### Code spans To include a literal backtick character in a code span, use multiple backticks as opening and closing delimiters. Whitespace may exist immediately after the opening delimiter and before the closing delimiter of a code span, to allow for code fragments starting or ending with a backtick. Within a code span - like within a code block - angle brackets and ampersands are automatically encoded to make including HTML fragments easier. ### Images If necessary, HTML must be used to specify image dimensions. Markdown has no provision for this. ### Inline HTML Start and end tags of a HTML block level construct (`<div>`, `<table>` etc) must be separated from surrounding context using blank lines, and must both occur at the start of a line. No extra unwanted `<p>` HTML tags are added around HTML block level tags. Markdown formatting within HTML block level tags is not processed; however, formatting within span level tags (e.g. `<mark>`) is processed normally. ### Escaping Markdown punctuation The following punctuation characters can be escaped using backslash: - \\ backslash |
︙ | ︙ |
Changes to src/merge.c.
︙ | ︙ | |||
224 225 226 227 228 229 230 231 232 233 234 235 236 237 | zPivot = find_option("baseline",0,1); verify_all_options(); db_must_be_within_tree(); if( zBinGlob==0 ) zBinGlob = db_get("binary-glob",0); vid = db_lget_int("checkout", 0); if( vid==0 ){ fossil_fatal("nothing is checked out"); } /* Find mid, the artifactID of the version to be merged into the current ** check-out */ if( g.argc==3 ){ /* Mid is specified as an argument on the command-line */ mid = name_to_typed_rid(g.argv[2], "ci"); | > > > > > > | 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 | zPivot = find_option("baseline",0,1); verify_all_options(); db_must_be_within_tree(); if( zBinGlob==0 ) zBinGlob = db_get("binary-glob",0); vid = db_lget_int("checkout", 0); if( vid==0 ){ fossil_fatal("nothing is checked out"); } if( !dryRunFlag ){ if( autosync_loop(SYNC_PULL + SYNC_VERBOSE*verboseFlag, db_get_int("autosync-tries", 1)) ){ fossil_fatal("Cannot proceed with merge"); } } /* Find mid, the artifactID of the version to be merged into the current ** check-out */ if( g.argc==3 ){ /* Mid is specified as an argument on the command-line */ mid = name_to_typed_rid(g.argv[2], "ci"); |
︙ | ︙ |
Changes to src/rebuild.c.
︙ | ︙ | |||
531 532 533 534 535 536 537 538 539 540 541 542 543 544 | ** --deanalyze Remove ANALYZE tables from the database ** --force Force the rebuild to complete even if errors are seen ** --ifneeded Only do the rebuild if it would change the schema version ** --index Always add in the full-text search index ** --noverify Skip the verification of changes to the BLOB table ** --noindex Always omit the full-text search index ** --pagesize N Set the database pagesize to N. (512..65536 and power of 2) ** --randomize Scan artifacts in a random order ** --stats Show artifact statistics after rebuilding ** --vacuum Run VACUUM on the database after rebuilding ** --wal Set Write-Ahead-Log journalling mode on the database ** ** See also: deconstruct, reconstruct */ | > | 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 | ** --deanalyze Remove ANALYZE tables from the database ** --force Force the rebuild to complete even if errors are seen ** --ifneeded Only do the rebuild if it would change the schema version ** --index Always add in the full-text search index ** --noverify Skip the verification of changes to the BLOB table ** --noindex Always omit the full-text search index ** --pagesize N Set the database pagesize to N. (512..65536 and power of 2) ** --quiet Only show output if there are errors ** --randomize Scan artifacts in a random order ** --stats Show artifact statistics after rebuilding ** --vacuum Run VACUUM on the database after rebuilding ** --wal Set Write-Ahead-Log journalling mode on the database ** ** See also: deconstruct, reconstruct */ |
︙ | ︙ |
Changes to src/setup.c.
︙ | ︙ | |||
326 327 328 329 330 331 332 | const char *zId, *zLogin, *zInfo, *zCap, *zPw; const char *zGroup; const char *zOldLogin; int doWrite; int uid, i; int higherUser = 0; /* True if user being edited is SETUP and the */ /* user doing the editing is ADMIN. Disallow editing */ | | | 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 | const char *zId, *zLogin, *zInfo, *zCap, *zPw; const char *zGroup; const char *zOldLogin; int doWrite; int uid, i; int higherUser = 0; /* True if user being edited is SETUP and the */ /* user doing the editing is ADMIN. Disallow editing */ const char *inherit[128]; int a[128]; const char *oa[128]; /* Must have ADMIN privileges to access this page */ login_check_credentials(); if( !g.perm.Admin ){ login_needed(0); return; } |
︙ | ︙ | |||
904 905 906 907 908 909 910 | ** Generate an entry box for an attribute. */ void entry_attribute( const char *zLabel, /* The text label on the entry box */ int width, /* Width of the entry box */ const char *zVar, /* The corresponding row in the VAR table */ const char *zQParm, /* The query parameter */ | | | 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 | ** Generate an entry box for an attribute. */ void entry_attribute( const char *zLabel, /* The text label on the entry box */ int width, /* Width of the entry box */ const char *zVar, /* The corresponding row in the VAR table */ const char *zQParm, /* The query parameter */ const char *zDflt, /* Default value if VAR table entry does not exist */ int disabled /* 1 if disabled */ ){ const char *zVal = db_get(zVar, zDflt); const char *zQ = P(zQParm); if( zQ && fossil_strcmp(zQ,zVal)!=0 ){ const int nZQ = (int)strlen(zQ); login_verify_csrf_secret(); |
︙ | ︙ | |||
936 937 938 939 940 941 942 | int rows, /* Rows in the textarea */ int cols, /* Columns in the textarea */ const char *zVar, /* The corresponding row in the VAR table */ const char *zQP, /* The query parameter */ const char *zDflt, /* Default value if VAR table entry does not exist */ int disabled /* 1 if the textarea should not be editable */ ){ | | | 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 | int rows, /* Rows in the textarea */ int cols, /* Columns in the textarea */ const char *zVar, /* The corresponding row in the VAR table */ const char *zQP, /* The query parameter */ const char *zDflt, /* Default value if VAR table entry does not exist */ int disabled /* 1 if the textarea should not be editable */ ){ const char *z = db_get(zVar, zDflt); const char *zQ = P(zQP); if( zQ && !disabled && fossil_strcmp(zQ,z)!=0){ const int nZQ = (int)strlen(zQ); login_verify_csrf_secret(); db_set(zVar, zQ, 0); admin_log("Set textarea_attribute %Q to: %.*s%s", zVar, 20, zQ, (nZQ>20 ? "..." : "")); |
︙ | ︙ | |||
970 971 972 973 974 975 976 | const char *zLabel, /* The text label on the menu */ const char *zVar, /* The corresponding row in the VAR table */ const char *zQP, /* The query parameter */ const char *zDflt, /* Default value if VAR table entry does not exist */ int nChoice, /* Number of choices */ const char *const *azChoice /* Choices. 2 per choice: (VAR value, Display) */ ){ | | | 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 | const char *zLabel, /* The text label on the menu */ const char *zVar, /* The corresponding row in the VAR table */ const char *zQP, /* The query parameter */ const char *zDflt, /* Default value if VAR table entry does not exist */ int nChoice, /* Number of choices */ const char *const *azChoice /* Choices. 2 per choice: (VAR value, Display) */ ){ const char *z = db_get(zVar, zDflt); const char *zQ = P(zQP); int i; if( zQ && fossil_strcmp(zQ,z)!=0){ const int nZQ = (int)strlen(zQ); login_verify_csrf_secret(); db_set(zVar, zQ, 0); admin_log("Set multiple_choice_attribute %Q to: %.*s%s", |
︙ | ︙ |
Changes to src/shell.c.
︙ | ︙ | |||
2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 | sqlite3_free(zSql); fprintf(p->out, "%-20s %d\n", aQuery[i].zName, val); } sqlite3_free(zSchemaTab); return 0; } /* ** If an input line begins with "." then invoke this routine to ** process that line. ** ** Return 1 on error, 2 to exit, and 0 otherwise. */ | > > > > > > > > > > > > > > > > | 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 | sqlite3_free(zSql); fprintf(p->out, "%-20s %d\n", aQuery[i].zName, val); } sqlite3_free(zSchemaTab); return 0; } /* ** Print the current sqlite3_errmsg() value to stderr and return 1. */ static int shellDatabaseError(sqlite3 *db){ const char *zErr = sqlite3_errmsg(db); fprintf(stderr, "Error: %s\n", zErr); return 1; } /* ** Print an out-of-memory message to stderr and return 1. */ static int shellNomemError(void){ fprintf(stderr, "Error: out of memory\n"); return 1; } /* ** If an input line begins with "." then invoke this routine to ** process that line. ** ** Return 1 on error, 2 to exit, and 0 otherwise. */ |
︙ | ︙ | |||
3709 3710 3711 3712 3713 3714 3715 | sqlite3_stmt *pStmt; char **azResult; int nRow, nAlloc; char *zSql = 0; int ii; open_db(p, 0); rc = sqlite3_prepare_v2(p->db, "PRAGMA database_list", -1, &pStmt, 0); | | > > > > | | > | | > > | > > > | | > > | > > | > > > > | > | 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 | sqlite3_stmt *pStmt; char **azResult; int nRow, nAlloc; char *zSql = 0; int ii; open_db(p, 0); rc = sqlite3_prepare_v2(p->db, "PRAGMA database_list", -1, &pStmt, 0); if( rc ) return shellDatabaseError(p->db); /* Create an SQL statement to query for the list of tables in the ** main and all attached databases where the table name matches the ** LIKE pattern bound to variable "?1". */ zSql = sqlite3_mprintf( "SELECT name FROM sqlite_master" " WHERE type IN ('table','view')" " AND name NOT LIKE 'sqlite_%%'" " AND name LIKE ?1"); while( zSql && sqlite3_step(pStmt)==SQLITE_ROW ){ const char *zDbName = (const char*)sqlite3_column_text(pStmt, 1); if( zDbName==0 || strcmp(zDbName,"main")==0 ) continue; if( strcmp(zDbName,"temp")==0 ){ zSql = sqlite3_mprintf( "%z UNION ALL " "SELECT 'temp.' || name FROM sqlite_temp_master" " WHERE type IN ('table','view')" " AND name NOT LIKE 'sqlite_%%'" " AND name LIKE ?1", zSql); }else{ zSql = sqlite3_mprintf( "%z UNION ALL " "SELECT '%q.' || name FROM \"%w\".sqlite_master" " WHERE type IN ('table','view')" " AND name NOT LIKE 'sqlite_%%'" " AND name LIKE ?1", zSql, zDbName, zDbName); } } rc = sqlite3_finalize(pStmt); if( zSql && rc==SQLITE_OK ){ zSql = sqlite3_mprintf("%z ORDER BY 1", zSql); if( zSql ) rc = sqlite3_prepare_v2(p->db, zSql, -1, &pStmt, 0); } sqlite3_free(zSql); if( !zSql ) return shellNomemError(); if( rc ) return shellDatabaseError(p->db); /* Run the SQL statement prepared by the above block. Store the results ** as an array of nul-terminated strings in azResult[]. */ nRow = nAlloc = 0; azResult = 0; if( nArg>1 ){ sqlite3_bind_text(pStmt, 1, azArg[1], -1, SQLITE_TRANSIENT); }else{ sqlite3_bind_text(pStmt, 1, "%", -1, SQLITE_STATIC); } while( sqlite3_step(pStmt)==SQLITE_ROW ){ if( nRow>=nAlloc ){ char **azNew; int n2 = nAlloc*2 + 10; azNew = sqlite3_realloc64(azResult, sizeof(azResult[0])*n2); if( azNew==0 ){ rc = shellNomemError(); break; } nAlloc = n2; azResult = azNew; } azResult[nRow] = sqlite3_mprintf("%s", sqlite3_column_text(pStmt, 0)); if( 0==azResult[nRow] ){ rc = shellNomemError(); break; } nRow++; } if( sqlite3_finalize(pStmt)!=SQLITE_OK ){ rc = shellDatabaseError(p->db); } /* Pretty-print the contents of array azResult[] to the output */ if( rc==0 && nRow>0 ){ int len, maxlen = 0; int i, j; int nPrintCol, nPrintRow; for(i=0; i<nRow; i++){ len = strlen30(azResult[i]); if( len>maxlen ) maxlen = len; } nPrintCol = 80/(maxlen+2); if( nPrintCol<1 ) nPrintCol = 1; nPrintRow = (nRow + nPrintCol - 1)/nPrintCol; for(i=0; i<nPrintRow; i++){ for(j=i; j<nRow; j+=nPrintRow){ char *zSp = j<nPrintRow ? "" : " "; fprintf(p->out, "%s%-*s", zSp, maxlen, azResult[j] ? azResult[j]:""); } fprintf(p->out, "\n"); } } for(ii=0; ii<nRow; ii++) sqlite3_free(azResult[ii]); sqlite3_free(azResult); }else if( c=='t' && n>=8 && strncmp(azArg[0], "testctrl", n)==0 && nArg>=2 ){ static const struct { const char *zCtrlName; /* Name of a test-control option */ |
︙ | ︙ | |||
4248 4249 4250 4251 4252 4253 4254 | } } if( nSql ){ if( !_all_whitespace(zSql) ){ fprintf(stderr, "Error: incomplete SQL: %s\n", zSql); errCnt++; } | < > | 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 | } } if( nSql ){ if( !_all_whitespace(zSql) ){ fprintf(stderr, "Error: incomplete SQL: %s\n", zSql); errCnt++; } } free(zSql); free(zLine); return errCnt>0; } /* ** Return a pathname which is the user's home directory. A ** 0 return indicates an error of some kind. |
︙ | ︙ |
Changes to src/sitemap.c.
︙ | ︙ | |||
113 114 115 116 117 118 119 120 121 122 123 124 125 126 | @ <li>%z(href("%R/hash-collisions"))Collisions on SHA1 hash @ prefixes</a></li> if( g.perm.Admin ){ @ <li>%z(href("%R/urllist"))List of URLs used to access @ this repository</a></li> } @ <li>%z(href("%R/bloblist"))List of Artifacts</a></li> @ </ul> @ </li> } @ <li>On-line Documentation @ <ul> @ <li>%z(href("%R/help"))List of All Commands and Web Pages</a></li> @ <li>%z(href("%R/test-all-help"))All "help" text on a single page</a></li> | > | 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | @ <li>%z(href("%R/hash-collisions"))Collisions on SHA1 hash @ prefixes</a></li> if( g.perm.Admin ){ @ <li>%z(href("%R/urllist"))List of URLs used to access @ this repository</a></li> } @ <li>%z(href("%R/bloblist"))List of Artifacts</a></li> @ <li>%z(href("%R/timewarps"))List of "Timewarp" Check-ins</a></li> @ </ul> @ </li> } @ <li>On-line Documentation @ <ul> @ <li>%z(href("%R/help"))List of All Commands and Web Pages</a></li> @ <li>%z(href("%R/test-all-help"))All "help" text on a single page</a></li> |
︙ | ︙ | |||
135 136 137 138 139 140 141 | @ </ul></li> } @ <li>Test Pages @ <ul> if( g.perm.Admin || db_get_boolean("test_env_enable",0) ){ @ <li>%z(href("%R/test_env"))CGI Environment Test</a></li> } | < < < | 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | @ </ul></li> } @ <li>Test Pages @ <ul> if( g.perm.Admin || db_get_boolean("test_env_enable",0) ){ @ <li>%z(href("%R/test_env"))CGI Environment Test</a></li> } if( g.perm.Read ){ @ <li>%z(href("%R/test-rename-list"))List of file renames</a></li> } @ <li>%z(href("%R/hash-color-test"))Page to experiment with the automatic @ colors assigned to branch names</a> @ <li>%z(href("%R/test-captcha"))Random ASCII-art Captcha image</a></li> @ </ul></li> @ </ul></li> style_footer(); } |
Changes to src/skins.c.
︙ | ︙ | |||
71 72 73 74 75 76 77 | ** attributes of the skin that cannot be easily specified using CSS ** or that need to be known on the server-side. ** ** The following array holds the value for all known skin details. */ static struct SkinDetail { const char *zName; /* Name of the detail */ | | | 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | ** attributes of the skin that cannot be easily specified using CSS ** or that need to be known on the server-side. ** ** The following array holds the value for all known skin details. */ static struct SkinDetail { const char *zName; /* Name of the detail */ const char *zValue; /* Value of the detail */ } aSkinDetail[] = { { "timeline-arrowheads", "1" }, { "timeline-circle-nodes", "0" }, { "timeline-color-graph-lines", "0" }, { "white-foreground", "0" }, }; |
︙ | ︙ |
Changes to src/sqlite3.c.
more than 10,000 changes
Changes to src/sqlite3.h.
︙ | ︙ | |||
107 108 109 110 111 112 113 | ** string contains the date and time of the check-in (UTC) and an SHA1 ** hash of the entire source tree. ** ** See also: [sqlite3_libversion()], ** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite_version()] and [sqlite_source_id()]. */ | | | | | | 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | ** string contains the date and time of the check-in (UTC) and an SHA1 ** hash of the entire source tree. ** ** See also: [sqlite3_libversion()], ** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite_version()] and [sqlite_source_id()]. */ #define SQLITE_VERSION "3.9.1" #define SQLITE_VERSION_NUMBER 3009001 #define SQLITE_SOURCE_ID "2015-10-16 17:31:12 767c1727fec4ce11b83f25b3f1bfcfe68a2c8b02" /* ** CAPI3REF: Run-Time Library Version Numbers ** KEYWORDS: sqlite3_version, sqlite3_sourceid ** ** These interfaces provide the same information as the [SQLITE_VERSION], ** [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] C preprocessor macros ** but are associated with the library instead of the header file. ^(Cautious ** programmers might include assert() statements in their application to ** verify that values returned by these interfaces match the macros in ** the header, and thus ensure that the application is ** compiled with matching library and header files. ** ** <blockquote><pre> ** assert( sqlite3_libversion_number()==SQLITE_VERSION_NUMBER ); ** assert( strcmp(sqlite3_sourceid(),SQLITE_SOURCE_ID)==0 ); ** assert( strcmp(sqlite3_libversion(),SQLITE_VERSION)==0 ); ** </pre></blockquote>)^ |
︙ | ︙ | |||
370 371 372 373 374 375 376 | ** to an empty string, or a pointer that contains only whitespace and/or ** SQL comments, then no SQL statements are evaluated and the database ** is not changed. ** ** Restrictions: ** ** <ul> | | | 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 | ** to an empty string, or a pointer that contains only whitespace and/or ** SQL comments, then no SQL statements are evaluated and the database ** is not changed. ** ** Restrictions: ** ** <ul> ** <li> The application must ensure that the 1st parameter to sqlite3_exec() ** is a valid and open [database connection]. ** <li> The application must not close the [database connection] specified by ** the 1st parameter to sqlite3_exec() while sqlite3_exec() is running. ** <li> The application must not modify the SQL statement text passed into ** the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running. ** </ul> */ |
︙ | ︙ | |||
473 474 475 476 477 478 479 480 481 482 483 484 485 486 | #define SQLITE_IOERR_SHMLOCK (SQLITE_IOERR | (20<<8)) #define SQLITE_IOERR_SHMMAP (SQLITE_IOERR | (21<<8)) #define SQLITE_IOERR_SEEK (SQLITE_IOERR | (22<<8)) #define SQLITE_IOERR_DELETE_NOENT (SQLITE_IOERR | (23<<8)) #define SQLITE_IOERR_MMAP (SQLITE_IOERR | (24<<8)) #define SQLITE_IOERR_GETTEMPPATH (SQLITE_IOERR | (25<<8)) #define SQLITE_IOERR_CONVPATH (SQLITE_IOERR | (26<<8)) #define SQLITE_LOCKED_SHAREDCACHE (SQLITE_LOCKED | (1<<8)) #define SQLITE_BUSY_RECOVERY (SQLITE_BUSY | (1<<8)) #define SQLITE_BUSY_SNAPSHOT (SQLITE_BUSY | (2<<8)) #define SQLITE_CANTOPEN_NOTEMPDIR (SQLITE_CANTOPEN | (1<<8)) #define SQLITE_CANTOPEN_ISDIR (SQLITE_CANTOPEN | (2<<8)) #define SQLITE_CANTOPEN_FULLPATH (SQLITE_CANTOPEN | (3<<8)) #define SQLITE_CANTOPEN_CONVPATH (SQLITE_CANTOPEN | (4<<8)) | > | 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 | #define SQLITE_IOERR_SHMLOCK (SQLITE_IOERR | (20<<8)) #define SQLITE_IOERR_SHMMAP (SQLITE_IOERR | (21<<8)) #define SQLITE_IOERR_SEEK (SQLITE_IOERR | (22<<8)) #define SQLITE_IOERR_DELETE_NOENT (SQLITE_IOERR | (23<<8)) #define SQLITE_IOERR_MMAP (SQLITE_IOERR | (24<<8)) #define SQLITE_IOERR_GETTEMPPATH (SQLITE_IOERR | (25<<8)) #define SQLITE_IOERR_CONVPATH (SQLITE_IOERR | (26<<8)) #define SQLITE_IOERR_VNODE (SQLITE_IOERR | (27<<8)) #define SQLITE_LOCKED_SHAREDCACHE (SQLITE_LOCKED | (1<<8)) #define SQLITE_BUSY_RECOVERY (SQLITE_BUSY | (1<<8)) #define SQLITE_BUSY_SNAPSHOT (SQLITE_BUSY | (2<<8)) #define SQLITE_CANTOPEN_NOTEMPDIR (SQLITE_CANTOPEN | (1<<8)) #define SQLITE_CANTOPEN_ISDIR (SQLITE_CANTOPEN | (2<<8)) #define SQLITE_CANTOPEN_FULLPATH (SQLITE_CANTOPEN | (3<<8)) #define SQLITE_CANTOPEN_CONVPATH (SQLITE_CANTOPEN | (4<<8)) |
︙ | ︙ | |||
1362 1363 1364 1365 1366 1367 1368 | ** ** The sqlite3_config() interface is used to make global configuration ** changes to SQLite in order to tune SQLite to the specific needs of ** the application. The default configuration is recommended for most ** applications and so this routine is usually not necessary. It is ** provided to support rare applications with unusual needs. ** | | | | > > | 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 | ** ** The sqlite3_config() interface is used to make global configuration ** changes to SQLite in order to tune SQLite to the specific needs of ** the application. The default configuration is recommended for most ** applications and so this routine is usually not necessary. It is ** provided to support rare applications with unusual needs. ** ** <b>The sqlite3_config() interface is not threadsafe. The application ** must ensure that no other SQLite interfaces are invoked by other ** threads while sqlite3_config() is running.</b> ** ** The sqlite3_config() interface ** may only be invoked prior to library initialization using ** [sqlite3_initialize()] or after shutdown by [sqlite3_shutdown()]. ** ^If sqlite3_config() is called after [sqlite3_initialize()] and before ** [sqlite3_shutdown()] then it will return SQLITE_MISUSE. ** Note, however, that ^sqlite3_config() can be called as part of the ** implementation of an application-defined [sqlite3_os_init()]. ** |
︙ | ︙ | |||
3369 3370 3371 3372 3373 3374 3375 | /* ** CAPI3REF: Determine If A Prepared Statement Has Been Reset ** METHOD: sqlite3_stmt ** ** ^The sqlite3_stmt_busy(S) interface returns true (non-zero) if the ** [prepared statement] S has been stepped at least once using | | > | 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 | /* ** CAPI3REF: Determine If A Prepared Statement Has Been Reset ** METHOD: sqlite3_stmt ** ** ^The sqlite3_stmt_busy(S) interface returns true (non-zero) if the ** [prepared statement] S has been stepped at least once using ** [sqlite3_step(S)] but has neither run to completion (returned ** [SQLITE_DONE] from [sqlite3_step(S)]) nor ** been reset using [sqlite3_reset(S)]. ^The sqlite3_stmt_busy(S) ** interface returns false if S is a NULL pointer. If S is not a ** NULL pointer and is not a pointer to a valid [prepared statement] ** object, then the behavior is undefined and probably undesirable. ** ** This interface can be used in combination [sqlite3_next_stmt()] ** to locate all prepared statements associated with a database |
︙ | ︙ | |||
3622 3623 3624 3625 3626 3627 3628 | ** parameter to [sqlite3_bind_blob|sqlite3_bind()]. ^A zero ** is returned if no matching parameter is found. ^The parameter ** name must be given in UTF-8 even if the original statement ** was prepared from UTF-16 text using [sqlite3_prepare16_v2()]. ** ** See also: [sqlite3_bind_blob|sqlite3_bind()], ** [sqlite3_bind_parameter_count()], and | | | 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 | ** parameter to [sqlite3_bind_blob|sqlite3_bind()]. ^A zero ** is returned if no matching parameter is found. ^The parameter ** name must be given in UTF-8 even if the original statement ** was prepared from UTF-16 text using [sqlite3_prepare16_v2()]. ** ** See also: [sqlite3_bind_blob|sqlite3_bind()], ** [sqlite3_bind_parameter_count()], and ** [sqlite3_bind_parameter_name()]. */ SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName); /* ** CAPI3REF: Reset All Bindings On A Prepared Statement ** METHOD: sqlite3_stmt ** |
︙ | ︙ | |||
4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 | SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_value_text(sqlite3_value*); SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16(sqlite3_value*); SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16le(sqlite3_value*); SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16be(sqlite3_value*); SQLITE_API int SQLITE_STDCALL sqlite3_value_type(sqlite3_value*); SQLITE_API int SQLITE_STDCALL sqlite3_value_numeric_type(sqlite3_value*); /* ** CAPI3REF: Copy And Free SQL Values ** METHOD: sqlite3_value ** ** ^The sqlite3_value_dup(V) interface makes a copy of the [sqlite3_value] ** object D and returns a pointer to that copy. ^The [sqlite3_value] returned ** is a [protected sqlite3_value] object even if the input is not. | > > > > > > > > > > > > > > > > | 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 | SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_value_text(sqlite3_value*); SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16(sqlite3_value*); SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16le(sqlite3_value*); SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16be(sqlite3_value*); SQLITE_API int SQLITE_STDCALL sqlite3_value_type(sqlite3_value*); SQLITE_API int SQLITE_STDCALL sqlite3_value_numeric_type(sqlite3_value*); /* ** CAPI3REF: Finding The Subtype Of SQL Values ** METHOD: sqlite3_value ** ** The sqlite3_value_subtype(V) function returns the subtype for ** an [application-defined SQL function] argument V. The subtype ** information can be used to pass a limited amount of context from ** one SQL function to another. Use the [sqlite3_result_subtype()] ** routine to set the subtype for the return value of an SQL function. ** ** SQLite makes no use of subtype itself. It merely passes the subtype ** from the result of one [application-defined SQL function] into the ** input of another. */ SQLITE_API unsigned int SQLITE_STDCALL sqlite3_value_subtype(sqlite3_value*); /* ** CAPI3REF: Copy And Free SQL Values ** METHOD: sqlite3_value ** ** ^The sqlite3_value_dup(V) interface makes a copy of the [sqlite3_value] ** object D and returns a pointer to that copy. ^The [sqlite3_value] returned ** is a [protected sqlite3_value] object even if the input is not. |
︙ | ︙ | |||
4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 | SQLITE_API void SQLITE_STDCALL sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*)); SQLITE_API void SQLITE_STDCALL sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*)); SQLITE_API void SQLITE_STDCALL sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*)); SQLITE_API void SQLITE_STDCALL sqlite3_result_value(sqlite3_context*, sqlite3_value*); SQLITE_API void SQLITE_STDCALL sqlite3_result_zeroblob(sqlite3_context*, int n); SQLITE_API int SQLITE_STDCALL sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n); /* ** CAPI3REF: Define New Collating Sequences ** METHOD: sqlite3 ** ** ^These functions add, remove, or modify a [collation] associated ** with the [database connection] specified as the first argument. ** | > > > > > > > > > > > > > > > | 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 | SQLITE_API void SQLITE_STDCALL sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*)); SQLITE_API void SQLITE_STDCALL sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*)); SQLITE_API void SQLITE_STDCALL sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*)); SQLITE_API void SQLITE_STDCALL sqlite3_result_value(sqlite3_context*, sqlite3_value*); SQLITE_API void SQLITE_STDCALL sqlite3_result_zeroblob(sqlite3_context*, int n); SQLITE_API int SQLITE_STDCALL sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n); /* ** CAPI3REF: Setting The Subtype Of An SQL Function ** METHOD: sqlite3_context ** ** The sqlite3_result_subtype(C,T) function causes the subtype of ** the result from the [application-defined SQL function] with ** [sqlite3_context] C to be the value T. Only the lower 8 bits ** of the subtype T are preserved in current versions of SQLite; ** higher order bits are discarded. ** The number of subtype bytes preserved by SQLite might increase ** in future releases of SQLite. */ SQLITE_API void SQLITE_STDCALL sqlite3_result_subtype(sqlite3_context*,unsigned int); /* ** CAPI3REF: Define New Collating Sequences ** METHOD: sqlite3 ** ** ^These functions add, remove, or modify a [collation] associated ** with the [database connection] specified as the first argument. ** |
︙ | ︙ | |||
5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 | ** strategy. A cost of N indicates that the cost of the strategy is similar ** to a linear scan of an SQLite table with N rows. A cost of log(N) ** indicates that the expense of the operation is similar to that of a ** binary search on a unique indexed field of an SQLite table with N rows. ** ** ^The estimatedRows value is an estimate of the number of rows that ** will be returned by the strategy. ** ** IMPORTANT: The estimatedRows field was added to the sqlite3_index_info ** structure for SQLite version 3.8.2. If a virtual table extension is ** used with an SQLite version earlier than 3.8.2, the results of attempting ** to read or write the estimatedRows field are undefined (but are likely ** to included crashing the application). The estimatedRows field should ** therefore only be used if [sqlite3_libversion_number()] returns a | > > > > > > > > > > > > > > > | > > > | 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 | ** strategy. A cost of N indicates that the cost of the strategy is similar ** to a linear scan of an SQLite table with N rows. A cost of log(N) ** indicates that the expense of the operation is similar to that of a ** binary search on a unique indexed field of an SQLite table with N rows. ** ** ^The estimatedRows value is an estimate of the number of rows that ** will be returned by the strategy. ** ** The xBestIndex method may optionally populate the idxFlags field with a ** mask of SQLITE_INDEX_SCAN_* flags. Currently there is only one such flag - ** SQLITE_INDEX_SCAN_UNIQUE. If the xBestIndex method sets this flag, SQLite ** assumes that the strategy may visit at most one row. ** ** Additionally, if xBestIndex sets the SQLITE_INDEX_SCAN_UNIQUE flag, then ** SQLite also assumes that if a call to the xUpdate() method is made as ** part of the same statement to delete or update a virtual table row and the ** implementation returns SQLITE_CONSTRAINT, then there is no need to rollback ** any database changes. In other words, if the xUpdate() returns ** SQLITE_CONSTRAINT, the database contents must be exactly as they were ** before xUpdate was called. By contrast, if SQLITE_INDEX_SCAN_UNIQUE is not ** set and xUpdate returns SQLITE_CONSTRAINT, any database changes made by ** the xUpdate method are automatically rolled back by SQLite. ** ** IMPORTANT: The estimatedRows field was added to the sqlite3_index_info ** structure for SQLite version 3.8.2. If a virtual table extension is ** used with an SQLite version earlier than 3.8.2, the results of attempting ** to read or write the estimatedRows field are undefined (but are likely ** to included crashing the application). The estimatedRows field should ** therefore only be used if [sqlite3_libversion_number()] returns a ** value greater than or equal to 3008002. Similarly, the idxFlags field ** was added for version 3.9.0. It may therefore only be used if ** sqlite3_libversion_number() returns a value greater than or equal to ** 3009000. */ struct sqlite3_index_info { /* Inputs */ int nConstraint; /* Number of entries in aConstraint */ struct sqlite3_index_constraint { int iColumn; /* Column on left-hand side of constraint */ unsigned char op; /* Constraint operator */ |
︙ | ︙ | |||
5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 | int idxNum; /* Number used to identify the index */ char *idxStr; /* String, possibly obtained from sqlite3_malloc */ int needToFreeIdxStr; /* Free idxStr using sqlite3_free() if true */ int orderByConsumed; /* True if output is already ordered */ double estimatedCost; /* Estimated cost of using this index */ /* Fields below are only available in SQLite 3.8.2 and later */ sqlite3_int64 estimatedRows; /* Estimated number of rows returned */ }; /* ** CAPI3REF: Virtual Table Constraint Operator Codes ** ** These macros defined the allowed values for the ** [sqlite3_index_info].aConstraint[].op field. Each value represents ** an operator that is part of a constraint term in the wHERE clause of ** a query that uses a [virtual table]. | > > > > > > > | 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 | int idxNum; /* Number used to identify the index */ char *idxStr; /* String, possibly obtained from sqlite3_malloc */ int needToFreeIdxStr; /* Free idxStr using sqlite3_free() if true */ int orderByConsumed; /* True if output is already ordered */ double estimatedCost; /* Estimated cost of using this index */ /* Fields below are only available in SQLite 3.8.2 and later */ sqlite3_int64 estimatedRows; /* Estimated number of rows returned */ /* Fields below are only available in SQLite 3.9.0 and later */ int idxFlags; /* Mask of SQLITE_INDEX_SCAN_* flags */ }; /* ** CAPI3REF: Virtual Table Scan Flags */ #define SQLITE_INDEX_SCAN_UNIQUE 1 /* Scan visits at most 1 row */ /* ** CAPI3REF: Virtual Table Constraint Operator Codes ** ** These macros defined the allowed values for the ** [sqlite3_index_info].aConstraint[].op field. Each value represents ** an operator that is part of a constraint term in the wHERE clause of ** a query that uses a [virtual table]. |
︙ | ︙ | |||
6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 | ** <li> SQLITE_MUTEX_STATIC_OPEN ** <li> SQLITE_MUTEX_STATIC_PRNG ** <li> SQLITE_MUTEX_STATIC_LRU ** <li> SQLITE_MUTEX_STATIC_PMEM ** <li> SQLITE_MUTEX_STATIC_APP1 ** <li> SQLITE_MUTEX_STATIC_APP2 ** <li> SQLITE_MUTEX_STATIC_APP3 ** </ul> ** ** ^The first two constants (SQLITE_MUTEX_FAST and SQLITE_MUTEX_RECURSIVE) ** cause sqlite3_mutex_alloc() to create ** a new mutex. ^The new mutex is recursive when SQLITE_MUTEX_RECURSIVE ** is used but not necessarily so when SQLITE_MUTEX_FAST is used. ** The mutex implementation does not need to make a distinction | > > > | 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 | ** <li> SQLITE_MUTEX_STATIC_OPEN ** <li> SQLITE_MUTEX_STATIC_PRNG ** <li> SQLITE_MUTEX_STATIC_LRU ** <li> SQLITE_MUTEX_STATIC_PMEM ** <li> SQLITE_MUTEX_STATIC_APP1 ** <li> SQLITE_MUTEX_STATIC_APP2 ** <li> SQLITE_MUTEX_STATIC_APP3 ** <li> SQLITE_MUTEX_STATIC_VFS1 ** <li> SQLITE_MUTEX_STATIC_VFS2 ** <li> SQLITE_MUTEX_STATIC_VFS3 ** </ul> ** ** ^The first two constants (SQLITE_MUTEX_FAST and SQLITE_MUTEX_RECURSIVE) ** cause sqlite3_mutex_alloc() to create ** a new mutex. ^The new mutex is recursive when SQLITE_MUTEX_RECURSIVE ** is used but not necessarily so when SQLITE_MUTEX_FAST is used. ** The mutex implementation does not need to make a distinction |
︙ | ︙ | |||
7853 7854 7855 7856 7857 7858 7859 7860 | #ifdef __cplusplus } /* end of the 'extern "C"' block */ #endif #endif /* ifndef _SQLITE3RTREE_H_ */ | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7951 7952 7953 7954 7955 7956 7957 7958 7959 7960 7961 7962 7963 7964 7965 7966 7967 7968 7969 7970 7971 7972 7973 7974 7975 7976 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 8050 8051 8052 8053 8054 8055 8056 8057 8058 8059 8060 8061 8062 8063 8064 8065 8066 8067 8068 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 8090 8091 8092 8093 8094 8095 8096 8097 8098 8099 8100 8101 8102 8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163 8164 8165 8166 8167 8168 8169 8170 8171 8172 8173 8174 8175 8176 8177 8178 8179 8180 8181 8182 8183 8184 8185 8186 8187 8188 8189 8190 8191 8192 8193 8194 8195 8196 8197 8198 8199 8200 8201 8202 8203 8204 8205 8206 8207 8208 8209 8210 8211 8212 8213 8214 8215 8216 8217 8218 8219 8220 8221 8222 8223 8224 8225 8226 8227 8228 8229 8230 8231 8232 8233 8234 8235 8236 8237 8238 8239 8240 8241 8242 8243 8244 8245 8246 8247 8248 8249 8250 8251 8252 8253 8254 8255 8256 8257 8258 8259 8260 8261 8262 8263 8264 8265 8266 8267 8268 8269 8270 8271 8272 8273 8274 8275 8276 8277 8278 8279 8280 8281 8282 8283 8284 8285 8286 8287 8288 8289 8290 8291 8292 8293 8294 8295 8296 8297 8298 8299 8300 8301 8302 8303 8304 8305 8306 8307 8308 8309 8310 8311 8312 8313 8314 8315 8316 8317 8318 8319 8320 8321 8322 8323 8324 8325 8326 8327 8328 8329 8330 8331 8332 8333 8334 8335 8336 8337 8338 8339 8340 8341 8342 8343 8344 8345 8346 8347 8348 8349 8350 8351 8352 8353 8354 8355 8356 8357 8358 8359 8360 8361 8362 8363 8364 8365 8366 8367 8368 8369 8370 8371 8372 8373 8374 8375 8376 8377 8378 8379 8380 8381 8382 8383 8384 8385 8386 8387 8388 8389 8390 8391 8392 8393 8394 8395 8396 8397 8398 8399 8400 8401 8402 8403 8404 8405 8406 8407 8408 8409 8410 8411 8412 8413 8414 8415 8416 8417 8418 8419 8420 8421 8422 8423 8424 8425 8426 8427 8428 8429 8430 8431 8432 8433 8434 8435 8436 8437 8438 8439 8440 8441 8442 8443 | #ifdef __cplusplus } /* end of the 'extern "C"' block */ #endif #endif /* ifndef _SQLITE3RTREE_H_ */ /* ** 2014 May 31 ** ** The author disclaims copyright to this source code. In place of ** a legal notice, here is a blessing: ** ** May you do good and not evil. ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ****************************************************************************** ** ** Interfaces to extend FTS5. Using the interfaces defined in this file, ** FTS5 may be extended with: ** ** * custom tokenizers, and ** * custom auxiliary functions. */ #ifndef _FTS5_H #define _FTS5_H #ifdef __cplusplus extern "C" { #endif /************************************************************************* ** CUSTOM AUXILIARY FUNCTIONS ** ** Virtual table implementations may overload SQL functions by implementing ** the sqlite3_module.xFindFunction() method. */ typedef struct Fts5ExtensionApi Fts5ExtensionApi; typedef struct Fts5Context Fts5Context; typedef struct Fts5PhraseIter Fts5PhraseIter; typedef void (*fts5_extension_function)( const Fts5ExtensionApi *pApi, /* API offered by current FTS version */ Fts5Context *pFts, /* First arg to pass to pApi functions */ sqlite3_context *pCtx, /* Context for returning result/error */ int nVal, /* Number of values in apVal[] array */ sqlite3_value **apVal /* Array of trailing arguments */ ); struct Fts5PhraseIter { const unsigned char *a; const unsigned char *b; }; /* ** EXTENSION API FUNCTIONS ** ** xUserData(pFts): ** Return a copy of the context pointer the extension function was ** registered with. ** ** xColumnTotalSize(pFts, iCol, pnToken): ** If parameter iCol is less than zero, set output variable *pnToken ** to the total number of tokens in the FTS5 table. Or, if iCol is ** non-negative but less than the number of columns in the table, return ** the total number of tokens in column iCol, considering all rows in ** the FTS5 table. ** ** If parameter iCol is greater than or equal to the number of columns ** in the table, SQLITE_RANGE is returned. Or, if an error occurs (e.g. ** an OOM condition or IO error), an appropriate SQLite error code is ** returned. ** ** xColumnCount(pFts): ** Return the number of columns in the table. ** ** xColumnSize(pFts, iCol, pnToken): ** If parameter iCol is less than zero, set output variable *pnToken ** to the total number of tokens in the current row. Or, if iCol is ** non-negative but less than the number of columns in the table, set ** *pnToken to the number of tokens in column iCol of the current row. ** ** If parameter iCol is greater than or equal to the number of columns ** in the table, SQLITE_RANGE is returned. Or, if an error occurs (e.g. ** an OOM condition or IO error), an appropriate SQLite error code is ** returned. ** ** xColumnText: ** This function attempts to retrieve the text of column iCol of the ** current document. If successful, (*pz) is set to point to a buffer ** containing the text in utf-8 encoding, (*pn) is set to the size in bytes ** (not characters) of the buffer and SQLITE_OK is returned. Otherwise, ** if an error occurs, an SQLite error code is returned and the final values ** of (*pz) and (*pn) are undefined. ** ** xPhraseCount: ** Returns the number of phrases in the current query expression. ** ** xPhraseSize: ** Returns the number of tokens in phrase iPhrase of the query. Phrases ** are numbered starting from zero. ** ** xInstCount: ** Set *pnInst to the total number of occurrences of all phrases within ** the query within the current row. Return SQLITE_OK if successful, or ** an error code (i.e. SQLITE_NOMEM) if an error occurs. ** ** xInst: ** Query for the details of phrase match iIdx within the current row. ** Phrase matches are numbered starting from zero, so the iIdx argument ** should be greater than or equal to zero and smaller than the value ** output by xInstCount(). ** ** Returns SQLITE_OK if successful, or an error code (i.e. SQLITE_NOMEM) ** if an error occurs. ** ** xRowid: ** Returns the rowid of the current row. ** ** xTokenize: ** Tokenize text using the tokenizer belonging to the FTS5 table. ** ** xQueryPhrase(pFts5, iPhrase, pUserData, xCallback): ** This API function is used to query the FTS table for phrase iPhrase ** of the current query. Specifically, a query equivalent to: ** ** ... FROM ftstable WHERE ftstable MATCH $p ORDER BY rowid ** ** with $p set to a phrase equivalent to the phrase iPhrase of the ** current query is executed. For each row visited, the callback function ** passed as the fourth argument is invoked. The context and API objects ** passed to the callback function may be used to access the properties of ** each matched row. Invoking Api.xUserData() returns a copy of the pointer ** passed as the third argument to pUserData. ** ** If the callback function returns any value other than SQLITE_OK, the ** query is abandoned and the xQueryPhrase function returns immediately. ** If the returned value is SQLITE_DONE, xQueryPhrase returns SQLITE_OK. ** Otherwise, the error code is propagated upwards. ** ** If the query runs to completion without incident, SQLITE_OK is returned. ** Or, if some error occurs before the query completes or is aborted by ** the callback, an SQLite error code is returned. ** ** ** xSetAuxdata(pFts5, pAux, xDelete) ** ** Save the pointer passed as the second argument as the extension functions ** "auxiliary data". The pointer may then be retrieved by the current or any ** future invocation of the same fts5 extension function made as part of ** of the same MATCH query using the xGetAuxdata() API. ** ** Each extension function is allocated a single auxiliary data slot for ** each FTS query (MATCH expression). If the extension function is invoked ** more than once for a single FTS query, then all invocations share a ** single auxiliary data context. ** ** If there is already an auxiliary data pointer when this function is ** invoked, then it is replaced by the new pointer. If an xDelete callback ** was specified along with the original pointer, it is invoked at this ** point. ** ** The xDelete callback, if one is specified, is also invoked on the ** auxiliary data pointer after the FTS5 query has finished. ** ** If an error (e.g. an OOM condition) occurs within this function, an ** the auxiliary data is set to NULL and an error code returned. If the ** xDelete parameter was not NULL, it is invoked on the auxiliary data ** pointer before returning. ** ** ** xGetAuxdata(pFts5, bClear) ** ** Returns the current auxiliary data pointer for the fts5 extension ** function. See the xSetAuxdata() method for details. ** ** If the bClear argument is non-zero, then the auxiliary data is cleared ** (set to NULL) before this function returns. In this case the xDelete, ** if any, is not invoked. ** ** ** xRowCount(pFts5, pnRow) ** ** This function is used to retrieve the total number of rows in the table. ** In other words, the same value that would be returned by: ** ** SELECT count(*) FROM ftstable; ** ** xPhraseFirst() ** This function is used, along with type Fts5PhraseIter and the xPhraseNext ** method, to iterate through all instances of a single query phrase within ** the current row. This is the same information as is accessible via the ** xInstCount/xInst APIs. While the xInstCount/xInst APIs are more convenient ** to use, this API may be faster under some circumstances. To iterate ** through instances of phrase iPhrase, use the following code: ** ** Fts5PhraseIter iter; ** int iCol, iOff; ** for(pApi->xPhraseFirst(pFts, iPhrase, &iter, &iCol, &iOff); ** iOff>=0; ** pApi->xPhraseNext(pFts, &iter, &iCol, &iOff) ** ){ ** // An instance of phrase iPhrase at offset iOff of column iCol ** } ** ** The Fts5PhraseIter structure is defined above. Applications should not ** modify this structure directly - it should only be used as shown above ** with the xPhraseFirst() and xPhraseNext() API methods. ** ** xPhraseNext() ** See xPhraseFirst above. */ struct Fts5ExtensionApi { int iVersion; /* Currently always set to 1 */ void *(*xUserData)(Fts5Context*); int (*xColumnCount)(Fts5Context*); int (*xRowCount)(Fts5Context*, sqlite3_int64 *pnRow); int (*xColumnTotalSize)(Fts5Context*, int iCol, sqlite3_int64 *pnToken); int (*xTokenize)(Fts5Context*, const char *pText, int nText, /* Text to tokenize */ void *pCtx, /* Context passed to xToken() */ int (*xToken)(void*, int, const char*, int, int, int) /* Callback */ ); int (*xPhraseCount)(Fts5Context*); int (*xPhraseSize)(Fts5Context*, int iPhrase); int (*xInstCount)(Fts5Context*, int *pnInst); int (*xInst)(Fts5Context*, int iIdx, int *piPhrase, int *piCol, int *piOff); sqlite3_int64 (*xRowid)(Fts5Context*); int (*xColumnText)(Fts5Context*, int iCol, const char **pz, int *pn); int (*xColumnSize)(Fts5Context*, int iCol, int *pnToken); int (*xQueryPhrase)(Fts5Context*, int iPhrase, void *pUserData, int(*)(const Fts5ExtensionApi*,Fts5Context*,void*) ); int (*xSetAuxdata)(Fts5Context*, void *pAux, void(*xDelete)(void*)); void *(*xGetAuxdata)(Fts5Context*, int bClear); void (*xPhraseFirst)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*, int*); void (*xPhraseNext)(Fts5Context*, Fts5PhraseIter*, int *piCol, int *piOff); }; /* ** CUSTOM AUXILIARY FUNCTIONS *************************************************************************/ /************************************************************************* ** CUSTOM TOKENIZERS ** ** Applications may also register custom tokenizer types. A tokenizer ** is registered by providing fts5 with a populated instance of the ** following structure. All structure methods must be defined, setting ** any member of the fts5_tokenizer struct to NULL leads to undefined ** behaviour. The structure methods are expected to function as follows: ** ** xCreate: ** This function is used to allocate and inititalize a tokenizer instance. ** A tokenizer instance is required to actually tokenize text. ** ** The first argument passed to this function is a copy of the (void*) ** pointer provided by the application when the fts5_tokenizer object ** was registered with FTS5 (the third argument to xCreateTokenizer()). ** The second and third arguments are an array of nul-terminated strings ** containing the tokenizer arguments, if any, specified following the ** tokenizer name as part of the CREATE VIRTUAL TABLE statement used ** to create the FTS5 table. ** ** The final argument is an output variable. If successful, (*ppOut) ** should be set to point to the new tokenizer handle and SQLITE_OK ** returned. If an error occurs, some value other than SQLITE_OK should ** be returned. In this case, fts5 assumes that the final value of *ppOut ** is undefined. ** ** xDelete: ** This function is invoked to delete a tokenizer handle previously ** allocated using xCreate(). Fts5 guarantees that this function will ** be invoked exactly once for each successful call to xCreate(). ** ** xTokenize: ** This function is expected to tokenize the nText byte string indicated ** by argument pText. pText may or may not be nul-terminated. The first ** argument passed to this function is a pointer to an Fts5Tokenizer object ** returned by an earlier call to xCreate(). ** ** The second argument indicates the reason that FTS5 is requesting ** tokenization of the supplied text. This is always one of the following ** four values: ** ** <ul><li> <b>FTS5_TOKENIZE_DOCUMENT</b> - A document is being inserted into ** or removed from the FTS table. The tokenizer is being invoked to ** determine the set of tokens to add to (or delete from) the ** FTS index. ** ** <li> <b>FTS5_TOKENIZE_QUERY</b> - A MATCH query is being executed ** against the FTS index. The tokenizer is being called to tokenize ** a bareword or quoted string specified as part of the query. ** ** <li> <b>(FTS5_TOKENIZE_QUERY | FTS5_TOKENIZE_PREFIX)</b> - Same as ** FTS5_TOKENIZE_QUERY, except that the bareword or quoted string is ** followed by a "*" character, indicating that the last token ** returned by the tokenizer will be treated as a token prefix. ** ** <li> <b>FTS5_TOKENIZE_AUX</b> - The tokenizer is being invoked to ** satisfy an fts5_api.xTokenize() request made by an auxiliary ** function. Or an fts5_api.xColumnSize() request made by the same ** on a columnsize=0 database. ** </ul> ** ** For each token in the input string, the supplied callback xToken() must ** be invoked. The first argument to it should be a copy of the pointer ** passed as the second argument to xTokenize(). The third and fourth ** arguments are a pointer to a buffer containing the token text, and the ** size of the token in bytes. The 4th and 5th arguments are the byte offsets ** of the first byte of and first byte immediately following the text from ** which the token is derived within the input. ** ** The second argument passed to the xToken() callback ("tflags") should ** normally be set to 0. The exception is if the tokenizer supports ** synonyms. In this case see the discussion below for details. ** ** FTS5 assumes the xToken() callback is invoked for each token in the ** order that they occur within the input text. ** ** If an xToken() callback returns any value other than SQLITE_OK, then ** the tokenization should be abandoned and the xTokenize() method should ** immediately return a copy of the xToken() return value. Or, if the ** input buffer is exhausted, xTokenize() should return SQLITE_OK. Finally, ** if an error occurs with the xTokenize() implementation itself, it ** may abandon the tokenization and return any error code other than ** SQLITE_OK or SQLITE_DONE. ** ** SYNONYM SUPPORT ** ** Custom tokenizers may also support synonyms. Consider a case in which a ** user wishes to query for a phrase such as "first place". Using the ** built-in tokenizers, the FTS5 query 'first + place' will match instances ** of "first place" within the document set, but not alternative forms ** such as "1st place". In some applications, it would be better to match ** all instances of "first place" or "1st place" regardless of which form ** the user specified in the MATCH query text. ** ** There are several ways to approach this in FTS5: ** ** <ol><li> By mapping all synonyms to a single token. In this case, the ** In the above example, this means that the tokenizer returns the ** same token for inputs "first" and "1st". Say that token is in ** fact "first", so that when the user inserts the document "I won ** 1st place" entries are added to the index for tokens "i", "won", ** "first" and "place". If the user then queries for '1st + place', ** the tokenizer substitutes "first" for "1st" and the query works ** as expected. ** ** <li> By adding multiple synonyms for a single term to the FTS index. ** In this case, when tokenizing query text, the tokenizer may ** provide multiple synonyms for a single term within the document. ** FTS5 then queries the index for each synonym individually. For ** example, faced with the query: ** ** <codeblock> ** ... MATCH 'first place'</codeblock> ** ** the tokenizer offers both "1st" and "first" as synonyms for the ** first token in the MATCH query and FTS5 effectively runs a query ** similar to: ** ** <codeblock> ** ... MATCH '(first OR 1st) place'</codeblock> ** ** except that, for the purposes of auxiliary functions, the query ** still appears to contain just two phrases - "(first OR 1st)" ** being treated as a single phrase. ** ** <li> By adding multiple synonyms for a single term to the FTS index. ** Using this method, when tokenizing document text, the tokenizer ** provides multiple synonyms for each token. So that when a ** document such as "I won first place" is tokenized, entries are ** added to the FTS index for "i", "won", "first", "1st" and ** "place". ** ** This way, even if the tokenizer does not provide synonyms ** when tokenizing query text (it should not - to do would be ** inefficient), it doesn't matter if the user queries for ** 'first + place' or '1st + place', as there are entires in the ** FTS index corresponding to both forms of the first token. ** </ol> ** ** Whether it is parsing document or query text, any call to xToken that ** specifies a <i>tflags</i> argument with the FTS5_TOKEN_COLOCATED bit ** is considered to supply a synonym for the previous token. For example, ** when parsing the document "I won first place", a tokenizer that supports ** synonyms would call xToken() 5 times, as follows: ** ** <codeblock> ** xToken(pCtx, 0, "i", 1, 0, 1); ** xToken(pCtx, 0, "won", 3, 2, 5); ** xToken(pCtx, 0, "first", 5, 6, 11); ** xToken(pCtx, FTS5_TOKEN_COLOCATED, "1st", 3, 6, 11); ** xToken(pCtx, 0, "place", 5, 12, 17); **</codeblock> ** ** It is an error to specify the FTS5_TOKEN_COLOCATED flag the first time ** xToken() is called. Multiple synonyms may be specified for a single token ** by making multiple calls to xToken(FTS5_TOKEN_COLOCATED) in sequence. ** There is no limit to the number of synonyms that may be provided for a ** single token. ** ** In many cases, method (1) above is the best approach. It does not add ** extra data to the FTS index or require FTS5 to query for multiple terms, ** so it is efficient in terms of disk space and query speed. However, it ** does not support prefix queries very well. If, as suggested above, the ** token "first" is subsituted for "1st" by the tokenizer, then the query: ** ** <codeblock> ** ... MATCH '1s*'</codeblock> ** ** will not match documents that contain the token "1st" (as the tokenizer ** will probably not map "1s" to any prefix of "first"). ** ** For full prefix support, method (3) may be preferred. In this case, ** because the index contains entries for both "first" and "1st", prefix ** queries such as 'fi*' or '1s*' will match correctly. However, because ** extra entries are added to the FTS index, this method uses more space ** within the database. ** ** Method (2) offers a midpoint between (1) and (3). Using this method, ** a query such as '1s*' will match documents that contain the literal ** token "1st", but not "first" (assuming the tokenizer is not able to ** provide synonyms for prefixes). However, a non-prefix query like '1st' ** will match against "1st" and "first". This method does not require ** extra disk space, as no extra entries are added to the FTS index. ** On the other hand, it may require more CPU cycles to run MATCH queries, ** as separate queries of the FTS index are required for each synonym. ** ** When using methods (2) or (3), it is important that the tokenizer only ** provide synonyms when tokenizing document text (method (2)) or query ** text (method (3)), not both. Doing so will not cause any errors, but is ** inefficient. */ typedef struct Fts5Tokenizer Fts5Tokenizer; typedef struct fts5_tokenizer fts5_tokenizer; struct fts5_tokenizer { int (*xCreate)(void*, const char **azArg, int nArg, Fts5Tokenizer **ppOut); void (*xDelete)(Fts5Tokenizer*); int (*xTokenize)(Fts5Tokenizer*, void *pCtx, int flags, /* Mask of FTS5_TOKENIZE_* flags */ const char *pText, int nText, int (*xToken)( void *pCtx, /* Copy of 2nd argument to xTokenize() */ int tflags, /* Mask of FTS5_TOKEN_* flags */ const char *pToken, /* Pointer to buffer containing token */ int nToken, /* Size of token in bytes */ int iStart, /* Byte offset of token within input text */ int iEnd /* Byte offset of end of token within input text */ ) ); }; /* Flags that may be passed as the third argument to xTokenize() */ #define FTS5_TOKENIZE_QUERY 0x0001 #define FTS5_TOKENIZE_PREFIX 0x0002 #define FTS5_TOKENIZE_DOCUMENT 0x0004 #define FTS5_TOKENIZE_AUX 0x0008 /* Flags that may be passed by the tokenizer implementation back to FTS5 ** as the third argument to the supplied xToken callback. */ #define FTS5_TOKEN_COLOCATED 0x0001 /* Same position as prev. token */ /* ** END OF CUSTOM TOKENIZERS *************************************************************************/ /************************************************************************* ** FTS5 EXTENSION REGISTRATION API */ typedef struct fts5_api fts5_api; struct fts5_api { int iVersion; /* Currently always set to 2 */ /* Create a new tokenizer */ int (*xCreateTokenizer)( fts5_api *pApi, const char *zName, void *pContext, fts5_tokenizer *pTokenizer, void (*xDestroy)(void*) ); /* Find an existing tokenizer */ int (*xFindTokenizer)( fts5_api *pApi, const char *zName, void **ppContext, fts5_tokenizer *pTokenizer ); /* Create a new auxiliary function */ int (*xCreateFunction)( fts5_api *pApi, const char *zName, void *pContext, fts5_extension_function xFunction, void (*xDestroy)(void*) ); }; /* ** END OF REGISTRATION API *************************************************************************/ #ifdef __cplusplus } /* end of the 'extern "C"' block */ #endif #endif /* _FTS5_H */ |
Changes to src/stash.c.
︙ | ︙ | |||
426 427 428 429 430 431 432 | ** ** fossil stash list ?-v|--verbose? ** fossil stash ls ?-v|--verbose? ** ** List all changes sets currently stashed. Show information about ** individual files in each changeset if -v or --verbose is used. ** | | | 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 | ** ** fossil stash list ?-v|--verbose? ** fossil stash ls ?-v|--verbose? ** ** List all changes sets currently stashed. Show information about ** individual files in each changeset if -v or --verbose is used. ** ** fossil stash show|cat ?STASHID? ?DIFF-FLAGS? ** ** Show the content of a stash ** ** fossil stash pop ** fossil stash apply ?STASHID? ** ** Apply STASHID or the most recently create stash to the current |
︙ | ︙ | |||
462 463 464 465 466 467 468 | ** directory would be if STASHID were applied. ** ** SUMMARY: ** fossil stash ** fossil stash save ?-m|--comment COMMENT? ?FILES...? ** fossil stash snapshot ?-m|--comment COMMENT? ?FILES...? ** fossil stash list|ls ?-v|--verbose? ?-W|--width <num>? | | | 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 | ** directory would be if STASHID were applied. ** ** SUMMARY: ** fossil stash ** fossil stash save ?-m|--comment COMMENT? ?FILES...? ** fossil stash snapshot ?-m|--comment COMMENT? ?FILES...? ** fossil stash list|ls ?-v|--verbose? ?-W|--width <num>? ** fossil stash show|cat ?STASHID? ?DIFF-OPTIONS? ** fossil stash pop ** fossil stash apply ?STASHID? ** fossil stash goto ?STASHID? ** fossil stash rm|drop ?STASHID? ?-a|--all? ** fossil stash [g]diff ?STASHID? ?DIFF-OPTIONS? */ void stash_cmd(void){ |
︙ | ︙ | |||
636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 | "(SELECT origname FROM stashfile WHERE stashid=%d)", stashid); undo_finish(); }else if( memcmp(zCmd, "diff", nCmd)==0 || memcmp(zCmd, "gdiff", nCmd)==0 || memcmp(zCmd, "show", nCmd)==0 ){ const char *zDiffCmd = 0; const char *zBinGlob = 0; int fIncludeBinary = 0; u64 diffFlags; if( find_option("tk",0,0)!=0 ){ db_close(0); | > > > > > > | > > > | 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 | "(SELECT origname FROM stashfile WHERE stashid=%d)", stashid); undo_finish(); }else if( memcmp(zCmd, "diff", nCmd)==0 || memcmp(zCmd, "gdiff", nCmd)==0 || memcmp(zCmd, "show", nCmd)==0 || memcmp(zCmd, "cat", nCmd)==0 ){ const char *zDiffCmd = 0; const char *zBinGlob = 0; int fIncludeBinary = 0; u64 diffFlags; if( find_option("tk",0,0)!=0 ){ db_close(0); switch (zCmd[0]) { case 's': case 'c': diff_tk("stash show", 3); break; default: diff_tk("stash diff", 3); } return; } if( find_option("internal","i",0)==0 ){ zDiffCmd = diff_command_external(memcmp(zCmd, "gdiff", nCmd)==0); } diffFlags = diff_options(); if( find_option("verbose","v",0)!=0 ) diffFlags |= DIFF_VERBOSE; |
︙ | ︙ |
Changes to src/style.c.
︙ | ︙ | |||
358 359 360 361 362 363 364 | */ static void url_var( const char *zVarPrefix, const char *zConfigName, const char *zPageName ){ char *zVarName = mprintf("%s_url", zVarPrefix); | | | 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 | */ static void url_var( const char *zVarPrefix, const char *zConfigName, const char *zPageName ){ char *zVarName = mprintf("%s_url", zVarPrefix); char *zUrl = mprintf("%R/%s?id=%x", zPageName, skin_id(zConfigName)); Th_Store(zVarName, zUrl); free(zUrl); free(zVarName); } /* |
︙ | ︙ |
Changes to src/th_main.c.
︙ | ︙ | |||
508 509 510 511 512 513 514 515 516 517 518 519 520 521 | return Th_WrongNumArgs(interp, "htmlize STRING"); } zOut = htmlize((char*)argv[1], argl[1]); Th_SetResult(interp, zOut, -1); free(zOut); return TH_OK; } /* ** TH1 command: date ** ** Return a string which is the current time and date. If the ** -local option is used, the date appears using localtime instead ** of UTC. | > > > > > > > > > > > > > > > > > > > > > > | 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 | return Th_WrongNumArgs(interp, "htmlize STRING"); } zOut = htmlize((char*)argv[1], argl[1]); Th_SetResult(interp, zOut, -1); free(zOut); return TH_OK; } /* ** TH1 command: encode64 STRING ** ** Encode the specified string using Base64 and return the result. */ static int encode64Cmd( Th_Interp *interp, void *p, int argc, const char **argv, int *argl ){ char *zOut; if( argc!=2 ){ return Th_WrongNumArgs(interp, "encode64 STRING"); } zOut = encode64((char*)argv[1], argl[1]); Th_SetResult(interp, zOut, -1); free(zOut); return TH_OK; } /* ** TH1 command: date ** ** Return a string which is the current time and date. If the ** -local option is used, the date appears using localtime instead ** of UTC. |
︙ | ︙ | |||
629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 | ** TH1 command: hasfeature STRING ** ** Return true if the fossil binary has the given compile-time feature ** enabled. The set of features includes: ** ** "ssl" = FOSSIL_ENABLE_SSL ** "legacyMvRm" = FOSSIL_ENABLE_LEGACY_MV_RM ** "th1Docs" = FOSSIL_ENABLE_TH1_DOCS ** "th1Hooks" = FOSSIL_ENABLE_TH1_HOOKS ** "tcl" = FOSSIL_ENABLE_TCL ** "useTclStubs" = USE_TCL_STUBS ** "tclStubs" = FOSSIL_ENABLE_TCL_STUBS ** "tclPrivateStubs" = FOSSIL_ENABLE_TCL_PRIVATE_STUBS ** "json" = FOSSIL_ENABLE_JSON ** "markdown" = FOSSIL_ENABLE_MARKDOWN ** "unicodeCmdLine" = !BROKEN_MINGW_CMDLINE ** "dynamicBuild" = FOSSIL_DYNAMIC_BUILD ** */ static int hasfeatureCmd( Th_Interp *interp, void *p, int argc, const char **argv, int *argl | > > > | 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 | ** TH1 command: hasfeature STRING ** ** Return true if the fossil binary has the given compile-time feature ** enabled. The set of features includes: ** ** "ssl" = FOSSIL_ENABLE_SSL ** "legacyMvRm" = FOSSIL_ENABLE_LEGACY_MV_RM ** "execRelPaths" = FOSSIL_ENABLE_EXEC_REL_PATHS ** "th1Docs" = FOSSIL_ENABLE_TH1_DOCS ** "th1Hooks" = FOSSIL_ENABLE_TH1_HOOKS ** "tcl" = FOSSIL_ENABLE_TCL ** "useTclStubs" = USE_TCL_STUBS ** "tclStubs" = FOSSIL_ENABLE_TCL_STUBS ** "tclPrivateStubs" = FOSSIL_ENABLE_TCL_PRIVATE_STUBS ** "json" = FOSSIL_ENABLE_JSON ** "markdown" = FOSSIL_ENABLE_MARKDOWN ** "unicodeCmdLine" = !BROKEN_MINGW_CMDLINE ** "dynamicBuild" = FOSSIL_DYNAMIC_BUILD ** ** Specifying an unknown feature will return a value of false, it will not ** raise a script error. */ static int hasfeatureCmd( Th_Interp *interp, void *p, int argc, const char **argv, int *argl |
︙ | ︙ | |||
666 667 668 669 670 671 672 673 674 675 676 677 678 679 | rc = 1; } #endif #if defined(FOSSIL_ENABLE_LEGACY_MV_RM) else if( 0 == fossil_strnicmp( zArg, "legacyMvRm\0", 11 ) ){ rc = 1; } #endif #if defined(FOSSIL_ENABLE_TH1_DOCS) else if( 0 == fossil_strnicmp( zArg, "th1Docs\0", 8 ) ){ rc = 1; } #endif #if defined(FOSSIL_ENABLE_TH1_HOOKS) | > > > > > | 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 | rc = 1; } #endif #if defined(FOSSIL_ENABLE_LEGACY_MV_RM) else if( 0 == fossil_strnicmp( zArg, "legacyMvRm\0", 11 ) ){ rc = 1; } #endif #if defined(FOSSIL_ENABLE_EXEC_REL_PATHS) else if( 0 == fossil_strnicmp( zArg, "execRelPaths\0", 13 ) ){ rc = 1; } #endif #if defined(FOSSIL_ENABLE_TH1_DOCS) else if( 0 == fossil_strnicmp( zArg, "th1Docs\0", 8 ) ){ rc = 1; } #endif #if defined(FOSSIL_ENABLE_TH1_HOOKS) |
︙ | ︙ | |||
1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 | {"artifact", artifactCmd, 0}, {"checkout", checkoutCmd, 0}, {"combobox", comboboxCmd, 0}, {"date", dateCmd, 0}, {"decorate", wikiCmd, (void*)&aFlags[2]}, {"dir", dirCmd, 0}, {"enable_output", enableOutputCmd, 0}, {"getParameter", getParameterCmd, 0}, {"glob_match", globMatchCmd, 0}, {"globalState", globalStateCmd, 0}, {"httpize", httpizeCmd, 0}, {"hascap", hascapCmd, (void*)&zeroInt}, {"hasfeature", hasfeatureCmd, 0}, {"html", putsCmd, (void*)&aFlags[0]}, | > | 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 | {"artifact", artifactCmd, 0}, {"checkout", checkoutCmd, 0}, {"combobox", comboboxCmd, 0}, {"date", dateCmd, 0}, {"decorate", wikiCmd, (void*)&aFlags[2]}, {"dir", dirCmd, 0}, {"enable_output", enableOutputCmd, 0}, {"encode64", encode64Cmd, 0}, {"getParameter", getParameterCmd, 0}, {"glob_match", globMatchCmd, 0}, {"globalState", globalStateCmd, 0}, {"httpize", httpizeCmd, 0}, {"hascap", hascapCmd, (void*)&zeroInt}, {"hasfeature", hasfeatureCmd, 0}, {"html", putsCmd, (void*)&aFlags[0]}, |
︙ | ︙ |
Changes to src/th_tcl.c.
︙ | ︙ | |||
22 23 24 25 26 27 28 29 30 31 32 33 34 35 | #ifdef FOSSIL_ENABLE_TCL #include "sqlite3.h" #include "th.h" #include "tcl.h" /* ** These macros are designed to reduce the redundant code required to marshal ** arguments from TH1 to Tcl. */ #define USE_ARGV_TO_OBJV() \ int objc; \ Tcl_Obj **objv; \ | > > > > > > > > | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | #ifdef FOSSIL_ENABLE_TCL #include "sqlite3.h" #include "th.h" #include "tcl.h" /* ** This macro is used to verify that the header version of Tcl meets some ** minimum requirement. */ #define MINIMUM_TCL_VERSION(major, minor) \ ((TCL_MAJOR_VERSION > (major)) || \ ((TCL_MAJOR_VERSION == (major)) && (TCL_MINOR_VERSION >= (minor)))) /* ** These macros are designed to reduce the redundant code required to marshal ** arguments from TH1 to Tcl. */ #define USE_ARGV_TO_OBJV() \ int objc; \ Tcl_Obj **objv; \ |
︙ | ︙ | |||
283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 | /* ** Is the loaded version of Tcl one where TIP #285 (asynchronous script ** cancellation) is available? This should return non-zero only for Tcl ** 8.6 and higher. */ static int canUseTip285(){ int major = -1, minor = -1, patchLevel = -1, type = -1; Tcl_GetVersion(&major, &minor, &patchLevel, &type); if( major<0 || minor<0 || patchLevel<0 || type<0 ){ return 0; /* NOTE: Invalid version info, assume bad. */ } return (major>8 || (major==8 && minor>=6)); } /* ** Creates and initializes a Tcl interpreter for use with the specified TH1 ** interpreter. Stores the created Tcl interpreter in the Tcl context supplied ** by the caller. This must be declared here because quite a few functions in ** this file need to use it before it can be defined. | > > > > | 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 | /* ** Is the loaded version of Tcl one where TIP #285 (asynchronous script ** cancellation) is available? This should return non-zero only for Tcl ** 8.6 and higher. */ static int canUseTip285(){ #if MINIMUM_TCL_VERSION(8, 6) int major = -1, minor = -1, patchLevel = -1, type = -1; Tcl_GetVersion(&major, &minor, &patchLevel, &type); if( major<0 || minor<0 || patchLevel<0 || type<0 ){ return 0; /* NOTE: Invalid version info, assume bad. */ } return (major>8 || (major==8 && minor>=6)); #else return 0; #endif } /* ** Creates and initializes a Tcl interpreter for use with the specified TH1 ** interpreter. Stores the created Tcl interpreter in the Tcl context supplied ** by the caller. This must be declared here because quite a few functions in ** this file need to use it before it can be defined. |
︙ | ︙ | |||
1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 | } if( !bWait ) flags |= TCL_DONT_WAIT; Tcl_Preserve((ClientData)tclInterp); while( Tcl_DoOneEvent(flags) ){ if( Tcl_InterpDeleted(tclInterp) ){ break; } if( useTip285 && Tcl_Canceled(tclInterp, 0)!=TCL_OK ){ break; } } Tcl_Release((ClientData)tclInterp); return rc; } /* ** Creates and initializes a Tcl interpreter for use with the specified TH1 | > > | 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 | } if( !bWait ) flags |= TCL_DONT_WAIT; Tcl_Preserve((ClientData)tclInterp); while( Tcl_DoOneEvent(flags) ){ if( Tcl_InterpDeleted(tclInterp) ){ break; } #if MINIMUM_TCL_VERSION(8, 6) if( useTip285 && Tcl_Canceled(tclInterp, 0)!=TCL_OK ){ break; } #endif } Tcl_Release((ClientData)tclInterp); return rc; } /* ** Creates and initializes a Tcl interpreter for use with the specified TH1 |
︙ | ︙ |
Changes to src/timeline.c.
︙ | ︙ | |||
1190 1191 1192 1193 1194 1195 1196 | ** to=UUID ... to this ** shortest ... show only the shortest path ** uf=FUUID Show only check-ins that use given file version ** brbg Background color from branch name ** ubg Background color from user ** namechng Show only check-ins that filename changes ** forks Show only forks and their children | | > | 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 | ** to=UUID ... to this ** shortest ... show only the shortest path ** uf=FUUID Show only check-ins that use given file version ** brbg Background color from branch name ** ubg Background color from user ** namechng Show only check-ins that filename changes ** forks Show only forks and their children ** ym=YYYY-MM Show only events for the given year/month. ** ymd=YYYY-MM-DD Show only events on the given day ** datefmt=N Override the date format ** ** p= and d= can appear individually or together. If either p= or d= ** appear, then u=, y=, a=, and b= are ignored. ** ** If both a= and b= appear then both upper and lower bounds are honored. ** |
︙ | ︙ | |||
1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 | const char *zMark = P("m"); /* Mark this event or an event this time */ const char *zTagName = P("t"); /* Show events with this tag */ const char *zBrName = P("r"); /* Show events related to this tag */ const char *zSearch = P("s"); /* Search string */ const char *zUses = P("uf"); /* Only show check-ins hold this file */ const char *zYearMonth = P("ym"); /* Show check-ins for the given YYYY-MM */ const char *zYearWeek = P("yw"); /* Check-ins for YYYY-WW (week-of-year) */ int useDividers = P("nd")==0; /* Show dividers if "nd" is missing */ int renameOnly = P("namechng")!=0; /* Show only check-ins that rename files */ int forkOnly = PB("forks"); /* Show only forks and their children */ int tagid; /* Tag ID */ int tmFlags = 0; /* Timeline flags */ const char *zThisTag = 0; /* Suppress links to this tag */ const char *zThisUser = 0; /* Suppress links to this user */ | > | 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 | const char *zMark = P("m"); /* Mark this event or an event this time */ const char *zTagName = P("t"); /* Show events with this tag */ const char *zBrName = P("r"); /* Show events related to this tag */ const char *zSearch = P("s"); /* Search string */ const char *zUses = P("uf"); /* Only show check-ins hold this file */ const char *zYearMonth = P("ym"); /* Show check-ins for the given YYYY-MM */ const char *zYearWeek = P("yw"); /* Check-ins for YYYY-WW (week-of-year) */ const char *zDay = P("ymd"); /* Check-ins for the day YYYY-MM-DD */ int useDividers = P("nd")==0; /* Show dividers if "nd" is missing */ int renameOnly = P("namechng")!=0; /* Show only check-ins that rename files */ int forkOnly = PB("forks"); /* Show only forks and their children */ int tagid; /* Tag ID */ int tmFlags = 0; /* Timeline flags */ const char *zThisTag = 0; /* Suppress links to this tag */ const char *zThisUser = 0; /* Suppress links to this user */ |
︙ | ︙ | |||
1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 | blob_append_sql(&sql, " AND %Q=strftime('%%Y-%%m',event.mtime) ", zYearMonth); } else if( zYearWeek ){ blob_append_sql(&sql, " AND %Q=strftime('%%Y-%%W',event.mtime) ", zYearWeek); } if( tagid ){ blob_append_sql(&sql, " AND (EXISTS(SELECT 1 FROM tagxref" " WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)\n", tagid); if( zBrName ){ /* The next two blob_appendf() calls add SQL that causes check-ins that | > > > > | 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 | blob_append_sql(&sql, " AND %Q=strftime('%%Y-%%m',event.mtime) ", zYearMonth); } else if( zYearWeek ){ blob_append_sql(&sql, " AND %Q=strftime('%%Y-%%W',event.mtime) ", zYearWeek); } else if( zDay ){ blob_append_sql(&sql, " AND %Q=strftime('%%Y-%%m-%%d',event.mtime) ", zDay); } if( tagid ){ blob_append_sql(&sql, " AND (EXISTS(SELECT 1 FROM tagxref" " WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)\n", tagid); if( zBrName ){ /* The next two blob_appendf() calls add SQL that causes check-ins that |
︙ | ︙ | |||
1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 | db_multi_exec("%s", blob_sql_text(&sql)); n = db_int(0, "SELECT count(*) FROM timeline WHERE etype!='div' /*scan*/"); if( zYearMonth ){ blob_appendf(&desc, "%s events for %h", zEType, zYearMonth); }else if( zYearWeek ){ blob_appendf(&desc, "%s events for year/week %h", zEType, zYearWeek); }else if( zBefore==0 && zCirca==0 && n>=nEntry && nEntry>0 ){ blob_appendf(&desc, "%d most recent %ss", n, zEType); }else{ blob_appendf(&desc, "%d %ss", n, zEType); } if( zUses ){ char *zFilenames = names_of_file(zUses); | > > | 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 | db_multi_exec("%s", blob_sql_text(&sql)); n = db_int(0, "SELECT count(*) FROM timeline WHERE etype!='div' /*scan*/"); if( zYearMonth ){ blob_appendf(&desc, "%s events for %h", zEType, zYearMonth); }else if( zYearWeek ){ blob_appendf(&desc, "%s events for year/week %h", zEType, zYearWeek); }else if( zDay ){ blob_appendf(&desc, "%s events occurring on %h", zEType, zDay); }else if( zBefore==0 && zCirca==0 && n>=nEntry && nEntry>0 ){ blob_appendf(&desc, "%d most recent %ss", n, zEType); }else{ blob_appendf(&desc, "%d %ss", n, zEType); } if( zUses ){ char *zFilenames = names_of_file(zUses); |
︙ | ︙ | |||
1852 1853 1854 1855 1856 1857 1858 | db_prepare(&fchngQuery, "SELECT (pid<=0) AS isnew," " (fid==0) AS isdel," " (SELECT name FROM filename WHERE fnid=mlink.fnid) AS name," " (SELECT uuid FROM blob WHERE rid=fid)," " (SELECT uuid FROM blob WHERE rid=pid)" " FROM mlink" | | | 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 | db_prepare(&fchngQuery, "SELECT (pid<=0) AS isnew," " (fid==0) AS isdel," " (SELECT name FROM filename WHERE fnid=mlink.fnid) AS name," " (SELECT uuid FROM blob WHERE rid=fid)," " (SELECT uuid FROM blob WHERE rid=pid)" " FROM mlink" " WHERE mid=:mid AND pid!=fid AND NOT mlink.isaux" " ORDER BY 3 /*sort*/" ); fchngQueryInit = 1; } db_bind_int(&fchngQuery, ":mid", rid); while( db_step(&fchngQuery)==SQLITE_ROW ){ const char *zFilename = db_column_text(&fchngQuery, 2); |
︙ | ︙ | |||
2206 2207 2208 2209 2210 2211 2212 | db_column_text(&q, 3)); } } db_finalize(&q); } /* | | > < | > > > | > > > | > > > > > > > > > > > > > > | < > > > > > > > > > > > > > | 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 | db_column_text(&q, 3)); } } db_finalize(&q); } /* ** WEBPAGE: timewarps ** ** Show all check-ins that are "timewarps". A timewarp is a ** check-in that occurs before its parent, according to the ** timestamp information on the check-in. This can only actually ** happen, of course, if a users system clock is set incorrectly. */ void test_timewarp_page(void){ Stmt q; int cnt = 0; login_check_credentials(); if( !g.perm.Read || !g.perm.Hyperlink ){ login_needed(g.anon.Read && g.anon.Hyperlink); return; } style_header("Instances of timewarp"); db_prepare(&q, "SELECT blob.uuid, " " date(ce.mtime)," " pe.mtime>ce.mtime," " coalesce(ce.euser,ce.user)" " FROM plink p, plink c, blob, event pe, event ce" " WHERE p.cid=c.pid AND p.mtime>c.mtime" " AND blob.rid=c.cid" " AND pe.objid=p.cid" " AND ce.objid=c.cid" " ORDER BY 2 DESC" ); while( db_step(&q)==SQLITE_ROW ){ const char *zCkin = db_column_text(&q, 0); const char *zDate = db_column_text(&q, 1); const char *zStatus = db_column_int(&q,2) ? "Open" : "Resolved by editing date"; const char *zUser = db_column_text(&q, 3); char *zHref = href("%R/timeline?c=%S", zCkin); if( cnt==0 ){ @ <div class="brlist"><table id="timewarptable"> @ <thead><tr> @ <th>Check-in</th> @ <th>Date</th> @ <th>User</th> @ <th>Status</th> @ </tr></thead><tbody> } @ <tr> @ <td>%s(zHref)%S(zCkin)</a></td> @ <td>%s(zHref)%s(zDate)</a></td> @ <td>%h(zUser)</td> @ <td>%s(zStatus)</td> @ </tr> fossil_free(zHref); cnt++; } db_finalize(&q); if( cnt==0 ){ @ <p>No timewarps in this repository</p> }else{ @ </tbody></table></div> output_table_sorting_javascript("timewarptable","tttt",2); } style_footer(); } |
Changes to src/tktsetup.c.
︙ | ︙ | |||
97 98 99 100 101 102 103 | @ CREATE INDEX ticketchng_idx1 ON ticketchng(tkt_id, tkt_mtime); ; /* ** Return the ticket table definition */ const char *ticket_table_schema(void){ | | | 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | @ CREATE INDEX ticketchng_idx1 ON ticketchng(tkt_id, tkt_mtime); ; /* ** Return the ticket table definition */ const char *ticket_table_schema(void){ return db_get("ticket-table", zDefaultTicketTable); } /* ** Common implementation for the ticket setup editor pages. */ static void tktsetup_generic( const char *zTitle, /* Page title */ |
︙ | ︙ | |||
126 127 128 129 130 131 132 | } if( PB("setup") ){ cgi_redirect("tktsetup"); } isSubmit = P("submit")!=0; z = P("x"); if( z==0 ){ | | | 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | } if( PB("setup") ){ cgi_redirect("tktsetup"); } isSubmit = P("submit")!=0; z = P("x"); if( z==0 ){ z = db_get(zDbField, zDfltValue); } style_header("Edit %s", zTitle); if( P("clear")!=0 ){ login_verify_csrf_secret(); db_unset(zDbField, 0); if( xRebuild ) xRebuild(); cgi_redirect("tktsetup"); |
︙ | ︙ | |||
238 239 240 241 242 243 244 | @ } ; /* ** Return the ticket common code. */ const char *ticket_common_code(void){ | | | 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 | @ } ; /* ** Return the ticket common code. */ const char *ticket_common_code(void){ return db_get("ticket-common", zDefaultTicketCommon); } /* ** WEBPAGE: tktsetup_com ** Administrative page used to define TH1 script that is ** common to all ticket screens. */ |
︙ | ︙ | |||
270 271 272 273 274 275 276 | @ return ; /* ** Return the ticket change code. */ const char *ticket_change_code(void){ | | | 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 | @ return ; /* ** Return the ticket change code. */ const char *ticket_change_code(void){ return db_get("ticket-change", zDefaultTicketChange); } /* ** WEBPAGE: tktsetup_change ** Adminstrative screen used to view or edit the TH1 script ** that shows ticket changes. */ |
︙ | ︙ | |||
415 416 417 418 419 420 421 | @ </table> ; /* ** Return the code used to generate the new ticket page */ const char *ticket_newpage_code(void){ | | | 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 | @ </table> ; /* ** Return the code used to generate the new ticket page */ const char *ticket_newpage_code(void){ return db_get("ticket-newpage", zDefaultNew); } /* ** WEBPAGE: tktsetup_newpage ** Administrative page used to view or edit the TH1 script used ** to enter new tickets. */ |
︙ | ︙ | |||
556 557 558 559 560 561 562 | ; /* ** Return the code used to generate the view ticket page */ const char *ticket_viewpage_code(void){ | | | 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 | ; /* ** Return the code used to generate the view ticket page */ const char *ticket_viewpage_code(void){ return db_get("ticket-viewpage", zDefaultView); } /* ** WEBPAGE: tktsetup_viewpage ** Administrative page used to view or edit the TH1 script that ** displays individual tickets. */ |
︙ | ︙ | |||
697 698 699 700 701 702 703 | @ </table> ; /* ** Return the code used to generate the edit ticket page */ const char *ticket_editpage_code(void){ | | | 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 | @ </table> ; /* ** Return the code used to generate the edit ticket page */ const char *ticket_editpage_code(void){ return db_get("ticket-editpage", zDefaultEdit); } /* ** WEBPAGE: tktsetup_editpage ** Administrative page for viewing or editing the TH1 script that ** drives the ticket editing page. */ |
︙ | ︙ | |||
753 754 755 756 757 758 759 | @ </th1> ; /* ** Return the code used to generate the report list */ const char *ticket_reportlist_code(void){ | | | 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 | @ </th1> ; /* ** Return the code used to generate the report list */ const char *ticket_reportlist_code(void){ return db_get("ticket-reportlist", zDefaultReportList); } /* ** WEBPAGE: tktsetup_reportlist ** Administrative page used to view or edit the TH1 script that ** defines the "report list" page. */ |
︙ | ︙ | |||
846 847 848 849 850 851 852 | ; /* ** Return the template ticket report format: */ const char *ticket_key_template(void){ | | | 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 | ; /* ** Return the template ticket report format: */ const char *ticket_key_template(void){ return db_get("ticket-key-template", zDefaultKey); } /* ** WEBPAGE: tktsetup_keytplt ** ** Administrative page used to view or edit the Key template ** for tickets. |
︙ | ︙ |
Changes to src/xfersetup.c.
︙ | ︙ | |||
112 113 114 115 116 117 118 | } if( P("setup") ){ cgi_redirect("xfersetup"); } isSubmit = P("submit")!=0; z = P("x"); if( z==0 ){ | | | 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | } if( P("setup") ){ cgi_redirect("xfersetup"); } isSubmit = P("submit")!=0; z = P("x"); if( z==0 ){ z = db_get(zDbField, zDfltValue); } style_header("Edit %s", zTitle); if( P("clear")!=0 ){ login_verify_csrf_secret(); db_unset(zDbField, 0); if( xRebuild ) xRebuild(); z = zDfltValue; |
︙ | ︙ |
Changes to test/th1.test.
︙ | ︙ | |||
859 860 861 862 863 864 865 | # # NOTE: This test may fail if the command names do not always come # out in a deterministic order from TH1. # fossil test-th-eval "info commands" test th1-info-commands-1 {$RESULT eq {linecount htmlize date stime\ | | | | | 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 | # # NOTE: This test may fail if the command names do not always come # out in a deterministic order from TH1. # fossil test-th-eval "info commands" test th1-info-commands-1 {$RESULT eq {linecount htmlize date stime\ enable_output uplevel dir http expr glob_match utime styleFooter encode64\ catch if tclReady searchable reinitialize combobox lindex query html anoncap\ randhex llength for set break regexp markdown styleHeader puts return checkout\ decorate artifact trace wiki proc hascap globalState continue getParameter\ hasfeature setting lsearch breakpoint upvar render repository string unset\ setParameter list error info rename anycap httpize}} ############################################################################### fossil test-th-eval "info vars" |
︙ | ︙ | |||
1243 1244 1245 1246 1247 1248 1249 | <p>Another paragraph.</p> <h2>Other Features</h2> <p>Text can show <em>emphasis</em> or <em>emphasis</em> or <strong>strong emphassis</strong>.</p> </div> }}} | > > > > > > > > > > > > > > > > > > > > > > | 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 | <p>Another paragraph.</p> <h2>Other Features</h2> <p>Text can show <em>emphasis</em> or <em>emphasis</em> or <strong>strong emphassis</strong>.</p> </div> }}} ############################################################################### fossil test-th-eval {encode64 test} test th1-encode64-1 {$RESULT eq "dGVzdA=="} ############################################################################### fossil test-th-eval {encode64 test\x00} test th1-encode64-2 {$RESULT eq "dGVzdAA="} ############################################################################### # # TODO: Modify the result of this test if the source file (i.e. # "ajax/cgi-bin/fossil-json.cgi.example") changes. # fossil test-th-eval --open-config \ {encode64 [artifact trunk ajax/cgi-bin/fossil-json.cgi.example]} test th1-encode64-3 {$RESULT eq \ "IyEvcGF0aC90by9mb3NzaWwvYmluYXJ5CnJlcG9zaXRvcnk6IC9wYXRoL3RvL3JlcG8uZnNsCg=="} |
Changes to tools/cvs2fossil/changeset.
︙ | ︙ | |||
12 13 14 15 16 17 18 | # individuals. For exact contribution history, see the revision # history and logs, available at http://fossil-scm.hwaci.com/fossil # # ## ### ##### ######## ############# ##################### ## Helper application, debugging of cvs2fossil. This application ## extracts all information about a changeset and writes it nicely ## formatted to stdout. The changeset is specified by its internal | | | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | # individuals. For exact contribution history, see the revision # history and logs, available at http://fossil-scm.hwaci.com/fossil # # ## ### ##### ######## ############# ##################### ## Helper application, debugging of cvs2fossil. This application ## extracts all information about a changeset and writes it nicely ## formatted to stdout. The changeset is specified by its internal ## numerical id. # # ## ### ##### ######## ############# ##################### ## Requirements, extended package management for local packages. lappend auto_path [file join [file dirname [info script]] lib] package require Tcl 8.4 ; # Required runtime. |
︙ | ︙ |
Changes to tools/cvs2fossil/lib/c2f_pbreakacycle.tcl.
︙ | ︙ | |||
268 269 270 271 272 273 274 | foreach item [array names limits] { set mins $minsa($item) set maxp $maxp($item) # Note that for the min successor position "" represents # +infinity integrity assert { | | | 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 | foreach item [array names limits] { set mins $minsa($item) set maxp $maxp($item) # Note that for the min successor position "" represents # +infinity integrity assert { ($mins eq "") || ($maxp < $mins) } {Item <$item> is backward at file level ($maxp >= $mins)} } # Save the limits for the splitter, and compute the border at # which to split as the minimum of all minimal successor # positions. |
︙ | ︙ |
Changes to tools/cvs2fossil/lib/c2f_prev.tcl.
︙ | ︙ | |||
1177 1178 1179 1180 1181 1182 1183 | # List of all known changesets of a type. typevariable mytchangesets -array { sym::branch {} sym::tag {} rev {} } | | | 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 | # List of all known changesets of a type. typevariable mytchangesets -array { sym::branch {} sym::tag {} rev {} } typevariable myitemmap -array {} ; # Map from items (tagged) # to the list of changesets # containing it. Each item # can be used by only one # changeset. typevariable myidmap -array {} ; # Map from changeset id to # changeset. |
︙ | ︙ |
Changes to tools/cvs2fossil/lib/mem.tcl.
︙ | ︙ | |||
46 47 48 49 50 51 52 | variable lcba variable lmba variable mid struct::list assign [minfo] _ _ _ cba _ mba | | | | 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | variable lcba variable lmba variable mid struct::list assign [minfo] _ _ _ cba _ mba set dc [expr $cba - $lcba] ; set lcba $cba set dm [expr $mba - $lmba] ; set lmba $mba # projection: 1 2 3 4 5 6 7 6 8 10 return "[F [incr mid]] | [F $cba] | [F $dc] | [F $mba] | [F $dm] |=| " } proc mark {} { variable track ; if {!$track} return |
︙ | ︙ |
Changes to tools/fossilwiki.
︙ | ︙ | |||
45 46 47 48 49 50 51 | while ( $text =~ m/\[([^][]+)\]/g ) { push @links,$1; } $numlinks = $#links; | | | | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | while ( $text =~ m/\[([^][]+)\]/g ) { push @links,$1; } $numlinks = $#links; if (@links == ()) { push @terminals, $page; } else { my @internals = grep { $_ !~ /(http:)|(mailto:)|(https:)/ } @links; if (@internals == ()) { push @nointernals, $page; } else { @{$links{$page}{'links'}} = map {my ($a,$b) = split /\|/; $a;} @internals; foreach $internal ( @internals ) |
︙ | ︙ | |||
114 115 116 117 118 119 120 | foreach $link ( keys %badlinks ) { print ("badlink: '$link'\n"); } foreach $page ( sort keys %links ) { my @links = @{$links{$page}{'links'}}; | | | 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | foreach $link ( keys %badlinks ) { print ("badlink: '$link'\n"); } foreach $page ( sort keys %links ) { my @links = @{$links{$page}{'links'}}; if (@links != ()) { if ($page eq $mainpage) { print "links: *** '$page' *** -> ", join (", ", @links), "\n"; } else { print "links: '$page' -> ", join (", ", @links), "\n"; } } } |
Changes to win/Makefile.PellesCGMake.
︙ | ︙ | |||
81 82 83 84 85 86 87 | UTILS_OBJ=$(UTILS:.exe=.obj) UTILS_SRC=$(foreach uf,$(UTILS),$(SRCDIR)$(uf:.exe=.c)) # define the SQLite files, which need special flags on compile SQLITESRC=sqlite3.c ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR)$(sf)) SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj)) | | | 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | UTILS_OBJ=$(UTILS:.exe=.obj) UTILS_SRC=$(foreach uf,$(UTILS),$(SRCDIR)$(uf:.exe=.c)) # define the SQLite files, which need special flags on compile SQLITESRC=sqlite3.c ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR)$(sf)) SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj)) SQLITEDEFINES=-DNDEBUG=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS5 -DSQLITE_WIN32_NO_ANSI # define the SQLite shell files, which need special flags on compile SQLITESHELLSRC=shell.c ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf)) SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj)) SQLITESHELLDEFINES=-Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=file_access -Dsystem=fossil_system -Dgetenv=fossil_getenv -Dfopen=fossil_fopen |
︙ | ︙ |
Changes to win/Makefile.dmc.
︙ | ︙ | |||
22 23 24 25 26 27 28 | SSL = CFLAGS = -o BCC = $(DMDIR)\bin\dmc $(CFLAGS) TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL) LIBS = $(DMDIR)\extra\lib\ zlib wsock32 advapi32 | | | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | SSL = CFLAGS = -o BCC = $(DMDIR)\bin\dmc $(CFLAGS) TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL) LIBS = $(DMDIR)\extra\lib\ zlib wsock32 advapi32 SQLITE_OPTIONS = -DNDEBUG=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS5 SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=file_access -Dsystem=fossil_system -Dgetenv=fossil_getenv -Dfopen=fossil_fopen SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c builtin_.c bundle_.c cache_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c foci_.c fusefs_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c loadctrl_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c piechart_.c pivot_.c popen_.c pqueue_.c printf_.c publish_.c purge_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c sitemap_.c skins_.c sqlcmd_.c stash_.c stat_.c statrep_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\builtin$O $(OBJDIR)\bundle$O $(OBJDIR)\cache$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\foci$O $(OBJDIR)\fusefs$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_finfo$O $(OBJDIR)\json_login$O $(OBJDIR)\json_query$O $(OBJDIR)\json_report$O $(OBJDIR)\json_status$O $(OBJDIR)\json_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\loadctrl$O $(OBJDIR)\login$O $(OBJDIR)\lookslike$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\markdown$O $(OBJDIR)\markdown_html$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\moderate$O $(OBJDIR)\name$O $(OBJDIR)\path$O $(OBJDIR)\piechart$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\publish$O $(OBJDIR)\purge$O $(OBJDIR)\rebuild$O $(OBJDIR)\regexp$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\sitemap$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\statrep$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\unicode$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$O $(OBJDIR)\util$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winfile$O $(OBJDIR)\winhttp$O $(OBJDIR)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O |
︙ | ︙ |
Changes to win/Makefile.mingw.
︙ | ︙ | |||
54 55 56 57 58 59 60 61 62 63 64 65 66 67 | # # FOSSIL_ENABLE_SSL = 1 #### Automatically build OpenSSL when building Fossil (causes rebuild # issues when building incrementally). # # FOSSIL_BUILD_SSL = 1 #### Enable legacy treatment of mv/rm (skip checkout files) # # FOSSIL_ENABLE_LEGACY_MV_RM = 1 #### Enable TH1 scripts in embedded documentation files # | > > > > | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | # # FOSSIL_ENABLE_SSL = 1 #### Automatically build OpenSSL when building Fossil (causes rebuild # issues when building incrementally). # # FOSSIL_BUILD_SSL = 1 #### Enable relative paths in external diff/gdiff # # FOSSIL_ENABLE_EXEC_REL_PATHS = 1 #### Enable legacy treatment of mv/rm (skip checkout files) # # FOSSIL_ENABLE_LEGACY_MV_RM = 1 #### Enable TH1 scripts in embedded documentation files # |
︙ | ︙ | |||
259 260 261 262 263 264 265 266 267 268 269 270 271 272 | endif # With HTTPS support ifdef FOSSIL_ENABLE_SSL TCC += -DFOSSIL_ENABLE_SSL=1 RCC += -DFOSSIL_ENABLE_SSL=1 endif # With legacy treatment of mv/rm ifdef FOSSIL_ENABLE_LEGACY_MV_RM TCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1 RCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1 endif | > > > > > > | 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 | endif # With HTTPS support ifdef FOSSIL_ENABLE_SSL TCC += -DFOSSIL_ENABLE_SSL=1 RCC += -DFOSSIL_ENABLE_SSL=1 endif # With relative paths in external diff/gdiff ifdef FOSSIL_ENABLE_EXEC_REL_PATHS TCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1 RCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1 endif # With legacy treatment of mv/rm ifdef FOSSIL_ENABLE_LEGACY_MV_RM TCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1 RCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1 endif |
︙ | ︙ | |||
2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 | -DSQLITE_THREADSAFE=0 \ -DSQLITE_DEFAULT_FILE_FORMAT=4 \ -DSQLITE_OMIT_DEPRECATED \ -DSQLITE_ENABLE_EXPLAIN_COMMENTS \ -DSQLITE_ENABLE_FTS4 \ -DSQLITE_ENABLE_FTS3_PARENTHESIS \ -DSQLITE_ENABLE_DBSTAT_VTAB \ -DSQLITE_WIN32_NO_ANSI \ -D_HAVE__MINGW_H \ -DSQLITE_USE_MALLOC_H \ -DSQLITE_USE_MSIZE SHELL_OPTIONS = -Dmain=sqlite3_shell \ -DSQLITE_OMIT_LOAD_EXTENSION=1 \ | > > | 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 | -DSQLITE_THREADSAFE=0 \ -DSQLITE_DEFAULT_FILE_FORMAT=4 \ -DSQLITE_OMIT_DEPRECATED \ -DSQLITE_ENABLE_EXPLAIN_COMMENTS \ -DSQLITE_ENABLE_FTS4 \ -DSQLITE_ENABLE_FTS3_PARENTHESIS \ -DSQLITE_ENABLE_DBSTAT_VTAB \ -DSQLITE_ENABLE_JSON1 \ -DSQLITE_ENABLE_FTS5 \ -DSQLITE_WIN32_NO_ANSI \ -D_HAVE__MINGW_H \ -DSQLITE_USE_MALLOC_H \ -DSQLITE_USE_MSIZE SHELL_OPTIONS = -Dmain=sqlite3_shell \ -DSQLITE_OMIT_LOAD_EXTENSION=1 \ |
︙ | ︙ |
Changes to win/Makefile.mingw.mistachkin.
︙ | ︙ | |||
54 55 56 57 58 59 60 61 62 63 64 65 66 67 | # FOSSIL_ENABLE_SSL = 1 #### Automatically build OpenSSL when building Fossil (causes rebuild # issues when building incrementally). # # FOSSIL_BUILD_SSL = 1 #### Enable legacy treatment of mv/rm (skip checkout files) # FOSSIL_ENABLE_LEGACY_MV_RM = 1 #### Enable TH1 scripts in embedded documentation files # | > > > > | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | # FOSSIL_ENABLE_SSL = 1 #### Automatically build OpenSSL when building Fossil (causes rebuild # issues when building incrementally). # # FOSSIL_BUILD_SSL = 1 #### Enable relative paths in external diff/gdiff # # FOSSIL_ENABLE_EXEC_REL_PATHS = 1 #### Enable legacy treatment of mv/rm (skip checkout files) # FOSSIL_ENABLE_LEGACY_MV_RM = 1 #### Enable TH1 scripts in embedded documentation files # |
︙ | ︙ | |||
259 260 261 262 263 264 265 266 267 268 269 270 271 272 | endif # With HTTPS support ifdef FOSSIL_ENABLE_SSL TCC += -DFOSSIL_ENABLE_SSL=1 RCC += -DFOSSIL_ENABLE_SSL=1 endif # With legacy treatment of mv/rm ifdef FOSSIL_ENABLE_LEGACY_MV_RM TCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1 RCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1 endif | > > > > > > | 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 | endif # With HTTPS support ifdef FOSSIL_ENABLE_SSL TCC += -DFOSSIL_ENABLE_SSL=1 RCC += -DFOSSIL_ENABLE_SSL=1 endif # With relative paths in external diff/gdiff ifdef FOSSIL_ENABLE_EXEC_REL_PATHS TCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1 RCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1 endif # With legacy treatment of mv/rm ifdef FOSSIL_ENABLE_LEGACY_MV_RM TCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1 RCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1 endif |
︙ | ︙ | |||
2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 | -DSQLITE_THREADSAFE=0 \ -DSQLITE_DEFAULT_FILE_FORMAT=4 \ -DSQLITE_OMIT_DEPRECATED \ -DSQLITE_ENABLE_EXPLAIN_COMMENTS \ -DSQLITE_ENABLE_FTS4 \ -DSQLITE_ENABLE_FTS3_PARENTHESIS \ -DSQLITE_ENABLE_DBSTAT_VTAB \ -DSQLITE_WIN32_NO_ANSI \ -D_HAVE__MINGW_H \ -DSQLITE_USE_MALLOC_H \ -DSQLITE_USE_MSIZE SHELL_OPTIONS = -Dmain=sqlite3_shell \ -DSQLITE_OMIT_LOAD_EXTENSION=1 \ | > > | 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 | -DSQLITE_THREADSAFE=0 \ -DSQLITE_DEFAULT_FILE_FORMAT=4 \ -DSQLITE_OMIT_DEPRECATED \ -DSQLITE_ENABLE_EXPLAIN_COMMENTS \ -DSQLITE_ENABLE_FTS4 \ -DSQLITE_ENABLE_FTS3_PARENTHESIS \ -DSQLITE_ENABLE_DBSTAT_VTAB \ -DSQLITE_ENABLE_JSON1 \ -DSQLITE_ENABLE_FTS5 \ -DSQLITE_WIN32_NO_ANSI \ -D_HAVE__MINGW_H \ -DSQLITE_USE_MALLOC_H \ -DSQLITE_USE_MSIZE SHELL_OPTIONS = -Dmain=sqlite3_shell \ -DSQLITE_OMIT_LOAD_EXTENSION=1 \ |
︙ | ︙ |
Changes to win/Makefile.msc.
︙ | ︙ | |||
44 45 46 47 48 49 50 51 52 53 54 55 56 57 | FOSSIL_BUILD_ZLIB = 1 !endif # Link everything except SQLite dynamically? !ifndef FOSSIL_DYNAMIC_BUILD FOSSIL_DYNAMIC_BUILD = 0 !endif # Enable the JSON API? !ifndef FOSSIL_ENABLE_JSON FOSSIL_ENABLE_JSON = 0 !endif # Enable legacy treatment of the mv/rm commands? | > > > > > | 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | FOSSIL_BUILD_ZLIB = 1 !endif # Link everything except SQLite dynamically? !ifndef FOSSIL_DYNAMIC_BUILD FOSSIL_DYNAMIC_BUILD = 0 !endif # Enable relative paths in external diff/gdiff? !ifndef FOSSIL_ENABLE_EXEC_REL_PATHS FOSSIL_ENABLE_EXEC_REL_PATHS = 0 !endif # Enable the JSON API? !ifndef FOSSIL_ENABLE_JSON FOSSIL_ENABLE_JSON = 0 !endif # Enable legacy treatment of the mv/rm commands? |
︙ | ︙ | |||
262 263 264 265 266 267 268 269 270 271 272 273 274 275 | !if $(FOSSIL_ENABLE_SSL)!=0 TCC = $(TCC) /DFOSSIL_ENABLE_SSL=1 RCC = $(RCC) /DFOSSIL_ENABLE_SSL=1 LIBS = $(LIBS) $(SSLLIB) LIBDIR = $(LIBDIR) /LIBPATH:$(SSLLIBDIR) !endif !if $(FOSSIL_ENABLE_LEGACY_MV_RM)!=0 TCC = $(TCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1 RCC = $(RCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1 !endif !if $(FOSSIL_ENABLE_TH1_DOCS)!=0 | > > > > > | 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 | !if $(FOSSIL_ENABLE_SSL)!=0 TCC = $(TCC) /DFOSSIL_ENABLE_SSL=1 RCC = $(RCC) /DFOSSIL_ENABLE_SSL=1 LIBS = $(LIBS) $(SSLLIB) LIBDIR = $(LIBDIR) /LIBPATH:$(SSLLIBDIR) !endif !if $(FOSSIL_ENABLE_EXEC_REL_PATHS)!=0 TCC = $(TCC) /DFOSSIL_ENABLE_EXEC_REL_PATHS=1 RCC = $(RCC) /DFOSSIL_ENABLE_EXEC_REL_PATHS=1 !endif !if $(FOSSIL_ENABLE_LEGACY_MV_RM)!=0 TCC = $(TCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1 RCC = $(RCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1 !endif !if $(FOSSIL_ENABLE_TH1_DOCS)!=0 |
︙ | ︙ | |||
299 300 301 302 303 304 305 306 307 308 309 310 311 312 | /DSQLITE_THREADSAFE=0 \ /DSQLITE_DEFAULT_FILE_FORMAT=4 \ /DSQLITE_OMIT_DEPRECATED \ /DSQLITE_ENABLE_EXPLAIN_COMMENTS \ /DSQLITE_ENABLE_FTS4 \ /DSQLITE_ENABLE_FTS3_PARENTHESIS \ /DSQLITE_ENABLE_DBSTAT_VTAB \ /DSQLITE_WIN32_NO_ANSI SHELL_OPTIONS = /Dmain=sqlite3_shell \ /DSQLITE_OMIT_LOAD_EXTENSION=1 \ /DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) \ /DSQLITE_SHELL_DBNAME_PROC=fossil_open \ /Daccess=file_access \ | > > | 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 | /DSQLITE_THREADSAFE=0 \ /DSQLITE_DEFAULT_FILE_FORMAT=4 \ /DSQLITE_OMIT_DEPRECATED \ /DSQLITE_ENABLE_EXPLAIN_COMMENTS \ /DSQLITE_ENABLE_FTS4 \ /DSQLITE_ENABLE_FTS3_PARENTHESIS \ /DSQLITE_ENABLE_DBSTAT_VTAB \ /DSQLITE_ENABLE_JSON1 \ /DSQLITE_ENABLE_FTS5 \ /DSQLITE_WIN32_NO_ANSI SHELL_OPTIONS = /Dmain=sqlite3_shell \ /DSQLITE_OMIT_LOAD_EXTENSION=1 \ /DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) \ /DSQLITE_SHELL_DBNAME_PROC=fossil_open \ /Daccess=file_access \ |
︙ | ︙ |
Changes to win/fossil.rc.
︙ | ︙ | |||
123 124 125 126 127 128 129 130 131 132 133 134 135 136 | VALUE "SslEnabled", "Yes, " OPENSSL_VERSION_TEXT "\0" #endif /* defined(FOSSIL_ENABLE_SSL) */ #if defined(FOSSIL_ENABLE_LEGACY_MV_RM) VALUE "LegacyMvRm", "Yes\0" #else VALUE "LegacyMvRm", "No\0" #endif /* defined(FOSSIL_ENABLE_LEGACY_MV_RM) */ #if defined(FOSSIL_ENABLE_TH1_DOCS) VALUE "Th1Docs", "Yes\0" #else VALUE "Th1Docs", "No\0" #endif /* defined(FOSSIL_ENABLE_TH1_DOCS) */ #if defined(FOSSIL_ENABLE_TH1_HOOKS) VALUE "Th1Hooks", "Yes\0" | > > > > > | 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | VALUE "SslEnabled", "Yes, " OPENSSL_VERSION_TEXT "\0" #endif /* defined(FOSSIL_ENABLE_SSL) */ #if defined(FOSSIL_ENABLE_LEGACY_MV_RM) VALUE "LegacyMvRm", "Yes\0" #else VALUE "LegacyMvRm", "No\0" #endif /* defined(FOSSIL_ENABLE_LEGACY_MV_RM) */ #if defined(FOSSIL_ENABLE_EXEC_REL_PATHS) VALUE "ExecRelPaths", "Yes\0" #else VALUE "ExecRelPaths", "No\0" #endif /* defined(FOSSIL_ENABLE_EXEC_REL_PATHS) */ #if defined(FOSSIL_ENABLE_TH1_DOCS) VALUE "Th1Docs", "Yes\0" #else VALUE "Th1Docs", "No\0" #endif /* defined(FOSSIL_ENABLE_TH1_DOCS) */ #if defined(FOSSIL_ENABLE_TH1_HOOKS) VALUE "Th1Hooks", "Yes\0" |
︙ | ︙ |
Changes to www/changes.wiki.
1 2 | <title>Change Log</title> | | < < > > > > > > > > | | | | | | | | < < > > > > > | > | > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | <title>Change Log</title> <h2>Changes for Version 1.34 (2015-11-02)</h2> * Make the [/help?cmd=clean|fossil clean] command undoable for files less than 10MiB. * Update internal Unicode character tables, used in regular expression handling, from version 7.0 to 8.0. * Add the new [/help?cmd=amend|amend] command which is used to modify tags of a "check-in". * Fix bug in [/help?cmd=import|import] command, handling version 3 of the svndump format for subversion. * Add the [/help?cmd=all|all cache] command. * TH1 enhancements: <ul><li>Add minimal <nowiki>[lsearch]</nowiki> command. Only exact case-sensitive matching is supported.</li> <li>Add the <nowiki>[glob_match]</nowiki>, <nowiki>[markdown]</nowiki>, <nowiki>[dir]</nowiki>, and <nowiki>[encode64]</nowiki> commands.</li> <li>Add the <nowiki>[tclIsSafe] and [tclMakeSafe]</nowiki> commands to the Tcl integration subsystem.</li> <li>Add 'double', 'integer', and 'list' classes to the <nowiki>[string is]</nowiki> command.</li> </ul> * Add the --undo option to the [/help?cmd=diff|diff] command. * Build-in Antirez's "linenoise" command-line editing library for use with the [/help?cmd=sqlite3|fossil sql] command on Unix platforms. * Add [/help?cmd=stash|stash cat] as an alias for the [/help?cmd=stash|stash show] command. * Automatically pull before [/help?cmd=merge|fossil merge] when auto-sync is enabled. * Fix --hard option to [/help?cmd=mv|fossil mv] and [/help?cmd=rm|fossil rm] to enable them to work properly with certain relative paths. * Change the mimetype for ".n" and ".man" files to text/plain. * Display improvements in the [/help?cmd=bisect|fossil bisect chart] command. * Updated the built-in SQLite to version 3.9.1 and activated JSON1 and FTS5 support (both currently unused within Fossil). <h2>Changes for Version 1.33 (2015-05-23)</h2> * Improved fork detection on [/help?cmd=update|fossil update], [/help?cmd=status|fossil status] and related commands. * Change the default skin to what used to be called "San Francisco Modern". * Add the [/repo-tabsize] web page * Add [/help?cmd=import|fossil import --svn], for importing a subversion |
︙ | ︙ |
Changes to www/copyright-release.html.
1 2 3 4 5 6 7 8 9 10 | <h1 align="center"> Fossil SCM Contributor Agreement </h1> <p> This agreement applies to your contribution of material to the Fossil Software Configuration Management System ("Fossil") that is managed by Hipp, Wyrick & Company, Inc. ("Hwaci") and sets out the intellectual property rights you grant to Hwaci in the contributed material. | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | <h1 align="center"> Fossil SCM Contributor Agreement </h1> <p> This agreement applies to your contribution of material to the Fossil Software Configuration Management System ("Fossil") that is managed by Hipp, Wyrick & Company, Inc. ("Hwaci") and sets out the intellectual property rights you grant to Hwaci in the contributed material. The terms "contribution" and "contributed material" mean any source code, object code, patch, tool, sample, graphic, specification, manual, documentation, or any other material posted, submitted, or uploaded by you to the Fossil project. The term "you" means the person identified and signing at the bottom of this document. If your contribution is on behalf of a company, the term "you" also means the company identified in the signature area below. <ol> |
︙ | ︙ | |||
31 32 33 34 35 36 37 | contribution as if each of us were the sole owners, and if one of us makes a derivative work of your contribution, the one who makes (or has made) the derivative work will be the sole owner of that derivative work. <li> You agree that you will not assert any moral rights in your contribution against Hwaci, Hwaci's licensees or transferees, or any other user or consumer of your contribution. | | | 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | contribution as if each of us were the sole owners, and if one of us makes a derivative work of your contribution, the one who makes (or has made) the derivative work will be the sole owner of that derivative work. <li> You agree that you will not assert any moral rights in your contribution against Hwaci, Hwaci's licensees or transferees, or any other user or consumer of your contribution. <li> You agree that Hwaci may register a copyright in your contribution and exercise all ownership rights associated with it. <li> You agree that neither you nor Hwaci has any duty to consult with, obtain the consent of, or pay or render an accounting to the other for any use or distribution of your contribution. </ul> <li><p> |
︙ | ︙ | |||
71 72 73 74 75 76 77 | company (if applicable). </ul> </ol> <p>By filling in the following information and signing your name, you agree to be bound by all of the terms set forth in this agreement. Please print clearly.</p> | | | 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | company (if applicable). </ul> </ol> <p>By filling in the following information and signing your name, you agree to be bound by all of the terms set forth in this agreement. Please print clearly.</p> <center> <p><table width="80%" border="1" cellpadding="0" cellspacing="0"> <tr><td width="20%" valign="top">Your name & email:</td><td width="80%"> <!-- Replace this line with your name and email --> <p> </td></tr> |
︙ | ︙ |
Changes to www/customgraph.md.
︙ | ︙ | |||
8 9 10 11 12 13 14 | Fossil includes several options for changing the graph's style without having to delve into CSS. These can be found in the details.txt file of your skin or under Admin/Skins/Details in the web UI. * ###`timeline-arrowheads` Set this to `0` to hide arrowheads on primary child lines. | | | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | Fossil includes several options for changing the graph's style without having to delve into CSS. These can be found in the details.txt file of your skin or under Admin/Skins/Details in the web UI. * ###`timeline-arrowheads` Set this to `0` to hide arrowheads on primary child lines. * ###`timeline-circle-nodes` Set this to `1` to make check-in nodes circular instead of square. * ###`timeline-color-graph-lines` Set this to `1` to colorize primary child lines. |
︙ | ︙ | |||
41 42 43 44 45 46 47 | ## <a id="pos-elems"></a>Positioning Elements These elements aren't intended to be seen. They're only used to help position the graph and its visible elements. * ###<a id="tl-canvas"></a>`.tl-canvas` | | | | | 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | ## <a id="pos-elems"></a>Positioning Elements These elements aren't intended to be seen. They're only used to help position the graph and its visible elements. * ###<a id="tl-canvas"></a>`.tl-canvas` Set the left and right margins on this class to give the desired amount of space between the graph and its adjacent columns in the timeline. #### Additional Classes * `.sel`: See [`.tl-node`](#tl-node) for more information. * ###<a id="tl-rail"></a>`.tl-rail` Think of rails as invisible vertical lines on which check-in nodes are placed. The more simultaneous branches in a graph, the more rails required to draw it. Setting the `width` property on this class determines the |
︙ | ︙ | |||
82 83 84 85 86 87 88 | These are the elements you can actually see on the timeline graph: the nodes, arrows, and lines. Each of these elements may also have additional classes attached to them, depending on their context. * ###<a id="tl-node"></a>`.tl-node` A node exists for each check-in in the timeline. | | | | | | | | | | | | | | 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | These are the elements you can actually see on the timeline graph: the nodes, arrows, and lines. Each of these elements may also have additional classes attached to them, depending on their context. * ###<a id="tl-node"></a>`.tl-node` A node exists for each check-in in the timeline. #### Additional Classes * `.leaf`: Specifies that the check-in is a leaf (i.e. that it has no children in the same branch). * `.merge`: Specifies that the check-in contains a merge. * `.sel`: When the user clicks a node to designate it as the beginning of a diff, this class is added to both the node itself and the [`.tl-canvas`](#tl-canvas) element. The class is removed from both elements when the node is clicked again. * ###<a id="tl-arrow"></a>`.tl-arrow` Arrows point from parent nodes to their children. Technically, this class is just for the arrowhead. The rest of the arrow is composed of [`.tl-line`](#tl-line) elements. There are six additional classes that are used to distinguish the different types of arrows. However, only these combinations are valid: * `.u`: Up arrow that points to a child from its primary parent. * `.u.sm`: Smaller up arrow, used when there is limited space between parent and child nodes. * `.merge.l` or `.merge.r`: Merge arrow pointing either to the left or right. * `.warp`: A timewarped arrow (always points to the right), used when a misconfigured clock makes a check-in appear to have occurred before its parent ([example](https://www.sqlite.org/src/timeline?c=2010-09-29&nd)). * ###<a id="tl-line"></a>`.tl-line` Along with arrows, lines connect parent and child nodes. Line thickness is determined by the `width` property, regardless of whether the line is horizontal or vertical. You can also use borders to create special line styles. Here's a CSS snippet for making dotted merge lines: .tl-line.merge { width: 0; background: transparent; border: 0 dotted #000; } .tl-line.merge.h { border-top-width: 1px; } .tl-line.merge.v { border-left-width: 1px; } #### Additional Classes * `.merge`: A merge line. * `.h` or `.v`: Horizontal or vertical. * `.warp`: A timewarped line. ## <a id="default-css"></a>Default Timeline Graph CSS .tl-canvas { margin: 0 6px 0 10px; |
︙ | ︙ |
Changes to www/customskin.md.
︙ | ︙ | |||
52 53 54 55 56 57 58 | "footer.txt", and "header.txt", that describe the CSS, rendering options, footer, and header for that skin, respectively. The skin of a repository can be changed to any of the built-in skins using the web interface by going to the /setup_skin web page (requires Admin privileges) and clicking the appropriate button. Or, the --skin command | | | | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | "footer.txt", and "header.txt", that describe the CSS, rendering options, footer, and header for that skin, respectively. The skin of a repository can be changed to any of the built-in skins using the web interface by going to the /setup_skin web page (requires Admin privileges) and clicking the appropriate button. Or, the --skin command line option can be used for the [fossil ui](../../../help?cmd=ui) or [fossil server](../../../help?cmd=server) commands to force that particular instance of Fossil to use the specified built-in skin. Sharing Skins ------------- The skin of a repository is not part of the versioned state and does not "push" or "pull" like checked-in files. The skin is local to the repository. However, skins can be shared between repositories using the [fossil config](../../../help?cmd=configuration) command. The "fossil config push skin" command will send the local skin to a remote repository and the "fossil config pull skin" command will import a skin from a remote repository. The "fossil config export skin FILENAME" will export the skin for a repository into a file FILENAME. This file can then be imported into a different repository using the |
︙ | ︙ | |||
91 92 93 94 95 96 97 | the skin of the repository from which it was cloned. Header And Footer Processing ---------------------------- The header.txt and footer.txt files of a scan are merely the HTML text of the header and footer. Except, before being prepended and appended to | | | 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | the skin of the repository from which it was cloned. Header And Footer Processing ---------------------------- The header.txt and footer.txt files of a scan are merely the HTML text of the header and footer. Except, before being prepended and appended to the content, the header and footer text are run through a [TH1 interpreter](./th1.md) that might adjust the text as follows: * All text within <th1>...</th1> is elided from the output and that text is instead run as a TH1 script. That TH1 script has the opportunity to insert new text in place of itself, or to inhibit or enable the output of subsequent text. |
︙ | ︙ | |||
136 137 138 139 140 141 142 | and for all scripts contained within them both. Hence, any global TH1 variables that are set by the header are available to the footer. TH1 Variables ------------- Before expanding the TH1 within the header and footer, Fossil first | | | 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | and for all scripts contained within them both. Hence, any global TH1 variables that are set by the header are available to the footer. TH1 Variables ------------- Before expanding the TH1 within the header and footer, Fossil first initializes a number of TH1 variables to values that depend on respository settings and the specific page being generated. * **project_name** - The project_name variable is filled with the name of the project as configured under the Admin/Configuration menu. * **title** - The title variable holds the title of the page being |
︙ | ︙ | |||
160 161 162 163 164 165 166 | * **secureurl** - The same as $baseurl except that if the scheme is "http:" it is changed to "https:" * **home** - The $baseurl without the scheme and hostname. For example, if the $baseurl is "http://projectX.com/cgi-bin/fossil" then the $home will be just "/cgi-bin/fossil". | | | | 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 | * **secureurl** - The same as $baseurl except that if the scheme is "http:" it is changed to "https:" * **home** - The $baseurl without the scheme and hostname. For example, if the $baseurl is "http://projectX.com/cgi-bin/fossil" then the $home will be just "/cgi-bin/fossil". * **index_page** - The landing page URI as specified by the Admin/Configuration setup page. * **current_page** - The name of the page currently being processed, without the leading "/" and without query parameters. Examples: "timeline", "doc/trunk/README.txt", "wiki". * **csrf_token** - A token used to prevent cross-site request forgery. * **release_version** - The release version of Fossil. Ex: "1.31" * **manifest_version** - A prefix on the SHA1 check-in hash of the specific version of fossil that is running. Ex: "\[47bb6432a1\]" |
︙ | ︙ |
Changes to www/fossil_prompt.sh.
1 2 3 4 5 6 7 8 9 10 11 12 | #------------------------------------------------------------------------- # get_fossil_data() # # If the current directory is part of a fossil checkout, then populate # a series of global variables based on the current state of that # checkout. Variables are populated based on the output of the [fossil info] # command. # # If the current directory is not part of a fossil checkout, set global # variable $fossil_info_project_name to an empty string and return. # | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | #------------------------------------------------------------------------- # get_fossil_data() # # If the current directory is part of a fossil checkout, then populate # a series of global variables based on the current state of that # checkout. Variables are populated based on the output of the [fossil info] # command. # # If the current directory is not part of a fossil checkout, set global # variable $fossil_info_project_name to an empty string and return. # function get_fossil_data() { fossil_info_project_name="" eval `get_fossil_data2` } function get_fossil_data2() { fossil info 2> /dev/null | sed 's/"//g'|grep "^[^ ]*:" | while read LINE ; do local field=`echo $LINE | sed 's/:.*$//' | sed 's/-/_/'` local value=`echo $LINE | sed 's/^[^ ]*: *//'` echo fossil_info_${field}=\"${value}\" done } #------------------------------------------------------------------------- # set_prompt() # # Set the PS1 variable. If the current directory is part of a fossil # checkout then the prompt contains information relating to the state # of the checkout. # # Otherwise, if the current directory is not part of a fossil checkout, it # is set to a fairly standard bash prompt containing the host name, user # name and current directory. # function set_prompt() { get_fossil_data if [ -n "$fossil_info_project_name" ] ; then project=$fossil_info_project_name checkout=`echo $fossil_info_checkout | sed 's/^\(........\).*/\1/'` date=`echo $fossil_info_checkout | sed 's/^[^ ]* *..//' | sed 's/:[^:]*$//'` tags=$fossil_info_tags local_root=`echo $fossil_info_local_root | sed 's/\/$//'` local=`pwd | sed "s*${local_root}**" | sed "s/^$/\//"` |
︙ | ︙ |
Changes to www/makefile.wiki.
︙ | ︙ | |||
69 70 71 72 73 74 75 | The src/ subdirectory also contains documentation about the makeheaders preprocessor program: 11. [../src/makeheaders.html | makeheaders.html] Click on the link to read this documentation. In addition there is | | | 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | The src/ subdirectory also contains documentation about the makeheaders preprocessor program: 11. [../src/makeheaders.html | makeheaders.html] Click on the link to read this documentation. In addition there is a [http://www.tcl-lang.org/ | Tcl] script used to build the various makefiles: 12. makemake.tcl Running this Tcl script will automatically regenerate all makefiles. In order to add a new source file to the Fossil implementation, simply edit makemake.tcl to add the new filename, then rerun the script, and all of the makefiles for all targets will be rebuild. |
︙ | ︙ |
Changes to www/mkdownload.tcl.
︙ | ︙ | |||
68 69 70 71 72 73 74 | puts $out "<center><b><a href=\"$hr\">Version $vers</a></b></center>" puts $out "</td></tr>" puts $out "<tr>" foreach {prefix suffix img desc} { fossil-linux-x86 zip linux.gif {Linux 3.x x86} fossil-macosx-x86 zip mac.gif {Mac 10.x x86} | | | 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | puts $out "<center><b><a href=\"$hr\">Version $vers</a></b></center>" puts $out "</td></tr>" puts $out "<tr>" foreach {prefix suffix img desc} { fossil-linux-x86 zip linux.gif {Linux 3.x x86} fossil-macosx-x86 zip mac.gif {Mac 10.x x86} fossil-openbsd-x86 zip openbsd.gif {OpenBSD 5.x x86} fossil-w32 zip win32.gif {Windows} fossil-src tar.gz src.gif {Source Tarball} } { set filename download/$prefix-$vers.$suffix if {[file exists $filename]} { set size [file size $filename] set units bytes |
︙ | ︙ |
Changes to www/quotes.wiki.
︙ | ︙ | |||
75 76 77 78 79 80 81 82 83 84 85 86 | <li>If programmers _really_ wanted to help scientists, they'd build a version control system that was more usable than Git. <blockquote> <i>Tweet by Greg Wilson @gvwilson on 2015-02-22 17:47</i> </blockquote> </ol> <h2>On The Usability Of Fossil:</h2> <ol> | > > > > | | 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | <li>If programmers _really_ wanted to help scientists, they'd build a version control system that was more usable than Git. <blockquote> <i>Tweet by Greg Wilson @gvwilson on 2015-02-22 17:47</i> </blockquote> <li><img src='xkcd-git.gif' align='top'> <blockquote><i>Randall Munroe. [http://xkcd.com/1597/]</i></blockquote> </ol> <h2>On The Usability Of Fossil:</h2> <ol> <li value=11> Fossil mesmerizes me with simplicity especially after I struggled to get a bug-tracking system to work with mercurial. <blockquote> <i>rawjeev at [http://stackoverflow.com/questions/156322/what-do-people-think-of-the-fossil-dvcs]</i> </blockquote> |
︙ | ︙ | |||
120 121 122 123 124 125 126 | </ol> <h2>On Git Versus Fossil</h2> <ol> | | | 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | </ol> <h2>On Git Versus Fossil</h2> <ol> <li value=15> Just want to say thanks for fossil making my life easier.... Also <nowiki>[for]</nowiki> not having a misanthropic command line interface. <blockquote> <i>Joshua Paine at [http://www.mail-archive.com/fossil-users@lists.fossil-scm.org/msg02736.html]</i> </blockquote> |
︙ | ︙ |
Changes to www/stats.wiki.
︙ | ︙ | |||
30 31 32 33 34 35 36 | <td>3.4 GB <td>45.5 MB <td>73:1 <td>29.9 MB </tr> <tr align="center"> | | | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | <td>3.4 GB <td>45.5 MB <td>73:1 <td>29.9 MB </tr> <tr align="center"> <td>[http://core.tcl-lang.org/tcl/timeline | TCL] <td>139662 <td>18125 <td>6183 days<br>16.93 years <td>6.6 GB <td>192.6 MB <td>34:1 <td>117.1 MB |
︙ | ︙ |
Changes to www/th1.md.
︙ | ︙ | |||
111 112 113 114 115 116 117 | * string range STRING FIRST LAST * string repeat STRING COUNT * unset VARNAME * uplevel ?LEVEL? SCRIPT * upvar ?FRAME? OTHERVAR MYVAR ?OTHERVAR MYVAR? All of the above commands works as in the original Tcl. Refer to the | | > | 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | * string range STRING FIRST LAST * string repeat STRING COUNT * unset VARNAME * uplevel ?LEVEL? SCRIPT * upvar ?FRAME? OTHERVAR MYVAR ?OTHERVAR MYVAR? All of the above commands works as in the original Tcl. Refer to the <a href="https://www.tcl-lang.org/man/tcl/contents.htm">Tcl documentation</a> for details. TH1 Extended Commands --------------------- There are many new commands added to TH1 and used to access the special features of Fossil. The following is a summary of the extended commands: * anoncap * anycap * artifact * checkout * combobox * date * decorate * dir * enable_output * encode64 * getParameter * glob_match * globalState * hascap * hasfeature * html * htmlize |
︙ | ︙ | |||
253 254 255 256 257 258 259 260 261 262 263 264 265 266 | ----------------------------------------------------- * enable_output BOOLEAN Enable or disable sending output when the combobox, puts, or wiki commands are used. <a name="getParameter"></a>TH1 getParameter Command --------------------------------------------------- * getParameter NAME ?DEFAULT? Returns the value of the specified query parameter or the specified default value when there is no matching query parameter. | > > > > > > > | 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 | ----------------------------------------------------- * enable_output BOOLEAN Enable or disable sending output when the combobox, puts, or wiki commands are used. <a name="encode64"></a>TH1 encode64 Command ------------------------------------------- * encode64 STRING Encode the specified string using Base64 and return the result. <a name="getParameter"></a>TH1 getParameter Command --------------------------------------------------- * getParameter NAME ?DEFAULT? Returns the value of the specified query parameter or the specified default value when there is no matching query parameter. |
︙ | ︙ | |||
309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 | * hasfeature STRING Returns true if the binary has the given compile-time feature enabled. The possible features are: 1. **ssl** -- _Support for the HTTPS transport._ 1. **legacyMvRm** -- _Support for legacy mv/rm command behavior._ 1. **th1Docs** -- _Support for TH1 in embedded documentation._ 1. **th1Hooks** -- _Support for TH1 command and web page hooks._ 1. **tcl** -- _Support for Tcl integration._ 1. **useTclStubs** -- _Tcl stubs enabled in the Tcl headers._ 1. **tclStubs** -- _Uses Tcl stubs (i.e. linking with stubs library)._ 1. **tclPrivateStubs** -- _Uses Tcl private stubs (i.e. header-only)._ 1. **json** -- _Support for the JSON APIs._ 1. **markdown** -- _Support for Markdown documentation format._ 1. **unicodeCmdLine** -- _The command line arguments are Unicode._ 1. **dynamicBuild** -- _Dynamically linked to libraries._ <a name="html"></a>TH1 html Command ----------------------------------- * html STRING Outputs the STRING escaped for HTML. | > > > > | 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 | * hasfeature STRING Returns true if the binary has the given compile-time feature enabled. The possible features are: 1. **ssl** -- _Support for the HTTPS transport._ 1. **legacyMvRm** -- _Support for legacy mv/rm command behavior._ 1. **execRelPaths** -- _Use relative paths with external diff/gdiff._ 1. **th1Docs** -- _Support for TH1 in embedded documentation._ 1. **th1Hooks** -- _Support for TH1 command and web page hooks._ 1. **tcl** -- _Support for Tcl integration._ 1. **useTclStubs** -- _Tcl stubs enabled in the Tcl headers._ 1. **tclStubs** -- _Uses Tcl stubs (i.e. linking with stubs library)._ 1. **tclPrivateStubs** -- _Uses Tcl private stubs (i.e. header-only)._ 1. **json** -- _Support for the JSON APIs._ 1. **markdown** -- _Support for Markdown documentation format._ 1. **unicodeCmdLine** -- _The command line arguments are Unicode._ 1. **dynamicBuild** -- _Dynamically linked to libraries._ Specifying an unknown feature will return a value of false, it will not raise a script error. <a name="html"></a>TH1 html Command ----------------------------------- * html STRING Outputs the STRING escaped for HTML. |
︙ | ︙ |
Changes to www/uitest.html.
1 2 3 4 5 6 7 8 9 10 11 12 | <html> <head> <title>Fossil UI Test</title> </head> <body> <script> var aTest = [ /////////////////////////////////////////////////////////////////////////// /// Add pages to be tested below: ////////////////////////////////////////////////////////////////////////// { url: "timeline", | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | <html> <head> <title>Fossil UI Test</title> </head> <body> <script> var aTest = [ /////////////////////////////////////////////////////////////////////////// /// Add pages to be tested below: ////////////////////////////////////////////////////////////////////////// { url: "timeline", desc: "Simple timeline of most recent check-ins. Verify that all submenus work." }, { url: "timeline?n=125", desc: "Timeline with 125 entries. Verify that submenus preserve the entry count." }, { url: "wiki", desc: "The wiki homepage" } ////////////////////////////////////////////////////////////////////////////// /// End of testing data ///////////////////////////////////////////////////////////////////////////// ]; var iTest = 0; |
︙ | ︙ | |||
96 97 98 99 100 101 102 | xprev.hidden = 1; xnext.hidden = 1; xpass.hidden = 1; xstart.hidden = 0; xstart.href = baseURI + aTest[0].url; function startTest(){ setTimeout(loadPage,1); | | | 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | xprev.hidden = 1; xnext.hidden = 1; xpass.hidden = 1; xstart.hidden = 0; xstart.href = baseURI + aTest[0].url; function startTest(){ setTimeout(loadPage,1); } function prevTest(){ if( iTest<=0 ) return false; iTest--; setTimeout(loadPage,1); } function nextTest(){ if( iTest+1>=nTest ) return false; |
︙ | ︙ |
Changes to www/webpage-ex.md.
︙ | ︙ | |||
51 52 53 54 55 56 57 | * <a target='_blank' class='exbtn' href='../../../timeline?n=100&y=ci&ubg'>Example</a> 100 most recent check-ins color coded by committer. * <a target='_blank' class='exbtn' href='../../../timeline?from=version-1.27&to=version-1.28'>Example</a> | | | | 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | * <a target='_blank' class='exbtn' href='../../../timeline?n=100&y=ci&ubg'>Example</a> 100 most recent check-ins color coded by committer. * <a target='_blank' class='exbtn' href='../../../timeline?from=version-1.27&to=version-1.28'>Example</a> All check-ins on the most direct path from version-1.27 to version-1.28 (Hint: In any graph above, click the square node boxes for two check-ins or files to see a diff.) * <a target='_blank' class='exbtn' href='../../../tree?ci=daff9d20621&type=tree'>Example</a> All files for a particular check-in (daff9d20621480) * <a target='_blank' class='exbtn' |
︙ | ︙ | |||
86 87 88 89 90 91 92 | href='../../../reports?view=byfile'>Example</a> Number of check-ins for each source file. (Click on column headers to sort.) * <a target='_blank' class='exbtn' href='../../../blame?checkin=5260fbf63287&filename=src/rss.c&limit=-1'> Example</a> | | | 86 87 88 89 90 91 92 93 94 95 96 97 98 | href='../../../reports?view=byfile'>Example</a> Number of check-ins for each source file. (Click on column headers to sort.) * <a target='_blank' class='exbtn' href='../../../blame?checkin=5260fbf63287&filename=src/rss.c&limit=-1'> Example</a> Most recent change to each line of a particular source file in a particular check-in. * <a target='_blank' class='exbtn' href='../../../taglist'>Example</a> List of tags on check-ins. |
Added www/xkcd-git.gif.
cannot compute difference between binary files