Fossil SCM

merge trunk

jan.nijtmans 2015-04-27 19:14 sync-forkwarn merge
Commit 2dc4d98e3baad8ba06763b87fc7a2eaca64c978f
+8 -6
--- src/attach.c
+++ src/attach.c
@@ -21,18 +21,18 @@
2121
#include "attach.h"
2222
#include <assert.h>
2323
2424
/*
2525
** WEBPAGE: attachlist
26
+** List attachments.
2627
**
2728
** tkt=TICKETUUID
2829
** page=WIKIPAGE
2930
**
30
-** List attachments.
31
-** Either one of tkt= or page= are supplied or neither. If neither
32
-** are given, all attachments are listed. If one is given, only
33
-** attachments for the designated ticket or wiki page are shown.
31
+** Either one of tkt= or page= are supplied or neither but not both.
32
+** If neither are given, all attachments are listed. If one is given,
33
+** only attachments for the designated ticket or wiki page are shown.
3434
** TICKETUUID must be complete
3535
*/
3636
void attachlist_page(void){
3737
const char *zPage = P("page");
3838
const char *zTkt = P("tkt");
@@ -134,16 +134,18 @@
134134
/*
135135
** WEBPAGE: attachdownload
136136
** WEBPAGE: attachimage
137137
** WEBPAGE: attachview
138138
**
139
+** Download or display an attachment.
140
+** Query parameters:
141
+**
139142
** tkt=TICKETUUID
140143
** page=WIKIPAGE
141144
** file=FILENAME
142145
** attachid=ID
143146
**
144
-** List attachments.
145147
*/
146148
void attachview_page(void){
147149
const char *zPage = P("page");
148150
const char *zTkt = P("tkt");
149151
const char *zFile = P("file");
@@ -223,16 +225,16 @@
223225
}
224226
225227
226228
/*
227229
** WEBPAGE: attachadd
230
+** Add a new attachment.
228231
**
229232
** tkt=TICKETUUID
230233
** page=WIKIPAGE
231234
** from=URL
232235
**
233
-** Add a new attachment.
234236
*/
235237
void attachadd_page(void){
236238
const char *zPage = P("page");
237239
const char *zTkt = P("tkt");
238240
const char *zFrom = P("from");
239241
--- src/attach.c
+++ src/attach.c
@@ -21,18 +21,18 @@
21 #include "attach.h"
22 #include <assert.h>
23
24 /*
25 ** WEBPAGE: attachlist
 
26 **
27 ** tkt=TICKETUUID
28 ** page=WIKIPAGE
29 **
30 ** List attachments.
31 ** Either one of tkt= or page= are supplied or neither. If neither
32 ** are given, all attachments are listed. If one is given, only
33 ** attachments for the designated ticket or wiki page are shown.
34 ** TICKETUUID must be complete
35 */
36 void attachlist_page(void){
37 const char *zPage = P("page");
38 const char *zTkt = P("tkt");
@@ -134,16 +134,18 @@
134 /*
135 ** WEBPAGE: attachdownload
136 ** WEBPAGE: attachimage
137 ** WEBPAGE: attachview
138 **
 
 
 
139 ** tkt=TICKETUUID
140 ** page=WIKIPAGE
141 ** file=FILENAME
142 ** attachid=ID
143 **
144 ** List attachments.
145 */
146 void attachview_page(void){
147 const char *zPage = P("page");
148 const char *zTkt = P("tkt");
149 const char *zFile = P("file");
@@ -223,16 +225,16 @@
223 }
224
225
226 /*
227 ** WEBPAGE: attachadd
 
228 **
229 ** tkt=TICKETUUID
230 ** page=WIKIPAGE
231 ** from=URL
232 **
233 ** Add a new attachment.
234 */
235 void attachadd_page(void){
236 const char *zPage = P("page");
237 const char *zTkt = P("tkt");
238 const char *zFrom = P("from");
239
--- src/attach.c
+++ src/attach.c
@@ -21,18 +21,18 @@
21 #include "attach.h"
22 #include <assert.h>
23
24 /*
25 ** WEBPAGE: attachlist
26 ** List attachments.
27 **
28 ** tkt=TICKETUUID
29 ** page=WIKIPAGE
30 **
31 ** Either one of tkt= or page= are supplied or neither but not both.
32 ** If neither are given, all attachments are listed. If one is given,
33 ** only attachments for the designated ticket or wiki page are shown.
 
34 ** TICKETUUID must be complete
35 */
36 void attachlist_page(void){
37 const char *zPage = P("page");
38 const char *zTkt = P("tkt");
@@ -134,16 +134,18 @@
134 /*
135 ** WEBPAGE: attachdownload
136 ** WEBPAGE: attachimage
137 ** WEBPAGE: attachview
138 **
139 ** Download or display an attachment.
140 ** Query parameters:
141 **
142 ** tkt=TICKETUUID
143 ** page=WIKIPAGE
144 ** file=FILENAME
145 ** attachid=ID
146 **
 
147 */
148 void attachview_page(void){
149 const char *zPage = P("page");
150 const char *zTkt = P("tkt");
151 const char *zFile = P("file");
@@ -223,16 +225,16 @@
225 }
226
227
228 /*
229 ** WEBPAGE: attachadd
230 ** Add a new attachment.
231 **
232 ** tkt=TICKETUUID
233 ** page=WIKIPAGE
234 ** from=URL
235 **
 
236 */
237 void attachadd_page(void){
238 const char *zPage = P("page");
239 const char *zTkt = P("tkt");
240 const char *zFrom = P("from");
241
+22
--- src/blob.c
+++ src/blob.c
@@ -118,10 +118,13 @@
118118
}
119119
120120
121121
/*
122122
** COMMAND: test-isspace
123
+**
124
+** Verify that the fossil_isspace() routine is working correctly but
125
+** testing it on all possible inputs.
123126
*/
124127
void isspace_cmd(void){
125128
int i;
126129
for(i=0; i<=255; i++){
127130
if( i==' ' || i=='\n' || i=='\t' || i=='\v'
@@ -884,10 +887,16 @@
884887
blob_resize(pOut, nOut2+4);
885888
}
886889
887890
/*
888891
** COMMAND: test-compress
892
+**
893
+** Usage: %fossil test-compress INPUTFILE OUTPUTFILE
894
+**
895
+** Run compression on INPUTFILE and write the result into OUTPUTFILE.
896
+**
897
+** This is used to test and debug the blob_compress() routine.
889898
*/
890899
void compress_cmd(void){
891900
Blob f;
892901
if( g.argc!=4 ) usage("INPUTFILE OUTPUTFILE");
893902
blob_read_from_file(&f, g.argv[2]);
@@ -936,10 +945,17 @@
936945
*pOut = temp;
937946
}
938947
939948
/*
940949
** COMMAND: test-compress-2
950
+**
951
+** Usage: %fossil test-compress-2 IN1 IN2 OUT
952
+**
953
+** Read files IN1 and IN2, concatenate the content, compress the
954
+** content, then write results into OUT.
955
+**
956
+** This is used to test and debug the blob_compress2() routine.
941957
*/
942958
void compress2_cmd(void){
943959
Blob f1, f2;
944960
if( g.argc!=5 ) usage("INPUTFILE1 INPUTFILE2 OUTPUTFILE");
945961
blob_read_from_file(&f1, g.argv[2]);
@@ -982,10 +998,16 @@
982998
return 0;
983999
}
9841000
9851001
/*
9861002
** COMMAND: test-uncompress
1003
+**
1004
+** Usage: %fossil test-uncompress IN OUT
1005
+**
1006
+** Read the content of file IN, uncompress that content, and write the
1007
+** result into OUT. This command is intended for testing of the the
1008
+** blob_compress() function.
9871009
*/
9881010
void uncompress_cmd(void){
9891011
Blob f;
9901012
if( g.argc!=4 ) usage("INPUTFILE OUTPUTFILE");
9911013
blob_read_from_file(&f, g.argv[2]);
9921014
--- src/blob.c
+++ src/blob.c
@@ -118,10 +118,13 @@
118 }
119
120
121 /*
122 ** COMMAND: test-isspace
 
 
 
123 */
124 void isspace_cmd(void){
125 int i;
126 for(i=0; i<=255; i++){
127 if( i==' ' || i=='\n' || i=='\t' || i=='\v'
@@ -884,10 +887,16 @@
884 blob_resize(pOut, nOut2+4);
885 }
886
887 /*
888 ** COMMAND: test-compress
 
 
 
 
 
 
889 */
890 void compress_cmd(void){
891 Blob f;
892 if( g.argc!=4 ) usage("INPUTFILE OUTPUTFILE");
893 blob_read_from_file(&f, g.argv[2]);
@@ -936,10 +945,17 @@
936 *pOut = temp;
937 }
938
939 /*
940 ** COMMAND: test-compress-2
 
 
 
 
 
 
 
941 */
942 void compress2_cmd(void){
943 Blob f1, f2;
944 if( g.argc!=5 ) usage("INPUTFILE1 INPUTFILE2 OUTPUTFILE");
945 blob_read_from_file(&f1, g.argv[2]);
@@ -982,10 +998,16 @@
982 return 0;
983 }
984
985 /*
986 ** COMMAND: test-uncompress
 
 
 
 
 
 
987 */
988 void uncompress_cmd(void){
989 Blob f;
990 if( g.argc!=4 ) usage("INPUTFILE OUTPUTFILE");
991 blob_read_from_file(&f, g.argv[2]);
992
--- src/blob.c
+++ src/blob.c
@@ -118,10 +118,13 @@
118 }
119
120
121 /*
122 ** COMMAND: test-isspace
123 **
124 ** Verify that the fossil_isspace() routine is working correctly but
125 ** testing it on all possible inputs.
126 */
127 void isspace_cmd(void){
128 int i;
129 for(i=0; i<=255; i++){
130 if( i==' ' || i=='\n' || i=='\t' || i=='\v'
@@ -884,10 +887,16 @@
887 blob_resize(pOut, nOut2+4);
888 }
889
890 /*
891 ** COMMAND: test-compress
892 **
893 ** Usage: %fossil test-compress INPUTFILE OUTPUTFILE
894 **
895 ** Run compression on INPUTFILE and write the result into OUTPUTFILE.
896 **
897 ** This is used to test and debug the blob_compress() routine.
898 */
899 void compress_cmd(void){
900 Blob f;
901 if( g.argc!=4 ) usage("INPUTFILE OUTPUTFILE");
902 blob_read_from_file(&f, g.argv[2]);
@@ -936,10 +945,17 @@
945 *pOut = temp;
946 }
947
948 /*
949 ** COMMAND: test-compress-2
950 **
951 ** Usage: %fossil test-compress-2 IN1 IN2 OUT
952 **
953 ** Read files IN1 and IN2, concatenate the content, compress the
954 ** content, then write results into OUT.
955 **
956 ** This is used to test and debug the blob_compress2() routine.
957 */
958 void compress2_cmd(void){
959 Blob f1, f2;
960 if( g.argc!=5 ) usage("INPUTFILE1 INPUTFILE2 OUTPUTFILE");
961 blob_read_from_file(&f1, g.argv[2]);
@@ -982,10 +998,16 @@
998 return 0;
999 }
1000
1001 /*
1002 ** COMMAND: test-uncompress
1003 **
1004 ** Usage: %fossil test-uncompress IN OUT
1005 **
1006 ** Read the content of file IN, uncompress that content, and write the
1007 ** result into OUT. This command is intended for testing of the the
1008 ** blob_compress() function.
1009 */
1010 void uncompress_cmd(void){
1011 Blob f;
1012 if( g.argc!=4 ) usage("INPUTFILE OUTPUTFILE");
1013 blob_read_from_file(&f, g.argv[2]);
1014
+4 -1
--- src/branch.c
+++ src/branch.c
@@ -386,11 +386,14 @@
386386
style_footer();
387387
}
388388
389389
/*
390390
** WEBPAGE: brlist
391
-** Show a list of branches
391
+** Show a list of branches. With no query parameters, a sortable table
392
+** is used to show all branches. If query parameters are present a
393
+** fixed bullet list is shown.
394
+**
392395
** Query parameters:
393396
**
394397
** all Show all branches
395398
** closed Show only closed branches
396399
** open Show only open branches (default behavior)
397400
--- src/branch.c
+++ src/branch.c
@@ -386,11 +386,14 @@
386 style_footer();
387 }
388
389 /*
390 ** WEBPAGE: brlist
391 ** Show a list of branches
 
 
 
392 ** Query parameters:
393 **
394 ** all Show all branches
395 ** closed Show only closed branches
396 ** open Show only open branches (default behavior)
397
--- src/branch.c
+++ src/branch.c
@@ -386,11 +386,14 @@
386 style_footer();
387 }
388
389 /*
390 ** WEBPAGE: brlist
391 ** Show a list of branches. With no query parameters, a sortable table
392 ** is used to show all branches. If query parameters are present a
393 ** fixed bullet list is shown.
394 **
395 ** Query parameters:
396 **
397 ** all Show all branches
398 ** closed Show only closed branches
399 ** open Show only open branches (default behavior)
400
+18
--- src/browse.c
+++ src/browse.c
@@ -105,14 +105,21 @@
105105
106106
107107
/*
108108
** WEBPAGE: dir
109109
**
110
+** Show the files and subdirectories within a single directory of the
111
+** source tree. Only files for a single check-in are shown if the ci=
112
+** query parameter is present. If ci= is missing, the union of files
113
+** across all check-ins is shown.
114
+**
110115
** Query parameters:
111116
**
112117
** name=PATH Directory to display. Optional. Top-level if missing
113118
** ci=LABEL Show only files in this check-in. Optional.
119
+** type=TYPE TYPE=flat: use this display
120
+** TYPE=tree: use the /tree display instead
114121
*/
115122
void page_dir(void){
116123
char *zD = fossil_strdup(P("name"));
117124
int nD = zD ? strlen(zD)+1 : 0;
118125
int mxLen;
@@ -503,13 +510,21 @@
503510
}
504511
505512
506513
/*
507514
** WEBPAGE: tree
515
+**
516
+** Show the files using a tree-view. If the ci= query parameter is present
517
+** then show only the files for the check-in identified. If ci= is omitted,
518
+** then show the union of files over all check-ins.
519
+**
520
+** The type=tree query parameter is required or else the /dir format is
521
+** used.
508522
**
509523
** Query parameters:
510524
**
525
+** type=tree Required to prevent use of /dir format
511526
** name=PATH Directory to display. Optional
512527
** ci=LABEL Show only files in this check-in. Optional.
513528
** re=REGEXP Show only files matching REGEXP. Optional.
514529
** expand Begin with the tree fully expanded.
515530
** nofiles Show directories (folders) only. Omit files.
@@ -985,10 +1000,13 @@
9851000
db_finalize(&q);
9861001
}
9871002
9881003
/*
9891004
** WEBPAGE: fileage
1005
+**
1006
+** Show all files in a single check-in (identified by the name= query
1007
+** parameter) in order of increasing age.
9901008
**
9911009
** Parameters:
9921010
** name=VERSION Selects the check-in version (default=tip).
9931011
** glob=STRING Only shows files matching this glob pattern
9941012
** (e.g. *.c or *.txt).
9951013
--- src/browse.c
+++ src/browse.c
@@ -105,14 +105,21 @@
105
106
107 /*
108 ** WEBPAGE: dir
109 **
 
 
 
 
 
110 ** Query parameters:
111 **
112 ** name=PATH Directory to display. Optional. Top-level if missing
113 ** ci=LABEL Show only files in this check-in. Optional.
 
 
114 */
115 void page_dir(void){
116 char *zD = fossil_strdup(P("name"));
117 int nD = zD ? strlen(zD)+1 : 0;
118 int mxLen;
@@ -503,13 +510,21 @@
503 }
504
505
506 /*
507 ** WEBPAGE: tree
 
 
 
 
 
 
 
508 **
509 ** Query parameters:
510 **
 
511 ** name=PATH Directory to display. Optional
512 ** ci=LABEL Show only files in this check-in. Optional.
513 ** re=REGEXP Show only files matching REGEXP. Optional.
514 ** expand Begin with the tree fully expanded.
515 ** nofiles Show directories (folders) only. Omit files.
@@ -985,10 +1000,13 @@
985 db_finalize(&q);
986 }
987
988 /*
989 ** WEBPAGE: fileage
 
 
 
990 **
991 ** Parameters:
992 ** name=VERSION Selects the check-in version (default=tip).
993 ** glob=STRING Only shows files matching this glob pattern
994 ** (e.g. *.c or *.txt).
995
--- src/browse.c
+++ src/browse.c
@@ -105,14 +105,21 @@
105
106
107 /*
108 ** WEBPAGE: dir
109 **
110 ** Show the files and subdirectories within a single directory of the
111 ** source tree. Only files for a single check-in are shown if the ci=
112 ** query parameter is present. If ci= is missing, the union of files
113 ** across all check-ins is shown.
114 **
115 ** Query parameters:
116 **
117 ** name=PATH Directory to display. Optional. Top-level if missing
118 ** ci=LABEL Show only files in this check-in. Optional.
119 ** type=TYPE TYPE=flat: use this display
120 ** TYPE=tree: use the /tree display instead
121 */
122 void page_dir(void){
123 char *zD = fossil_strdup(P("name"));
124 int nD = zD ? strlen(zD)+1 : 0;
125 int mxLen;
@@ -503,13 +510,21 @@
510 }
511
512
513 /*
514 ** WEBPAGE: tree
515 **
516 ** Show the files using a tree-view. If the ci= query parameter is present
517 ** then show only the files for the check-in identified. If ci= is omitted,
518 ** then show the union of files over all check-ins.
519 **
520 ** The type=tree query parameter is required or else the /dir format is
521 ** used.
522 **
523 ** Query parameters:
524 **
525 ** type=tree Required to prevent use of /dir format
526 ** name=PATH Directory to display. Optional
527 ** ci=LABEL Show only files in this check-in. Optional.
528 ** re=REGEXP Show only files matching REGEXP. Optional.
529 ** expand Begin with the tree fully expanded.
530 ** nofiles Show directories (folders) only. Omit files.
@@ -985,10 +1000,13 @@
1000 db_finalize(&q);
1001 }
1002
1003 /*
1004 ** WEBPAGE: fileage
1005 **
1006 ** Show all files in a single check-in (identified by the name= query
1007 ** parameter) in order of increasing age.
1008 **
1009 ** Parameters:
1010 ** name=VERSION Selects the check-in version (default=tip).
1011 ** glob=STRING Only shows files matching this glob pattern
1012 ** (e.g. *.c or *.txt).
1013
+2 -1
--- src/cache.c
+++ src/cache.c
@@ -330,11 +330,11 @@
330330
}
331331
332332
/*
333333
** WEBPAGE: cachestat
334334
**
335
-** Show information about the webpage cache
335
+** Show information about the webpage cache. Requires Admin privilege.
336336
*/
337337
void cache_page(void){
338338
sqlite3 *db;
339339
sqlite3_stmt *pStmt;
340340
char zBuf[100];
@@ -380,10 +380,11 @@
380380
**
381381
** Usage: /cacheget?key=KEY
382382
**
383383
** Download a single entry for the cache, identified by KEY.
384384
** This page is normally a hyperlink from the /cachestat page.
385
+** Requires Admin privilege.
385386
*/
386387
void cache_getpage(void){
387388
const char *zKey;
388389
Blob content;
389390
390391
--- src/cache.c
+++ src/cache.c
@@ -330,11 +330,11 @@
330 }
331
332 /*
333 ** WEBPAGE: cachestat
334 **
335 ** Show information about the webpage cache
336 */
337 void cache_page(void){
338 sqlite3 *db;
339 sqlite3_stmt *pStmt;
340 char zBuf[100];
@@ -380,10 +380,11 @@
380 **
381 ** Usage: /cacheget?key=KEY
382 **
383 ** Download a single entry for the cache, identified by KEY.
384 ** This page is normally a hyperlink from the /cachestat page.
 
385 */
386 void cache_getpage(void){
387 const char *zKey;
388 Blob content;
389
390
--- src/cache.c
+++ src/cache.c
@@ -330,11 +330,11 @@
330 }
331
332 /*
333 ** WEBPAGE: cachestat
334 **
335 ** Show information about the webpage cache. Requires Admin privilege.
336 */
337 void cache_page(void){
338 sqlite3 *db;
339 sqlite3_stmt *pStmt;
340 char zBuf[100];
@@ -380,10 +380,11 @@
380 **
381 ** Usage: /cacheget?key=KEY
382 **
383 ** Download a single entry for the cache, identified by KEY.
384 ** This page is normally a hyperlink from the /cachestat page.
385 ** Requires Admin privilege.
386 */
387 void cache_getpage(void){
388 const char *zKey;
389 Blob content;
390
391
--- src/captcha.c
+++ src/captcha.c
@@ -414,10 +414,12 @@
414414
}
415415
#endif /* CAPTCHA==3 */
416416
417417
/*
418418
** COMMAND: test-captcha
419
+**
420
+** Render an ASCII-art captcha for numbers given on the command line.
419421
*/
420422
void test_captcha(void){
421423
int i;
422424
unsigned int v;
423425
char *z;
@@ -551,10 +553,13 @@
551553
@ </td></tr></table></div>
552554
}
553555
554556
/*
555557
** WEBPAGE: test-captcha
558
+** Test the captcha-generator by rendering the value of the name= query
559
+** parameter using ascii-art. If name= is omitted, show a random 16-digit
560
+** hexadecimal number.
556561
*/
557562
void captcha_test(void){
558563
const char *zPw = P("name");
559564
if( zPw==0 || zPw[0]==0 ){
560565
u64 x;
561566
--- src/captcha.c
+++ src/captcha.c
@@ -414,10 +414,12 @@
414 }
415 #endif /* CAPTCHA==3 */
416
417 /*
418 ** COMMAND: test-captcha
 
 
419 */
420 void test_captcha(void){
421 int i;
422 unsigned int v;
423 char *z;
@@ -551,10 +553,13 @@
551 @ </td></tr></table></div>
552 }
553
554 /*
555 ** WEBPAGE: test-captcha
 
 
 
556 */
557 void captcha_test(void){
558 const char *zPw = P("name");
559 if( zPw==0 || zPw[0]==0 ){
560 u64 x;
561
--- src/captcha.c
+++ src/captcha.c
@@ -414,10 +414,12 @@
414 }
415 #endif /* CAPTCHA==3 */
416
417 /*
418 ** COMMAND: test-captcha
419 **
420 ** Render an ASCII-art captcha for numbers given on the command line.
421 */
422 void test_captcha(void){
423 int i;
424 unsigned int v;
425 char *z;
@@ -551,10 +553,13 @@
553 @ </td></tr></table></div>
554 }
555
556 /*
557 ** WEBPAGE: test-captcha
558 ** Test the captcha-generator by rendering the value of the name= query
559 ** parameter using ascii-art. If name= is omitted, show a random 16-digit
560 ** hexadecimal number.
561 */
562 void captcha_test(void){
563 const char *zPw = P("name");
564 if( zPw==0 || zPw[0]==0 ){
565 u64 x;
566
--- src/checkin.c
+++ src/checkin.c
@@ -264,10 +264,11 @@
264264
if( vid ){
265265
show_common_info(vid, "checkout:", 1, 1);
266266
}
267267
db_record_repository_filename(0);
268268
print_changes(useSha1sum, showHdr, verboseFlag, cwdRelative);
269
+ leaf_ambiguity_warning(vid, vid);
269270
}
270271
271272
/*
272273
** Take care of -r version of ls command
273274
*/
274275
--- src/checkin.c
+++ src/checkin.c
@@ -264,10 +264,11 @@
264 if( vid ){
265 show_common_info(vid, "checkout:", 1, 1);
266 }
267 db_record_repository_filename(0);
268 print_changes(useSha1sum, showHdr, verboseFlag, cwdRelative);
 
269 }
270
271 /*
272 ** Take care of -r version of ls command
273 */
274
--- src/checkin.c
+++ src/checkin.c
@@ -264,10 +264,11 @@
264 if( vid ){
265 show_common_info(vid, "checkout:", 1, 1);
266 }
267 db_record_repository_filename(0);
268 print_changes(useSha1sum, showHdr, verboseFlag, cwdRelative);
269 leaf_ambiguity_warning(vid, vid);
270 }
271
272 /*
273 ** Take care of -r version of ls command
274 */
275
--- src/checkin.c
+++ src/checkin.c
@@ -264,10 +264,11 @@
264264
if( vid ){
265265
show_common_info(vid, "checkout:", 1, 1);
266266
}
267267
db_record_repository_filename(0);
268268
print_changes(useSha1sum, showHdr, verboseFlag, cwdRelative);
269
+ leaf_ambiguity_warning(vid, vid);
269270
}
270271
271272
/*
272273
** Take care of -r version of ls command
273274
*/
274275
--- src/checkin.c
+++ src/checkin.c
@@ -264,10 +264,11 @@
264 if( vid ){
265 show_common_info(vid, "checkout:", 1, 1);
266 }
267 db_record_repository_filename(0);
268 print_changes(useSha1sum, showHdr, verboseFlag, cwdRelative);
 
269 }
270
271 /*
272 ** Take care of -r version of ls command
273 */
274
--- src/checkin.c
+++ src/checkin.c
@@ -264,10 +264,11 @@
264 if( vid ){
265 show_common_info(vid, "checkout:", 1, 1);
266 }
267 db_record_repository_filename(0);
268 print_changes(useSha1sum, showHdr, verboseFlag, cwdRelative);
269 leaf_ambiguity_warning(vid, vid);
270 }
271
272 /*
273 ** Take care of -r version of ls command
274 */
275
+66 -24
--- src/descendants.c
+++ src/descendants.c
@@ -352,12 +352,13 @@
352352
** The --recompute flag causes the content of the "leaf" table in the
353353
** repository database to be recomputed.
354354
**
355355
** Options:
356356
** -a|--all show ALL leaves
357
-** -c|--closed show only closed leaves
358357
** --bybranch order output by branch name
358
+** -c|--closed show only closed leaves
359
+** -m|--multiple show only cases with multiple leaves on a single branch
359360
** --recompute recompute the "leaf" table in the repository DB
360361
** -W|--width <num> Width of lines (default is to auto-detect). Must be
361362
** >39 or 0 (= no limit, resulting in a single line per
362363
** entry).
363364
**
@@ -369,15 +370,17 @@
369370
int showAll = find_option("all", "a", 0)!=0;
370371
int showClosed = find_option("closed", "c", 0)!=0;
371372
int recomputeFlag = find_option("recompute",0,0)!=0;
372373
int showForks = g.argv[1][0]!='l';
373374
int byBranch = (find_option("bybranch",0,0)!=0) || showForks;
375
+ int multipleFlag = (find_option("multiple","m",0))!=0 || showForks;
374376
const char *zWidth = find_option("width","W",1);
375377
char *zLastBr = 0;
376378
int n, width;
377379
char zLineNo[10];
378380
381
+ if( multipleFlag ) byBranch = 1;
379382
if( zWidth ){
380383
width = atoi(zWidth);
381384
if( (width!=0) && (width<=39) ){
382385
fossil_fatal("-W|--width value must be >39 or 0");
383386
}
@@ -390,14 +393,45 @@
390393
verify_all_options();
391394
392395
if( recomputeFlag ) leaf_rebuild();
393396
blob_zero(&sql);
394397
blob_append(&sql, timeline_query_for_tty(), -1);
395
- blob_append_sql(&sql, " AND blob.rid IN leaf");
398
+ if( !multipleFlag ){
399
+ /* The usual case - show all leaves */
400
+ blob_append_sql(&sql, " AND blob.rid IN leaf");
401
+ }else{
402
+ /* Show only leaves where two are more occur in the same branch */
403
+ db_multi_exec(
404
+ "CREATE TEMP TABLE openLeaf(rid INTEGER PRIMARY KEY);"
405
+ "INSERT INTO openLeaf(rid)"
406
+ " SELECT rid FROM leaf"
407
+ " WHERE NOT EXISTS("
408
+ " SELECT 1 FROM tagxref"
409
+ " WHERE tagid=%d AND tagtype>0 AND rid=leaf.rid);",
410
+ TAG_CLOSED
411
+ );
412
+ db_multi_exec(
413
+ "CREATE TEMP TABLE ambiguousBranch(brname TEXT);"
414
+ "INSERT INTO ambiguousBranch(brname)"
415
+ " SELECT (SELECT value FROM tagxref WHERE tagid=%d AND rid=openLeaf.rid)"
416
+ " FROM openLeaf"
417
+ " GROUP BY 1 HAVING count(*)>1;",
418
+ TAG_BRANCH
419
+ );
420
+ db_multi_exec(
421
+ "CREATE TEMP TABLE ambiguousLeaf(rid INTEGER PRIMARY KEY);\n"
422
+ "INSERT INTO ambiguousLeaf(rid)\n"
423
+ " SELECT rid FROM openLeaf\n"
424
+ " WHERE (SELECT value FROM tagxref WHERE tagid=%d AND rid=openLeaf.rid)"
425
+ " IN (SELECT brname FROM ambiguousBranch);",
426
+ TAG_BRANCH
427
+ );
428
+ blob_append_sql(&sql, " AND blob.rid IN ambiguousLeaf");
429
+ }
396430
if( showClosed ){
397431
blob_append_sql(&sql," AND %z", leaf_is_closed_sql("blob.rid"));
398
- }else if( !showAll || showForks ){
432
+ }else if( !showAll ){
399433
blob_append_sql(&sql," AND NOT %z", leaf_is_closed_sql("blob.rid"));
400434
}
401435
if( byBranch ){
402436
db_prepare(&q, "%s ORDER BY nullif(branch,'trunk') COLLATE nocase,"
403437
" event.mtime DESC",
@@ -406,40 +440,48 @@
406440
db_prepare(&q, "%s ORDER BY event.mtime DESC", blob_sql_text(&sql));
407441
}
408442
blob_reset(&sql);
409443
n = 0;
410444
while( db_step(&q)==SQLITE_ROW ){
411
- if( !showForks ||
412
- fossil_find_nearest_fork(db_column_int(&q, 0), db_open_local(0)) ){
413
- const char *zId = db_column_text(&q, 1);
414
- const char *zDate = db_column_text(&q, 2);
415
- const char *zCom = db_column_text(&q, 3);
416
- const char *zBr = db_column_text(&q, 7);
417
- char *z;
418
-
419
- if( byBranch && fossil_strcmp(zBr, zLastBr)!=0 ){
420
- fossil_print("*** %s ***\n", zBr);
421
- fossil_free(zLastBr);
422
- zLastBr = fossil_strdup(zBr);
423
- }
424
- n++;
425
- sqlite3_snprintf(sizeof(zLineNo), zLineNo, "(%d)", n);
426
- fossil_print("%6s ", zLineNo);
427
- z = mprintf("%s [%S] %s", zDate, zId, zCom);
428
- comment_print(z, zCom, 7, width, g.comFmtFlags);
429
- fossil_free(z);
430
- }
445
+ const char *zId = db_column_text(&q, 1);
446
+ const char *zDate = db_column_text(&q, 2);
447
+ const char *zCom = db_column_text(&q, 3);
448
+ const char *zBr = db_column_text(&q, 7);
449
+ char *z;
450
+
451
+ if( byBranch && fossil_strcmp(zBr, zLastBr)!=0 ){
452
+ fossil_print("*** %s ***\n", zBr);
453
+ fossil_free(zLastBr);
454
+ zLastBr = fossil_strdup(zBr);
455
+ if( multipleFlag ) n = 0;
456
+ }
457
+ n++;
458
+ sqlite3_snprintf(sizeof(zLineNo), zLineNo, "(%d)", n);
459
+ fossil_print("%6s ", zLineNo);
460
+ z = mprintf("%s [%S] %s", zDate, zId, zCom);
461
+ comment_print(z, zCom, 7, width, g.comFmtFlags);
462
+ fossil_free(z);
431463
}
432464
fossil_free(zLastBr);
433465
db_finalize(&q);
434466
if( showForks && !zLastBr ) fossil_print("*** OK, no ambiguous branch found ***\n");
435467
}
436468
437469
/*
438470
** WEBPAGE: leaves
439471
**
440
-** Find leaves of all branches.
472
+** Show leaf check-ins in a timeline. By default only open leaves
473
+** are listed.
474
+**
475
+** A "leaf" is a check-in with no children in the same branch. A
476
+** "closed leaf" is a leaf that has a "closed" tag. An "open leaf"
477
+** is a leaf without a "closed" tag.
478
+**
479
+** Query parameters:
480
+**
481
+** all Show all leaves
482
+** closed Show only closed leaves
441483
*/
442484
void leaves_page(void){
443485
Blob sql;
444486
Stmt q;
445487
int showAll = P("all")!=0;
446488
--- src/descendants.c
+++ src/descendants.c
@@ -352,12 +352,13 @@
352 ** The --recompute flag causes the content of the "leaf" table in the
353 ** repository database to be recomputed.
354 **
355 ** Options:
356 ** -a|--all show ALL leaves
357 ** -c|--closed show only closed leaves
358 ** --bybranch order output by branch name
 
 
359 ** --recompute recompute the "leaf" table in the repository DB
360 ** -W|--width <num> Width of lines (default is to auto-detect). Must be
361 ** >39 or 0 (= no limit, resulting in a single line per
362 ** entry).
363 **
@@ -369,15 +370,17 @@
369 int showAll = find_option("all", "a", 0)!=0;
370 int showClosed = find_option("closed", "c", 0)!=0;
371 int recomputeFlag = find_option("recompute",0,0)!=0;
372 int showForks = g.argv[1][0]!='l';
373 int byBranch = (find_option("bybranch",0,0)!=0) || showForks;
 
374 const char *zWidth = find_option("width","W",1);
375 char *zLastBr = 0;
376 int n, width;
377 char zLineNo[10];
378
 
379 if( zWidth ){
380 width = atoi(zWidth);
381 if( (width!=0) && (width<=39) ){
382 fossil_fatal("-W|--width value must be >39 or 0");
383 }
@@ -390,14 +393,45 @@
390 verify_all_options();
391
392 if( recomputeFlag ) leaf_rebuild();
393 blob_zero(&sql);
394 blob_append(&sql, timeline_query_for_tty(), -1);
395 blob_append_sql(&sql, " AND blob.rid IN leaf");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
396 if( showClosed ){
397 blob_append_sql(&sql," AND %z", leaf_is_closed_sql("blob.rid"));
398 }else if( !showAll || showForks ){
399 blob_append_sql(&sql," AND NOT %z", leaf_is_closed_sql("blob.rid"));
400 }
401 if( byBranch ){
402 db_prepare(&q, "%s ORDER BY nullif(branch,'trunk') COLLATE nocase,"
403 " event.mtime DESC",
@@ -406,40 +440,48 @@
406 db_prepare(&q, "%s ORDER BY event.mtime DESC", blob_sql_text(&sql));
407 }
408 blob_reset(&sql);
409 n = 0;
410 while( db_step(&q)==SQLITE_ROW ){
411 if( !showForks ||
412 fossil_find_nearest_fork(db_column_int(&q, 0), db_open_local(0)) ){
413 const char *zId = db_column_text(&q, 1);
414 const char *zDate = db_column_text(&q, 2);
415 const char *zCom = db_column_text(&q, 3);
416 const char *zBr = db_column_text(&q, 7);
417 char *z;
418
419 if( byBranch && fossil_strcmp(zBr, zLastBr)!=0 ){
420 fossil_print("*** %s ***\n", zBr);
421 fossil_free(zLastBr);
422 zLastBr = fossil_strdup(zBr);
423 }
424 n++;
425 sqlite3_snprintf(sizeof(zLineNo), zLineNo, "(%d)", n);
426 fossil_print("%6s ", zLineNo);
427 z = mprintf("%s [%S] %s", zDate, zId, zCom);
428 comment_print(z, zCom, 7, width, g.comFmtFlags);
429 fossil_free(z);
430 }
431 }
432 fossil_free(zLastBr);
433 db_finalize(&q);
434 if( showForks && !zLastBr ) fossil_print("*** OK, no ambiguous branch found ***\n");
435 }
436
437 /*
438 ** WEBPAGE: leaves
439 **
440 ** Find leaves of all branches.
 
 
 
 
 
 
 
 
 
 
441 */
442 void leaves_page(void){
443 Blob sql;
444 Stmt q;
445 int showAll = P("all")!=0;
446
--- src/descendants.c
+++ src/descendants.c
@@ -352,12 +352,13 @@
352 ** The --recompute flag causes the content of the "leaf" table in the
353 ** repository database to be recomputed.
354 **
355 ** Options:
356 ** -a|--all show ALL leaves
 
357 ** --bybranch order output by branch name
358 ** -c|--closed show only closed leaves
359 ** -m|--multiple show only cases with multiple leaves on a single branch
360 ** --recompute recompute the "leaf" table in the repository DB
361 ** -W|--width <num> Width of lines (default is to auto-detect). Must be
362 ** >39 or 0 (= no limit, resulting in a single line per
363 ** entry).
364 **
@@ -369,15 +370,17 @@
370 int showAll = find_option("all", "a", 0)!=0;
371 int showClosed = find_option("closed", "c", 0)!=0;
372 int recomputeFlag = find_option("recompute",0,0)!=0;
373 int showForks = g.argv[1][0]!='l';
374 int byBranch = (find_option("bybranch",0,0)!=0) || showForks;
375 int multipleFlag = (find_option("multiple","m",0))!=0 || showForks;
376 const char *zWidth = find_option("width","W",1);
377 char *zLastBr = 0;
378 int n, width;
379 char zLineNo[10];
380
381 if( multipleFlag ) byBranch = 1;
382 if( zWidth ){
383 width = atoi(zWidth);
384 if( (width!=0) && (width<=39) ){
385 fossil_fatal("-W|--width value must be >39 or 0");
386 }
@@ -390,14 +393,45 @@
393 verify_all_options();
394
395 if( recomputeFlag ) leaf_rebuild();
396 blob_zero(&sql);
397 blob_append(&sql, timeline_query_for_tty(), -1);
398 if( !multipleFlag ){
399 /* The usual case - show all leaves */
400 blob_append_sql(&sql, " AND blob.rid IN leaf");
401 }else{
402 /* Show only leaves where two are more occur in the same branch */
403 db_multi_exec(
404 "CREATE TEMP TABLE openLeaf(rid INTEGER PRIMARY KEY);"
405 "INSERT INTO openLeaf(rid)"
406 " SELECT rid FROM leaf"
407 " WHERE NOT EXISTS("
408 " SELECT 1 FROM tagxref"
409 " WHERE tagid=%d AND tagtype>0 AND rid=leaf.rid);",
410 TAG_CLOSED
411 );
412 db_multi_exec(
413 "CREATE TEMP TABLE ambiguousBranch(brname TEXT);"
414 "INSERT INTO ambiguousBranch(brname)"
415 " SELECT (SELECT value FROM tagxref WHERE tagid=%d AND rid=openLeaf.rid)"
416 " FROM openLeaf"
417 " GROUP BY 1 HAVING count(*)>1;",
418 TAG_BRANCH
419 );
420 db_multi_exec(
421 "CREATE TEMP TABLE ambiguousLeaf(rid INTEGER PRIMARY KEY);\n"
422 "INSERT INTO ambiguousLeaf(rid)\n"
423 " SELECT rid FROM openLeaf\n"
424 " WHERE (SELECT value FROM tagxref WHERE tagid=%d AND rid=openLeaf.rid)"
425 " IN (SELECT brname FROM ambiguousBranch);",
426 TAG_BRANCH
427 );
428 blob_append_sql(&sql, " AND blob.rid IN ambiguousLeaf");
429 }
430 if( showClosed ){
431 blob_append_sql(&sql," AND %z", leaf_is_closed_sql("blob.rid"));
432 }else if( !showAll ){
433 blob_append_sql(&sql," AND NOT %z", leaf_is_closed_sql("blob.rid"));
434 }
435 if( byBranch ){
436 db_prepare(&q, "%s ORDER BY nullif(branch,'trunk') COLLATE nocase,"
437 " event.mtime DESC",
@@ -406,40 +440,48 @@
440 db_prepare(&q, "%s ORDER BY event.mtime DESC", blob_sql_text(&sql));
441 }
442 blob_reset(&sql);
443 n = 0;
444 while( db_step(&q)==SQLITE_ROW ){
445 const char *zId = db_column_text(&q, 1);
446 const char *zDate = db_column_text(&q, 2);
447 const char *zCom = db_column_text(&q, 3);
448 const char *zBr = db_column_text(&q, 7);
449 char *z;
450
451 if( byBranch && fossil_strcmp(zBr, zLastBr)!=0 ){
452 fossil_print("*** %s ***\n", zBr);
453 fossil_free(zLastBr);
454 zLastBr = fossil_strdup(zBr);
455 if( multipleFlag ) n = 0;
456 }
457 n++;
458 sqlite3_snprintf(sizeof(zLineNo), zLineNo, "(%d)", n);
459 fossil_print("%6s ", zLineNo);
460 z = mprintf("%s [%S] %s", zDate, zId, zCom);
461 comment_print(z, zCom, 7, width, g.comFmtFlags);
462 fossil_free(z);
 
 
463 }
464 fossil_free(zLastBr);
465 db_finalize(&q);
466 if( showForks && !zLastBr ) fossil_print("*** OK, no ambiguous branch found ***\n");
467 }
468
469 /*
470 ** WEBPAGE: leaves
471 **
472 ** Show leaf check-ins in a timeline. By default only open leaves
473 ** are listed.
474 **
475 ** A "leaf" is a check-in with no children in the same branch. A
476 ** "closed leaf" is a leaf that has a "closed" tag. An "open leaf"
477 ** is a leaf without a "closed" tag.
478 **
479 ** Query parameters:
480 **
481 ** all Show all leaves
482 ** closed Show only closed leaves
483 */
484 void leaves_page(void){
485 Blob sql;
486 Stmt q;
487 int showAll = P("all")!=0;
488
+66 -24
--- src/descendants.c
+++ src/descendants.c
@@ -352,12 +352,13 @@
352352
** The --recompute flag causes the content of the "leaf" table in the
353353
** repository database to be recomputed.
354354
**
355355
** Options:
356356
** -a|--all show ALL leaves
357
-** -c|--closed show only closed leaves
358357
** --bybranch order output by branch name
358
+** -c|--closed show only closed leaves
359
+** -m|--multiple show only cases with multiple leaves on a single branch
359360
** --recompute recompute the "leaf" table in the repository DB
360361
** -W|--width <num> Width of lines (default is to auto-detect). Must be
361362
** >39 or 0 (= no limit, resulting in a single line per
362363
** entry).
363364
**
@@ -369,15 +370,17 @@
369370
int showAll = find_option("all", "a", 0)!=0;
370371
int showClosed = find_option("closed", "c", 0)!=0;
371372
int recomputeFlag = find_option("recompute",0,0)!=0;
372373
int showForks = g.argv[1][0]!='l';
373374
int byBranch = (find_option("bybranch",0,0)!=0) || showForks;
375
+ int multipleFlag = (find_option("multiple","m",0))!=0 || showForks;
374376
const char *zWidth = find_option("width","W",1);
375377
char *zLastBr = 0;
376378
int n, width;
377379
char zLineNo[10];
378380
381
+ if( multipleFlag ) byBranch = 1;
379382
if( zWidth ){
380383
width = atoi(zWidth);
381384
if( (width!=0) && (width<=39) ){
382385
fossil_fatal("-W|--width value must be >39 or 0");
383386
}
@@ -390,14 +393,45 @@
390393
verify_all_options();
391394
392395
if( recomputeFlag ) leaf_rebuild();
393396
blob_zero(&sql);
394397
blob_append(&sql, timeline_query_for_tty(), -1);
395
- blob_append_sql(&sql, " AND blob.rid IN leaf");
398
+ if( !multipleFlag ){
399
+ /* The usual case - show all leaves */
400
+ blob_append_sql(&sql, " AND blob.rid IN leaf");
401
+ }else{
402
+ /* Show only leaves where two are more occur in the same branch */
403
+ db_multi_exec(
404
+ "CREATE TEMP TABLE openLeaf(rid INTEGER PRIMARY KEY);"
405
+ "INSERT INTO openLeaf(rid)"
406
+ " SELECT rid FROM leaf"
407
+ " WHERE NOT EXISTS("
408
+ " SELECT 1 FROM tagxref"
409
+ " WHERE tagid=%d AND tagtype>0 AND rid=leaf.rid);",
410
+ TAG_CLOSED
411
+ );
412
+ db_multi_exec(
413
+ "CREATE TEMP TABLE ambiguousBranch(brname TEXT);"
414
+ "INSERT INTO ambiguousBranch(brname)"
415
+ " SELECT (SELECT value FROM tagxref WHERE tagid=%d AND rid=openLeaf.rid)"
416
+ " FROM openLeaf"
417
+ " GROUP BY 1 HAVING count(*)>1;",
418
+ TAG_BRANCH
419
+ );
420
+ db_multi_exec(
421
+ "CREATE TEMP TABLE ambiguousLeaf(rid INTEGER PRIMARY KEY);\n"
422
+ "INSERT INTO ambiguousLeaf(rid)\n"
423
+ " SELECT rid FROM openLeaf\n"
424
+ " WHERE (SELECT value FROM tagxref WHERE tagid=%d AND rid=openLeaf.rid)"
425
+ " IN (SELECT brname FROM ambiguousBranch);",
426
+ TAG_BRANCH
427
+ );
428
+ blob_append_sql(&sql, " AND blob.rid IN ambiguousLeaf");
429
+ }
396430
if( showClosed ){
397431
blob_append_sql(&sql," AND %z", leaf_is_closed_sql("blob.rid"));
398
- }else if( !showAll || showForks ){
432
+ }else if( !showAll ){
399433
blob_append_sql(&sql," AND NOT %z", leaf_is_closed_sql("blob.rid"));
400434
}
401435
if( byBranch ){
402436
db_prepare(&q, "%s ORDER BY nullif(branch,'trunk') COLLATE nocase,"
403437
" event.mtime DESC",
@@ -406,40 +440,48 @@
406440
db_prepare(&q, "%s ORDER BY event.mtime DESC", blob_sql_text(&sql));
407441
}
408442
blob_reset(&sql);
409443
n = 0;
410444
while( db_step(&q)==SQLITE_ROW ){
411
- if( !showForks ||
412
- fossil_find_nearest_fork(db_column_int(&q, 0), db_open_local(0)) ){
413
- const char *zId = db_column_text(&q, 1);
414
- const char *zDate = db_column_text(&q, 2);
415
- const char *zCom = db_column_text(&q, 3);
416
- const char *zBr = db_column_text(&q, 7);
417
- char *z;
418
-
419
- if( byBranch && fossil_strcmp(zBr, zLastBr)!=0 ){
420
- fossil_print("*** %s ***\n", zBr);
421
- fossil_free(zLastBr);
422
- zLastBr = fossil_strdup(zBr);
423
- }
424
- n++;
425
- sqlite3_snprintf(sizeof(zLineNo), zLineNo, "(%d)", n);
426
- fossil_print("%6s ", zLineNo);
427
- z = mprintf("%s [%S] %s", zDate, zId, zCom);
428
- comment_print(z, zCom, 7, width, g.comFmtFlags);
429
- fossil_free(z);
430
- }
445
+ const char *zId = db_column_text(&q, 1);
446
+ const char *zDate = db_column_text(&q, 2);
447
+ const char *zCom = db_column_text(&q, 3);
448
+ const char *zBr = db_column_text(&q, 7);
449
+ char *z;
450
+
451
+ if( byBranch && fossil_strcmp(zBr, zLastBr)!=0 ){
452
+ fossil_print("*** %s ***\n", zBr);
453
+ fossil_free(zLastBr);
454
+ zLastBr = fossil_strdup(zBr);
455
+ if( multipleFlag ) n = 0;
456
+ }
457
+ n++;
458
+ sqlite3_snprintf(sizeof(zLineNo), zLineNo, "(%d)", n);
459
+ fossil_print("%6s ", zLineNo);
460
+ z = mprintf("%s [%S] %s", zDate, zId, zCom);
461
+ comment_print(z, zCom, 7, width, g.comFmtFlags);
462
+ fossil_free(z);
431463
}
432464
fossil_free(zLastBr);
433465
db_finalize(&q);
434466
if( showForks && !zLastBr ) fossil_print("*** OK, no ambiguous branch found ***\n");
435467
}
436468
437469
/*
438470
** WEBPAGE: leaves
439471
**
440
-** Find leaves of all branches.
472
+** Show leaf check-ins in a timeline. By default only open leaves
473
+** are listed.
474
+**
475
+** A "leaf" is a check-in with no children in the same branch. A
476
+** "closed leaf" is a leaf that has a "closed" tag. An "open leaf"
477
+** is a leaf without a "closed" tag.
478
+**
479
+** Query parameters:
480
+**
481
+** all Show all leaves
482
+** closed Show only closed leaves
441483
*/
442484
void leaves_page(void){
443485
Blob sql;
444486
Stmt q;
445487
int showAll = P("all")!=0;
446488
--- src/descendants.c
+++ src/descendants.c
@@ -352,12 +352,13 @@
352 ** The --recompute flag causes the content of the "leaf" table in the
353 ** repository database to be recomputed.
354 **
355 ** Options:
356 ** -a|--all show ALL leaves
357 ** -c|--closed show only closed leaves
358 ** --bybranch order output by branch name
 
 
359 ** --recompute recompute the "leaf" table in the repository DB
360 ** -W|--width <num> Width of lines (default is to auto-detect). Must be
361 ** >39 or 0 (= no limit, resulting in a single line per
362 ** entry).
363 **
@@ -369,15 +370,17 @@
369 int showAll = find_option("all", "a", 0)!=0;
370 int showClosed = find_option("closed", "c", 0)!=0;
371 int recomputeFlag = find_option("recompute",0,0)!=0;
372 int showForks = g.argv[1][0]!='l';
373 int byBranch = (find_option("bybranch",0,0)!=0) || showForks;
 
374 const char *zWidth = find_option("width","W",1);
375 char *zLastBr = 0;
376 int n, width;
377 char zLineNo[10];
378
 
379 if( zWidth ){
380 width = atoi(zWidth);
381 if( (width!=0) && (width<=39) ){
382 fossil_fatal("-W|--width value must be >39 or 0");
383 }
@@ -390,14 +393,45 @@
390 verify_all_options();
391
392 if( recomputeFlag ) leaf_rebuild();
393 blob_zero(&sql);
394 blob_append(&sql, timeline_query_for_tty(), -1);
395 blob_append_sql(&sql, " AND blob.rid IN leaf");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
396 if( showClosed ){
397 blob_append_sql(&sql," AND %z", leaf_is_closed_sql("blob.rid"));
398 }else if( !showAll || showForks ){
399 blob_append_sql(&sql," AND NOT %z", leaf_is_closed_sql("blob.rid"));
400 }
401 if( byBranch ){
402 db_prepare(&q, "%s ORDER BY nullif(branch,'trunk') COLLATE nocase,"
403 " event.mtime DESC",
@@ -406,40 +440,48 @@
406 db_prepare(&q, "%s ORDER BY event.mtime DESC", blob_sql_text(&sql));
407 }
408 blob_reset(&sql);
409 n = 0;
410 while( db_step(&q)==SQLITE_ROW ){
411 if( !showForks ||
412 fossil_find_nearest_fork(db_column_int(&q, 0), db_open_local(0)) ){
413 const char *zId = db_column_text(&q, 1);
414 const char *zDate = db_column_text(&q, 2);
415 const char *zCom = db_column_text(&q, 3);
416 const char *zBr = db_column_text(&q, 7);
417 char *z;
418
419 if( byBranch && fossil_strcmp(zBr, zLastBr)!=0 ){
420 fossil_print("*** %s ***\n", zBr);
421 fossil_free(zLastBr);
422 zLastBr = fossil_strdup(zBr);
423 }
424 n++;
425 sqlite3_snprintf(sizeof(zLineNo), zLineNo, "(%d)", n);
426 fossil_print("%6s ", zLineNo);
427 z = mprintf("%s [%S] %s", zDate, zId, zCom);
428 comment_print(z, zCom, 7, width, g.comFmtFlags);
429 fossil_free(z);
430 }
431 }
432 fossil_free(zLastBr);
433 db_finalize(&q);
434 if( showForks && !zLastBr ) fossil_print("*** OK, no ambiguous branch found ***\n");
435 }
436
437 /*
438 ** WEBPAGE: leaves
439 **
440 ** Find leaves of all branches.
 
 
 
 
 
 
 
 
 
 
441 */
442 void leaves_page(void){
443 Blob sql;
444 Stmt q;
445 int showAll = P("all")!=0;
446
--- src/descendants.c
+++ src/descendants.c
@@ -352,12 +352,13 @@
352 ** The --recompute flag causes the content of the "leaf" table in the
353 ** repository database to be recomputed.
354 **
355 ** Options:
356 ** -a|--all show ALL leaves
 
357 ** --bybranch order output by branch name
358 ** -c|--closed show only closed leaves
359 ** -m|--multiple show only cases with multiple leaves on a single branch
360 ** --recompute recompute the "leaf" table in the repository DB
361 ** -W|--width <num> Width of lines (default is to auto-detect). Must be
362 ** >39 or 0 (= no limit, resulting in a single line per
363 ** entry).
364 **
@@ -369,15 +370,17 @@
370 int showAll = find_option("all", "a", 0)!=0;
371 int showClosed = find_option("closed", "c", 0)!=0;
372 int recomputeFlag = find_option("recompute",0,0)!=0;
373 int showForks = g.argv[1][0]!='l';
374 int byBranch = (find_option("bybranch",0,0)!=0) || showForks;
375 int multipleFlag = (find_option("multiple","m",0))!=0 || showForks;
376 const char *zWidth = find_option("width","W",1);
377 char *zLastBr = 0;
378 int n, width;
379 char zLineNo[10];
380
381 if( multipleFlag ) byBranch = 1;
382 if( zWidth ){
383 width = atoi(zWidth);
384 if( (width!=0) && (width<=39) ){
385 fossil_fatal("-W|--width value must be >39 or 0");
386 }
@@ -390,14 +393,45 @@
393 verify_all_options();
394
395 if( recomputeFlag ) leaf_rebuild();
396 blob_zero(&sql);
397 blob_append(&sql, timeline_query_for_tty(), -1);
398 if( !multipleFlag ){
399 /* The usual case - show all leaves */
400 blob_append_sql(&sql, " AND blob.rid IN leaf");
401 }else{
402 /* Show only leaves where two are more occur in the same branch */
403 db_multi_exec(
404 "CREATE TEMP TABLE openLeaf(rid INTEGER PRIMARY KEY);"
405 "INSERT INTO openLeaf(rid)"
406 " SELECT rid FROM leaf"
407 " WHERE NOT EXISTS("
408 " SELECT 1 FROM tagxref"
409 " WHERE tagid=%d AND tagtype>0 AND rid=leaf.rid);",
410 TAG_CLOSED
411 );
412 db_multi_exec(
413 "CREATE TEMP TABLE ambiguousBranch(brname TEXT);"
414 "INSERT INTO ambiguousBranch(brname)"
415 " SELECT (SELECT value FROM tagxref WHERE tagid=%d AND rid=openLeaf.rid)"
416 " FROM openLeaf"
417 " GROUP BY 1 HAVING count(*)>1;",
418 TAG_BRANCH
419 );
420 db_multi_exec(
421 "CREATE TEMP TABLE ambiguousLeaf(rid INTEGER PRIMARY KEY);\n"
422 "INSERT INTO ambiguousLeaf(rid)\n"
423 " SELECT rid FROM openLeaf\n"
424 " WHERE (SELECT value FROM tagxref WHERE tagid=%d AND rid=openLeaf.rid)"
425 " IN (SELECT brname FROM ambiguousBranch);",
426 TAG_BRANCH
427 );
428 blob_append_sql(&sql, " AND blob.rid IN ambiguousLeaf");
429 }
430 if( showClosed ){
431 blob_append_sql(&sql," AND %z", leaf_is_closed_sql("blob.rid"));
432 }else if( !showAll ){
433 blob_append_sql(&sql," AND NOT %z", leaf_is_closed_sql("blob.rid"));
434 }
435 if( byBranch ){
436 db_prepare(&q, "%s ORDER BY nullif(branch,'trunk') COLLATE nocase,"
437 " event.mtime DESC",
@@ -406,40 +440,48 @@
440 db_prepare(&q, "%s ORDER BY event.mtime DESC", blob_sql_text(&sql));
441 }
442 blob_reset(&sql);
443 n = 0;
444 while( db_step(&q)==SQLITE_ROW ){
445 const char *zId = db_column_text(&q, 1);
446 const char *zDate = db_column_text(&q, 2);
447 const char *zCom = db_column_text(&q, 3);
448 const char *zBr = db_column_text(&q, 7);
449 char *z;
450
451 if( byBranch && fossil_strcmp(zBr, zLastBr)!=0 ){
452 fossil_print("*** %s ***\n", zBr);
453 fossil_free(zLastBr);
454 zLastBr = fossil_strdup(zBr);
455 if( multipleFlag ) n = 0;
456 }
457 n++;
458 sqlite3_snprintf(sizeof(zLineNo), zLineNo, "(%d)", n);
459 fossil_print("%6s ", zLineNo);
460 z = mprintf("%s [%S] %s", zDate, zId, zCom);
461 comment_print(z, zCom, 7, width, g.comFmtFlags);
462 fossil_free(z);
 
 
463 }
464 fossil_free(zLastBr);
465 db_finalize(&q);
466 if( showForks && !zLastBr ) fossil_print("*** OK, no ambiguous branch found ***\n");
467 }
468
469 /*
470 ** WEBPAGE: leaves
471 **
472 ** Show leaf check-ins in a timeline. By default only open leaves
473 ** are listed.
474 **
475 ** A "leaf" is a check-in with no children in the same branch. A
476 ** "closed leaf" is a leaf that has a "closed" tag. An "open leaf"
477 ** is a leaf without a "closed" tag.
478 **
479 ** Query parameters:
480 **
481 ** all Show all leaves
482 ** closed Show only closed leaves
483 */
484 void leaves_page(void){
485 Blob sql;
486 Stmt q;
487 int showAll = P("all")!=0;
488
+17 -1
--- src/diff.c
+++ src/diff.c
@@ -1929,10 +1929,16 @@
19291929
return diffFlags;
19301930
}
19311931
19321932
/*
19331933
** COMMAND: test-rawdiff
1934
+**
1935
+** Usage: %fossil test-rawdiff FILE1 FILE2
1936
+**
1937
+** Show a minimal sequence of Copy/Delete/Insert operations needed to convert
1938
+** FILE1 into FILE2. This command is intended for use in testing and debugging
1939
+** the built-in difference engine of Fossil.
19341940
*/
19351941
void test_rawdiff_cmd(void){
19361942
Blob a, b;
19371943
int r;
19381944
int i;
@@ -2207,17 +2213,27 @@
22072213
/*
22082214
** WEBPAGE: annotate
22092215
** WEBPAGE: blame
22102216
** WEBPAGE: praise
22112217
**
2218
+** URL: /annotate?checkin=ID&filename=FILENAME
2219
+** URL: /blame?checkin=ID&filename=FILENAME
2220
+** URL: /praise?checkin=ID&filename=FILENAME
2221
+**
2222
+** Show the most recent change to each line of a text file. /annotate shows
2223
+** the date of the changes and the check-in SHA1 hash (with a link to the
2224
+** check-in). /blame and /praise also show the user who made the check-in.
2225
+**
22122226
** Query parameters:
22132227
**
22142228
** checkin=ID The manifest ID at which to start the annotation
22152229
** filename=FILENAME The filename.
22162230
** filevers Show file versions rather than check-in versions
2217
-** log=BOOLEAN Show a log of versions analyzed
22182231
** limit=N Limit the search depth to N ancestors
2232
+** log=BOOLEAN Show a log of versions analyzed
2233
+** w Ignore whitespace
2234
+**
22192235
*/
22202236
void annotation_page(void){
22212237
int mid;
22222238
int fnid;
22232239
int i;
22242240
--- src/diff.c
+++ src/diff.c
@@ -1929,10 +1929,16 @@
1929 return diffFlags;
1930 }
1931
1932 /*
1933 ** COMMAND: test-rawdiff
 
 
 
 
 
 
1934 */
1935 void test_rawdiff_cmd(void){
1936 Blob a, b;
1937 int r;
1938 int i;
@@ -2207,17 +2213,27 @@
2207 /*
2208 ** WEBPAGE: annotate
2209 ** WEBPAGE: blame
2210 ** WEBPAGE: praise
2211 **
 
 
 
 
 
 
 
 
2212 ** Query parameters:
2213 **
2214 ** checkin=ID The manifest ID at which to start the annotation
2215 ** filename=FILENAME The filename.
2216 ** filevers Show file versions rather than check-in versions
2217 ** log=BOOLEAN Show a log of versions analyzed
2218 ** limit=N Limit the search depth to N ancestors
 
 
 
2219 */
2220 void annotation_page(void){
2221 int mid;
2222 int fnid;
2223 int i;
2224
--- src/diff.c
+++ src/diff.c
@@ -1929,10 +1929,16 @@
1929 return diffFlags;
1930 }
1931
1932 /*
1933 ** COMMAND: test-rawdiff
1934 **
1935 ** Usage: %fossil test-rawdiff FILE1 FILE2
1936 **
1937 ** Show a minimal sequence of Copy/Delete/Insert operations needed to convert
1938 ** FILE1 into FILE2. This command is intended for use in testing and debugging
1939 ** the built-in difference engine of Fossil.
1940 */
1941 void test_rawdiff_cmd(void){
1942 Blob a, b;
1943 int r;
1944 int i;
@@ -2207,17 +2213,27 @@
2213 /*
2214 ** WEBPAGE: annotate
2215 ** WEBPAGE: blame
2216 ** WEBPAGE: praise
2217 **
2218 ** URL: /annotate?checkin=ID&filename=FILENAME
2219 ** URL: /blame?checkin=ID&filename=FILENAME
2220 ** URL: /praise?checkin=ID&filename=FILENAME
2221 **
2222 ** Show the most recent change to each line of a text file. /annotate shows
2223 ** the date of the changes and the check-in SHA1 hash (with a link to the
2224 ** check-in). /blame and /praise also show the user who made the check-in.
2225 **
2226 ** Query parameters:
2227 **
2228 ** checkin=ID The manifest ID at which to start the annotation
2229 ** filename=FILENAME The filename.
2230 ** filevers Show file versions rather than check-in versions
 
2231 ** limit=N Limit the search depth to N ancestors
2232 ** log=BOOLEAN Show a log of versions analyzed
2233 ** w Ignore whitespace
2234 **
2235 */
2236 void annotation_page(void){
2237 int mid;
2238 int fnid;
2239 int i;
2240
+3 -1
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -835,11 +835,13 @@
835835
}
836836
}
837837
838838
/*
839839
** WEBPAGE: vpatch
840
-** URL vpatch?from=UUID&to=UUID
840
+** URL: /vpatch?from=FROM&to=TO
841
+**
842
+** Show a patch that goes from check-in FROM to check-in TO.
841843
*/
842844
void vpatch_page(void){
843845
const char *zFrom = P("from");
844846
const char *zTo = P("to");
845847
login_check_credentials();
846848
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -835,11 +835,13 @@
835 }
836 }
837
838 /*
839 ** WEBPAGE: vpatch
840 ** URL vpatch?from=UUID&to=UUID
 
 
841 */
842 void vpatch_page(void){
843 const char *zFrom = P("from");
844 const char *zTo = P("to");
845 login_check_credentials();
846
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -835,11 +835,13 @@
835 }
836 }
837
838 /*
839 ** WEBPAGE: vpatch
840 ** URL: /vpatch?from=FROM&to=TO
841 **
842 ** Show a patch that goes from check-in FROM to check-in TO.
843 */
844 void vpatch_page(void){
845 const char *zFrom = P("from");
846 const char *zTo = P("to");
847 login_check_credentials();
848
+10 -3
--- src/doc.c
+++ src/doc.c
@@ -774,11 +774,12 @@
774774
775775
776776
/*
777777
** WEBPAGE: background
778778
**
779
-** Return the background image.
779
+** Return the background image. If no background image is defined, a
780
+** built-in 16x16 pixel white GIF is returned.
780781
*/
781782
void background_page(void){
782783
Blob bgimg;
783784
char *zMime;
784785
@@ -793,15 +794,21 @@
793794
g.isConst = 1;
794795
}
795796
796797
797798
/*
798
-** WEBPAGE: /docsrch
799
+** WEBPAGE: docsrch
800
+**
801
+** Search for documents that match a user-supplied full-text search pattern.
802
+** If no pattern is specified (by the s= query parameter) then the user
803
+** is prompted to enter a search string.
804
+**
805
+** Query parameters:
799806
**
800
-** Search for documents that match a user-supplied pattern.
807
+** s=PATTERN Search for PATTERN
801808
*/
802809
void doc_search_page(void){
803810
login_check_credentials();
804811
style_header("Document Search");
805812
search_screen(SRCH_DOC, 0);
806813
style_footer();
807814
}
808815
--- src/doc.c
+++ src/doc.c
@@ -774,11 +774,12 @@
774
775
776 /*
777 ** WEBPAGE: background
778 **
779 ** Return the background image.
 
780 */
781 void background_page(void){
782 Blob bgimg;
783 char *zMime;
784
@@ -793,15 +794,21 @@
793 g.isConst = 1;
794 }
795
796
797 /*
798 ** WEBPAGE: /docsrch
 
 
 
 
 
 
799 **
800 ** Search for documents that match a user-supplied pattern.
801 */
802 void doc_search_page(void){
803 login_check_credentials();
804 style_header("Document Search");
805 search_screen(SRCH_DOC, 0);
806 style_footer();
807 }
808
--- src/doc.c
+++ src/doc.c
@@ -774,11 +774,12 @@
774
775
776 /*
777 ** WEBPAGE: background
778 **
779 ** Return the background image. If no background image is defined, a
780 ** built-in 16x16 pixel white GIF is returned.
781 */
782 void background_page(void){
783 Blob bgimg;
784 char *zMime;
785
@@ -793,15 +794,21 @@
794 g.isConst = 1;
795 }
796
797
798 /*
799 ** WEBPAGE: docsrch
800 **
801 ** Search for documents that match a user-supplied full-text search pattern.
802 ** If no pattern is specified (by the s= query parameter) then the user
803 ** is prompted to enter a search string.
804 **
805 ** Query parameters:
806 **
807 ** s=PATTERN Search for PATTERN
808 */
809 void doc_search_page(void){
810 login_check_credentials();
811 style_header("Document Search");
812 search_screen(SRCH_DOC, 0);
813 style_footer();
814 }
815
--- src/encode.c
+++ src/encode.c
@@ -606,10 +606,14 @@
606606
/*
607607
** Command to test obscure() and unobscure(). These commands are also useful
608608
** utilities for decoding passwords found in the database.
609609
**
610610
** COMMAND: test-obscure
611
+**
612
+** For each command-line argument X, run both obscure(X) and
613
+** unobscure(obscure(X)) and print the results. This is used for testing
614
+** and debugging of the obscure() and unobscure() functions.
611615
*/
612616
void test_obscure_cmd(void){
613617
int i;
614618
char *z, *z2;
615619
for(i=2; i<g.argc; i++){
616620
--- src/encode.c
+++ src/encode.c
@@ -606,10 +606,14 @@
606 /*
607 ** Command to test obscure() and unobscure(). These commands are also useful
608 ** utilities for decoding passwords found in the database.
609 **
610 ** COMMAND: test-obscure
 
 
 
 
611 */
612 void test_obscure_cmd(void){
613 int i;
614 char *z, *z2;
615 for(i=2; i<g.argc; i++){
616
--- src/encode.c
+++ src/encode.c
@@ -606,10 +606,14 @@
606 /*
607 ** Command to test obscure() and unobscure(). These commands are also useful
608 ** utilities for decoding passwords found in the database.
609 **
610 ** COMMAND: test-obscure
611 **
612 ** For each command-line argument X, run both obscure(X) and
613 ** unobscure(obscure(X)) and print the results. This is used for testing
614 ** and debugging of the obscure() and unobscure() functions.
615 */
616 void test_obscure_cmd(void){
617 int i;
618 char *z, *z2;
619 for(i=2; i<g.argc; i++){
620
--- src/finfo.c
+++ src/finfo.c
@@ -288,10 +288,11 @@
288288
** b=DATE Only show changes before DATE
289289
** n=NUM Show the first NUM changes only
290290
** brbg Background color by branch name
291291
** ubg Background color by user name
292292
** ci=UUID Ancestors of a particular check-in
293
+** showid Show RID values for debugging
293294
*/
294295
void finfo_page(void){
295296
Stmt q;
296297
const char *zFilename;
297298
char zPrevDate[20];
298299
--- src/finfo.c
+++ src/finfo.c
@@ -288,10 +288,11 @@
288 ** b=DATE Only show changes before DATE
289 ** n=NUM Show the first NUM changes only
290 ** brbg Background color by branch name
291 ** ubg Background color by user name
292 ** ci=UUID Ancestors of a particular check-in
 
293 */
294 void finfo_page(void){
295 Stmt q;
296 const char *zFilename;
297 char zPrevDate[20];
298
--- src/finfo.c
+++ src/finfo.c
@@ -288,10 +288,11 @@
288 ** b=DATE Only show changes before DATE
289 ** n=NUM Show the first NUM changes only
290 ** brbg Background color by branch name
291 ** ubg Background color by user name
292 ** ci=UUID Ancestors of a particular check-in
293 ** showid Show RID values for debugging
294 */
295 void finfo_page(void){
296 Stmt q;
297 const char *zFilename;
298 char zPrevDate[20];
299
+19 -31
--- src/info.c
+++ src/info.c
@@ -49,13 +49,12 @@
4949
** * The UUID
5050
** * The record ID
5151
** * mtime and ctime
5252
** * who signed it
5353
**
54
-** Returns 1 when a fork was found.
5554
*/
56
-int show_common_info(
55
+void show_common_info(
5756
int rid, /* The rid for the check-in to display info for */
5857
const char *zUuidName, /* Name of the UUID */
5958
int showComment, /* True to show the check-in comment */
6059
int showFamily /* True to show parents and children */
6160
){
@@ -62,11 +61,10 @@
6261
Stmt q;
6362
char *zComment = 0;
6463
char *zTags;
6564
char *zDate;
6665
char *zUuid;
67
- int isFork = 0;
6866
zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
6967
if( zUuid ){
7068
zDate = db_text(0,
7169
"SELECT datetime(mtime) || ' UTC' FROM event WHERE objid=%d",
7270
rid
@@ -112,29 +110,10 @@
112110
fossil_print("%-13s %s %s\n", zType, zUuid, zDate);
113111
free(zDate);
114112
}
115113
db_finalize(&q);
116114
}
117
- if( zUuid ){
118
- fossil_print("%-13s ", "leaf:");
119
- if( is_a_leaf(rid) ){
120
- if( db_int(0, "SELECT 1 FROM tagxref AS tx"
121
- " WHERE tx.rid=%d"
122
- " AND tx.tagid=%d"
123
- " AND tx.tagtype>0",
124
- rid, TAG_CLOSED)){
125
- fossil_print("%s\n", "closed");
126
- }else if( fossil_find_nearest_fork(rid, db_open_local(0)) ){
127
- fossil_print("%s\n", "fork");
128
- isFork = 1;
129
- }else{
130
- fossil_print("%s\n", "open");
131
- }
132
- }else{
133
- fossil_print("no\n");
134
- }
135
- }
136115
zTags = info_tags_of_checkin(rid, 0);
137116
if( zTags && zTags[0] ){
138117
fossil_print("tags: %s\n", zTags);
139118
}
140119
free(zTags);
@@ -141,11 +120,10 @@
141120
if( zComment ){
142121
fossil_print("comment: ");
143122
comment_print(zComment, 0, 14, -1, g.comFmtFlags);
144123
free(zComment);
145124
}
146
- return isFork;
147125
}
148126
149127
/*
150128
** Print information about the URLs used to access a repository and
151129
** checkouts in a repository.
@@ -507,15 +485,16 @@
507485
}
508486
509487
/*
510488
** WEBPAGE: vinfo
511489
** WEBPAGE: ci
512
-** URL: /ci?name=RID|ARTIFACTID
490
+** URL: /ci?name=ARTIFACTID
491
+** URL: /vinfo?name=ARTIFACTID
513492
**
514493
** Display information about a particular check-in.
515494
**
516
-** We also jump here from /info if the name is a version.
495
+** We also jump here from /info if the name is a check-in
517496
**
518497
** If the /ci page is used (instead of /vinfo or /info) then the
519498
** default behavior is to show unified diffs of all file changes.
520499
** With /vinfo and /info, only a list of the changed files are
521500
** shown, without diffs. This behavior is inverted if the
@@ -770,11 +749,11 @@
770749
771750
/*
772751
** WEBPAGE: winfo
773752
** URL: /winfo?name=UUID
774753
**
775
-** Return information about a wiki page.
754
+** Display information about a wiki page.
776755
*/
777756
void winfo_page(void){
778757
int rid;
779758
Manifest *pWiki;
780759
char *zUuid;
@@ -973,20 +952,25 @@
973952
}
974953
975954
976955
/*
977956
** WEBPAGE: vdiff
978
-** URL: /vdiff
957
+** URL: /vdiff?from=TAG&to=TAG
958
+**
959
+** Show the difference between two check-ins identified by the from= and
960
+** to= query parameters.
979961
**
980962
** Query parameters:
981963
**
982964
** from=TAG Left side of the comparison
983965
** to=TAG Right side of the comparison
984966
** branch=TAG Show all changes on a particular branch
985967
** v=BOOLEAN Default true. If false, only list files that have changed
986968
** sbs=BOOLEAN Side-by-side diff if true. Unified diff if false
987969
** glob=STRING only diff files matching this glob
970
+** dc=N show N lines of context around each diff
971
+** w ignore whitespace when computing diffs
988972
**
989973
**
990974
** Show all differences between two check-ins.
991975
*/
992976
void vdiff_page(void){
@@ -1419,10 +1403,12 @@
14191403
** is 0. Generate plaintext if "patch" is present.
14201404
**
14211405
** Additional parameters:
14221406
**
14231407
** verbose Show more detail when describing artifacts
1408
+** dc=N Show N lines of context around each diff
1409
+** w Ignore whitespace
14241410
*/
14251411
void diff_page(void){
14261412
int v1, v2;
14271413
int isPatch;
14281414
int sideBySide;
@@ -2046,14 +2032,14 @@
20462032
20472033
/*
20482034
** WEBPAGE: info
20492035
** URL: info/ARTIFACTID
20502036
**
2051
-** The argument is a artifact ID which might be a baseline or a file or
2037
+** The argument is a artifact ID which might be a check-in or a file or
20522038
** a ticket changes or a wiki edit or something else.
20532039
**
2054
-** Figure out what the artifact ID is and jump to it.
2040
+** Figure out what the artifact ID is and display it appropriately.
20552041
*/
20562042
void info_page(void){
20572043
const char *zName;
20582044
Blob uuid;
20592045
int rid;
@@ -2281,17 +2267,19 @@
22812267
return zA[0]==0 && zB[0]==0;
22822268
}
22832269
22842270
/*
22852271
** WEBPAGE: ci_edit
2286
-** URL: ci_edit?r=RID&c=NEWCOMMENT&u=NEWUSER
2272
+** URL: /ci_edit?r=RID&c=NEWCOMMENT&u=NEWUSER
22872273
**
2288
-** Present a dialog for updating properties of a baseline:
2274
+** Present a dialog for updating properties of a check-in.
22892275
**
22902276
** * The check-in user
22912277
** * The check-in comment
2278
+** * The check-in time and date
22922279
** * The background color.
2280
+** * Add and remove tags
22932281
*/
22942282
void ci_edit_page(void){
22952283
int rid;
22962284
const char *zComment; /* Current comment on the check-in */
22972285
const char *zNewComment; /* Revised check-in comment */
22982286
--- src/info.c
+++ src/info.c
@@ -49,13 +49,12 @@
49 ** * The UUID
50 ** * The record ID
51 ** * mtime and ctime
52 ** * who signed it
53 **
54 ** Returns 1 when a fork was found.
55 */
56 int show_common_info(
57 int rid, /* The rid for the check-in to display info for */
58 const char *zUuidName, /* Name of the UUID */
59 int showComment, /* True to show the check-in comment */
60 int showFamily /* True to show parents and children */
61 ){
@@ -62,11 +61,10 @@
62 Stmt q;
63 char *zComment = 0;
64 char *zTags;
65 char *zDate;
66 char *zUuid;
67 int isFork = 0;
68 zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
69 if( zUuid ){
70 zDate = db_text(0,
71 "SELECT datetime(mtime) || ' UTC' FROM event WHERE objid=%d",
72 rid
@@ -112,29 +110,10 @@
112 fossil_print("%-13s %s %s\n", zType, zUuid, zDate);
113 free(zDate);
114 }
115 db_finalize(&q);
116 }
117 if( zUuid ){
118 fossil_print("%-13s ", "leaf:");
119 if( is_a_leaf(rid) ){
120 if( db_int(0, "SELECT 1 FROM tagxref AS tx"
121 " WHERE tx.rid=%d"
122 " AND tx.tagid=%d"
123 " AND tx.tagtype>0",
124 rid, TAG_CLOSED)){
125 fossil_print("%s\n", "closed");
126 }else if( fossil_find_nearest_fork(rid, db_open_local(0)) ){
127 fossil_print("%s\n", "fork");
128 isFork = 1;
129 }else{
130 fossil_print("%s\n", "open");
131 }
132 }else{
133 fossil_print("no\n");
134 }
135 }
136 zTags = info_tags_of_checkin(rid, 0);
137 if( zTags && zTags[0] ){
138 fossil_print("tags: %s\n", zTags);
139 }
140 free(zTags);
@@ -141,11 +120,10 @@
141 if( zComment ){
142 fossil_print("comment: ");
143 comment_print(zComment, 0, 14, -1, g.comFmtFlags);
144 free(zComment);
145 }
146 return isFork;
147 }
148
149 /*
150 ** Print information about the URLs used to access a repository and
151 ** checkouts in a repository.
@@ -507,15 +485,16 @@
507 }
508
509 /*
510 ** WEBPAGE: vinfo
511 ** WEBPAGE: ci
512 ** URL: /ci?name=RID|ARTIFACTID
 
513 **
514 ** Display information about a particular check-in.
515 **
516 ** We also jump here from /info if the name is a version.
517 **
518 ** If the /ci page is used (instead of /vinfo or /info) then the
519 ** default behavior is to show unified diffs of all file changes.
520 ** With /vinfo and /info, only a list of the changed files are
521 ** shown, without diffs. This behavior is inverted if the
@@ -770,11 +749,11 @@
770
771 /*
772 ** WEBPAGE: winfo
773 ** URL: /winfo?name=UUID
774 **
775 ** Return information about a wiki page.
776 */
777 void winfo_page(void){
778 int rid;
779 Manifest *pWiki;
780 char *zUuid;
@@ -973,20 +952,25 @@
973 }
974
975
976 /*
977 ** WEBPAGE: vdiff
978 ** URL: /vdiff
 
 
 
979 **
980 ** Query parameters:
981 **
982 ** from=TAG Left side of the comparison
983 ** to=TAG Right side of the comparison
984 ** branch=TAG Show all changes on a particular branch
985 ** v=BOOLEAN Default true. If false, only list files that have changed
986 ** sbs=BOOLEAN Side-by-side diff if true. Unified diff if false
987 ** glob=STRING only diff files matching this glob
 
 
988 **
989 **
990 ** Show all differences between two check-ins.
991 */
992 void vdiff_page(void){
@@ -1419,10 +1403,12 @@
1419 ** is 0. Generate plaintext if "patch" is present.
1420 **
1421 ** Additional parameters:
1422 **
1423 ** verbose Show more detail when describing artifacts
 
 
1424 */
1425 void diff_page(void){
1426 int v1, v2;
1427 int isPatch;
1428 int sideBySide;
@@ -2046,14 +2032,14 @@
2046
2047 /*
2048 ** WEBPAGE: info
2049 ** URL: info/ARTIFACTID
2050 **
2051 ** The argument is a artifact ID which might be a baseline or a file or
2052 ** a ticket changes or a wiki edit or something else.
2053 **
2054 ** Figure out what the artifact ID is and jump to it.
2055 */
2056 void info_page(void){
2057 const char *zName;
2058 Blob uuid;
2059 int rid;
@@ -2281,17 +2267,19 @@
2281 return zA[0]==0 && zB[0]==0;
2282 }
2283
2284 /*
2285 ** WEBPAGE: ci_edit
2286 ** URL: ci_edit?r=RID&c=NEWCOMMENT&u=NEWUSER
2287 **
2288 ** Present a dialog for updating properties of a baseline:
2289 **
2290 ** * The check-in user
2291 ** * The check-in comment
 
2292 ** * The background color.
 
2293 */
2294 void ci_edit_page(void){
2295 int rid;
2296 const char *zComment; /* Current comment on the check-in */
2297 const char *zNewComment; /* Revised check-in comment */
2298
--- src/info.c
+++ src/info.c
@@ -49,13 +49,12 @@
49 ** * The UUID
50 ** * The record ID
51 ** * mtime and ctime
52 ** * who signed it
53 **
 
54 */
55 void show_common_info(
56 int rid, /* The rid for the check-in to display info for */
57 const char *zUuidName, /* Name of the UUID */
58 int showComment, /* True to show the check-in comment */
59 int showFamily /* True to show parents and children */
60 ){
@@ -62,11 +61,10 @@
61 Stmt q;
62 char *zComment = 0;
63 char *zTags;
64 char *zDate;
65 char *zUuid;
 
66 zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
67 if( zUuid ){
68 zDate = db_text(0,
69 "SELECT datetime(mtime) || ' UTC' FROM event WHERE objid=%d",
70 rid
@@ -112,29 +110,10 @@
110 fossil_print("%-13s %s %s\n", zType, zUuid, zDate);
111 free(zDate);
112 }
113 db_finalize(&q);
114 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
115 zTags = info_tags_of_checkin(rid, 0);
116 if( zTags && zTags[0] ){
117 fossil_print("tags: %s\n", zTags);
118 }
119 free(zTags);
@@ -141,11 +120,10 @@
120 if( zComment ){
121 fossil_print("comment: ");
122 comment_print(zComment, 0, 14, -1, g.comFmtFlags);
123 free(zComment);
124 }
 
125 }
126
127 /*
128 ** Print information about the URLs used to access a repository and
129 ** checkouts in a repository.
@@ -507,15 +485,16 @@
485 }
486
487 /*
488 ** WEBPAGE: vinfo
489 ** WEBPAGE: ci
490 ** URL: /ci?name=ARTIFACTID
491 ** URL: /vinfo?name=ARTIFACTID
492 **
493 ** Display information about a particular check-in.
494 **
495 ** We also jump here from /info if the name is a check-in
496 **
497 ** If the /ci page is used (instead of /vinfo or /info) then the
498 ** default behavior is to show unified diffs of all file changes.
499 ** With /vinfo and /info, only a list of the changed files are
500 ** shown, without diffs. This behavior is inverted if the
@@ -770,11 +749,11 @@
749
750 /*
751 ** WEBPAGE: winfo
752 ** URL: /winfo?name=UUID
753 **
754 ** Display information about a wiki page.
755 */
756 void winfo_page(void){
757 int rid;
758 Manifest *pWiki;
759 char *zUuid;
@@ -973,20 +952,25 @@
952 }
953
954
955 /*
956 ** WEBPAGE: vdiff
957 ** URL: /vdiff?from=TAG&to=TAG
958 **
959 ** Show the difference between two check-ins identified by the from= and
960 ** to= query parameters.
961 **
962 ** Query parameters:
963 **
964 ** from=TAG Left side of the comparison
965 ** to=TAG Right side of the comparison
966 ** branch=TAG Show all changes on a particular branch
967 ** v=BOOLEAN Default true. If false, only list files that have changed
968 ** sbs=BOOLEAN Side-by-side diff if true. Unified diff if false
969 ** glob=STRING only diff files matching this glob
970 ** dc=N show N lines of context around each diff
971 ** w ignore whitespace when computing diffs
972 **
973 **
974 ** Show all differences between two check-ins.
975 */
976 void vdiff_page(void){
@@ -1419,10 +1403,12 @@
1403 ** is 0. Generate plaintext if "patch" is present.
1404 **
1405 ** Additional parameters:
1406 **
1407 ** verbose Show more detail when describing artifacts
1408 ** dc=N Show N lines of context around each diff
1409 ** w Ignore whitespace
1410 */
1411 void diff_page(void){
1412 int v1, v2;
1413 int isPatch;
1414 int sideBySide;
@@ -2046,14 +2032,14 @@
2032
2033 /*
2034 ** WEBPAGE: info
2035 ** URL: info/ARTIFACTID
2036 **
2037 ** The argument is a artifact ID which might be a check-in or a file or
2038 ** a ticket changes or a wiki edit or something else.
2039 **
2040 ** Figure out what the artifact ID is and display it appropriately.
2041 */
2042 void info_page(void){
2043 const char *zName;
2044 Blob uuid;
2045 int rid;
@@ -2281,17 +2267,19 @@
2267 return zA[0]==0 && zB[0]==0;
2268 }
2269
2270 /*
2271 ** WEBPAGE: ci_edit
2272 ** URL: /ci_edit?r=RID&c=NEWCOMMENT&u=NEWUSER
2273 **
2274 ** Present a dialog for updating properties of a check-in.
2275 **
2276 ** * The check-in user
2277 ** * The check-in comment
2278 ** * The check-in time and date
2279 ** * The background color.
2280 ** * Add and remove tags
2281 */
2282 void ci_edit_page(void){
2283 int rid;
2284 const char *zComment; /* Current comment on the check-in */
2285 const char *zNewComment; /* Revised check-in comment */
2286
+19 -31
--- src/info.c
+++ src/info.c
@@ -49,13 +49,12 @@
4949
** * The UUID
5050
** * The record ID
5151
** * mtime and ctime
5252
** * who signed it
5353
**
54
-** Returns 1 when a fork was found.
5554
*/
56
-int show_common_info(
55
+void show_common_info(
5756
int rid, /* The rid for the check-in to display info for */
5857
const char *zUuidName, /* Name of the UUID */
5958
int showComment, /* True to show the check-in comment */
6059
int showFamily /* True to show parents and children */
6160
){
@@ -62,11 +61,10 @@
6261
Stmt q;
6362
char *zComment = 0;
6463
char *zTags;
6564
char *zDate;
6665
char *zUuid;
67
- int isFork = 0;
6866
zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
6967
if( zUuid ){
7068
zDate = db_text(0,
7169
"SELECT datetime(mtime) || ' UTC' FROM event WHERE objid=%d",
7270
rid
@@ -112,29 +110,10 @@
112110
fossil_print("%-13s %s %s\n", zType, zUuid, zDate);
113111
free(zDate);
114112
}
115113
db_finalize(&q);
116114
}
117
- if( zUuid ){
118
- fossil_print("%-13s ", "leaf:");
119
- if( is_a_leaf(rid) ){
120
- if( db_int(0, "SELECT 1 FROM tagxref AS tx"
121
- " WHERE tx.rid=%d"
122
- " AND tx.tagid=%d"
123
- " AND tx.tagtype>0",
124
- rid, TAG_CLOSED)){
125
- fossil_print("%s\n", "closed");
126
- }else if( fossil_find_nearest_fork(rid, db_open_local(0)) ){
127
- fossil_print("%s\n", "fork");
128
- isFork = 1;
129
- }else{
130
- fossil_print("%s\n", "open");
131
- }
132
- }else{
133
- fossil_print("no\n");
134
- }
135
- }
136115
zTags = info_tags_of_checkin(rid, 0);
137116
if( zTags && zTags[0] ){
138117
fossil_print("tags: %s\n", zTags);
139118
}
140119
free(zTags);
@@ -141,11 +120,10 @@
141120
if( zComment ){
142121
fossil_print("comment: ");
143122
comment_print(zComment, 0, 14, -1, g.comFmtFlags);
144123
free(zComment);
145124
}
146
- return isFork;
147125
}
148126
149127
/*
150128
** Print information about the URLs used to access a repository and
151129
** checkouts in a repository.
@@ -507,15 +485,16 @@
507485
}
508486
509487
/*
510488
** WEBPAGE: vinfo
511489
** WEBPAGE: ci
512
-** URL: /ci?name=RID|ARTIFACTID
490
+** URL: /ci?name=ARTIFACTID
491
+** URL: /vinfo?name=ARTIFACTID
513492
**
514493
** Display information about a particular check-in.
515494
**
516
-** We also jump here from /info if the name is a version.
495
+** We also jump here from /info if the name is a check-in
517496
**
518497
** If the /ci page is used (instead of /vinfo or /info) then the
519498
** default behavior is to show unified diffs of all file changes.
520499
** With /vinfo and /info, only a list of the changed files are
521500
** shown, without diffs. This behavior is inverted if the
@@ -770,11 +749,11 @@
770749
771750
/*
772751
** WEBPAGE: winfo
773752
** URL: /winfo?name=UUID
774753
**
775
-** Return information about a wiki page.
754
+** Display information about a wiki page.
776755
*/
777756
void winfo_page(void){
778757
int rid;
779758
Manifest *pWiki;
780759
char *zUuid;
@@ -973,20 +952,25 @@
973952
}
974953
975954
976955
/*
977956
** WEBPAGE: vdiff
978
-** URL: /vdiff
957
+** URL: /vdiff?from=TAG&to=TAG
958
+**
959
+** Show the difference between two check-ins identified by the from= and
960
+** to= query parameters.
979961
**
980962
** Query parameters:
981963
**
982964
** from=TAG Left side of the comparison
983965
** to=TAG Right side of the comparison
984966
** branch=TAG Show all changes on a particular branch
985967
** v=BOOLEAN Default true. If false, only list files that have changed
986968
** sbs=BOOLEAN Side-by-side diff if true. Unified diff if false
987969
** glob=STRING only diff files matching this glob
970
+** dc=N show N lines of context around each diff
971
+** w ignore whitespace when computing diffs
988972
**
989973
**
990974
** Show all differences between two check-ins.
991975
*/
992976
void vdiff_page(void){
@@ -1419,10 +1403,12 @@
14191403
** is 0. Generate plaintext if "patch" is present.
14201404
**
14211405
** Additional parameters:
14221406
**
14231407
** verbose Show more detail when describing artifacts
1408
+** dc=N Show N lines of context around each diff
1409
+** w Ignore whitespace
14241410
*/
14251411
void diff_page(void){
14261412
int v1, v2;
14271413
int isPatch;
14281414
int sideBySide;
@@ -2046,14 +2032,14 @@
20462032
20472033
/*
20482034
** WEBPAGE: info
20492035
** URL: info/ARTIFACTID
20502036
**
2051
-** The argument is a artifact ID which might be a baseline or a file or
2037
+** The argument is a artifact ID which might be a check-in or a file or
20522038
** a ticket changes or a wiki edit or something else.
20532039
**
2054
-** Figure out what the artifact ID is and jump to it.
2040
+** Figure out what the artifact ID is and display it appropriately.
20552041
*/
20562042
void info_page(void){
20572043
const char *zName;
20582044
Blob uuid;
20592045
int rid;
@@ -2281,17 +2267,19 @@
22812267
return zA[0]==0 && zB[0]==0;
22822268
}
22832269
22842270
/*
22852271
** WEBPAGE: ci_edit
2286
-** URL: ci_edit?r=RID&c=NEWCOMMENT&u=NEWUSER
2272
+** URL: /ci_edit?r=RID&c=NEWCOMMENT&u=NEWUSER
22872273
**
2288
-** Present a dialog for updating properties of a baseline:
2274
+** Present a dialog for updating properties of a check-in.
22892275
**
22902276
** * The check-in user
22912277
** * The check-in comment
2278
+** * The check-in time and date
22922279
** * The background color.
2280
+** * Add and remove tags
22932281
*/
22942282
void ci_edit_page(void){
22952283
int rid;
22962284
const char *zComment; /* Current comment on the check-in */
22972285
const char *zNewComment; /* Revised check-in comment */
22982286
--- src/info.c
+++ src/info.c
@@ -49,13 +49,12 @@
49 ** * The UUID
50 ** * The record ID
51 ** * mtime and ctime
52 ** * who signed it
53 **
54 ** Returns 1 when a fork was found.
55 */
56 int show_common_info(
57 int rid, /* The rid for the check-in to display info for */
58 const char *zUuidName, /* Name of the UUID */
59 int showComment, /* True to show the check-in comment */
60 int showFamily /* True to show parents and children */
61 ){
@@ -62,11 +61,10 @@
62 Stmt q;
63 char *zComment = 0;
64 char *zTags;
65 char *zDate;
66 char *zUuid;
67 int isFork = 0;
68 zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
69 if( zUuid ){
70 zDate = db_text(0,
71 "SELECT datetime(mtime) || ' UTC' FROM event WHERE objid=%d",
72 rid
@@ -112,29 +110,10 @@
112 fossil_print("%-13s %s %s\n", zType, zUuid, zDate);
113 free(zDate);
114 }
115 db_finalize(&q);
116 }
117 if( zUuid ){
118 fossil_print("%-13s ", "leaf:");
119 if( is_a_leaf(rid) ){
120 if( db_int(0, "SELECT 1 FROM tagxref AS tx"
121 " WHERE tx.rid=%d"
122 " AND tx.tagid=%d"
123 " AND tx.tagtype>0",
124 rid, TAG_CLOSED)){
125 fossil_print("%s\n", "closed");
126 }else if( fossil_find_nearest_fork(rid, db_open_local(0)) ){
127 fossil_print("%s\n", "fork");
128 isFork = 1;
129 }else{
130 fossil_print("%s\n", "open");
131 }
132 }else{
133 fossil_print("no\n");
134 }
135 }
136 zTags = info_tags_of_checkin(rid, 0);
137 if( zTags && zTags[0] ){
138 fossil_print("tags: %s\n", zTags);
139 }
140 free(zTags);
@@ -141,11 +120,10 @@
141 if( zComment ){
142 fossil_print("comment: ");
143 comment_print(zComment, 0, 14, -1, g.comFmtFlags);
144 free(zComment);
145 }
146 return isFork;
147 }
148
149 /*
150 ** Print information about the URLs used to access a repository and
151 ** checkouts in a repository.
@@ -507,15 +485,16 @@
507 }
508
509 /*
510 ** WEBPAGE: vinfo
511 ** WEBPAGE: ci
512 ** URL: /ci?name=RID|ARTIFACTID
 
513 **
514 ** Display information about a particular check-in.
515 **
516 ** We also jump here from /info if the name is a version.
517 **
518 ** If the /ci page is used (instead of /vinfo or /info) then the
519 ** default behavior is to show unified diffs of all file changes.
520 ** With /vinfo and /info, only a list of the changed files are
521 ** shown, without diffs. This behavior is inverted if the
@@ -770,11 +749,11 @@
770
771 /*
772 ** WEBPAGE: winfo
773 ** URL: /winfo?name=UUID
774 **
775 ** Return information about a wiki page.
776 */
777 void winfo_page(void){
778 int rid;
779 Manifest *pWiki;
780 char *zUuid;
@@ -973,20 +952,25 @@
973 }
974
975
976 /*
977 ** WEBPAGE: vdiff
978 ** URL: /vdiff
 
 
 
979 **
980 ** Query parameters:
981 **
982 ** from=TAG Left side of the comparison
983 ** to=TAG Right side of the comparison
984 ** branch=TAG Show all changes on a particular branch
985 ** v=BOOLEAN Default true. If false, only list files that have changed
986 ** sbs=BOOLEAN Side-by-side diff if true. Unified diff if false
987 ** glob=STRING only diff files matching this glob
 
 
988 **
989 **
990 ** Show all differences between two check-ins.
991 */
992 void vdiff_page(void){
@@ -1419,10 +1403,12 @@
1419 ** is 0. Generate plaintext if "patch" is present.
1420 **
1421 ** Additional parameters:
1422 **
1423 ** verbose Show more detail when describing artifacts
 
 
1424 */
1425 void diff_page(void){
1426 int v1, v2;
1427 int isPatch;
1428 int sideBySide;
@@ -2046,14 +2032,14 @@
2046
2047 /*
2048 ** WEBPAGE: info
2049 ** URL: info/ARTIFACTID
2050 **
2051 ** The argument is a artifact ID which might be a baseline or a file or
2052 ** a ticket changes or a wiki edit or something else.
2053 **
2054 ** Figure out what the artifact ID is and jump to it.
2055 */
2056 void info_page(void){
2057 const char *zName;
2058 Blob uuid;
2059 int rid;
@@ -2281,17 +2267,19 @@
2281 return zA[0]==0 && zB[0]==0;
2282 }
2283
2284 /*
2285 ** WEBPAGE: ci_edit
2286 ** URL: ci_edit?r=RID&c=NEWCOMMENT&u=NEWUSER
2287 **
2288 ** Present a dialog for updating properties of a baseline:
2289 **
2290 ** * The check-in user
2291 ** * The check-in comment
 
2292 ** * The background color.
 
2293 */
2294 void ci_edit_page(void){
2295 int rid;
2296 const char *zComment; /* Current comment on the check-in */
2297 const char *zNewComment; /* Revised check-in comment */
2298
--- src/info.c
+++ src/info.c
@@ -49,13 +49,12 @@
49 ** * The UUID
50 ** * The record ID
51 ** * mtime and ctime
52 ** * who signed it
53 **
 
54 */
55 void show_common_info(
56 int rid, /* The rid for the check-in to display info for */
57 const char *zUuidName, /* Name of the UUID */
58 int showComment, /* True to show the check-in comment */
59 int showFamily /* True to show parents and children */
60 ){
@@ -62,11 +61,10 @@
61 Stmt q;
62 char *zComment = 0;
63 char *zTags;
64 char *zDate;
65 char *zUuid;
 
66 zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
67 if( zUuid ){
68 zDate = db_text(0,
69 "SELECT datetime(mtime) || ' UTC' FROM event WHERE objid=%d",
70 rid
@@ -112,29 +110,10 @@
110 fossil_print("%-13s %s %s\n", zType, zUuid, zDate);
111 free(zDate);
112 }
113 db_finalize(&q);
114 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
115 zTags = info_tags_of_checkin(rid, 0);
116 if( zTags && zTags[0] ){
117 fossil_print("tags: %s\n", zTags);
118 }
119 free(zTags);
@@ -141,11 +120,10 @@
120 if( zComment ){
121 fossil_print("comment: ");
122 comment_print(zComment, 0, 14, -1, g.comFmtFlags);
123 free(zComment);
124 }
 
125 }
126
127 /*
128 ** Print information about the URLs used to access a repository and
129 ** checkouts in a repository.
@@ -507,15 +485,16 @@
485 }
486
487 /*
488 ** WEBPAGE: vinfo
489 ** WEBPAGE: ci
490 ** URL: /ci?name=ARTIFACTID
491 ** URL: /vinfo?name=ARTIFACTID
492 **
493 ** Display information about a particular check-in.
494 **
495 ** We also jump here from /info if the name is a check-in
496 **
497 ** If the /ci page is used (instead of /vinfo or /info) then the
498 ** default behavior is to show unified diffs of all file changes.
499 ** With /vinfo and /info, only a list of the changed files are
500 ** shown, without diffs. This behavior is inverted if the
@@ -770,11 +749,11 @@
749
750 /*
751 ** WEBPAGE: winfo
752 ** URL: /winfo?name=UUID
753 **
754 ** Display information about a wiki page.
755 */
756 void winfo_page(void){
757 int rid;
758 Manifest *pWiki;
759 char *zUuid;
@@ -973,20 +952,25 @@
952 }
953
954
955 /*
956 ** WEBPAGE: vdiff
957 ** URL: /vdiff?from=TAG&to=TAG
958 **
959 ** Show the difference between two check-ins identified by the from= and
960 ** to= query parameters.
961 **
962 ** Query parameters:
963 **
964 ** from=TAG Left side of the comparison
965 ** to=TAG Right side of the comparison
966 ** branch=TAG Show all changes on a particular branch
967 ** v=BOOLEAN Default true. If false, only list files that have changed
968 ** sbs=BOOLEAN Side-by-side diff if true. Unified diff if false
969 ** glob=STRING only diff files matching this glob
970 ** dc=N show N lines of context around each diff
971 ** w ignore whitespace when computing diffs
972 **
973 **
974 ** Show all differences between two check-ins.
975 */
976 void vdiff_page(void){
@@ -1419,10 +1403,12 @@
1403 ** is 0. Generate plaintext if "patch" is present.
1404 **
1405 ** Additional parameters:
1406 **
1407 ** verbose Show more detail when describing artifacts
1408 ** dc=N Show N lines of context around each diff
1409 ** w Ignore whitespace
1410 */
1411 void diff_page(void){
1412 int v1, v2;
1413 int isPatch;
1414 int sideBySide;
@@ -2046,14 +2032,14 @@
2032
2033 /*
2034 ** WEBPAGE: info
2035 ** URL: info/ARTIFACTID
2036 **
2037 ** The argument is a artifact ID which might be a check-in or a file or
2038 ** a ticket changes or a wiki edit or something else.
2039 **
2040 ** Figure out what the artifact ID is and display it appropriately.
2041 */
2042 void info_page(void){
2043 const char *zName;
2044 Blob uuid;
2045 int rid;
@@ -2281,17 +2267,19 @@
2267 return zA[0]==0 && zB[0]==0;
2268 }
2269
2270 /*
2271 ** WEBPAGE: ci_edit
2272 ** URL: /ci_edit?r=RID&c=NEWCOMMENT&u=NEWUSER
2273 **
2274 ** Present a dialog for updating properties of a check-in.
2275 **
2276 ** * The check-in user
2277 ** * The check-in comment
2278 ** * The check-in time and date
2279 ** * The background color.
2280 ** * Add and remove tags
2281 */
2282 void ci_edit_page(void){
2283 int rid;
2284 const char *zComment; /* Current comment on the check-in */
2285 const char *zNewComment; /* Revised check-in comment */
2286
+87
--- src/leaf.c
+++ src/leaf.c
@@ -180,5 +180,92 @@
180180
for(rid=bag_first(&needToCheck); rid; rid=bag_next(&needToCheck,rid)){
181181
leaf_check(rid);
182182
}
183183
bag_clear(&needToCheck);
184184
}
185
+
186
+/*
187
+** If check-in rid is an open-leaf and there exists another
188
+** open leaf on the same branch, then return 1.
189
+**
190
+** If check-in rid is not an open leaf, or if it is the only open leaf
191
+** on its branch, then return 0.
192
+*/
193
+int leaf_ambiguity(int rid){
194
+ int rc; /* Result */
195
+ char zVal[30];
196
+ if( !is_a_leaf(rid) ) return 0;
197
+ sqlite3_snprintf(sizeof(zVal), zVal, "%d", rid);
198
+ rc = db_exists(
199
+ "SELECT 1 FROM leaf"
200
+ " WHERE NOT %z"
201
+ " AND rid<>%d"
202
+ " AND (SELECT value FROM tagxref WHERE tagid=%d AND rid=leaf.rid)="
203
+ " (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d)"
204
+ " AND NOT %z",
205
+ leaf_is_closed_sql(zVal), rid, TAG_BRANCH, TAG_BRANCH, rid,
206
+ leaf_is_closed_sql("leaf.rid"));
207
+ return rc;
208
+}
209
+
210
+/*
211
+** If check-in rid is an open-leaf and there exists another open leaf
212
+** on the same branch, then print a detailed warning showing all open
213
+** leaves on that branch.
214
+*/
215
+int leaf_ambiguity_warning(int rid, int currentCkout){
216
+ char *zBr;
217
+ Stmt q;
218
+ int n = 0;
219
+ Blob msg;
220
+ if( leaf_ambiguity(rid)==0 ) return 0;
221
+ zBr = db_text(0, "SELECT value FROM tagxref WHERE tagid=%d AND rid=%d",
222
+ TAG_BRANCH, rid);
223
+ if( zBr==0 ) zBr = fossil_strdup("trunk");
224
+ blob_init(&msg, 0, 0);
225
+ blob_appendf(&msg, "WARNING: multiple open leaf check-ins on %s:", zBr);
226
+ db_prepare(&q,
227
+ "SELECT"
228
+ " (SELECT uuid FROM blob WHERE rid=leaf.rid),"
229
+ " (SELECT datetime(mtime%s) FROM event WHERE objid=leaf.rid),"
230
+ " leaf.rid"
231
+ " FROM leaf"
232
+ " WHERE (SELECT value FROM tagxref WHERE tagid=%d AND rid=leaf.rid)=%Q"
233
+ " AND NOT %z"
234
+ " ORDER BY 2 DESC",
235
+ timeline_utc(), TAG_BRANCH, zBr, leaf_is_closed_sql("leaf.rid")
236
+ );
237
+ while( db_step(&q)==SQLITE_ROW ){
238
+ blob_appendf(&msg, "\n (%d) %s [%S]%s",
239
+ ++n, db_column_text(&q,1), db_column_text(&q,0),
240
+ db_column_int(&q,2)==currentCkout ? " (current)" : "");
241
+ }
242
+ db_finalize(&q);
243
+ fossil_warning("%s",blob_str(&msg));
244
+ blob_reset(&msg);
245
+ return 1;
246
+}
247
+
248
+/*
249
+** COMMAND: test-leaf-ambiguity
250
+**
251
+** Usage: %fossil NAME ...
252
+**
253
+** Resolve each name on the command line and call leaf_ambiguity_warning()
254
+** for each resulting RID.
255
+*/
256
+void leaf_ambiguity_warning_test(void){
257
+ int i;
258
+ int rid;
259
+ int rc;
260
+ db_find_and_open_repository(0,0);
261
+ verify_all_options();
262
+ for(i=2; i<g.argc; i++){
263
+ char *zUuid;
264
+ rid = name_to_typed_rid(g.argv[i], "ci");
265
+ zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
266
+ fossil_print("%s (rid=%d) %S ", g.argv[i], rid, zUuid ? zUuid : "(none)");
267
+ fossil_free(zUuid);
268
+ rc = leaf_ambiguity_warning(rid, rid);
269
+ if( rc==0 ) fossil_print(" ok\n");
270
+ }
271
+}
185272
--- src/leaf.c
+++ src/leaf.c
@@ -180,5 +180,92 @@
180 for(rid=bag_first(&needToCheck); rid; rid=bag_next(&needToCheck,rid)){
181 leaf_check(rid);
182 }
183 bag_clear(&needToCheck);
184 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
185
--- src/leaf.c
+++ src/leaf.c
@@ -180,5 +180,92 @@
180 for(rid=bag_first(&needToCheck); rid; rid=bag_next(&needToCheck,rid)){
181 leaf_check(rid);
182 }
183 bag_clear(&needToCheck);
184 }
185
186 /*
187 ** If check-in rid is an open-leaf and there exists another
188 ** open leaf on the same branch, then return 1.
189 **
190 ** If check-in rid is not an open leaf, or if it is the only open leaf
191 ** on its branch, then return 0.
192 */
193 int leaf_ambiguity(int rid){
194 int rc; /* Result */
195 char zVal[30];
196 if( !is_a_leaf(rid) ) return 0;
197 sqlite3_snprintf(sizeof(zVal), zVal, "%d", rid);
198 rc = db_exists(
199 "SELECT 1 FROM leaf"
200 " WHERE NOT %z"
201 " AND rid<>%d"
202 " AND (SELECT value FROM tagxref WHERE tagid=%d AND rid=leaf.rid)="
203 " (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d)"
204 " AND NOT %z",
205 leaf_is_closed_sql(zVal), rid, TAG_BRANCH, TAG_BRANCH, rid,
206 leaf_is_closed_sql("leaf.rid"));
207 return rc;
208 }
209
210 /*
211 ** If check-in rid is an open-leaf and there exists another open leaf
212 ** on the same branch, then print a detailed warning showing all open
213 ** leaves on that branch.
214 */
215 int leaf_ambiguity_warning(int rid, int currentCkout){
216 char *zBr;
217 Stmt q;
218 int n = 0;
219 Blob msg;
220 if( leaf_ambiguity(rid)==0 ) return 0;
221 zBr = db_text(0, "SELECT value FROM tagxref WHERE tagid=%d AND rid=%d",
222 TAG_BRANCH, rid);
223 if( zBr==0 ) zBr = fossil_strdup("trunk");
224 blob_init(&msg, 0, 0);
225 blob_appendf(&msg, "WARNING: multiple open leaf check-ins on %s:", zBr);
226 db_prepare(&q,
227 "SELECT"
228 " (SELECT uuid FROM blob WHERE rid=leaf.rid),"
229 " (SELECT datetime(mtime%s) FROM event WHERE objid=leaf.rid),"
230 " leaf.rid"
231 " FROM leaf"
232 " WHERE (SELECT value FROM tagxref WHERE tagid=%d AND rid=leaf.rid)=%Q"
233 " AND NOT %z"
234 " ORDER BY 2 DESC",
235 timeline_utc(), TAG_BRANCH, zBr, leaf_is_closed_sql("leaf.rid")
236 );
237 while( db_step(&q)==SQLITE_ROW ){
238 blob_appendf(&msg, "\n (%d) %s [%S]%s",
239 ++n, db_column_text(&q,1), db_column_text(&q,0),
240 db_column_int(&q,2)==currentCkout ? " (current)" : "");
241 }
242 db_finalize(&q);
243 fossil_warning("%s",blob_str(&msg));
244 blob_reset(&msg);
245 return 1;
246 }
247
248 /*
249 ** COMMAND: test-leaf-ambiguity
250 **
251 ** Usage: %fossil NAME ...
252 **
253 ** Resolve each name on the command line and call leaf_ambiguity_warning()
254 ** for each resulting RID.
255 */
256 void leaf_ambiguity_warning_test(void){
257 int i;
258 int rid;
259 int rc;
260 db_find_and_open_repository(0,0);
261 verify_all_options();
262 for(i=2; i<g.argc; i++){
263 char *zUuid;
264 rid = name_to_typed_rid(g.argv[i], "ci");
265 zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
266 fossil_print("%s (rid=%d) %S ", g.argv[i], rid, zUuid ? zUuid : "(none)");
267 fossil_free(zUuid);
268 rc = leaf_ambiguity_warning(rid, rid);
269 if( rc==0 ) fossil_print(" ok\n");
270 }
271 }
272
+2 -2
--- src/login.c
+++ src/login.c
@@ -1302,12 +1302,12 @@
13021302
}
13031303
13041304
/*
13051305
** WEBPAGE: register
13061306
**
1307
-** Generate the register page.
1308
-**
1307
+** Page to allow users to self-register. The "self-register" setting
1308
+** must be enabled for this page to operate.
13091309
*/
13101310
void register_page(void){
13111311
const char *zUsername, *zPasswd, *zConfirm, *zContact, *zCS, *zPw, *zCap;
13121312
unsigned int uSeed;
13131313
const char *zDecoded;
13141314
--- src/login.c
+++ src/login.c
@@ -1302,12 +1302,12 @@
1302 }
1303
1304 /*
1305 ** WEBPAGE: register
1306 **
1307 ** Generate the register page.
1308 **
1309 */
1310 void register_page(void){
1311 const char *zUsername, *zPasswd, *zConfirm, *zContact, *zCS, *zPw, *zCap;
1312 unsigned int uSeed;
1313 const char *zDecoded;
1314
--- src/login.c
+++ src/login.c
@@ -1302,12 +1302,12 @@
1302 }
1303
1304 /*
1305 ** WEBPAGE: register
1306 **
1307 ** Page to allow users to self-register. The "self-register" setting
1308 ** must be enabled for this page to operate.
1309 */
1310 void register_page(void){
1311 const char *zUsername, *zPasswd, *zConfirm, *zContact, *zCS, *zPw, *zCap;
1312 unsigned int uSeed;
1313 const char *zDecoded;
1314
+4 -2
--- src/main.c
+++ src/main.c
@@ -1131,11 +1131,14 @@
11311131
putchar('\n');
11321132
}
11331133
11341134
/*
11351135
** WEBPAGE: help
1136
-** URL: /help/CMD
1136
+** URL: /help?name=CMD
1137
+**
1138
+** Show the built-in help text for CMD. CMD can be a command-line interface
1139
+** command or a page name from the web interface.
11371140
*/
11381141
void help_page(void){
11391142
const char *zCmd = P("cmd");
11401143
11411144
if( zCmd==0 ) zCmd = P("name");
@@ -1199,11 +1202,10 @@
11991202
@ </ul></td>
12001203
}
12011204
@ </tr></table>
12021205
12031206
@ <h1>Available web UI pages:</h1>
1204
- @ (Only pages with help text are linked.)
12051207
@ <table border="0"><tr>
12061208
for(i=j=0; i<count(aCommand); i++){
12071209
const char *z = aCommand[i].zName;
12081210
if( '/'!=*z ) continue;
12091211
j++;
12101212
--- src/main.c
+++ src/main.c
@@ -1131,11 +1131,14 @@
1131 putchar('\n');
1132 }
1133
1134 /*
1135 ** WEBPAGE: help
1136 ** URL: /help/CMD
 
 
 
1137 */
1138 void help_page(void){
1139 const char *zCmd = P("cmd");
1140
1141 if( zCmd==0 ) zCmd = P("name");
@@ -1199,11 +1202,10 @@
1199 @ </ul></td>
1200 }
1201 @ </tr></table>
1202
1203 @ <h1>Available web UI pages:</h1>
1204 @ (Only pages with help text are linked.)
1205 @ <table border="0"><tr>
1206 for(i=j=0; i<count(aCommand); i++){
1207 const char *z = aCommand[i].zName;
1208 if( '/'!=*z ) continue;
1209 j++;
1210
--- src/main.c
+++ src/main.c
@@ -1131,11 +1131,14 @@
1131 putchar('\n');
1132 }
1133
1134 /*
1135 ** WEBPAGE: help
1136 ** URL: /help?name=CMD
1137 **
1138 ** Show the built-in help text for CMD. CMD can be a command-line interface
1139 ** command or a page name from the web interface.
1140 */
1141 void help_page(void){
1142 const char *zCmd = P("cmd");
1143
1144 if( zCmd==0 ) zCmd = P("name");
@@ -1199,11 +1202,10 @@
1202 @ </ul></td>
1203 }
1204 @ </tr></table>
1205
1206 @ <h1>Available web UI pages:</h1>
 
1207 @ <table border="0"><tr>
1208 for(i=j=0; i<count(aCommand); i++){
1209 const char *z = aCommand[i].zName;
1210 if( '/'!=*z ) continue;
1211 j++;
1212
+18 -5
--- src/report.c
+++ src/report.c
@@ -28,11 +28,11 @@
2828
#ifndef SQLITE_RECURSIVE
2929
# define SQLITE_RECURSIVE 33
3030
#endif
3131
3232
/*
33
-** WEBPAGE: /reportlist
33
+** WEBPAGE: reportlist
3434
**
3535
** Main menu for Tickets.
3636
*/
3737
void view_list(void){
3838
const char *zScript;
@@ -284,11 +284,15 @@
284284
report_unrestrict_sql();
285285
return zErr;
286286
}
287287
288288
/*
289
-** WEBPAGE: /rptsql
289
+** WEBPAGE: rptsql
290
+** URL: /rptsql?rn=N
291
+**
292
+** Display the SQL query used to generate a ticket report. The rn=N
293
+** query parameter identifies the specific report number to be displayed.
290294
*/
291295
void view_see_sql(void){
292296
int rn;
293297
const char *zTitle;
294298
const char *zSQL;
@@ -332,12 +336,21 @@
332336
style_footer();
333337
db_finalize(&q);
334338
}
335339
336340
/*
337
-** WEBPAGE: /rptnew
338
-** WEBPAGE: /rptedit
341
+** WEBPAGE: rptnew
342
+** WEBPAGE: rptedit
343
+**
344
+** Create (/rptnew) or edit (/rptedit) a ticket report format.
345
+** Query parameters:
346
+**
347
+** rn=N Ticket report number. (required)
348
+** t=TITLE Title of the report format
349
+** w=USER Owner of the report format
350
+** s=SQL SQL text used to implement the report
351
+** k=KEY Color key
339352
*/
340353
void view_edit(void){
341354
int rn;
342355
const char *zTitle;
343356
const char *z;
@@ -1061,11 +1074,11 @@
10611074
@ </script>
10621075
}
10631076
10641077
10651078
/*
1066
-** WEBPAGE: /rptview
1079
+** WEBPAGE: rptview
10671080
**
10681081
** Generate a report. The rn query parameter is the report number
10691082
** corresponding to REPORTFMT.RN. If the tablist query parameter exists,
10701083
** then the output consists of lines of tab-separated fields instead of
10711084
** an HTML table.
10721085
--- src/report.c
+++ src/report.c
@@ -28,11 +28,11 @@
28 #ifndef SQLITE_RECURSIVE
29 # define SQLITE_RECURSIVE 33
30 #endif
31
32 /*
33 ** WEBPAGE: /reportlist
34 **
35 ** Main menu for Tickets.
36 */
37 void view_list(void){
38 const char *zScript;
@@ -284,11 +284,15 @@
284 report_unrestrict_sql();
285 return zErr;
286 }
287
288 /*
289 ** WEBPAGE: /rptsql
 
 
 
 
290 */
291 void view_see_sql(void){
292 int rn;
293 const char *zTitle;
294 const char *zSQL;
@@ -332,12 +336,21 @@
332 style_footer();
333 db_finalize(&q);
334 }
335
336 /*
337 ** WEBPAGE: /rptnew
338 ** WEBPAGE: /rptedit
 
 
 
 
 
 
 
 
 
339 */
340 void view_edit(void){
341 int rn;
342 const char *zTitle;
343 const char *z;
@@ -1061,11 +1074,11 @@
1061 @ </script>
1062 }
1063
1064
1065 /*
1066 ** WEBPAGE: /rptview
1067 **
1068 ** Generate a report. The rn query parameter is the report number
1069 ** corresponding to REPORTFMT.RN. If the tablist query parameter exists,
1070 ** then the output consists of lines of tab-separated fields instead of
1071 ** an HTML table.
1072
--- src/report.c
+++ src/report.c
@@ -28,11 +28,11 @@
28 #ifndef SQLITE_RECURSIVE
29 # define SQLITE_RECURSIVE 33
30 #endif
31
32 /*
33 ** WEBPAGE: reportlist
34 **
35 ** Main menu for Tickets.
36 */
37 void view_list(void){
38 const char *zScript;
@@ -284,11 +284,15 @@
284 report_unrestrict_sql();
285 return zErr;
286 }
287
288 /*
289 ** WEBPAGE: rptsql
290 ** URL: /rptsql?rn=N
291 **
292 ** Display the SQL query used to generate a ticket report. The rn=N
293 ** query parameter identifies the specific report number to be displayed.
294 */
295 void view_see_sql(void){
296 int rn;
297 const char *zTitle;
298 const char *zSQL;
@@ -332,12 +336,21 @@
336 style_footer();
337 db_finalize(&q);
338 }
339
340 /*
341 ** WEBPAGE: rptnew
342 ** WEBPAGE: rptedit
343 **
344 ** Create (/rptnew) or edit (/rptedit) a ticket report format.
345 ** Query parameters:
346 **
347 ** rn=N Ticket report number. (required)
348 ** t=TITLE Title of the report format
349 ** w=USER Owner of the report format
350 ** s=SQL SQL text used to implement the report
351 ** k=KEY Color key
352 */
353 void view_edit(void){
354 int rn;
355 const char *zTitle;
356 const char *z;
@@ -1061,11 +1074,11 @@
1074 @ </script>
1075 }
1076
1077
1078 /*
1079 ** WEBPAGE: rptview
1080 **
1081 ** Generate a report. The rn query parameter is the report number
1082 ** corresponding to REPORTFMT.RN. If the tablist query parameter exists,
1083 ** then the output consists of lines of tab-separated fields instead of
1084 ** an HTML table.
1085
+9 -1
--- src/search.c
+++ src/search.c
@@ -1047,14 +1047,22 @@
10471047
@ </div>
10481048
}
10491049
}
10501050
10511051
/*
1052
-** WEBPAGE: /search
1052
+** WEBPAGE: search
10531053
**
10541054
** Search for check-in comments, documents, tickets, or wiki that
10551055
** match a user-supplied pattern.
1056
+**
1057
+** s=PATTERN Specify the full-text pattern to search for
1058
+** y=TYPE What to search.
1059
+** c -> check-ins
1060
+** d -> documentation
1061
+** t -> tickets
1062
+** w -> wiki
1063
+** all -> everything
10561064
*/
10571065
void search_page(void){
10581066
login_check_credentials();
10591067
style_header("Search");
10601068
search_screen(SRCH_ALL, 1);
10611069
--- src/search.c
+++ src/search.c
@@ -1047,14 +1047,22 @@
1047 @ </div>
1048 }
1049 }
1050
1051 /*
1052 ** WEBPAGE: /search
1053 **
1054 ** Search for check-in comments, documents, tickets, or wiki that
1055 ** match a user-supplied pattern.
 
 
 
 
 
 
 
 
1056 */
1057 void search_page(void){
1058 login_check_credentials();
1059 style_header("Search");
1060 search_screen(SRCH_ALL, 1);
1061
--- src/search.c
+++ src/search.c
@@ -1047,14 +1047,22 @@
1047 @ </div>
1048 }
1049 }
1050
1051 /*
1052 ** WEBPAGE: search
1053 **
1054 ** Search for check-in comments, documents, tickets, or wiki that
1055 ** match a user-supplied pattern.
1056 **
1057 ** s=PATTERN Specify the full-text pattern to search for
1058 ** y=TYPE What to search.
1059 ** c -> check-ins
1060 ** d -> documentation
1061 ** t -> tickets
1062 ** w -> wiki
1063 ** all -> everything
1064 */
1065 void search_page(void){
1066 login_check_credentials();
1067 style_header("Search");
1068 search_screen(SRCH_ALL, 1);
1069
+33 -7
--- src/setup.c
+++ src/setup.c
@@ -54,11 +54,13 @@
5454
}
5555
5656
5757
5858
/*
59
-** WEBPAGE: /setup
59
+** WEBPAGE: setup
60
+**
61
+** Main menu for the administrative pages. Requires Admin privileges.
6062
*/
6163
void setup_page(void){
6264
login_check_credentials();
6365
if( !g.perm.Setup ){
6466
login_needed(0);
@@ -123,12 +125,12 @@
123125
"A record of received artifacts and their sources");
124126
setup_menu_entry("User Log", "access_log",
125127
"A record of login attempts");
126128
setup_menu_entry("Administrative Log", "admin_log",
127129
"View the admin_log entries");
128
- setup_menu_entry("Stats", "stat",
129
- "Display repository statistics");
130
+ setup_menu_entry("Sitemap", "sitemap",
131
+ "Links to miscellaneous pages");
130132
setup_menu_entry("SQL", "admin_sql",
131133
"Enter raw SQL commands");
132134
setup_menu_entry("TH1", "admin_th1",
133135
"Enter raw TH1 commands");
134136
@ </table>
@@ -138,11 +140,11 @@
138140
139141
/*
140142
** WEBPAGE: setup_ulist
141143
**
142144
** Show a list of users. Clicking on any user jumps to the edit
143
-** screen for that user.
145
+** screen for that user. Requires Admin privileges.
144146
*/
145147
void setup_ulist(void){
146148
Stmt s;
147149
int prevLevel = 0;
148150
@@ -313,11 +315,14 @@
313315
while( zPw[0]=='*' ){ zPw++; }
314316
return zPw[0]!=0;
315317
}
316318
317319
/*
318
-** WEBPAGE: /setup_uedit
320
+** WEBPAGE: setup_uedit
321
+**
322
+** Edit information about a user or create a new user.
323
+** Requires Admin privileges.
319324
*/
320325
void user_edit(void){
321326
const char *zId, *zLogin, *zInfo, *zCap, *zPw;
322327
const char *zGroup;
323328
const char *zOldLogin;
@@ -989,10 +994,12 @@
989994
}
990995
991996
992997
/*
993998
** WEBPAGE: setup_access
999
+**
1000
+** The access-control settings page. Requires Admin privileges.
9941001
*/
9951002
void setup_access(void){
9961003
login_check_credentials();
9971004
if( !g.perm.Setup ){
9981005
login_needed(0);
@@ -1186,10 +1193,13 @@
11861193
style_footer();
11871194
}
11881195
11891196
/*
11901197
** WEBPAGE: setup_login_group
1198
+**
1199
+** Change how the current repository participates in a login
1200
+** group.
11911201
*/
11921202
void setup_login_group(void){
11931203
const char *zGroup;
11941204
char *zErrMsg = 0;
11951205
Blob fullName;
@@ -1299,10 +1309,13 @@
12991309
style_footer();
13001310
}
13011311
13021312
/*
13031313
** WEBPAGE: setup_timeline
1314
+**
1315
+** Edit administrative settings controlling the display of
1316
+** timelines.
13041317
*/
13051318
void setup_timeline(void){
13061319
double tmDiff;
13071320
char zTmDiff[20];
13081321
static const char *const azTimeFormats[] = {
@@ -1385,10 +1398,13 @@
13851398
style_footer();
13861399
}
13871400
13881401
/*
13891402
** WEBPAGE: setup_settings
1403
+**
1404
+** Change or view miscellanous settings. Part of the
1405
+** Admin pages requiring Admin privileges.
13901406
*/
13911407
void setup_settings(void){
13921408
Setting const *pSet;
13931409
13941410
login_check_credentials();
@@ -1468,10 +1484,12 @@
14681484
style_footer();
14691485
}
14701486
14711487
/*
14721488
** WEBPAGE: setup_config
1489
+**
1490
+** The "Admin/Configuration" page. Requires Admin privilege.
14731491
*/
14741492
void setup_config(void){
14751493
login_check_credentials();
14761494
if( !g.perm.Setup ){
14771495
login_needed(0);
@@ -1547,10 +1565,12 @@
15471565
style_footer();
15481566
}
15491567
15501568
/*
15511569
** WEBPAGE: setup_modreq
1570
+**
1571
+** Admin page for setting up moderation of tickets and wiki.
15521572
*/
15531573
void setup_modreq(void){
15541574
login_check_credentials();
15551575
if( !g.perm.Setup ){
15561576
login_needed(0);
@@ -1592,10 +1612,13 @@
15921612
15931613
}
15941614
15951615
/*
15961616
** WEBPAGE: setup_adunit
1617
+**
1618
+** Administrative page for configuring and controlling ad units
1619
+** and how they are displayed.
15971620
*/
15981621
void setup_adunit(void){
15991622
login_check_credentials();
16001623
if( !g.perm.Setup ){
16011624
login_needed(0);
@@ -1660,10 +1683,12 @@
16601683
db_end_transaction(0);
16611684
}
16621685
16631686
/*
16641687
** WEBPAGE: setup_logo
1688
+**
1689
+** Administrative page for changing the logo image.
16651690
*/
16661691
void setup_logo(void){
16671692
const char *zLogoMtime = db_get_mtime("logo-image", 0, 0);
16681693
const char *zLogoMime = db_get("logo-mimetype","image/gif");
16691694
const char *aLogoImg = P("logoim");
@@ -1812,10 +1837,11 @@
18121837
18131838
/*
18141839
** WEBPAGE: admin_sql
18151840
**
18161841
** Run raw SQL commands against the database file using the web interface.
1842
+** Requires Admin privileges.
18171843
*/
18181844
void sql_page(void){
18191845
const char *zQ = P("q");
18201846
int go = P("go")!=0;
18211847
login_check_credentials();
@@ -1933,11 +1959,11 @@
19331959
/*
19341960
** WEBPAGE: admin_th1
19351961
**
19361962
** Run raw TH1 commands using the web interface. If Tcl integration was
19371963
** enabled at compile-time and the "tcl" setting is enabled, Tcl commands
1938
-** may be run as well.
1964
+** may be run as well. Requires Admin privilege.
19391965
*/
19401966
void th1_page(void){
19411967
const char *zQ = P("q");
19421968
int go = P("go")!=0;
19431969
login_check_credentials();
@@ -2054,11 +2080,11 @@
20542080
}
20552081
20562082
/*
20572083
** WEBPAGE: srchsetup
20582084
**
2059
-** Configure the search engine.
2085
+** Configure the search engine. Requires Admin privilege.
20602086
*/
20612087
void page_srchsetup(){
20622088
login_check_credentials();
20632089
if( !g.perm.Setup && !g.perm.Admin ){
20642090
login_needed(0);
20652091
--- src/setup.c
+++ src/setup.c
@@ -54,11 +54,13 @@
54 }
55
56
57
58 /*
59 ** WEBPAGE: /setup
 
 
60 */
61 void setup_page(void){
62 login_check_credentials();
63 if( !g.perm.Setup ){
64 login_needed(0);
@@ -123,12 +125,12 @@
123 "A record of received artifacts and their sources");
124 setup_menu_entry("User Log", "access_log",
125 "A record of login attempts");
126 setup_menu_entry("Administrative Log", "admin_log",
127 "View the admin_log entries");
128 setup_menu_entry("Stats", "stat",
129 "Display repository statistics");
130 setup_menu_entry("SQL", "admin_sql",
131 "Enter raw SQL commands");
132 setup_menu_entry("TH1", "admin_th1",
133 "Enter raw TH1 commands");
134 @ </table>
@@ -138,11 +140,11 @@
138
139 /*
140 ** WEBPAGE: setup_ulist
141 **
142 ** Show a list of users. Clicking on any user jumps to the edit
143 ** screen for that user.
144 */
145 void setup_ulist(void){
146 Stmt s;
147 int prevLevel = 0;
148
@@ -313,11 +315,14 @@
313 while( zPw[0]=='*' ){ zPw++; }
314 return zPw[0]!=0;
315 }
316
317 /*
318 ** WEBPAGE: /setup_uedit
 
 
 
319 */
320 void user_edit(void){
321 const char *zId, *zLogin, *zInfo, *zCap, *zPw;
322 const char *zGroup;
323 const char *zOldLogin;
@@ -989,10 +994,12 @@
989 }
990
991
992 /*
993 ** WEBPAGE: setup_access
 
 
994 */
995 void setup_access(void){
996 login_check_credentials();
997 if( !g.perm.Setup ){
998 login_needed(0);
@@ -1186,10 +1193,13 @@
1186 style_footer();
1187 }
1188
1189 /*
1190 ** WEBPAGE: setup_login_group
 
 
 
1191 */
1192 void setup_login_group(void){
1193 const char *zGroup;
1194 char *zErrMsg = 0;
1195 Blob fullName;
@@ -1299,10 +1309,13 @@
1299 style_footer();
1300 }
1301
1302 /*
1303 ** WEBPAGE: setup_timeline
 
 
 
1304 */
1305 void setup_timeline(void){
1306 double tmDiff;
1307 char zTmDiff[20];
1308 static const char *const azTimeFormats[] = {
@@ -1385,10 +1398,13 @@
1385 style_footer();
1386 }
1387
1388 /*
1389 ** WEBPAGE: setup_settings
 
 
 
1390 */
1391 void setup_settings(void){
1392 Setting const *pSet;
1393
1394 login_check_credentials();
@@ -1468,10 +1484,12 @@
1468 style_footer();
1469 }
1470
1471 /*
1472 ** WEBPAGE: setup_config
 
 
1473 */
1474 void setup_config(void){
1475 login_check_credentials();
1476 if( !g.perm.Setup ){
1477 login_needed(0);
@@ -1547,10 +1565,12 @@
1547 style_footer();
1548 }
1549
1550 /*
1551 ** WEBPAGE: setup_modreq
 
 
1552 */
1553 void setup_modreq(void){
1554 login_check_credentials();
1555 if( !g.perm.Setup ){
1556 login_needed(0);
@@ -1592,10 +1612,13 @@
1592
1593 }
1594
1595 /*
1596 ** WEBPAGE: setup_adunit
 
 
 
1597 */
1598 void setup_adunit(void){
1599 login_check_credentials();
1600 if( !g.perm.Setup ){
1601 login_needed(0);
@@ -1660,10 +1683,12 @@
1660 db_end_transaction(0);
1661 }
1662
1663 /*
1664 ** WEBPAGE: setup_logo
 
 
1665 */
1666 void setup_logo(void){
1667 const char *zLogoMtime = db_get_mtime("logo-image", 0, 0);
1668 const char *zLogoMime = db_get("logo-mimetype","image/gif");
1669 const char *aLogoImg = P("logoim");
@@ -1812,10 +1837,11 @@
1812
1813 /*
1814 ** WEBPAGE: admin_sql
1815 **
1816 ** Run raw SQL commands against the database file using the web interface.
 
1817 */
1818 void sql_page(void){
1819 const char *zQ = P("q");
1820 int go = P("go")!=0;
1821 login_check_credentials();
@@ -1933,11 +1959,11 @@
1933 /*
1934 ** WEBPAGE: admin_th1
1935 **
1936 ** Run raw TH1 commands using the web interface. If Tcl integration was
1937 ** enabled at compile-time and the "tcl" setting is enabled, Tcl commands
1938 ** may be run as well.
1939 */
1940 void th1_page(void){
1941 const char *zQ = P("q");
1942 int go = P("go")!=0;
1943 login_check_credentials();
@@ -2054,11 +2080,11 @@
2054 }
2055
2056 /*
2057 ** WEBPAGE: srchsetup
2058 **
2059 ** Configure the search engine.
2060 */
2061 void page_srchsetup(){
2062 login_check_credentials();
2063 if( !g.perm.Setup && !g.perm.Admin ){
2064 login_needed(0);
2065
--- src/setup.c
+++ src/setup.c
@@ -54,11 +54,13 @@
54 }
55
56
57
58 /*
59 ** WEBPAGE: setup
60 **
61 ** Main menu for the administrative pages. Requires Admin privileges.
62 */
63 void setup_page(void){
64 login_check_credentials();
65 if( !g.perm.Setup ){
66 login_needed(0);
@@ -123,12 +125,12 @@
125 "A record of received artifacts and their sources");
126 setup_menu_entry("User Log", "access_log",
127 "A record of login attempts");
128 setup_menu_entry("Administrative Log", "admin_log",
129 "View the admin_log entries");
130 setup_menu_entry("Sitemap", "sitemap",
131 "Links to miscellaneous pages");
132 setup_menu_entry("SQL", "admin_sql",
133 "Enter raw SQL commands");
134 setup_menu_entry("TH1", "admin_th1",
135 "Enter raw TH1 commands");
136 @ </table>
@@ -138,11 +140,11 @@
140
141 /*
142 ** WEBPAGE: setup_ulist
143 **
144 ** Show a list of users. Clicking on any user jumps to the edit
145 ** screen for that user. Requires Admin privileges.
146 */
147 void setup_ulist(void){
148 Stmt s;
149 int prevLevel = 0;
150
@@ -313,11 +315,14 @@
315 while( zPw[0]=='*' ){ zPw++; }
316 return zPw[0]!=0;
317 }
318
319 /*
320 ** WEBPAGE: setup_uedit
321 **
322 ** Edit information about a user or create a new user.
323 ** Requires Admin privileges.
324 */
325 void user_edit(void){
326 const char *zId, *zLogin, *zInfo, *zCap, *zPw;
327 const char *zGroup;
328 const char *zOldLogin;
@@ -989,10 +994,12 @@
994 }
995
996
997 /*
998 ** WEBPAGE: setup_access
999 **
1000 ** The access-control settings page. Requires Admin privileges.
1001 */
1002 void setup_access(void){
1003 login_check_credentials();
1004 if( !g.perm.Setup ){
1005 login_needed(0);
@@ -1186,10 +1193,13 @@
1193 style_footer();
1194 }
1195
1196 /*
1197 ** WEBPAGE: setup_login_group
1198 **
1199 ** Change how the current repository participates in a login
1200 ** group.
1201 */
1202 void setup_login_group(void){
1203 const char *zGroup;
1204 char *zErrMsg = 0;
1205 Blob fullName;
@@ -1299,10 +1309,13 @@
1309 style_footer();
1310 }
1311
1312 /*
1313 ** WEBPAGE: setup_timeline
1314 **
1315 ** Edit administrative settings controlling the display of
1316 ** timelines.
1317 */
1318 void setup_timeline(void){
1319 double tmDiff;
1320 char zTmDiff[20];
1321 static const char *const azTimeFormats[] = {
@@ -1385,10 +1398,13 @@
1398 style_footer();
1399 }
1400
1401 /*
1402 ** WEBPAGE: setup_settings
1403 **
1404 ** Change or view miscellanous settings. Part of the
1405 ** Admin pages requiring Admin privileges.
1406 */
1407 void setup_settings(void){
1408 Setting const *pSet;
1409
1410 login_check_credentials();
@@ -1468,10 +1484,12 @@
1484 style_footer();
1485 }
1486
1487 /*
1488 ** WEBPAGE: setup_config
1489 **
1490 ** The "Admin/Configuration" page. Requires Admin privilege.
1491 */
1492 void setup_config(void){
1493 login_check_credentials();
1494 if( !g.perm.Setup ){
1495 login_needed(0);
@@ -1547,10 +1565,12 @@
1565 style_footer();
1566 }
1567
1568 /*
1569 ** WEBPAGE: setup_modreq
1570 **
1571 ** Admin page for setting up moderation of tickets and wiki.
1572 */
1573 void setup_modreq(void){
1574 login_check_credentials();
1575 if( !g.perm.Setup ){
1576 login_needed(0);
@@ -1592,10 +1612,13 @@
1612
1613 }
1614
1615 /*
1616 ** WEBPAGE: setup_adunit
1617 **
1618 ** Administrative page for configuring and controlling ad units
1619 ** and how they are displayed.
1620 */
1621 void setup_adunit(void){
1622 login_check_credentials();
1623 if( !g.perm.Setup ){
1624 login_needed(0);
@@ -1660,10 +1683,12 @@
1683 db_end_transaction(0);
1684 }
1685
1686 /*
1687 ** WEBPAGE: setup_logo
1688 **
1689 ** Administrative page for changing the logo image.
1690 */
1691 void setup_logo(void){
1692 const char *zLogoMtime = db_get_mtime("logo-image", 0, 0);
1693 const char *zLogoMime = db_get("logo-mimetype","image/gif");
1694 const char *aLogoImg = P("logoim");
@@ -1812,10 +1837,11 @@
1837
1838 /*
1839 ** WEBPAGE: admin_sql
1840 **
1841 ** Run raw SQL commands against the database file using the web interface.
1842 ** Requires Admin privileges.
1843 */
1844 void sql_page(void){
1845 const char *zQ = P("q");
1846 int go = P("go")!=0;
1847 login_check_credentials();
@@ -1933,11 +1959,11 @@
1959 /*
1960 ** WEBPAGE: admin_th1
1961 **
1962 ** Run raw TH1 commands using the web interface. If Tcl integration was
1963 ** enabled at compile-time and the "tcl" setting is enabled, Tcl commands
1964 ** may be run as well. Requires Admin privilege.
1965 */
1966 void th1_page(void){
1967 const char *zQ = P("q");
1968 int go = P("go")!=0;
1969 login_check_credentials();
@@ -2054,11 +2080,11 @@
2080 }
2081
2082 /*
2083 ** WEBPAGE: srchsetup
2084 **
2085 ** Configure the search engine. Requires Admin privilege.
2086 */
2087 void page_srchsetup(){
2088 login_check_credentials();
2089 if( !g.perm.Setup && !g.perm.Admin ){
2090 login_needed(0);
2091
+10 -1
--- src/shun.c
+++ src/shun.c
@@ -35,10 +35,13 @@
3535
return rc==SQLITE_ROW;
3636
}
3737
3838
/*
3939
** WEBPAGE: shun
40
+**
41
+** View the SHA1 hashes of all shunned artifacts. Add new hashes
42
+** to the shun set. Requires Admin privilege.
4043
*/
4144
void shun_page(void){
4245
Stmt q;
4346
int cnt = 0;
4447
const char *zUuid = P("uuid");
@@ -293,10 +296,15 @@
293296
294297
/*
295298
** WEBPAGE: rcvfromlist
296299
**
297300
** Show a listing of RCVFROM table entries.
301
+**
302
+** The RCVFROM table records where this repository received each
303
+** artifact, including the time of receipt, user, and IP address.
304
+**
305
+** Access requires Admin privilege.
298306
*/
299307
void rcvfromlist_page(void){
300308
int ofst = atoi(PD("ofst","0"));
301309
int showAll = P("all")!=0;
302310
int cnt;
@@ -375,11 +383,12 @@
375383
}
376384
377385
/*
378386
** WEBPAGE: rcvfrom
379387
**
380
-** Show a single RCVFROM table entry.
388
+** Show a single RCVFROM table entry identified by the rcvid= query
389
+** parameters. Requires Admin privilege.
381390
*/
382391
void rcvfrom_page(void){
383392
int rcvid = atoi(PD("rcvid","0"));
384393
Stmt q;
385394
386395
--- src/shun.c
+++ src/shun.c
@@ -35,10 +35,13 @@
35 return rc==SQLITE_ROW;
36 }
37
38 /*
39 ** WEBPAGE: shun
 
 
 
40 */
41 void shun_page(void){
42 Stmt q;
43 int cnt = 0;
44 const char *zUuid = P("uuid");
@@ -293,10 +296,15 @@
293
294 /*
295 ** WEBPAGE: rcvfromlist
296 **
297 ** Show a listing of RCVFROM table entries.
 
 
 
 
 
298 */
299 void rcvfromlist_page(void){
300 int ofst = atoi(PD("ofst","0"));
301 int showAll = P("all")!=0;
302 int cnt;
@@ -375,11 +383,12 @@
375 }
376
377 /*
378 ** WEBPAGE: rcvfrom
379 **
380 ** Show a single RCVFROM table entry.
 
381 */
382 void rcvfrom_page(void){
383 int rcvid = atoi(PD("rcvid","0"));
384 Stmt q;
385
386
--- src/shun.c
+++ src/shun.c
@@ -35,10 +35,13 @@
35 return rc==SQLITE_ROW;
36 }
37
38 /*
39 ** WEBPAGE: shun
40 **
41 ** View the SHA1 hashes of all shunned artifacts. Add new hashes
42 ** to the shun set. Requires Admin privilege.
43 */
44 void shun_page(void){
45 Stmt q;
46 int cnt = 0;
47 const char *zUuid = P("uuid");
@@ -293,10 +296,15 @@
296
297 /*
298 ** WEBPAGE: rcvfromlist
299 **
300 ** Show a listing of RCVFROM table entries.
301 **
302 ** The RCVFROM table records where this repository received each
303 ** artifact, including the time of receipt, user, and IP address.
304 **
305 ** Access requires Admin privilege.
306 */
307 void rcvfromlist_page(void){
308 int ofst = atoi(PD("ofst","0"));
309 int showAll = P("all")!=0;
310 int cnt;
@@ -375,11 +383,12 @@
383 }
384
385 /*
386 ** WEBPAGE: rcvfrom
387 **
388 ** Show a single RCVFROM table entry identified by the rcvid= query
389 ** parameters. Requires Admin privilege.
390 */
391 void rcvfrom_page(void){
392 int rcvid = atoi(PD("rcvid","0"));
393 Stmt q;
394
395
+102 -62
--- src/sitemap.c
+++ src/sitemap.c
@@ -22,93 +22,133 @@
2222
#include <assert.h>
2323
2424
/*
2525
** WEBPAGE: sitemap
2626
**
27
-** Show an incomplete list of web pages offered by the Fossil web engine.
27
+** List some of the web pages offered by the Fossil web engine. This
28
+** page is intended as a suppliment to the menu bar on the main screen.
29
+** That is, this page is designed to hold links that are omitted from
30
+** the main menu due to lack of space.
2831
*/
2932
void sitemap_page(void){
33
+ int srchFlags;
3034
login_check_credentials();
35
+ srchFlags = search_restrict(SRCH_ALL);
3136
style_header("Site Map");
3237
style_adunit_config(ADUNIT_RIGHT_OK);
38
+#if 0
3339
@ <p>
3440
@ The following links are just a few of the many web-pages available for
3541
@ this Fossil repository:
3642
@ </p>
3743
@
44
+#endif
3845
@ <ul>
3946
@ <li>%z(href("%R/home"))Home Page</a>
40
- @ <ul>
41
- @ <li>%z(href("%R/docsrc"))Search Project Documentation</a></li>
42
- @ </ul></li>
43
- @ <li>%z(href("%R/tree"))File Browser</a></li>
44
- @ <ul>
45
- @ <li>%z(href("%R/tree?type=tree&ci=trunk"))Tree-view,
46
- @ Trunk Check-in</a></li>
47
- @ <li>%z(href("%R/tree?type=flat"))Flat-view</a></li>
48
- @ <li>%z(href("%R/fileage?name=trunk"))File ages for Trunk</a></li>
49
- @ </ul>
50
- @ <li>%z(href("%R/timeline?n=200"))Project Timeline</a></li>
51
- @ <ul>
52
- @ <li>%z(href("%R/timeline?a=1970-01-01&y=ci&n=10"))First 10
53
- @ check-ins</a></li>
54
- @ <li>%z(href("%R/timeline?n=all&namechng"))All check-ins with file name
55
- @ changes</a></li>
56
- @ <li>%z(href("%R/reports"))Activity Reports</a></li>
57
- @ </ul>
58
- @ <li>%z(href("%R/brlist"))Branches</a></li>
59
- @ <ul>
60
- @ <li>%z(href("%R/leaves"))Leaf Check-ins</a></li>
61
- @ <li>%z(href("%R/taglist"))List of Tags</a></li>
62
- @ </ul>
63
- @ </li>
64
- @ <li>%z(href("%R/wikihelp"))Wiki</a>
65
- @ <ul>
66
- @ <li>%z(href("%R/wikisrch"))Wiki Search</a></li>
67
- @ <li>%z(href("%R/wcontent"))List of Wiki Pages</a></li>
68
- @ <li>%z(href("%R/timeline?y=w"))Recent activity</a></li>
69
- @ <li>%z(href("%R/wiki_rules"))Wiki Formatting Rules</a></li>
70
- @ <li>%z(href("%R/md_rules"))Markdown Formatting Rules</a></li>
71
- @ <li>%z(href("%R/wiki?name=Sandbox"))Sandbox</a></li>
72
- @ <li>%z(href("%R/attachlist"))List of Attachments</a></li>
73
- @ </ul>
74
- @ </li>
75
- @ <li>%z(href("%R/reportlist"))Tickets</a>
76
- @ <ul>
77
- @ <li>%z(href("%R/tktsrch"))Ticket Search</a></li>
78
- @ <li>%z(href("%R/timeline?y=t"))Recent activity</a></li>
79
- @ <li>%z(href("%R/attachlist"))List of Attachments</a></li>
80
- @ </ul>
81
- @ </li>
82
- @ <li>%z(href("%R/search"))Full-Text Search</a></li>
83
- @ <li>%z(href("%R/login"))Login/Logout/Change Password</a></li>
84
- @ <li>%z(href("%R/stat"))Repository Status</a>
85
- @ <ul>
86
- @ <li>%z(href("%R/hash-collisions"))Collisions on SHA1 hash
87
- @ prefixes</a></li>
88
- @ <li>%z(href("%R/urllist"))List of URLs used to access
89
- @ this repository</a></li>
90
- @ <li>%z(href("%R/bloblist"))List of Artifacts</a></li>
91
- @ </ul></li>
47
+ if( srchFlags & SRCH_DOC ){
48
+ @ <ul>
49
+ @ <li>%z(href("%R/docsrch"))Search Project Documentation</a></li>
50
+ @ </ul>
51
+ }
52
+ @ </li>
53
+ if( g.perm.Read ){
54
+ @ <li>%z(href("%R/tree"))File Browser</a></li>
55
+ @ <ul>
56
+ @ <li>%z(href("%R/tree?type=tree&ci=trunk"))Tree-view,
57
+ @ Trunk Check-in</a></li>
58
+ @ <li>%z(href("%R/tree?type=flat"))Flat-view</a></li>
59
+ @ <li>%z(href("%R/fileage?name=trunk"))File ages for Trunk</a></li>
60
+ @ </ul>
61
+ }
62
+ if( g.perm.Read ){
63
+ @ <li>%z(href("%R/timeline?n=200"))Project Timeline</a></li>
64
+ @ <ul>
65
+ @ <li>%z(href("%R/reports"))Activity Reports</a></li>
66
+ @ <li>%z(href("%R/timeline?n=all&namechng"))File name changes</a></li>
67
+ @ <li>%z(href("%R/timeline?n=all&forks"))Forks</a></li>
68
+ @ <li>%z(href("%R/timeline?a=1970-01-01&y=ci&n=10"))First 10
69
+ @ check-ins</a></li>
70
+ @ </ul>
71
+ }
72
+ if( g.perm.Read ){
73
+ @ <li>%z(href("%R/brlist"))Branches</a></li>
74
+ @ <ul>
75
+ @ <li>%z(href("%R/leaves"))Leaf Check-ins</a></li>
76
+ @ <li>%z(href("%R/taglist"))List of Tags</a></li>
77
+ @ </ul>
78
+ @ </li>
79
+ }
80
+ if( g.perm.RdWiki ){
81
+ @ <li>%z(href("%R/wikihelp"))Wiki</a>
82
+ @ <ul>
83
+ if( srchFlags & SRCH_WIKI ){
84
+ @ <li>%z(href("%R/wikisrch"))Wiki Search</a></li>
85
+ }
86
+ @ <li>%z(href("%R/wcontent"))List of Wiki Pages</a></li>
87
+ @ <li>%z(href("%R/timeline?y=w"))Recent activity</a></li>
88
+ @ <li>%z(href("%R/wiki_rules"))Wiki Formatting Rules</a></li>
89
+ @ <li>%z(href("%R/md_rules"))Markdown Formatting Rules</a></li>
90
+ @ <li>%z(href("%R/wiki?name=Sandbox"))Sandbox</a></li>
91
+ @ <li>%z(href("%R/attachlist"))List of Attachments</a></li>
92
+ @ </ul>
93
+ @ </li>
94
+ }
95
+ if( g.perm.RdTkt ){
96
+ @ <li>%z(href("%R/reportlist"))Tickets</a>
97
+ @ <ul>
98
+ if( srchFlags & SRCH_TKT ){
99
+ @ <li>%z(href("%R/tktsrch"))Ticket Search</a></li>
100
+ }
101
+ @ <li>%z(href("%R/timeline?y=t"))Recent activity</a></li>
102
+ @ <li>%z(href("%R/attachlist"))List of Attachments</a></li>
103
+ @ </ul>
104
+ @ </li>
105
+ }
106
+ if( srchFlags ){
107
+ @ <li>%z(href("%R/search"))Full-Text Search</a></li>
108
+ }
109
+ @ <li>%z(href("%R/login"))Login/Logout/Change Password</a></li>
110
+ if( g.perm.Read ){
111
+ @ <li>%z(href("%R/stat"))Repository Status</a>
112
+ @ <ul>
113
+ @ <li>%z(href("%R/hash-collisions"))Collisions on SHA1 hash
114
+ @ prefixes</a></li>
115
+ if( g.perm.Admin ){
116
+ @ <li>%z(href("%R/urllist"))List of URLs used to access
117
+ @ this repository</a></li>
118
+ }
119
+ @ <li>%z(href("%R/bloblist"))List of Artifacts</a></li>
120
+ @ </ul>
121
+ @ </li>
122
+ }
92123
@ <li>On-line Documentation
93124
@ <ul>
94125
@ <li>%z(href("%R/help"))List of All Commands and Web Pages</a></li>
95126
@ <li>%z(href("%R/test-all-help"))All "help" text on a single page</a></li>
96127
@ <li>%z(href("%R/mimetype_list"))Filename suffix to mimetype map</a></li>
97128
@ </ul></li>
98
- @ <li>%z(href("%R/setup"))Administration Pages</a>
99
- @ <ul>
100
- @ <li>%z(href("%R/modreq"))Pending Moderation Requests</a></li>
101
- @ <li>%z(href("%R/admin_log"))Admin log</a></li>
102
- @ <li>%z(href("%R/cachestat"))Status of the web-page cache</a></li>
103
- @ </ul></li>
129
+ if( g.perm.Admin ){
130
+ @ <li>%z(href("%R/setup"))Administration Pages</a>
131
+ @ <ul>
132
+ @ <li>%z(href("%R/modreq"))Pending Moderation Requests</a></li>
133
+ @ <li>%z(href("%R/admin_log"))Admin log</a></li>
134
+ @ <li>%z(href("%R/cachestat"))Status of the web-page cache</a></li>
135
+ @ </ul></li>
136
+ }
104137
@ <li>Test Pages
105138
@ <ul>
106
- @ <li>%z(href("%R/test_env"))CGI Environment Test</a></li>
107
- @ <li>%z(href("%R/test_timewarps"))List of "Timewarp" Check-ins</a></li>
108
- @ <li>%z(href("%R/test-rename-list"))List of file renames</a></li>
139
+ if( g.perm.Admin || db_get_boolean("test_env_enable",0) ){
140
+ @ <li>%z(href("%R/test_env"))CGI Environment Test</a></li>
141
+ }
142
+ if( g.perm.Read && g.perm.Hyperlink ){
143
+ @ <li>%z(href("%R/test_timewarps"))List of "Timewarp" Check-ins</a></li>
144
+ }
145
+ if( g.perm.Read ){
146
+ @ <li>%z(href("%R/test-rename-list"))List of file renames</a></li>
147
+ }
109148
@ <li>%z(href("%R/hash-color-test"))Page to experiment with the automatic
110149
@ colors assigned to branch names</a>
150
+ @ <li>%z(href("%R/test-captcha"))Random ASCII-art Captcha image</li>
111151
@ </ul></li>
112152
@ </ul></li>
113153
style_footer();
114154
}
115155
--- src/sitemap.c
+++ src/sitemap.c
@@ -22,93 +22,133 @@
22 #include <assert.h>
23
24 /*
25 ** WEBPAGE: sitemap
26 **
27 ** Show an incomplete list of web pages offered by the Fossil web engine.
 
 
 
28 */
29 void sitemap_page(void){
 
30 login_check_credentials();
 
31 style_header("Site Map");
32 style_adunit_config(ADUNIT_RIGHT_OK);
 
33 @ <p>
34 @ The following links are just a few of the many web-pages available for
35 @ this Fossil repository:
36 @ </p>
37 @
 
38 @ <ul>
39 @ <li>%z(href("%R/home"))Home Page</a>
40 @ <ul>
41 @ <li>%z(href("%R/docsrc"))Search Project Documentation</a></li>
42 @ </ul></li>
43 @ <li>%z(href("%R/tree"))File Browser</a></li>
44 @ <ul>
45 @ <li>%z(href("%R/tree?type=tree&ci=trunk"))Tree-view,
46 @ Trunk Check-in</a></li>
47 @ <li>%z(href("%R/tree?type=flat"))Flat-view</a></li>
48 @ <li>%z(href("%R/fileage?name=trunk"))File ages for Trunk</a></li>
49 @ </ul>
50 @ <li>%z(href("%R/timeline?n=200"))Project Timeline</a></li>
51 @ <ul>
52 @ <li>%z(href("%R/timeline?a=1970-01-01&y=ci&n=10"))First 10
53 @ check-ins</a></li>
54 @ <li>%z(href("%R/timeline?n=all&namechng"))All check-ins with file name
55 @ changes</a></li>
56 @ <li>%z(href("%R/reports"))Activity Reports</a></li>
57 @ </ul>
58 @ <li>%z(href("%R/brlist"))Branches</a></li>
59 @ <ul>
60 @ <li>%z(href("%R/leaves"))Leaf Check-ins</a></li>
61 @ <li>%z(href("%R/taglist"))List of Tags</a></li>
62 @ </ul>
63 @ </li>
64 @ <li>%z(href("%R/wikihelp"))Wiki</a>
65 @ <ul>
66 @ <li>%z(href("%R/wikisrch"))Wiki Search</a></li>
67 @ <li>%z(href("%R/wcontent"))List of Wiki Pages</a></li>
68 @ <li>%z(href("%R/timeline?y=w"))Recent activity</a></li>
69 @ <li>%z(href("%R/wiki_rules"))Wiki Formatting Rules</a></li>
70 @ <li>%z(href("%R/md_rules"))Markdown Formatting Rules</a></li>
71 @ <li>%z(href("%R/wiki?name=Sandbox"))Sandbox</a></li>
72 @ <li>%z(href("%R/attachlist"))List of Attachments</a></li>
73 @ </ul>
74 @ </li>
75 @ <li>%z(href("%R/reportlist"))Tickets</a>
76 @ <ul>
77 @ <li>%z(href("%R/tktsrch"))Ticket Search</a></li>
78 @ <li>%z(href("%R/timeline?y=t"))Recent activity</a></li>
79 @ <li>%z(href("%R/attachlist"))List of Attachments</a></li>
80 @ </ul>
81 @ </li>
82 @ <li>%z(href("%R/search"))Full-Text Search</a></li>
83 @ <li>%z(href("%R/login"))Login/Logout/Change Password</a></li>
84 @ <li>%z(href("%R/stat"))Repository Status</a>
85 @ <ul>
86 @ <li>%z(href("%R/hash-collisions"))Collisions on SHA1 hash
87 @ prefixes</a></li>
88 @ <li>%z(href("%R/urllist"))List of URLs used to access
89 @ this repository</a></li>
90 @ <li>%z(href("%R/bloblist"))List of Artifacts</a></li>
91 @ </ul></li>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92 @ <li>On-line Documentation
93 @ <ul>
94 @ <li>%z(href("%R/help"))List of All Commands and Web Pages</a></li>
95 @ <li>%z(href("%R/test-all-help"))All "help" text on a single page</a></li>
96 @ <li>%z(href("%R/mimetype_list"))Filename suffix to mimetype map</a></li>
97 @ </ul></li>
98 @ <li>%z(href("%R/setup"))Administration Pages</a>
99 @ <ul>
100 @ <li>%z(href("%R/modreq"))Pending Moderation Requests</a></li>
101 @ <li>%z(href("%R/admin_log"))Admin log</a></li>
102 @ <li>%z(href("%R/cachestat"))Status of the web-page cache</a></li>
103 @ </ul></li>
 
 
104 @ <li>Test Pages
105 @ <ul>
106 @ <li>%z(href("%R/test_env"))CGI Environment Test</a></li>
107 @ <li>%z(href("%R/test_timewarps"))List of "Timewarp" Check-ins</a></li>
108 @ <li>%z(href("%R/test-rename-list"))List of file renames</a></li>
 
 
 
 
 
 
109 @ <li>%z(href("%R/hash-color-test"))Page to experiment with the automatic
110 @ colors assigned to branch names</a>
 
111 @ </ul></li>
112 @ </ul></li>
113 style_footer();
114 }
115
--- src/sitemap.c
+++ src/sitemap.c
@@ -22,93 +22,133 @@
22 #include <assert.h>
23
24 /*
25 ** WEBPAGE: sitemap
26 **
27 ** List some of the web pages offered by the Fossil web engine. This
28 ** page is intended as a suppliment to the menu bar on the main screen.
29 ** That is, this page is designed to hold links that are omitted from
30 ** the main menu due to lack of space.
31 */
32 void sitemap_page(void){
33 int srchFlags;
34 login_check_credentials();
35 srchFlags = search_restrict(SRCH_ALL);
36 style_header("Site Map");
37 style_adunit_config(ADUNIT_RIGHT_OK);
38 #if 0
39 @ <p>
40 @ The following links are just a few of the many web-pages available for
41 @ this Fossil repository:
42 @ </p>
43 @
44 #endif
45 @ <ul>
46 @ <li>%z(href("%R/home"))Home Page</a>
47 if( srchFlags & SRCH_DOC ){
48 @ <ul>
49 @ <li>%z(href("%R/docsrch"))Search Project Documentation</a></li>
50 @ </ul>
51 }
52 @ </li>
53 if( g.perm.Read ){
54 @ <li>%z(href("%R/tree"))File Browser</a></li>
55 @ <ul>
56 @ <li>%z(href("%R/tree?type=tree&ci=trunk"))Tree-view,
57 @ Trunk Check-in</a></li>
58 @ <li>%z(href("%R/tree?type=flat"))Flat-view</a></li>
59 @ <li>%z(href("%R/fileage?name=trunk"))File ages for Trunk</a></li>
60 @ </ul>
61 }
62 if( g.perm.Read ){
63 @ <li>%z(href("%R/timeline?n=200"))Project Timeline</a></li>
64 @ <ul>
65 @ <li>%z(href("%R/reports"))Activity Reports</a></li>
66 @ <li>%z(href("%R/timeline?n=all&namechng"))File name changes</a></li>
67 @ <li>%z(href("%R/timeline?n=all&forks"))Forks</a></li>
68 @ <li>%z(href("%R/timeline?a=1970-01-01&y=ci&n=10"))First 10
69 @ check-ins</a></li>
70 @ </ul>
71 }
72 if( g.perm.Read ){
73 @ <li>%z(href("%R/brlist"))Branches</a></li>
74 @ <ul>
75 @ <li>%z(href("%R/leaves"))Leaf Check-ins</a></li>
76 @ <li>%z(href("%R/taglist"))List of Tags</a></li>
77 @ </ul>
78 @ </li>
79 }
80 if( g.perm.RdWiki ){
81 @ <li>%z(href("%R/wikihelp"))Wiki</a>
82 @ <ul>
83 if( srchFlags & SRCH_WIKI ){
84 @ <li>%z(href("%R/wikisrch"))Wiki Search</a></li>
85 }
86 @ <li>%z(href("%R/wcontent"))List of Wiki Pages</a></li>
87 @ <li>%z(href("%R/timeline?y=w"))Recent activity</a></li>
88 @ <li>%z(href("%R/wiki_rules"))Wiki Formatting Rules</a></li>
89 @ <li>%z(href("%R/md_rules"))Markdown Formatting Rules</a></li>
90 @ <li>%z(href("%R/wiki?name=Sandbox"))Sandbox</a></li>
91 @ <li>%z(href("%R/attachlist"))List of Attachments</a></li>
92 @ </ul>
93 @ </li>
94 }
95 if( g.perm.RdTkt ){
96 @ <li>%z(href("%R/reportlist"))Tickets</a>
97 @ <ul>
98 if( srchFlags & SRCH_TKT ){
99 @ <li>%z(href("%R/tktsrch"))Ticket Search</a></li>
100 }
101 @ <li>%z(href("%R/timeline?y=t"))Recent activity</a></li>
102 @ <li>%z(href("%R/attachlist"))List of Attachments</a></li>
103 @ </ul>
104 @ </li>
105 }
106 if( srchFlags ){
107 @ <li>%z(href("%R/search"))Full-Text Search</a></li>
108 }
109 @ <li>%z(href("%R/login"))Login/Logout/Change Password</a></li>
110 if( g.perm.Read ){
111 @ <li>%z(href("%R/stat"))Repository Status</a>
112 @ <ul>
113 @ <li>%z(href("%R/hash-collisions"))Collisions on SHA1 hash
114 @ prefixes</a></li>
115 if( g.perm.Admin ){
116 @ <li>%z(href("%R/urllist"))List of URLs used to access
117 @ this repository</a></li>
118 }
119 @ <li>%z(href("%R/bloblist"))List of Artifacts</a></li>
120 @ </ul>
121 @ </li>
122 }
123 @ <li>On-line Documentation
124 @ <ul>
125 @ <li>%z(href("%R/help"))List of All Commands and Web Pages</a></li>
126 @ <li>%z(href("%R/test-all-help"))All "help" text on a single page</a></li>
127 @ <li>%z(href("%R/mimetype_list"))Filename suffix to mimetype map</a></li>
128 @ </ul></li>
129 if( g.perm.Admin ){
130 @ <li>%z(href("%R/setup"))Administration Pages</a>
131 @ <ul>
132 @ <li>%z(href("%R/modreq"))Pending Moderation Requests</a></li>
133 @ <li>%z(href("%R/admin_log"))Admin log</a></li>
134 @ <li>%z(href("%R/cachestat"))Status of the web-page cache</a></li>
135 @ </ul></li>
136 }
137 @ <li>Test Pages
138 @ <ul>
139 if( g.perm.Admin || db_get_boolean("test_env_enable",0) ){
140 @ <li>%z(href("%R/test_env"))CGI Environment Test</a></li>
141 }
142 if( g.perm.Read && g.perm.Hyperlink ){
143 @ <li>%z(href("%R/test_timewarps"))List of "Timewarp" Check-ins</a></li>
144 }
145 if( g.perm.Read ){
146 @ <li>%z(href("%R/test-rename-list"))List of file renames</a></li>
147 }
148 @ <li>%z(href("%R/hash-color-test"))Page to experiment with the automatic
149 @ colors assigned to branch names</a>
150 @ <li>%z(href("%R/test-captcha"))Random ASCII-art Captcha image</li>
151 @ </ul></li>
152 @ </ul></li>
153 style_footer();
154 }
155
--- src/skins.c
+++ src/skins.c
@@ -407,10 +407,13 @@
407407
return 0;
408408
}
409409
410410
/*
411411
** WEBPAGE: setup_skin
412
+**
413
+** Show a list of available skins with buttons for selecting which
414
+** skin to use. Requires Admin privilege.
412415
*/
413416
void setup_skin(void){
414417
const char *z;
415418
char *zName;
416419
char *zErr = 0;
@@ -565,10 +568,13 @@
565568
}
566569
567570
568571
/*
569572
** WEBPAGE: setup_skinedit
573
+**
574
+** Edit aspects of a skin determined by the w= query parameter.
575
+** Requires Admin privileges.
570576
**
571577
** w=N -- 0=CSS, 1=footer, 2=header, 3=details
572578
*/
573579
void setup_skinedit(void){
574580
static const struct sSkinAddr {
575581
--- src/skins.c
+++ src/skins.c
@@ -407,10 +407,13 @@
407 return 0;
408 }
409
410 /*
411 ** WEBPAGE: setup_skin
 
 
 
412 */
413 void setup_skin(void){
414 const char *z;
415 char *zName;
416 char *zErr = 0;
@@ -565,10 +568,13 @@
565 }
566
567
568 /*
569 ** WEBPAGE: setup_skinedit
 
 
 
570 **
571 ** w=N -- 0=CSS, 1=footer, 2=header, 3=details
572 */
573 void setup_skinedit(void){
574 static const struct sSkinAddr {
575
--- src/skins.c
+++ src/skins.c
@@ -407,10 +407,13 @@
407 return 0;
408 }
409
410 /*
411 ** WEBPAGE: setup_skin
412 **
413 ** Show a list of available skins with buttons for selecting which
414 ** skin to use. Requires Admin privilege.
415 */
416 void setup_skin(void){
417 const char *z;
418 char *zName;
419 char *zErr = 0;
@@ -565,10 +568,13 @@
568 }
569
570
571 /*
572 ** WEBPAGE: setup_skinedit
573 **
574 ** Edit aspects of a skin determined by the w= query parameter.
575 ** Requires Admin privileges.
576 **
577 ** w=N -- 0=CSS, 1=footer, 2=header, 3=details
578 */
579 void setup_skinedit(void){
580 static const struct sSkinAddr {
581
+6 -2
--- src/style.c
+++ src/style.c
@@ -1360,10 +1360,12 @@
13601360
}
13611361
13621362
13631363
/*
13641364
** WEBPAGE: style.css
1365
+**
1366
+** Return the style sheet.
13651367
*/
13661368
void page_style_css(void){
13671369
Blob css;
13681370
int i;
13691371
@@ -1395,10 +1397,13 @@
13951397
g.isConst = 1;
13961398
}
13971399
13981400
/*
13991401
** WEBPAGE: test_env
1402
+**
1403
+** Display CGI-variables and other aspects of the run-time
1404
+** environment, for debugging and trouble-shooting purposes.
14001405
*/
14011406
void page_test_env(void){
14021407
char c;
14031408
int i;
14041409
int showAll;
@@ -1466,13 +1471,12 @@
14661471
style_footer();
14671472
if( g.perm.Admin && P("err") ) fossil_fatal("%s", P("err"));
14681473
}
14691474
14701475
/*
1471
-** This page is a honeypot for spiders and bots.
1472
-**
14731476
** WEBPAGE: honeypot
1477
+** This page is a honeypot for spiders and bots.
14741478
*/
14751479
void honeypot_page(void){
14761480
cgi_set_status(403, "Forbidden");
14771481
@ <p>Please enable javascript or log in to see this content</p>
14781482
}
14791483
--- src/style.c
+++ src/style.c
@@ -1360,10 +1360,12 @@
1360 }
1361
1362
1363 /*
1364 ** WEBPAGE: style.css
 
 
1365 */
1366 void page_style_css(void){
1367 Blob css;
1368 int i;
1369
@@ -1395,10 +1397,13 @@
1395 g.isConst = 1;
1396 }
1397
1398 /*
1399 ** WEBPAGE: test_env
 
 
 
1400 */
1401 void page_test_env(void){
1402 char c;
1403 int i;
1404 int showAll;
@@ -1466,13 +1471,12 @@
1466 style_footer();
1467 if( g.perm.Admin && P("err") ) fossil_fatal("%s", P("err"));
1468 }
1469
1470 /*
1471 ** This page is a honeypot for spiders and bots.
1472 **
1473 ** WEBPAGE: honeypot
 
1474 */
1475 void honeypot_page(void){
1476 cgi_set_status(403, "Forbidden");
1477 @ <p>Please enable javascript or log in to see this content</p>
1478 }
1479
--- src/style.c
+++ src/style.c
@@ -1360,10 +1360,12 @@
1360 }
1361
1362
1363 /*
1364 ** WEBPAGE: style.css
1365 **
1366 ** Return the style sheet.
1367 */
1368 void page_style_css(void){
1369 Blob css;
1370 int i;
1371
@@ -1395,10 +1397,13 @@
1397 g.isConst = 1;
1398 }
1399
1400 /*
1401 ** WEBPAGE: test_env
1402 **
1403 ** Display CGI-variables and other aspects of the run-time
1404 ** environment, for debugging and trouble-shooting purposes.
1405 */
1406 void page_test_env(void){
1407 char c;
1408 int i;
1409 int showAll;
@@ -1466,13 +1471,12 @@
1471 style_footer();
1472 if( g.perm.Admin && P("err") ) fossil_fatal("%s", P("err"));
1473 }
1474
1475 /*
 
 
1476 ** WEBPAGE: honeypot
1477 ** This page is a honeypot for spiders and bots.
1478 */
1479 void honeypot_page(void){
1480 cgi_set_status(403, "Forbidden");
1481 @ <p>Please enable javascript or log in to see this content</p>
1482 }
1483
+5
--- src/tag.c
+++ src/tag.c
@@ -536,10 +536,12 @@
536536
usage("add|cancel|find|list ...");
537537
}
538538
539539
/*
540540
** WEBPAGE: taglist
541
+**
542
+** List all non-propagating symbolic tags.
541543
*/
542544
void taglist_page(void){
543545
Stmt q;
544546
545547
login_check_credentials();
@@ -575,10 +577,13 @@
575577
style_footer();
576578
}
577579
578580
/*
579581
** WEBPAGE: /tagtimeline
582
+**
583
+** Render a timeline with all check-ins that contain non-propagating
584
+** symbolic tags.
580585
*/
581586
void tagtimeline_page(void){
582587
Stmt q;
583588
584589
login_check_credentials();
585590
--- src/tag.c
+++ src/tag.c
@@ -536,10 +536,12 @@
536 usage("add|cancel|find|list ...");
537 }
538
539 /*
540 ** WEBPAGE: taglist
 
 
541 */
542 void taglist_page(void){
543 Stmt q;
544
545 login_check_credentials();
@@ -575,10 +577,13 @@
575 style_footer();
576 }
577
578 /*
579 ** WEBPAGE: /tagtimeline
 
 
 
580 */
581 void tagtimeline_page(void){
582 Stmt q;
583
584 login_check_credentials();
585
--- src/tag.c
+++ src/tag.c
@@ -536,10 +536,12 @@
536 usage("add|cancel|find|list ...");
537 }
538
539 /*
540 ** WEBPAGE: taglist
541 **
542 ** List all non-propagating symbolic tags.
543 */
544 void taglist_page(void){
545 Stmt q;
546
547 login_check_credentials();
@@ -575,10 +577,13 @@
577 style_footer();
578 }
579
580 /*
581 ** WEBPAGE: /tagtimeline
582 **
583 ** Render a timeline with all check-ins that contain non-propagating
584 ** symbolic tags.
585 */
586 void tagtimeline_page(void){
587 Stmt q;
588
589 login_check_credentials();
590
+37 -2
--- src/timeline.c
+++ src/timeline.c
@@ -163,11 +163,10 @@
163163
void test_hash_color_page(void){
164164
const char *zBr;
165165
char zNm[10];
166166
int i, cnt;
167167
login_check_credentials();
168
- if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
169168
170169
style_header("Hash Color Test");
171170
for(i=cnt=0; i<10; i++){
172171
sqlite3_snprintf(sizeof(zNm),zNm,"b%d",i);
173172
zBr = P(zNm);
@@ -270,10 +269,11 @@
270269
int tagid = db_column_int(pQuery, 9);
271270
const char *zDispUser = zUser && zUser[0] ? zUser : "anonymous";
272271
const char *zBr = 0; /* Branch */
273272
int commentColumn = 3; /* Column containing comment text */
274273
int modPending; /* Pending moderation */
274
+ char *zDateLink; /* URL for the link on the timestamp */
275275
char zTime[20];
276276
277277
if( zDate==0 ){
278278
zDate = "YYYY-MM-DD HH:MM:SS"; /* Something wrong with the repo */
279279
}
@@ -351,11 +351,12 @@
351351
}else if( rid==vid ){
352352
@ <tr class="timelineCurrent">
353353
}else {
354354
@ <tr>
355355
}
356
- @ <td class="timelineTime">%s(zTime)</td>
356
+ zDateLink = href("%R/timeline?c=%!S&unhide", zUuid);
357
+ @ <td class="timelineTime">%z(zDateLink)%s(zTime)</a></td>
357358
@ <td class="timelineGraph">
358359
if( tmFlags & TIMELINE_UCOLOR ) zBgClr = zUser ? hash_color(zUser) : 0;
359360
if( zType[0]=='c'
360361
&& (pGraph || zBgClr==0 || (tmFlags & TIMELINE_BRCOLOR)!=0)
361362
){
@@ -1215,10 +1216,11 @@
12151216
** shortest ... show only the shortest path
12161217
** uf=FUUID Show only check-ins that use given file version
12171218
** brbg Background color from branch name
12181219
** ubg Background color from user
12191220
** namechng Show only check-ins that filename changes
1221
+** forks Show only forks and their children
12201222
** ym=YYYY-MM Shown only events for the given year/month.
12211223
** datefmt=N Override the date format
12221224
**
12231225
** p= and d= can appear individually or together. If either p= or d=
12241226
** appear, then u=, y=, a=, and b= are ignored.
@@ -1248,10 +1250,11 @@
12481250
const char *zUses = P("uf"); /* Only show check-ins hold this file */
12491251
const char *zYearMonth = P("ym"); /* Show check-ins for the given YYYY-MM */
12501252
const char *zYearWeek = P("yw"); /* Check-ins for YYYY-WW (week-of-year) */
12511253
int useDividers = P("nd")==0; /* Show dividers if "nd" is missing */
12521254
int renameOnly = P("namechng")!=0; /* Show only check-ins that rename files */
1255
+ int forkOnly = PB("forks"); /* Show only forks and their children */
12531256
int tagid; /* Tag ID */
12541257
int tmFlags = 0; /* Timeline flags */
12551258
const char *zThisTag = 0; /* Suppress links to this tag */
12561259
const char *zThisUser = 0; /* Suppress links to this user */
12571260
HQuery url; /* URL for various branch links */
@@ -1354,10 +1357,30 @@
13541357
"CREATE TEMP TABLE rnfile(rid INTEGER PRIMARY KEY);"
13551358
"INSERT OR IGNORE INTO rnfile"
13561359
" SELECT mid FROM mlink WHERE pfnid>0 AND pfnid!=fnid;"
13571360
);
13581361
disableY = 1;
1362
+ }
1363
+ if( forkOnly ){
1364
+ db_multi_exec(
1365
+ "CREATE TEMP TABLE rnfork(rid INTEGER PRIMARY KEY);\n"
1366
+ "INSERT OR IGNORE INTO rnfork(rid)\n"
1367
+ " SELECT pid FROM plink\n"
1368
+ " WHERE (SELECT value FROM tagxref WHERE tagid=%d AND rid=cid)=="
1369
+ " (SELECT value FROM tagxref WHERE tagid=%d AND rid=pid)\n"
1370
+ " GROUP BY pid"
1371
+ " HAVING count(*)>1;\n"
1372
+ "INSERT OR IGNORE INTO rnfork(rid)"
1373
+ " SELECT cid FROM plink\n"
1374
+ " WHERE (SELECT value FROM tagxref WHERE tagid=%d AND rid=cid)=="
1375
+ " (SELECT value FROM tagxref WHERE tagid=%d AND rid=pid)\n"
1376
+ " AND pid IN rnfork;",
1377
+ TAG_BRANCH, TAG_BRANCH, TAG_BRANCH, TAG_BRANCH
1378
+ );
1379
+ tmFlags |= TIMELINE_UNHIDE;
1380
+ zType = "ci";
1381
+ disableY = 1;
13591382
}
13601383
13611384
style_header("Timeline");
13621385
login_anonymous_available();
13631386
timeline_temp_table();
@@ -1484,10 +1507,13 @@
14841507
blob_append_sql(&sql, " AND event.objid IN usesfile ");
14851508
}
14861509
if( renameOnly ){
14871510
blob_append_sql(&sql, " AND event.objid IN rnfile ");
14881511
}
1512
+ if( forkOnly ){
1513
+ blob_append_sql(&sql, " AND event.objid IN rnfork ");
1514
+ }
14891515
if( zYearMonth ){
14901516
blob_append_sql(&sql, " AND %Q=strftime('%%Y-%%m',event.mtime) ",
14911517
zYearMonth);
14921518
}
14931519
else if( zYearWeek ){
@@ -1656,10 +1682,14 @@
16561682
}
16571683
if( renameOnly ){
16581684
blob_appendf(&desc, " that contain filename changes");
16591685
tmFlags |= TIMELINE_DISJOINT|TIMELINE_FRENAMES;
16601686
}
1687
+ if( forkOnly ){
1688
+ blob_appendf(&desc, " associated with forks");
1689
+ tmFlags |= TIMELINE_DISJOINT;
1690
+ }
16611691
if( zUser ){
16621692
blob_appendf(&desc, " by user %h", zUser);
16631693
tmFlags |= TIMELINE_DISJOINT;
16641694
}
16651695
if( zTagName ){
@@ -2204,10 +2234,15 @@
22042234
db_finalize(&q);
22052235
}
22062236
22072237
/*
22082238
** WEBPAGE: test_timewarps
2239
+**
2240
+** Show all check-ins that are "timewarps". A timewarp is a
2241
+** check-in that occurs before its parent, according to the
2242
+** timestamp information on the check-in. This can only actually
2243
+** happen, of course, if a users system clock is set incorrectly.
22092244
*/
22102245
void test_timewarp_page(void){
22112246
Stmt q;
22122247
22132248
login_check_credentials();
22142249
--- src/timeline.c
+++ src/timeline.c
@@ -163,11 +163,10 @@
163 void test_hash_color_page(void){
164 const char *zBr;
165 char zNm[10];
166 int i, cnt;
167 login_check_credentials();
168 if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
169
170 style_header("Hash Color Test");
171 for(i=cnt=0; i<10; i++){
172 sqlite3_snprintf(sizeof(zNm),zNm,"b%d",i);
173 zBr = P(zNm);
@@ -270,10 +269,11 @@
270 int tagid = db_column_int(pQuery, 9);
271 const char *zDispUser = zUser && zUser[0] ? zUser : "anonymous";
272 const char *zBr = 0; /* Branch */
273 int commentColumn = 3; /* Column containing comment text */
274 int modPending; /* Pending moderation */
 
275 char zTime[20];
276
277 if( zDate==0 ){
278 zDate = "YYYY-MM-DD HH:MM:SS"; /* Something wrong with the repo */
279 }
@@ -351,11 +351,12 @@
351 }else if( rid==vid ){
352 @ <tr class="timelineCurrent">
353 }else {
354 @ <tr>
355 }
356 @ <td class="timelineTime">%s(zTime)</td>
 
357 @ <td class="timelineGraph">
358 if( tmFlags & TIMELINE_UCOLOR ) zBgClr = zUser ? hash_color(zUser) : 0;
359 if( zType[0]=='c'
360 && (pGraph || zBgClr==0 || (tmFlags & TIMELINE_BRCOLOR)!=0)
361 ){
@@ -1215,10 +1216,11 @@
1215 ** shortest ... show only the shortest path
1216 ** uf=FUUID Show only check-ins that use given file version
1217 ** brbg Background color from branch name
1218 ** ubg Background color from user
1219 ** namechng Show only check-ins that filename changes
 
1220 ** ym=YYYY-MM Shown only events for the given year/month.
1221 ** datefmt=N Override the date format
1222 **
1223 ** p= and d= can appear individually or together. If either p= or d=
1224 ** appear, then u=, y=, a=, and b= are ignored.
@@ -1248,10 +1250,11 @@
1248 const char *zUses = P("uf"); /* Only show check-ins hold this file */
1249 const char *zYearMonth = P("ym"); /* Show check-ins for the given YYYY-MM */
1250 const char *zYearWeek = P("yw"); /* Check-ins for YYYY-WW (week-of-year) */
1251 int useDividers = P("nd")==0; /* Show dividers if "nd" is missing */
1252 int renameOnly = P("namechng")!=0; /* Show only check-ins that rename files */
 
1253 int tagid; /* Tag ID */
1254 int tmFlags = 0; /* Timeline flags */
1255 const char *zThisTag = 0; /* Suppress links to this tag */
1256 const char *zThisUser = 0; /* Suppress links to this user */
1257 HQuery url; /* URL for various branch links */
@@ -1354,10 +1357,30 @@
1354 "CREATE TEMP TABLE rnfile(rid INTEGER PRIMARY KEY);"
1355 "INSERT OR IGNORE INTO rnfile"
1356 " SELECT mid FROM mlink WHERE pfnid>0 AND pfnid!=fnid;"
1357 );
1358 disableY = 1;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1359 }
1360
1361 style_header("Timeline");
1362 login_anonymous_available();
1363 timeline_temp_table();
@@ -1484,10 +1507,13 @@
1484 blob_append_sql(&sql, " AND event.objid IN usesfile ");
1485 }
1486 if( renameOnly ){
1487 blob_append_sql(&sql, " AND event.objid IN rnfile ");
1488 }
 
 
 
1489 if( zYearMonth ){
1490 blob_append_sql(&sql, " AND %Q=strftime('%%Y-%%m',event.mtime) ",
1491 zYearMonth);
1492 }
1493 else if( zYearWeek ){
@@ -1656,10 +1682,14 @@
1656 }
1657 if( renameOnly ){
1658 blob_appendf(&desc, " that contain filename changes");
1659 tmFlags |= TIMELINE_DISJOINT|TIMELINE_FRENAMES;
1660 }
 
 
 
 
1661 if( zUser ){
1662 blob_appendf(&desc, " by user %h", zUser);
1663 tmFlags |= TIMELINE_DISJOINT;
1664 }
1665 if( zTagName ){
@@ -2204,10 +2234,15 @@
2204 db_finalize(&q);
2205 }
2206
2207 /*
2208 ** WEBPAGE: test_timewarps
 
 
 
 
 
2209 */
2210 void test_timewarp_page(void){
2211 Stmt q;
2212
2213 login_check_credentials();
2214
--- src/timeline.c
+++ src/timeline.c
@@ -163,11 +163,10 @@
163 void test_hash_color_page(void){
164 const char *zBr;
165 char zNm[10];
166 int i, cnt;
167 login_check_credentials();
 
168
169 style_header("Hash Color Test");
170 for(i=cnt=0; i<10; i++){
171 sqlite3_snprintf(sizeof(zNm),zNm,"b%d",i);
172 zBr = P(zNm);
@@ -270,10 +269,11 @@
269 int tagid = db_column_int(pQuery, 9);
270 const char *zDispUser = zUser && zUser[0] ? zUser : "anonymous";
271 const char *zBr = 0; /* Branch */
272 int commentColumn = 3; /* Column containing comment text */
273 int modPending; /* Pending moderation */
274 char *zDateLink; /* URL for the link on the timestamp */
275 char zTime[20];
276
277 if( zDate==0 ){
278 zDate = "YYYY-MM-DD HH:MM:SS"; /* Something wrong with the repo */
279 }
@@ -351,11 +351,12 @@
351 }else if( rid==vid ){
352 @ <tr class="timelineCurrent">
353 }else {
354 @ <tr>
355 }
356 zDateLink = href("%R/timeline?c=%!S&unhide", zUuid);
357 @ <td class="timelineTime">%z(zDateLink)%s(zTime)</a></td>
358 @ <td class="timelineGraph">
359 if( tmFlags & TIMELINE_UCOLOR ) zBgClr = zUser ? hash_color(zUser) : 0;
360 if( zType[0]=='c'
361 && (pGraph || zBgClr==0 || (tmFlags & TIMELINE_BRCOLOR)!=0)
362 ){
@@ -1215,10 +1216,11 @@
1216 ** shortest ... show only the shortest path
1217 ** uf=FUUID Show only check-ins that use given file version
1218 ** brbg Background color from branch name
1219 ** ubg Background color from user
1220 ** namechng Show only check-ins that filename changes
1221 ** forks Show only forks and their children
1222 ** ym=YYYY-MM Shown only events for the given year/month.
1223 ** datefmt=N Override the date format
1224 **
1225 ** p= and d= can appear individually or together. If either p= or d=
1226 ** appear, then u=, y=, a=, and b= are ignored.
@@ -1248,10 +1250,11 @@
1250 const char *zUses = P("uf"); /* Only show check-ins hold this file */
1251 const char *zYearMonth = P("ym"); /* Show check-ins for the given YYYY-MM */
1252 const char *zYearWeek = P("yw"); /* Check-ins for YYYY-WW (week-of-year) */
1253 int useDividers = P("nd")==0; /* Show dividers if "nd" is missing */
1254 int renameOnly = P("namechng")!=0; /* Show only check-ins that rename files */
1255 int forkOnly = PB("forks"); /* Show only forks and their children */
1256 int tagid; /* Tag ID */
1257 int tmFlags = 0; /* Timeline flags */
1258 const char *zThisTag = 0; /* Suppress links to this tag */
1259 const char *zThisUser = 0; /* Suppress links to this user */
1260 HQuery url; /* URL for various branch links */
@@ -1354,10 +1357,30 @@
1357 "CREATE TEMP TABLE rnfile(rid INTEGER PRIMARY KEY);"
1358 "INSERT OR IGNORE INTO rnfile"
1359 " SELECT mid FROM mlink WHERE pfnid>0 AND pfnid!=fnid;"
1360 );
1361 disableY = 1;
1362 }
1363 if( forkOnly ){
1364 db_multi_exec(
1365 "CREATE TEMP TABLE rnfork(rid INTEGER PRIMARY KEY);\n"
1366 "INSERT OR IGNORE INTO rnfork(rid)\n"
1367 " SELECT pid FROM plink\n"
1368 " WHERE (SELECT value FROM tagxref WHERE tagid=%d AND rid=cid)=="
1369 " (SELECT value FROM tagxref WHERE tagid=%d AND rid=pid)\n"
1370 " GROUP BY pid"
1371 " HAVING count(*)>1;\n"
1372 "INSERT OR IGNORE INTO rnfork(rid)"
1373 " SELECT cid FROM plink\n"
1374 " WHERE (SELECT value FROM tagxref WHERE tagid=%d AND rid=cid)=="
1375 " (SELECT value FROM tagxref WHERE tagid=%d AND rid=pid)\n"
1376 " AND pid IN rnfork;",
1377 TAG_BRANCH, TAG_BRANCH, TAG_BRANCH, TAG_BRANCH
1378 );
1379 tmFlags |= TIMELINE_UNHIDE;
1380 zType = "ci";
1381 disableY = 1;
1382 }
1383
1384 style_header("Timeline");
1385 login_anonymous_available();
1386 timeline_temp_table();
@@ -1484,10 +1507,13 @@
1507 blob_append_sql(&sql, " AND event.objid IN usesfile ");
1508 }
1509 if( renameOnly ){
1510 blob_append_sql(&sql, " AND event.objid IN rnfile ");
1511 }
1512 if( forkOnly ){
1513 blob_append_sql(&sql, " AND event.objid IN rnfork ");
1514 }
1515 if( zYearMonth ){
1516 blob_append_sql(&sql, " AND %Q=strftime('%%Y-%%m',event.mtime) ",
1517 zYearMonth);
1518 }
1519 else if( zYearWeek ){
@@ -1656,10 +1682,14 @@
1682 }
1683 if( renameOnly ){
1684 blob_appendf(&desc, " that contain filename changes");
1685 tmFlags |= TIMELINE_DISJOINT|TIMELINE_FRENAMES;
1686 }
1687 if( forkOnly ){
1688 blob_appendf(&desc, " associated with forks");
1689 tmFlags |= TIMELINE_DISJOINT;
1690 }
1691 if( zUser ){
1692 blob_appendf(&desc, " by user %h", zUser);
1693 tmFlags |= TIMELINE_DISJOINT;
1694 }
1695 if( zTagName ){
@@ -2204,10 +2234,15 @@
2234 db_finalize(&q);
2235 }
2236
2237 /*
2238 ** WEBPAGE: test_timewarps
2239 **
2240 ** Show all check-ins that are "timewarps". A timewarp is a
2241 ** check-in that occurs before its parent, according to the
2242 ** timestamp information on the check-in. This can only actually
2243 ** happen, of course, if a users system clock is set incorrectly.
2244 */
2245 void test_timewarp_page(void){
2246 Stmt q;
2247
2248 login_check_credentials();
2249
+1 -1
--- src/tkt.c
+++ src/tkt.c
@@ -441,11 +441,11 @@
441441
442442
/*
443443
** WEBPAGE: tktview
444444
** URL: tktview?name=UUID
445445
**
446
-** View a ticket.
446
+** View a ticket identified by the name= query parameter.
447447
*/
448448
void tktview_page(void){
449449
const char *zScript;
450450
char *zFullName;
451451
const char *zUuid = PD("name","");
452452
--- src/tkt.c
+++ src/tkt.c
@@ -441,11 +441,11 @@
441
442 /*
443 ** WEBPAGE: tktview
444 ** URL: tktview?name=UUID
445 **
446 ** View a ticket.
447 */
448 void tktview_page(void){
449 const char *zScript;
450 char *zFullName;
451 const char *zUuid = PD("name","");
452
--- src/tkt.c
+++ src/tkt.c
@@ -441,11 +441,11 @@
441
442 /*
443 ** WEBPAGE: tktview
444 ** URL: tktview?name=UUID
445 **
446 ** View a ticket identified by the name= query parameter.
447 */
448 void tktview_page(void){
449 const char *zScript;
450 char *zFullName;
451 const char *zUuid = PD("name","");
452
+24 -1
--- src/tktsetup.c
+++ src/tktsetup.c
@@ -21,12 +21,12 @@
2121
#include "config.h"
2222
#include "tktsetup.h"
2323
#include <assert.h>
2424
2525
/*
26
-** Main sub-menu for configuring the ticketing system.
2726
** WEBPAGE: tktsetup
27
+** Main sub-menu for configuring the ticketing system.
2828
*/
2929
void tktsetup_page(void){
3030
login_check_credentials();
3131
if( !g.perm.Setup ){
3232
login_needed(0);
@@ -167,10 +167,12 @@
167167
style_footer();
168168
}
169169
170170
/*
171171
** WEBPAGE: tktsetup_tab
172
+** Administrative page for defining the "ticket" table used
173
+** to hold ticket information.
172174
*/
173175
void tktsetup_tab_page(void){
174176
static const char zDesc[] =
175177
@ Enter a valid CREATE TABLE statement for the "ticket" table. The
176178
@ table must contain columns named "tkt_id", "tkt_uuid", and "tkt_mtime"
@@ -243,10 +245,12 @@
243245
return db_get("ticket-common", (char*)zDefaultTicketCommon);
244246
}
245247
246248
/*
247249
** WEBPAGE: tktsetup_com
250
+** Administrative page used to define TH1 script that is
251
+** common to all ticket screens.
248252
*/
249253
void tktsetup_com_page(void){
250254
static const char zDesc[] =
251255
@ Enter TH1 script that initializes variables prior to generating
252256
@ any of the ticket view, edit, or creation pages.
@@ -273,10 +277,12 @@
273277
return db_get("ticket-change", (char*)zDefaultTicketChange);
274278
}
275279
276280
/*
277281
** WEBPAGE: tktsetup_change
282
+** Adminstrative screen used to view or edit the TH1 script
283
+** that shows ticket changes.
278284
*/
279285
void tktsetup_change_page(void){
280286
static const char zDesc[] =
281287
@ Enter TH1 script that runs after processing the ticket editing
282288
@ and creation pages.
@@ -416,10 +422,12 @@
416422
return db_get("ticket-newpage", (char*)zDefaultNew);
417423
}
418424
419425
/*
420426
** WEBPAGE: tktsetup_newpage
427
+** Administrative page used to view or edit the TH1 script used
428
+** to enter new tickets.
421429
*/
422430
void tktsetup_newpage_page(void){
423431
static const char zDesc[] =
424432
@ Enter HTML with embedded TH1 script that will render the "new ticket"
425433
@ page
@@ -555,10 +563,12 @@
555563
return db_get("ticket-viewpage", (char*)zDefaultView);
556564
}
557565
558566
/*
559567
** WEBPAGE: tktsetup_viewpage
568
+** Administrative page used to view or edit the TH1 script that
569
+** displays individual tickets.
560570
*/
561571
void tktsetup_viewpage_page(void){
562572
static const char zDesc[] =
563573
@ Enter HTML with embedded TH1 script that will render the "view ticket" page
564574
;
@@ -694,10 +704,12 @@
694704
return db_get("ticket-editpage", (char*)zDefaultEdit);
695705
}
696706
697707
/*
698708
** WEBPAGE: tktsetup_editpage
709
+** Administrative page for viewing or editing the TH1 script that
710
+** drives the ticket editing page.
699711
*/
700712
void tktsetup_editpage_page(void){
701713
static const char zDesc[] =
702714
@ Enter HTML with embedded TH1 script that will render the "edit ticket" page
703715
;
@@ -748,10 +760,12 @@
748760
return db_get("ticket-reportlist", (char*)zDefaultReportList);
749761
}
750762
751763
/*
752764
** WEBPAGE: tktsetup_reportlist
765
+** Administrative page used to view or edit the TH1 script that
766
+** defines the "report list" page.
753767
*/
754768
void tktsetup_reportlist(void){
755769
static const char zDesc[] =
756770
@ Enter HTML with embedded TH1 script that will render the "report list" page
757771
;
@@ -795,10 +809,13 @@
795809
return db_get("ticket-report-template", zDefaultReport);
796810
}
797811
798812
/*
799813
** WEBPAGE: tktsetup_rpttplt
814
+**
815
+** Administrative page used to view or edit the ticket report
816
+** template.
800817
*/
801818
void tktsetup_rpttplt_page(void){
802819
static const char zDesc[] =
803820
@ Enter the default ticket report format template. This is the
804821
@ template report format that initially appears when creating a
@@ -836,10 +853,13 @@
836853
return db_get("ticket-key-template", (char*)zDefaultKey);
837854
}
838855
839856
/*
840857
** WEBPAGE: tktsetup_keytplt
858
+**
859
+** Administrative page used to view or edit the Key template
860
+** for tickets.
841861
*/
842862
void tktsetup_keytplt_page(void){
843863
static const char zDesc[] =
844864
@ Enter the default ticket report color-key template. This is the
845865
@ the color-key that initially appears when creating a
@@ -856,10 +876,13 @@
856876
);
857877
}
858878
859879
/*
860880
** WEBPAGE: tktsetup_timeline
881
+**
882
+** Administrative page used ot configure how tickets are
883
+** rendered on timeline views.
861884
*/
862885
void tktsetup_timeline_page(void){
863886
login_check_credentials();
864887
if( !g.perm.Setup ){
865888
login_needed(0);
866889
--- src/tktsetup.c
+++ src/tktsetup.c
@@ -21,12 +21,12 @@
21 #include "config.h"
22 #include "tktsetup.h"
23 #include <assert.h>
24
25 /*
26 ** Main sub-menu for configuring the ticketing system.
27 ** WEBPAGE: tktsetup
 
28 */
29 void tktsetup_page(void){
30 login_check_credentials();
31 if( !g.perm.Setup ){
32 login_needed(0);
@@ -167,10 +167,12 @@
167 style_footer();
168 }
169
170 /*
171 ** WEBPAGE: tktsetup_tab
 
 
172 */
173 void tktsetup_tab_page(void){
174 static const char zDesc[] =
175 @ Enter a valid CREATE TABLE statement for the "ticket" table. The
176 @ table must contain columns named "tkt_id", "tkt_uuid", and "tkt_mtime"
@@ -243,10 +245,12 @@
243 return db_get("ticket-common", (char*)zDefaultTicketCommon);
244 }
245
246 /*
247 ** WEBPAGE: tktsetup_com
 
 
248 */
249 void tktsetup_com_page(void){
250 static const char zDesc[] =
251 @ Enter TH1 script that initializes variables prior to generating
252 @ any of the ticket view, edit, or creation pages.
@@ -273,10 +277,12 @@
273 return db_get("ticket-change", (char*)zDefaultTicketChange);
274 }
275
276 /*
277 ** WEBPAGE: tktsetup_change
 
 
278 */
279 void tktsetup_change_page(void){
280 static const char zDesc[] =
281 @ Enter TH1 script that runs after processing the ticket editing
282 @ and creation pages.
@@ -416,10 +422,12 @@
416 return db_get("ticket-newpage", (char*)zDefaultNew);
417 }
418
419 /*
420 ** WEBPAGE: tktsetup_newpage
 
 
421 */
422 void tktsetup_newpage_page(void){
423 static const char zDesc[] =
424 @ Enter HTML with embedded TH1 script that will render the "new ticket"
425 @ page
@@ -555,10 +563,12 @@
555 return db_get("ticket-viewpage", (char*)zDefaultView);
556 }
557
558 /*
559 ** WEBPAGE: tktsetup_viewpage
 
 
560 */
561 void tktsetup_viewpage_page(void){
562 static const char zDesc[] =
563 @ Enter HTML with embedded TH1 script that will render the "view ticket" page
564 ;
@@ -694,10 +704,12 @@
694 return db_get("ticket-editpage", (char*)zDefaultEdit);
695 }
696
697 /*
698 ** WEBPAGE: tktsetup_editpage
 
 
699 */
700 void tktsetup_editpage_page(void){
701 static const char zDesc[] =
702 @ Enter HTML with embedded TH1 script that will render the "edit ticket" page
703 ;
@@ -748,10 +760,12 @@
748 return db_get("ticket-reportlist", (char*)zDefaultReportList);
749 }
750
751 /*
752 ** WEBPAGE: tktsetup_reportlist
 
 
753 */
754 void tktsetup_reportlist(void){
755 static const char zDesc[] =
756 @ Enter HTML with embedded TH1 script that will render the "report list" page
757 ;
@@ -795,10 +809,13 @@
795 return db_get("ticket-report-template", zDefaultReport);
796 }
797
798 /*
799 ** WEBPAGE: tktsetup_rpttplt
 
 
 
800 */
801 void tktsetup_rpttplt_page(void){
802 static const char zDesc[] =
803 @ Enter the default ticket report format template. This is the
804 @ template report format that initially appears when creating a
@@ -836,10 +853,13 @@
836 return db_get("ticket-key-template", (char*)zDefaultKey);
837 }
838
839 /*
840 ** WEBPAGE: tktsetup_keytplt
 
 
 
841 */
842 void tktsetup_keytplt_page(void){
843 static const char zDesc[] =
844 @ Enter the default ticket report color-key template. This is the
845 @ the color-key that initially appears when creating a
@@ -856,10 +876,13 @@
856 );
857 }
858
859 /*
860 ** WEBPAGE: tktsetup_timeline
 
 
 
861 */
862 void tktsetup_timeline_page(void){
863 login_check_credentials();
864 if( !g.perm.Setup ){
865 login_needed(0);
866
--- src/tktsetup.c
+++ src/tktsetup.c
@@ -21,12 +21,12 @@
21 #include "config.h"
22 #include "tktsetup.h"
23 #include <assert.h>
24
25 /*
 
26 ** WEBPAGE: tktsetup
27 ** Main sub-menu for configuring the ticketing system.
28 */
29 void tktsetup_page(void){
30 login_check_credentials();
31 if( !g.perm.Setup ){
32 login_needed(0);
@@ -167,10 +167,12 @@
167 style_footer();
168 }
169
170 /*
171 ** WEBPAGE: tktsetup_tab
172 ** Administrative page for defining the "ticket" table used
173 ** to hold ticket information.
174 */
175 void tktsetup_tab_page(void){
176 static const char zDesc[] =
177 @ Enter a valid CREATE TABLE statement for the "ticket" table. The
178 @ table must contain columns named "tkt_id", "tkt_uuid", and "tkt_mtime"
@@ -243,10 +245,12 @@
245 return db_get("ticket-common", (char*)zDefaultTicketCommon);
246 }
247
248 /*
249 ** WEBPAGE: tktsetup_com
250 ** Administrative page used to define TH1 script that is
251 ** common to all ticket screens.
252 */
253 void tktsetup_com_page(void){
254 static const char zDesc[] =
255 @ Enter TH1 script that initializes variables prior to generating
256 @ any of the ticket view, edit, or creation pages.
@@ -273,10 +277,12 @@
277 return db_get("ticket-change", (char*)zDefaultTicketChange);
278 }
279
280 /*
281 ** WEBPAGE: tktsetup_change
282 ** Adminstrative screen used to view or edit the TH1 script
283 ** that shows ticket changes.
284 */
285 void tktsetup_change_page(void){
286 static const char zDesc[] =
287 @ Enter TH1 script that runs after processing the ticket editing
288 @ and creation pages.
@@ -416,10 +422,12 @@
422 return db_get("ticket-newpage", (char*)zDefaultNew);
423 }
424
425 /*
426 ** WEBPAGE: tktsetup_newpage
427 ** Administrative page used to view or edit the TH1 script used
428 ** to enter new tickets.
429 */
430 void tktsetup_newpage_page(void){
431 static const char zDesc[] =
432 @ Enter HTML with embedded TH1 script that will render the "new ticket"
433 @ page
@@ -555,10 +563,12 @@
563 return db_get("ticket-viewpage", (char*)zDefaultView);
564 }
565
566 /*
567 ** WEBPAGE: tktsetup_viewpage
568 ** Administrative page used to view or edit the TH1 script that
569 ** displays individual tickets.
570 */
571 void tktsetup_viewpage_page(void){
572 static const char zDesc[] =
573 @ Enter HTML with embedded TH1 script that will render the "view ticket" page
574 ;
@@ -694,10 +704,12 @@
704 return db_get("ticket-editpage", (char*)zDefaultEdit);
705 }
706
707 /*
708 ** WEBPAGE: tktsetup_editpage
709 ** Administrative page for viewing or editing the TH1 script that
710 ** drives the ticket editing page.
711 */
712 void tktsetup_editpage_page(void){
713 static const char zDesc[] =
714 @ Enter HTML with embedded TH1 script that will render the "edit ticket" page
715 ;
@@ -748,10 +760,12 @@
760 return db_get("ticket-reportlist", (char*)zDefaultReportList);
761 }
762
763 /*
764 ** WEBPAGE: tktsetup_reportlist
765 ** Administrative page used to view or edit the TH1 script that
766 ** defines the "report list" page.
767 */
768 void tktsetup_reportlist(void){
769 static const char zDesc[] =
770 @ Enter HTML with embedded TH1 script that will render the "report list" page
771 ;
@@ -795,10 +809,13 @@
809 return db_get("ticket-report-template", zDefaultReport);
810 }
811
812 /*
813 ** WEBPAGE: tktsetup_rpttplt
814 **
815 ** Administrative page used to view or edit the ticket report
816 ** template.
817 */
818 void tktsetup_rpttplt_page(void){
819 static const char zDesc[] =
820 @ Enter the default ticket report format template. This is the
821 @ template report format that initially appears when creating a
@@ -836,10 +853,13 @@
853 return db_get("ticket-key-template", (char*)zDefaultKey);
854 }
855
856 /*
857 ** WEBPAGE: tktsetup_keytplt
858 **
859 ** Administrative page used to view or edit the Key template
860 ** for tickets.
861 */
862 void tktsetup_keytplt_page(void){
863 static const char zDesc[] =
864 @ Enter the default ticket report color-key template. This is the
865 @ the color-key that initially appears when creating a
@@ -856,10 +876,13 @@
876 );
877 }
878
879 /*
880 ** WEBPAGE: tktsetup_timeline
881 **
882 ** Administrative page used ot configure how tickets are
883 ** rendered on timeline views.
884 */
885 void tktsetup_timeline_page(void){
886 login_check_credentials();
887 if( !g.perm.Setup ){
888 login_needed(0);
889
+5 -10
--- src/update.c
+++ src/update.c
@@ -121,11 +121,10 @@
121121
int nOverwrite = 0; /* Number of unmanaged files overwritten */
122122
int nUpdate = 0; /* Number of changes of any kind */
123123
int width; /* Width of printed comment lines */
124124
Stmt mtimeXfer; /* Statement to transfer mtimes */
125125
const char *zWidth; /* Width option string value */
126
- int isFork;
127126
128127
if( !internalUpdate ){
129128
undo_capture_command_line();
130129
url_proxy_options();
131130
}
@@ -176,14 +175,12 @@
176175
** target as if VERSION were omitted and the --latest flag is present.
177176
*/
178177
latestFlag = 1;
179178
}else{
180179
tid = name_to_typed_rid(g.argv[2],"ci");
181
- if( tid==0 ){
182
- fossil_fatal("no such version: %s", g.argv[2]);
183
- }else if( !is_a_version(tid) ){
184
- fossil_fatal("no such version: %s", g.argv[2]);
180
+ if( tid==0 || !is_a_version(tid) ){
181
+ fossil_fatal("no such check-in: %s", g.argv[2]);
185182
}
186183
}
187184
}
188185
189186
/* If no VERSION is specified on the command-line, then look for a
@@ -519,14 +516,14 @@
519516
}
520517
db_finalize(&q);
521518
db_finalize(&mtimeXfer);
522519
fossil_print("%.79c\n",'-');
523520
if( nUpdate==0 ){
524
- isFork = show_common_info(tid, "checkout:", 1, 0);
521
+ show_common_info(tid, "checkout:", 1, 0);
525522
fossil_print("%-13s None. Already up-to-date\n", "changes:");
526523
}else{
527
- isFork = show_common_info(tid, "updated-to:", 1, 0);
524
+ show_common_info(tid, "updated-to:", 1, 0);
528525
fossil_print("%-13s %d file%s modified.\n", "changes:",
529526
nUpdate, nUpdate>1 ? "s" : "");
530527
}
531528
532529
/* Report on conflicts
@@ -545,10 +542,11 @@
545542
fossil_warning("uncommitted %s against %S.",
546543
zLabel, db_column_text(&q, 0));
547544
nMerge++;
548545
}
549546
db_finalize(&q);
547
+ leaf_ambiguity_warning(tid, tid);
550548
551549
if( nConflict ){
552550
if( internalUpdate ){
553551
internalConflictCnt = nConflict;
554552
nConflict = 0;
@@ -561,13 +559,10 @@
561559
nOverwrite);
562560
}
563561
if( nMerge ){
564562
fossil_warning("WARNING: %d uncommitted prior merges", nMerge);
565563
}
566
- if( isFork ){
567
- fossil_warning("WARNING: ambiguous branch, please do a \"fossil merge\"");
568
- }
569564
}
570565
571566
/*
572567
** Clean up the mid and pid VFILE entries. Then commit the changes.
573568
*/
574569
--- src/update.c
+++ src/update.c
@@ -121,11 +121,10 @@
121 int nOverwrite = 0; /* Number of unmanaged files overwritten */
122 int nUpdate = 0; /* Number of changes of any kind */
123 int width; /* Width of printed comment lines */
124 Stmt mtimeXfer; /* Statement to transfer mtimes */
125 const char *zWidth; /* Width option string value */
126 int isFork;
127
128 if( !internalUpdate ){
129 undo_capture_command_line();
130 url_proxy_options();
131 }
@@ -176,14 +175,12 @@
176 ** target as if VERSION were omitted and the --latest flag is present.
177 */
178 latestFlag = 1;
179 }else{
180 tid = name_to_typed_rid(g.argv[2],"ci");
181 if( tid==0 ){
182 fossil_fatal("no such version: %s", g.argv[2]);
183 }else if( !is_a_version(tid) ){
184 fossil_fatal("no such version: %s", g.argv[2]);
185 }
186 }
187 }
188
189 /* If no VERSION is specified on the command-line, then look for a
@@ -519,14 +516,14 @@
519 }
520 db_finalize(&q);
521 db_finalize(&mtimeXfer);
522 fossil_print("%.79c\n",'-');
523 if( nUpdate==0 ){
524 isFork = show_common_info(tid, "checkout:", 1, 0);
525 fossil_print("%-13s None. Already up-to-date\n", "changes:");
526 }else{
527 isFork = show_common_info(tid, "updated-to:", 1, 0);
528 fossil_print("%-13s %d file%s modified.\n", "changes:",
529 nUpdate, nUpdate>1 ? "s" : "");
530 }
531
532 /* Report on conflicts
@@ -545,10 +542,11 @@
545 fossil_warning("uncommitted %s against %S.",
546 zLabel, db_column_text(&q, 0));
547 nMerge++;
548 }
549 db_finalize(&q);
 
550
551 if( nConflict ){
552 if( internalUpdate ){
553 internalConflictCnt = nConflict;
554 nConflict = 0;
@@ -561,13 +559,10 @@
561 nOverwrite);
562 }
563 if( nMerge ){
564 fossil_warning("WARNING: %d uncommitted prior merges", nMerge);
565 }
566 if( isFork ){
567 fossil_warning("WARNING: ambiguous branch, please do a \"fossil merge\"");
568 }
569 }
570
571 /*
572 ** Clean up the mid and pid VFILE entries. Then commit the changes.
573 */
574
--- src/update.c
+++ src/update.c
@@ -121,11 +121,10 @@
121 int nOverwrite = 0; /* Number of unmanaged files overwritten */
122 int nUpdate = 0; /* Number of changes of any kind */
123 int width; /* Width of printed comment lines */
124 Stmt mtimeXfer; /* Statement to transfer mtimes */
125 const char *zWidth; /* Width option string value */
 
126
127 if( !internalUpdate ){
128 undo_capture_command_line();
129 url_proxy_options();
130 }
@@ -176,14 +175,12 @@
175 ** target as if VERSION were omitted and the --latest flag is present.
176 */
177 latestFlag = 1;
178 }else{
179 tid = name_to_typed_rid(g.argv[2],"ci");
180 if( tid==0 || !is_a_version(tid) ){
181 fossil_fatal("no such check-in: %s", g.argv[2]);
 
 
182 }
183 }
184 }
185
186 /* If no VERSION is specified on the command-line, then look for a
@@ -519,14 +516,14 @@
516 }
517 db_finalize(&q);
518 db_finalize(&mtimeXfer);
519 fossil_print("%.79c\n",'-');
520 if( nUpdate==0 ){
521 show_common_info(tid, "checkout:", 1, 0);
522 fossil_print("%-13s None. Already up-to-date\n", "changes:");
523 }else{
524 show_common_info(tid, "updated-to:", 1, 0);
525 fossil_print("%-13s %d file%s modified.\n", "changes:",
526 nUpdate, nUpdate>1 ? "s" : "");
527 }
528
529 /* Report on conflicts
@@ -545,10 +542,11 @@
542 fossil_warning("uncommitted %s against %S.",
543 zLabel, db_column_text(&q, 0));
544 nMerge++;
545 }
546 db_finalize(&q);
547 leaf_ambiguity_warning(tid, tid);
548
549 if( nConflict ){
550 if( internalUpdate ){
551 internalConflictCnt = nConflict;
552 nConflict = 0;
@@ -561,13 +559,10 @@
559 nOverwrite);
560 }
561 if( nMerge ){
562 fossil_warning("WARNING: %d uncommitted prior merges", nMerge);
563 }
 
 
 
564 }
565
566 /*
567 ** Clean up the mid and pid VFILE entries. Then commit the changes.
568 */
569
+9 -4
--- src/user.c
+++ src/user.c
@@ -410,17 +410,22 @@
410410
}
411411
412412
/*
413413
** WEBPAGE: access_log
414414
**
415
-** y=N 1: success only. 2: failure only. 3: both
416
-** n=N Number of entries to show
417
-** o=N Skip this many entries
415
+** Show login attempts, including timestamp and IP address.
416
+** Requires Admin privileges.
417
+**
418
+** Query parameters:
419
+**
420
+** y=N 1: success only. 2: failure only. 3: both (default: 3)
421
+** n=N Number of entries to show (default: 200)
422
+** o=N Skip this many entries (default: 0)
418423
*/
419424
void access_log_page(void){
420425
int y = atoi(PD("y","3"));
421
- int n = atoi(PD("n","50"));
426
+ int n = atoi(PD("n","200"));
422427
int skip = atoi(PD("o","0"));
423428
Blob sql;
424429
Stmt q;
425430
int cnt = 0;
426431
int rc;
427432
--- src/user.c
+++ src/user.c
@@ -410,17 +410,22 @@
410 }
411
412 /*
413 ** WEBPAGE: access_log
414 **
415 ** y=N 1: success only. 2: failure only. 3: both
416 ** n=N Number of entries to show
417 ** o=N Skip this many entries
 
 
 
 
 
418 */
419 void access_log_page(void){
420 int y = atoi(PD("y","3"));
421 int n = atoi(PD("n","50"));
422 int skip = atoi(PD("o","0"));
423 Blob sql;
424 Stmt q;
425 int cnt = 0;
426 int rc;
427
--- src/user.c
+++ src/user.c
@@ -410,17 +410,22 @@
410 }
411
412 /*
413 ** WEBPAGE: access_log
414 **
415 ** Show login attempts, including timestamp and IP address.
416 ** Requires Admin privileges.
417 **
418 ** Query parameters:
419 **
420 ** y=N 1: success only. 2: failure only. 3: both (default: 3)
421 ** n=N Number of entries to show (default: 200)
422 ** o=N Skip this many entries (default: 0)
423 */
424 void access_log_page(void){
425 int y = atoi(PD("y","3"));
426 int n = atoi(PD("n","200"));
427 int skip = atoi(PD("o","0"));
428 Blob sql;
429 Stmt q;
430 int cnt = 0;
431 int rc;
432
--- src/vfile.c
+++ src/vfile.c
@@ -916,10 +916,15 @@
916916
md5sum_finish(pOut);
917917
}
918918
919919
/*
920920
** COMMAND: test-agg-cksum
921
+**
922
+** Display the aggregate checksum for content computed in several
923
+** different ways. The aggregate checksum is used during "fossil commit"
924
+** to double-check that the information about to be committed to the
925
+** repository exactly matches the information currently in the check-out.
921926
*/
922927
void test_agg_cksum_cmd(void){
923928
int vid;
924929
Blob hash, hash2;
925930
db_must_be_within_tree();
926931
--- src/vfile.c
+++ src/vfile.c
@@ -916,10 +916,15 @@
916 md5sum_finish(pOut);
917 }
918
919 /*
920 ** COMMAND: test-agg-cksum
 
 
 
 
 
921 */
922 void test_agg_cksum_cmd(void){
923 int vid;
924 Blob hash, hash2;
925 db_must_be_within_tree();
926
--- src/vfile.c
+++ src/vfile.c
@@ -916,10 +916,15 @@
916 md5sum_finish(pOut);
917 }
918
919 /*
920 ** COMMAND: test-agg-cksum
921 **
922 ** Display the aggregate checksum for content computed in several
923 ** different ways. The aggregate checksum is used during "fossil commit"
924 ** to double-check that the information about to be committed to the
925 ** repository exactly matches the information currently in the check-out.
926 */
927 void test_agg_cksum_cmd(void){
928 int vid;
929 Blob hash, hash2;
930 db_must_be_within_tree();
931
+9
--- src/wiki.c
+++ src/wiki.c
@@ -76,10 +76,13 @@
7676
7777
/*
7878
** WEBPAGE: home
7979
** WEBPAGE: index
8080
** WEBPAGE: not_found
81
+**
82
+** The /home, /index, and /not_found pages all redirect to the homepage
83
+** configured by the administrator.
8184
*/
8285
void home_page(void){
8386
char *zPageName = db_get("project-name",0);
8487
char *zIndexPage = db_get("index-page",0);
8588
login_check_credentials();
@@ -458,10 +461,12 @@
458461
}
459462
460463
/*
461464
** WEBPAGE: wikiedit
462465
** URL: /wikiedit?name=PAGENAME
466
+**
467
+** Edit a wiki page.
463468
*/
464469
void wikiedit_page(void){
465470
char *zTag;
466471
int rid = 0;
467472
int isSandbox;
@@ -704,10 +709,12 @@
704709
}
705710
706711
/*
707712
** WEBPAGE: wikiappend
708713
** URL: /wikiappend?name=PAGENAME&mimetype=MIMETYPE
714
+**
715
+** Append text to the end of a wiki page.
709716
*/
710717
void wikiappend_page(void){
711718
char *zTag;
712719
int rid = 0;
713720
int isSandbox;
@@ -995,10 +1002,12 @@
9951002
style_footer();
9961003
}
9971004
9981005
/*
9991006
** WEBPAGE: wiki_rules
1007
+**
1008
+** Show the formatting rules for Fossil wiki.
10001009
*/
10011010
void wikirules_page(void){
10021011
style_header("Wiki Formatting Rules");
10031012
@ <h2>Formatting Rule Summary</h2>
10041013
@ <ol>
10051014
--- src/wiki.c
+++ src/wiki.c
@@ -76,10 +76,13 @@
76
77 /*
78 ** WEBPAGE: home
79 ** WEBPAGE: index
80 ** WEBPAGE: not_found
 
 
 
81 */
82 void home_page(void){
83 char *zPageName = db_get("project-name",0);
84 char *zIndexPage = db_get("index-page",0);
85 login_check_credentials();
@@ -458,10 +461,12 @@
458 }
459
460 /*
461 ** WEBPAGE: wikiedit
462 ** URL: /wikiedit?name=PAGENAME
 
 
463 */
464 void wikiedit_page(void){
465 char *zTag;
466 int rid = 0;
467 int isSandbox;
@@ -704,10 +709,12 @@
704 }
705
706 /*
707 ** WEBPAGE: wikiappend
708 ** URL: /wikiappend?name=PAGENAME&mimetype=MIMETYPE
 
 
709 */
710 void wikiappend_page(void){
711 char *zTag;
712 int rid = 0;
713 int isSandbox;
@@ -995,10 +1002,12 @@
995 style_footer();
996 }
997
998 /*
999 ** WEBPAGE: wiki_rules
 
 
1000 */
1001 void wikirules_page(void){
1002 style_header("Wiki Formatting Rules");
1003 @ <h2>Formatting Rule Summary</h2>
1004 @ <ol>
1005
--- src/wiki.c
+++ src/wiki.c
@@ -76,10 +76,13 @@
76
77 /*
78 ** WEBPAGE: home
79 ** WEBPAGE: index
80 ** WEBPAGE: not_found
81 **
82 ** The /home, /index, and /not_found pages all redirect to the homepage
83 ** configured by the administrator.
84 */
85 void home_page(void){
86 char *zPageName = db_get("project-name",0);
87 char *zIndexPage = db_get("index-page",0);
88 login_check_credentials();
@@ -458,10 +461,12 @@
461 }
462
463 /*
464 ** WEBPAGE: wikiedit
465 ** URL: /wikiedit?name=PAGENAME
466 **
467 ** Edit a wiki page.
468 */
469 void wikiedit_page(void){
470 char *zTag;
471 int rid = 0;
472 int isSandbox;
@@ -704,10 +709,12 @@
709 }
710
711 /*
712 ** WEBPAGE: wikiappend
713 ** URL: /wikiappend?name=PAGENAME&mimetype=MIMETYPE
714 **
715 ** Append text to the end of a wiki page.
716 */
717 void wikiappend_page(void){
718 char *zTag;
719 int rid = 0;
720 int isSandbox;
@@ -995,10 +1002,12 @@
1002 style_footer();
1003 }
1004
1005 /*
1006 ** WEBPAGE: wiki_rules
1007 **
1008 ** Show the formatting rules for Fossil wiki.
1009 */
1010 void wikirules_page(void){
1011 style_header("Wiki Formatting Rules");
1012 @ <h2>Formatting Rule Summary</h2>
1013 @ <ol>
1014
--- src/wikiformat.c
+++ src/wikiformat.c
@@ -2094,10 +2094,13 @@
20942094
if( iCur ) blob_append(pOut, "\n", 1);
20952095
}
20962096
20972097
/*
20982098
** COMMAND: test-html-tidy
2099
+**
2100
+** Run the htmlTidy() routine on the content of all files named on
2101
+** the command-line and write the results to standard output.
20992102
*/
21002103
void test_html_tidy(void){
21012104
Blob in, out;
21022105
int i;
21032106
@@ -2212,10 +2215,19 @@
22122215
if( nNL==0 ) blob_append(pOut, "\n", 1);
22132216
}
22142217
22152218
/*
22162219
** COMMAND: test-html-to-text
2220
+**
2221
+** Usage: %fossil test-html-to-text FILE ...
2222
+**
2223
+** Read all files named on the command-line. Convert the file
2224
+** content from HTML to text and write the results on standard
2225
+** output.
2226
+**
2227
+** This command is intended as a test and debug interface for
2228
+** the html_to_plaintext() routine.
22172229
*/
22182230
void test_html_to_text(void){
22192231
Blob in, out;
22202232
int i;
22212233
22222234
--- src/wikiformat.c
+++ src/wikiformat.c
@@ -2094,10 +2094,13 @@
2094 if( iCur ) blob_append(pOut, "\n", 1);
2095 }
2096
2097 /*
2098 ** COMMAND: test-html-tidy
 
 
 
2099 */
2100 void test_html_tidy(void){
2101 Blob in, out;
2102 int i;
2103
@@ -2212,10 +2215,19 @@
2212 if( nNL==0 ) blob_append(pOut, "\n", 1);
2213 }
2214
2215 /*
2216 ** COMMAND: test-html-to-text
 
 
 
 
 
 
 
 
 
2217 */
2218 void test_html_to_text(void){
2219 Blob in, out;
2220 int i;
2221
2222
--- src/wikiformat.c
+++ src/wikiformat.c
@@ -2094,10 +2094,13 @@
2094 if( iCur ) blob_append(pOut, "\n", 1);
2095 }
2096
2097 /*
2098 ** COMMAND: test-html-tidy
2099 **
2100 ** Run the htmlTidy() routine on the content of all files named on
2101 ** the command-line and write the results to standard output.
2102 */
2103 void test_html_tidy(void){
2104 Blob in, out;
2105 int i;
2106
@@ -2212,10 +2215,19 @@
2215 if( nNL==0 ) blob_append(pOut, "\n", 1);
2216 }
2217
2218 /*
2219 ** COMMAND: test-html-to-text
2220 **
2221 ** Usage: %fossil test-html-to-text FILE ...
2222 **
2223 ** Read all files named on the command-line. Convert the file
2224 ** content from HTML to text and write the results on standard
2225 ** output.
2226 **
2227 ** This command is intended as a test and debug interface for
2228 ** the html_to_plaintext() routine.
2229 */
2230 void test_html_to_text(void){
2231 Blob in, out;
2232 int i;
2233
2234
+1 -1
--- src/xfer.c
+++ src/xfer.c
@@ -1974,9 +1974,9 @@
19741974
content_enable_dephantomize(1);
19751975
db_end_transaction(0);
19761976
}
19771977
if( (syncFlags & SYNC_CLONE)==0 && fossil_any_has_fork(g.rcvid) ){
19781978
fossil_warning("***** WARNING: an ambiguous branch has occurred *****\n"
1979
- "Use \"fossil info\" for more details.");
1979
+ "use \"fossil leaves -multiple\" for more details.");
19801980
}
19811981
return nErr;
19821982
}
19831983
--- src/xfer.c
+++ src/xfer.c
@@ -1974,9 +1974,9 @@
1974 content_enable_dephantomize(1);
1975 db_end_transaction(0);
1976 }
1977 if( (syncFlags & SYNC_CLONE)==0 && fossil_any_has_fork(g.rcvid) ){
1978 fossil_warning("***** WARNING: an ambiguous branch has occurred *****\n"
1979 "Use \"fossil info\" for more details.");
1980 }
1981 return nErr;
1982 }
1983
--- src/xfer.c
+++ src/xfer.c
@@ -1974,9 +1974,9 @@
1974 content_enable_dephantomize(1);
1975 db_end_transaction(0);
1976 }
1977 if( (syncFlags & SYNC_CLONE)==0 && fossil_any_has_fork(g.rcvid) ){
1978 fossil_warning("***** WARNING: an ambiguous branch has occurred *****\n"
1979 "use \"fossil leaves -multiple\" for more details.");
1980 }
1981 return nErr;
1982 }
1983
+1 -1
--- src/xfer.c
+++ src/xfer.c
@@ -1974,9 +1974,9 @@
19741974
content_enable_dephantomize(1);
19751975
db_end_transaction(0);
19761976
}
19771977
if( (syncFlags & SYNC_CLONE)==0 && fossil_any_has_fork(g.rcvid) ){
19781978
fossil_warning("***** WARNING: an ambiguous branch has occurred *****\n"
1979
- "Use \"fossil info\" for more details.");
1979
+ "use \"fossil leaves -multiple\" for more details.");
19801980
}
19811981
return nErr;
19821982
}
19831983
--- src/xfer.c
+++ src/xfer.c
@@ -1974,9 +1974,9 @@
1974 content_enable_dephantomize(1);
1975 db_end_transaction(0);
1976 }
1977 if( (syncFlags & SYNC_CLONE)==0 && fossil_any_has_fork(g.rcvid) ){
1978 fossil_warning("***** WARNING: an ambiguous branch has occurred *****\n"
1979 "Use \"fossil info\" for more details.");
1980 }
1981 return nErr;
1982 }
1983
--- src/xfer.c
+++ src/xfer.c
@@ -1974,9 +1974,9 @@
1974 content_enable_dephantomize(1);
1975 db_end_transaction(0);
1976 }
1977 if( (syncFlags & SYNC_CLONE)==0 && fossil_any_has_fork(g.rcvid) ){
1978 fossil_warning("***** WARNING: an ambiguous branch has occurred *****\n"
1979 "use \"fossil leaves -multiple\" for more details.");
1980 }
1981 return nErr;
1982 }
1983
+8 -1
--- src/xfersetup.c
+++ src/xfersetup.c
@@ -21,12 +21,12 @@
2121
#include "config.h"
2222
#include "xfersetup.h"
2323
#include <assert.h>
2424
2525
/*
26
-** Main sub-menu for configuring the transfer system.
2726
** WEBPAGE: xfersetup
27
+** Main sub-menu for configuring the transfer system.
2828
*/
2929
void xfersetup_page(void){
3030
login_check_credentials();
3131
if( !g.perm.Setup ){
3232
login_needed(0);
@@ -157,10 +157,12 @@
157157
158158
static const char *zDefaultXferCommon = 0;
159159
160160
/*
161161
** WEBPAGE: xfersetup_com
162
+** View or edit the TH1 script that runs prior to receiving a
163
+** transfer.
162164
*/
163165
void xfersetup_com_page(void){
164166
static const char zDesc[] =
165167
@ Enter TH1 script that initializes variables prior to running
166168
@ any of the transfer request scripts.
@@ -178,10 +180,11 @@
178180
179181
static const char *zDefaultXferPush = 0;
180182
181183
/*
182184
** WEBPAGE: xfersetup_push
185
+** View or edit the TH1 script that runs after receiving a "push".
183186
*/
184187
void xfersetup_push_page(void){
185188
static const char zDesc[] =
186189
@ Enter TH1 script that runs after processing <strong>push</strong>
187190
@ transfer requests.
@@ -199,10 +202,12 @@
199202
200203
static const char *zDefaultXferCommit = 0;
201204
202205
/*
203206
** WEBPAGE: xfersetup_commit
207
+** View or edit the TH1 script that runs when a transfer commit
208
+** is processed.
204209
*/
205210
void xfersetup_commit_page(void){
206211
static const char zDesc[] =
207212
@ Enter TH1 script that runs when a commit is processed.
208213
;
@@ -219,10 +224,12 @@
219224
220225
static const char *zDefaultXferTicket = 0;
221226
222227
/*
223228
** WEBPAGE: xfersetup_ticket
229
+** View or edit the TH1 script that runs when a ticket change artifact
230
+** is processed during a transfer.
224231
*/
225232
void xfersetup_ticket_page(void){
226233
static const char zDesc[] =
227234
@ Enter TH1 script that runs when a ticket change is processed.
228235
;
229236
--- src/xfersetup.c
+++ src/xfersetup.c
@@ -21,12 +21,12 @@
21 #include "config.h"
22 #include "xfersetup.h"
23 #include <assert.h>
24
25 /*
26 ** Main sub-menu for configuring the transfer system.
27 ** WEBPAGE: xfersetup
 
28 */
29 void xfersetup_page(void){
30 login_check_credentials();
31 if( !g.perm.Setup ){
32 login_needed(0);
@@ -157,10 +157,12 @@
157
158 static const char *zDefaultXferCommon = 0;
159
160 /*
161 ** WEBPAGE: xfersetup_com
 
 
162 */
163 void xfersetup_com_page(void){
164 static const char zDesc[] =
165 @ Enter TH1 script that initializes variables prior to running
166 @ any of the transfer request scripts.
@@ -178,10 +180,11 @@
178
179 static const char *zDefaultXferPush = 0;
180
181 /*
182 ** WEBPAGE: xfersetup_push
 
183 */
184 void xfersetup_push_page(void){
185 static const char zDesc[] =
186 @ Enter TH1 script that runs after processing <strong>push</strong>
187 @ transfer requests.
@@ -199,10 +202,12 @@
199
200 static const char *zDefaultXferCommit = 0;
201
202 /*
203 ** WEBPAGE: xfersetup_commit
 
 
204 */
205 void xfersetup_commit_page(void){
206 static const char zDesc[] =
207 @ Enter TH1 script that runs when a commit is processed.
208 ;
@@ -219,10 +224,12 @@
219
220 static const char *zDefaultXferTicket = 0;
221
222 /*
223 ** WEBPAGE: xfersetup_ticket
 
 
224 */
225 void xfersetup_ticket_page(void){
226 static const char zDesc[] =
227 @ Enter TH1 script that runs when a ticket change is processed.
228 ;
229
--- src/xfersetup.c
+++ src/xfersetup.c
@@ -21,12 +21,12 @@
21 #include "config.h"
22 #include "xfersetup.h"
23 #include <assert.h>
24
25 /*
 
26 ** WEBPAGE: xfersetup
27 ** Main sub-menu for configuring the transfer system.
28 */
29 void xfersetup_page(void){
30 login_check_credentials();
31 if( !g.perm.Setup ){
32 login_needed(0);
@@ -157,10 +157,12 @@
157
158 static const char *zDefaultXferCommon = 0;
159
160 /*
161 ** WEBPAGE: xfersetup_com
162 ** View or edit the TH1 script that runs prior to receiving a
163 ** transfer.
164 */
165 void xfersetup_com_page(void){
166 static const char zDesc[] =
167 @ Enter TH1 script that initializes variables prior to running
168 @ any of the transfer request scripts.
@@ -178,10 +180,11 @@
180
181 static const char *zDefaultXferPush = 0;
182
183 /*
184 ** WEBPAGE: xfersetup_push
185 ** View or edit the TH1 script that runs after receiving a "push".
186 */
187 void xfersetup_push_page(void){
188 static const char zDesc[] =
189 @ Enter TH1 script that runs after processing <strong>push</strong>
190 @ transfer requests.
@@ -199,10 +202,12 @@
202
203 static const char *zDefaultXferCommit = 0;
204
205 /*
206 ** WEBPAGE: xfersetup_commit
207 ** View or edit the TH1 script that runs when a transfer commit
208 ** is processed.
209 */
210 void xfersetup_commit_page(void){
211 static const char zDesc[] =
212 @ Enter TH1 script that runs when a commit is processed.
213 ;
@@ -219,10 +224,12 @@
224
225 static const char *zDefaultXferTicket = 0;
226
227 /*
228 ** WEBPAGE: xfersetup_ticket
229 ** View or edit the TH1 script that runs when a ticket change artifact
230 ** is processed during a transfer.
231 */
232 void xfersetup_ticket_page(void){
233 static const char zDesc[] =
234 @ Enter TH1 script that runs when a ticket change is processed.
235 ;
236
--- www/changes.wiki
+++ www/changes.wiki
@@ -11,11 +11,12 @@
1111
or HTML.
1212
* Formally translate TH1 to Tcl return codes and vice-versa, where
1313
necessary, in the Tcl integration subsystem.
1414
* Better fork detection on [/help?cmd=update|fossil update],
1515
[/help?cmd=status|fossil status] and related commands.
16
- * Add [/help?cmd=forks|fossil forks], for finding all forks.
16
+ * Add [/help?cmd=leaves|fossil leaves -multiple], for finding multiple
17
+ leaves on the same branch.
1718
1819
<h2>Changes for Version 1.32 (2015-03-14)</h2>
1920
* When creating a new repository using [/help?cmd=init|fossil init], ensure
2021
that the new repository is fully compatible with historical versions of
2122
Fossil by having a valid manifest as RID 1.
2223
--- www/changes.wiki
+++ www/changes.wiki
@@ -11,11 +11,12 @@
11 or HTML.
12 * Formally translate TH1 to Tcl return codes and vice-versa, where
13 necessary, in the Tcl integration subsystem.
14 * Better fork detection on [/help?cmd=update|fossil update],
15 [/help?cmd=status|fossil status] and related commands.
16 * Add [/help?cmd=forks|fossil forks], for finding all forks.
 
17
18 <h2>Changes for Version 1.32 (2015-03-14)</h2>
19 * When creating a new repository using [/help?cmd=init|fossil init], ensure
20 that the new repository is fully compatible with historical versions of
21 Fossil by having a valid manifest as RID 1.
22
--- www/changes.wiki
+++ www/changes.wiki
@@ -11,11 +11,12 @@
11 or HTML.
12 * Formally translate TH1 to Tcl return codes and vice-versa, where
13 necessary, in the Tcl integration subsystem.
14 * Better fork detection on [/help?cmd=update|fossil update],
15 [/help?cmd=status|fossil status] and related commands.
16 * Add [/help?cmd=leaves|fossil leaves -multiple], for finding multiple
17 leaves on the same branch.
18
19 <h2>Changes for Version 1.32 (2015-03-14)</h2>
20 * When creating a new repository using [/help?cmd=init|fossil init], ensure
21 that the new repository is fully compatible with historical versions of
22 Fossil by having a valid manifest as RID 1.
23

Keyboard Shortcuts

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