Fossil SCM

Merge updates from trunk.

mistachkin 2014-01-10 21:50 delay-ticket-hook merge
Commit bc276e4daf8db675fdb6111eef83889e85cb7f65
3 files changed +30 +17 -4 +22 -2
+30
--- src/main.c
+++ src/main.c
@@ -1084,10 +1084,40 @@
10841084
if( aCmdHelp[i].zText && *aCmdHelp[i].zText ){
10851085
@ <li><a href="%s(g.zTop)/help?cmd=%s(z)">%s(z+1)</a></li>
10861086
}else{
10871087
@ <li>%s(z+1)</li>
10881088
}
1089
+ j++;
1090
+ if( j>=n ){
1091
+ @ </ul></td>
1092
+ j = 0;
1093
+ }
1094
+ }
1095
+ if( j>0 ){
1096
+ @ </ul></td>
1097
+ }
1098
+ @ </tr></table>
1099
+
1100
+ @ <h1>Unsupported commands:</h1>
1101
+ @ <table border="0"><tr>
1102
+ for(i=j=0; i<count(aCommand); i++){
1103
+ const char *z = aCommand[i].zName;
1104
+ if( strncmp(z,"test",4)!=0 ) continue;
1105
+ j++;
1106
+ }
1107
+ n = (j+3)/4;
1108
+ for(i=j=0; i<count(aCommand); i++){
1109
+ const char *z = aCommand[i].zName;
1110
+ if( strncmp(z,"test",4)!=0 ) continue;
1111
+ if( j==0 ){
1112
+ @ <td valign="top"><ul>
1113
+ }
1114
+ if( aCmdHelp[i].zText && *aCmdHelp[i].zText ){
1115
+ @ <li><a href="%s(g.zTop)/help?cmd=%s(z)">%s(z)</a></li>
1116
+ }else{
1117
+ @ <li>%s(z)</li>
1118
+ }
10891119
j++;
10901120
if( j>=n ){
10911121
@ </ul></td>
10921122
j = 0;
10931123
}
10941124
--- src/main.c
+++ src/main.c
@@ -1084,10 +1084,40 @@
1084 if( aCmdHelp[i].zText && *aCmdHelp[i].zText ){
1085 @ <li><a href="%s(g.zTop)/help?cmd=%s(z)">%s(z+1)</a></li>
1086 }else{
1087 @ <li>%s(z+1)</li>
1088 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1089 j++;
1090 if( j>=n ){
1091 @ </ul></td>
1092 j = 0;
1093 }
1094
--- src/main.c
+++ src/main.c
@@ -1084,10 +1084,40 @@
1084 if( aCmdHelp[i].zText && *aCmdHelp[i].zText ){
1085 @ <li><a href="%s(g.zTop)/help?cmd=%s(z)">%s(z+1)</a></li>
1086 }else{
1087 @ <li>%s(z+1)</li>
1088 }
1089 j++;
1090 if( j>=n ){
1091 @ </ul></td>
1092 j = 0;
1093 }
1094 }
1095 if( j>0 ){
1096 @ </ul></td>
1097 }
1098 @ </tr></table>
1099
1100 @ <h1>Unsupported commands:</h1>
1101 @ <table border="0"><tr>
1102 for(i=j=0; i<count(aCommand); i++){
1103 const char *z = aCommand[i].zName;
1104 if( strncmp(z,"test",4)!=0 ) continue;
1105 j++;
1106 }
1107 n = (j+3)/4;
1108 for(i=j=0; i<count(aCommand); i++){
1109 const char *z = aCommand[i].zName;
1110 if( strncmp(z,"test",4)!=0 ) continue;
1111 if( j==0 ){
1112 @ <td valign="top"><ul>
1113 }
1114 if( aCmdHelp[i].zText && *aCmdHelp[i].zText ){
1115 @ <li><a href="%s(g.zTop)/help?cmd=%s(z)">%s(z)</a></li>
1116 }else{
1117 @ <li>%s(z)</li>
1118 }
1119 j++;
1120 if( j>=n ){
1121 @ </ul></td>
1122 j = 0;
1123 }
1124
+17 -4
--- src/search.c
+++ src/search.c
@@ -106,10 +106,11 @@
106106
int iBonus = 0;
107107
int i, j;
108108
unsigned char seen[8];
109109
110110
memset(seen, 0, sizeof(seen));
111
+ if( zDoc==0 ) return score;
111112
for(i=0; zDoc[i]; i++){
112113
char c = zDoc[i];
113114
if( isBoundary[c&0xff] ) continue;
114115
for(j=0; j<p->nTerm; j++){
115116
int n = p->a[j].n;
@@ -166,21 +167,23 @@
166167
167168
/*
168169
** Testing the search function.
169170
**
170171
** COMMAND: search*
171
-** %fossil search [-all|-a] [-limit|-n #] pattern...
172
+** %fossil search [-all|-a] [-limit|-n #] [-width|-W #] pattern...
172173
**
173174
** Search for timeline entries matching all words
174175
** provided on the command line. Whole-word matches
175176
** scope more highly than partial matches.
176177
**
177178
** Outputs, by default, some top-N fraction of the
178179
** results. The -all option can be used to output
179180
** all matches, regardless of their search score.
180
-** -limit can be used to limit the number of entries
181
-** returned.
181
+** The -limit option can be used to limit the number
182
+** of entries returned. The -width option can be
183
+** used to set the output width used when printing
184
+** matches.
182185
*/
183186
void search_cmd(void){
184187
Search *p;
185188
Blob pattern;
186189
int i;
@@ -189,12 +192,22 @@
189192
int iBest;
190193
char fAll = NULL != find_option("all", "a", 0); /* If set, do not lop
191194
off the end of the
192195
results. */
193196
char const * zLimit = find_option("limit","n",1);
197
+ const char *zWidth = find_option("width","W",1);
194198
int nLimit = zLimit ? atoi(zLimit) : -1000; /* Max number of matching
195199
lines/entries to list */
200
+ int width;
201
+ if( zWidth ){
202
+ width = atoi(zWidth);
203
+ if( (width!=0) && (width<=20) ){
204
+ fossil_fatal("--width|-W value must be >20 or 0");
205
+ }
206
+ }else{
207
+ width = 79;
208
+ }
196209
197210
db_must_be_within_tree();
198211
if( g.argc<2 ) return;
199212
blob_init(&pattern, g.argv[2], -1);
200213
for(i=3; i<g.argc; i++){
@@ -223,8 +236,8 @@
223236
blob_appendf(&sql,"AND x>%d ", iBest/3);
224237
}
225238
blob_append(&sql, "ORDER BY x DESC, date DESC ", -1);
226239
db_prepare(&q, blob_str(&sql));
227240
blob_reset(&sql);
228
- print_timeline(&q, nLimit, 79, 0);
241
+ print_timeline(&q, nLimit, width, 0);
229242
db_finalize(&q);
230243
}
231244
--- src/search.c
+++ src/search.c
@@ -106,10 +106,11 @@
106 int iBonus = 0;
107 int i, j;
108 unsigned char seen[8];
109
110 memset(seen, 0, sizeof(seen));
 
111 for(i=0; zDoc[i]; i++){
112 char c = zDoc[i];
113 if( isBoundary[c&0xff] ) continue;
114 for(j=0; j<p->nTerm; j++){
115 int n = p->a[j].n;
@@ -166,21 +167,23 @@
166
167 /*
168 ** Testing the search function.
169 **
170 ** COMMAND: search*
171 ** %fossil search [-all|-a] [-limit|-n #] pattern...
172 **
173 ** Search for timeline entries matching all words
174 ** provided on the command line. Whole-word matches
175 ** scope more highly than partial matches.
176 **
177 ** Outputs, by default, some top-N fraction of the
178 ** results. The -all option can be used to output
179 ** all matches, regardless of their search score.
180 ** -limit can be used to limit the number of entries
181 ** returned.
 
 
182 */
183 void search_cmd(void){
184 Search *p;
185 Blob pattern;
186 int i;
@@ -189,12 +192,22 @@
189 int iBest;
190 char fAll = NULL != find_option("all", "a", 0); /* If set, do not lop
191 off the end of the
192 results. */
193 char const * zLimit = find_option("limit","n",1);
 
194 int nLimit = zLimit ? atoi(zLimit) : -1000; /* Max number of matching
195 lines/entries to list */
 
 
 
 
 
 
 
 
 
196
197 db_must_be_within_tree();
198 if( g.argc<2 ) return;
199 blob_init(&pattern, g.argv[2], -1);
200 for(i=3; i<g.argc; i++){
@@ -223,8 +236,8 @@
223 blob_appendf(&sql,"AND x>%d ", iBest/3);
224 }
225 blob_append(&sql, "ORDER BY x DESC, date DESC ", -1);
226 db_prepare(&q, blob_str(&sql));
227 blob_reset(&sql);
228 print_timeline(&q, nLimit, 79, 0);
229 db_finalize(&q);
230 }
231
--- src/search.c
+++ src/search.c
@@ -106,10 +106,11 @@
106 int iBonus = 0;
107 int i, j;
108 unsigned char seen[8];
109
110 memset(seen, 0, sizeof(seen));
111 if( zDoc==0 ) return score;
112 for(i=0; zDoc[i]; i++){
113 char c = zDoc[i];
114 if( isBoundary[c&0xff] ) continue;
115 for(j=0; j<p->nTerm; j++){
116 int n = p->a[j].n;
@@ -166,21 +167,23 @@
167
168 /*
169 ** Testing the search function.
170 **
171 ** COMMAND: search*
172 ** %fossil search [-all|-a] [-limit|-n #] [-width|-W #] pattern...
173 **
174 ** Search for timeline entries matching all words
175 ** provided on the command line. Whole-word matches
176 ** scope more highly than partial matches.
177 **
178 ** Outputs, by default, some top-N fraction of the
179 ** results. The -all option can be used to output
180 ** all matches, regardless of their search score.
181 ** The -limit option can be used to limit the number
182 ** of entries returned. The -width option can be
183 ** used to set the output width used when printing
184 ** matches.
185 */
186 void search_cmd(void){
187 Search *p;
188 Blob pattern;
189 int i;
@@ -189,12 +192,22 @@
192 int iBest;
193 char fAll = NULL != find_option("all", "a", 0); /* If set, do not lop
194 off the end of the
195 results. */
196 char const * zLimit = find_option("limit","n",1);
197 const char *zWidth = find_option("width","W",1);
198 int nLimit = zLimit ? atoi(zLimit) : -1000; /* Max number of matching
199 lines/entries to list */
200 int width;
201 if( zWidth ){
202 width = atoi(zWidth);
203 if( (width!=0) && (width<=20) ){
204 fossil_fatal("--width|-W value must be >20 or 0");
205 }
206 }else{
207 width = 79;
208 }
209
210 db_must_be_within_tree();
211 if( g.argc<2 ) return;
212 blob_init(&pattern, g.argv[2], -1);
213 for(i=3; i<g.argc; i++){
@@ -223,8 +236,8 @@
236 blob_appendf(&sql,"AND x>%d ", iBest/3);
237 }
238 blob_append(&sql, "ORDER BY x DESC, date DESC ", -1);
239 db_prepare(&q, blob_str(&sql));
240 blob_reset(&sql);
241 print_timeline(&q, nLimit, width, 0);
242 db_finalize(&q);
243 }
244
+22 -2
--- www/build.wiki
+++ www/build.wiki
@@ -17,12 +17,12 @@
1717
<p>Building and installing is very simple. Three steps:</p>
1818
1919
<ol>
2020
<li> Download and unpack a source tarball or ZIP.
2121
<li> <b>./configure; make</b>
22
-<li> Move or copy the resulting "fossil" executable to someplace
23
- on your $PATH.
22
+<li> Move the resulting "fossil" or "fossil.exe" executable to someplace on
23
+your $PATH.
2424
</ol>
2525
2626
<p><hr>
2727
2828
<h2>1.0 Obtaining The Source Code</h2>
@@ -50,10 +50,30 @@
5050
<li><p>Finally, click on one of the
5151
"Zip Archive" or "Tarball" links, according to your preference.
5252
These link will build a ZIP archive or a gzip-compressed tarball of the
5353
complete source code and download it to your browser.
5454
</ol>
55
+
56
+<h2>Aside: Is it really safe to use an unreleased development version of
57
+the Fossil source code?</h2>
58
+
59
+Yes! Any check-in on the
60
+[/timeline?t=trunk | trunk branch] of the Fossil
61
+[http://www.sqlite.org/src/timeline | Fossil self-hosting repository]
62
+will work fine. (Dodgy code is always on a branch.) In the unlikely
63
+event that you pick a version with a serious bug, it still won't
64
+clobber your files. Fossil uses several
65
+[./selfcheck.wiki | self-checks] prior to committing any
66
+repository change that prevent loss-of-work due to bugs.
67
+
68
+The Fossil [./selfhost.wiki | self-hosting repositories], especially
69
+the one at [http://www.fossil-scm.org/fossil], usually run a version
70
+of trunk that is less than a week or two old. Look at the bottom
71
+right-hand corner of this screen (to the right of "This page was
72
+generated in...") to see exactly which version of Fossil is
73
+rendering this page. It is always safe to use whatever version
74
+of the Fossil code you find running on the main Fossil website.
5575
5676
<h2>2.0 Compiling</h2>
5777
5878
<ol>
5979
<li value="5">
6080
--- www/build.wiki
+++ www/build.wiki
@@ -17,12 +17,12 @@
17 <p>Building and installing is very simple. Three steps:</p>
18
19 <ol>
20 <li> Download and unpack a source tarball or ZIP.
21 <li> <b>./configure; make</b>
22 <li> Move or copy the resulting "fossil" executable to someplace
23 on your $PATH.
24 </ol>
25
26 <p><hr>
27
28 <h2>1.0 Obtaining The Source Code</h2>
@@ -50,10 +50,30 @@
50 <li><p>Finally, click on one of the
51 "Zip Archive" or "Tarball" links, according to your preference.
52 These link will build a ZIP archive or a gzip-compressed tarball of the
53 complete source code and download it to your browser.
54 </ol>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
56 <h2>2.0 Compiling</h2>
57
58 <ol>
59 <li value="5">
60
--- www/build.wiki
+++ www/build.wiki
@@ -17,12 +17,12 @@
17 <p>Building and installing is very simple. Three steps:</p>
18
19 <ol>
20 <li> Download and unpack a source tarball or ZIP.
21 <li> <b>./configure; make</b>
22 <li> Move the resulting "fossil" or "fossil.exe" executable to someplace on
23 your $PATH.
24 </ol>
25
26 <p><hr>
27
28 <h2>1.0 Obtaining The Source Code</h2>
@@ -50,10 +50,30 @@
50 <li><p>Finally, click on one of the
51 "Zip Archive" or "Tarball" links, according to your preference.
52 These link will build a ZIP archive or a gzip-compressed tarball of the
53 complete source code and download it to your browser.
54 </ol>
55
56 <h2>Aside: Is it really safe to use an unreleased development version of
57 the Fossil source code?</h2>
58
59 Yes! Any check-in on the
60 [/timeline?t=trunk | trunk branch] of the Fossil
61 [http://www.sqlite.org/src/timeline | Fossil self-hosting repository]
62 will work fine. (Dodgy code is always on a branch.) In the unlikely
63 event that you pick a version with a serious bug, it still won't
64 clobber your files. Fossil uses several
65 [./selfcheck.wiki | self-checks] prior to committing any
66 repository change that prevent loss-of-work due to bugs.
67
68 The Fossil [./selfhost.wiki | self-hosting repositories], especially
69 the one at [http://www.fossil-scm.org/fossil], usually run a version
70 of trunk that is less than a week or two old. Look at the bottom
71 right-hand corner of this screen (to the right of "This page was
72 generated in...") to see exactly which version of Fossil is
73 rendering this page. It is always safe to use whatever version
74 of the Fossil code you find running on the main Fossil website.
75
76 <h2>2.0 Compiling</h2>
77
78 <ol>
79 <li value="5">
80

Keyboard Shortcuts

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