Fossil SCM
Start a new branch that strives to contain only code for which we hold clear title.
Commit
ab0a0d7640af00faa6da3a44ce807c5d28d86b5a
Parent
bf56b2ddf4082e7…
13 files changed
+2
-2
+2
-6
+3
-3
+30
-33
+8
-270
-1
+6
-166
-11
+2
-22
-2
-82
-92
+2
-2
| --- src/add.c | ||
| +++ src/add.c | ||
| @@ -229,12 +229,12 @@ | ||
| 229 | 229 | ** Usage: %fossil mv|rename OLDNAME NEWNAME |
| 230 | 230 | ** or: %fossil mv|rename OLDNAME... DIR |
| 231 | 231 | ** |
| 232 | 232 | ** Move or rename one or more files within the tree |
| 233 | 233 | ** |
| 234 | -** This command does not rename the files on disk. All this command does is | |
| 235 | -** record the fact that filenames have changed so that appropriate notations | |
| 234 | +** This command does not rename the files on disk. This command merely | |
| 235 | +** records the fact that filenames have changed so that appropriate notations | |
| 236 | 236 | ** can be made at the next commit/checkin. |
| 237 | 237 | */ |
| 238 | 238 | void mv_cmd(void){ |
| 239 | 239 | int i; |
| 240 | 240 | int vid; |
| 241 | 241 |
| --- src/add.c | |
| +++ src/add.c | |
| @@ -229,12 +229,12 @@ | |
| 229 | ** Usage: %fossil mv|rename OLDNAME NEWNAME |
| 230 | ** or: %fossil mv|rename OLDNAME... DIR |
| 231 | ** |
| 232 | ** Move or rename one or more files within the tree |
| 233 | ** |
| 234 | ** This command does not rename the files on disk. All this command does is |
| 235 | ** record the fact that filenames have changed so that appropriate notations |
| 236 | ** can be made at the next commit/checkin. |
| 237 | */ |
| 238 | void mv_cmd(void){ |
| 239 | int i; |
| 240 | int vid; |
| 241 |
| --- src/add.c | |
| +++ src/add.c | |
| @@ -229,12 +229,12 @@ | |
| 229 | ** Usage: %fossil mv|rename OLDNAME NEWNAME |
| 230 | ** or: %fossil mv|rename OLDNAME... DIR |
| 231 | ** |
| 232 | ** Move or rename one or more files within the tree |
| 233 | ** |
| 234 | ** This command does not rename the files on disk. This command merely |
| 235 | ** records the fact that filenames have changed so that appropriate notations |
| 236 | ** can be made at the next commit/checkin. |
| 237 | */ |
| 238 | void mv_cmd(void){ |
| 239 | int i; |
| 240 | int vid; |
| 241 |
+2
-6
| --- src/allrepo.c | ||
| +++ src/allrepo.c | ||
| @@ -62,13 +62,11 @@ | ||
| 62 | 62 | ** The ~/.fossil file records the location of all repositories for a |
| 63 | 63 | ** user. This command performs certain operations on all repositories |
| 64 | 64 | ** that can be useful before or after a period of disconnection operation. |
| 65 | 65 | ** Available operations are: |
| 66 | 66 | ** |
| 67 | -** list Display the location of all repositories | |
| 68 | -** | |
| 69 | -** ls An alias for "list" | |
| 67 | +** list | ls Display the location of all repositories | |
| 70 | 68 | ** |
| 71 | 69 | ** pull Run a "pull" operation on all repositories |
| 72 | 70 | ** |
| 73 | 71 | ** push Run a "push" on all repositories |
| 74 | 72 | ** |
| @@ -93,13 +91,11 @@ | ||
| 93 | 91 | usage("list|ls|pull|push|rebuild|sync"); |
| 94 | 92 | } |
| 95 | 93 | n = strlen(g.argv[2]); |
| 96 | 94 | db_open_config(1); |
| 97 | 95 | zCmd = g.argv[2]; |
| 98 | - if( strncmp(zCmd, "list", n)==0 ){ | |
| 99 | - zCmd = "list"; | |
| 100 | - }else if( strncmp(zCmd, "ls", n)==0 ){ /* alias for "list" above */ | |
| 96 | + if( strncmp(zCmd, "list", n)==0 || strncmp(zCmd,"ls",n)==0 ){ | |
| 101 | 97 | zCmd = "list"; |
| 102 | 98 | }else if( strncmp(zCmd, "push", n)==0 ){ |
| 103 | 99 | zCmd = "push -autourl -R"; |
| 104 | 100 | }else if( strncmp(zCmd, "pull", n)==0 ){ |
| 105 | 101 | zCmd = "pull -autourl -R"; |
| 106 | 102 |
| --- src/allrepo.c | |
| +++ src/allrepo.c | |
| @@ -62,13 +62,11 @@ | |
| 62 | ** The ~/.fossil file records the location of all repositories for a |
| 63 | ** user. This command performs certain operations on all repositories |
| 64 | ** that can be useful before or after a period of disconnection operation. |
| 65 | ** Available operations are: |
| 66 | ** |
| 67 | ** list Display the location of all repositories |
| 68 | ** |
| 69 | ** ls An alias for "list" |
| 70 | ** |
| 71 | ** pull Run a "pull" operation on all repositories |
| 72 | ** |
| 73 | ** push Run a "push" on all repositories |
| 74 | ** |
| @@ -93,13 +91,11 @@ | |
| 93 | usage("list|ls|pull|push|rebuild|sync"); |
| 94 | } |
| 95 | n = strlen(g.argv[2]); |
| 96 | db_open_config(1); |
| 97 | zCmd = g.argv[2]; |
| 98 | if( strncmp(zCmd, "list", n)==0 ){ |
| 99 | zCmd = "list"; |
| 100 | }else if( strncmp(zCmd, "ls", n)==0 ){ /* alias for "list" above */ |
| 101 | zCmd = "list"; |
| 102 | }else if( strncmp(zCmd, "push", n)==0 ){ |
| 103 | zCmd = "push -autourl -R"; |
| 104 | }else if( strncmp(zCmd, "pull", n)==0 ){ |
| 105 | zCmd = "pull -autourl -R"; |
| 106 |
| --- src/allrepo.c | |
| +++ src/allrepo.c | |
| @@ -62,13 +62,11 @@ | |
| 62 | ** The ~/.fossil file records the location of all repositories for a |
| 63 | ** user. This command performs certain operations on all repositories |
| 64 | ** that can be useful before or after a period of disconnection operation. |
| 65 | ** Available operations are: |
| 66 | ** |
| 67 | ** list | ls Display the location of all repositories |
| 68 | ** |
| 69 | ** pull Run a "pull" operation on all repositories |
| 70 | ** |
| 71 | ** push Run a "push" on all repositories |
| 72 | ** |
| @@ -93,13 +91,11 @@ | |
| 91 | usage("list|ls|pull|push|rebuild|sync"); |
| 92 | } |
| 93 | n = strlen(g.argv[2]); |
| 94 | db_open_config(1); |
| 95 | zCmd = g.argv[2]; |
| 96 | if( strncmp(zCmd, "list", n)==0 || strncmp(zCmd,"ls",n)==0 ){ |
| 97 | zCmd = "list"; |
| 98 | }else if( strncmp(zCmd, "push", n)==0 ){ |
| 99 | zCmd = "push -autourl -R"; |
| 100 | }else if( strncmp(zCmd, "pull", n)==0 ){ |
| 101 | zCmd = "pull -autourl -R"; |
| 102 |
+3
-3
| --- src/branch.c | ||
| +++ src/branch.c | ||
| @@ -49,11 +49,11 @@ | ||
| 49 | 49 | |
| 50 | 50 | noSign = find_option("nosign","",0)!=0; |
| 51 | 51 | zColor = find_option("bgcolor","c",1); |
| 52 | 52 | verify_all_options(); |
| 53 | 53 | if( g.argc<5 ){ |
| 54 | - usage("new BRANCH-NAME BASE-CHECK-IN ?-bgcolor COLOR?"); | |
| 54 | + usage("new BRANCH-NAME CHECK-IN ?-bgcolor COLOR?"); | |
| 55 | 55 | } |
| 56 | 56 | db_find_and_open_repository(1); |
| 57 | 57 | noSign = db_get_int("omitsign", 0)|noSign; |
| 58 | 58 | |
| 59 | 59 | /* fossil branch new name */ |
| @@ -122,11 +122,11 @@ | ||
| 122 | 122 | " AND tagtype>0 AND tagname GLOB 'sym-*'" |
| 123 | 123 | " ORDER BY tagname", |
| 124 | 124 | rootid); |
| 125 | 125 | while( db_step(&q)==SQLITE_ROW ){ |
| 126 | 126 | const char *zTag = db_column_text(&q, 0); |
| 127 | - blob_appendf(&branch, "T -%F *\n", zTag); | |
| 127 | + blob_appendf(&branch, "T -%F *\n", zTag); | |
| 128 | 128 | } |
| 129 | 129 | db_finalize(&q); |
| 130 | 130 | |
| 131 | 131 | blob_appendf(&branch, "U %F\n", g.zLogin); |
| 132 | 132 | md5sum_blob(&branch, &mcksum); |
| @@ -174,11 +174,11 @@ | ||
| 174 | 174 | /* |
| 175 | 175 | ** COMMAND: branch |
| 176 | 176 | ** |
| 177 | 177 | ** Usage: %fossil branch SUBCOMMAND ... ?-R|--repository FILE? |
| 178 | 178 | ** |
| 179 | -** Run various subcommands on the branches of the open repository or | |
| 179 | +** Run various subcommands to manage branches of the open repository or | |
| 180 | 180 | ** of the repository identified by the -R or --repository option. |
| 181 | 181 | ** |
| 182 | 182 | ** %fossil branch new BRANCH-NAME BASIS ?-bgcolor COLOR? |
| 183 | 183 | ** |
| 184 | 184 | ** Create a new branch BRANCH-NAME off of check-in BASIS. |
| 185 | 185 |
| --- src/branch.c | |
| +++ src/branch.c | |
| @@ -49,11 +49,11 @@ | |
| 49 | |
| 50 | noSign = find_option("nosign","",0)!=0; |
| 51 | zColor = find_option("bgcolor","c",1); |
| 52 | verify_all_options(); |
| 53 | if( g.argc<5 ){ |
| 54 | usage("new BRANCH-NAME BASE-CHECK-IN ?-bgcolor COLOR?"); |
| 55 | } |
| 56 | db_find_and_open_repository(1); |
| 57 | noSign = db_get_int("omitsign", 0)|noSign; |
| 58 | |
| 59 | /* fossil branch new name */ |
| @@ -122,11 +122,11 @@ | |
| 122 | " AND tagtype>0 AND tagname GLOB 'sym-*'" |
| 123 | " ORDER BY tagname", |
| 124 | rootid); |
| 125 | while( db_step(&q)==SQLITE_ROW ){ |
| 126 | const char *zTag = db_column_text(&q, 0); |
| 127 | blob_appendf(&branch, "T -%F *\n", zTag); |
| 128 | } |
| 129 | db_finalize(&q); |
| 130 | |
| 131 | blob_appendf(&branch, "U %F\n", g.zLogin); |
| 132 | md5sum_blob(&branch, &mcksum); |
| @@ -174,11 +174,11 @@ | |
| 174 | /* |
| 175 | ** COMMAND: branch |
| 176 | ** |
| 177 | ** Usage: %fossil branch SUBCOMMAND ... ?-R|--repository FILE? |
| 178 | ** |
| 179 | ** Run various subcommands on the branches of the open repository or |
| 180 | ** of the repository identified by the -R or --repository option. |
| 181 | ** |
| 182 | ** %fossil branch new BRANCH-NAME BASIS ?-bgcolor COLOR? |
| 183 | ** |
| 184 | ** Create a new branch BRANCH-NAME off of check-in BASIS. |
| 185 |
| --- src/branch.c | |
| +++ src/branch.c | |
| @@ -49,11 +49,11 @@ | |
| 49 | |
| 50 | noSign = find_option("nosign","",0)!=0; |
| 51 | zColor = find_option("bgcolor","c",1); |
| 52 | verify_all_options(); |
| 53 | if( g.argc<5 ){ |
| 54 | usage("new BRANCH-NAME CHECK-IN ?-bgcolor COLOR?"); |
| 55 | } |
| 56 | db_find_and_open_repository(1); |
| 57 | noSign = db_get_int("omitsign", 0)|noSign; |
| 58 | |
| 59 | /* fossil branch new name */ |
| @@ -122,11 +122,11 @@ | |
| 122 | " AND tagtype>0 AND tagname GLOB 'sym-*'" |
| 123 | " ORDER BY tagname", |
| 124 | rootid); |
| 125 | while( db_step(&q)==SQLITE_ROW ){ |
| 126 | const char *zTag = db_column_text(&q, 0); |
| 127 | blob_appendf(&branch, "T -%F *\n", zTag); |
| 128 | } |
| 129 | db_finalize(&q); |
| 130 | |
| 131 | blob_appendf(&branch, "U %F\n", g.zLogin); |
| 132 | md5sum_blob(&branch, &mcksum); |
| @@ -174,11 +174,11 @@ | |
| 174 | /* |
| 175 | ** COMMAND: branch |
| 176 | ** |
| 177 | ** Usage: %fossil branch SUBCOMMAND ... ?-R|--repository FILE? |
| 178 | ** |
| 179 | ** Run various subcommands to manage branches of the open repository or |
| 180 | ** of the repository identified by the -R or --repository option. |
| 181 | ** |
| 182 | ** %fossil branch new BRANCH-NAME BASIS ?-bgcolor COLOR? |
| 183 | ** |
| 184 | ** Create a new branch BRANCH-NAME off of check-in BASIS. |
| 185 |
+30
-33
| --- src/cgi.c | ||
| +++ src/cgi.c | ||
| @@ -27,25 +27,25 @@ | ||
| 27 | 27 | ** formatting function and its cousins, and routines to encode and |
| 28 | 28 | ** decode strings in HTML or HTTP. |
| 29 | 29 | */ |
| 30 | 30 | #include "config.h" |
| 31 | 31 | #ifdef __MINGW32__ |
| 32 | -# include <windows.h> /* for Sleep once server works again */ | |
| 33 | -# include <winsock2.h> /* socket operations */ | |
| 34 | -# define sleep Sleep /* windows does not have sleep, but Sleep */ | |
| 35 | -# include <ws2tcpip.h> | |
| 32 | +# include <windows.h> /* for Sleep once server works again */ | |
| 33 | +# include <winsock2.h> /* socket operations */ | |
| 34 | +# define sleep Sleep /* windows does not have sleep, but Sleep */ | |
| 35 | +# include <ws2tcpip.h> | |
| 36 | 36 | #else |
| 37 | -# include <sys/socket.h> | |
| 38 | -# include <netinet/in.h> | |
| 39 | -# include <arpa/inet.h> | |
| 40 | -# include <sys/times.h> | |
| 41 | -# include <sys/time.h> | |
| 42 | -# include <sys/wait.h> | |
| 43 | -# include <sys/select.h> | |
| 37 | +# include <sys/socket.h> | |
| 38 | +# include <netinet/in.h> | |
| 39 | +# include <arpa/inet.h> | |
| 40 | +# include <sys/times.h> | |
| 41 | +# include <sys/time.h> | |
| 42 | +# include <sys/wait.h> | |
| 43 | +# include <sys/select.h> | |
| 44 | 44 | #endif |
| 45 | 45 | #ifdef __EMX__ |
| 46 | - typedef int socklen_t; | |
| 46 | + typedef int socklen_t; | |
| 47 | 47 | #endif |
| 48 | 48 | #include <time.h> |
| 49 | 49 | #include <stdio.h> |
| 50 | 50 | #include <stdlib.h> |
| 51 | 51 | #include <unistd.h> |
| @@ -195,17 +195,14 @@ | ||
| 195 | 195 | const char *zPath, /* Path cookie applies to. NULL means "/" */ |
| 196 | 196 | int lifetime /* Expiration of the cookie in seconds from now */ |
| 197 | 197 | ){ |
| 198 | 198 | if( zPath==0 ) zPath = g.zTop; |
| 199 | 199 | if( lifetime>0 ){ |
| 200 | - char *zDate; | |
| 201 | 200 | lifetime += (int)time(0); |
| 202 | - zDate = cgi_rfc822_datestamp(lifetime); | |
| 203 | 201 | blob_appendf(&extraHeader, |
| 204 | - "Set-Cookie: %s=%t; Path=%s; expires=%s; Version=1\r\n", | |
| 205 | - zName, zValue, zPath, zDate); | |
| 206 | - if( zDate[0] ) free( zDate ); | |
| 202 | + "Set-Cookie: %s=%t; Path=%s; expires=%z; Version=1\r\n", | |
| 203 | + zName, zValue, zPath, cgi_rfc822_datestamp(lifetime)); | |
| 207 | 204 | }else{ |
| 208 | 205 | blob_appendf(&extraHeader, |
| 209 | 206 | "Set-Cookie: %s=%t; Path=%s; Version=1\r\n", |
| 210 | 207 | zName, zValue, zPath); |
| 211 | 208 | } |
| @@ -266,11 +263,11 @@ | ||
| 266 | 263 | |
| 267 | 264 | /* |
| 268 | 265 | ** Do a normal HTTP reply |
| 269 | 266 | */ |
| 270 | 267 | void cgi_reply(void){ |
| 271 | - int total_size = 0; | |
| 268 | + int total_size; | |
| 272 | 269 | if( iReplyStatus<=0 ){ |
| 273 | 270 | iReplyStatus = 200; |
| 274 | 271 | zReplyStatus = "OK"; |
| 275 | 272 | } |
| 276 | 273 | |
| @@ -284,14 +281,12 @@ | ||
| 284 | 281 | zReplyStatus = "Not Modified"; |
| 285 | 282 | } |
| 286 | 283 | #endif |
| 287 | 284 | |
| 288 | 285 | if( g.fullHttpReply ){ |
| 289 | - char *zDate = cgi_rfc822_datestamp(time(0)); | |
| 290 | 286 | fprintf(g.httpOut, "HTTP/1.0 %d %s\r\n", iReplyStatus, zReplyStatus); |
| 291 | - fprintf(g.httpOut, "Date: %s\r\n", zDate ); | |
| 292 | - if( zDate[0] ) free( zDate ); | |
| 287 | + fprintf(g.httpOut, "Date: %s\r\n", cgi_rfc822_datestamp(time(0))); | |
| 293 | 288 | fprintf(g.httpOut, "Connection: close\r\n"); |
| 294 | 289 | }else{ |
| 295 | 290 | fprintf(g.httpOut, "Status: %d %s\r\n", iReplyStatus, zReplyStatus); |
| 296 | 291 | } |
| 297 | 292 | |
| @@ -308,13 +303,11 @@ | ||
| 308 | 303 | ** stale cache is the least of the problem. So we provide an Expires |
| 309 | 304 | ** header set to a reasonable period (default: one week). |
| 310 | 305 | */ |
| 311 | 306 | /*time_t expires = time(0) + atoi(db_config("constant_expires","604800"));*/ |
| 312 | 307 | time_t expires = time(0) + 604800; |
| 313 | - char * zDate = cgi_rfc822_datestamp(expires); | |
| 314 | - fprintf(g.httpOut, "Expires: %s\r\n", zDate ); | |
| 315 | - if( zDate[0] ) free( zDate ); | |
| 308 | + fprintf(g.httpOut, "Expires: %s\r\n", cgi_rfc822_datestamp(expires)); | |
| 316 | 309 | } |
| 317 | 310 | |
| 318 | 311 | /* Content intended for logged in users should only be cached in |
| 319 | 312 | ** the browser, not some shared location. |
| 320 | 313 | */ |
| @@ -326,10 +319,12 @@ | ||
| 326 | 319 | } |
| 327 | 320 | |
| 328 | 321 | if( iReplyStatus != 304 ) { |
| 329 | 322 | total_size = blob_size(&cgiContent[0]) + blob_size(&cgiContent[1]); |
| 330 | 323 | fprintf(g.httpOut, "Content-Length: %d\r\n", total_size); |
| 324 | + }else{ | |
| 325 | + total_size = 0; | |
| 331 | 326 | } |
| 332 | 327 | fprintf(g.httpOut, "\r\n"); |
| 333 | 328 | if( total_size>0 && iReplyStatus != 304 ){ |
| 334 | 329 | int i, size; |
| 335 | 330 | for(i=0; i<2; i++){ |
| @@ -1287,26 +1282,28 @@ | ||
| 1287 | 1282 | {"Jan", "Feb", "Mar", "Apr", "May", "Jun", |
| 1288 | 1283 | "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", 0}; |
| 1289 | 1284 | |
| 1290 | 1285 | |
| 1291 | 1286 | /* |
| 1292 | -** Returns an RFC822-formatted time string suitable for HTTP headers, among | |
| 1293 | -** other things. | |
| 1294 | -** Returned timezone is always GMT as required by HTTP/1.1 specification. | |
| 1295 | -** The returned string is allocated with malloc() and must be freed | |
| 1296 | -** with free(). | |
| 1287 | +** Returns an RFC822-formatted time string suitable for HTTP headers. | |
| 1288 | +** The timezone is always GMT. The value returned is always a | |
| 1289 | +** string obtained from mprintf() and must be freed using free() to | |
| 1290 | +** avoid a memory leak. | |
| 1297 | 1291 | ** |
| 1298 | 1292 | ** See http://www.faqs.org/rfcs/rfc822.html, section 5 |
| 1299 | 1293 | ** and http://www.faqs.org/rfcs/rfc2616.html, section 3.3. |
| 1300 | 1294 | */ |
| 1301 | 1295 | char *cgi_rfc822_datestamp(time_t now){ |
| 1302 | 1296 | struct tm *pTm; |
| 1303 | 1297 | pTm = gmtime(&now); |
| 1304 | - if( pTm==0 ) return ""; | |
| 1305 | - return mprintf("%s, %d %s %02d %02d:%02d:%02d GMT", | |
| 1306 | - azDays[pTm->tm_wday], pTm->tm_mday, azMonths[pTm->tm_mon], | |
| 1307 | - pTm->tm_year+1900, pTm->tm_hour, pTm->tm_min, pTm->tm_sec); | |
| 1298 | + if( pTm==0 ){ | |
| 1299 | + return mprintf(""); | |
| 1300 | + }else{ | |
| 1301 | + return mprintf("%s, %d %s %02d %02d:%02d:%02d GMT", | |
| 1302 | + azDays[pTm->tm_wday], pTm->tm_mday, azMonths[pTm->tm_mon], | |
| 1303 | + pTm->tm_year+1900, pTm->tm_hour, pTm->tm_min, pTm->tm_sec); | |
| 1304 | + } | |
| 1308 | 1305 | } |
| 1309 | 1306 | |
| 1310 | 1307 | /* |
| 1311 | 1308 | ** Parse an RFC822-formatted timestamp as we'd expect from HTTP and return |
| 1312 | 1309 | ** a Unix epoch time. <= zero is returned on failure. |
| 1313 | 1310 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -27,25 +27,25 @@ | |
| 27 | ** formatting function and its cousins, and routines to encode and |
| 28 | ** decode strings in HTML or HTTP. |
| 29 | */ |
| 30 | #include "config.h" |
| 31 | #ifdef __MINGW32__ |
| 32 | # include <windows.h> /* for Sleep once server works again */ |
| 33 | # include <winsock2.h> /* socket operations */ |
| 34 | # define sleep Sleep /* windows does not have sleep, but Sleep */ |
| 35 | # include <ws2tcpip.h> |
| 36 | #else |
| 37 | # include <sys/socket.h> |
| 38 | # include <netinet/in.h> |
| 39 | # include <arpa/inet.h> |
| 40 | # include <sys/times.h> |
| 41 | # include <sys/time.h> |
| 42 | # include <sys/wait.h> |
| 43 | # include <sys/select.h> |
| 44 | #endif |
| 45 | #ifdef __EMX__ |
| 46 | typedef int socklen_t; |
| 47 | #endif |
| 48 | #include <time.h> |
| 49 | #include <stdio.h> |
| 50 | #include <stdlib.h> |
| 51 | #include <unistd.h> |
| @@ -195,17 +195,14 @@ | |
| 195 | const char *zPath, /* Path cookie applies to. NULL means "/" */ |
| 196 | int lifetime /* Expiration of the cookie in seconds from now */ |
| 197 | ){ |
| 198 | if( zPath==0 ) zPath = g.zTop; |
| 199 | if( lifetime>0 ){ |
| 200 | char *zDate; |
| 201 | lifetime += (int)time(0); |
| 202 | zDate = cgi_rfc822_datestamp(lifetime); |
| 203 | blob_appendf(&extraHeader, |
| 204 | "Set-Cookie: %s=%t; Path=%s; expires=%s; Version=1\r\n", |
| 205 | zName, zValue, zPath, zDate); |
| 206 | if( zDate[0] ) free( zDate ); |
| 207 | }else{ |
| 208 | blob_appendf(&extraHeader, |
| 209 | "Set-Cookie: %s=%t; Path=%s; Version=1\r\n", |
| 210 | zName, zValue, zPath); |
| 211 | } |
| @@ -266,11 +263,11 @@ | |
| 266 | |
| 267 | /* |
| 268 | ** Do a normal HTTP reply |
| 269 | */ |
| 270 | void cgi_reply(void){ |
| 271 | int total_size = 0; |
| 272 | if( iReplyStatus<=0 ){ |
| 273 | iReplyStatus = 200; |
| 274 | zReplyStatus = "OK"; |
| 275 | } |
| 276 | |
| @@ -284,14 +281,12 @@ | |
| 284 | zReplyStatus = "Not Modified"; |
| 285 | } |
| 286 | #endif |
| 287 | |
| 288 | if( g.fullHttpReply ){ |
| 289 | char *zDate = cgi_rfc822_datestamp(time(0)); |
| 290 | fprintf(g.httpOut, "HTTP/1.0 %d %s\r\n", iReplyStatus, zReplyStatus); |
| 291 | fprintf(g.httpOut, "Date: %s\r\n", zDate ); |
| 292 | if( zDate[0] ) free( zDate ); |
| 293 | fprintf(g.httpOut, "Connection: close\r\n"); |
| 294 | }else{ |
| 295 | fprintf(g.httpOut, "Status: %d %s\r\n", iReplyStatus, zReplyStatus); |
| 296 | } |
| 297 | |
| @@ -308,13 +303,11 @@ | |
| 308 | ** stale cache is the least of the problem. So we provide an Expires |
| 309 | ** header set to a reasonable period (default: one week). |
| 310 | */ |
| 311 | /*time_t expires = time(0) + atoi(db_config("constant_expires","604800"));*/ |
| 312 | time_t expires = time(0) + 604800; |
| 313 | char * zDate = cgi_rfc822_datestamp(expires); |
| 314 | fprintf(g.httpOut, "Expires: %s\r\n", zDate ); |
| 315 | if( zDate[0] ) free( zDate ); |
| 316 | } |
| 317 | |
| 318 | /* Content intended for logged in users should only be cached in |
| 319 | ** the browser, not some shared location. |
| 320 | */ |
| @@ -326,10 +319,12 @@ | |
| 326 | } |
| 327 | |
| 328 | if( iReplyStatus != 304 ) { |
| 329 | total_size = blob_size(&cgiContent[0]) + blob_size(&cgiContent[1]); |
| 330 | fprintf(g.httpOut, "Content-Length: %d\r\n", total_size); |
| 331 | } |
| 332 | fprintf(g.httpOut, "\r\n"); |
| 333 | if( total_size>0 && iReplyStatus != 304 ){ |
| 334 | int i, size; |
| 335 | for(i=0; i<2; i++){ |
| @@ -1287,26 +1282,28 @@ | |
| 1287 | {"Jan", "Feb", "Mar", "Apr", "May", "Jun", |
| 1288 | "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", 0}; |
| 1289 | |
| 1290 | |
| 1291 | /* |
| 1292 | ** Returns an RFC822-formatted time string suitable for HTTP headers, among |
| 1293 | ** other things. |
| 1294 | ** Returned timezone is always GMT as required by HTTP/1.1 specification. |
| 1295 | ** The returned string is allocated with malloc() and must be freed |
| 1296 | ** with free(). |
| 1297 | ** |
| 1298 | ** See http://www.faqs.org/rfcs/rfc822.html, section 5 |
| 1299 | ** and http://www.faqs.org/rfcs/rfc2616.html, section 3.3. |
| 1300 | */ |
| 1301 | char *cgi_rfc822_datestamp(time_t now){ |
| 1302 | struct tm *pTm; |
| 1303 | pTm = gmtime(&now); |
| 1304 | if( pTm==0 ) return ""; |
| 1305 | return mprintf("%s, %d %s %02d %02d:%02d:%02d GMT", |
| 1306 | azDays[pTm->tm_wday], pTm->tm_mday, azMonths[pTm->tm_mon], |
| 1307 | pTm->tm_year+1900, pTm->tm_hour, pTm->tm_min, pTm->tm_sec); |
| 1308 | } |
| 1309 | |
| 1310 | /* |
| 1311 | ** Parse an RFC822-formatted timestamp as we'd expect from HTTP and return |
| 1312 | ** a Unix epoch time. <= zero is returned on failure. |
| 1313 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -27,25 +27,25 @@ | |
| 27 | ** formatting function and its cousins, and routines to encode and |
| 28 | ** decode strings in HTML or HTTP. |
| 29 | */ |
| 30 | #include "config.h" |
| 31 | #ifdef __MINGW32__ |
| 32 | # include <windows.h> /* for Sleep once server works again */ |
| 33 | # include <winsock2.h> /* socket operations */ |
| 34 | # define sleep Sleep /* windows does not have sleep, but Sleep */ |
| 35 | # include <ws2tcpip.h> |
| 36 | #else |
| 37 | # include <sys/socket.h> |
| 38 | # include <netinet/in.h> |
| 39 | # include <arpa/inet.h> |
| 40 | # include <sys/times.h> |
| 41 | # include <sys/time.h> |
| 42 | # include <sys/wait.h> |
| 43 | # include <sys/select.h> |
| 44 | #endif |
| 45 | #ifdef __EMX__ |
| 46 | typedef int socklen_t; |
| 47 | #endif |
| 48 | #include <time.h> |
| 49 | #include <stdio.h> |
| 50 | #include <stdlib.h> |
| 51 | #include <unistd.h> |
| @@ -195,17 +195,14 @@ | |
| 195 | const char *zPath, /* Path cookie applies to. NULL means "/" */ |
| 196 | int lifetime /* Expiration of the cookie in seconds from now */ |
| 197 | ){ |
| 198 | if( zPath==0 ) zPath = g.zTop; |
| 199 | if( lifetime>0 ){ |
| 200 | lifetime += (int)time(0); |
| 201 | blob_appendf(&extraHeader, |
| 202 | "Set-Cookie: %s=%t; Path=%s; expires=%z; Version=1\r\n", |
| 203 | zName, zValue, zPath, cgi_rfc822_datestamp(lifetime)); |
| 204 | }else{ |
| 205 | blob_appendf(&extraHeader, |
| 206 | "Set-Cookie: %s=%t; Path=%s; Version=1\r\n", |
| 207 | zName, zValue, zPath); |
| 208 | } |
| @@ -266,11 +263,11 @@ | |
| 263 | |
| 264 | /* |
| 265 | ** Do a normal HTTP reply |
| 266 | */ |
| 267 | void cgi_reply(void){ |
| 268 | int total_size; |
| 269 | if( iReplyStatus<=0 ){ |
| 270 | iReplyStatus = 200; |
| 271 | zReplyStatus = "OK"; |
| 272 | } |
| 273 | |
| @@ -284,14 +281,12 @@ | |
| 281 | zReplyStatus = "Not Modified"; |
| 282 | } |
| 283 | #endif |
| 284 | |
| 285 | if( g.fullHttpReply ){ |
| 286 | fprintf(g.httpOut, "HTTP/1.0 %d %s\r\n", iReplyStatus, zReplyStatus); |
| 287 | fprintf(g.httpOut, "Date: %s\r\n", cgi_rfc822_datestamp(time(0))); |
| 288 | fprintf(g.httpOut, "Connection: close\r\n"); |
| 289 | }else{ |
| 290 | fprintf(g.httpOut, "Status: %d %s\r\n", iReplyStatus, zReplyStatus); |
| 291 | } |
| 292 | |
| @@ -308,13 +303,11 @@ | |
| 303 | ** stale cache is the least of the problem. So we provide an Expires |
| 304 | ** header set to a reasonable period (default: one week). |
| 305 | */ |
| 306 | /*time_t expires = time(0) + atoi(db_config("constant_expires","604800"));*/ |
| 307 | time_t expires = time(0) + 604800; |
| 308 | fprintf(g.httpOut, "Expires: %s\r\n", cgi_rfc822_datestamp(expires)); |
| 309 | } |
| 310 | |
| 311 | /* Content intended for logged in users should only be cached in |
| 312 | ** the browser, not some shared location. |
| 313 | */ |
| @@ -326,10 +319,12 @@ | |
| 319 | } |
| 320 | |
| 321 | if( iReplyStatus != 304 ) { |
| 322 | total_size = blob_size(&cgiContent[0]) + blob_size(&cgiContent[1]); |
| 323 | fprintf(g.httpOut, "Content-Length: %d\r\n", total_size); |
| 324 | }else{ |
| 325 | total_size = 0; |
| 326 | } |
| 327 | fprintf(g.httpOut, "\r\n"); |
| 328 | if( total_size>0 && iReplyStatus != 304 ){ |
| 329 | int i, size; |
| 330 | for(i=0; i<2; i++){ |
| @@ -1287,26 +1282,28 @@ | |
| 1282 | {"Jan", "Feb", "Mar", "Apr", "May", "Jun", |
| 1283 | "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", 0}; |
| 1284 | |
| 1285 | |
| 1286 | /* |
| 1287 | ** Returns an RFC822-formatted time string suitable for HTTP headers. |
| 1288 | ** The timezone is always GMT. The value returned is always a |
| 1289 | ** string obtained from mprintf() and must be freed using free() to |
| 1290 | ** avoid a memory leak. |
| 1291 | ** |
| 1292 | ** See http://www.faqs.org/rfcs/rfc822.html, section 5 |
| 1293 | ** and http://www.faqs.org/rfcs/rfc2616.html, section 3.3. |
| 1294 | */ |
| 1295 | char *cgi_rfc822_datestamp(time_t now){ |
| 1296 | struct tm *pTm; |
| 1297 | pTm = gmtime(&now); |
| 1298 | if( pTm==0 ){ |
| 1299 | return mprintf(""); |
| 1300 | }else{ |
| 1301 | return mprintf("%s, %d %s %02d %02d:%02d:%02d GMT", |
| 1302 | azDays[pTm->tm_wday], pTm->tm_mday, azMonths[pTm->tm_mon], |
| 1303 | pTm->tm_year+1900, pTm->tm_hour, pTm->tm_min, pTm->tm_sec); |
| 1304 | } |
| 1305 | } |
| 1306 | |
| 1307 | /* |
| 1308 | ** Parse an RFC822-formatted timestamp as we'd expect from HTTP and return |
| 1309 | ** a Unix epoch time. <= zero is returned on failure. |
| 1310 |
+8
-270
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -441,17 +441,14 @@ | ||
| 441 | 441 | ** |
| 442 | 442 | ** Usage: %fossil commit ?OPTIONS? ?FILE...? |
| 443 | 443 | ** |
| 444 | 444 | ** Create a new version containing all of the changes in the current |
| 445 | 445 | ** checkout. You will be prompted to enter a check-in comment unless |
| 446 | -** one of the "-m" or "-M" options are used to specify a comment. | |
| 447 | -** "-m" takes a single string for the commit message and "-M" requires | |
| 448 | -** a filename from which to read the commit message. If neither "-m" | |
| 449 | -** nor "-M" are specified then the editor defined in the "editor" | |
| 450 | -** fossil option (see %fossil help set) will be used, or from the | |
| 451 | -** "VISUAL" or "EDITOR" environment variables (in that order) if no | |
| 452 | -** editor is set. | |
| 446 | +** the comment has been specified on the command-line using "-m". | |
| 447 | +** The editor defined in the "editor" fossil option (see %fossil help set) | |
| 448 | +** will be used, or from the "VISUAL" or "EDITOR" environment variables | |
| 449 | +** (in that order) if no editor is set. | |
| 453 | 450 | ** |
| 454 | 451 | ** You will be prompted for your GPG passphrase in order to sign the |
| 455 | 452 | ** new manifest unless the "--nosign" options is used. All files that |
| 456 | 453 | ** have changed will be committed unless some subset of files is |
| 457 | 454 | ** specified on the command line. |
| @@ -473,11 +470,10 @@ | ||
| 473 | 470 | ** --branch NEW-BRANCH-NAME |
| 474 | 471 | ** --bgcolor COLOR |
| 475 | 472 | ** --nosign |
| 476 | 473 | ** --force|-f |
| 477 | 474 | ** --private |
| 478 | -** --message-file|-M COMMENT-FILE | |
| 479 | 475 | ** |
| 480 | 476 | */ |
| 481 | 477 | void commit_cmd(void){ |
| 482 | 478 | int rc; |
| 483 | 479 | int vid, nrid, nvid; |
| @@ -493,11 +489,11 @@ | ||
| 493 | 489 | int nBasename; /* Length of "g.zLocalRoot/" */ |
| 494 | 490 | const char *zBranch; /* Create a new branch with this name */ |
| 495 | 491 | const char *zBgColor; /* Set background color when branching */ |
| 496 | 492 | const char *zDateOvrd; /* Override date string */ |
| 497 | 493 | const char *zUserOvrd; /* Override user name */ |
| 498 | - const char *zCommentFile; /* Read commit message from this file */ | |
| 494 | + const char *zComFile; /* Read commit message from this file */ | |
| 499 | 495 | Blob filename; /* complete filename */ |
| 500 | 496 | Blob manifest; |
| 501 | 497 | Blob muuid; /* Manifest uuid */ |
| 502 | 498 | Blob mcksum; /* Self-checksum on the manifest */ |
| 503 | 499 | Blob cksum1, cksum2; /* Before and after commit checksums */ |
| @@ -507,11 +503,11 @@ | ||
| 507 | 503 | noSign = find_option("nosign",0,0)!=0; |
| 508 | 504 | zComment = find_option("comment","m",1); |
| 509 | 505 | forceFlag = find_option("force", "f", 0)!=0; |
| 510 | 506 | zBranch = find_option("branch","b",1); |
| 511 | 507 | zBgColor = find_option("bgcolor",0,1); |
| 512 | - zCommentFile = find_option("message-file", "M", 1); | |
| 508 | + zComFile = find_option("message-file", "M", 1); | |
| 513 | 509 | if( find_option("private",0,0) ){ |
| 514 | 510 | g.markPrivate = 1; |
| 515 | 511 | if( zBranch==0 ) zBranch = "private"; |
| 516 | 512 | if( zBgColor==0 ) zBgColor = "#fec084"; /* Orange */ |
| 517 | 513 | } |
| @@ -600,13 +596,13 @@ | ||
| 600 | 596 | |
| 601 | 597 | vfile_aggregate_checksum_disk(vid, &cksum1); |
| 602 | 598 | if( zComment ){ |
| 603 | 599 | blob_zero(&comment); |
| 604 | 600 | blob_append(&comment, zComment, -1); |
| 605 | - }else if( zCommentFile ){ | |
| 601 | + }else if( zComFile ){ | |
| 606 | 602 | blob_zero(&comment); |
| 607 | - blob_read_from_file(&comment, zCommentFile); | |
| 603 | + blob_read_from_file(&comment, zComFile); | |
| 608 | 604 | }else{ |
| 609 | 605 | char *zInit = db_text(0, "SELECT value FROM vvar WHERE name='ci-comment'"); |
| 610 | 606 | prepare_commit_comment(&comment, zInit, zBranch, vid); |
| 611 | 607 | free(zInit); |
| 612 | 608 | } |
| @@ -817,263 +813,5 @@ | ||
| 817 | 813 | } |
| 818 | 814 | if( count_nonbranch_children(vid)>1 ){ |
| 819 | 815 | printf("**** warning: a fork has occurred *****\n"); |
| 820 | 816 | } |
| 821 | 817 | } |
| 822 | - | |
| 823 | -/* | |
| 824 | -** COMMAND: test-import-manifest | |
| 825 | -** | |
| 826 | -** Usage: %fossil test-import-manifest DATE COMMENT ?-p PARENT_RECORDID?... ?-f (FILE_RECORDID PATH)?... | |
| 827 | -** | |
| 828 | -** Create a new version containing the specified file | |
| 829 | -** revisions (if any), and child of the given PARENT version. | |
| 830 | -*/ | |
| 831 | -void import_manifest_cmd(void){ | |
| 832 | - const char* zDate; /* argument - timestamp, as seconds since epoch (int) */ | |
| 833 | - const char* zComment; /* argument - manifest comment */ | |
| 834 | - char* zDateFmt; /* timestamp formatted for the manifest */ | |
| 835 | - int* zParents; /* arguments - array of parent references */ | |
| 836 | - int zParentCount; /* number of found parent references */ | |
| 837 | - Blob manifest; /* container for the manifest to be generated */ | |
| 838 | - Blob mcksum; /* Self-checksum on the manifest */ | |
| 839 | - Blob cksum, cksum2; /* Before and after commit checksums */ | |
| 840 | - Blob cksum1b; /* Checksum recorded in the manifest */ | |
| 841 | - const char* parent; /* loop variable when collecting parent references */ | |
| 842 | - int i, mid; /* Another loop index, and id of new manifest */ | |
| 843 | - Stmt q; /* sql statement to query table of files */ | |
| 844 | - char* zMidUuid; /* Uuid for the newly generated manifest */ | |
| 845 | - | |
| 846 | - | |
| 847 | -#define USAGE ("DATE COMMENT ?-p|-parent PARENT_RID...? ?-f|-file (FILE_RID PATH)...?") | |
| 848 | - | |
| 849 | - /* | |
| 850 | - ** Validate and process arguments, collect information. | |
| 851 | - */ | |
| 852 | - | |
| 853 | - db_must_be_within_tree(); | |
| 854 | - | |
| 855 | - /* Mandatory arguments */ | |
| 856 | - if (g.argc < 4) { | |
| 857 | - usage (USAGE); | |
| 858 | - } | |
| 859 | - | |
| 860 | - zDate = g.argv[2]; | |
| 861 | - zComment = g.argv[3]; | |
| 862 | - | |
| 863 | - remove_from_argv (2,2); | |
| 864 | - | |
| 865 | - /* Pull the optional parent arguments | |
| 866 | - ** | |
| 867 | - ** Note: In principle it is possible that the loop below extracts | |
| 868 | - ** the wrong arguments, if we ever try to import a file whose path | |
| 869 | - ** starts with -p/-parent. In that case however the removal of two | |
| 870 | - ** arguments will leave the file bereft of an argument and the | |
| 871 | - ** recheck of the number of arguments below should catch that. | |
| 872 | - ** | |
| 873 | - ** For a test command this is acceptable, it won't have lots of | |
| 874 | - ** safety nets. | |
| 875 | - */ | |
| 876 | - | |
| 877 | - zParentCount = 0; | |
| 878 | - zParents = (int*)malloc(sizeof(int)*(1+g.argc)); | |
| 879 | - /* 1+, to be ok with the default even if no arguments around */ | |
| 880 | - | |
| 881 | - while ((parent = find_option("parent","p",1)) != NULL) { | |
| 882 | - /* Check and store ... */ | |
| 883 | - zParents [zParentCount] = name_to_rid (parent); | |
| 884 | - zParentCount ++; | |
| 885 | - } | |
| 886 | - | |
| 887 | - /* | |
| 888 | - ** Fall back to the root manifest as parent if none were specified | |
| 889 | - ** explicitly. | |
| 890 | - */ | |
| 891 | - | |
| 892 | - if (!zParentCount) { | |
| 893 | - zParents [zParentCount] = 1; /* HACK: rid 1 is the baseline manifest | |
| 894 | - ** which was entered when the repository | |
| 895 | - ** was created via 'new'. It always has | |
| 896 | - ** rid 1. | |
| 897 | - */ | |
| 898 | - zParentCount ++; | |
| 899 | - } | |
| 900 | - | |
| 901 | - /* Pull the file arguments, at least one has to be present. They are | |
| 902 | - ** the only things we can have here, now, and they are triples of | |
| 903 | - ** '-f FID PATH', so use of find_option is out, and we can check the | |
| 904 | - ** number of arguments. | |
| 905 | - ** | |
| 906 | - ** Note: We store the data in a temp. table, so that we later can | |
| 907 | - ** pull it sorted, and also easily get the associated hash | |
| 908 | - ** identifiers. | |
| 909 | - ** | |
| 910 | - ** Note 2: We expect at least one file, otherwise the manifest won't | |
| 911 | - ** be recognized as a baseline by the manifest parser. | |
| 912 | - */ | |
| 913 | - | |
| 914 | - if (((g.argc-2) % 3 != 0) || (g.argc < 5)) { | |
| 915 | - usage (USAGE); | |
| 916 | - } | |
| 917 | - | |
| 918 | - db_begin_transaction(); | |
| 919 | - db_multi_exec ("CREATE TEMP TABLE __im (" | |
| 920 | - "rid INTEGER NOT NULL," | |
| 921 | - "pathname TEXT NOT NULL)" ); | |
| 922 | - | |
| 923 | - while (g.argc > 2) { | |
| 924 | - /* Check and store ... */ | |
| 925 | - if (strcmp("-f", g.argv[2]) && | |
| 926 | - strcmp("-file",g.argv[2])) { | |
| 927 | - usage (USAGE); | |
| 928 | - } | |
| 929 | - | |
| 930 | - /* DANGER The %s for the path might lead itself to an injection | |
| 931 | - ** attack. For now (i.e. testing) this is ok, but do something | |
| 932 | - ** better in the future. | |
| 933 | - */ | |
| 934 | - | |
| 935 | - db_multi_exec("INSERT INTO __im VALUES(%d,'%s')", | |
| 936 | - name_to_rid (g.argv[3]), g.argv[4] ); | |
| 937 | - remove_from_argv (2,3); | |
| 938 | - } | |
| 939 | - | |
| 940 | - verify_all_options(); | |
| 941 | - | |
| 942 | - /* | |
| 943 | - ** Determine the user the manifest will belong to, and check that | |
| 944 | - ** this user exists. | |
| 945 | - */ | |
| 946 | - | |
| 947 | - user_select(); | |
| 948 | - if( !db_exists("SELECT 1 FROM user WHERE login=%Q", g.zLogin) ){ | |
| 949 | - fossil_fatal("no such user: %s", g.zLogin); | |
| 950 | - } | |
| 951 | - | |
| 952 | - /* | |
| 953 | - ** Now generate the manifest in memory. | |
| 954 | - ** | |
| 955 | - ** Start with comment and date. The latter is converted to the | |
| 956 | - ** proper format before insertion. | |
| 957 | - */ | |
| 958 | - | |
| 959 | - blob_zero(&manifest); | |
| 960 | - | |
| 961 | - if (!strlen(zComment)) { | |
| 962 | - blob_appendf(&manifest, "C %F\n", "(no comment)"); | |
| 963 | - } else { | |
| 964 | - blob_appendf(&manifest, "C %F\n", zComment); | |
| 965 | - } | |
| 966 | - | |
| 967 | - zDateFmt = db_text(0, "SELECT datetime(%Q,'unixepoch')",zDate); | |
| 968 | - zDateFmt[10] = 'T'; | |
| 969 | - blob_appendf(&manifest, "D %s\n", zDateFmt); | |
| 970 | - free(zDateFmt); | |
| 971 | - | |
| 972 | - /* | |
| 973 | - ** Follow with all the collected files, properly sorted. Here were | |
| 974 | - ** also compute the checksum over the files (paths, sizes, | |
| 975 | - ** contents), similar to what 'vfile_aggregate_checksum_repository' | |
| 976 | - ** does. | |
| 977 | - */ | |
| 978 | - | |
| 979 | - md5sum_init(); | |
| 980 | - db_prepare(&q, | |
| 981 | - "SELECT pathname, uuid, __im.rid" | |
| 982 | - " FROM __im JOIN blob ON __im.rid=blob.rid" | |
| 983 | - " ORDER BY 1"); | |
| 984 | - | |
| 985 | - while( db_step(&q)==SQLITE_ROW ){ | |
| 986 | - char zBuf[100]; | |
| 987 | - Blob file; | |
| 988 | - const char *zName = db_column_text(&q, 0); | |
| 989 | - const char *zUuid = db_column_text(&q, 1); | |
| 990 | - int zRid = db_column_int (&q, 2); | |
| 991 | - | |
| 992 | - /* Extend the manifest */ | |
| 993 | - blob_appendf(&manifest, "F %F %s\n", zName, zUuid); | |
| 994 | - | |
| 995 | - /* Update the checksum */ | |
| 996 | - md5sum_step_text(zName, -1); | |
| 997 | - blob_zero(&file); | |
| 998 | - content_get(zRid, &file); | |
| 999 | - sprintf(zBuf, " %d\n", blob_size(&file)); | |
| 1000 | - md5sum_step_text(zBuf, -1); | |
| 1001 | - md5sum_step_blob(&file); | |
| 1002 | - blob_reset(&file); | |
| 1003 | - } | |
| 1004 | - db_finalize(&q); | |
| 1005 | - md5sum_finish (&cksum); | |
| 1006 | - | |
| 1007 | - /* | |
| 1008 | - ** Follow with all the specified parents. We know that there is at | |
| 1009 | - ** least one. | |
| 1010 | - */ | |
| 1011 | - | |
| 1012 | - blob_appendf(&manifest, "P"); | |
| 1013 | - for (i=0;i<zParentCount;i++) { | |
| 1014 | - char* zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", zParents[i]); | |
| 1015 | - blob_appendf(&manifest, " %s", zUuid); | |
| 1016 | - free(zUuid); | |
| 1017 | - } | |
| 1018 | - blob_appendf(&manifest, "\n"); | |
| 1019 | - | |
| 1020 | - /* | |
| 1021 | - ** Complete the manifest with user name and the various checksums | |
| 1022 | - */ | |
| 1023 | - | |
| 1024 | - blob_appendf(&manifest, "R %b\n", &cksum); | |
| 1025 | - blob_appendf(&manifest, "U %F\n", g.zLogin); | |
| 1026 | - md5sum_blob(&manifest, &mcksum); | |
| 1027 | - blob_appendf(&manifest, "Z %b\n", &mcksum); | |
| 1028 | - | |
| 1029 | - /* | |
| 1030 | - ** Now insert the new manifest, try to compress it relative to first | |
| 1031 | - ** parent (primary). | |
| 1032 | - */ | |
| 1033 | - | |
| 1034 | - /*blob_write_to_file (&manifest, "TEST_MANIFEST");*/ | |
| 1035 | - | |
| 1036 | - mid = content_put(&manifest, 0, 0); | |
| 1037 | - if( mid==0 ){ | |
| 1038 | - fossil_panic("trouble committing manifest: %s", g.zErrMsg); | |
| 1039 | - } | |
| 1040 | - | |
| 1041 | - content_deltify(zParents[0], mid, 0); | |
| 1042 | - | |
| 1043 | - /* Verify that the repository checksum matches the expected checksum | |
| 1044 | - ** calculated before the checkin started (and stored as the R record | |
| 1045 | - ** of the manifest file). | |
| 1046 | - */ | |
| 1047 | - | |
| 1048 | - vfile_aggregate_checksum_manifest(mid, &cksum2, &cksum1b); | |
| 1049 | - if( blob_compare(&cksum, &cksum1b) ){ | |
| 1050 | - fossil_panic("manifest checksum does not agree with manifest: " | |
| 1051 | - "%b versus %b", &cksum, &cksum1b); | |
| 1052 | - } | |
| 1053 | - if( blob_compare(&cksum, &cksum2) ){ | |
| 1054 | - fossil_panic("tree checksum does not match manifest after commit: " | |
| 1055 | - "%b versus %b", &cksum, &cksum2); | |
| 1056 | - } | |
| 1057 | - | |
| 1058 | - /* | |
| 1059 | - ** At last commit all changes, after getting rid of the temp | |
| 1060 | - ** holder for the files, and release allocated memory. | |
| 1061 | - */ | |
| 1062 | - | |
| 1063 | - db_multi_exec("DROP TABLE __im"); | |
| 1064 | - zMidUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", mid); | |
| 1065 | - db_end_transaction(0); | |
| 1066 | - free(zParents); | |
| 1067 | - | |
| 1068 | - /* | |
| 1069 | - ** At the very last inform the caller about the id and uuid of the | |
| 1070 | - ** new manifest. | |
| 1071 | - */ | |
| 1072 | - | |
| 1073 | - | |
| 1074 | - printf("inserted as record %d, %s\n", mid, zMidUuid); | |
| 1075 | - free(zMidUuid); | |
| 1076 | - return; | |
| 1077 | - | |
| 1078 | -#undef USAGE | |
| 1079 | -} | |
| 1080 | 818 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -441,17 +441,14 @@ | |
| 441 | ** |
| 442 | ** Usage: %fossil commit ?OPTIONS? ?FILE...? |
| 443 | ** |
| 444 | ** Create a new version containing all of the changes in the current |
| 445 | ** checkout. You will be prompted to enter a check-in comment unless |
| 446 | ** one of the "-m" or "-M" options are used to specify a comment. |
| 447 | ** "-m" takes a single string for the commit message and "-M" requires |
| 448 | ** a filename from which to read the commit message. If neither "-m" |
| 449 | ** nor "-M" are specified then the editor defined in the "editor" |
| 450 | ** fossil option (see %fossil help set) will be used, or from the |
| 451 | ** "VISUAL" or "EDITOR" environment variables (in that order) if no |
| 452 | ** editor is set. |
| 453 | ** |
| 454 | ** You will be prompted for your GPG passphrase in order to sign the |
| 455 | ** new manifest unless the "--nosign" options is used. All files that |
| 456 | ** have changed will be committed unless some subset of files is |
| 457 | ** specified on the command line. |
| @@ -473,11 +470,10 @@ | |
| 473 | ** --branch NEW-BRANCH-NAME |
| 474 | ** --bgcolor COLOR |
| 475 | ** --nosign |
| 476 | ** --force|-f |
| 477 | ** --private |
| 478 | ** --message-file|-M COMMENT-FILE |
| 479 | ** |
| 480 | */ |
| 481 | void commit_cmd(void){ |
| 482 | int rc; |
| 483 | int vid, nrid, nvid; |
| @@ -493,11 +489,11 @@ | |
| 493 | int nBasename; /* Length of "g.zLocalRoot/" */ |
| 494 | const char *zBranch; /* Create a new branch with this name */ |
| 495 | const char *zBgColor; /* Set background color when branching */ |
| 496 | const char *zDateOvrd; /* Override date string */ |
| 497 | const char *zUserOvrd; /* Override user name */ |
| 498 | const char *zCommentFile; /* Read commit message from this file */ |
| 499 | Blob filename; /* complete filename */ |
| 500 | Blob manifest; |
| 501 | Blob muuid; /* Manifest uuid */ |
| 502 | Blob mcksum; /* Self-checksum on the manifest */ |
| 503 | Blob cksum1, cksum2; /* Before and after commit checksums */ |
| @@ -507,11 +503,11 @@ | |
| 507 | noSign = find_option("nosign",0,0)!=0; |
| 508 | zComment = find_option("comment","m",1); |
| 509 | forceFlag = find_option("force", "f", 0)!=0; |
| 510 | zBranch = find_option("branch","b",1); |
| 511 | zBgColor = find_option("bgcolor",0,1); |
| 512 | zCommentFile = find_option("message-file", "M", 1); |
| 513 | if( find_option("private",0,0) ){ |
| 514 | g.markPrivate = 1; |
| 515 | if( zBranch==0 ) zBranch = "private"; |
| 516 | if( zBgColor==0 ) zBgColor = "#fec084"; /* Orange */ |
| 517 | } |
| @@ -600,13 +596,13 @@ | |
| 600 | |
| 601 | vfile_aggregate_checksum_disk(vid, &cksum1); |
| 602 | if( zComment ){ |
| 603 | blob_zero(&comment); |
| 604 | blob_append(&comment, zComment, -1); |
| 605 | }else if( zCommentFile ){ |
| 606 | blob_zero(&comment); |
| 607 | blob_read_from_file(&comment, zCommentFile); |
| 608 | }else{ |
| 609 | char *zInit = db_text(0, "SELECT value FROM vvar WHERE name='ci-comment'"); |
| 610 | prepare_commit_comment(&comment, zInit, zBranch, vid); |
| 611 | free(zInit); |
| 612 | } |
| @@ -817,263 +813,5 @@ | |
| 817 | } |
| 818 | if( count_nonbranch_children(vid)>1 ){ |
| 819 | printf("**** warning: a fork has occurred *****\n"); |
| 820 | } |
| 821 | } |
| 822 | |
| 823 | /* |
| 824 | ** COMMAND: test-import-manifest |
| 825 | ** |
| 826 | ** Usage: %fossil test-import-manifest DATE COMMENT ?-p PARENT_RECORDID?... ?-f (FILE_RECORDID PATH)?... |
| 827 | ** |
| 828 | ** Create a new version containing the specified file |
| 829 | ** revisions (if any), and child of the given PARENT version. |
| 830 | */ |
| 831 | void import_manifest_cmd(void){ |
| 832 | const char* zDate; /* argument - timestamp, as seconds since epoch (int) */ |
| 833 | const char* zComment; /* argument - manifest comment */ |
| 834 | char* zDateFmt; /* timestamp formatted for the manifest */ |
| 835 | int* zParents; /* arguments - array of parent references */ |
| 836 | int zParentCount; /* number of found parent references */ |
| 837 | Blob manifest; /* container for the manifest to be generated */ |
| 838 | Blob mcksum; /* Self-checksum on the manifest */ |
| 839 | Blob cksum, cksum2; /* Before and after commit checksums */ |
| 840 | Blob cksum1b; /* Checksum recorded in the manifest */ |
| 841 | const char* parent; /* loop variable when collecting parent references */ |
| 842 | int i, mid; /* Another loop index, and id of new manifest */ |
| 843 | Stmt q; /* sql statement to query table of files */ |
| 844 | char* zMidUuid; /* Uuid for the newly generated manifest */ |
| 845 | |
| 846 | |
| 847 | #define USAGE ("DATE COMMENT ?-p|-parent PARENT_RID...? ?-f|-file (FILE_RID PATH)...?") |
| 848 | |
| 849 | /* |
| 850 | ** Validate and process arguments, collect information. |
| 851 | */ |
| 852 | |
| 853 | db_must_be_within_tree(); |
| 854 | |
| 855 | /* Mandatory arguments */ |
| 856 | if (g.argc < 4) { |
| 857 | usage (USAGE); |
| 858 | } |
| 859 | |
| 860 | zDate = g.argv[2]; |
| 861 | zComment = g.argv[3]; |
| 862 | |
| 863 | remove_from_argv (2,2); |
| 864 | |
| 865 | /* Pull the optional parent arguments |
| 866 | ** |
| 867 | ** Note: In principle it is possible that the loop below extracts |
| 868 | ** the wrong arguments, if we ever try to import a file whose path |
| 869 | ** starts with -p/-parent. In that case however the removal of two |
| 870 | ** arguments will leave the file bereft of an argument and the |
| 871 | ** recheck of the number of arguments below should catch that. |
| 872 | ** |
| 873 | ** For a test command this is acceptable, it won't have lots of |
| 874 | ** safety nets. |
| 875 | */ |
| 876 | |
| 877 | zParentCount = 0; |
| 878 | zParents = (int*)malloc(sizeof(int)*(1+g.argc)); |
| 879 | /* 1+, to be ok with the default even if no arguments around */ |
| 880 | |
| 881 | while ((parent = find_option("parent","p",1)) != NULL) { |
| 882 | /* Check and store ... */ |
| 883 | zParents [zParentCount] = name_to_rid (parent); |
| 884 | zParentCount ++; |
| 885 | } |
| 886 | |
| 887 | /* |
| 888 | ** Fall back to the root manifest as parent if none were specified |
| 889 | ** explicitly. |
| 890 | */ |
| 891 | |
| 892 | if (!zParentCount) { |
| 893 | zParents [zParentCount] = 1; /* HACK: rid 1 is the baseline manifest |
| 894 | ** which was entered when the repository |
| 895 | ** was created via 'new'. It always has |
| 896 | ** rid 1. |
| 897 | */ |
| 898 | zParentCount ++; |
| 899 | } |
| 900 | |
| 901 | /* Pull the file arguments, at least one has to be present. They are |
| 902 | ** the only things we can have here, now, and they are triples of |
| 903 | ** '-f FID PATH', so use of find_option is out, and we can check the |
| 904 | ** number of arguments. |
| 905 | ** |
| 906 | ** Note: We store the data in a temp. table, so that we later can |
| 907 | ** pull it sorted, and also easily get the associated hash |
| 908 | ** identifiers. |
| 909 | ** |
| 910 | ** Note 2: We expect at least one file, otherwise the manifest won't |
| 911 | ** be recognized as a baseline by the manifest parser. |
| 912 | */ |
| 913 | |
| 914 | if (((g.argc-2) % 3 != 0) || (g.argc < 5)) { |
| 915 | usage (USAGE); |
| 916 | } |
| 917 | |
| 918 | db_begin_transaction(); |
| 919 | db_multi_exec ("CREATE TEMP TABLE __im (" |
| 920 | "rid INTEGER NOT NULL," |
| 921 | "pathname TEXT NOT NULL)" ); |
| 922 | |
| 923 | while (g.argc > 2) { |
| 924 | /* Check and store ... */ |
| 925 | if (strcmp("-f", g.argv[2]) && |
| 926 | strcmp("-file",g.argv[2])) { |
| 927 | usage (USAGE); |
| 928 | } |
| 929 | |
| 930 | /* DANGER The %s for the path might lead itself to an injection |
| 931 | ** attack. For now (i.e. testing) this is ok, but do something |
| 932 | ** better in the future. |
| 933 | */ |
| 934 | |
| 935 | db_multi_exec("INSERT INTO __im VALUES(%d,'%s')", |
| 936 | name_to_rid (g.argv[3]), g.argv[4] ); |
| 937 | remove_from_argv (2,3); |
| 938 | } |
| 939 | |
| 940 | verify_all_options(); |
| 941 | |
| 942 | /* |
| 943 | ** Determine the user the manifest will belong to, and check that |
| 944 | ** this user exists. |
| 945 | */ |
| 946 | |
| 947 | user_select(); |
| 948 | if( !db_exists("SELECT 1 FROM user WHERE login=%Q", g.zLogin) ){ |
| 949 | fossil_fatal("no such user: %s", g.zLogin); |
| 950 | } |
| 951 | |
| 952 | /* |
| 953 | ** Now generate the manifest in memory. |
| 954 | ** |
| 955 | ** Start with comment and date. The latter is converted to the |
| 956 | ** proper format before insertion. |
| 957 | */ |
| 958 | |
| 959 | blob_zero(&manifest); |
| 960 | |
| 961 | if (!strlen(zComment)) { |
| 962 | blob_appendf(&manifest, "C %F\n", "(no comment)"); |
| 963 | } else { |
| 964 | blob_appendf(&manifest, "C %F\n", zComment); |
| 965 | } |
| 966 | |
| 967 | zDateFmt = db_text(0, "SELECT datetime(%Q,'unixepoch')",zDate); |
| 968 | zDateFmt[10] = 'T'; |
| 969 | blob_appendf(&manifest, "D %s\n", zDateFmt); |
| 970 | free(zDateFmt); |
| 971 | |
| 972 | /* |
| 973 | ** Follow with all the collected files, properly sorted. Here were |
| 974 | ** also compute the checksum over the files (paths, sizes, |
| 975 | ** contents), similar to what 'vfile_aggregate_checksum_repository' |
| 976 | ** does. |
| 977 | */ |
| 978 | |
| 979 | md5sum_init(); |
| 980 | db_prepare(&q, |
| 981 | "SELECT pathname, uuid, __im.rid" |
| 982 | " FROM __im JOIN blob ON __im.rid=blob.rid" |
| 983 | " ORDER BY 1"); |
| 984 | |
| 985 | while( db_step(&q)==SQLITE_ROW ){ |
| 986 | char zBuf[100]; |
| 987 | Blob file; |
| 988 | const char *zName = db_column_text(&q, 0); |
| 989 | const char *zUuid = db_column_text(&q, 1); |
| 990 | int zRid = db_column_int (&q, 2); |
| 991 | |
| 992 | /* Extend the manifest */ |
| 993 | blob_appendf(&manifest, "F %F %s\n", zName, zUuid); |
| 994 | |
| 995 | /* Update the checksum */ |
| 996 | md5sum_step_text(zName, -1); |
| 997 | blob_zero(&file); |
| 998 | content_get(zRid, &file); |
| 999 | sprintf(zBuf, " %d\n", blob_size(&file)); |
| 1000 | md5sum_step_text(zBuf, -1); |
| 1001 | md5sum_step_blob(&file); |
| 1002 | blob_reset(&file); |
| 1003 | } |
| 1004 | db_finalize(&q); |
| 1005 | md5sum_finish (&cksum); |
| 1006 | |
| 1007 | /* |
| 1008 | ** Follow with all the specified parents. We know that there is at |
| 1009 | ** least one. |
| 1010 | */ |
| 1011 | |
| 1012 | blob_appendf(&manifest, "P"); |
| 1013 | for (i=0;i<zParentCount;i++) { |
| 1014 | char* zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", zParents[i]); |
| 1015 | blob_appendf(&manifest, " %s", zUuid); |
| 1016 | free(zUuid); |
| 1017 | } |
| 1018 | blob_appendf(&manifest, "\n"); |
| 1019 | |
| 1020 | /* |
| 1021 | ** Complete the manifest with user name and the various checksums |
| 1022 | */ |
| 1023 | |
| 1024 | blob_appendf(&manifest, "R %b\n", &cksum); |
| 1025 | blob_appendf(&manifest, "U %F\n", g.zLogin); |
| 1026 | md5sum_blob(&manifest, &mcksum); |
| 1027 | blob_appendf(&manifest, "Z %b\n", &mcksum); |
| 1028 | |
| 1029 | /* |
| 1030 | ** Now insert the new manifest, try to compress it relative to first |
| 1031 | ** parent (primary). |
| 1032 | */ |
| 1033 | |
| 1034 | /*blob_write_to_file (&manifest, "TEST_MANIFEST");*/ |
| 1035 | |
| 1036 | mid = content_put(&manifest, 0, 0); |
| 1037 | if( mid==0 ){ |
| 1038 | fossil_panic("trouble committing manifest: %s", g.zErrMsg); |
| 1039 | } |
| 1040 | |
| 1041 | content_deltify(zParents[0], mid, 0); |
| 1042 | |
| 1043 | /* Verify that the repository checksum matches the expected checksum |
| 1044 | ** calculated before the checkin started (and stored as the R record |
| 1045 | ** of the manifest file). |
| 1046 | */ |
| 1047 | |
| 1048 | vfile_aggregate_checksum_manifest(mid, &cksum2, &cksum1b); |
| 1049 | if( blob_compare(&cksum, &cksum1b) ){ |
| 1050 | fossil_panic("manifest checksum does not agree with manifest: " |
| 1051 | "%b versus %b", &cksum, &cksum1b); |
| 1052 | } |
| 1053 | if( blob_compare(&cksum, &cksum2) ){ |
| 1054 | fossil_panic("tree checksum does not match manifest after commit: " |
| 1055 | "%b versus %b", &cksum, &cksum2); |
| 1056 | } |
| 1057 | |
| 1058 | /* |
| 1059 | ** At last commit all changes, after getting rid of the temp |
| 1060 | ** holder for the files, and release allocated memory. |
| 1061 | */ |
| 1062 | |
| 1063 | db_multi_exec("DROP TABLE __im"); |
| 1064 | zMidUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", mid); |
| 1065 | db_end_transaction(0); |
| 1066 | free(zParents); |
| 1067 | |
| 1068 | /* |
| 1069 | ** At the very last inform the caller about the id and uuid of the |
| 1070 | ** new manifest. |
| 1071 | */ |
| 1072 | |
| 1073 | |
| 1074 | printf("inserted as record %d, %s\n", mid, zMidUuid); |
| 1075 | free(zMidUuid); |
| 1076 | return; |
| 1077 | |
| 1078 | #undef USAGE |
| 1079 | } |
| 1080 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -441,17 +441,14 @@ | |
| 441 | ** |
| 442 | ** Usage: %fossil commit ?OPTIONS? ?FILE...? |
| 443 | ** |
| 444 | ** Create a new version containing all of the changes in the current |
| 445 | ** checkout. You will be prompted to enter a check-in comment unless |
| 446 | ** the comment has been specified on the command-line using "-m". |
| 447 | ** The editor defined in the "editor" fossil option (see %fossil help set) |
| 448 | ** will be used, or from the "VISUAL" or "EDITOR" environment variables |
| 449 | ** (in that order) if no editor is set. |
| 450 | ** |
| 451 | ** You will be prompted for your GPG passphrase in order to sign the |
| 452 | ** new manifest unless the "--nosign" options is used. All files that |
| 453 | ** have changed will be committed unless some subset of files is |
| 454 | ** specified on the command line. |
| @@ -473,11 +470,10 @@ | |
| 470 | ** --branch NEW-BRANCH-NAME |
| 471 | ** --bgcolor COLOR |
| 472 | ** --nosign |
| 473 | ** --force|-f |
| 474 | ** --private |
| 475 | ** |
| 476 | */ |
| 477 | void commit_cmd(void){ |
| 478 | int rc; |
| 479 | int vid, nrid, nvid; |
| @@ -493,11 +489,11 @@ | |
| 489 | int nBasename; /* Length of "g.zLocalRoot/" */ |
| 490 | const char *zBranch; /* Create a new branch with this name */ |
| 491 | const char *zBgColor; /* Set background color when branching */ |
| 492 | const char *zDateOvrd; /* Override date string */ |
| 493 | const char *zUserOvrd; /* Override user name */ |
| 494 | const char *zComFile; /* Read commit message from this file */ |
| 495 | Blob filename; /* complete filename */ |
| 496 | Blob manifest; |
| 497 | Blob muuid; /* Manifest uuid */ |
| 498 | Blob mcksum; /* Self-checksum on the manifest */ |
| 499 | Blob cksum1, cksum2; /* Before and after commit checksums */ |
| @@ -507,11 +503,11 @@ | |
| 503 | noSign = find_option("nosign",0,0)!=0; |
| 504 | zComment = find_option("comment","m",1); |
| 505 | forceFlag = find_option("force", "f", 0)!=0; |
| 506 | zBranch = find_option("branch","b",1); |
| 507 | zBgColor = find_option("bgcolor",0,1); |
| 508 | zComFile = find_option("message-file", "M", 1); |
| 509 | if( find_option("private",0,0) ){ |
| 510 | g.markPrivate = 1; |
| 511 | if( zBranch==0 ) zBranch = "private"; |
| 512 | if( zBgColor==0 ) zBgColor = "#fec084"; /* Orange */ |
| 513 | } |
| @@ -600,13 +596,13 @@ | |
| 596 | |
| 597 | vfile_aggregate_checksum_disk(vid, &cksum1); |
| 598 | if( zComment ){ |
| 599 | blob_zero(&comment); |
| 600 | blob_append(&comment, zComment, -1); |
| 601 | }else if( zComFile ){ |
| 602 | blob_zero(&comment); |
| 603 | blob_read_from_file(&comment, zComFile); |
| 604 | }else{ |
| 605 | char *zInit = db_text(0, "SELECT value FROM vvar WHERE name='ci-comment'"); |
| 606 | prepare_commit_comment(&comment, zInit, zBranch, vid); |
| 607 | free(zInit); |
| 608 | } |
| @@ -817,263 +813,5 @@ | |
| 813 | } |
| 814 | if( count_nonbranch_children(vid)>1 ){ |
| 815 | printf("**** warning: a fork has occurred *****\n"); |
| 816 | } |
| 817 | } |
| 818 |
-1
| --- src/checkout.c | ||
| +++ src/checkout.c | ||
| @@ -136,11 +136,10 @@ | ||
| 136 | 136 | manifest_clear(&m); |
| 137 | 137 | } |
| 138 | 138 | |
| 139 | 139 | /* |
| 140 | 140 | ** COMMAND: checkout |
| 141 | -** COMMAND: co | |
| 142 | 141 | ** |
| 143 | 142 | ** Usage: %fossil checkout VERSION ?-f|--force? ?--keep? |
| 144 | 143 | ** |
| 145 | 144 | ** Check out a version specified on the command-line. This command |
| 146 | 145 | ** will abort if there are edited files in the current checkout unless |
| 147 | 146 |
| --- src/checkout.c | |
| +++ src/checkout.c | |
| @@ -136,11 +136,10 @@ | |
| 136 | manifest_clear(&m); |
| 137 | } |
| 138 | |
| 139 | /* |
| 140 | ** COMMAND: checkout |
| 141 | ** COMMAND: co |
| 142 | ** |
| 143 | ** Usage: %fossil checkout VERSION ?-f|--force? ?--keep? |
| 144 | ** |
| 145 | ** Check out a version specified on the command-line. This command |
| 146 | ** will abort if there are edited files in the current checkout unless |
| 147 |
| --- src/checkout.c | |
| +++ src/checkout.c | |
| @@ -136,11 +136,10 @@ | |
| 136 | manifest_clear(&m); |
| 137 | } |
| 138 | |
| 139 | /* |
| 140 | ** COMMAND: checkout |
| 141 | ** |
| 142 | ** Usage: %fossil checkout VERSION ?-f|--force? ?--keep? |
| 143 | ** |
| 144 | ** Check out a version specified on the command-line. This command |
| 145 | ** will abort if there are edited files in the current checkout unless |
| 146 |
+6
| --- src/config.h | ||
| +++ src/config.h | ||
| @@ -32,10 +32,16 @@ | ||
| 32 | 32 | #include <stdlib.h> |
| 33 | 33 | #include <ctype.h> |
| 34 | 34 | #include <string.h> |
| 35 | 35 | #include <stdarg.h> |
| 36 | 36 | #include <assert.h> |
| 37 | +#ifdef __MINGW32__ | |
| 38 | +# include <windows.h> | |
| 39 | +#else | |
| 40 | +# include <pwd.h> | |
| 41 | +#endif | |
| 42 | + | |
| 37 | 43 | #include "sqlite3.h" |
| 38 | 44 | |
| 39 | 45 | /* |
| 40 | 46 | ** Typedef for a 64-bit integer |
| 41 | 47 | */ |
| 42 | 48 | |
| 43 | 49 | DELETED src/construct.c |
| --- src/config.h | |
| +++ src/config.h | |
| @@ -32,10 +32,16 @@ | |
| 32 | #include <stdlib.h> |
| 33 | #include <ctype.h> |
| 34 | #include <string.h> |
| 35 | #include <stdarg.h> |
| 36 | #include <assert.h> |
| 37 | #include "sqlite3.h" |
| 38 | |
| 39 | /* |
| 40 | ** Typedef for a 64-bit integer |
| 41 | */ |
| 42 | |
| 43 | ELETED src/construct.c |
| --- src/config.h | |
| +++ src/config.h | |
| @@ -32,10 +32,16 @@ | |
| 32 | #include <stdlib.h> |
| 33 | #include <ctype.h> |
| 34 | #include <string.h> |
| 35 | #include <stdarg.h> |
| 36 | #include <assert.h> |
| 37 | #ifdef __MINGW32__ |
| 38 | # include <windows.h> |
| 39 | #else |
| 40 | # include <pwd.h> |
| 41 | #endif |
| 42 | |
| 43 | #include "sqlite3.h" |
| 44 | |
| 45 | /* |
| 46 | ** Typedef for a 64-bit integer |
| 47 | */ |
| 48 | |
| 49 | ELETED src/construct.c |
D
src/construct.c
-166
| --- a/src/construct.c | ||
| +++ b/src/construct.c | ||
| @@ -1,166 +0,0 @@ | ||
| 1 | -/* | |
| 2 | -** Copyright (c) 2007 Andreas Kupries | |
| 3 | -** | |
| 4 | -** This program is free software; you can redistribute it and/or | |
| 5 | -** modify it under the terms of the GNU General Public | |
| 6 | -** License version 2 as published by the Free Software Foundation. | |
| 7 | -** | |
| 8 | -** This program is distributed in the hope that it will be useful, | |
| 9 | -** but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 10 | -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| 11 | -** General Public License for more details. | |
| 12 | -** | |
| 13 | -** You should have received a copy of the GNU General Public | |
| 14 | -** License along with this library; if not, write to the | |
| 15 | -** Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
| 16 | -** Boston, MA 02111-1307, USA. | |
| 17 | -** | |
| 18 | -** Author contact information: | |
| 19 | -** [email protected] | |
| 20 | -** | |
| 21 | -** | |
| 22 | -******************************************************************************* | |
| 23 | -** | |
| 24 | -** This file contains code used to de- and reconstruct a repository | |
| 25 | -** into and from an indicated directory. | |
| 26 | -*/ | |
| 27 | -#include "config.h" | |
| 28 | -#include "construct.h" | |
| 29 | -#include <assert.h> | |
| 30 | -#include <sys/types.h> | |
| 31 | -#include <dirent.h> | |
| 32 | - | |
| 33 | -/* This function recursively scans the directory hierarchy starting at | |
| 34 | -** zOrigin and enters all found files into the repository. The uuid is | |
| 35 | -** generated from the file contents, and not taken from the, possibly | |
| 36 | -** modified, file name. While function is able to handle the directory | |
| 37 | -** structure created by 'deconstruct' it can actually much more. | |
| 38 | -*/ | |
| 39 | - | |
| 40 | -static int import_origin(const char* zOrigin){ | |
| 41 | - DIR *d; | |
| 42 | - int count = 0; | |
| 43 | - const char *zFormat; | |
| 44 | - const char *zDir = zOrigin; | |
| 45 | - struct dirent *pEntry; | |
| 46 | - | |
| 47 | - if( zDir[0]==0 ){ | |
| 48 | - zDir = "."; | |
| 49 | - zFormat = "%s%s"; | |
| 50 | - }else{ | |
| 51 | - zFormat = "%s/%s"; | |
| 52 | - } | |
| 53 | - | |
| 54 | - d = opendir(zDir); | |
| 55 | - if( d ){ | |
| 56 | - while( (pEntry=readdir(d))!=0 ){ | |
| 57 | - char *zPath; | |
| 58 | - if( pEntry->d_name[0]=='.' ) continue; | |
| 59 | - zPath = mprintf(zFormat, zOrigin, pEntry->d_name); | |
| 60 | - if( file_isdir(zPath)==1 ){ | |
| 61 | - count += import_origin(zPath); | |
| 62 | - }else if( file_isfile(zPath) ){ | |
| 63 | - Blob zIn; | |
| 64 | - blob_read_from_file (&zIn,zPath); | |
| 65 | - content_put (&zIn, 0, 0); | |
| 66 | - blob_reset (&zIn); | |
| 67 | - count++; | |
| 68 | - } | |
| 69 | - free (zPath); | |
| 70 | - } | |
| 71 | - } | |
| 72 | - closedir(d); | |
| 73 | - return count; | |
| 74 | -} | |
| 75 | - | |
| 76 | -/* | |
| 77 | -** COMMAND: deconstruct | |
| 78 | -** Usage %fossil deconstruct ?-R|--repository REPOSITORY? DESTINATION | |
| 79 | -** | |
| 80 | -** Populates the indicated DESTINATION directory with copies of all | |
| 81 | -** artifcats contained within the repository. Artifacts are named AA/bbbbb | |
| 82 | -** where AA is the first 2 characters of the artifact ID and bbbbb is the | |
| 83 | -** remaining 38 characters. | |
| 84 | -*/ | |
| 85 | - | |
| 86 | -void deconstruct_cmd(void){ | |
| 87 | - const char* zDestination; | |
| 88 | - Blob zOut; | |
| 89 | - Stmt q; | |
| 90 | - if( (g.argc != 3) && (g.argc != 5) ){ | |
| 91 | - usage ("?-R|--repository REPOSITORY? DESTINATION"); | |
| 92 | - } | |
| 93 | - db_find_and_open_repository(1); | |
| 94 | - zDestination = g.argv[g.argc-1]; | |
| 95 | - if( !file_isdir (zDestination) ){ | |
| 96 | - fossil_panic("not a directory: %s", zDestination); | |
| 97 | - } | |
| 98 | - /* Iterate over all blobs in the repository, retrieve their | |
| 99 | - * contents, and write them to a file with a name based on their | |
| 100 | - * uuid. Note: Non-writable destination causes bail-out in the first | |
| 101 | - * call of blob_write_to_file. | |
| 102 | - */ | |
| 103 | - db_prepare(&q, "SELECT rid,uuid FROM blob"); | |
| 104 | - while( db_step(&q)==SQLITE_ROW ){ | |
| 105 | - int rid = db_column_int (&q, 0); | |
| 106 | - const char *zUuid = db_column_text(&q, 1); | |
| 107 | - char *zFile = mprintf ("%s/%.2s/%s", zDestination, zUuid, zUuid + 2); | |
| 108 | - content_get (rid,&zOut); | |
| 109 | - blob_write_to_file (&zOut,zFile); | |
| 110 | - blob_reset (&zOut); | |
| 111 | - free(zFile); | |
| 112 | - } | |
| 113 | - db_finalize(&q); | |
| 114 | -} | |
| 115 | - | |
| 116 | -/* | |
| 117 | -** COMMAND: reconstruct | |
| 118 | -** Usage %fossil reconstruct REPOSITORY ORIGIN | |
| 119 | -** | |
| 120 | -** Creates the REPOSITORY and populates it with the artifacts in the | |
| 121 | -** indicated ORIGIN directory. | |
| 122 | -*/ | |
| 123 | - | |
| 124 | -void reconstruct_cmd(void){ | |
| 125 | - const char* zOrigin; | |
| 126 | - const char* zRepository; | |
| 127 | - int fileCnt; | |
| 128 | - int errCnt; | |
| 129 | - | |
| 130 | - if( g.argc != 4 ){ | |
| 131 | - usage ("REPOSITORY ORIGIN"); | |
| 132 | - } | |
| 133 | - zRepository = g.argv[2]; | |
| 134 | - zOrigin = g.argv[3]; | |
| 135 | - if( !file_isdir (zOrigin) ){ | |
| 136 | - fossil_panic("not a directory: %s", zOrigin); | |
| 137 | - } | |
| 138 | - | |
| 139 | - /* Create the foundation */ | |
| 140 | - db_create_repository(zRepository); | |
| 141 | - db_open_repository(zRepository); | |
| 142 | - db_open_config(0); | |
| 143 | - db_begin_transaction(); | |
| 144 | - | |
| 145 | - db_initial_setup(0, 1); | |
| 146 | - | |
| 147 | - printf("project-id: %s\n", db_get("project-code", 0)); | |
| 148 | - printf("server-id: %s\n", db_get("server-code", 0)); | |
| 149 | - printf("admin-user: %s (no password set yet!)\n", g.zLogin); | |
| 150 | - printf("baseline: %s\n", db_text(0, "SELECT uuid FROM blob")); | |
| 151 | - | |
| 152 | - /* Scan origin and insert all files found inside */ | |
| 153 | - fileCnt = import_origin (zOrigin); | |
| 154 | - | |
| 155 | - printf("imported: %d %s\n", fileCnt, fileCnt == 1 ? | |
| 156 | - "file" : "files"); | |
| 157 | - | |
| 158 | - /* Finalize the repository, rebuild the derived tables */ | |
| 159 | - errCnt = rebuild_db(0, 0); | |
| 160 | - | |
| 161 | - if( errCnt ){ | |
| 162 | - printf("%d %s. Rolling back changes.\n", errCnt, errCnt == 1 ? | |
| 163 | - "error" : "errors"); | |
| 164 | - db_end_transaction(1); | |
| 165 | - }else{ | |
| 166 | - db |
| --- a/src/construct.c | |
| +++ b/src/construct.c | |
| @@ -1,166 +0,0 @@ | |
| 1 | /* |
| 2 | ** Copyright (c) 2007 Andreas Kupries |
| 3 | ** |
| 4 | ** This program is free software; you can redistribute it and/or |
| 5 | ** modify it under the terms of the GNU General Public |
| 6 | ** License version 2 as published by the Free Software Foundation. |
| 7 | ** |
| 8 | ** This program is distributed in the hope that it will be useful, |
| 9 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 11 | ** General Public License for more details. |
| 12 | ** |
| 13 | ** You should have received a copy of the GNU General Public |
| 14 | ** License along with this library; if not, write to the |
| 15 | ** Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
| 16 | ** Boston, MA 02111-1307, USA. |
| 17 | ** |
| 18 | ** Author contact information: |
| 19 | ** [email protected] |
| 20 | ** |
| 21 | ** |
| 22 | ******************************************************************************* |
| 23 | ** |
| 24 | ** This file contains code used to de- and reconstruct a repository |
| 25 | ** into and from an indicated directory. |
| 26 | */ |
| 27 | #include "config.h" |
| 28 | #include "construct.h" |
| 29 | #include <assert.h> |
| 30 | #include <sys/types.h> |
| 31 | #include <dirent.h> |
| 32 | |
| 33 | /* This function recursively scans the directory hierarchy starting at |
| 34 | ** zOrigin and enters all found files into the repository. The uuid is |
| 35 | ** generated from the file contents, and not taken from the, possibly |
| 36 | ** modified, file name. While function is able to handle the directory |
| 37 | ** structure created by 'deconstruct' it can actually much more. |
| 38 | */ |
| 39 | |
| 40 | static int import_origin(const char* zOrigin){ |
| 41 | DIR *d; |
| 42 | int count = 0; |
| 43 | const char *zFormat; |
| 44 | const char *zDir = zOrigin; |
| 45 | struct dirent *pEntry; |
| 46 | |
| 47 | if( zDir[0]==0 ){ |
| 48 | zDir = "."; |
| 49 | zFormat = "%s%s"; |
| 50 | }else{ |
| 51 | zFormat = "%s/%s"; |
| 52 | } |
| 53 | |
| 54 | d = opendir(zDir); |
| 55 | if( d ){ |
| 56 | while( (pEntry=readdir(d))!=0 ){ |
| 57 | char *zPath; |
| 58 | if( pEntry->d_name[0]=='.' ) continue; |
| 59 | zPath = mprintf(zFormat, zOrigin, pEntry->d_name); |
| 60 | if( file_isdir(zPath)==1 ){ |
| 61 | count += import_origin(zPath); |
| 62 | }else if( file_isfile(zPath) ){ |
| 63 | Blob zIn; |
| 64 | blob_read_from_file (&zIn,zPath); |
| 65 | content_put (&zIn, 0, 0); |
| 66 | blob_reset (&zIn); |
| 67 | count++; |
| 68 | } |
| 69 | free (zPath); |
| 70 | } |
| 71 | } |
| 72 | closedir(d); |
| 73 | return count; |
| 74 | } |
| 75 | |
| 76 | /* |
| 77 | ** COMMAND: deconstruct |
| 78 | ** Usage %fossil deconstruct ?-R|--repository REPOSITORY? DESTINATION |
| 79 | ** |
| 80 | ** Populates the indicated DESTINATION directory with copies of all |
| 81 | ** artifcats contained within the repository. Artifacts are named AA/bbbbb |
| 82 | ** where AA is the first 2 characters of the artifact ID and bbbbb is the |
| 83 | ** remaining 38 characters. |
| 84 | */ |
| 85 | |
| 86 | void deconstruct_cmd(void){ |
| 87 | const char* zDestination; |
| 88 | Blob zOut; |
| 89 | Stmt q; |
| 90 | if( (g.argc != 3) && (g.argc != 5) ){ |
| 91 | usage ("?-R|--repository REPOSITORY? DESTINATION"); |
| 92 | } |
| 93 | db_find_and_open_repository(1); |
| 94 | zDestination = g.argv[g.argc-1]; |
| 95 | if( !file_isdir (zDestination) ){ |
| 96 | fossil_panic("not a directory: %s", zDestination); |
| 97 | } |
| 98 | /* Iterate over all blobs in the repository, retrieve their |
| 99 | * contents, and write them to a file with a name based on their |
| 100 | * uuid. Note: Non-writable destination causes bail-out in the first |
| 101 | * call of blob_write_to_file. |
| 102 | */ |
| 103 | db_prepare(&q, "SELECT rid,uuid FROM blob"); |
| 104 | while( db_step(&q)==SQLITE_ROW ){ |
| 105 | int rid = db_column_int (&q, 0); |
| 106 | const char *zUuid = db_column_text(&q, 1); |
| 107 | char *zFile = mprintf ("%s/%.2s/%s", zDestination, zUuid, zUuid + 2); |
| 108 | content_get (rid,&zOut); |
| 109 | blob_write_to_file (&zOut,zFile); |
| 110 | blob_reset (&zOut); |
| 111 | free(zFile); |
| 112 | } |
| 113 | db_finalize(&q); |
| 114 | } |
| 115 | |
| 116 | /* |
| 117 | ** COMMAND: reconstruct |
| 118 | ** Usage %fossil reconstruct REPOSITORY ORIGIN |
| 119 | ** |
| 120 | ** Creates the REPOSITORY and populates it with the artifacts in the |
| 121 | ** indicated ORIGIN directory. |
| 122 | */ |
| 123 | |
| 124 | void reconstruct_cmd(void){ |
| 125 | const char* zOrigin; |
| 126 | const char* zRepository; |
| 127 | int fileCnt; |
| 128 | int errCnt; |
| 129 | |
| 130 | if( g.argc != 4 ){ |
| 131 | usage ("REPOSITORY ORIGIN"); |
| 132 | } |
| 133 | zRepository = g.argv[2]; |
| 134 | zOrigin = g.argv[3]; |
| 135 | if( !file_isdir (zOrigin) ){ |
| 136 | fossil_panic("not a directory: %s", zOrigin); |
| 137 | } |
| 138 | |
| 139 | /* Create the foundation */ |
| 140 | db_create_repository(zRepository); |
| 141 | db_open_repository(zRepository); |
| 142 | db_open_config(0); |
| 143 | db_begin_transaction(); |
| 144 | |
| 145 | db_initial_setup(0, 1); |
| 146 | |
| 147 | printf("project-id: %s\n", db_get("project-code", 0)); |
| 148 | printf("server-id: %s\n", db_get("server-code", 0)); |
| 149 | printf("admin-user: %s (no password set yet!)\n", g.zLogin); |
| 150 | printf("baseline: %s\n", db_text(0, "SELECT uuid FROM blob")); |
| 151 | |
| 152 | /* Scan origin and insert all files found inside */ |
| 153 | fileCnt = import_origin (zOrigin); |
| 154 | |
| 155 | printf("imported: %d %s\n", fileCnt, fileCnt == 1 ? |
| 156 | "file" : "files"); |
| 157 | |
| 158 | /* Finalize the repository, rebuild the derived tables */ |
| 159 | errCnt = rebuild_db(0, 0); |
| 160 | |
| 161 | if( errCnt ){ |
| 162 | printf("%d %s. Rolling back changes.\n", errCnt, errCnt == 1 ? |
| 163 | "error" : "errors"); |
| 164 | db_end_transaction(1); |
| 165 | }else{ |
| 166 | db |
| --- a/src/construct.c | |
| +++ b/src/construct.c | |
| @@ -1,166 +0,0 @@ | |
M
src/db.c
-11
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -33,16 +33,10 @@ | ||
| 33 | 33 | ** (3) A local checkout database named "_FOSSIL_" or ".fos" |
| 34 | 34 | ** and located at the root of the local copy of the source tree. |
| 35 | 35 | ** |
| 36 | 36 | */ |
| 37 | 37 | #include "config.h" |
| 38 | -#ifndef __MINGW32__ | |
| 39 | -# include <pwd.h> | |
| 40 | -#endif | |
| 41 | -#ifdef __MINGW32__ | |
| 42 | -# include <windows.h> | |
| 43 | -#endif | |
| 44 | 38 | #include <sqlite3.h> |
| 45 | 39 | #include <sys/types.h> |
| 46 | 40 | #include <sys/stat.h> |
| 47 | 41 | #include <unistd.h> |
| 48 | 42 | #include "db.h" |
| @@ -1469,14 +1463,10 @@ | ||
| 1469 | 1463 | ** With a value argument it changes the property for the current repository. |
| 1470 | 1464 | ** |
| 1471 | 1465 | ** The "unset" command clears a property setting. |
| 1472 | 1466 | ** |
| 1473 | 1467 | ** |
| 1474 | -** auto-captcha If enabled, the Login page will provide a button | |
| 1475 | -** which uses JavaScript to fill out the captcha for | |
| 1476 | -** the "anonymous" user. (Most bots cannot use JavaScript.) | |
| 1477 | -** | |
| 1478 | 1468 | ** autosync If enabled, automatically pull prior to |
| 1479 | 1469 | ** commit or update and automatically push |
| 1480 | 1470 | ** after commit or tag or branch creation. |
| 1481 | 1471 | ** |
| 1482 | 1472 | ** clearsign When enabled (the default), fossil will attempt to |
| @@ -1518,11 +1508,10 @@ | ||
| 1518 | 1508 | ** Defaults to "start" on windows, "open" on Mac, |
| 1519 | 1509 | ** and "firefox" on Unix. |
| 1520 | 1510 | */ |
| 1521 | 1511 | void setting_cmd(void){ |
| 1522 | 1512 | static const char *azName[] = { |
| 1523 | - "auto-captcha", | |
| 1524 | 1513 | "autosync", |
| 1525 | 1514 | "clearsign", |
| 1526 | 1515 | "diff-command", |
| 1527 | 1516 | "dont-push", |
| 1528 | 1517 | "editor", |
| 1529 | 1518 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -33,16 +33,10 @@ | |
| 33 | ** (3) A local checkout database named "_FOSSIL_" or ".fos" |
| 34 | ** and located at the root of the local copy of the source tree. |
| 35 | ** |
| 36 | */ |
| 37 | #include "config.h" |
| 38 | #ifndef __MINGW32__ |
| 39 | # include <pwd.h> |
| 40 | #endif |
| 41 | #ifdef __MINGW32__ |
| 42 | # include <windows.h> |
| 43 | #endif |
| 44 | #include <sqlite3.h> |
| 45 | #include <sys/types.h> |
| 46 | #include <sys/stat.h> |
| 47 | #include <unistd.h> |
| 48 | #include "db.h" |
| @@ -1469,14 +1463,10 @@ | |
| 1469 | ** With a value argument it changes the property for the current repository. |
| 1470 | ** |
| 1471 | ** The "unset" command clears a property setting. |
| 1472 | ** |
| 1473 | ** |
| 1474 | ** auto-captcha If enabled, the Login page will provide a button |
| 1475 | ** which uses JavaScript to fill out the captcha for |
| 1476 | ** the "anonymous" user. (Most bots cannot use JavaScript.) |
| 1477 | ** |
| 1478 | ** autosync If enabled, automatically pull prior to |
| 1479 | ** commit or update and automatically push |
| 1480 | ** after commit or tag or branch creation. |
| 1481 | ** |
| 1482 | ** clearsign When enabled (the default), fossil will attempt to |
| @@ -1518,11 +1508,10 @@ | |
| 1518 | ** Defaults to "start" on windows, "open" on Mac, |
| 1519 | ** and "firefox" on Unix. |
| 1520 | */ |
| 1521 | void setting_cmd(void){ |
| 1522 | static const char *azName[] = { |
| 1523 | "auto-captcha", |
| 1524 | "autosync", |
| 1525 | "clearsign", |
| 1526 | "diff-command", |
| 1527 | "dont-push", |
| 1528 | "editor", |
| 1529 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -33,16 +33,10 @@ | |
| 33 | ** (3) A local checkout database named "_FOSSIL_" or ".fos" |
| 34 | ** and located at the root of the local copy of the source tree. |
| 35 | ** |
| 36 | */ |
| 37 | #include "config.h" |
| 38 | #include <sqlite3.h> |
| 39 | #include <sys/types.h> |
| 40 | #include <sys/stat.h> |
| 41 | #include <unistd.h> |
| 42 | #include "db.h" |
| @@ -1469,14 +1463,10 @@ | |
| 1463 | ** With a value argument it changes the property for the current repository. |
| 1464 | ** |
| 1465 | ** The "unset" command clears a property setting. |
| 1466 | ** |
| 1467 | ** |
| 1468 | ** autosync If enabled, automatically pull prior to |
| 1469 | ** commit or update and automatically push |
| 1470 | ** after commit or tag or branch creation. |
| 1471 | ** |
| 1472 | ** clearsign When enabled (the default), fossil will attempt to |
| @@ -1518,11 +1508,10 @@ | |
| 1508 | ** Defaults to "start" on windows, "open" on Mac, |
| 1509 | ** and "firefox" on Unix. |
| 1510 | */ |
| 1511 | void setting_cmd(void){ |
| 1512 | static const char *azName[] = { |
| 1513 | "autosync", |
| 1514 | "clearsign", |
| 1515 | "diff-command", |
| 1516 | "dont-push", |
| 1517 | "editor", |
| 1518 |
+2
-22
| --- src/main.mk | ||
| +++ src/main.mk | ||
| @@ -25,11 +25,10 @@ | ||
| 25 | 25 | $(SRCDIR)/checkout.c \ |
| 26 | 26 | $(SRCDIR)/clearsign.c \ |
| 27 | 27 | $(SRCDIR)/clone.c \ |
| 28 | 28 | $(SRCDIR)/comformat.c \ |
| 29 | 29 | $(SRCDIR)/configure.c \ |
| 30 | - $(SRCDIR)/construct.c \ | |
| 31 | 30 | $(SRCDIR)/content.c \ |
| 32 | 31 | $(SRCDIR)/db.c \ |
| 33 | 32 | $(SRCDIR)/delta.c \ |
| 34 | 33 | $(SRCDIR)/deltacmd.c \ |
| 35 | 34 | $(SRCDIR)/descendants.c \ |
| @@ -54,11 +53,10 @@ | ||
| 54 | 53 | $(SRCDIR)/pqueue.c \ |
| 55 | 54 | $(SRCDIR)/printf.c \ |
| 56 | 55 | $(SRCDIR)/rebuild.c \ |
| 57 | 56 | $(SRCDIR)/report.c \ |
| 58 | 57 | $(SRCDIR)/rss.c \ |
| 59 | - $(SRCDIR)/rstats.c \ | |
| 60 | 58 | $(SRCDIR)/schema.c \ |
| 61 | 59 | $(SRCDIR)/search.c \ |
| 62 | 60 | $(SRCDIR)/setup.c \ |
| 63 | 61 | $(SRCDIR)/sha1.c \ |
| 64 | 62 | $(SRCDIR)/shun.c \ |
| @@ -96,11 +94,10 @@ | ||
| 96 | 94 | checkout_.c \ |
| 97 | 95 | clearsign_.c \ |
| 98 | 96 | clone_.c \ |
| 99 | 97 | comformat_.c \ |
| 100 | 98 | configure_.c \ |
| 101 | - construct_.c \ | |
| 102 | 99 | content_.c \ |
| 103 | 100 | db_.c \ |
| 104 | 101 | delta_.c \ |
| 105 | 102 | deltacmd_.c \ |
| 106 | 103 | descendants_.c \ |
| @@ -125,11 +122,10 @@ | ||
| 125 | 122 | pqueue_.c \ |
| 126 | 123 | printf_.c \ |
| 127 | 124 | rebuild_.c \ |
| 128 | 125 | report_.c \ |
| 129 | 126 | rss_.c \ |
| 130 | - rstats_.c \ | |
| 131 | 127 | schema_.c \ |
| 132 | 128 | search_.c \ |
| 133 | 129 | setup_.c \ |
| 134 | 130 | sha1_.c \ |
| 135 | 131 | shun_.c \ |
| @@ -167,11 +163,10 @@ | ||
| 167 | 163 | checkout.o \ |
| 168 | 164 | clearsign.o \ |
| 169 | 165 | clone.o \ |
| 170 | 166 | comformat.o \ |
| 171 | 167 | configure.o \ |
| 172 | - construct.o \ | |
| 173 | 168 | content.o \ |
| 174 | 169 | db.o \ |
| 175 | 170 | delta.o \ |
| 176 | 171 | deltacmd.o \ |
| 177 | 172 | descendants.o \ |
| @@ -196,11 +191,10 @@ | ||
| 196 | 191 | pqueue.o \ |
| 197 | 192 | printf.o \ |
| 198 | 193 | rebuild.o \ |
| 199 | 194 | report.o \ |
| 200 | 195 | rss.o \ |
| 201 | - rstats.o \ | |
| 202 | 196 | schema.o \ |
| 203 | 197 | search.o \ |
| 204 | 198 | setup.o \ |
| 205 | 199 | sha1.o \ |
| 206 | 200 | shun.o \ |
| @@ -264,16 +258,16 @@ | ||
| 264 | 258 | # noop |
| 265 | 259 | |
| 266 | 260 | clean: |
| 267 | 261 | rm -f *.o *_.c $(APPNAME) VERSION.h |
| 268 | 262 | rm -f translate makeheaders mkindex page_index.h headers |
| 269 | - rm -f add.h allrepo.h bag.h blob.h branch.h browse.h captcha.h cgi.h checkin.h checkout.h clearsign.h clone.h comformat.h configure.h construct.h content.h db.h delta.h deltacmd.h descendants.h diff.h diffcmd.h doc.h encode.h file.h finfo.h http.h http_socket.h http_transport.h info.h login.h main.h manifest.h md5.h merge.h merge3.h name.h pivot.h pqueue.h printf.h rebuild.h report.h rss.h rstats.h schema.h search.h setup.h sha1.h shun.h skins.h stat.h style.h sync.h tag.h th_main.h timeline.h tkt.h tktsetup.h undo.h update.h url.h user.h verify.h vfile.h wiki.h wikiformat.h winhttp.h xfer.h zip.h | |
| 263 | + rm -f add.h allrepo.h bag.h blob.h branch.h browse.h captcha.h cgi.h checkin.h checkout.h clearsign.h clone.h comformat.h configure.h content.h db.h delta.h deltacmd.h descendants.h diff.h diffcmd.h doc.h encode.h file.h finfo.h http.h http_socket.h http_transport.h info.h login.h main.h manifest.h md5.h merge.h merge3.h name.h pivot.h pqueue.h printf.h rebuild.h report.h rss.h schema.h search.h setup.h sha1.h shun.h skins.h stat.h style.h sync.h tag.h th_main.h timeline.h tkt.h tktsetup.h undo.h update.h url.h user.h verify.h vfile.h wiki.h wikiformat.h winhttp.h xfer.h zip.h | |
| 270 | 264 | |
| 271 | 265 | page_index.h: $(TRANS_SRC) mkindex |
| 272 | 266 | ./mkindex $(TRANS_SRC) >$@ |
| 273 | 267 | headers: page_index.h makeheaders VERSION.h |
| 274 | - ./makeheaders add_.c:add.h allrepo_.c:allrepo.h bag_.c:bag.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h construct_.c:construct.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h file_.c:file.h finfo_.c:finfo.h http_.c:http.h http_socket_.c:http_socket.h http_transport_.c:http_transport.h info_.c:info.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h name_.c:name.h pivot_.c:pivot.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h report_.c:report.h rss_.c:rss.h rstats_.c:rstats.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h VERSION.h | |
| 268 | + ./makeheaders add_.c:add.h allrepo_.c:allrepo.h bag_.c:bag.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h file_.c:file.h finfo_.c:finfo.h http_.c:http.h http_socket_.c:http_socket.h http_transport_.c:http_transport.h info_.c:info.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h name_.c:name.h pivot_.c:pivot.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h VERSION.h | |
| 275 | 269 | touch headers |
| 276 | 270 | headers: Makefile |
| 277 | 271 | Makefile: |
| 278 | 272 | add_.c: $(SRCDIR)/add.c translate |
| 279 | 273 | ./translate $(SRCDIR)/add.c >add_.c |
| @@ -371,17 +365,10 @@ | ||
| 371 | 365 | |
| 372 | 366 | configure.o: configure_.c configure.h $(SRCDIR)/config.h |
| 373 | 367 | $(XTCC) -o configure.o -c configure_.c |
| 374 | 368 | |
| 375 | 369 | configure.h: headers |
| 376 | -construct_.c: $(SRCDIR)/construct.c translate | |
| 377 | - ./translate $(SRCDIR)/construct.c >construct_.c | |
| 378 | - | |
| 379 | -construct.o: construct_.c construct.h $(SRCDIR)/config.h | |
| 380 | - $(XTCC) -o construct.o -c construct_.c | |
| 381 | - | |
| 382 | -construct.h: headers | |
| 383 | 370 | content_.c: $(SRCDIR)/content.c translate |
| 384 | 371 | ./translate $(SRCDIR)/content.c >content_.c |
| 385 | 372 | |
| 386 | 373 | content.o: content_.c content.h $(SRCDIR)/config.h |
| 387 | 374 | $(XTCC) -o content.o -c content_.c |
| @@ -574,17 +561,10 @@ | ||
| 574 | 561 | |
| 575 | 562 | rss.o: rss_.c rss.h $(SRCDIR)/config.h |
| 576 | 563 | $(XTCC) -o rss.o -c rss_.c |
| 577 | 564 | |
| 578 | 565 | rss.h: headers |
| 579 | -rstats_.c: $(SRCDIR)/rstats.c translate | |
| 580 | - ./translate $(SRCDIR)/rstats.c >rstats_.c | |
| 581 | - | |
| 582 | -rstats.o: rstats_.c rstats.h $(SRCDIR)/config.h | |
| 583 | - $(XTCC) -o rstats.o -c rstats_.c | |
| 584 | - | |
| 585 | -rstats.h: headers | |
| 586 | 566 | schema_.c: $(SRCDIR)/schema.c translate |
| 587 | 567 | ./translate $(SRCDIR)/schema.c >schema_.c |
| 588 | 568 | |
| 589 | 569 | schema.o: schema_.c schema.h $(SRCDIR)/config.h |
| 590 | 570 | $(XTCC) -o schema.o -c schema_.c |
| 591 | 571 |
| --- src/main.mk | |
| +++ src/main.mk | |
| @@ -25,11 +25,10 @@ | |
| 25 | $(SRCDIR)/checkout.c \ |
| 26 | $(SRCDIR)/clearsign.c \ |
| 27 | $(SRCDIR)/clone.c \ |
| 28 | $(SRCDIR)/comformat.c \ |
| 29 | $(SRCDIR)/configure.c \ |
| 30 | $(SRCDIR)/construct.c \ |
| 31 | $(SRCDIR)/content.c \ |
| 32 | $(SRCDIR)/db.c \ |
| 33 | $(SRCDIR)/delta.c \ |
| 34 | $(SRCDIR)/deltacmd.c \ |
| 35 | $(SRCDIR)/descendants.c \ |
| @@ -54,11 +53,10 @@ | |
| 54 | $(SRCDIR)/pqueue.c \ |
| 55 | $(SRCDIR)/printf.c \ |
| 56 | $(SRCDIR)/rebuild.c \ |
| 57 | $(SRCDIR)/report.c \ |
| 58 | $(SRCDIR)/rss.c \ |
| 59 | $(SRCDIR)/rstats.c \ |
| 60 | $(SRCDIR)/schema.c \ |
| 61 | $(SRCDIR)/search.c \ |
| 62 | $(SRCDIR)/setup.c \ |
| 63 | $(SRCDIR)/sha1.c \ |
| 64 | $(SRCDIR)/shun.c \ |
| @@ -96,11 +94,10 @@ | |
| 96 | checkout_.c \ |
| 97 | clearsign_.c \ |
| 98 | clone_.c \ |
| 99 | comformat_.c \ |
| 100 | configure_.c \ |
| 101 | construct_.c \ |
| 102 | content_.c \ |
| 103 | db_.c \ |
| 104 | delta_.c \ |
| 105 | deltacmd_.c \ |
| 106 | descendants_.c \ |
| @@ -125,11 +122,10 @@ | |
| 125 | pqueue_.c \ |
| 126 | printf_.c \ |
| 127 | rebuild_.c \ |
| 128 | report_.c \ |
| 129 | rss_.c \ |
| 130 | rstats_.c \ |
| 131 | schema_.c \ |
| 132 | search_.c \ |
| 133 | setup_.c \ |
| 134 | sha1_.c \ |
| 135 | shun_.c \ |
| @@ -167,11 +163,10 @@ | |
| 167 | checkout.o \ |
| 168 | clearsign.o \ |
| 169 | clone.o \ |
| 170 | comformat.o \ |
| 171 | configure.o \ |
| 172 | construct.o \ |
| 173 | content.o \ |
| 174 | db.o \ |
| 175 | delta.o \ |
| 176 | deltacmd.o \ |
| 177 | descendants.o \ |
| @@ -196,11 +191,10 @@ | |
| 196 | pqueue.o \ |
| 197 | printf.o \ |
| 198 | rebuild.o \ |
| 199 | report.o \ |
| 200 | rss.o \ |
| 201 | rstats.o \ |
| 202 | schema.o \ |
| 203 | search.o \ |
| 204 | setup.o \ |
| 205 | sha1.o \ |
| 206 | shun.o \ |
| @@ -264,16 +258,16 @@ | |
| 264 | # noop |
| 265 | |
| 266 | clean: |
| 267 | rm -f *.o *_.c $(APPNAME) VERSION.h |
| 268 | rm -f translate makeheaders mkindex page_index.h headers |
| 269 | rm -f add.h allrepo.h bag.h blob.h branch.h browse.h captcha.h cgi.h checkin.h checkout.h clearsign.h clone.h comformat.h configure.h construct.h content.h db.h delta.h deltacmd.h descendants.h diff.h diffcmd.h doc.h encode.h file.h finfo.h http.h http_socket.h http_transport.h info.h login.h main.h manifest.h md5.h merge.h merge3.h name.h pivot.h pqueue.h printf.h rebuild.h report.h rss.h rstats.h schema.h search.h setup.h sha1.h shun.h skins.h stat.h style.h sync.h tag.h th_main.h timeline.h tkt.h tktsetup.h undo.h update.h url.h user.h verify.h vfile.h wiki.h wikiformat.h winhttp.h xfer.h zip.h |
| 270 | |
| 271 | page_index.h: $(TRANS_SRC) mkindex |
| 272 | ./mkindex $(TRANS_SRC) >$@ |
| 273 | headers: page_index.h makeheaders VERSION.h |
| 274 | ./makeheaders add_.c:add.h allrepo_.c:allrepo.h bag_.c:bag.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h construct_.c:construct.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h file_.c:file.h finfo_.c:finfo.h http_.c:http.h http_socket_.c:http_socket.h http_transport_.c:http_transport.h info_.c:info.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h name_.c:name.h pivot_.c:pivot.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h report_.c:report.h rss_.c:rss.h rstats_.c:rstats.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h VERSION.h |
| 275 | touch headers |
| 276 | headers: Makefile |
| 277 | Makefile: |
| 278 | add_.c: $(SRCDIR)/add.c translate |
| 279 | ./translate $(SRCDIR)/add.c >add_.c |
| @@ -371,17 +365,10 @@ | |
| 371 | |
| 372 | configure.o: configure_.c configure.h $(SRCDIR)/config.h |
| 373 | $(XTCC) -o configure.o -c configure_.c |
| 374 | |
| 375 | configure.h: headers |
| 376 | construct_.c: $(SRCDIR)/construct.c translate |
| 377 | ./translate $(SRCDIR)/construct.c >construct_.c |
| 378 | |
| 379 | construct.o: construct_.c construct.h $(SRCDIR)/config.h |
| 380 | $(XTCC) -o construct.o -c construct_.c |
| 381 | |
| 382 | construct.h: headers |
| 383 | content_.c: $(SRCDIR)/content.c translate |
| 384 | ./translate $(SRCDIR)/content.c >content_.c |
| 385 | |
| 386 | content.o: content_.c content.h $(SRCDIR)/config.h |
| 387 | $(XTCC) -o content.o -c content_.c |
| @@ -574,17 +561,10 @@ | |
| 574 | |
| 575 | rss.o: rss_.c rss.h $(SRCDIR)/config.h |
| 576 | $(XTCC) -o rss.o -c rss_.c |
| 577 | |
| 578 | rss.h: headers |
| 579 | rstats_.c: $(SRCDIR)/rstats.c translate |
| 580 | ./translate $(SRCDIR)/rstats.c >rstats_.c |
| 581 | |
| 582 | rstats.o: rstats_.c rstats.h $(SRCDIR)/config.h |
| 583 | $(XTCC) -o rstats.o -c rstats_.c |
| 584 | |
| 585 | rstats.h: headers |
| 586 | schema_.c: $(SRCDIR)/schema.c translate |
| 587 | ./translate $(SRCDIR)/schema.c >schema_.c |
| 588 | |
| 589 | schema.o: schema_.c schema.h $(SRCDIR)/config.h |
| 590 | $(XTCC) -o schema.o -c schema_.c |
| 591 |
| --- src/main.mk | |
| +++ src/main.mk | |
| @@ -25,11 +25,10 @@ | |
| 25 | $(SRCDIR)/checkout.c \ |
| 26 | $(SRCDIR)/clearsign.c \ |
| 27 | $(SRCDIR)/clone.c \ |
| 28 | $(SRCDIR)/comformat.c \ |
| 29 | $(SRCDIR)/configure.c \ |
| 30 | $(SRCDIR)/content.c \ |
| 31 | $(SRCDIR)/db.c \ |
| 32 | $(SRCDIR)/delta.c \ |
| 33 | $(SRCDIR)/deltacmd.c \ |
| 34 | $(SRCDIR)/descendants.c \ |
| @@ -54,11 +53,10 @@ | |
| 53 | $(SRCDIR)/pqueue.c \ |
| 54 | $(SRCDIR)/printf.c \ |
| 55 | $(SRCDIR)/rebuild.c \ |
| 56 | $(SRCDIR)/report.c \ |
| 57 | $(SRCDIR)/rss.c \ |
| 58 | $(SRCDIR)/schema.c \ |
| 59 | $(SRCDIR)/search.c \ |
| 60 | $(SRCDIR)/setup.c \ |
| 61 | $(SRCDIR)/sha1.c \ |
| 62 | $(SRCDIR)/shun.c \ |
| @@ -96,11 +94,10 @@ | |
| 94 | checkout_.c \ |
| 95 | clearsign_.c \ |
| 96 | clone_.c \ |
| 97 | comformat_.c \ |
| 98 | configure_.c \ |
| 99 | content_.c \ |
| 100 | db_.c \ |
| 101 | delta_.c \ |
| 102 | deltacmd_.c \ |
| 103 | descendants_.c \ |
| @@ -125,11 +122,10 @@ | |
| 122 | pqueue_.c \ |
| 123 | printf_.c \ |
| 124 | rebuild_.c \ |
| 125 | report_.c \ |
| 126 | rss_.c \ |
| 127 | schema_.c \ |
| 128 | search_.c \ |
| 129 | setup_.c \ |
| 130 | sha1_.c \ |
| 131 | shun_.c \ |
| @@ -167,11 +163,10 @@ | |
| 163 | checkout.o \ |
| 164 | clearsign.o \ |
| 165 | clone.o \ |
| 166 | comformat.o \ |
| 167 | configure.o \ |
| 168 | content.o \ |
| 169 | db.o \ |
| 170 | delta.o \ |
| 171 | deltacmd.o \ |
| 172 | descendants.o \ |
| @@ -196,11 +191,10 @@ | |
| 191 | pqueue.o \ |
| 192 | printf.o \ |
| 193 | rebuild.o \ |
| 194 | report.o \ |
| 195 | rss.o \ |
| 196 | schema.o \ |
| 197 | search.o \ |
| 198 | setup.o \ |
| 199 | sha1.o \ |
| 200 | shun.o \ |
| @@ -264,16 +258,16 @@ | |
| 258 | # noop |
| 259 | |
| 260 | clean: |
| 261 | rm -f *.o *_.c $(APPNAME) VERSION.h |
| 262 | rm -f translate makeheaders mkindex page_index.h headers |
| 263 | rm -f add.h allrepo.h bag.h blob.h branch.h browse.h captcha.h cgi.h checkin.h checkout.h clearsign.h clone.h comformat.h configure.h content.h db.h delta.h deltacmd.h descendants.h diff.h diffcmd.h doc.h encode.h file.h finfo.h http.h http_socket.h http_transport.h info.h login.h main.h manifest.h md5.h merge.h merge3.h name.h pivot.h pqueue.h printf.h rebuild.h report.h rss.h schema.h search.h setup.h sha1.h shun.h skins.h stat.h style.h sync.h tag.h th_main.h timeline.h tkt.h tktsetup.h undo.h update.h url.h user.h verify.h vfile.h wiki.h wikiformat.h winhttp.h xfer.h zip.h |
| 264 | |
| 265 | page_index.h: $(TRANS_SRC) mkindex |
| 266 | ./mkindex $(TRANS_SRC) >$@ |
| 267 | headers: page_index.h makeheaders VERSION.h |
| 268 | ./makeheaders add_.c:add.h allrepo_.c:allrepo.h bag_.c:bag.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h file_.c:file.h finfo_.c:finfo.h http_.c:http.h http_socket_.c:http_socket.h http_transport_.c:http_transport.h info_.c:info.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h name_.c:name.h pivot_.c:pivot.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h VERSION.h |
| 269 | touch headers |
| 270 | headers: Makefile |
| 271 | Makefile: |
| 272 | add_.c: $(SRCDIR)/add.c translate |
| 273 | ./translate $(SRCDIR)/add.c >add_.c |
| @@ -371,17 +365,10 @@ | |
| 365 | |
| 366 | configure.o: configure_.c configure.h $(SRCDIR)/config.h |
| 367 | $(XTCC) -o configure.o -c configure_.c |
| 368 | |
| 369 | configure.h: headers |
| 370 | content_.c: $(SRCDIR)/content.c translate |
| 371 | ./translate $(SRCDIR)/content.c >content_.c |
| 372 | |
| 373 | content.o: content_.c content.h $(SRCDIR)/config.h |
| 374 | $(XTCC) -o content.o -c content_.c |
| @@ -574,17 +561,10 @@ | |
| 561 | |
| 562 | rss.o: rss_.c rss.h $(SRCDIR)/config.h |
| 563 | $(XTCC) -o rss.o -c rss_.c |
| 564 | |
| 565 | rss.h: headers |
| 566 | schema_.c: $(SRCDIR)/schema.c translate |
| 567 | ./translate $(SRCDIR)/schema.c >schema_.c |
| 568 | |
| 569 | schema.o: schema_.c schema.h $(SRCDIR)/config.h |
| 570 | $(XTCC) -o schema.o -c schema_.c |
| 571 |
-2
| --- src/makemake.tcl | ||
| +++ src/makemake.tcl | ||
| @@ -19,11 +19,10 @@ | ||
| 19 | 19 | checkout |
| 20 | 20 | clearsign |
| 21 | 21 | clone |
| 22 | 22 | comformat |
| 23 | 23 | configure |
| 24 | - construct | |
| 25 | 24 | content |
| 26 | 25 | db |
| 27 | 26 | delta |
| 28 | 27 | deltacmd |
| 29 | 28 | descendants |
| @@ -48,11 +47,10 @@ | ||
| 48 | 47 | pqueue |
| 49 | 48 | printf |
| 50 | 49 | rebuild |
| 51 | 50 | report |
| 52 | 51 | rss |
| 53 | - rstats | |
| 54 | 52 | schema |
| 55 | 53 | search |
| 56 | 54 | setup |
| 57 | 55 | sha1 |
| 58 | 56 | shun |
| 59 | 57 | |
| 60 | 58 | DELETED src/rstats.c |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -19,11 +19,10 @@ | |
| 19 | checkout |
| 20 | clearsign |
| 21 | clone |
| 22 | comformat |
| 23 | configure |
| 24 | construct |
| 25 | content |
| 26 | db |
| 27 | delta |
| 28 | deltacmd |
| 29 | descendants |
| @@ -48,11 +47,10 @@ | |
| 48 | pqueue |
| 49 | printf |
| 50 | rebuild |
| 51 | report |
| 52 | rss |
| 53 | rstats |
| 54 | schema |
| 55 | search |
| 56 | setup |
| 57 | sha1 |
| 58 | shun |
| 59 | |
| 60 | ELETED src/rstats.c |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -19,11 +19,10 @@ | |
| 19 | checkout |
| 20 | clearsign |
| 21 | clone |
| 22 | comformat |
| 23 | configure |
| 24 | content |
| 25 | db |
| 26 | delta |
| 27 | deltacmd |
| 28 | descendants |
| @@ -48,11 +47,10 @@ | |
| 47 | pqueue |
| 48 | printf |
| 49 | rebuild |
| 50 | report |
| 51 | rss |
| 52 | schema |
| 53 | search |
| 54 | setup |
| 55 | sha1 |
| 56 | shun |
| 57 | |
| 58 | ELETED src/rstats.c |
D
src/rstats.c
-82
| --- a/src/rstats.c | ||
| +++ b/src/rstats.c | ||
| @@ -1,82 +0,0 @@ | ||
| 1 | -/* | |
| 2 | -** Copyright (c) 2008 D. Richard Hipp, Kevin Kinnell | |
| 3 | -** | |
| 4 | -** This program is free software; you can redistribute it and/or | |
| 5 | -** modify it under the terms of the GNU General Public | |
| 6 | -** License version 2 as published by the Free Software Foundation. | |
| 7 | -** | |
| 8 | -** This program is distributed in the hope that it will be useful, | |
| 9 | -** but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 10 | -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| 11 | -** General Public License for more details. | |
| 12 | -** | |
| 13 | -** You should have received a copy of the GNU General Public | |
| 14 | -** License along with this library; if not, write to the | |
| 15 | -** Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
| 16 | -** Boston, MA 02111-1307, USA. | |
| 17 | -** | |
| 18 | -** Author contact information: | |
| 19 | -** [email protected] | |
| 20 | -** http://www.hwaci.com/drh/ | |
| 21 | -** | |
| 22 | -** [email protected] | |
| 23 | -** | |
| 24 | -******************************************************************************* | |
| 25 | -** | |
| 26 | -** This file contains code to implement the metrics command. This is a | |
| 27 | -** command-line version of the stats page. | |
| 28 | -** | |
| 29 | -*/ | |
| 30 | -#include <string.h> | |
| 31 | -#include "config.h" | |
| 32 | -#include "rstats.h" | |
| 33 | - | |
| 34 | -/* | |
| 35 | -** COMMAND: rstats | |
| 36 | -** | |
| 37 | -** Usage: %fossil rstats | |
| 38 | -** | |
| 39 | -** Deliver a report of the repository statistics for the | |
| 40 | -** current checkout. | |
| 41 | -*/ | |
| 42 | -void rstats_cmd(void){ | |
| 43 | - i64 t; | |
| 44 | - int n, m, fsize, vid; | |
| 45 | - char zBuf[100]; | |
| 46 | - | |
| 47 | - db_must_be_within_tree(); | |
| 48 | - vid = db_lget_int("checkout",0); | |
| 49 | - if( vid==0 ){ | |
| 50 | - fossil_panic("no checkout"); | |
| 51 | - } | |
| 52 | - fsize = file_size(g.zRepositoryName); | |
| 53 | - n = db_int(0, "SELECT count(*) FROM blob"); | |
| 54 | - m = db_int(0, "SELECT count(*) FROM delta"); | |
| 55 | - printf(" Number of Artifacts: %d\n", n); | |
| 56 | - printf(" %d full text + %d delta blobs\n", (n-m), m); | |
| 57 | - if( n>0 ){ | |
| 58 | - int a, b; | |
| 59 | - t = db_int64(0, "SELECT total(size) FROM blob WHERE size>0"); | |
| 60 | - sqlite3_snprintf(sizeof(zBuf), zBuf, "%lld", t); | |
| 61 | - if( t/fsize < 5 ){ | |
| 62 | - b = 10; | |
| 63 | - fsize /= 10; | |
| 64 | - }else{ | |
| 65 | - b = 1; | |
| 66 | - } | |
| 67 | - a = t/fsize; | |
| 68 | - printf(" %d bytes average, %s bytes total\n\n", | |
| 69 | - ((int)(((double)t)/(double)n)), | |
| 70 | - (zBuf)); | |
| 71 | - } | |
| 72 | - n = db_int(0, "SELECT count(distinct mid) FROM mlink"); | |
| 73 | - printf(" Number Of Checkins: %d\n", n); | |
| 74 | - n = db_int(0, "SELECT count(*) FROM filename"); | |
| 75 | - printf(" Number Of Files: %d\n", n); | |
| 76 | - n = db_int(0, "SELECT count(*) FROM tag WHERE +tagname GLOB 'wiki-*'"); | |
| 77 | - printf("Number Of Wiki Pages: %d\n", n); | |
| 78 | - n = db_int(0, "SELECT count(*) FROM tag WHERE +tagname GLOB 'tkt-*'"); | |
| 79 | - printf(" Number Of Tickets: %d\n", n); | |
| 80 | - n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event) + 0.99"); | |
| 81 | - printf(" Duration Of Project: %d days\n", n); | |
| 82 | -} |
| --- a/src/rstats.c | |
| +++ b/src/rstats.c | |
| @@ -1,82 +0,0 @@ | |
| 1 | /* |
| 2 | ** Copyright (c) 2008 D. Richard Hipp, Kevin Kinnell |
| 3 | ** |
| 4 | ** This program is free software; you can redistribute it and/or |
| 5 | ** modify it under the terms of the GNU General Public |
| 6 | ** License version 2 as published by the Free Software Foundation. |
| 7 | ** |
| 8 | ** This program is distributed in the hope that it will be useful, |
| 9 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 11 | ** General Public License for more details. |
| 12 | ** |
| 13 | ** You should have received a copy of the GNU General Public |
| 14 | ** License along with this library; if not, write to the |
| 15 | ** Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
| 16 | ** Boston, MA 02111-1307, USA. |
| 17 | ** |
| 18 | ** Author contact information: |
| 19 | ** [email protected] |
| 20 | ** http://www.hwaci.com/drh/ |
| 21 | ** |
| 22 | ** [email protected] |
| 23 | ** |
| 24 | ******************************************************************************* |
| 25 | ** |
| 26 | ** This file contains code to implement the metrics command. This is a |
| 27 | ** command-line version of the stats page. |
| 28 | ** |
| 29 | */ |
| 30 | #include <string.h> |
| 31 | #include "config.h" |
| 32 | #include "rstats.h" |
| 33 | |
| 34 | /* |
| 35 | ** COMMAND: rstats |
| 36 | ** |
| 37 | ** Usage: %fossil rstats |
| 38 | ** |
| 39 | ** Deliver a report of the repository statistics for the |
| 40 | ** current checkout. |
| 41 | */ |
| 42 | void rstats_cmd(void){ |
| 43 | i64 t; |
| 44 | int n, m, fsize, vid; |
| 45 | char zBuf[100]; |
| 46 | |
| 47 | db_must_be_within_tree(); |
| 48 | vid = db_lget_int("checkout",0); |
| 49 | if( vid==0 ){ |
| 50 | fossil_panic("no checkout"); |
| 51 | } |
| 52 | fsize = file_size(g.zRepositoryName); |
| 53 | n = db_int(0, "SELECT count(*) FROM blob"); |
| 54 | m = db_int(0, "SELECT count(*) FROM delta"); |
| 55 | printf(" Number of Artifacts: %d\n", n); |
| 56 | printf(" %d full text + %d delta blobs\n", (n-m), m); |
| 57 | if( n>0 ){ |
| 58 | int a, b; |
| 59 | t = db_int64(0, "SELECT total(size) FROM blob WHERE size>0"); |
| 60 | sqlite3_snprintf(sizeof(zBuf), zBuf, "%lld", t); |
| 61 | if( t/fsize < 5 ){ |
| 62 | b = 10; |
| 63 | fsize /= 10; |
| 64 | }else{ |
| 65 | b = 1; |
| 66 | } |
| 67 | a = t/fsize; |
| 68 | printf(" %d bytes average, %s bytes total\n\n", |
| 69 | ((int)(((double)t)/(double)n)), |
| 70 | (zBuf)); |
| 71 | } |
| 72 | n = db_int(0, "SELECT count(distinct mid) FROM mlink"); |
| 73 | printf(" Number Of Checkins: %d\n", n); |
| 74 | n = db_int(0, "SELECT count(*) FROM filename"); |
| 75 | printf(" Number Of Files: %d\n", n); |
| 76 | n = db_int(0, "SELECT count(*) FROM tag WHERE +tagname GLOB 'wiki-*'"); |
| 77 | printf("Number Of Wiki Pages: %d\n", n); |
| 78 | n = db_int(0, "SELECT count(*) FROM tag WHERE +tagname GLOB 'tkt-*'"); |
| 79 | printf(" Number Of Tickets: %d\n", n); |
| 80 | n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event) + 0.99"); |
| 81 | printf(" Duration Of Project: %d days\n", n); |
| 82 | } |
| --- a/src/rstats.c | |
| +++ b/src/rstats.c | |
| @@ -1,82 +0,0 @@ | |
-92
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -64,12 +64,10 @@ | ||
| 64 | 64 | "Grant privileges to individual users."); |
| 65 | 65 | setup_menu_entry("Access", "setup_access", |
| 66 | 66 | "Control access settings."); |
| 67 | 67 | setup_menu_entry("Configuration", "setup_config", |
| 68 | 68 | "Configure the WWW components of the repository"); |
| 69 | - setup_menu_entry("Behavior", "setup_behavior", | |
| 70 | - "Configure the SCM behavior of the repository"); | |
| 71 | 69 | setup_menu_entry("Timeline", "setup_timeline", |
| 72 | 70 | "Timeline display preferences"); |
| 73 | 71 | setup_menu_entry("Tickets", "tktsetup", |
| 74 | 72 | "Configure the trouble-ticketing system for this repository"); |
| 75 | 73 | setup_menu_entry("Skins", "setup_skin", |
| @@ -795,100 +793,10 @@ | ||
| 795 | 793 | entry_attribute("Max timeline comment length", 6, |
| 796 | 794 | "timeline-max-comment", "tmc", "0"); |
| 797 | 795 | @ <p>The maximum length of a comment to be displayed in a timeline. |
| 798 | 796 | @ "0" there is no length limit.</p> |
| 799 | 797 | |
| 800 | - @ <hr> | |
| 801 | - @ <p><input type="submit" name="submit" value="Apply Changes"></p> | |
| 802 | - @ </form> | |
| 803 | - db_end_transaction(0); | |
| 804 | - style_footer(); | |
| 805 | -} | |
| 806 | - | |
| 807 | -/* | |
| 808 | -** WEBPAGE: setup_behavior | |
| 809 | -*/ | |
| 810 | -void setup_behavior(void){ | |
| 811 | - login_check_credentials(); | |
| 812 | - if( !g.okSetup ){ | |
| 813 | - login_needed(); | |
| 814 | - } | |
| 815 | - | |
| 816 | - style_header("Fossil SCM Behavior"); | |
| 817 | - db_begin_transaction(); | |
| 818 | - @ <form action="%s(g.zBaseURL)/setup_behavior" method="POST"> | |
| 819 | - login_insert_csrf_secret(); | |
| 820 | - | |
| 821 | - @ <hr> | |
| 822 | - onoff_attribute("Automatically synchronize with repository", | |
| 823 | - "autosync", "autosync", 1); | |
| 824 | - @ <p>Automatically keeps your work in sync with a centralized server.</p> | |
| 825 | - | |
| 826 | - @ <hr> | |
| 827 | - onoff_attribute("Show javascript button to fill in CAPTCHA", | |
| 828 | - "auto-captcha", "autocaptcha", 0); | |
| 829 | - @ <p>When enabled, a button appears on the login screen for user | |
| 830 | - @ "anonymous" that will automatically fill in the CAPTCHA password. | |
| 831 | - @ This is less secure that forcing the user to do it manually, but is | |
| 832 | - @ probably secure enough and it is certainly more convenient for | |
| 833 | - @ anonymous users.</p> | |
| 834 | - | |
| 835 | - @ <hr> | |
| 836 | - onoff_attribute("Sign all commits with GPG", | |
| 837 | - "clearsign", "clearsign", 1); | |
| 838 | - @ <p>When enabled (the default), fossil will attempt to | |
| 839 | - @ sign all commits with GPG. When disabled, commits will | |
| 840 | - @ be unsigned.</p> | |
| 841 | - | |
| 842 | - @ <hr> | |
| 843 | - onoff_attribute("Require local authentication", | |
| 844 | - "localauth", "localauth", 0); | |
| 845 | - @ <p>If enabled, require that HTTP connections from | |
| 846 | - @ 127.0.0.1 be authenticated by password. If | |
| 847 | - @ false, all HTTP requests from localhost have | |
| 848 | - @ unrestricted access to the repository.</p> | |
| 849 | - | |
| 850 | - @ <hr> | |
| 851 | - onoff_attribute("Modification times used to detect changes", | |
| 852 | - "mtime-changes", "mtime-changes", 0); | |
| 853 | - @ <p>Use file modification times (mtimes) to detect when files have been modified.</p> | |
| 854 | - | |
| 855 | - @ <hr> | |
| 856 | - entry_attribute("Diff Command", 16, | |
| 857 | - "diff-command", "diff-command", "diff"); | |
| 858 | - @ <p>External command used to generate a textual diff</p> | |
| 859 | - | |
| 860 | - @ <hr> | |
| 861 | - entry_attribute("Gdiff Command", 16, | |
| 862 | - "gdiff-command", "gdiff-command", "gdiff"); | |
| 863 | - @ <p>External command to run when performing a graphical diff. If undefined, text diff will be used.</p> | |
| 864 | - | |
| 865 | - @ <hr> | |
| 866 | - entry_attribute("Editor", 16, | |
| 867 | - "editor", "editor", ""); | |
| 868 | - @ <p>Text editor command used for check-in comments.</p> | |
| 869 | - | |
| 870 | - @ <hr> | |
| 871 | - entry_attribute("HTTP port", 16, | |
| 872 | - "http-port", "http-port", "8080"); | |
| 873 | - @ <p>The TCP/IP port number to use by the "server" and "ui" commands. Default: 8080</p> | |
| 874 | - | |
| 875 | - @ <hr> | |
| 876 | - entry_attribute("PGP Command", 32, | |
| 877 | - "pgp-command", "pgp-command", "gpg --clearsign -o "); | |
| 878 | - @ <p>Command used to clear-sign manifests at check-in.The default is "gpg --clearsign -o ".</p> | |
| 879 | - | |
| 880 | - @ <hr> | |
| 881 | - entry_attribute("Proxy", 32, | |
| 882 | - "proxy", "proxy", "off"); | |
| 883 | - @ <p>URL of the HTTP proxy.</p> | |
| 884 | - | |
| 885 | - @ <hr> | |
| 886 | - entry_attribute("Web browser", 32, | |
| 887 | - "web-browser", "web-browser", ""); | |
| 888 | - @ <p>Default web browser for "fossil ui".</p> | |
| 889 | - | |
| 890 | 798 | @ <hr> |
| 891 | 799 | @ <p><input type="submit" name="submit" value="Apply Changes"></p> |
| 892 | 800 | @ </form> |
| 893 | 801 | db_end_transaction(0); |
| 894 | 802 | style_footer(); |
| 895 | 803 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -64,12 +64,10 @@ | |
| 64 | "Grant privileges to individual users."); |
| 65 | setup_menu_entry("Access", "setup_access", |
| 66 | "Control access settings."); |
| 67 | setup_menu_entry("Configuration", "setup_config", |
| 68 | "Configure the WWW components of the repository"); |
| 69 | setup_menu_entry("Behavior", "setup_behavior", |
| 70 | "Configure the SCM behavior of the repository"); |
| 71 | setup_menu_entry("Timeline", "setup_timeline", |
| 72 | "Timeline display preferences"); |
| 73 | setup_menu_entry("Tickets", "tktsetup", |
| 74 | "Configure the trouble-ticketing system for this repository"); |
| 75 | setup_menu_entry("Skins", "setup_skin", |
| @@ -795,100 +793,10 @@ | |
| 795 | entry_attribute("Max timeline comment length", 6, |
| 796 | "timeline-max-comment", "tmc", "0"); |
| 797 | @ <p>The maximum length of a comment to be displayed in a timeline. |
| 798 | @ "0" there is no length limit.</p> |
| 799 | |
| 800 | @ <hr> |
| 801 | @ <p><input type="submit" name="submit" value="Apply Changes"></p> |
| 802 | @ </form> |
| 803 | db_end_transaction(0); |
| 804 | style_footer(); |
| 805 | } |
| 806 | |
| 807 | /* |
| 808 | ** WEBPAGE: setup_behavior |
| 809 | */ |
| 810 | void setup_behavior(void){ |
| 811 | login_check_credentials(); |
| 812 | if( !g.okSetup ){ |
| 813 | login_needed(); |
| 814 | } |
| 815 | |
| 816 | style_header("Fossil SCM Behavior"); |
| 817 | db_begin_transaction(); |
| 818 | @ <form action="%s(g.zBaseURL)/setup_behavior" method="POST"> |
| 819 | login_insert_csrf_secret(); |
| 820 | |
| 821 | @ <hr> |
| 822 | onoff_attribute("Automatically synchronize with repository", |
| 823 | "autosync", "autosync", 1); |
| 824 | @ <p>Automatically keeps your work in sync with a centralized server.</p> |
| 825 | |
| 826 | @ <hr> |
| 827 | onoff_attribute("Show javascript button to fill in CAPTCHA", |
| 828 | "auto-captcha", "autocaptcha", 0); |
| 829 | @ <p>When enabled, a button appears on the login screen for user |
| 830 | @ "anonymous" that will automatically fill in the CAPTCHA password. |
| 831 | @ This is less secure that forcing the user to do it manually, but is |
| 832 | @ probably secure enough and it is certainly more convenient for |
| 833 | @ anonymous users.</p> |
| 834 | |
| 835 | @ <hr> |
| 836 | onoff_attribute("Sign all commits with GPG", |
| 837 | "clearsign", "clearsign", 1); |
| 838 | @ <p>When enabled (the default), fossil will attempt to |
| 839 | @ sign all commits with GPG. When disabled, commits will |
| 840 | @ be unsigned.</p> |
| 841 | |
| 842 | @ <hr> |
| 843 | onoff_attribute("Require local authentication", |
| 844 | "localauth", "localauth", 0); |
| 845 | @ <p>If enabled, require that HTTP connections from |
| 846 | @ 127.0.0.1 be authenticated by password. If |
| 847 | @ false, all HTTP requests from localhost have |
| 848 | @ unrestricted access to the repository.</p> |
| 849 | |
| 850 | @ <hr> |
| 851 | onoff_attribute("Modification times used to detect changes", |
| 852 | "mtime-changes", "mtime-changes", 0); |
| 853 | @ <p>Use file modification times (mtimes) to detect when files have been modified.</p> |
| 854 | |
| 855 | @ <hr> |
| 856 | entry_attribute("Diff Command", 16, |
| 857 | "diff-command", "diff-command", "diff"); |
| 858 | @ <p>External command used to generate a textual diff</p> |
| 859 | |
| 860 | @ <hr> |
| 861 | entry_attribute("Gdiff Command", 16, |
| 862 | "gdiff-command", "gdiff-command", "gdiff"); |
| 863 | @ <p>External command to run when performing a graphical diff. If undefined, text diff will be used.</p> |
| 864 | |
| 865 | @ <hr> |
| 866 | entry_attribute("Editor", 16, |
| 867 | "editor", "editor", ""); |
| 868 | @ <p>Text editor command used for check-in comments.</p> |
| 869 | |
| 870 | @ <hr> |
| 871 | entry_attribute("HTTP port", 16, |
| 872 | "http-port", "http-port", "8080"); |
| 873 | @ <p>The TCP/IP port number to use by the "server" and "ui" commands. Default: 8080</p> |
| 874 | |
| 875 | @ <hr> |
| 876 | entry_attribute("PGP Command", 32, |
| 877 | "pgp-command", "pgp-command", "gpg --clearsign -o "); |
| 878 | @ <p>Command used to clear-sign manifests at check-in.The default is "gpg --clearsign -o ".</p> |
| 879 | |
| 880 | @ <hr> |
| 881 | entry_attribute("Proxy", 32, |
| 882 | "proxy", "proxy", "off"); |
| 883 | @ <p>URL of the HTTP proxy.</p> |
| 884 | |
| 885 | @ <hr> |
| 886 | entry_attribute("Web browser", 32, |
| 887 | "web-browser", "web-browser", ""); |
| 888 | @ <p>Default web browser for "fossil ui".</p> |
| 889 | |
| 890 | @ <hr> |
| 891 | @ <p><input type="submit" name="submit" value="Apply Changes"></p> |
| 892 | @ </form> |
| 893 | db_end_transaction(0); |
| 894 | style_footer(); |
| 895 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -64,12 +64,10 @@ | |
| 64 | "Grant privileges to individual users."); |
| 65 | setup_menu_entry("Access", "setup_access", |
| 66 | "Control access settings."); |
| 67 | setup_menu_entry("Configuration", "setup_config", |
| 68 | "Configure the WWW components of the repository"); |
| 69 | setup_menu_entry("Timeline", "setup_timeline", |
| 70 | "Timeline display preferences"); |
| 71 | setup_menu_entry("Tickets", "tktsetup", |
| 72 | "Configure the trouble-ticketing system for this repository"); |
| 73 | setup_menu_entry("Skins", "setup_skin", |
| @@ -795,100 +793,10 @@ | |
| 793 | entry_attribute("Max timeline comment length", 6, |
| 794 | "timeline-max-comment", "tmc", "0"); |
| 795 | @ <p>The maximum length of a comment to be displayed in a timeline. |
| 796 | @ "0" there is no length limit.</p> |
| 797 | |
| 798 | @ <hr> |
| 799 | @ <p><input type="submit" name="submit" value="Apply Changes"></p> |
| 800 | @ </form> |
| 801 | db_end_transaction(0); |
| 802 | style_footer(); |
| 803 |