Fossil SCM
merge trunk
Commit
2dc4d98e3baad8ba06763b87fc7a2eaca64c978f
Parent
76cd08baf6eac20…
40 files changed
+8
-6
+22
+4
-1
+18
+2
-1
+5
+1
+1
+66
-24
+66
-24
+17
-1
+3
-1
+10
-3
+4
+1
+19
-31
+19
-31
+87
+2
-2
+4
-2
+18
-5
+9
-1
+33
-7
+10
-1
+102
-62
+6
+6
-2
+5
+37
-2
+1
-1
+24
-1
+5
-10
+9
-4
+5
+9
+12
+1
-1
+1
-1
+8
-1
+2
-1
~
src/attach.c
~
src/blob.c
~
src/branch.c
~
src/browse.c
~
src/cache.c
~
src/captcha.c
~
src/checkin.c
~
src/checkin.c
~
src/descendants.c
~
src/descendants.c
~
src/diff.c
~
src/diffcmd.c
~
src/doc.c
~
src/encode.c
~
src/finfo.c
~
src/info.c
~
src/info.c
~
src/leaf.c
~
src/login.c
~
src/main.c
~
src/report.c
~
src/search.c
~
src/setup.c
~
src/shun.c
~
src/sitemap.c
~
src/skins.c
~
src/style.c
~
src/tag.c
~
src/timeline.c
~
src/tkt.c
~
src/tktsetup.c
~
src/update.c
~
src/user.c
~
src/vfile.c
~
src/wiki.c
~
src/wikiformat.c
~
src/xfer.c
~
src/xfer.c
~
src/xfersetup.c
~
www/changes.wiki
+8
-6
| --- src/attach.c | ||
| +++ src/attach.c | ||
| @@ -21,18 +21,18 @@ | ||
| 21 | 21 | #include "attach.h" |
| 22 | 22 | #include <assert.h> |
| 23 | 23 | |
| 24 | 24 | /* |
| 25 | 25 | ** WEBPAGE: attachlist |
| 26 | +** List attachments. | |
| 26 | 27 | ** |
| 27 | 28 | ** tkt=TICKETUUID |
| 28 | 29 | ** page=WIKIPAGE |
| 29 | 30 | ** |
| 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. | |
| 34 | 34 | ** TICKETUUID must be complete |
| 35 | 35 | */ |
| 36 | 36 | void attachlist_page(void){ |
| 37 | 37 | const char *zPage = P("page"); |
| 38 | 38 | const char *zTkt = P("tkt"); |
| @@ -134,16 +134,18 @@ | ||
| 134 | 134 | /* |
| 135 | 135 | ** WEBPAGE: attachdownload |
| 136 | 136 | ** WEBPAGE: attachimage |
| 137 | 137 | ** WEBPAGE: attachview |
| 138 | 138 | ** |
| 139 | +** Download or display an attachment. | |
| 140 | +** Query parameters: | |
| 141 | +** | |
| 139 | 142 | ** tkt=TICKETUUID |
| 140 | 143 | ** page=WIKIPAGE |
| 141 | 144 | ** file=FILENAME |
| 142 | 145 | ** attachid=ID |
| 143 | 146 | ** |
| 144 | -** List attachments. | |
| 145 | 147 | */ |
| 146 | 148 | void attachview_page(void){ |
| 147 | 149 | const char *zPage = P("page"); |
| 148 | 150 | const char *zTkt = P("tkt"); |
| 149 | 151 | const char *zFile = P("file"); |
| @@ -223,16 +225,16 @@ | ||
| 223 | 225 | } |
| 224 | 226 | |
| 225 | 227 | |
| 226 | 228 | /* |
| 227 | 229 | ** WEBPAGE: attachadd |
| 230 | +** Add a new attachment. | |
| 228 | 231 | ** |
| 229 | 232 | ** tkt=TICKETUUID |
| 230 | 233 | ** page=WIKIPAGE |
| 231 | 234 | ** from=URL |
| 232 | 235 | ** |
| 233 | -** Add a new attachment. | |
| 234 | 236 | */ |
| 235 | 237 | void attachadd_page(void){ |
| 236 | 238 | const char *zPage = P("page"); |
| 237 | 239 | const char *zTkt = P("tkt"); |
| 238 | 240 | const char *zFrom = P("from"); |
| 239 | 241 |
| --- 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 @@ | ||
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | |
| 121 | 121 | /* |
| 122 | 122 | ** COMMAND: test-isspace |
| 123 | +** | |
| 124 | +** Verify that the fossil_isspace() routine is working correctly but | |
| 125 | +** testing it on all possible inputs. | |
| 123 | 126 | */ |
| 124 | 127 | void isspace_cmd(void){ |
| 125 | 128 | int i; |
| 126 | 129 | for(i=0; i<=255; i++){ |
| 127 | 130 | if( i==' ' || i=='\n' || i=='\t' || i=='\v' |
| @@ -884,10 +887,16 @@ | ||
| 884 | 887 | blob_resize(pOut, nOut2+4); |
| 885 | 888 | } |
| 886 | 889 | |
| 887 | 890 | /* |
| 888 | 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. | |
| 889 | 898 | */ |
| 890 | 899 | void compress_cmd(void){ |
| 891 | 900 | Blob f; |
| 892 | 901 | if( g.argc!=4 ) usage("INPUTFILE OUTPUTFILE"); |
| 893 | 902 | blob_read_from_file(&f, g.argv[2]); |
| @@ -936,10 +945,17 @@ | ||
| 936 | 945 | *pOut = temp; |
| 937 | 946 | } |
| 938 | 947 | |
| 939 | 948 | /* |
| 940 | 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. | |
| 941 | 957 | */ |
| 942 | 958 | void compress2_cmd(void){ |
| 943 | 959 | Blob f1, f2; |
| 944 | 960 | if( g.argc!=5 ) usage("INPUTFILE1 INPUTFILE2 OUTPUTFILE"); |
| 945 | 961 | blob_read_from_file(&f1, g.argv[2]); |
| @@ -982,10 +998,16 @@ | ||
| 982 | 998 | return 0; |
| 983 | 999 | } |
| 984 | 1000 | |
| 985 | 1001 | /* |
| 986 | 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. | |
| 987 | 1009 | */ |
| 988 | 1010 | void uncompress_cmd(void){ |
| 989 | 1011 | Blob f; |
| 990 | 1012 | if( g.argc!=4 ) usage("INPUTFILE OUTPUTFILE"); |
| 991 | 1013 | blob_read_from_file(&f, g.argv[2]); |
| 992 | 1014 |
| --- 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 @@ | ||
| 386 | 386 | style_footer(); |
| 387 | 387 | } |
| 388 | 388 | |
| 389 | 389 | /* |
| 390 | 390 | ** 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 | +** | |
| 392 | 395 | ** Query parameters: |
| 393 | 396 | ** |
| 394 | 397 | ** all Show all branches |
| 395 | 398 | ** closed Show only closed branches |
| 396 | 399 | ** open Show only open branches (default behavior) |
| 397 | 400 |
| --- 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 @@ | ||
| 105 | 105 | |
| 106 | 106 | |
| 107 | 107 | /* |
| 108 | 108 | ** WEBPAGE: dir |
| 109 | 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 | +** | |
| 110 | 115 | ** Query parameters: |
| 111 | 116 | ** |
| 112 | 117 | ** name=PATH Directory to display. Optional. Top-level if missing |
| 113 | 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 | |
| 114 | 121 | */ |
| 115 | 122 | void page_dir(void){ |
| 116 | 123 | char *zD = fossil_strdup(P("name")); |
| 117 | 124 | int nD = zD ? strlen(zD)+1 : 0; |
| 118 | 125 | int mxLen; |
| @@ -503,13 +510,21 @@ | ||
| 503 | 510 | } |
| 504 | 511 | |
| 505 | 512 | |
| 506 | 513 | /* |
| 507 | 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. | |
| 508 | 522 | ** |
| 509 | 523 | ** Query parameters: |
| 510 | 524 | ** |
| 525 | +** type=tree Required to prevent use of /dir format | |
| 511 | 526 | ** name=PATH Directory to display. Optional |
| 512 | 527 | ** ci=LABEL Show only files in this check-in. Optional. |
| 513 | 528 | ** re=REGEXP Show only files matching REGEXP. Optional. |
| 514 | 529 | ** expand Begin with the tree fully expanded. |
| 515 | 530 | ** nofiles Show directories (folders) only. Omit files. |
| @@ -985,10 +1000,13 @@ | ||
| 985 | 1000 | db_finalize(&q); |
| 986 | 1001 | } |
| 987 | 1002 | |
| 988 | 1003 | /* |
| 989 | 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. | |
| 990 | 1008 | ** |
| 991 | 1009 | ** Parameters: |
| 992 | 1010 | ** name=VERSION Selects the check-in version (default=tip). |
| 993 | 1011 | ** glob=STRING Only shows files matching this glob pattern |
| 994 | 1012 | ** (e.g. *.c or *.txt). |
| 995 | 1013 |
| --- 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 @@ | ||
| 330 | 330 | } |
| 331 | 331 | |
| 332 | 332 | /* |
| 333 | 333 | ** WEBPAGE: cachestat |
| 334 | 334 | ** |
| 335 | -** Show information about the webpage cache | |
| 335 | +** Show information about the webpage cache. Requires Admin privilege. | |
| 336 | 336 | */ |
| 337 | 337 | void cache_page(void){ |
| 338 | 338 | sqlite3 *db; |
| 339 | 339 | sqlite3_stmt *pStmt; |
| 340 | 340 | char zBuf[100]; |
| @@ -380,10 +380,11 @@ | ||
| 380 | 380 | ** |
| 381 | 381 | ** Usage: /cacheget?key=KEY |
| 382 | 382 | ** |
| 383 | 383 | ** Download a single entry for the cache, identified by KEY. |
| 384 | 384 | ** This page is normally a hyperlink from the /cachestat page. |
| 385 | +** Requires Admin privilege. | |
| 385 | 386 | */ |
| 386 | 387 | void cache_getpage(void){ |
| 387 | 388 | const char *zKey; |
| 388 | 389 | Blob content; |
| 389 | 390 | |
| 390 | 391 |
| --- 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 |
+5
| --- src/captcha.c | ||
| +++ src/captcha.c | ||
| @@ -414,10 +414,12 @@ | ||
| 414 | 414 | } |
| 415 | 415 | #endif /* CAPTCHA==3 */ |
| 416 | 416 | |
| 417 | 417 | /* |
| 418 | 418 | ** COMMAND: test-captcha |
| 419 | +** | |
| 420 | +** Render an ASCII-art captcha for numbers given on the command line. | |
| 419 | 421 | */ |
| 420 | 422 | void test_captcha(void){ |
| 421 | 423 | int i; |
| 422 | 424 | unsigned int v; |
| 423 | 425 | char *z; |
| @@ -551,10 +553,13 @@ | ||
| 551 | 553 | @ </td></tr></table></div> |
| 552 | 554 | } |
| 553 | 555 | |
| 554 | 556 | /* |
| 555 | 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. | |
| 556 | 561 | */ |
| 557 | 562 | void captcha_test(void){ |
| 558 | 563 | const char *zPw = P("name"); |
| 559 | 564 | if( zPw==0 || zPw[0]==0 ){ |
| 560 | 565 | u64 x; |
| 561 | 566 |
| --- 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 |
+1
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -264,10 +264,11 @@ | ||
| 264 | 264 | if( vid ){ |
| 265 | 265 | show_common_info(vid, "checkout:", 1, 1); |
| 266 | 266 | } |
| 267 | 267 | db_record_repository_filename(0); |
| 268 | 268 | print_changes(useSha1sum, showHdr, verboseFlag, cwdRelative); |
| 269 | + leaf_ambiguity_warning(vid, vid); | |
| 269 | 270 | } |
| 270 | 271 | |
| 271 | 272 | /* |
| 272 | 273 | ** Take care of -r version of ls command |
| 273 | 274 | */ |
| 274 | 275 |
| --- 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 |
+1
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -264,10 +264,11 @@ | ||
| 264 | 264 | if( vid ){ |
| 265 | 265 | show_common_info(vid, "checkout:", 1, 1); |
| 266 | 266 | } |
| 267 | 267 | db_record_repository_filename(0); |
| 268 | 268 | print_changes(useSha1sum, showHdr, verboseFlag, cwdRelative); |
| 269 | + leaf_ambiguity_warning(vid, vid); | |
| 269 | 270 | } |
| 270 | 271 | |
| 271 | 272 | /* |
| 272 | 273 | ** Take care of -r version of ls command |
| 273 | 274 | */ |
| 274 | 275 |
| --- 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 @@ | ||
| 352 | 352 | ** The --recompute flag causes the content of the "leaf" table in the |
| 353 | 353 | ** repository database to be recomputed. |
| 354 | 354 | ** |
| 355 | 355 | ** Options: |
| 356 | 356 | ** -a|--all show ALL leaves |
| 357 | -** -c|--closed show only closed leaves | |
| 358 | 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 | |
| 359 | 360 | ** --recompute recompute the "leaf" table in the repository DB |
| 360 | 361 | ** -W|--width <num> Width of lines (default is to auto-detect). Must be |
| 361 | 362 | ** >39 or 0 (= no limit, resulting in a single line per |
| 362 | 363 | ** entry). |
| 363 | 364 | ** |
| @@ -369,15 +370,17 @@ | ||
| 369 | 370 | int showAll = find_option("all", "a", 0)!=0; |
| 370 | 371 | int showClosed = find_option("closed", "c", 0)!=0; |
| 371 | 372 | int recomputeFlag = find_option("recompute",0,0)!=0; |
| 372 | 373 | int showForks = g.argv[1][0]!='l'; |
| 373 | 374 | int byBranch = (find_option("bybranch",0,0)!=0) || showForks; |
| 375 | + int multipleFlag = (find_option("multiple","m",0))!=0 || showForks; | |
| 374 | 376 | const char *zWidth = find_option("width","W",1); |
| 375 | 377 | char *zLastBr = 0; |
| 376 | 378 | int n, width; |
| 377 | 379 | char zLineNo[10]; |
| 378 | 380 | |
| 381 | + if( multipleFlag ) byBranch = 1; | |
| 379 | 382 | if( zWidth ){ |
| 380 | 383 | width = atoi(zWidth); |
| 381 | 384 | if( (width!=0) && (width<=39) ){ |
| 382 | 385 | fossil_fatal("-W|--width value must be >39 or 0"); |
| 383 | 386 | } |
| @@ -390,14 +393,45 @@ | ||
| 390 | 393 | verify_all_options(); |
| 391 | 394 | |
| 392 | 395 | if( recomputeFlag ) leaf_rebuild(); |
| 393 | 396 | blob_zero(&sql); |
| 394 | 397 | 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 | + } | |
| 396 | 430 | if( showClosed ){ |
| 397 | 431 | blob_append_sql(&sql," AND %z", leaf_is_closed_sql("blob.rid")); |
| 398 | - }else if( !showAll || showForks ){ | |
| 432 | + }else if( !showAll ){ | |
| 399 | 433 | blob_append_sql(&sql," AND NOT %z", leaf_is_closed_sql("blob.rid")); |
| 400 | 434 | } |
| 401 | 435 | if( byBranch ){ |
| 402 | 436 | db_prepare(&q, "%s ORDER BY nullif(branch,'trunk') COLLATE nocase," |
| 403 | 437 | " event.mtime DESC", |
| @@ -406,40 +440,48 @@ | ||
| 406 | 440 | db_prepare(&q, "%s ORDER BY event.mtime DESC", blob_sql_text(&sql)); |
| 407 | 441 | } |
| 408 | 442 | blob_reset(&sql); |
| 409 | 443 | n = 0; |
| 410 | 444 | 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); | |
| 431 | 463 | } |
| 432 | 464 | fossil_free(zLastBr); |
| 433 | 465 | db_finalize(&q); |
| 434 | 466 | if( showForks && !zLastBr ) fossil_print("*** OK, no ambiguous branch found ***\n"); |
| 435 | 467 | } |
| 436 | 468 | |
| 437 | 469 | /* |
| 438 | 470 | ** WEBPAGE: leaves |
| 439 | 471 | ** |
| 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 | |
| 441 | 483 | */ |
| 442 | 484 | void leaves_page(void){ |
| 443 | 485 | Blob sql; |
| 444 | 486 | Stmt q; |
| 445 | 487 | int showAll = P("all")!=0; |
| 446 | 488 |
| --- 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 @@ | ||
| 352 | 352 | ** The --recompute flag causes the content of the "leaf" table in the |
| 353 | 353 | ** repository database to be recomputed. |
| 354 | 354 | ** |
| 355 | 355 | ** Options: |
| 356 | 356 | ** -a|--all show ALL leaves |
| 357 | -** -c|--closed show only closed leaves | |
| 358 | 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 | |
| 359 | 360 | ** --recompute recompute the "leaf" table in the repository DB |
| 360 | 361 | ** -W|--width <num> Width of lines (default is to auto-detect). Must be |
| 361 | 362 | ** >39 or 0 (= no limit, resulting in a single line per |
| 362 | 363 | ** entry). |
| 363 | 364 | ** |
| @@ -369,15 +370,17 @@ | ||
| 369 | 370 | int showAll = find_option("all", "a", 0)!=0; |
| 370 | 371 | int showClosed = find_option("closed", "c", 0)!=0; |
| 371 | 372 | int recomputeFlag = find_option("recompute",0,0)!=0; |
| 372 | 373 | int showForks = g.argv[1][0]!='l'; |
| 373 | 374 | int byBranch = (find_option("bybranch",0,0)!=0) || showForks; |
| 375 | + int multipleFlag = (find_option("multiple","m",0))!=0 || showForks; | |
| 374 | 376 | const char *zWidth = find_option("width","W",1); |
| 375 | 377 | char *zLastBr = 0; |
| 376 | 378 | int n, width; |
| 377 | 379 | char zLineNo[10]; |
| 378 | 380 | |
| 381 | + if( multipleFlag ) byBranch = 1; | |
| 379 | 382 | if( zWidth ){ |
| 380 | 383 | width = atoi(zWidth); |
| 381 | 384 | if( (width!=0) && (width<=39) ){ |
| 382 | 385 | fossil_fatal("-W|--width value must be >39 or 0"); |
| 383 | 386 | } |
| @@ -390,14 +393,45 @@ | ||
| 390 | 393 | verify_all_options(); |
| 391 | 394 | |
| 392 | 395 | if( recomputeFlag ) leaf_rebuild(); |
| 393 | 396 | blob_zero(&sql); |
| 394 | 397 | 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 | + } | |
| 396 | 430 | if( showClosed ){ |
| 397 | 431 | blob_append_sql(&sql," AND %z", leaf_is_closed_sql("blob.rid")); |
| 398 | - }else if( !showAll || showForks ){ | |
| 432 | + }else if( !showAll ){ | |
| 399 | 433 | blob_append_sql(&sql," AND NOT %z", leaf_is_closed_sql("blob.rid")); |
| 400 | 434 | } |
| 401 | 435 | if( byBranch ){ |
| 402 | 436 | db_prepare(&q, "%s ORDER BY nullif(branch,'trunk') COLLATE nocase," |
| 403 | 437 | " event.mtime DESC", |
| @@ -406,40 +440,48 @@ | ||
| 406 | 440 | db_prepare(&q, "%s ORDER BY event.mtime DESC", blob_sql_text(&sql)); |
| 407 | 441 | } |
| 408 | 442 | blob_reset(&sql); |
| 409 | 443 | n = 0; |
| 410 | 444 | 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); | |
| 431 | 463 | } |
| 432 | 464 | fossil_free(zLastBr); |
| 433 | 465 | db_finalize(&q); |
| 434 | 466 | if( showForks && !zLastBr ) fossil_print("*** OK, no ambiguous branch found ***\n"); |
| 435 | 467 | } |
| 436 | 468 | |
| 437 | 469 | /* |
| 438 | 470 | ** WEBPAGE: leaves |
| 439 | 471 | ** |
| 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 | |
| 441 | 483 | */ |
| 442 | 484 | void leaves_page(void){ |
| 443 | 485 | Blob sql; |
| 444 | 486 | Stmt q; |
| 445 | 487 | int showAll = P("all")!=0; |
| 446 | 488 |
| --- 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 @@ | ||
| 1929 | 1929 | return diffFlags; |
| 1930 | 1930 | } |
| 1931 | 1931 | |
| 1932 | 1932 | /* |
| 1933 | 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. | |
| 1934 | 1940 | */ |
| 1935 | 1941 | void test_rawdiff_cmd(void){ |
| 1936 | 1942 | Blob a, b; |
| 1937 | 1943 | int r; |
| 1938 | 1944 | int i; |
| @@ -2207,17 +2213,27 @@ | ||
| 2207 | 2213 | /* |
| 2208 | 2214 | ** WEBPAGE: annotate |
| 2209 | 2215 | ** WEBPAGE: blame |
| 2210 | 2216 | ** WEBPAGE: praise |
| 2211 | 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 | +** | |
| 2212 | 2226 | ** Query parameters: |
| 2213 | 2227 | ** |
| 2214 | 2228 | ** checkin=ID The manifest ID at which to start the annotation |
| 2215 | 2229 | ** filename=FILENAME The filename. |
| 2216 | 2230 | ** filevers Show file versions rather than check-in versions |
| 2217 | -** log=BOOLEAN Show a log of versions analyzed | |
| 2218 | 2231 | ** limit=N Limit the search depth to N ancestors |
| 2232 | +** log=BOOLEAN Show a log of versions analyzed | |
| 2233 | +** w Ignore whitespace | |
| 2234 | +** | |
| 2219 | 2235 | */ |
| 2220 | 2236 | void annotation_page(void){ |
| 2221 | 2237 | int mid; |
| 2222 | 2238 | int fnid; |
| 2223 | 2239 | int i; |
| 2224 | 2240 |
| --- 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 @@ | ||
| 835 | 835 | } |
| 836 | 836 | } |
| 837 | 837 | |
| 838 | 838 | /* |
| 839 | 839 | ** 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. | |
| 841 | 843 | */ |
| 842 | 844 | void vpatch_page(void){ |
| 843 | 845 | const char *zFrom = P("from"); |
| 844 | 846 | const char *zTo = P("to"); |
| 845 | 847 | login_check_credentials(); |
| 846 | 848 |
| --- 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 @@ | ||
| 774 | 774 | |
| 775 | 775 | |
| 776 | 776 | /* |
| 777 | 777 | ** WEBPAGE: background |
| 778 | 778 | ** |
| 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. | |
| 780 | 781 | */ |
| 781 | 782 | void background_page(void){ |
| 782 | 783 | Blob bgimg; |
| 783 | 784 | char *zMime; |
| 784 | 785 | |
| @@ -793,15 +794,21 @@ | ||
| 793 | 794 | g.isConst = 1; |
| 794 | 795 | } |
| 795 | 796 | |
| 796 | 797 | |
| 797 | 798 | /* |
| 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: | |
| 799 | 806 | ** |
| 800 | -** Search for documents that match a user-supplied pattern. | |
| 807 | +** s=PATTERN Search for PATTERN | |
| 801 | 808 | */ |
| 802 | 809 | void doc_search_page(void){ |
| 803 | 810 | login_check_credentials(); |
| 804 | 811 | style_header("Document Search"); |
| 805 | 812 | search_screen(SRCH_DOC, 0); |
| 806 | 813 | style_footer(); |
| 807 | 814 | } |
| 808 | 815 |
| --- 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 |
+4
| --- src/encode.c | ||
| +++ src/encode.c | ||
| @@ -606,10 +606,14 @@ | ||
| 606 | 606 | /* |
| 607 | 607 | ** Command to test obscure() and unobscure(). These commands are also useful |
| 608 | 608 | ** utilities for decoding passwords found in the database. |
| 609 | 609 | ** |
| 610 | 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. | |
| 611 | 615 | */ |
| 612 | 616 | void test_obscure_cmd(void){ |
| 613 | 617 | int i; |
| 614 | 618 | char *z, *z2; |
| 615 | 619 | for(i=2; i<g.argc; i++){ |
| 616 | 620 |
| --- 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 |
+1
| --- src/finfo.c | ||
| +++ src/finfo.c | ||
| @@ -288,10 +288,11 @@ | ||
| 288 | 288 | ** b=DATE Only show changes before DATE |
| 289 | 289 | ** n=NUM Show the first NUM changes only |
| 290 | 290 | ** brbg Background color by branch name |
| 291 | 291 | ** ubg Background color by user name |
| 292 | 292 | ** ci=UUID Ancestors of a particular check-in |
| 293 | +** showid Show RID values for debugging | |
| 293 | 294 | */ |
| 294 | 295 | void finfo_page(void){ |
| 295 | 296 | Stmt q; |
| 296 | 297 | const char *zFilename; |
| 297 | 298 | char zPrevDate[20]; |
| 298 | 299 |
| --- 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 @@ | ||
| 49 | 49 | ** * The UUID |
| 50 | 50 | ** * The record ID |
| 51 | 51 | ** * mtime and ctime |
| 52 | 52 | ** * who signed it |
| 53 | 53 | ** |
| 54 | -** Returns 1 when a fork was found. | |
| 55 | 54 | */ |
| 56 | -int show_common_info( | |
| 55 | +void show_common_info( | |
| 57 | 56 | int rid, /* The rid for the check-in to display info for */ |
| 58 | 57 | const char *zUuidName, /* Name of the UUID */ |
| 59 | 58 | int showComment, /* True to show the check-in comment */ |
| 60 | 59 | int showFamily /* True to show parents and children */ |
| 61 | 60 | ){ |
| @@ -62,11 +61,10 @@ | ||
| 62 | 61 | Stmt q; |
| 63 | 62 | char *zComment = 0; |
| 64 | 63 | char *zTags; |
| 65 | 64 | char *zDate; |
| 66 | 65 | char *zUuid; |
| 67 | - int isFork = 0; | |
| 68 | 66 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 69 | 67 | if( zUuid ){ |
| 70 | 68 | zDate = db_text(0, |
| 71 | 69 | "SELECT datetime(mtime) || ' UTC' FROM event WHERE objid=%d", |
| 72 | 70 | rid |
| @@ -112,29 +110,10 @@ | ||
| 112 | 110 | fossil_print("%-13s %s %s\n", zType, zUuid, zDate); |
| 113 | 111 | free(zDate); |
| 114 | 112 | } |
| 115 | 113 | db_finalize(&q); |
| 116 | 114 | } |
| 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 | 115 | zTags = info_tags_of_checkin(rid, 0); |
| 137 | 116 | if( zTags && zTags[0] ){ |
| 138 | 117 | fossil_print("tags: %s\n", zTags); |
| 139 | 118 | } |
| 140 | 119 | free(zTags); |
| @@ -141,11 +120,10 @@ | ||
| 141 | 120 | if( zComment ){ |
| 142 | 121 | fossil_print("comment: "); |
| 143 | 122 | comment_print(zComment, 0, 14, -1, g.comFmtFlags); |
| 144 | 123 | free(zComment); |
| 145 | 124 | } |
| 146 | - return isFork; | |
| 147 | 125 | } |
| 148 | 126 | |
| 149 | 127 | /* |
| 150 | 128 | ** Print information about the URLs used to access a repository and |
| 151 | 129 | ** checkouts in a repository. |
| @@ -507,15 +485,16 @@ | ||
| 507 | 485 | } |
| 508 | 486 | |
| 509 | 487 | /* |
| 510 | 488 | ** WEBPAGE: vinfo |
| 511 | 489 | ** WEBPAGE: ci |
| 512 | -** URL: /ci?name=RID|ARTIFACTID | |
| 490 | +** URL: /ci?name=ARTIFACTID | |
| 491 | +** URL: /vinfo?name=ARTIFACTID | |
| 513 | 492 | ** |
| 514 | 493 | ** Display information about a particular check-in. |
| 515 | 494 | ** |
| 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 | |
| 517 | 496 | ** |
| 518 | 497 | ** If the /ci page is used (instead of /vinfo or /info) then the |
| 519 | 498 | ** default behavior is to show unified diffs of all file changes. |
| 520 | 499 | ** With /vinfo and /info, only a list of the changed files are |
| 521 | 500 | ** shown, without diffs. This behavior is inverted if the |
| @@ -770,11 +749,11 @@ | ||
| 770 | 749 | |
| 771 | 750 | /* |
| 772 | 751 | ** WEBPAGE: winfo |
| 773 | 752 | ** URL: /winfo?name=UUID |
| 774 | 753 | ** |
| 775 | -** Return information about a wiki page. | |
| 754 | +** Display information about a wiki page. | |
| 776 | 755 | */ |
| 777 | 756 | void winfo_page(void){ |
| 778 | 757 | int rid; |
| 779 | 758 | Manifest *pWiki; |
| 780 | 759 | char *zUuid; |
| @@ -973,20 +952,25 @@ | ||
| 973 | 952 | } |
| 974 | 953 | |
| 975 | 954 | |
| 976 | 955 | /* |
| 977 | 956 | ** 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. | |
| 979 | 961 | ** |
| 980 | 962 | ** Query parameters: |
| 981 | 963 | ** |
| 982 | 964 | ** from=TAG Left side of the comparison |
| 983 | 965 | ** to=TAG Right side of the comparison |
| 984 | 966 | ** branch=TAG Show all changes on a particular branch |
| 985 | 967 | ** v=BOOLEAN Default true. If false, only list files that have changed |
| 986 | 968 | ** sbs=BOOLEAN Side-by-side diff if true. Unified diff if false |
| 987 | 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 | |
| 988 | 972 | ** |
| 989 | 973 | ** |
| 990 | 974 | ** Show all differences between two check-ins. |
| 991 | 975 | */ |
| 992 | 976 | void vdiff_page(void){ |
| @@ -1419,10 +1403,12 @@ | ||
| 1419 | 1403 | ** is 0. Generate plaintext if "patch" is present. |
| 1420 | 1404 | ** |
| 1421 | 1405 | ** Additional parameters: |
| 1422 | 1406 | ** |
| 1423 | 1407 | ** verbose Show more detail when describing artifacts |
| 1408 | +** dc=N Show N lines of context around each diff | |
| 1409 | +** w Ignore whitespace | |
| 1424 | 1410 | */ |
| 1425 | 1411 | void diff_page(void){ |
| 1426 | 1412 | int v1, v2; |
| 1427 | 1413 | int isPatch; |
| 1428 | 1414 | int sideBySide; |
| @@ -2046,14 +2032,14 @@ | ||
| 2046 | 2032 | |
| 2047 | 2033 | /* |
| 2048 | 2034 | ** WEBPAGE: info |
| 2049 | 2035 | ** URL: info/ARTIFACTID |
| 2050 | 2036 | ** |
| 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 | |
| 2052 | 2038 | ** a ticket changes or a wiki edit or something else. |
| 2053 | 2039 | ** |
| 2054 | -** Figure out what the artifact ID is and jump to it. | |
| 2040 | +** Figure out what the artifact ID is and display it appropriately. | |
| 2055 | 2041 | */ |
| 2056 | 2042 | void info_page(void){ |
| 2057 | 2043 | const char *zName; |
| 2058 | 2044 | Blob uuid; |
| 2059 | 2045 | int rid; |
| @@ -2281,17 +2267,19 @@ | ||
| 2281 | 2267 | return zA[0]==0 && zB[0]==0; |
| 2282 | 2268 | } |
| 2283 | 2269 | |
| 2284 | 2270 | /* |
| 2285 | 2271 | ** WEBPAGE: ci_edit |
| 2286 | -** URL: ci_edit?r=RID&c=NEWCOMMENT&u=NEWUSER | |
| 2272 | +** URL: /ci_edit?r=RID&c=NEWCOMMENT&u=NEWUSER | |
| 2287 | 2273 | ** |
| 2288 | -** Present a dialog for updating properties of a baseline: | |
| 2274 | +** Present a dialog for updating properties of a check-in. | |
| 2289 | 2275 | ** |
| 2290 | 2276 | ** * The check-in user |
| 2291 | 2277 | ** * The check-in comment |
| 2278 | +** * The check-in time and date | |
| 2292 | 2279 | ** * The background color. |
| 2280 | +** * Add and remove tags | |
| 2293 | 2281 | */ |
| 2294 | 2282 | void ci_edit_page(void){ |
| 2295 | 2283 | int rid; |
| 2296 | 2284 | const char *zComment; /* Current comment on the check-in */ |
| 2297 | 2285 | const char *zNewComment; /* Revised check-in comment */ |
| 2298 | 2286 |
| --- 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 @@ | ||
| 49 | 49 | ** * The UUID |
| 50 | 50 | ** * The record ID |
| 51 | 51 | ** * mtime and ctime |
| 52 | 52 | ** * who signed it |
| 53 | 53 | ** |
| 54 | -** Returns 1 when a fork was found. | |
| 55 | 54 | */ |
| 56 | -int show_common_info( | |
| 55 | +void show_common_info( | |
| 57 | 56 | int rid, /* The rid for the check-in to display info for */ |
| 58 | 57 | const char *zUuidName, /* Name of the UUID */ |
| 59 | 58 | int showComment, /* True to show the check-in comment */ |
| 60 | 59 | int showFamily /* True to show parents and children */ |
| 61 | 60 | ){ |
| @@ -62,11 +61,10 @@ | ||
| 62 | 61 | Stmt q; |
| 63 | 62 | char *zComment = 0; |
| 64 | 63 | char *zTags; |
| 65 | 64 | char *zDate; |
| 66 | 65 | char *zUuid; |
| 67 | - int isFork = 0; | |
| 68 | 66 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 69 | 67 | if( zUuid ){ |
| 70 | 68 | zDate = db_text(0, |
| 71 | 69 | "SELECT datetime(mtime) || ' UTC' FROM event WHERE objid=%d", |
| 72 | 70 | rid |
| @@ -112,29 +110,10 @@ | ||
| 112 | 110 | fossil_print("%-13s %s %s\n", zType, zUuid, zDate); |
| 113 | 111 | free(zDate); |
| 114 | 112 | } |
| 115 | 113 | db_finalize(&q); |
| 116 | 114 | } |
| 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 | 115 | zTags = info_tags_of_checkin(rid, 0); |
| 137 | 116 | if( zTags && zTags[0] ){ |
| 138 | 117 | fossil_print("tags: %s\n", zTags); |
| 139 | 118 | } |
| 140 | 119 | free(zTags); |
| @@ -141,11 +120,10 @@ | ||
| 141 | 120 | if( zComment ){ |
| 142 | 121 | fossil_print("comment: "); |
| 143 | 122 | comment_print(zComment, 0, 14, -1, g.comFmtFlags); |
| 144 | 123 | free(zComment); |
| 145 | 124 | } |
| 146 | - return isFork; | |
| 147 | 125 | } |
| 148 | 126 | |
| 149 | 127 | /* |
| 150 | 128 | ** Print information about the URLs used to access a repository and |
| 151 | 129 | ** checkouts in a repository. |
| @@ -507,15 +485,16 @@ | ||
| 507 | 485 | } |
| 508 | 486 | |
| 509 | 487 | /* |
| 510 | 488 | ** WEBPAGE: vinfo |
| 511 | 489 | ** WEBPAGE: ci |
| 512 | -** URL: /ci?name=RID|ARTIFACTID | |
| 490 | +** URL: /ci?name=ARTIFACTID | |
| 491 | +** URL: /vinfo?name=ARTIFACTID | |
| 513 | 492 | ** |
| 514 | 493 | ** Display information about a particular check-in. |
| 515 | 494 | ** |
| 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 | |
| 517 | 496 | ** |
| 518 | 497 | ** If the /ci page is used (instead of /vinfo or /info) then the |
| 519 | 498 | ** default behavior is to show unified diffs of all file changes. |
| 520 | 499 | ** With /vinfo and /info, only a list of the changed files are |
| 521 | 500 | ** shown, without diffs. This behavior is inverted if the |
| @@ -770,11 +749,11 @@ | ||
| 770 | 749 | |
| 771 | 750 | /* |
| 772 | 751 | ** WEBPAGE: winfo |
| 773 | 752 | ** URL: /winfo?name=UUID |
| 774 | 753 | ** |
| 775 | -** Return information about a wiki page. | |
| 754 | +** Display information about a wiki page. | |
| 776 | 755 | */ |
| 777 | 756 | void winfo_page(void){ |
| 778 | 757 | int rid; |
| 779 | 758 | Manifest *pWiki; |
| 780 | 759 | char *zUuid; |
| @@ -973,20 +952,25 @@ | ||
| 973 | 952 | } |
| 974 | 953 | |
| 975 | 954 | |
| 976 | 955 | /* |
| 977 | 956 | ** 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. | |
| 979 | 961 | ** |
| 980 | 962 | ** Query parameters: |
| 981 | 963 | ** |
| 982 | 964 | ** from=TAG Left side of the comparison |
| 983 | 965 | ** to=TAG Right side of the comparison |
| 984 | 966 | ** branch=TAG Show all changes on a particular branch |
| 985 | 967 | ** v=BOOLEAN Default true. If false, only list files that have changed |
| 986 | 968 | ** sbs=BOOLEAN Side-by-side diff if true. Unified diff if false |
| 987 | 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 | |
| 988 | 972 | ** |
| 989 | 973 | ** |
| 990 | 974 | ** Show all differences between two check-ins. |
| 991 | 975 | */ |
| 992 | 976 | void vdiff_page(void){ |
| @@ -1419,10 +1403,12 @@ | ||
| 1419 | 1403 | ** is 0. Generate plaintext if "patch" is present. |
| 1420 | 1404 | ** |
| 1421 | 1405 | ** Additional parameters: |
| 1422 | 1406 | ** |
| 1423 | 1407 | ** verbose Show more detail when describing artifacts |
| 1408 | +** dc=N Show N lines of context around each diff | |
| 1409 | +** w Ignore whitespace | |
| 1424 | 1410 | */ |
| 1425 | 1411 | void diff_page(void){ |
| 1426 | 1412 | int v1, v2; |
| 1427 | 1413 | int isPatch; |
| 1428 | 1414 | int sideBySide; |
| @@ -2046,14 +2032,14 @@ | ||
| 2046 | 2032 | |
| 2047 | 2033 | /* |
| 2048 | 2034 | ** WEBPAGE: info |
| 2049 | 2035 | ** URL: info/ARTIFACTID |
| 2050 | 2036 | ** |
| 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 | |
| 2052 | 2038 | ** a ticket changes or a wiki edit or something else. |
| 2053 | 2039 | ** |
| 2054 | -** Figure out what the artifact ID is and jump to it. | |
| 2040 | +** Figure out what the artifact ID is and display it appropriately. | |
| 2055 | 2041 | */ |
| 2056 | 2042 | void info_page(void){ |
| 2057 | 2043 | const char *zName; |
| 2058 | 2044 | Blob uuid; |
| 2059 | 2045 | int rid; |
| @@ -2281,17 +2267,19 @@ | ||
| 2281 | 2267 | return zA[0]==0 && zB[0]==0; |
| 2282 | 2268 | } |
| 2283 | 2269 | |
| 2284 | 2270 | /* |
| 2285 | 2271 | ** WEBPAGE: ci_edit |
| 2286 | -** URL: ci_edit?r=RID&c=NEWCOMMENT&u=NEWUSER | |
| 2272 | +** URL: /ci_edit?r=RID&c=NEWCOMMENT&u=NEWUSER | |
| 2287 | 2273 | ** |
| 2288 | -** Present a dialog for updating properties of a baseline: | |
| 2274 | +** Present a dialog for updating properties of a check-in. | |
| 2289 | 2275 | ** |
| 2290 | 2276 | ** * The check-in user |
| 2291 | 2277 | ** * The check-in comment |
| 2278 | +** * The check-in time and date | |
| 2292 | 2279 | ** * The background color. |
| 2280 | +** * Add and remove tags | |
| 2293 | 2281 | */ |
| 2294 | 2282 | void ci_edit_page(void){ |
| 2295 | 2283 | int rid; |
| 2296 | 2284 | const char *zComment; /* Current comment on the check-in */ |
| 2297 | 2285 | const char *zNewComment; /* Revised check-in comment */ |
| 2298 | 2286 |
| --- 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 @@ | ||
| 180 | 180 | for(rid=bag_first(&needToCheck); rid; rid=bag_next(&needToCheck,rid)){ |
| 181 | 181 | leaf_check(rid); |
| 182 | 182 | } |
| 183 | 183 | bag_clear(&needToCheck); |
| 184 | 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 | +} | |
| 185 | 272 |
| --- 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 @@ | ||
| 1302 | 1302 | } |
| 1303 | 1303 | |
| 1304 | 1304 | /* |
| 1305 | 1305 | ** WEBPAGE: register |
| 1306 | 1306 | ** |
| 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. | |
| 1309 | 1309 | */ |
| 1310 | 1310 | void register_page(void){ |
| 1311 | 1311 | const char *zUsername, *zPasswd, *zConfirm, *zContact, *zCS, *zPw, *zCap; |
| 1312 | 1312 | unsigned int uSeed; |
| 1313 | 1313 | const char *zDecoded; |
| 1314 | 1314 |
| --- 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 @@ | ||
| 1131 | 1131 | putchar('\n'); |
| 1132 | 1132 | } |
| 1133 | 1133 | |
| 1134 | 1134 | /* |
| 1135 | 1135 | ** 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. | |
| 1137 | 1140 | */ |
| 1138 | 1141 | void help_page(void){ |
| 1139 | 1142 | const char *zCmd = P("cmd"); |
| 1140 | 1143 | |
| 1141 | 1144 | if( zCmd==0 ) zCmd = P("name"); |
| @@ -1199,11 +1202,10 @@ | ||
| 1199 | 1202 | @ </ul></td> |
| 1200 | 1203 | } |
| 1201 | 1204 | @ </tr></table> |
| 1202 | 1205 | |
| 1203 | 1206 | @ <h1>Available web UI pages:</h1> |
| 1204 | - @ (Only pages with help text are linked.) | |
| 1205 | 1207 | @ <table border="0"><tr> |
| 1206 | 1208 | for(i=j=0; i<count(aCommand); i++){ |
| 1207 | 1209 | const char *z = aCommand[i].zName; |
| 1208 | 1210 | if( '/'!=*z ) continue; |
| 1209 | 1211 | j++; |
| 1210 | 1212 |
| --- 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 @@ | ||
| 28 | 28 | #ifndef SQLITE_RECURSIVE |
| 29 | 29 | # define SQLITE_RECURSIVE 33 |
| 30 | 30 | #endif |
| 31 | 31 | |
| 32 | 32 | /* |
| 33 | -** WEBPAGE: /reportlist | |
| 33 | +** WEBPAGE: reportlist | |
| 34 | 34 | ** |
| 35 | 35 | ** Main menu for Tickets. |
| 36 | 36 | */ |
| 37 | 37 | void view_list(void){ |
| 38 | 38 | const char *zScript; |
| @@ -284,11 +284,15 @@ | ||
| 284 | 284 | report_unrestrict_sql(); |
| 285 | 285 | return zErr; |
| 286 | 286 | } |
| 287 | 287 | |
| 288 | 288 | /* |
| 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. | |
| 290 | 294 | */ |
| 291 | 295 | void view_see_sql(void){ |
| 292 | 296 | int rn; |
| 293 | 297 | const char *zTitle; |
| 294 | 298 | const char *zSQL; |
| @@ -332,12 +336,21 @@ | ||
| 332 | 336 | style_footer(); |
| 333 | 337 | db_finalize(&q); |
| 334 | 338 | } |
| 335 | 339 | |
| 336 | 340 | /* |
| 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 | |
| 339 | 352 | */ |
| 340 | 353 | void view_edit(void){ |
| 341 | 354 | int rn; |
| 342 | 355 | const char *zTitle; |
| 343 | 356 | const char *z; |
| @@ -1061,11 +1074,11 @@ | ||
| 1061 | 1074 | @ </script> |
| 1062 | 1075 | } |
| 1063 | 1076 | |
| 1064 | 1077 | |
| 1065 | 1078 | /* |
| 1066 | -** WEBPAGE: /rptview | |
| 1079 | +** WEBPAGE: rptview | |
| 1067 | 1080 | ** |
| 1068 | 1081 | ** Generate a report. The rn query parameter is the report number |
| 1069 | 1082 | ** corresponding to REPORTFMT.RN. If the tablist query parameter exists, |
| 1070 | 1083 | ** then the output consists of lines of tab-separated fields instead of |
| 1071 | 1084 | ** an HTML table. |
| 1072 | 1085 |
| --- 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 @@ | ||
| 1047 | 1047 | @ </div> |
| 1048 | 1048 | } |
| 1049 | 1049 | } |
| 1050 | 1050 | |
| 1051 | 1051 | /* |
| 1052 | -** WEBPAGE: /search | |
| 1052 | +** WEBPAGE: search | |
| 1053 | 1053 | ** |
| 1054 | 1054 | ** Search for check-in comments, documents, tickets, or wiki that |
| 1055 | 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 | |
| 1056 | 1064 | */ |
| 1057 | 1065 | void search_page(void){ |
| 1058 | 1066 | login_check_credentials(); |
| 1059 | 1067 | style_header("Search"); |
| 1060 | 1068 | search_screen(SRCH_ALL, 1); |
| 1061 | 1069 |
| --- 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 @@ | ||
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | |
| 57 | 57 | |
| 58 | 58 | /* |
| 59 | -** WEBPAGE: /setup | |
| 59 | +** WEBPAGE: setup | |
| 60 | +** | |
| 61 | +** Main menu for the administrative pages. Requires Admin privileges. | |
| 60 | 62 | */ |
| 61 | 63 | void setup_page(void){ |
| 62 | 64 | login_check_credentials(); |
| 63 | 65 | if( !g.perm.Setup ){ |
| 64 | 66 | login_needed(0); |
| @@ -123,12 +125,12 @@ | ||
| 123 | 125 | "A record of received artifacts and their sources"); |
| 124 | 126 | setup_menu_entry("User Log", "access_log", |
| 125 | 127 | "A record of login attempts"); |
| 126 | 128 | setup_menu_entry("Administrative Log", "admin_log", |
| 127 | 129 | "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"); | |
| 130 | 132 | setup_menu_entry("SQL", "admin_sql", |
| 131 | 133 | "Enter raw SQL commands"); |
| 132 | 134 | setup_menu_entry("TH1", "admin_th1", |
| 133 | 135 | "Enter raw TH1 commands"); |
| 134 | 136 | @ </table> |
| @@ -138,11 +140,11 @@ | ||
| 138 | 140 | |
| 139 | 141 | /* |
| 140 | 142 | ** WEBPAGE: setup_ulist |
| 141 | 143 | ** |
| 142 | 144 | ** 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. | |
| 144 | 146 | */ |
| 145 | 147 | void setup_ulist(void){ |
| 146 | 148 | Stmt s; |
| 147 | 149 | int prevLevel = 0; |
| 148 | 150 | |
| @@ -313,11 +315,14 @@ | ||
| 313 | 315 | while( zPw[0]=='*' ){ zPw++; } |
| 314 | 316 | return zPw[0]!=0; |
| 315 | 317 | } |
| 316 | 318 | |
| 317 | 319 | /* |
| 318 | -** WEBPAGE: /setup_uedit | |
| 320 | +** WEBPAGE: setup_uedit | |
| 321 | +** | |
| 322 | +** Edit information about a user or create a new user. | |
| 323 | +** Requires Admin privileges. | |
| 319 | 324 | */ |
| 320 | 325 | void user_edit(void){ |
| 321 | 326 | const char *zId, *zLogin, *zInfo, *zCap, *zPw; |
| 322 | 327 | const char *zGroup; |
| 323 | 328 | const char *zOldLogin; |
| @@ -989,10 +994,12 @@ | ||
| 989 | 994 | } |
| 990 | 995 | |
| 991 | 996 | |
| 992 | 997 | /* |
| 993 | 998 | ** WEBPAGE: setup_access |
| 999 | +** | |
| 1000 | +** The access-control settings page. Requires Admin privileges. | |
| 994 | 1001 | */ |
| 995 | 1002 | void setup_access(void){ |
| 996 | 1003 | login_check_credentials(); |
| 997 | 1004 | if( !g.perm.Setup ){ |
| 998 | 1005 | login_needed(0); |
| @@ -1186,10 +1193,13 @@ | ||
| 1186 | 1193 | style_footer(); |
| 1187 | 1194 | } |
| 1188 | 1195 | |
| 1189 | 1196 | /* |
| 1190 | 1197 | ** WEBPAGE: setup_login_group |
| 1198 | +** | |
| 1199 | +** Change how the current repository participates in a login | |
| 1200 | +** group. | |
| 1191 | 1201 | */ |
| 1192 | 1202 | void setup_login_group(void){ |
| 1193 | 1203 | const char *zGroup; |
| 1194 | 1204 | char *zErrMsg = 0; |
| 1195 | 1205 | Blob fullName; |
| @@ -1299,10 +1309,13 @@ | ||
| 1299 | 1309 | style_footer(); |
| 1300 | 1310 | } |
| 1301 | 1311 | |
| 1302 | 1312 | /* |
| 1303 | 1313 | ** WEBPAGE: setup_timeline |
| 1314 | +** | |
| 1315 | +** Edit administrative settings controlling the display of | |
| 1316 | +** timelines. | |
| 1304 | 1317 | */ |
| 1305 | 1318 | void setup_timeline(void){ |
| 1306 | 1319 | double tmDiff; |
| 1307 | 1320 | char zTmDiff[20]; |
| 1308 | 1321 | static const char *const azTimeFormats[] = { |
| @@ -1385,10 +1398,13 @@ | ||
| 1385 | 1398 | style_footer(); |
| 1386 | 1399 | } |
| 1387 | 1400 | |
| 1388 | 1401 | /* |
| 1389 | 1402 | ** WEBPAGE: setup_settings |
| 1403 | +** | |
| 1404 | +** Change or view miscellanous settings. Part of the | |
| 1405 | +** Admin pages requiring Admin privileges. | |
| 1390 | 1406 | */ |
| 1391 | 1407 | void setup_settings(void){ |
| 1392 | 1408 | Setting const *pSet; |
| 1393 | 1409 | |
| 1394 | 1410 | login_check_credentials(); |
| @@ -1468,10 +1484,12 @@ | ||
| 1468 | 1484 | style_footer(); |
| 1469 | 1485 | } |
| 1470 | 1486 | |
| 1471 | 1487 | /* |
| 1472 | 1488 | ** WEBPAGE: setup_config |
| 1489 | +** | |
| 1490 | +** The "Admin/Configuration" page. Requires Admin privilege. | |
| 1473 | 1491 | */ |
| 1474 | 1492 | void setup_config(void){ |
| 1475 | 1493 | login_check_credentials(); |
| 1476 | 1494 | if( !g.perm.Setup ){ |
| 1477 | 1495 | login_needed(0); |
| @@ -1547,10 +1565,12 @@ | ||
| 1547 | 1565 | style_footer(); |
| 1548 | 1566 | } |
| 1549 | 1567 | |
| 1550 | 1568 | /* |
| 1551 | 1569 | ** WEBPAGE: setup_modreq |
| 1570 | +** | |
| 1571 | +** Admin page for setting up moderation of tickets and wiki. | |
| 1552 | 1572 | */ |
| 1553 | 1573 | void setup_modreq(void){ |
| 1554 | 1574 | login_check_credentials(); |
| 1555 | 1575 | if( !g.perm.Setup ){ |
| 1556 | 1576 | login_needed(0); |
| @@ -1592,10 +1612,13 @@ | ||
| 1592 | 1612 | |
| 1593 | 1613 | } |
| 1594 | 1614 | |
| 1595 | 1615 | /* |
| 1596 | 1616 | ** WEBPAGE: setup_adunit |
| 1617 | +** | |
| 1618 | +** Administrative page for configuring and controlling ad units | |
| 1619 | +** and how they are displayed. | |
| 1597 | 1620 | */ |
| 1598 | 1621 | void setup_adunit(void){ |
| 1599 | 1622 | login_check_credentials(); |
| 1600 | 1623 | if( !g.perm.Setup ){ |
| 1601 | 1624 | login_needed(0); |
| @@ -1660,10 +1683,12 @@ | ||
| 1660 | 1683 | db_end_transaction(0); |
| 1661 | 1684 | } |
| 1662 | 1685 | |
| 1663 | 1686 | /* |
| 1664 | 1687 | ** WEBPAGE: setup_logo |
| 1688 | +** | |
| 1689 | +** Administrative page for changing the logo image. | |
| 1665 | 1690 | */ |
| 1666 | 1691 | void setup_logo(void){ |
| 1667 | 1692 | const char *zLogoMtime = db_get_mtime("logo-image", 0, 0); |
| 1668 | 1693 | const char *zLogoMime = db_get("logo-mimetype","image/gif"); |
| 1669 | 1694 | const char *aLogoImg = P("logoim"); |
| @@ -1812,10 +1837,11 @@ | ||
| 1812 | 1837 | |
| 1813 | 1838 | /* |
| 1814 | 1839 | ** WEBPAGE: admin_sql |
| 1815 | 1840 | ** |
| 1816 | 1841 | ** Run raw SQL commands against the database file using the web interface. |
| 1842 | +** Requires Admin privileges. | |
| 1817 | 1843 | */ |
| 1818 | 1844 | void sql_page(void){ |
| 1819 | 1845 | const char *zQ = P("q"); |
| 1820 | 1846 | int go = P("go")!=0; |
| 1821 | 1847 | login_check_credentials(); |
| @@ -1933,11 +1959,11 @@ | ||
| 1933 | 1959 | /* |
| 1934 | 1960 | ** WEBPAGE: admin_th1 |
| 1935 | 1961 | ** |
| 1936 | 1962 | ** Run raw TH1 commands using the web interface. If Tcl integration was |
| 1937 | 1963 | ** 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. | |
| 1939 | 1965 | */ |
| 1940 | 1966 | void th1_page(void){ |
| 1941 | 1967 | const char *zQ = P("q"); |
| 1942 | 1968 | int go = P("go")!=0; |
| 1943 | 1969 | login_check_credentials(); |
| @@ -2054,11 +2080,11 @@ | ||
| 2054 | 2080 | } |
| 2055 | 2081 | |
| 2056 | 2082 | /* |
| 2057 | 2083 | ** WEBPAGE: srchsetup |
| 2058 | 2084 | ** |
| 2059 | -** Configure the search engine. | |
| 2085 | +** Configure the search engine. Requires Admin privilege. | |
| 2060 | 2086 | */ |
| 2061 | 2087 | void page_srchsetup(){ |
| 2062 | 2088 | login_check_credentials(); |
| 2063 | 2089 | if( !g.perm.Setup && !g.perm.Admin ){ |
| 2064 | 2090 | login_needed(0); |
| 2065 | 2091 |
| --- 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 @@ | ||
| 35 | 35 | return rc==SQLITE_ROW; |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | /* |
| 39 | 39 | ** WEBPAGE: shun |
| 40 | +** | |
| 41 | +** View the SHA1 hashes of all shunned artifacts. Add new hashes | |
| 42 | +** to the shun set. Requires Admin privilege. | |
| 40 | 43 | */ |
| 41 | 44 | void shun_page(void){ |
| 42 | 45 | Stmt q; |
| 43 | 46 | int cnt = 0; |
| 44 | 47 | const char *zUuid = P("uuid"); |
| @@ -293,10 +296,15 @@ | ||
| 293 | 296 | |
| 294 | 297 | /* |
| 295 | 298 | ** WEBPAGE: rcvfromlist |
| 296 | 299 | ** |
| 297 | 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. | |
| 298 | 306 | */ |
| 299 | 307 | void rcvfromlist_page(void){ |
| 300 | 308 | int ofst = atoi(PD("ofst","0")); |
| 301 | 309 | int showAll = P("all")!=0; |
| 302 | 310 | int cnt; |
| @@ -375,11 +383,12 @@ | ||
| 375 | 383 | } |
| 376 | 384 | |
| 377 | 385 | /* |
| 378 | 386 | ** WEBPAGE: rcvfrom |
| 379 | 387 | ** |
| 380 | -** Show a single RCVFROM table entry. | |
| 388 | +** Show a single RCVFROM table entry identified by the rcvid= query | |
| 389 | +** parameters. Requires Admin privilege. | |
| 381 | 390 | */ |
| 382 | 391 | void rcvfrom_page(void){ |
| 383 | 392 | int rcvid = atoi(PD("rcvid","0")); |
| 384 | 393 | Stmt q; |
| 385 | 394 | |
| 386 | 395 |
| --- 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 @@ | ||
| 22 | 22 | #include <assert.h> |
| 23 | 23 | |
| 24 | 24 | /* |
| 25 | 25 | ** WEBPAGE: sitemap |
| 26 | 26 | ** |
| 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. | |
| 28 | 31 | */ |
| 29 | 32 | void sitemap_page(void){ |
| 33 | + int srchFlags; | |
| 30 | 34 | login_check_credentials(); |
| 35 | + srchFlags = search_restrict(SRCH_ALL); | |
| 31 | 36 | style_header("Site Map"); |
| 32 | 37 | style_adunit_config(ADUNIT_RIGHT_OK); |
| 38 | +#if 0 | |
| 33 | 39 | @ <p> |
| 34 | 40 | @ The following links are just a few of the many web-pages available for |
| 35 | 41 | @ this Fossil repository: |
| 36 | 42 | @ </p> |
| 37 | 43 | @ |
| 44 | +#endif | |
| 38 | 45 | @ <ul> |
| 39 | 46 | @ <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 | + } | |
| 92 | 123 | @ <li>On-line Documentation |
| 93 | 124 | @ <ul> |
| 94 | 125 | @ <li>%z(href("%R/help"))List of All Commands and Web Pages</a></li> |
| 95 | 126 | @ <li>%z(href("%R/test-all-help"))All "help" text on a single page</a></li> |
| 96 | 127 | @ <li>%z(href("%R/mimetype_list"))Filename suffix to mimetype map</a></li> |
| 97 | 128 | @ </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 | + } | |
| 104 | 137 | @ <li>Test Pages |
| 105 | 138 | @ <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 | + } | |
| 109 | 148 | @ <li>%z(href("%R/hash-color-test"))Page to experiment with the automatic |
| 110 | 149 | @ colors assigned to branch names</a> |
| 150 | + @ <li>%z(href("%R/test-captcha"))Random ASCII-art Captcha image</li> | |
| 111 | 151 | @ </ul></li> |
| 112 | 152 | @ </ul></li> |
| 113 | 153 | style_footer(); |
| 114 | 154 | } |
| 115 | 155 |
| --- 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 |
+6
| --- src/skins.c | ||
| +++ src/skins.c | ||
| @@ -407,10 +407,13 @@ | ||
| 407 | 407 | return 0; |
| 408 | 408 | } |
| 409 | 409 | |
| 410 | 410 | /* |
| 411 | 411 | ** WEBPAGE: setup_skin |
| 412 | +** | |
| 413 | +** Show a list of available skins with buttons for selecting which | |
| 414 | +** skin to use. Requires Admin privilege. | |
| 412 | 415 | */ |
| 413 | 416 | void setup_skin(void){ |
| 414 | 417 | const char *z; |
| 415 | 418 | char *zName; |
| 416 | 419 | char *zErr = 0; |
| @@ -565,10 +568,13 @@ | ||
| 565 | 568 | } |
| 566 | 569 | |
| 567 | 570 | |
| 568 | 571 | /* |
| 569 | 572 | ** WEBPAGE: setup_skinedit |
| 573 | +** | |
| 574 | +** Edit aspects of a skin determined by the w= query parameter. | |
| 575 | +** Requires Admin privileges. | |
| 570 | 576 | ** |
| 571 | 577 | ** w=N -- 0=CSS, 1=footer, 2=header, 3=details |
| 572 | 578 | */ |
| 573 | 579 | void setup_skinedit(void){ |
| 574 | 580 | static const struct sSkinAddr { |
| 575 | 581 |
| --- 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 @@ | ||
| 1360 | 1360 | } |
| 1361 | 1361 | |
| 1362 | 1362 | |
| 1363 | 1363 | /* |
| 1364 | 1364 | ** WEBPAGE: style.css |
| 1365 | +** | |
| 1366 | +** Return the style sheet. | |
| 1365 | 1367 | */ |
| 1366 | 1368 | void page_style_css(void){ |
| 1367 | 1369 | Blob css; |
| 1368 | 1370 | int i; |
| 1369 | 1371 | |
| @@ -1395,10 +1397,13 @@ | ||
| 1395 | 1397 | g.isConst = 1; |
| 1396 | 1398 | } |
| 1397 | 1399 | |
| 1398 | 1400 | /* |
| 1399 | 1401 | ** WEBPAGE: test_env |
| 1402 | +** | |
| 1403 | +** Display CGI-variables and other aspects of the run-time | |
| 1404 | +** environment, for debugging and trouble-shooting purposes. | |
| 1400 | 1405 | */ |
| 1401 | 1406 | void page_test_env(void){ |
| 1402 | 1407 | char c; |
| 1403 | 1408 | int i; |
| 1404 | 1409 | int showAll; |
| @@ -1466,13 +1471,12 @@ | ||
| 1466 | 1471 | style_footer(); |
| 1467 | 1472 | if( g.perm.Admin && P("err") ) fossil_fatal("%s", P("err")); |
| 1468 | 1473 | } |
| 1469 | 1474 | |
| 1470 | 1475 | /* |
| 1471 | -** This page is a honeypot for spiders and bots. | |
| 1472 | -** | |
| 1473 | 1476 | ** WEBPAGE: honeypot |
| 1477 | +** This page is a honeypot for spiders and bots. | |
| 1474 | 1478 | */ |
| 1475 | 1479 | void honeypot_page(void){ |
| 1476 | 1480 | cgi_set_status(403, "Forbidden"); |
| 1477 | 1481 | @ <p>Please enable javascript or log in to see this content</p> |
| 1478 | 1482 | } |
| 1479 | 1483 |
| --- 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 @@ | ||
| 536 | 536 | usage("add|cancel|find|list ..."); |
| 537 | 537 | } |
| 538 | 538 | |
| 539 | 539 | /* |
| 540 | 540 | ** WEBPAGE: taglist |
| 541 | +** | |
| 542 | +** List all non-propagating symbolic tags. | |
| 541 | 543 | */ |
| 542 | 544 | void taglist_page(void){ |
| 543 | 545 | Stmt q; |
| 544 | 546 | |
| 545 | 547 | login_check_credentials(); |
| @@ -575,10 +577,13 @@ | ||
| 575 | 577 | style_footer(); |
| 576 | 578 | } |
| 577 | 579 | |
| 578 | 580 | /* |
| 579 | 581 | ** WEBPAGE: /tagtimeline |
| 582 | +** | |
| 583 | +** Render a timeline with all check-ins that contain non-propagating | |
| 584 | +** symbolic tags. | |
| 580 | 585 | */ |
| 581 | 586 | void tagtimeline_page(void){ |
| 582 | 587 | Stmt q; |
| 583 | 588 | |
| 584 | 589 | login_check_credentials(); |
| 585 | 590 |
| --- 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 @@ | ||
| 163 | 163 | void test_hash_color_page(void){ |
| 164 | 164 | const char *zBr; |
| 165 | 165 | char zNm[10]; |
| 166 | 166 | int i, cnt; |
| 167 | 167 | login_check_credentials(); |
| 168 | - if( !g.perm.Read ){ login_needed(g.anon.Read); return; } | |
| 169 | 168 | |
| 170 | 169 | style_header("Hash Color Test"); |
| 171 | 170 | for(i=cnt=0; i<10; i++){ |
| 172 | 171 | sqlite3_snprintf(sizeof(zNm),zNm,"b%d",i); |
| 173 | 172 | zBr = P(zNm); |
| @@ -270,10 +269,11 @@ | ||
| 270 | 269 | int tagid = db_column_int(pQuery, 9); |
| 271 | 270 | const char *zDispUser = zUser && zUser[0] ? zUser : "anonymous"; |
| 272 | 271 | const char *zBr = 0; /* Branch */ |
| 273 | 272 | int commentColumn = 3; /* Column containing comment text */ |
| 274 | 273 | int modPending; /* Pending moderation */ |
| 274 | + char *zDateLink; /* URL for the link on the timestamp */ | |
| 275 | 275 | char zTime[20]; |
| 276 | 276 | |
| 277 | 277 | if( zDate==0 ){ |
| 278 | 278 | zDate = "YYYY-MM-DD HH:MM:SS"; /* Something wrong with the repo */ |
| 279 | 279 | } |
| @@ -351,11 +351,12 @@ | ||
| 351 | 351 | }else if( rid==vid ){ |
| 352 | 352 | @ <tr class="timelineCurrent"> |
| 353 | 353 | }else { |
| 354 | 354 | @ <tr> |
| 355 | 355 | } |
| 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> | |
| 357 | 358 | @ <td class="timelineGraph"> |
| 358 | 359 | if( tmFlags & TIMELINE_UCOLOR ) zBgClr = zUser ? hash_color(zUser) : 0; |
| 359 | 360 | if( zType[0]=='c' |
| 360 | 361 | && (pGraph || zBgClr==0 || (tmFlags & TIMELINE_BRCOLOR)!=0) |
| 361 | 362 | ){ |
| @@ -1215,10 +1216,11 @@ | ||
| 1215 | 1216 | ** shortest ... show only the shortest path |
| 1216 | 1217 | ** uf=FUUID Show only check-ins that use given file version |
| 1217 | 1218 | ** brbg Background color from branch name |
| 1218 | 1219 | ** ubg Background color from user |
| 1219 | 1220 | ** namechng Show only check-ins that filename changes |
| 1221 | +** forks Show only forks and their children | |
| 1220 | 1222 | ** ym=YYYY-MM Shown only events for the given year/month. |
| 1221 | 1223 | ** datefmt=N Override the date format |
| 1222 | 1224 | ** |
| 1223 | 1225 | ** p= and d= can appear individually or together. If either p= or d= |
| 1224 | 1226 | ** appear, then u=, y=, a=, and b= are ignored. |
| @@ -1248,10 +1250,11 @@ | ||
| 1248 | 1250 | const char *zUses = P("uf"); /* Only show check-ins hold this file */ |
| 1249 | 1251 | const char *zYearMonth = P("ym"); /* Show check-ins for the given YYYY-MM */ |
| 1250 | 1252 | const char *zYearWeek = P("yw"); /* Check-ins for YYYY-WW (week-of-year) */ |
| 1251 | 1253 | int useDividers = P("nd")==0; /* Show dividers if "nd" is missing */ |
| 1252 | 1254 | int renameOnly = P("namechng")!=0; /* Show only check-ins that rename files */ |
| 1255 | + int forkOnly = PB("forks"); /* Show only forks and their children */ | |
| 1253 | 1256 | int tagid; /* Tag ID */ |
| 1254 | 1257 | int tmFlags = 0; /* Timeline flags */ |
| 1255 | 1258 | const char *zThisTag = 0; /* Suppress links to this tag */ |
| 1256 | 1259 | const char *zThisUser = 0; /* Suppress links to this user */ |
| 1257 | 1260 | HQuery url; /* URL for various branch links */ |
| @@ -1354,10 +1357,30 @@ | ||
| 1354 | 1357 | "CREATE TEMP TABLE rnfile(rid INTEGER PRIMARY KEY);" |
| 1355 | 1358 | "INSERT OR IGNORE INTO rnfile" |
| 1356 | 1359 | " SELECT mid FROM mlink WHERE pfnid>0 AND pfnid!=fnid;" |
| 1357 | 1360 | ); |
| 1358 | 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; | |
| 1359 | 1382 | } |
| 1360 | 1383 | |
| 1361 | 1384 | style_header("Timeline"); |
| 1362 | 1385 | login_anonymous_available(); |
| 1363 | 1386 | timeline_temp_table(); |
| @@ -1484,10 +1507,13 @@ | ||
| 1484 | 1507 | blob_append_sql(&sql, " AND event.objid IN usesfile "); |
| 1485 | 1508 | } |
| 1486 | 1509 | if( renameOnly ){ |
| 1487 | 1510 | blob_append_sql(&sql, " AND event.objid IN rnfile "); |
| 1488 | 1511 | } |
| 1512 | + if( forkOnly ){ | |
| 1513 | + blob_append_sql(&sql, " AND event.objid IN rnfork "); | |
| 1514 | + } | |
| 1489 | 1515 | if( zYearMonth ){ |
| 1490 | 1516 | blob_append_sql(&sql, " AND %Q=strftime('%%Y-%%m',event.mtime) ", |
| 1491 | 1517 | zYearMonth); |
| 1492 | 1518 | } |
| 1493 | 1519 | else if( zYearWeek ){ |
| @@ -1656,10 +1682,14 @@ | ||
| 1656 | 1682 | } |
| 1657 | 1683 | if( renameOnly ){ |
| 1658 | 1684 | blob_appendf(&desc, " that contain filename changes"); |
| 1659 | 1685 | tmFlags |= TIMELINE_DISJOINT|TIMELINE_FRENAMES; |
| 1660 | 1686 | } |
| 1687 | + if( forkOnly ){ | |
| 1688 | + blob_appendf(&desc, " associated with forks"); | |
| 1689 | + tmFlags |= TIMELINE_DISJOINT; | |
| 1690 | + } | |
| 1661 | 1691 | if( zUser ){ |
| 1662 | 1692 | blob_appendf(&desc, " by user %h", zUser); |
| 1663 | 1693 | tmFlags |= TIMELINE_DISJOINT; |
| 1664 | 1694 | } |
| 1665 | 1695 | if( zTagName ){ |
| @@ -2204,10 +2234,15 @@ | ||
| 2204 | 2234 | db_finalize(&q); |
| 2205 | 2235 | } |
| 2206 | 2236 | |
| 2207 | 2237 | /* |
| 2208 | 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. | |
| 2209 | 2244 | */ |
| 2210 | 2245 | void test_timewarp_page(void){ |
| 2211 | 2246 | Stmt q; |
| 2212 | 2247 | |
| 2213 | 2248 | login_check_credentials(); |
| 2214 | 2249 |
| --- 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 @@ | ||
| 441 | 441 | |
| 442 | 442 | /* |
| 443 | 443 | ** WEBPAGE: tktview |
| 444 | 444 | ** URL: tktview?name=UUID |
| 445 | 445 | ** |
| 446 | -** View a ticket. | |
| 446 | +** View a ticket identified by the name= query parameter. | |
| 447 | 447 | */ |
| 448 | 448 | void tktview_page(void){ |
| 449 | 449 | const char *zScript; |
| 450 | 450 | char *zFullName; |
| 451 | 451 | const char *zUuid = PD("name",""); |
| 452 | 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. |
| 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 @@ | ||
| 21 | 21 | #include "config.h" |
| 22 | 22 | #include "tktsetup.h" |
| 23 | 23 | #include <assert.h> |
| 24 | 24 | |
| 25 | 25 | /* |
| 26 | -** Main sub-menu for configuring the ticketing system. | |
| 27 | 26 | ** WEBPAGE: tktsetup |
| 27 | +** Main sub-menu for configuring the ticketing system. | |
| 28 | 28 | */ |
| 29 | 29 | void tktsetup_page(void){ |
| 30 | 30 | login_check_credentials(); |
| 31 | 31 | if( !g.perm.Setup ){ |
| 32 | 32 | login_needed(0); |
| @@ -167,10 +167,12 @@ | ||
| 167 | 167 | style_footer(); |
| 168 | 168 | } |
| 169 | 169 | |
| 170 | 170 | /* |
| 171 | 171 | ** WEBPAGE: tktsetup_tab |
| 172 | +** Administrative page for defining the "ticket" table used | |
| 173 | +** to hold ticket information. | |
| 172 | 174 | */ |
| 173 | 175 | void tktsetup_tab_page(void){ |
| 174 | 176 | static const char zDesc[] = |
| 175 | 177 | @ Enter a valid CREATE TABLE statement for the "ticket" table. The |
| 176 | 178 | @ table must contain columns named "tkt_id", "tkt_uuid", and "tkt_mtime" |
| @@ -243,10 +245,12 @@ | ||
| 243 | 245 | return db_get("ticket-common", (char*)zDefaultTicketCommon); |
| 244 | 246 | } |
| 245 | 247 | |
| 246 | 248 | /* |
| 247 | 249 | ** WEBPAGE: tktsetup_com |
| 250 | +** Administrative page used to define TH1 script that is | |
| 251 | +** common to all ticket screens. | |
| 248 | 252 | */ |
| 249 | 253 | void tktsetup_com_page(void){ |
| 250 | 254 | static const char zDesc[] = |
| 251 | 255 | @ Enter TH1 script that initializes variables prior to generating |
| 252 | 256 | @ any of the ticket view, edit, or creation pages. |
| @@ -273,10 +277,12 @@ | ||
| 273 | 277 | return db_get("ticket-change", (char*)zDefaultTicketChange); |
| 274 | 278 | } |
| 275 | 279 | |
| 276 | 280 | /* |
| 277 | 281 | ** WEBPAGE: tktsetup_change |
| 282 | +** Adminstrative screen used to view or edit the TH1 script | |
| 283 | +** that shows ticket changes. | |
| 278 | 284 | */ |
| 279 | 285 | void tktsetup_change_page(void){ |
| 280 | 286 | static const char zDesc[] = |
| 281 | 287 | @ Enter TH1 script that runs after processing the ticket editing |
| 282 | 288 | @ and creation pages. |
| @@ -416,10 +422,12 @@ | ||
| 416 | 422 | return db_get("ticket-newpage", (char*)zDefaultNew); |
| 417 | 423 | } |
| 418 | 424 | |
| 419 | 425 | /* |
| 420 | 426 | ** WEBPAGE: tktsetup_newpage |
| 427 | +** Administrative page used to view or edit the TH1 script used | |
| 428 | +** to enter new tickets. | |
| 421 | 429 | */ |
| 422 | 430 | void tktsetup_newpage_page(void){ |
| 423 | 431 | static const char zDesc[] = |
| 424 | 432 | @ Enter HTML with embedded TH1 script that will render the "new ticket" |
| 425 | 433 | @ page |
| @@ -555,10 +563,12 @@ | ||
| 555 | 563 | return db_get("ticket-viewpage", (char*)zDefaultView); |
| 556 | 564 | } |
| 557 | 565 | |
| 558 | 566 | /* |
| 559 | 567 | ** WEBPAGE: tktsetup_viewpage |
| 568 | +** Administrative page used to view or edit the TH1 script that | |
| 569 | +** displays individual tickets. | |
| 560 | 570 | */ |
| 561 | 571 | void tktsetup_viewpage_page(void){ |
| 562 | 572 | static const char zDesc[] = |
| 563 | 573 | @ Enter HTML with embedded TH1 script that will render the "view ticket" page |
| 564 | 574 | ; |
| @@ -694,10 +704,12 @@ | ||
| 694 | 704 | return db_get("ticket-editpage", (char*)zDefaultEdit); |
| 695 | 705 | } |
| 696 | 706 | |
| 697 | 707 | /* |
| 698 | 708 | ** WEBPAGE: tktsetup_editpage |
| 709 | +** Administrative page for viewing or editing the TH1 script that | |
| 710 | +** drives the ticket editing page. | |
| 699 | 711 | */ |
| 700 | 712 | void tktsetup_editpage_page(void){ |
| 701 | 713 | static const char zDesc[] = |
| 702 | 714 | @ Enter HTML with embedded TH1 script that will render the "edit ticket" page |
| 703 | 715 | ; |
| @@ -748,10 +760,12 @@ | ||
| 748 | 760 | return db_get("ticket-reportlist", (char*)zDefaultReportList); |
| 749 | 761 | } |
| 750 | 762 | |
| 751 | 763 | /* |
| 752 | 764 | ** WEBPAGE: tktsetup_reportlist |
| 765 | +** Administrative page used to view or edit the TH1 script that | |
| 766 | +** defines the "report list" page. | |
| 753 | 767 | */ |
| 754 | 768 | void tktsetup_reportlist(void){ |
| 755 | 769 | static const char zDesc[] = |
| 756 | 770 | @ Enter HTML with embedded TH1 script that will render the "report list" page |
| 757 | 771 | ; |
| @@ -795,10 +809,13 @@ | ||
| 795 | 809 | return db_get("ticket-report-template", zDefaultReport); |
| 796 | 810 | } |
| 797 | 811 | |
| 798 | 812 | /* |
| 799 | 813 | ** WEBPAGE: tktsetup_rpttplt |
| 814 | +** | |
| 815 | +** Administrative page used to view or edit the ticket report | |
| 816 | +** template. | |
| 800 | 817 | */ |
| 801 | 818 | void tktsetup_rpttplt_page(void){ |
| 802 | 819 | static const char zDesc[] = |
| 803 | 820 | @ Enter the default ticket report format template. This is the |
| 804 | 821 | @ template report format that initially appears when creating a |
| @@ -836,10 +853,13 @@ | ||
| 836 | 853 | return db_get("ticket-key-template", (char*)zDefaultKey); |
| 837 | 854 | } |
| 838 | 855 | |
| 839 | 856 | /* |
| 840 | 857 | ** WEBPAGE: tktsetup_keytplt |
| 858 | +** | |
| 859 | +** Administrative page used to view or edit the Key template | |
| 860 | +** for tickets. | |
| 841 | 861 | */ |
| 842 | 862 | void tktsetup_keytplt_page(void){ |
| 843 | 863 | static const char zDesc[] = |
| 844 | 864 | @ Enter the default ticket report color-key template. This is the |
| 845 | 865 | @ the color-key that initially appears when creating a |
| @@ -856,10 +876,13 @@ | ||
| 856 | 876 | ); |
| 857 | 877 | } |
| 858 | 878 | |
| 859 | 879 | /* |
| 860 | 880 | ** WEBPAGE: tktsetup_timeline |
| 881 | +** | |
| 882 | +** Administrative page used ot configure how tickets are | |
| 883 | +** rendered on timeline views. | |
| 861 | 884 | */ |
| 862 | 885 | void tktsetup_timeline_page(void){ |
| 863 | 886 | login_check_credentials(); |
| 864 | 887 | if( !g.perm.Setup ){ |
| 865 | 888 | login_needed(0); |
| 866 | 889 |
| --- 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 @@ | ||
| 121 | 121 | int nOverwrite = 0; /* Number of unmanaged files overwritten */ |
| 122 | 122 | int nUpdate = 0; /* Number of changes of any kind */ |
| 123 | 123 | int width; /* Width of printed comment lines */ |
| 124 | 124 | Stmt mtimeXfer; /* Statement to transfer mtimes */ |
| 125 | 125 | const char *zWidth; /* Width option string value */ |
| 126 | - int isFork; | |
| 127 | 126 | |
| 128 | 127 | if( !internalUpdate ){ |
| 129 | 128 | undo_capture_command_line(); |
| 130 | 129 | url_proxy_options(); |
| 131 | 130 | } |
| @@ -176,14 +175,12 @@ | ||
| 176 | 175 | ** target as if VERSION were omitted and the --latest flag is present. |
| 177 | 176 | */ |
| 178 | 177 | latestFlag = 1; |
| 179 | 178 | }else{ |
| 180 | 179 | 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]); | |
| 185 | 182 | } |
| 186 | 183 | } |
| 187 | 184 | } |
| 188 | 185 | |
| 189 | 186 | /* If no VERSION is specified on the command-line, then look for a |
| @@ -519,14 +516,14 @@ | ||
| 519 | 516 | } |
| 520 | 517 | db_finalize(&q); |
| 521 | 518 | db_finalize(&mtimeXfer); |
| 522 | 519 | fossil_print("%.79c\n",'-'); |
| 523 | 520 | if( nUpdate==0 ){ |
| 524 | - isFork = show_common_info(tid, "checkout:", 1, 0); | |
| 521 | + show_common_info(tid, "checkout:", 1, 0); | |
| 525 | 522 | fossil_print("%-13s None. Already up-to-date\n", "changes:"); |
| 526 | 523 | }else{ |
| 527 | - isFork = show_common_info(tid, "updated-to:", 1, 0); | |
| 524 | + show_common_info(tid, "updated-to:", 1, 0); | |
| 528 | 525 | fossil_print("%-13s %d file%s modified.\n", "changes:", |
| 529 | 526 | nUpdate, nUpdate>1 ? "s" : ""); |
| 530 | 527 | } |
| 531 | 528 | |
| 532 | 529 | /* Report on conflicts |
| @@ -545,10 +542,11 @@ | ||
| 545 | 542 | fossil_warning("uncommitted %s against %S.", |
| 546 | 543 | zLabel, db_column_text(&q, 0)); |
| 547 | 544 | nMerge++; |
| 548 | 545 | } |
| 549 | 546 | db_finalize(&q); |
| 547 | + leaf_ambiguity_warning(tid, tid); | |
| 550 | 548 | |
| 551 | 549 | if( nConflict ){ |
| 552 | 550 | if( internalUpdate ){ |
| 553 | 551 | internalConflictCnt = nConflict; |
| 554 | 552 | nConflict = 0; |
| @@ -561,13 +559,10 @@ | ||
| 561 | 559 | nOverwrite); |
| 562 | 560 | } |
| 563 | 561 | if( nMerge ){ |
| 564 | 562 | fossil_warning("WARNING: %d uncommitted prior merges", nMerge); |
| 565 | 563 | } |
| 566 | - if( isFork ){ | |
| 567 | - fossil_warning("WARNING: ambiguous branch, please do a \"fossil merge\""); | |
| 568 | - } | |
| 569 | 564 | } |
| 570 | 565 | |
| 571 | 566 | /* |
| 572 | 567 | ** Clean up the mid and pid VFILE entries. Then commit the changes. |
| 573 | 568 | */ |
| 574 | 569 |
| --- 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 @@ | ||
| 410 | 410 | } |
| 411 | 411 | |
| 412 | 412 | /* |
| 413 | 413 | ** WEBPAGE: access_log |
| 414 | 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 | |
| 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) | |
| 418 | 423 | */ |
| 419 | 424 | void access_log_page(void){ |
| 420 | 425 | int y = atoi(PD("y","3")); |
| 421 | - int n = atoi(PD("n","50")); | |
| 426 | + int n = atoi(PD("n","200")); | |
| 422 | 427 | int skip = atoi(PD("o","0")); |
| 423 | 428 | Blob sql; |
| 424 | 429 | Stmt q; |
| 425 | 430 | int cnt = 0; |
| 426 | 431 | int rc; |
| 427 | 432 |
| --- 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 |
+5
| --- src/vfile.c | ||
| +++ src/vfile.c | ||
| @@ -916,10 +916,15 @@ | ||
| 916 | 916 | md5sum_finish(pOut); |
| 917 | 917 | } |
| 918 | 918 | |
| 919 | 919 | /* |
| 920 | 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. | |
| 921 | 926 | */ |
| 922 | 927 | void test_agg_cksum_cmd(void){ |
| 923 | 928 | int vid; |
| 924 | 929 | Blob hash, hash2; |
| 925 | 930 | db_must_be_within_tree(); |
| 926 | 931 |
| --- 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 @@ | ||
| 76 | 76 | |
| 77 | 77 | /* |
| 78 | 78 | ** WEBPAGE: home |
| 79 | 79 | ** WEBPAGE: index |
| 80 | 80 | ** WEBPAGE: not_found |
| 81 | +** | |
| 82 | +** The /home, /index, and /not_found pages all redirect to the homepage | |
| 83 | +** configured by the administrator. | |
| 81 | 84 | */ |
| 82 | 85 | void home_page(void){ |
| 83 | 86 | char *zPageName = db_get("project-name",0); |
| 84 | 87 | char *zIndexPage = db_get("index-page",0); |
| 85 | 88 | login_check_credentials(); |
| @@ -458,10 +461,12 @@ | ||
| 458 | 461 | } |
| 459 | 462 | |
| 460 | 463 | /* |
| 461 | 464 | ** WEBPAGE: wikiedit |
| 462 | 465 | ** URL: /wikiedit?name=PAGENAME |
| 466 | +** | |
| 467 | +** Edit a wiki page. | |
| 463 | 468 | */ |
| 464 | 469 | void wikiedit_page(void){ |
| 465 | 470 | char *zTag; |
| 466 | 471 | int rid = 0; |
| 467 | 472 | int isSandbox; |
| @@ -704,10 +709,12 @@ | ||
| 704 | 709 | } |
| 705 | 710 | |
| 706 | 711 | /* |
| 707 | 712 | ** WEBPAGE: wikiappend |
| 708 | 713 | ** URL: /wikiappend?name=PAGENAME&mimetype=MIMETYPE |
| 714 | +** | |
| 715 | +** Append text to the end of a wiki page. | |
| 709 | 716 | */ |
| 710 | 717 | void wikiappend_page(void){ |
| 711 | 718 | char *zTag; |
| 712 | 719 | int rid = 0; |
| 713 | 720 | int isSandbox; |
| @@ -995,10 +1002,12 @@ | ||
| 995 | 1002 | style_footer(); |
| 996 | 1003 | } |
| 997 | 1004 | |
| 998 | 1005 | /* |
| 999 | 1006 | ** WEBPAGE: wiki_rules |
| 1007 | +** | |
| 1008 | +** Show the formatting rules for Fossil wiki. | |
| 1000 | 1009 | */ |
| 1001 | 1010 | void wikirules_page(void){ |
| 1002 | 1011 | style_header("Wiki Formatting Rules"); |
| 1003 | 1012 | @ <h2>Formatting Rule Summary</h2> |
| 1004 | 1013 | @ <ol> |
| 1005 | 1014 |
| --- 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 |
+12
| --- src/wikiformat.c | ||
| +++ src/wikiformat.c | ||
| @@ -2094,10 +2094,13 @@ | ||
| 2094 | 2094 | if( iCur ) blob_append(pOut, "\n", 1); |
| 2095 | 2095 | } |
| 2096 | 2096 | |
| 2097 | 2097 | /* |
| 2098 | 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. | |
| 2099 | 2102 | */ |
| 2100 | 2103 | void test_html_tidy(void){ |
| 2101 | 2104 | Blob in, out; |
| 2102 | 2105 | int i; |
| 2103 | 2106 | |
| @@ -2212,10 +2215,19 @@ | ||
| 2212 | 2215 | if( nNL==0 ) blob_append(pOut, "\n", 1); |
| 2213 | 2216 | } |
| 2214 | 2217 | |
| 2215 | 2218 | /* |
| 2216 | 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. | |
| 2217 | 2229 | */ |
| 2218 | 2230 | void test_html_to_text(void){ |
| 2219 | 2231 | Blob in, out; |
| 2220 | 2232 | int i; |
| 2221 | 2233 | |
| 2222 | 2234 |
| --- 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 @@ | ||
| 1974 | 1974 | content_enable_dephantomize(1); |
| 1975 | 1975 | db_end_transaction(0); |
| 1976 | 1976 | } |
| 1977 | 1977 | if( (syncFlags & SYNC_CLONE)==0 && fossil_any_has_fork(g.rcvid) ){ |
| 1978 | 1978 | fossil_warning("***** WARNING: an ambiguous branch has occurred *****\n" |
| 1979 | - "Use \"fossil info\" for more details."); | |
| 1979 | + "use \"fossil leaves -multiple\" for more details."); | |
| 1980 | 1980 | } |
| 1981 | 1981 | return nErr; |
| 1982 | 1982 | } |
| 1983 | 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 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 @@ | ||
| 1974 | 1974 | content_enable_dephantomize(1); |
| 1975 | 1975 | db_end_transaction(0); |
| 1976 | 1976 | } |
| 1977 | 1977 | if( (syncFlags & SYNC_CLONE)==0 && fossil_any_has_fork(g.rcvid) ){ |
| 1978 | 1978 | fossil_warning("***** WARNING: an ambiguous branch has occurred *****\n" |
| 1979 | - "Use \"fossil info\" for more details."); | |
| 1979 | + "use \"fossil leaves -multiple\" for more details."); | |
| 1980 | 1980 | } |
| 1981 | 1981 | return nErr; |
| 1982 | 1982 | } |
| 1983 | 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 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 @@ | ||
| 21 | 21 | #include "config.h" |
| 22 | 22 | #include "xfersetup.h" |
| 23 | 23 | #include <assert.h> |
| 24 | 24 | |
| 25 | 25 | /* |
| 26 | -** Main sub-menu for configuring the transfer system. | |
| 27 | 26 | ** WEBPAGE: xfersetup |
| 27 | +** Main sub-menu for configuring the transfer system. | |
| 28 | 28 | */ |
| 29 | 29 | void xfersetup_page(void){ |
| 30 | 30 | login_check_credentials(); |
| 31 | 31 | if( !g.perm.Setup ){ |
| 32 | 32 | login_needed(0); |
| @@ -157,10 +157,12 @@ | ||
| 157 | 157 | |
| 158 | 158 | static const char *zDefaultXferCommon = 0; |
| 159 | 159 | |
| 160 | 160 | /* |
| 161 | 161 | ** WEBPAGE: xfersetup_com |
| 162 | +** View or edit the TH1 script that runs prior to receiving a | |
| 163 | +** transfer. | |
| 162 | 164 | */ |
| 163 | 165 | void xfersetup_com_page(void){ |
| 164 | 166 | static const char zDesc[] = |
| 165 | 167 | @ Enter TH1 script that initializes variables prior to running |
| 166 | 168 | @ any of the transfer request scripts. |
| @@ -178,10 +180,11 @@ | ||
| 178 | 180 | |
| 179 | 181 | static const char *zDefaultXferPush = 0; |
| 180 | 182 | |
| 181 | 183 | /* |
| 182 | 184 | ** WEBPAGE: xfersetup_push |
| 185 | +** View or edit the TH1 script that runs after receiving a "push". | |
| 183 | 186 | */ |
| 184 | 187 | void xfersetup_push_page(void){ |
| 185 | 188 | static const char zDesc[] = |
| 186 | 189 | @ Enter TH1 script that runs after processing <strong>push</strong> |
| 187 | 190 | @ transfer requests. |
| @@ -199,10 +202,12 @@ | ||
| 199 | 202 | |
| 200 | 203 | static const char *zDefaultXferCommit = 0; |
| 201 | 204 | |
| 202 | 205 | /* |
| 203 | 206 | ** WEBPAGE: xfersetup_commit |
| 207 | +** View or edit the TH1 script that runs when a transfer commit | |
| 208 | +** is processed. | |
| 204 | 209 | */ |
| 205 | 210 | void xfersetup_commit_page(void){ |
| 206 | 211 | static const char zDesc[] = |
| 207 | 212 | @ Enter TH1 script that runs when a commit is processed. |
| 208 | 213 | ; |
| @@ -219,10 +224,12 @@ | ||
| 219 | 224 | |
| 220 | 225 | static const char *zDefaultXferTicket = 0; |
| 221 | 226 | |
| 222 | 227 | /* |
| 223 | 228 | ** WEBPAGE: xfersetup_ticket |
| 229 | +** View or edit the TH1 script that runs when a ticket change artifact | |
| 230 | +** is processed during a transfer. | |
| 224 | 231 | */ |
| 225 | 232 | void xfersetup_ticket_page(void){ |
| 226 | 233 | static const char zDesc[] = |
| 227 | 234 | @ Enter TH1 script that runs when a ticket change is processed. |
| 228 | 235 | ; |
| 229 | 236 |
| --- 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 |
+2
-1
| --- www/changes.wiki | ||
| +++ www/changes.wiki | ||
| @@ -11,11 +11,12 @@ | ||
| 11 | 11 | or HTML. |
| 12 | 12 | * Formally translate TH1 to Tcl return codes and vice-versa, where |
| 13 | 13 | necessary, in the Tcl integration subsystem. |
| 14 | 14 | * Better fork detection on [/help?cmd=update|fossil update], |
| 15 | 15 | [/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. | |
| 17 | 18 | |
| 18 | 19 | <h2>Changes for Version 1.32 (2015-03-14)</h2> |
| 19 | 20 | * When creating a new repository using [/help?cmd=init|fossil init], ensure |
| 20 | 21 | that the new repository is fully compatible with historical versions of |
| 21 | 22 | Fossil by having a valid manifest as RID 1. |
| 22 | 23 |
| --- 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 |