Fossil SCM
Manifest parser supports various hash sizes.
Commit
80f9b68e6f0547b6d7300af49f37c589f22feb33
Parent
82487bece305bd6…
16 files changed
+1
-1
+4
-5
+5
-5
+7
+2
-1
+6
-1
+12
+1
+71
-68
+17
-21
+16
+16
+14
-14
+10
-4
+12
+10
+1
-1
| --- src/attach.c | ||
| +++ src/attach.c | ||
| @@ -2,11 +2,11 @@ | ||
| 2 | 2 | ** Copyright (c) 2010 D. Richard Hipp |
| 3 | 3 | ** |
| 4 | 4 | ** This program is free software; you can redistribute it and/or |
| 5 | 5 | ** modify it under the terms of the Simplified BSD License (also |
| 6 | 6 | ** known as the "2-Clause License" or "FreeBSD License".) |
| 7 | - | |
| 7 | +** | |
| 8 | 8 | ** This program is distributed in the hope that it will be useful, |
| 9 | 9 | ** but without any warranty; without even the implied warranty of |
| 10 | 10 | ** merchantability or fitness for a particular purpose. |
| 11 | 11 | ** |
| 12 | 12 | ** Author contact information: |
| 13 | 13 |
| --- src/attach.c | |
| +++ src/attach.c | |
| @@ -2,11 +2,11 @@ | |
| 2 | ** Copyright (c) 2010 D. Richard Hipp |
| 3 | ** |
| 4 | ** This program is free software; you can redistribute it and/or |
| 5 | ** modify it under the terms of the Simplified BSD License (also |
| 6 | ** known as the "2-Clause License" or "FreeBSD License".) |
| 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. |
| 11 | ** |
| 12 | ** Author contact information: |
| 13 |
| --- src/attach.c | |
| +++ src/attach.c | |
| @@ -2,11 +2,11 @@ | |
| 2 | ** Copyright (c) 2010 D. Richard Hipp |
| 3 | ** |
| 4 | ** This program is free software; you can redistribute it and/or |
| 5 | ** modify it under the terms of the Simplified BSD License (also |
| 6 | ** known as the "2-Clause License" or "FreeBSD License".) |
| 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. |
| 11 | ** |
| 12 | ** Author contact information: |
| 13 |
+4
-5
| --- src/blob.c | ||
| +++ src/blob.c | ||
| @@ -2,11 +2,11 @@ | ||
| 2 | 2 | ** Copyright (c) 2006 D. Richard Hipp |
| 3 | 3 | ** |
| 4 | 4 | ** This program is free software; you can redistribute it and/or |
| 5 | 5 | ** modify it under the terms of the Simplified BSD License (also |
| 6 | 6 | ** known as the "2-Clause License" or "FreeBSD License".) |
| 7 | - | |
| 7 | +** | |
| 8 | 8 | ** This program is distributed in the hope that it will be useful, |
| 9 | 9 | ** but without any warranty; without even the implied warranty of |
| 10 | 10 | ** merchantability or fitness for a particular purpose. |
| 11 | 11 | ** |
| 12 | 12 | ** Author contact information: |
| @@ -647,15 +647,14 @@ | ||
| 647 | 647 | } |
| 648 | 648 | pFrom->iCursor = i; |
| 649 | 649 | } |
| 650 | 650 | |
| 651 | 651 | /* |
| 652 | -** Return true if the blob contains a valid UUID_SIZE-digit base16 identifier. | |
| 652 | +** Return true if the blob contains a valid base16 identifier artifact hash. | |
| 653 | 653 | */ |
| 654 | -int blob_is_uuid(Blob *pBlob){ | |
| 655 | - return blob_size(pBlob)==UUID_SIZE | |
| 656 | - && validate16(blob_buffer(pBlob), UUID_SIZE); | |
| 654 | +int blob_is_hname(Blob *pBlob){ | |
| 655 | + return hname_validate(blob_buffer(pBlob), blob_size(pBlob))!=HNAME_NONE; | |
| 657 | 656 | } |
| 658 | 657 | |
| 659 | 658 | /* |
| 660 | 659 | ** Return true if the blob contains a valid filename |
| 661 | 660 | */ |
| 662 | 661 |
| --- src/blob.c | |
| +++ src/blob.c | |
| @@ -2,11 +2,11 @@ | |
| 2 | ** Copyright (c) 2006 D. Richard Hipp |
| 3 | ** |
| 4 | ** This program is free software; you can redistribute it and/or |
| 5 | ** modify it under the terms of the Simplified BSD License (also |
| 6 | ** known as the "2-Clause License" or "FreeBSD License".) |
| 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. |
| 11 | ** |
| 12 | ** Author contact information: |
| @@ -647,15 +647,14 @@ | |
| 647 | } |
| 648 | pFrom->iCursor = i; |
| 649 | } |
| 650 | |
| 651 | /* |
| 652 | ** Return true if the blob contains a valid UUID_SIZE-digit base16 identifier. |
| 653 | */ |
| 654 | int blob_is_uuid(Blob *pBlob){ |
| 655 | return blob_size(pBlob)==UUID_SIZE |
| 656 | && validate16(blob_buffer(pBlob), UUID_SIZE); |
| 657 | } |
| 658 | |
| 659 | /* |
| 660 | ** Return true if the blob contains a valid filename |
| 661 | */ |
| 662 |
| --- src/blob.c | |
| +++ src/blob.c | |
| @@ -2,11 +2,11 @@ | |
| 2 | ** Copyright (c) 2006 D. Richard Hipp |
| 3 | ** |
| 4 | ** This program is free software; you can redistribute it and/or |
| 5 | ** modify it under the terms of the Simplified BSD License (also |
| 6 | ** known as the "2-Clause License" or "FreeBSD License".) |
| 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. |
| 11 | ** |
| 12 | ** Author contact information: |
| @@ -647,15 +647,14 @@ | |
| 647 | } |
| 648 | pFrom->iCursor = i; |
| 649 | } |
| 650 | |
| 651 | /* |
| 652 | ** Return true if the blob contains a valid base16 identifier artifact hash. |
| 653 | */ |
| 654 | int blob_is_hname(Blob *pBlob){ |
| 655 | return hname_validate(blob_buffer(pBlob), blob_size(pBlob))!=HNAME_NONE; |
| 656 | } |
| 657 | |
| 658 | /* |
| 659 | ** Return true if the blob contains a valid filename |
| 660 | */ |
| 661 |
M
src/db.c
+5
-5
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -2,11 +2,11 @@ | ||
| 2 | 2 | ** Copyright (c) 2006 D. Richard Hipp |
| 3 | 3 | ** |
| 4 | 4 | ** This program is free software; you can redistribute it and/or |
| 5 | 5 | ** modify it under the terms of the Simplified BSD License (also |
| 6 | 6 | ** known as the "2-Clause License" or "FreeBSD License".) |
| 7 | - | |
| 7 | +** | |
| 8 | 8 | ** This program is distributed in the hope that it will be useful, |
| 9 | 9 | ** but without any warranty; without even the implied warranty of |
| 10 | 10 | ** merchantability or fitness for a particular purpose. |
| 11 | 11 | ** |
| 12 | 12 | ** Author contact information: |
| @@ -2082,29 +2082,29 @@ | ||
| 2082 | 2082 | sqlite3_result_value(context, argv[2-rc]); |
| 2083 | 2083 | } |
| 2084 | 2084 | } |
| 2085 | 2085 | |
| 2086 | 2086 | /* |
| 2087 | -** Convert the input string into an SHA1. Make a notation in the | |
| 2087 | +** Convert the input string into a artifact hash. Make a notation in the | |
| 2088 | 2088 | ** CONCEALED table so that the hash can be undo using the db_reveal() |
| 2089 | 2089 | ** function at some later time. |
| 2090 | 2090 | ** |
| 2091 | 2091 | ** The value returned is stored in static space and will be overwritten |
| 2092 | 2092 | ** on subsequent calls. |
| 2093 | 2093 | ** |
| 2094 | -** If zContent is already a well-formed SHA1 hash, then return a copy | |
| 2094 | +** If zContent is already a well-formed artifact hash, then return a copy | |
| 2095 | 2095 | ** of that hash, not a hash of the hash. |
| 2096 | 2096 | ** |
| 2097 | 2097 | ** The CONCEALED table is meant to obscure email addresses. Every valid |
| 2098 | 2098 | ** email address will contain a "@" character and "@" is not valid within |
| 2099 | 2099 | ** an SHA1 hash so there is no chance that a valid email address will go |
| 2100 | 2100 | ** unconcealed. |
| 2101 | 2101 | */ |
| 2102 | 2102 | char *db_conceal(const char *zContent, int n){ |
| 2103 | - static char zHash[42]; | |
| 2103 | + static char zHash[HNAME_LEN_MAX+1]; | |
| 2104 | 2104 | Blob out; |
| 2105 | - if( n==40 && validate16(zContent, n) ){ | |
| 2105 | + if( hname_validate(zContent, n)!=HNAME_NONE ){ | |
| 2106 | 2106 | memcpy(zHash, zContent, n); |
| 2107 | 2107 | zHash[n] = 0; |
| 2108 | 2108 | }else{ |
| 2109 | 2109 | sha1sum_step_text(zContent, n); |
| 2110 | 2110 | sha1sum_finish(&out); |
| 2111 | 2111 | |
| 2112 | 2112 | ADDED src/hname.c |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -2,11 +2,11 @@ | |
| 2 | ** Copyright (c) 2006 D. Richard Hipp |
| 3 | ** |
| 4 | ** This program is free software; you can redistribute it and/or |
| 5 | ** modify it under the terms of the Simplified BSD License (also |
| 6 | ** known as the "2-Clause License" or "FreeBSD License".) |
| 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. |
| 11 | ** |
| 12 | ** Author contact information: |
| @@ -2082,29 +2082,29 @@ | |
| 2082 | sqlite3_result_value(context, argv[2-rc]); |
| 2083 | } |
| 2084 | } |
| 2085 | |
| 2086 | /* |
| 2087 | ** Convert the input string into an SHA1. Make a notation in the |
| 2088 | ** CONCEALED table so that the hash can be undo using the db_reveal() |
| 2089 | ** function at some later time. |
| 2090 | ** |
| 2091 | ** The value returned is stored in static space and will be overwritten |
| 2092 | ** on subsequent calls. |
| 2093 | ** |
| 2094 | ** If zContent is already a well-formed SHA1 hash, then return a copy |
| 2095 | ** of that hash, not a hash of the hash. |
| 2096 | ** |
| 2097 | ** The CONCEALED table is meant to obscure email addresses. Every valid |
| 2098 | ** email address will contain a "@" character and "@" is not valid within |
| 2099 | ** an SHA1 hash so there is no chance that a valid email address will go |
| 2100 | ** unconcealed. |
| 2101 | */ |
| 2102 | char *db_conceal(const char *zContent, int n){ |
| 2103 | static char zHash[42]; |
| 2104 | Blob out; |
| 2105 | if( n==40 && validate16(zContent, n) ){ |
| 2106 | memcpy(zHash, zContent, n); |
| 2107 | zHash[n] = 0; |
| 2108 | }else{ |
| 2109 | sha1sum_step_text(zContent, n); |
| 2110 | sha1sum_finish(&out); |
| 2111 | |
| 2112 | DDED src/hname.c |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -2,11 +2,11 @@ | |
| 2 | ** Copyright (c) 2006 D. Richard Hipp |
| 3 | ** |
| 4 | ** This program is free software; you can redistribute it and/or |
| 5 | ** modify it under the terms of the Simplified BSD License (also |
| 6 | ** known as the "2-Clause License" or "FreeBSD License".) |
| 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. |
| 11 | ** |
| 12 | ** Author contact information: |
| @@ -2082,29 +2082,29 @@ | |
| 2082 | sqlite3_result_value(context, argv[2-rc]); |
| 2083 | } |
| 2084 | } |
| 2085 | |
| 2086 | /* |
| 2087 | ** Convert the input string into a artifact hash. Make a notation in the |
| 2088 | ** CONCEALED table so that the hash can be undo using the db_reveal() |
| 2089 | ** function at some later time. |
| 2090 | ** |
| 2091 | ** The value returned is stored in static space and will be overwritten |
| 2092 | ** on subsequent calls. |
| 2093 | ** |
| 2094 | ** If zContent is already a well-formed artifact hash, then return a copy |
| 2095 | ** of that hash, not a hash of the hash. |
| 2096 | ** |
| 2097 | ** The CONCEALED table is meant to obscure email addresses. Every valid |
| 2098 | ** email address will contain a "@" character and "@" is not valid within |
| 2099 | ** an SHA1 hash so there is no chance that a valid email address will go |
| 2100 | ** unconcealed. |
| 2101 | */ |
| 2102 | char *db_conceal(const char *zContent, int n){ |
| 2103 | static char zHash[HNAME_LEN_MAX+1]; |
| 2104 | Blob out; |
| 2105 | if( hname_validate(zContent, n)!=HNAME_NONE ){ |
| 2106 | memcpy(zHash, zContent, n); |
| 2107 | zHash[n] = 0; |
| 2108 | }else{ |
| 2109 | sha1sum_step_text(zContent, n); |
| 2110 | sha1sum_finish(&out); |
| 2111 | |
| 2112 | DDED src/hname.c |
+7
| --- a/src/hname.c | ||
| +++ b/src/hname.c | ||
| @@ -0,0 +1,7 @@ | ||
| 1 | +/* | |
| 2 | +** Copyright (c) 2017 D. Richard Hipp | |
| 3 | +** | |
| 4 | +** This program is free sofNONE (-1)012LENLENif( aid==HN-1 | |
| 5 | +**-1NONENONENONE; | |
| 6 | + return id; | |
| 7 | +} |
| --- a/src/hname.c | |
| +++ b/src/hname.c | |
| @@ -0,0 +1,7 @@ | |
| --- a/src/hname.c | |
| +++ b/src/hname.c | |
| @@ -0,0 +1,7 @@ | |
| 1 | /* |
| 2 | ** Copyright (c) 2017 D. Richard Hipp |
| 3 | ** |
| 4 | ** This program is free sofNONE (-1)012LENLENif( aid==HN-1 |
| 5 | **-1NONENONENONE; |
| 6 | return id; |
| 7 | } |
+2
-1
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -1385,10 +1385,11 @@ | ||
| 1385 | 1385 | " ORDER BY mtime DESC /*sort*/", |
| 1386 | 1386 | rid |
| 1387 | 1387 | ); |
| 1388 | 1388 | while( db_step(&q)==SQLITE_ROW ){ |
| 1389 | 1389 | const char *zTarget = db_column_text(&q, 0); |
| 1390 | + int nTarget = db_column_bytes(&q, 0); | |
| 1390 | 1391 | const char *zFilename = db_column_text(&q, 1); |
| 1391 | 1392 | const char *zDate = db_column_text(&q, 2); |
| 1392 | 1393 | const char *zUser = db_column_text(&q, 3); |
| 1393 | 1394 | /* const char *zSrc = db_column_text(&q, 4); */ |
| 1394 | 1395 | if( cnt>0 ){ |
| @@ -1395,11 +1396,11 @@ | ||
| 1395 | 1396 | @ Also attachment "%h(zFilename)" to |
| 1396 | 1397 | }else{ |
| 1397 | 1398 | @ Attachment "%h(zFilename)" to |
| 1398 | 1399 | } |
| 1399 | 1400 | objType |= OBJTYPE_ATTACHMENT; |
| 1400 | - if( strlen(zTarget)==UUID_SIZE && validate16(zTarget,UUID_SIZE) ){ | |
| 1401 | + if( nTarget==UUID_SIZE && validate16(zTarget,UUID_SIZE) ){ | |
| 1401 | 1402 | if ( db_exists("SELECT 1 FROM tag WHERE tagname='tkt-%q'", |
| 1402 | 1403 | zTarget) |
| 1403 | 1404 | ){ |
| 1404 | 1405 | if( g.perm.Hyperlink && g.anon.RdTkt ){ |
| 1405 | 1406 | @ ticket [%z(href("%R/tktview?name=%!S",zTarget))%S(zTarget)</a>] |
| 1406 | 1407 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -1385,10 +1385,11 @@ | |
| 1385 | " ORDER BY mtime DESC /*sort*/", |
| 1386 | rid |
| 1387 | ); |
| 1388 | while( db_step(&q)==SQLITE_ROW ){ |
| 1389 | const char *zTarget = db_column_text(&q, 0); |
| 1390 | const char *zFilename = db_column_text(&q, 1); |
| 1391 | const char *zDate = db_column_text(&q, 2); |
| 1392 | const char *zUser = db_column_text(&q, 3); |
| 1393 | /* const char *zSrc = db_column_text(&q, 4); */ |
| 1394 | if( cnt>0 ){ |
| @@ -1395,11 +1396,11 @@ | |
| 1395 | @ Also attachment "%h(zFilename)" to |
| 1396 | }else{ |
| 1397 | @ Attachment "%h(zFilename)" to |
| 1398 | } |
| 1399 | objType |= OBJTYPE_ATTACHMENT; |
| 1400 | if( strlen(zTarget)==UUID_SIZE && validate16(zTarget,UUID_SIZE) ){ |
| 1401 | if ( db_exists("SELECT 1 FROM tag WHERE tagname='tkt-%q'", |
| 1402 | zTarget) |
| 1403 | ){ |
| 1404 | if( g.perm.Hyperlink && g.anon.RdTkt ){ |
| 1405 | @ ticket [%z(href("%R/tktview?name=%!S",zTarget))%S(zTarget)</a>] |
| 1406 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -1385,10 +1385,11 @@ | |
| 1385 | " ORDER BY mtime DESC /*sort*/", |
| 1386 | rid |
| 1387 | ); |
| 1388 | while( db_step(&q)==SQLITE_ROW ){ |
| 1389 | const char *zTarget = db_column_text(&q, 0); |
| 1390 | int nTarget = db_column_bytes(&q, 0); |
| 1391 | const char *zFilename = db_column_text(&q, 1); |
| 1392 | const char *zDate = db_column_text(&q, 2); |
| 1393 | const char *zUser = db_column_text(&q, 3); |
| 1394 | /* const char *zSrc = db_column_text(&q, 4); */ |
| 1395 | if( cnt>0 ){ |
| @@ -1395,11 +1396,11 @@ | |
| 1396 | @ Also attachment "%h(zFilename)" to |
| 1397 | }else{ |
| 1398 | @ Attachment "%h(zFilename)" to |
| 1399 | } |
| 1400 | objType |= OBJTYPE_ATTACHMENT; |
| 1401 | if( nTarget==UUID_SIZE && validate16(zTarget,UUID_SIZE) ){ |
| 1402 | if ( db_exists("SELECT 1 FROM tag WHERE tagname='tkt-%q'", |
| 1403 | zTarget) |
| 1404 | ){ |
| 1405 | if( g.perm.Hyperlink && g.anon.RdTkt ){ |
| 1406 | @ ticket [%z(href("%R/tktview?name=%!S",zTarget))%S(zTarget)</a>] |
| 1407 |
+6
-1
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -50,11 +50,16 @@ | ||
| 50 | 50 | # include "cson_amalgamation.h" /* JSON API. */ |
| 51 | 51 | # include "json_detail.h" |
| 52 | 52 | #endif |
| 53 | 53 | |
| 54 | 54 | /* |
| 55 | -** Size of a UUID in characters | |
| 55 | +** Size of a UUID in characters. A UUID is a randomly generated | |
| 56 | +** lower-case hexadecimal number used to identify tickets. | |
| 57 | +** | |
| 58 | +** In Fossil 1.x, UUID also referred to a SHA1 artifact hash. But that | |
| 59 | +** usage is now obsolete. The term UUID should now mean only a very large | |
| 60 | +** random number used as a unique identifier for tickets or other objects. | |
| 56 | 61 | */ |
| 57 | 62 | #define UUID_SIZE 40 |
| 58 | 63 | |
| 59 | 64 | /* |
| 60 | 65 | ** Maximum number of auxiliary parameters on reports |
| 61 | 66 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -50,11 +50,16 @@ | |
| 50 | # include "cson_amalgamation.h" /* JSON API. */ |
| 51 | # include "json_detail.h" |
| 52 | #endif |
| 53 | |
| 54 | /* |
| 55 | ** Size of a UUID in characters |
| 56 | */ |
| 57 | #define UUID_SIZE 40 |
| 58 | |
| 59 | /* |
| 60 | ** Maximum number of auxiliary parameters on reports |
| 61 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -50,11 +50,16 @@ | |
| 50 | # include "cson_amalgamation.h" /* JSON API. */ |
| 51 | # include "json_detail.h" |
| 52 | #endif |
| 53 | |
| 54 | /* |
| 55 | ** Size of a UUID in characters. A UUID is a randomly generated |
| 56 | ** lower-case hexadecimal number used to identify tickets. |
| 57 | ** |
| 58 | ** In Fossil 1.x, UUID also referred to a SHA1 artifact hash. But that |
| 59 | ** usage is now obsolete. The term UUID should now mean only a very large |
| 60 | ** random number used as a unique identifier for tickets or other objects. |
| 61 | */ |
| 62 | #define UUID_SIZE 40 |
| 63 | |
| 64 | /* |
| 65 | ** Maximum number of auxiliary parameters on reports |
| 66 |
+12
| --- src/main.mk | ||
| +++ src/main.mk | ||
| @@ -52,10 +52,11 @@ | ||
| 52 | 52 | $(SRCDIR)/fshell.c \ |
| 53 | 53 | $(SRCDIR)/fusefs.c \ |
| 54 | 54 | $(SRCDIR)/glob.c \ |
| 55 | 55 | $(SRCDIR)/graph.c \ |
| 56 | 56 | $(SRCDIR)/gzip.c \ |
| 57 | + $(SRCDIR)/hname.c \ | |
| 57 | 58 | $(SRCDIR)/http.c \ |
| 58 | 59 | $(SRCDIR)/http_socket.c \ |
| 59 | 60 | $(SRCDIR)/http_ssl.c \ |
| 60 | 61 | $(SRCDIR)/http_transport.c \ |
| 61 | 62 | $(SRCDIR)/import.c \ |
| @@ -228,10 +229,11 @@ | ||
| 228 | 229 | $(OBJDIR)/fshell_.c \ |
| 229 | 230 | $(OBJDIR)/fusefs_.c \ |
| 230 | 231 | $(OBJDIR)/glob_.c \ |
| 231 | 232 | $(OBJDIR)/graph_.c \ |
| 232 | 233 | $(OBJDIR)/gzip_.c \ |
| 234 | + $(OBJDIR)/hname_.c \ | |
| 233 | 235 | $(OBJDIR)/http_.c \ |
| 234 | 236 | $(OBJDIR)/http_socket_.c \ |
| 235 | 237 | $(OBJDIR)/http_ssl_.c \ |
| 236 | 238 | $(OBJDIR)/http_transport_.c \ |
| 237 | 239 | $(OBJDIR)/import_.c \ |
| @@ -353,10 +355,11 @@ | ||
| 353 | 355 | $(OBJDIR)/fshell.o \ |
| 354 | 356 | $(OBJDIR)/fusefs.o \ |
| 355 | 357 | $(OBJDIR)/glob.o \ |
| 356 | 358 | $(OBJDIR)/graph.o \ |
| 357 | 359 | $(OBJDIR)/gzip.o \ |
| 360 | + $(OBJDIR)/hname.o \ | |
| 358 | 361 | $(OBJDIR)/http.o \ |
| 359 | 362 | $(OBJDIR)/http_socket.o \ |
| 360 | 363 | $(OBJDIR)/http_ssl.o \ |
| 361 | 364 | $(OBJDIR)/http_transport.o \ |
| 362 | 365 | $(OBJDIR)/import.o \ |
| @@ -639,10 +642,11 @@ | ||
| 639 | 642 | $(OBJDIR)/fshell_.c:$(OBJDIR)/fshell.h \ |
| 640 | 643 | $(OBJDIR)/fusefs_.c:$(OBJDIR)/fusefs.h \ |
| 641 | 644 | $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h \ |
| 642 | 645 | $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h \ |
| 643 | 646 | $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h \ |
| 647 | + $(OBJDIR)/hname_.c:$(OBJDIR)/hname.h \ | |
| 644 | 648 | $(OBJDIR)/http_.c:$(OBJDIR)/http.h \ |
| 645 | 649 | $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h \ |
| 646 | 650 | $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h \ |
| 647 | 651 | $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h \ |
| 648 | 652 | $(OBJDIR)/import_.c:$(OBJDIR)/import.h \ |
| @@ -1041,10 +1045,18 @@ | ||
| 1041 | 1045 | |
| 1042 | 1046 | $(OBJDIR)/gzip.o: $(OBJDIR)/gzip_.c $(OBJDIR)/gzip.h $(SRCDIR)/config.h |
| 1043 | 1047 | $(XTCC) -o $(OBJDIR)/gzip.o -c $(OBJDIR)/gzip_.c |
| 1044 | 1048 | |
| 1045 | 1049 | $(OBJDIR)/gzip.h: $(OBJDIR)/headers |
| 1050 | + | |
| 1051 | +$(OBJDIR)/hname_.c: $(SRCDIR)/hname.c $(OBJDIR)/translate | |
| 1052 | + $(OBJDIR)/translate $(SRCDIR)/hname.c >$@ | |
| 1053 | + | |
| 1054 | +$(OBJDIR)/hname.o: $(OBJDIR)/hname_.c $(OBJDIR)/hname.h $(SRCDIR)/config.h | |
| 1055 | + $(XTCC) -o $(OBJDIR)/hname.o -c $(OBJDIR)/hname_.c | |
| 1056 | + | |
| 1057 | +$(OBJDIR)/hname.h: $(OBJDIR)/headers | |
| 1046 | 1058 | |
| 1047 | 1059 | $(OBJDIR)/http_.c: $(SRCDIR)/http.c $(OBJDIR)/translate |
| 1048 | 1060 | $(OBJDIR)/translate $(SRCDIR)/http.c >$@ |
| 1049 | 1061 | |
| 1050 | 1062 | $(OBJDIR)/http.o: $(OBJDIR)/http_.c $(OBJDIR)/http.h $(SRCDIR)/config.h |
| 1051 | 1063 |
| --- src/main.mk | |
| +++ src/main.mk | |
| @@ -52,10 +52,11 @@ | |
| 52 | $(SRCDIR)/fshell.c \ |
| 53 | $(SRCDIR)/fusefs.c \ |
| 54 | $(SRCDIR)/glob.c \ |
| 55 | $(SRCDIR)/graph.c \ |
| 56 | $(SRCDIR)/gzip.c \ |
| 57 | $(SRCDIR)/http.c \ |
| 58 | $(SRCDIR)/http_socket.c \ |
| 59 | $(SRCDIR)/http_ssl.c \ |
| 60 | $(SRCDIR)/http_transport.c \ |
| 61 | $(SRCDIR)/import.c \ |
| @@ -228,10 +229,11 @@ | |
| 228 | $(OBJDIR)/fshell_.c \ |
| 229 | $(OBJDIR)/fusefs_.c \ |
| 230 | $(OBJDIR)/glob_.c \ |
| 231 | $(OBJDIR)/graph_.c \ |
| 232 | $(OBJDIR)/gzip_.c \ |
| 233 | $(OBJDIR)/http_.c \ |
| 234 | $(OBJDIR)/http_socket_.c \ |
| 235 | $(OBJDIR)/http_ssl_.c \ |
| 236 | $(OBJDIR)/http_transport_.c \ |
| 237 | $(OBJDIR)/import_.c \ |
| @@ -353,10 +355,11 @@ | |
| 353 | $(OBJDIR)/fshell.o \ |
| 354 | $(OBJDIR)/fusefs.o \ |
| 355 | $(OBJDIR)/glob.o \ |
| 356 | $(OBJDIR)/graph.o \ |
| 357 | $(OBJDIR)/gzip.o \ |
| 358 | $(OBJDIR)/http.o \ |
| 359 | $(OBJDIR)/http_socket.o \ |
| 360 | $(OBJDIR)/http_ssl.o \ |
| 361 | $(OBJDIR)/http_transport.o \ |
| 362 | $(OBJDIR)/import.o \ |
| @@ -639,10 +642,11 @@ | |
| 639 | $(OBJDIR)/fshell_.c:$(OBJDIR)/fshell.h \ |
| 640 | $(OBJDIR)/fusefs_.c:$(OBJDIR)/fusefs.h \ |
| 641 | $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h \ |
| 642 | $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h \ |
| 643 | $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h \ |
| 644 | $(OBJDIR)/http_.c:$(OBJDIR)/http.h \ |
| 645 | $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h \ |
| 646 | $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h \ |
| 647 | $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h \ |
| 648 | $(OBJDIR)/import_.c:$(OBJDIR)/import.h \ |
| @@ -1041,10 +1045,18 @@ | |
| 1041 | |
| 1042 | $(OBJDIR)/gzip.o: $(OBJDIR)/gzip_.c $(OBJDIR)/gzip.h $(SRCDIR)/config.h |
| 1043 | $(XTCC) -o $(OBJDIR)/gzip.o -c $(OBJDIR)/gzip_.c |
| 1044 | |
| 1045 | $(OBJDIR)/gzip.h: $(OBJDIR)/headers |
| 1046 | |
| 1047 | $(OBJDIR)/http_.c: $(SRCDIR)/http.c $(OBJDIR)/translate |
| 1048 | $(OBJDIR)/translate $(SRCDIR)/http.c >$@ |
| 1049 | |
| 1050 | $(OBJDIR)/http.o: $(OBJDIR)/http_.c $(OBJDIR)/http.h $(SRCDIR)/config.h |
| 1051 |
| --- src/main.mk | |
| +++ src/main.mk | |
| @@ -52,10 +52,11 @@ | |
| 52 | $(SRCDIR)/fshell.c \ |
| 53 | $(SRCDIR)/fusefs.c \ |
| 54 | $(SRCDIR)/glob.c \ |
| 55 | $(SRCDIR)/graph.c \ |
| 56 | $(SRCDIR)/gzip.c \ |
| 57 | $(SRCDIR)/hname.c \ |
| 58 | $(SRCDIR)/http.c \ |
| 59 | $(SRCDIR)/http_socket.c \ |
| 60 | $(SRCDIR)/http_ssl.c \ |
| 61 | $(SRCDIR)/http_transport.c \ |
| 62 | $(SRCDIR)/import.c \ |
| @@ -228,10 +229,11 @@ | |
| 229 | $(OBJDIR)/fshell_.c \ |
| 230 | $(OBJDIR)/fusefs_.c \ |
| 231 | $(OBJDIR)/glob_.c \ |
| 232 | $(OBJDIR)/graph_.c \ |
| 233 | $(OBJDIR)/gzip_.c \ |
| 234 | $(OBJDIR)/hname_.c \ |
| 235 | $(OBJDIR)/http_.c \ |
| 236 | $(OBJDIR)/http_socket_.c \ |
| 237 | $(OBJDIR)/http_ssl_.c \ |
| 238 | $(OBJDIR)/http_transport_.c \ |
| 239 | $(OBJDIR)/import_.c \ |
| @@ -353,10 +355,11 @@ | |
| 355 | $(OBJDIR)/fshell.o \ |
| 356 | $(OBJDIR)/fusefs.o \ |
| 357 | $(OBJDIR)/glob.o \ |
| 358 | $(OBJDIR)/graph.o \ |
| 359 | $(OBJDIR)/gzip.o \ |
| 360 | $(OBJDIR)/hname.o \ |
| 361 | $(OBJDIR)/http.o \ |
| 362 | $(OBJDIR)/http_socket.o \ |
| 363 | $(OBJDIR)/http_ssl.o \ |
| 364 | $(OBJDIR)/http_transport.o \ |
| 365 | $(OBJDIR)/import.o \ |
| @@ -639,10 +642,11 @@ | |
| 642 | $(OBJDIR)/fshell_.c:$(OBJDIR)/fshell.h \ |
| 643 | $(OBJDIR)/fusefs_.c:$(OBJDIR)/fusefs.h \ |
| 644 | $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h \ |
| 645 | $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h \ |
| 646 | $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h \ |
| 647 | $(OBJDIR)/hname_.c:$(OBJDIR)/hname.h \ |
| 648 | $(OBJDIR)/http_.c:$(OBJDIR)/http.h \ |
| 649 | $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h \ |
| 650 | $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h \ |
| 651 | $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h \ |
| 652 | $(OBJDIR)/import_.c:$(OBJDIR)/import.h \ |
| @@ -1041,10 +1045,18 @@ | |
| 1045 | |
| 1046 | $(OBJDIR)/gzip.o: $(OBJDIR)/gzip_.c $(OBJDIR)/gzip.h $(SRCDIR)/config.h |
| 1047 | $(XTCC) -o $(OBJDIR)/gzip.o -c $(OBJDIR)/gzip_.c |
| 1048 | |
| 1049 | $(OBJDIR)/gzip.h: $(OBJDIR)/headers |
| 1050 | |
| 1051 | $(OBJDIR)/hname_.c: $(SRCDIR)/hname.c $(OBJDIR)/translate |
| 1052 | $(OBJDIR)/translate $(SRCDIR)/hname.c >$@ |
| 1053 | |
| 1054 | $(OBJDIR)/hname.o: $(OBJDIR)/hname_.c $(OBJDIR)/hname.h $(SRCDIR)/config.h |
| 1055 | $(XTCC) -o $(OBJDIR)/hname.o -c $(OBJDIR)/hname_.c |
| 1056 | |
| 1057 | $(OBJDIR)/hname.h: $(OBJDIR)/headers |
| 1058 | |
| 1059 | $(OBJDIR)/http_.c: $(SRCDIR)/http.c $(OBJDIR)/translate |
| 1060 | $(OBJDIR)/translate $(SRCDIR)/http.c >$@ |
| 1061 | |
| 1062 | $(OBJDIR)/http.o: $(OBJDIR)/http_.c $(OBJDIR)/http.h $(SRCDIR)/config.h |
| 1063 |
+1
| --- src/makemake.tcl | ||
| +++ src/makemake.tcl | ||
| @@ -58,10 +58,11 @@ | ||
| 58 | 58 | fshell |
| 59 | 59 | fusefs |
| 60 | 60 | glob |
| 61 | 61 | graph |
| 62 | 62 | gzip |
| 63 | + hname | |
| 63 | 64 | http |
| 64 | 65 | http_socket |
| 65 | 66 | http_transport |
| 66 | 67 | import |
| 67 | 68 | info |
| 68 | 69 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -58,10 +58,11 @@ | |
| 58 | fshell |
| 59 | fusefs |
| 60 | glob |
| 61 | graph |
| 62 | gzip |
| 63 | http |
| 64 | http_socket |
| 65 | http_transport |
| 66 | import |
| 67 | info |
| 68 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -58,10 +58,11 @@ | |
| 58 | fshell |
| 59 | fusefs |
| 60 | glob |
| 61 | graph |
| 62 | gzip |
| 63 | hname |
| 64 | http |
| 65 | http_socket |
| 66 | http_transport |
| 67 | import |
| 68 | info |
| 69 |
+71
-68
| --- src/manifest.c | ||
| +++ src/manifest.c | ||
| @@ -54,11 +54,11 @@ | ||
| 54 | 54 | /* |
| 55 | 55 | ** A single F-card within a manifest |
| 56 | 56 | */ |
| 57 | 57 | struct ManifestFile { |
| 58 | 58 | char *zName; /* Name of a file */ |
| 59 | - char *zUuid; /* UUID of the file */ | |
| 59 | + char *zUuid; /* Artifact hash for the file */ | |
| 60 | 60 | char *zPerm; /* File permissions */ |
| 61 | 61 | char *zPrior; /* Prior name if the name was changed */ |
| 62 | 62 | }; |
| 63 | 63 | |
| 64 | 64 | |
| @@ -77,35 +77,35 @@ | ||
| 77 | 77 | char *zRepoCksum; /* MD5 checksum of the baseline content. R card. */ |
| 78 | 78 | char *zWiki; /* Text of the wiki page. W card. */ |
| 79 | 79 | char *zWikiTitle; /* Name of the wiki page. L card. */ |
| 80 | 80 | char *zMimetype; /* Mime type of wiki or comment text. N card. */ |
| 81 | 81 | double rEventDate; /* Date of an event. E card. */ |
| 82 | - char *zEventId; /* UUID for an event. E card. */ | |
| 82 | + char *zEventId; /* Artifact hash for an event. E card. */ | |
| 83 | 83 | char *zTicketUuid; /* UUID for a ticket. K card. */ |
| 84 | 84 | char *zAttachName; /* Filename of an attachment. A card. */ |
| 85 | - char *zAttachSrc; /* UUID of document being attached. A card. */ | |
| 85 | + char *zAttachSrc; /* Artifact hash for document being attached. A card. */ | |
| 86 | 86 | char *zAttachTarget; /* Ticket or wiki that attachment applies to. A card */ |
| 87 | 87 | int nFile; /* Number of F cards */ |
| 88 | 88 | int nFileAlloc; /* Slots allocated in aFile[] */ |
| 89 | 89 | int iFile; /* Index of current file in iterator */ |
| 90 | 90 | ManifestFile *aFile; /* One entry for each F-card */ |
| 91 | 91 | int nParent; /* Number of parents. */ |
| 92 | 92 | int nParentAlloc; /* Slots allocated in azParent[] */ |
| 93 | - char **azParent; /* UUIDs of parents. One for each P card argument */ | |
| 93 | + char **azParent; /* Hashes of parents. One for each P card argument */ | |
| 94 | 94 | int nCherrypick; /* Number of entries in aCherrypick[] */ |
| 95 | 95 | struct { |
| 96 | - char *zCPTarget; /* UUID of cherry-picked version w/ +|- prefix */ | |
| 97 | - char *zCPBase; /* UUID of cherry-pick baseline. NULL for singletons */ | |
| 96 | + char *zCPTarget; /* Hash for cherry-picked version w/ +|- prefix */ | |
| 97 | + char *zCPBase; /* Hash for cherry-pick baseline. NULL for singletons */ | |
| 98 | 98 | } *aCherrypick; |
| 99 | 99 | int nCChild; /* Number of cluster children */ |
| 100 | 100 | int nCChildAlloc; /* Number of closts allocated in azCChild[] */ |
| 101 | - char **azCChild; /* UUIDs of referenced objects in a cluster. M cards */ | |
| 101 | + char **azCChild; /* Hashes of referenced objects in a cluster. M cards */ | |
| 102 | 102 | int nTag; /* Number of T Cards */ |
| 103 | 103 | int nTagAlloc; /* Slots allocated in aTag[] */ |
| 104 | 104 | struct TagType { |
| 105 | 105 | char *zName; /* Name of the tag */ |
| 106 | - char *zUuid; /* UUID that the tag is applied to */ | |
| 106 | + char *zUuid; /* Hash of artifact that the tag is applied to */ | |
| 107 | 107 | char *zValue; /* Value if the tag is really a property */ |
| 108 | 108 | } *aTag; /* One for each T card */ |
| 109 | 109 | int nField; /* Number of J cards */ |
| 110 | 110 | int nFieldAlloc; /* Slots allocated in aField[] */ |
| 111 | 111 | struct { |
| @@ -361,11 +361,11 @@ | ||
| 361 | 361 | char *z; |
| 362 | 362 | int n; |
| 363 | 363 | char *zUuid; |
| 364 | 364 | int sz = 0; |
| 365 | 365 | int isRepeat, hasSelfRefTag = 0; |
| 366 | - Blob bUuid = BLOB_INITIALIZER; | |
| 366 | + Blob bHname = BLOB_INITIALIZER; | |
| 367 | 367 | static Bag seen; |
| 368 | 368 | const char *zErr = 0; |
| 369 | 369 | |
| 370 | 370 | if( rid==0 ){ |
| 371 | 371 | isRepeat = 1; |
| @@ -406,14 +406,14 @@ | ||
| 406 | 406 | blob_reset(pContent); |
| 407 | 407 | blob_appendf(pErr, "incorrect Z-card cksum"); |
| 408 | 408 | return 0; |
| 409 | 409 | } |
| 410 | 410 | |
| 411 | - /* Store the UUID (before modifying the blob) only for error | |
| 411 | + /* Store the artifact hash (before modifying the blob) only for error | |
| 412 | 412 | ** reporting purposes. |
| 413 | 413 | */ |
| 414 | - sha1sum_blob(pContent, &bUuid); | |
| 414 | + sha1sum_blob(pContent, &bHname); | |
| 415 | 415 | |
| 416 | 416 | /* Allocate a Manifest object to hold the parsed control artifact. |
| 417 | 417 | */ |
| 418 | 418 | p = fossil_malloc( sizeof(*p) ); |
| 419 | 419 | memset(p, 0, sizeof(*p)); |
| @@ -449,15 +449,15 @@ | ||
| 449 | 449 | defossilize(zName); |
| 450 | 450 | if( !file_is_simple_pathname(zName, 0) ){ |
| 451 | 451 | SYNTAX("invalid filename on A-card"); |
| 452 | 452 | } |
| 453 | 453 | defossilize(zTarget); |
| 454 | - if( (nTarget!=UUID_SIZE || !validate16(zTarget, UUID_SIZE)) | |
| 454 | + if( hname_validate(zTarget,nTarget)==HNAME_NONE | |
| 455 | 455 | && !wiki_name_is_wellformed((const unsigned char *)zTarget) ){ |
| 456 | 456 | SYNTAX("invalid target on A-card"); |
| 457 | 457 | } |
| 458 | - if( zSrc && (nSrc!=UUID_SIZE || !validate16(zSrc, UUID_SIZE)) ){ | |
| 458 | + if( zSrc && hname_validate(zSrc,nSrc)==HNAME_NONE ){ | |
| 459 | 459 | SYNTAX("invalid source on A-card"); |
| 460 | 460 | } |
| 461 | 461 | p->zAttachName = (char*)file_tail(zName); |
| 462 | 462 | p->zAttachSrc = zSrc; |
| 463 | 463 | p->zAttachTarget = zTarget; |
| @@ -465,18 +465,18 @@ | ||
| 465 | 465 | } |
| 466 | 466 | |
| 467 | 467 | /* |
| 468 | 468 | ** B <uuid> |
| 469 | 469 | ** |
| 470 | - ** A B-line gives the UUID for the baseline of a delta-manifest. | |
| 470 | + ** A B-line gives the artifact hash for the baseline of a delta-manifest. | |
| 471 | 471 | */ |
| 472 | 472 | case 'B': { |
| 473 | 473 | if( p->zBaseline ) SYNTAX("more than one B-card"); |
| 474 | 474 | p->zBaseline = next_token(&x, &sz); |
| 475 | - if( p->zBaseline==0 ) SYNTAX("missing UUID on B-card"); | |
| 476 | - if( sz!=UUID_SIZE || !validate16(p->zBaseline, UUID_SIZE) ){ | |
| 477 | - SYNTAX("invalid UUID on B-card"); | |
| 475 | + if( p->zBaseline==0 ) SYNTAX("missing hash on B-card"); | |
| 476 | + if( hname_validate(p->zBaseline,sz)==HNAME_NONE ){ | |
| 477 | + SYNTAX("invalid hash on B-card"); | |
| 478 | 478 | } |
| 479 | 479 | break; |
| 480 | 480 | } |
| 481 | 481 | |
| 482 | 482 | |
| @@ -522,12 +522,12 @@ | ||
| 522 | 522 | case 'E': { |
| 523 | 523 | if( p->rEventDate>0.0 ) SYNTAX("more than one E-card"); |
| 524 | 524 | p->rEventDate = db_double(0.0,"SELECT julianday(%Q)", next_token(&x,0)); |
| 525 | 525 | if( p->rEventDate<=0.0 ) SYNTAX("malformed date on E-card"); |
| 526 | 526 | p->zEventId = next_token(&x, &sz); |
| 527 | - if( sz!=UUID_SIZE || !validate16(p->zEventId, UUID_SIZE) ){ | |
| 528 | - SYNTAX("malformed UUID on E-card"); | |
| 527 | + if( hname_validate(p->zEventId, sz)==HNAME_NONE ){ | |
| 528 | + SYNTAX("malformed hash on E-card"); | |
| 529 | 529 | } |
| 530 | 530 | break; |
| 531 | 531 | } |
| 532 | 532 | |
| 533 | 533 | /* |
| @@ -545,12 +545,13 @@ | ||
| 545 | 545 | if( !file_is_simple_pathname(zName, 0) ){ |
| 546 | 546 | SYNTAX("F-card filename is not a simple path"); |
| 547 | 547 | } |
| 548 | 548 | zUuid = next_token(&x, &sz); |
| 549 | 549 | if( p->zBaseline==0 || zUuid!=0 ){ |
| 550 | - if( sz!=UUID_SIZE ) SYNTAX("F-card UUID is the wrong size"); | |
| 551 | - if( !validate16(zUuid, UUID_SIZE) ) SYNTAX("F-card UUID invalid"); | |
| 550 | + if( hname_validate(zUuid,sz)==HNAME_NONE ){ | |
| 551 | + SYNTAX("F-card hash invalid"); | |
| 552 | + } | |
| 552 | 553 | } |
| 553 | 554 | zPerm = next_token(&x,0); |
| 554 | 555 | zPriorName = next_token(&x,0); |
| 555 | 556 | if( zPriorName ){ |
| 556 | 557 | defossilize(zPriorName); |
| @@ -636,20 +637,21 @@ | ||
| 636 | 637 | } |
| 637 | 638 | break; |
| 638 | 639 | } |
| 639 | 640 | |
| 640 | 641 | /* |
| 641 | - ** M <uuid> | |
| 642 | + ** M <hash> | |
| 642 | 643 | ** |
| 643 | - ** An M-line identifies another artifact by its UUID. M-lines | |
| 644 | + ** An M-line identifies another artifact by its hash. M-lines | |
| 644 | 645 | ** occur in clusters only. |
| 645 | 646 | */ |
| 646 | 647 | case 'M': { |
| 647 | 648 | zUuid = next_token(&x, &sz); |
| 648 | - if( zUuid==0 ) SYNTAX("missing UUID on M-card"); | |
| 649 | - if( sz!=UUID_SIZE ) SYNTAX("wrong size for UUID on M-card"); | |
| 650 | - if( !validate16(zUuid, UUID_SIZE) ) SYNTAX("UUID invalid on M-card"); | |
| 649 | + if( zUuid==0 ) SYNTAX("missing hash on M-card"); | |
| 650 | + if( hname_validate(zUuid,sz)==HNAME_NONE ){ | |
| 651 | + SYNTAX("Invalid hash on M-card"); | |
| 652 | + } | |
| 651 | 653 | if( p->nCChild>=p->nCChildAlloc ){ |
| 652 | 654 | p->nCChildAlloc = p->nCChildAlloc*2 + 10; |
| 653 | 655 | p->azCChild = fossil_realloc(p->azCChild |
| 654 | 656 | , p->nCChildAlloc*sizeof(p->azCChild[0]) ); |
| 655 | 657 | } |
| @@ -683,12 +685,13 @@ | ||
| 683 | 685 | ** check-in historically has an empty P-card, so empty P-cards |
| 684 | 686 | ** must be accepted. |
| 685 | 687 | */ |
| 686 | 688 | case 'P': { |
| 687 | 689 | while( (zUuid = next_token(&x, &sz))!=0 ){ |
| 688 | - if( sz!=UUID_SIZE ) SYNTAX("wrong size UUID on P-card"); | |
| 689 | - if( !validate16(zUuid, UUID_SIZE) )SYNTAX("invalid UUID on P-card"); | |
| 690 | + if( hname_validate(zUuid, sz)==HNAME_NONE ){ | |
| 691 | + SYNTAX("invalid hash on P-card"); | |
| 692 | + } | |
| 690 | 693 | if( p->nParent>=p->nParentAlloc ){ |
| 691 | 694 | p->nParentAlloc = p->nParentAlloc*2 + 5; |
| 692 | 695 | p->azParent = fossil_realloc(p->azParent, |
| 693 | 696 | p->nParentAlloc*sizeof(char*)); |
| 694 | 697 | } |
| @@ -703,29 +706,25 @@ | ||
| 703 | 706 | ** |
| 704 | 707 | ** Specify one or a range of check-ins that are cherrypicked into |
| 705 | 708 | ** this check-in ("+") or backed out of this check-in ("-"). |
| 706 | 709 | */ |
| 707 | 710 | case 'Q': { |
| 708 | - if( (zUuid=next_token(&x, &sz))==0 ) SYNTAX("missing UUID on Q-card"); | |
| 709 | - if( sz!=UUID_SIZE+1 ) SYNTAX("wrong size UUID on Q-card"); | |
| 711 | + if( (zUuid=next_token(&x, &sz))==0 ) SYNTAX("missing hash on Q-card"); | |
| 710 | 712 | if( zUuid[0]!='+' && zUuid[0]!='-' ){ |
| 711 | 713 | SYNTAX("Q-card does not begin with '+' or '-'"); |
| 712 | 714 | } |
| 713 | - if( !validate16(&zUuid[1], UUID_SIZE) ){ | |
| 714 | - SYNTAX("invalid UUID on Q-card"); | |
| 715 | + if( hname_validate(&zUuid[1], sz-1)==HNAME_NONE ){ | |
| 716 | + SYNTAX("invalid hash on Q-card"); | |
| 715 | 717 | } |
| 716 | 718 | n = p->nCherrypick; |
| 717 | 719 | p->nCherrypick++; |
| 718 | 720 | p->aCherrypick = fossil_realloc(p->aCherrypick, |
| 719 | 721 | p->nCherrypick*sizeof(p->aCherrypick[0])); |
| 720 | 722 | p->aCherrypick[n].zCPTarget = zUuid; |
| 721 | 723 | p->aCherrypick[n].zCPBase = zUuid = next_token(&x, &sz); |
| 722 | - if( zUuid ){ | |
| 723 | - if( sz!=UUID_SIZE ) SYNTAX("wrong size second UUID in Q-card"); | |
| 724 | - if( !validate16(zUuid, UUID_SIZE) ){ | |
| 725 | - SYNTAX("invalid second UUID on Q-card"); | |
| 726 | - } | |
| 724 | + if( zUuid && hname_validate(zUuid,sz)==HNAME_NONE ){ | |
| 725 | + SYNTAX("invalid second hash on Q-card"); | |
| 727 | 726 | } |
| 728 | 727 | break; |
| 729 | 728 | } |
| 730 | 729 | |
| 731 | 730 | /* |
| @@ -760,32 +759,32 @@ | ||
| 760 | 759 | case 'T': { |
| 761 | 760 | char *zName, *zValue; |
| 762 | 761 | zName = next_token(&x, 0); |
| 763 | 762 | if( zName==0 ) SYNTAX("missing name on T-card"); |
| 764 | 763 | zUuid = next_token(&x, &sz); |
| 765 | - if( zUuid==0 ) SYNTAX("missing UUID on T-card"); | |
| 764 | + if( zUuid==0 ) SYNTAX("missing artifact hash on T-card"); | |
| 766 | 765 | zValue = next_token(&x, 0); |
| 767 | 766 | if( zValue ) defossilize(zValue); |
| 768 | - if( sz==UUID_SIZE && validate16(zUuid, UUID_SIZE) ){ | |
| 769 | - /* A valid uuid */ | |
| 767 | + if( hname_validate(zUuid, sz)!=HNAME_NONE ){ | |
| 768 | + /* A valid artifact hash */ | |
| 770 | 769 | if( p->zEventId ) SYNTAX("non-self-referential T-card in event"); |
| 771 | 770 | }else if( sz==1 && zUuid[0]=='*' ){ |
| 772 | 771 | zUuid = 0; |
| 773 | 772 | hasSelfRefTag = 1; |
| 774 | 773 | if( p->zEventId && zName[0]!='+' ){ |
| 775 | 774 | SYNTAX("propagating T-card in event"); |
| 776 | 775 | } |
| 777 | 776 | }else{ |
| 778 | - SYNTAX("malformed UUID on T-card"); | |
| 777 | + SYNTAX("malformed artifact hash on T-card"); | |
| 779 | 778 | } |
| 780 | 779 | defossilize(zName); |
| 781 | 780 | if( zName[0]!='-' && zName[0]!='+' && zName[0]!='*' ){ |
| 782 | 781 | SYNTAX("T-card name does not begin with '-', '+', or '*'"); |
| 783 | 782 | } |
| 784 | 783 | if( validate16(&zName[1], strlen(&zName[1])) ){ |
| 785 | - /* Do not allow tags whose names look like UUIDs */ | |
| 786 | - SYNTAX("T-card name looks like a UUID"); | |
| 784 | + /* Do not allow tags whose names look like a hash */ | |
| 785 | + SYNTAX("T-card name looks like a hexadecimal hash"); | |
| 787 | 786 | } |
| 788 | 787 | if( p->nTag>=p->nTagAlloc ){ |
| 789 | 788 | p->nTagAlloc = p->nTagAlloc*2 + 10; |
| 790 | 789 | p->aTag = fossil_realloc(p->aTag, p->nTagAlloc*sizeof(p->aTag[0]) ); |
| 791 | 790 | } |
| @@ -951,17 +950,17 @@ | ||
| 951 | 950 | if( !seenZ ) SYNTAX("missing Z-card on control"); |
| 952 | 951 | p->type = CFTYPE_CONTROL; |
| 953 | 952 | } |
| 954 | 953 | md5sum_init(); |
| 955 | 954 | if( !isRepeat ) g.parseCnt[p->type]++; |
| 956 | - blob_reset(&bUuid); | |
| 955 | + blob_reset(&bHname); | |
| 957 | 956 | return p; |
| 958 | 957 | |
| 959 | 958 | manifest_syntax_error: |
| 960 | - if(bUuid.nUsed){ | |
| 961 | - blob_appendf(pErr, "manifest [%.40s] ", blob_str(&bUuid)); | |
| 962 | - blob_reset(&bUuid); | |
| 959 | + if(bHname.nUsed){ | |
| 960 | + blob_appendf(pErr, "manifest [%s] ", blob_str(&bHname)); | |
| 961 | + blob_reset(&bHname); | |
| 963 | 962 | } |
| 964 | 963 | if( zErr ){ |
| 965 | 964 | blob_appendf(pErr, "line %d: %s", lineNo, zErr); |
| 966 | 965 | }else{ |
| 967 | 966 | blob_appendf(pErr, "unknown error on line %d", lineNo); |
| @@ -1193,13 +1192,13 @@ | ||
| 1193 | 1192 | ** then the mlink entry is only created if there is already an mlink |
| 1194 | 1193 | ** from primary parent for the same file. |
| 1195 | 1194 | */ |
| 1196 | 1195 | static void add_one_mlink( |
| 1197 | 1196 | int pmid, /* The parent manifest */ |
| 1198 | - const char *zFromUuid, /* UUID for content in parent */ | |
| 1197 | + const char *zFromUuid, /* Artifact hash for content in parent */ | |
| 1199 | 1198 | int mid, /* The record ID of the manifest */ |
| 1200 | - const char *zToUuid, /* UUID for content in child */ | |
| 1199 | + const char *zToUuid, /* artifact hash for content in child */ | |
| 1201 | 1200 | const char *zFilename, /* Filename */ |
| 1202 | 1201 | const char *zPrior, /* Previous filename. NULL if unchanged */ |
| 1203 | 1202 | int isPublic, /* True if mid is not a private manifest */ |
| 1204 | 1203 | int isPrimary, /* pmid is the primary parent of mid */ |
| 1205 | 1204 | int mperm /* 1: exec, 2: symlink */ |
| @@ -1545,22 +1544,22 @@ | ||
| 1545 | 1544 | } |
| 1546 | 1545 | } |
| 1547 | 1546 | |
| 1548 | 1547 | /* |
| 1549 | 1548 | ** For a check-in with RID "rid" that has nParent parent check-ins given |
| 1550 | -** by the UUIDs in azParent[], create all appropriate plink and mlink table | |
| 1549 | +** by the hashes in azParent[], create all appropriate plink and mlink table | |
| 1551 | 1550 | ** entries. |
| 1552 | 1551 | ** |
| 1553 | -** The primary parent is the first UUID on the azParent[] list. | |
| 1552 | +** The primary parent is the first hash on the azParent[] list. | |
| 1554 | 1553 | ** |
| 1555 | 1554 | ** Return the RID of the primary parent. |
| 1556 | 1555 | */ |
| 1557 | 1556 | static int manifest_add_checkin_linkages( |
| 1558 | 1557 | int rid, /* The RID of the check-in */ |
| 1559 | 1558 | Manifest *p, /* Manifest for this check-in */ |
| 1560 | 1559 | int nParent, /* Number of parents for this check-in */ |
| 1561 | - char **azParent /* UUIDs for each parent */ | |
| 1560 | + char **azParent /* hashes for each parent */ | |
| 1562 | 1561 | ){ |
| 1563 | 1562 | int i; |
| 1564 | 1563 | int parentid = 0; |
| 1565 | 1564 | char zBaseId[30]; /* Baseline manifest RID for deltas. "NULL" otherwise */ |
| 1566 | 1565 | Stmt q; |
| @@ -1611,33 +1610,36 @@ | ||
| 1611 | 1610 | return parentid; |
| 1612 | 1611 | } |
| 1613 | 1612 | |
| 1614 | 1613 | /* |
| 1615 | 1614 | ** There exists a "parent" tag against checkin rid that has value zValue. |
| 1616 | -** If value is well-formed (meaning that it is a list of UUIDs), then use | |
| 1615 | +** If value is well-formed (meaning that it is a list of hashes), then use | |
| 1617 | 1616 | ** zValue to reparent check-in rid. |
| 1618 | 1617 | */ |
| 1619 | 1618 | void manifest_reparent_checkin(int rid, const char *zValue){ |
| 1620 | - int nParent; | |
| 1619 | + int nParent = 0; | |
| 1621 | 1620 | char *zCopy = 0; |
| 1622 | 1621 | char **azParent = 0; |
| 1623 | 1622 | Manifest *p = 0; |
| 1624 | - int i; | |
| 1623 | + int i, j; | |
| 1625 | 1624 | int n = (int)strlen(zValue); |
| 1626 | - nParent = (n+1)/(UUID_SIZE+1); | |
| 1627 | - if( nParent*(UUID_SIZE+1) - 1 !=n ) return; | |
| 1628 | - if( nParent<1 ) return; | |
| 1625 | + int mxParent = (n+1)/(HNAME_LEN_MIN+1); | |
| 1626 | + | |
| 1627 | + if( mxParent<1 ) return; | |
| 1629 | 1628 | zCopy = fossil_strdup(zValue); |
| 1630 | - azParent = fossil_malloc( sizeof(azParent[0])*nParent ); | |
| 1631 | - for(i=0; i<nParent; i++){ | |
| 1632 | - azParent[i] = &zCopy[i*(UUID_SIZE+1)]; | |
| 1633 | - if( i<nParent-1 && azParent[i][UUID_SIZE]!=' ' ) break; | |
| 1634 | - azParent[i][UUID_SIZE] = 0; | |
| 1635 | - if( !validate16(azParent[i],UUID_SIZE) ) break; | |
| 1636 | - } | |
| 1637 | - if( i==nParent | |
| 1638 | - && !db_exists("SELECT 1 FROM plink WHERE cid=%d AND pid=%d", | |
| 1629 | + azParent = fossil_malloc( sizeof(azParent[0])*mxParent ); | |
| 1630 | + for(nParent=0, i=0; zCopy[i]; i++){ | |
| 1631 | + char *z = &zCopy[i]; | |
| 1632 | + azParent[nParent++] = z; | |
| 1633 | + if( nParent>mxParent ) goto reparent_abort; | |
| 1634 | + for(j=HNAME_LEN_MIN; z[j]>' '; j++){} | |
| 1635 | + if( hname_validate(z, j)==HNAME_NONE ) goto reparent_abort; | |
| 1636 | + if( z[j]==0 ) break; | |
| 1637 | + z[j] = 0; | |
| 1638 | + i += j; | |
| 1639 | + } | |
| 1640 | + if( !db_exists("SELECT 1 FROM plink WHERE cid=%d AND pid=%d", | |
| 1639 | 1641 | rid, uuid_to_rid(azParent[0],0)) |
| 1640 | 1642 | ){ |
| 1641 | 1643 | p = manifest_get(rid, CFTYPE_MANIFEST, 0); |
| 1642 | 1644 | } |
| 1643 | 1645 | if( p!=0 ){ |
| @@ -1647,10 +1649,11 @@ | ||
| 1647 | 1649 | rid, rid |
| 1648 | 1650 | ); |
| 1649 | 1651 | manifest_add_checkin_linkages(rid,p,nParent,azParent); |
| 1650 | 1652 | } |
| 1651 | 1653 | manifest_destroy(p); |
| 1654 | +reparent_abort: | |
| 1652 | 1655 | fossil_free(azParent); |
| 1653 | 1656 | fossil_free(zCopy); |
| 1654 | 1657 | } |
| 1655 | 1658 | |
| 1656 | 1659 | /* |
| @@ -2280,11 +2283,11 @@ | ||
| 2280 | 2283 | int branchMove = 0; |
| 2281 | 2284 | blob_zero(&comment); |
| 2282 | 2285 | if( p->zComment ){ |
| 2283 | 2286 | blob_appendf(&comment, " %s.", p->zComment); |
| 2284 | 2287 | } |
| 2285 | - /* Next loop expects tags to be sorted on UUID, so sort it. */ | |
| 2288 | + /* Next loop expects tags to be sorted on hash, so sort it. */ | |
| 2286 | 2289 | qsort(p->aTag, p->nTag, sizeof(p->aTag[0]), tag_compare); |
| 2287 | 2290 | for(i=0; i<p->nTag; i++){ |
| 2288 | 2291 | zTagUuid = p->aTag[i].zUuid; |
| 2289 | 2292 | if( !zTagUuid ) continue; |
| 2290 | 2293 | if( i==0 || fossil_strcmp(zTagUuid, p->aTag[i-1].zUuid)!=0 ){ |
| 2291 | 2294 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -54,11 +54,11 @@ | |
| 54 | /* |
| 55 | ** A single F-card within a manifest |
| 56 | */ |
| 57 | struct ManifestFile { |
| 58 | char *zName; /* Name of a file */ |
| 59 | char *zUuid; /* UUID of the file */ |
| 60 | char *zPerm; /* File permissions */ |
| 61 | char *zPrior; /* Prior name if the name was changed */ |
| 62 | }; |
| 63 | |
| 64 | |
| @@ -77,35 +77,35 @@ | |
| 77 | char *zRepoCksum; /* MD5 checksum of the baseline content. R card. */ |
| 78 | char *zWiki; /* Text of the wiki page. W card. */ |
| 79 | char *zWikiTitle; /* Name of the wiki page. L card. */ |
| 80 | char *zMimetype; /* Mime type of wiki or comment text. N card. */ |
| 81 | double rEventDate; /* Date of an event. E card. */ |
| 82 | char *zEventId; /* UUID for an event. E card. */ |
| 83 | char *zTicketUuid; /* UUID for a ticket. K card. */ |
| 84 | char *zAttachName; /* Filename of an attachment. A card. */ |
| 85 | char *zAttachSrc; /* UUID of document being attached. A card. */ |
| 86 | char *zAttachTarget; /* Ticket or wiki that attachment applies to. A card */ |
| 87 | int nFile; /* Number of F cards */ |
| 88 | int nFileAlloc; /* Slots allocated in aFile[] */ |
| 89 | int iFile; /* Index of current file in iterator */ |
| 90 | ManifestFile *aFile; /* One entry for each F-card */ |
| 91 | int nParent; /* Number of parents. */ |
| 92 | int nParentAlloc; /* Slots allocated in azParent[] */ |
| 93 | char **azParent; /* UUIDs of parents. One for each P card argument */ |
| 94 | int nCherrypick; /* Number of entries in aCherrypick[] */ |
| 95 | struct { |
| 96 | char *zCPTarget; /* UUID of cherry-picked version w/ +|- prefix */ |
| 97 | char *zCPBase; /* UUID of cherry-pick baseline. NULL for singletons */ |
| 98 | } *aCherrypick; |
| 99 | int nCChild; /* Number of cluster children */ |
| 100 | int nCChildAlloc; /* Number of closts allocated in azCChild[] */ |
| 101 | char **azCChild; /* UUIDs of referenced objects in a cluster. M cards */ |
| 102 | int nTag; /* Number of T Cards */ |
| 103 | int nTagAlloc; /* Slots allocated in aTag[] */ |
| 104 | struct TagType { |
| 105 | char *zName; /* Name of the tag */ |
| 106 | char *zUuid; /* UUID that the tag is applied to */ |
| 107 | char *zValue; /* Value if the tag is really a property */ |
| 108 | } *aTag; /* One for each T card */ |
| 109 | int nField; /* Number of J cards */ |
| 110 | int nFieldAlloc; /* Slots allocated in aField[] */ |
| 111 | struct { |
| @@ -361,11 +361,11 @@ | |
| 361 | char *z; |
| 362 | int n; |
| 363 | char *zUuid; |
| 364 | int sz = 0; |
| 365 | int isRepeat, hasSelfRefTag = 0; |
| 366 | Blob bUuid = BLOB_INITIALIZER; |
| 367 | static Bag seen; |
| 368 | const char *zErr = 0; |
| 369 | |
| 370 | if( rid==0 ){ |
| 371 | isRepeat = 1; |
| @@ -406,14 +406,14 @@ | |
| 406 | blob_reset(pContent); |
| 407 | blob_appendf(pErr, "incorrect Z-card cksum"); |
| 408 | return 0; |
| 409 | } |
| 410 | |
| 411 | /* Store the UUID (before modifying the blob) only for error |
| 412 | ** reporting purposes. |
| 413 | */ |
| 414 | sha1sum_blob(pContent, &bUuid); |
| 415 | |
| 416 | /* Allocate a Manifest object to hold the parsed control artifact. |
| 417 | */ |
| 418 | p = fossil_malloc( sizeof(*p) ); |
| 419 | memset(p, 0, sizeof(*p)); |
| @@ -449,15 +449,15 @@ | |
| 449 | defossilize(zName); |
| 450 | if( !file_is_simple_pathname(zName, 0) ){ |
| 451 | SYNTAX("invalid filename on A-card"); |
| 452 | } |
| 453 | defossilize(zTarget); |
| 454 | if( (nTarget!=UUID_SIZE || !validate16(zTarget, UUID_SIZE)) |
| 455 | && !wiki_name_is_wellformed((const unsigned char *)zTarget) ){ |
| 456 | SYNTAX("invalid target on A-card"); |
| 457 | } |
| 458 | if( zSrc && (nSrc!=UUID_SIZE || !validate16(zSrc, UUID_SIZE)) ){ |
| 459 | SYNTAX("invalid source on A-card"); |
| 460 | } |
| 461 | p->zAttachName = (char*)file_tail(zName); |
| 462 | p->zAttachSrc = zSrc; |
| 463 | p->zAttachTarget = zTarget; |
| @@ -465,18 +465,18 @@ | |
| 465 | } |
| 466 | |
| 467 | /* |
| 468 | ** B <uuid> |
| 469 | ** |
| 470 | ** A B-line gives the UUID for the baseline of a delta-manifest. |
| 471 | */ |
| 472 | case 'B': { |
| 473 | if( p->zBaseline ) SYNTAX("more than one B-card"); |
| 474 | p->zBaseline = next_token(&x, &sz); |
| 475 | if( p->zBaseline==0 ) SYNTAX("missing UUID on B-card"); |
| 476 | if( sz!=UUID_SIZE || !validate16(p->zBaseline, UUID_SIZE) ){ |
| 477 | SYNTAX("invalid UUID on B-card"); |
| 478 | } |
| 479 | break; |
| 480 | } |
| 481 | |
| 482 | |
| @@ -522,12 +522,12 @@ | |
| 522 | case 'E': { |
| 523 | if( p->rEventDate>0.0 ) SYNTAX("more than one E-card"); |
| 524 | p->rEventDate = db_double(0.0,"SELECT julianday(%Q)", next_token(&x,0)); |
| 525 | if( p->rEventDate<=0.0 ) SYNTAX("malformed date on E-card"); |
| 526 | p->zEventId = next_token(&x, &sz); |
| 527 | if( sz!=UUID_SIZE || !validate16(p->zEventId, UUID_SIZE) ){ |
| 528 | SYNTAX("malformed UUID on E-card"); |
| 529 | } |
| 530 | break; |
| 531 | } |
| 532 | |
| 533 | /* |
| @@ -545,12 +545,13 @@ | |
| 545 | if( !file_is_simple_pathname(zName, 0) ){ |
| 546 | SYNTAX("F-card filename is not a simple path"); |
| 547 | } |
| 548 | zUuid = next_token(&x, &sz); |
| 549 | if( p->zBaseline==0 || zUuid!=0 ){ |
| 550 | if( sz!=UUID_SIZE ) SYNTAX("F-card UUID is the wrong size"); |
| 551 | if( !validate16(zUuid, UUID_SIZE) ) SYNTAX("F-card UUID invalid"); |
| 552 | } |
| 553 | zPerm = next_token(&x,0); |
| 554 | zPriorName = next_token(&x,0); |
| 555 | if( zPriorName ){ |
| 556 | defossilize(zPriorName); |
| @@ -636,20 +637,21 @@ | |
| 636 | } |
| 637 | break; |
| 638 | } |
| 639 | |
| 640 | /* |
| 641 | ** M <uuid> |
| 642 | ** |
| 643 | ** An M-line identifies another artifact by its UUID. M-lines |
| 644 | ** occur in clusters only. |
| 645 | */ |
| 646 | case 'M': { |
| 647 | zUuid = next_token(&x, &sz); |
| 648 | if( zUuid==0 ) SYNTAX("missing UUID on M-card"); |
| 649 | if( sz!=UUID_SIZE ) SYNTAX("wrong size for UUID on M-card"); |
| 650 | if( !validate16(zUuid, UUID_SIZE) ) SYNTAX("UUID invalid on M-card"); |
| 651 | if( p->nCChild>=p->nCChildAlloc ){ |
| 652 | p->nCChildAlloc = p->nCChildAlloc*2 + 10; |
| 653 | p->azCChild = fossil_realloc(p->azCChild |
| 654 | , p->nCChildAlloc*sizeof(p->azCChild[0]) ); |
| 655 | } |
| @@ -683,12 +685,13 @@ | |
| 683 | ** check-in historically has an empty P-card, so empty P-cards |
| 684 | ** must be accepted. |
| 685 | */ |
| 686 | case 'P': { |
| 687 | while( (zUuid = next_token(&x, &sz))!=0 ){ |
| 688 | if( sz!=UUID_SIZE ) SYNTAX("wrong size UUID on P-card"); |
| 689 | if( !validate16(zUuid, UUID_SIZE) )SYNTAX("invalid UUID on P-card"); |
| 690 | if( p->nParent>=p->nParentAlloc ){ |
| 691 | p->nParentAlloc = p->nParentAlloc*2 + 5; |
| 692 | p->azParent = fossil_realloc(p->azParent, |
| 693 | p->nParentAlloc*sizeof(char*)); |
| 694 | } |
| @@ -703,29 +706,25 @@ | |
| 703 | ** |
| 704 | ** Specify one or a range of check-ins that are cherrypicked into |
| 705 | ** this check-in ("+") or backed out of this check-in ("-"). |
| 706 | */ |
| 707 | case 'Q': { |
| 708 | if( (zUuid=next_token(&x, &sz))==0 ) SYNTAX("missing UUID on Q-card"); |
| 709 | if( sz!=UUID_SIZE+1 ) SYNTAX("wrong size UUID on Q-card"); |
| 710 | if( zUuid[0]!='+' && zUuid[0]!='-' ){ |
| 711 | SYNTAX("Q-card does not begin with '+' or '-'"); |
| 712 | } |
| 713 | if( !validate16(&zUuid[1], UUID_SIZE) ){ |
| 714 | SYNTAX("invalid UUID on Q-card"); |
| 715 | } |
| 716 | n = p->nCherrypick; |
| 717 | p->nCherrypick++; |
| 718 | p->aCherrypick = fossil_realloc(p->aCherrypick, |
| 719 | p->nCherrypick*sizeof(p->aCherrypick[0])); |
| 720 | p->aCherrypick[n].zCPTarget = zUuid; |
| 721 | p->aCherrypick[n].zCPBase = zUuid = next_token(&x, &sz); |
| 722 | if( zUuid ){ |
| 723 | if( sz!=UUID_SIZE ) SYNTAX("wrong size second UUID in Q-card"); |
| 724 | if( !validate16(zUuid, UUID_SIZE) ){ |
| 725 | SYNTAX("invalid second UUID on Q-card"); |
| 726 | } |
| 727 | } |
| 728 | break; |
| 729 | } |
| 730 | |
| 731 | /* |
| @@ -760,32 +759,32 @@ | |
| 760 | case 'T': { |
| 761 | char *zName, *zValue; |
| 762 | zName = next_token(&x, 0); |
| 763 | if( zName==0 ) SYNTAX("missing name on T-card"); |
| 764 | zUuid = next_token(&x, &sz); |
| 765 | if( zUuid==0 ) SYNTAX("missing UUID on T-card"); |
| 766 | zValue = next_token(&x, 0); |
| 767 | if( zValue ) defossilize(zValue); |
| 768 | if( sz==UUID_SIZE && validate16(zUuid, UUID_SIZE) ){ |
| 769 | /* A valid uuid */ |
| 770 | if( p->zEventId ) SYNTAX("non-self-referential T-card in event"); |
| 771 | }else if( sz==1 && zUuid[0]=='*' ){ |
| 772 | zUuid = 0; |
| 773 | hasSelfRefTag = 1; |
| 774 | if( p->zEventId && zName[0]!='+' ){ |
| 775 | SYNTAX("propagating T-card in event"); |
| 776 | } |
| 777 | }else{ |
| 778 | SYNTAX("malformed UUID on T-card"); |
| 779 | } |
| 780 | defossilize(zName); |
| 781 | if( zName[0]!='-' && zName[0]!='+' && zName[0]!='*' ){ |
| 782 | SYNTAX("T-card name does not begin with '-', '+', or '*'"); |
| 783 | } |
| 784 | if( validate16(&zName[1], strlen(&zName[1])) ){ |
| 785 | /* Do not allow tags whose names look like UUIDs */ |
| 786 | SYNTAX("T-card name looks like a UUID"); |
| 787 | } |
| 788 | if( p->nTag>=p->nTagAlloc ){ |
| 789 | p->nTagAlloc = p->nTagAlloc*2 + 10; |
| 790 | p->aTag = fossil_realloc(p->aTag, p->nTagAlloc*sizeof(p->aTag[0]) ); |
| 791 | } |
| @@ -951,17 +950,17 @@ | |
| 951 | if( !seenZ ) SYNTAX("missing Z-card on control"); |
| 952 | p->type = CFTYPE_CONTROL; |
| 953 | } |
| 954 | md5sum_init(); |
| 955 | if( !isRepeat ) g.parseCnt[p->type]++; |
| 956 | blob_reset(&bUuid); |
| 957 | return p; |
| 958 | |
| 959 | manifest_syntax_error: |
| 960 | if(bUuid.nUsed){ |
| 961 | blob_appendf(pErr, "manifest [%.40s] ", blob_str(&bUuid)); |
| 962 | blob_reset(&bUuid); |
| 963 | } |
| 964 | if( zErr ){ |
| 965 | blob_appendf(pErr, "line %d: %s", lineNo, zErr); |
| 966 | }else{ |
| 967 | blob_appendf(pErr, "unknown error on line %d", lineNo); |
| @@ -1193,13 +1192,13 @@ | |
| 1193 | ** then the mlink entry is only created if there is already an mlink |
| 1194 | ** from primary parent for the same file. |
| 1195 | */ |
| 1196 | static void add_one_mlink( |
| 1197 | int pmid, /* The parent manifest */ |
| 1198 | const char *zFromUuid, /* UUID for content in parent */ |
| 1199 | int mid, /* The record ID of the manifest */ |
| 1200 | const char *zToUuid, /* UUID for content in child */ |
| 1201 | const char *zFilename, /* Filename */ |
| 1202 | const char *zPrior, /* Previous filename. NULL if unchanged */ |
| 1203 | int isPublic, /* True if mid is not a private manifest */ |
| 1204 | int isPrimary, /* pmid is the primary parent of mid */ |
| 1205 | int mperm /* 1: exec, 2: symlink */ |
| @@ -1545,22 +1544,22 @@ | |
| 1545 | } |
| 1546 | } |
| 1547 | |
| 1548 | /* |
| 1549 | ** For a check-in with RID "rid" that has nParent parent check-ins given |
| 1550 | ** by the UUIDs in azParent[], create all appropriate plink and mlink table |
| 1551 | ** entries. |
| 1552 | ** |
| 1553 | ** The primary parent is the first UUID on the azParent[] list. |
| 1554 | ** |
| 1555 | ** Return the RID of the primary parent. |
| 1556 | */ |
| 1557 | static int manifest_add_checkin_linkages( |
| 1558 | int rid, /* The RID of the check-in */ |
| 1559 | Manifest *p, /* Manifest for this check-in */ |
| 1560 | int nParent, /* Number of parents for this check-in */ |
| 1561 | char **azParent /* UUIDs for each parent */ |
| 1562 | ){ |
| 1563 | int i; |
| 1564 | int parentid = 0; |
| 1565 | char zBaseId[30]; /* Baseline manifest RID for deltas. "NULL" otherwise */ |
| 1566 | Stmt q; |
| @@ -1611,33 +1610,36 @@ | |
| 1611 | return parentid; |
| 1612 | } |
| 1613 | |
| 1614 | /* |
| 1615 | ** There exists a "parent" tag against checkin rid that has value zValue. |
| 1616 | ** If value is well-formed (meaning that it is a list of UUIDs), then use |
| 1617 | ** zValue to reparent check-in rid. |
| 1618 | */ |
| 1619 | void manifest_reparent_checkin(int rid, const char *zValue){ |
| 1620 | int nParent; |
| 1621 | char *zCopy = 0; |
| 1622 | char **azParent = 0; |
| 1623 | Manifest *p = 0; |
| 1624 | int i; |
| 1625 | int n = (int)strlen(zValue); |
| 1626 | nParent = (n+1)/(UUID_SIZE+1); |
| 1627 | if( nParent*(UUID_SIZE+1) - 1 !=n ) return; |
| 1628 | if( nParent<1 ) return; |
| 1629 | zCopy = fossil_strdup(zValue); |
| 1630 | azParent = fossil_malloc( sizeof(azParent[0])*nParent ); |
| 1631 | for(i=0; i<nParent; i++){ |
| 1632 | azParent[i] = &zCopy[i*(UUID_SIZE+1)]; |
| 1633 | if( i<nParent-1 && azParent[i][UUID_SIZE]!=' ' ) break; |
| 1634 | azParent[i][UUID_SIZE] = 0; |
| 1635 | if( !validate16(azParent[i],UUID_SIZE) ) break; |
| 1636 | } |
| 1637 | if( i==nParent |
| 1638 | && !db_exists("SELECT 1 FROM plink WHERE cid=%d AND pid=%d", |
| 1639 | rid, uuid_to_rid(azParent[0],0)) |
| 1640 | ){ |
| 1641 | p = manifest_get(rid, CFTYPE_MANIFEST, 0); |
| 1642 | } |
| 1643 | if( p!=0 ){ |
| @@ -1647,10 +1649,11 @@ | |
| 1647 | rid, rid |
| 1648 | ); |
| 1649 | manifest_add_checkin_linkages(rid,p,nParent,azParent); |
| 1650 | } |
| 1651 | manifest_destroy(p); |
| 1652 | fossil_free(azParent); |
| 1653 | fossil_free(zCopy); |
| 1654 | } |
| 1655 | |
| 1656 | /* |
| @@ -2280,11 +2283,11 @@ | |
| 2280 | int branchMove = 0; |
| 2281 | blob_zero(&comment); |
| 2282 | if( p->zComment ){ |
| 2283 | blob_appendf(&comment, " %s.", p->zComment); |
| 2284 | } |
| 2285 | /* Next loop expects tags to be sorted on UUID, so sort it. */ |
| 2286 | qsort(p->aTag, p->nTag, sizeof(p->aTag[0]), tag_compare); |
| 2287 | for(i=0; i<p->nTag; i++){ |
| 2288 | zTagUuid = p->aTag[i].zUuid; |
| 2289 | if( !zTagUuid ) continue; |
| 2290 | if( i==0 || fossil_strcmp(zTagUuid, p->aTag[i-1].zUuid)!=0 ){ |
| 2291 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -54,11 +54,11 @@ | |
| 54 | /* |
| 55 | ** A single F-card within a manifest |
| 56 | */ |
| 57 | struct ManifestFile { |
| 58 | char *zName; /* Name of a file */ |
| 59 | char *zUuid; /* Artifact hash for the file */ |
| 60 | char *zPerm; /* File permissions */ |
| 61 | char *zPrior; /* Prior name if the name was changed */ |
| 62 | }; |
| 63 | |
| 64 | |
| @@ -77,35 +77,35 @@ | |
| 77 | char *zRepoCksum; /* MD5 checksum of the baseline content. R card. */ |
| 78 | char *zWiki; /* Text of the wiki page. W card. */ |
| 79 | char *zWikiTitle; /* Name of the wiki page. L card. */ |
| 80 | char *zMimetype; /* Mime type of wiki or comment text. N card. */ |
| 81 | double rEventDate; /* Date of an event. E card. */ |
| 82 | char *zEventId; /* Artifact hash for an event. E card. */ |
| 83 | char *zTicketUuid; /* UUID for a ticket. K card. */ |
| 84 | char *zAttachName; /* Filename of an attachment. A card. */ |
| 85 | char *zAttachSrc; /* Artifact hash for document being attached. A card. */ |
| 86 | char *zAttachTarget; /* Ticket or wiki that attachment applies to. A card */ |
| 87 | int nFile; /* Number of F cards */ |
| 88 | int nFileAlloc; /* Slots allocated in aFile[] */ |
| 89 | int iFile; /* Index of current file in iterator */ |
| 90 | ManifestFile *aFile; /* One entry for each F-card */ |
| 91 | int nParent; /* Number of parents. */ |
| 92 | int nParentAlloc; /* Slots allocated in azParent[] */ |
| 93 | char **azParent; /* Hashes of parents. One for each P card argument */ |
| 94 | int nCherrypick; /* Number of entries in aCherrypick[] */ |
| 95 | struct { |
| 96 | char *zCPTarget; /* Hash for cherry-picked version w/ +|- prefix */ |
| 97 | char *zCPBase; /* Hash for cherry-pick baseline. NULL for singletons */ |
| 98 | } *aCherrypick; |
| 99 | int nCChild; /* Number of cluster children */ |
| 100 | int nCChildAlloc; /* Number of closts allocated in azCChild[] */ |
| 101 | char **azCChild; /* Hashes of referenced objects in a cluster. M cards */ |
| 102 | int nTag; /* Number of T Cards */ |
| 103 | int nTagAlloc; /* Slots allocated in aTag[] */ |
| 104 | struct TagType { |
| 105 | char *zName; /* Name of the tag */ |
| 106 | char *zUuid; /* Hash of artifact that the tag is applied to */ |
| 107 | char *zValue; /* Value if the tag is really a property */ |
| 108 | } *aTag; /* One for each T card */ |
| 109 | int nField; /* Number of J cards */ |
| 110 | int nFieldAlloc; /* Slots allocated in aField[] */ |
| 111 | struct { |
| @@ -361,11 +361,11 @@ | |
| 361 | char *z; |
| 362 | int n; |
| 363 | char *zUuid; |
| 364 | int sz = 0; |
| 365 | int isRepeat, hasSelfRefTag = 0; |
| 366 | Blob bHname = BLOB_INITIALIZER; |
| 367 | static Bag seen; |
| 368 | const char *zErr = 0; |
| 369 | |
| 370 | if( rid==0 ){ |
| 371 | isRepeat = 1; |
| @@ -406,14 +406,14 @@ | |
| 406 | blob_reset(pContent); |
| 407 | blob_appendf(pErr, "incorrect Z-card cksum"); |
| 408 | return 0; |
| 409 | } |
| 410 | |
| 411 | /* Store the artifact hash (before modifying the blob) only for error |
| 412 | ** reporting purposes. |
| 413 | */ |
| 414 | sha1sum_blob(pContent, &bHname); |
| 415 | |
| 416 | /* Allocate a Manifest object to hold the parsed control artifact. |
| 417 | */ |
| 418 | p = fossil_malloc( sizeof(*p) ); |
| 419 | memset(p, 0, sizeof(*p)); |
| @@ -449,15 +449,15 @@ | |
| 449 | defossilize(zName); |
| 450 | if( !file_is_simple_pathname(zName, 0) ){ |
| 451 | SYNTAX("invalid filename on A-card"); |
| 452 | } |
| 453 | defossilize(zTarget); |
| 454 | if( hname_validate(zTarget,nTarget)==HNAME_NONE |
| 455 | && !wiki_name_is_wellformed((const unsigned char *)zTarget) ){ |
| 456 | SYNTAX("invalid target on A-card"); |
| 457 | } |
| 458 | if( zSrc && hname_validate(zSrc,nSrc)==HNAME_NONE ){ |
| 459 | SYNTAX("invalid source on A-card"); |
| 460 | } |
| 461 | p->zAttachName = (char*)file_tail(zName); |
| 462 | p->zAttachSrc = zSrc; |
| 463 | p->zAttachTarget = zTarget; |
| @@ -465,18 +465,18 @@ | |
| 465 | } |
| 466 | |
| 467 | /* |
| 468 | ** B <uuid> |
| 469 | ** |
| 470 | ** A B-line gives the artifact hash for the baseline of a delta-manifest. |
| 471 | */ |
| 472 | case 'B': { |
| 473 | if( p->zBaseline ) SYNTAX("more than one B-card"); |
| 474 | p->zBaseline = next_token(&x, &sz); |
| 475 | if( p->zBaseline==0 ) SYNTAX("missing hash on B-card"); |
| 476 | if( hname_validate(p->zBaseline,sz)==HNAME_NONE ){ |
| 477 | SYNTAX("invalid hash on B-card"); |
| 478 | } |
| 479 | break; |
| 480 | } |
| 481 | |
| 482 | |
| @@ -522,12 +522,12 @@ | |
| 522 | case 'E': { |
| 523 | if( p->rEventDate>0.0 ) SYNTAX("more than one E-card"); |
| 524 | p->rEventDate = db_double(0.0,"SELECT julianday(%Q)", next_token(&x,0)); |
| 525 | if( p->rEventDate<=0.0 ) SYNTAX("malformed date on E-card"); |
| 526 | p->zEventId = next_token(&x, &sz); |
| 527 | if( hname_validate(p->zEventId, sz)==HNAME_NONE ){ |
| 528 | SYNTAX("malformed hash on E-card"); |
| 529 | } |
| 530 | break; |
| 531 | } |
| 532 | |
| 533 | /* |
| @@ -545,12 +545,13 @@ | |
| 545 | if( !file_is_simple_pathname(zName, 0) ){ |
| 546 | SYNTAX("F-card filename is not a simple path"); |
| 547 | } |
| 548 | zUuid = next_token(&x, &sz); |
| 549 | if( p->zBaseline==0 || zUuid!=0 ){ |
| 550 | if( hname_validate(zUuid,sz)==HNAME_NONE ){ |
| 551 | SYNTAX("F-card hash invalid"); |
| 552 | } |
| 553 | } |
| 554 | zPerm = next_token(&x,0); |
| 555 | zPriorName = next_token(&x,0); |
| 556 | if( zPriorName ){ |
| 557 | defossilize(zPriorName); |
| @@ -636,20 +637,21 @@ | |
| 637 | } |
| 638 | break; |
| 639 | } |
| 640 | |
| 641 | /* |
| 642 | ** M <hash> |
| 643 | ** |
| 644 | ** An M-line identifies another artifact by its hash. M-lines |
| 645 | ** occur in clusters only. |
| 646 | */ |
| 647 | case 'M': { |
| 648 | zUuid = next_token(&x, &sz); |
| 649 | if( zUuid==0 ) SYNTAX("missing hash on M-card"); |
| 650 | if( hname_validate(zUuid,sz)==HNAME_NONE ){ |
| 651 | SYNTAX("Invalid hash on M-card"); |
| 652 | } |
| 653 | if( p->nCChild>=p->nCChildAlloc ){ |
| 654 | p->nCChildAlloc = p->nCChildAlloc*2 + 10; |
| 655 | p->azCChild = fossil_realloc(p->azCChild |
| 656 | , p->nCChildAlloc*sizeof(p->azCChild[0]) ); |
| 657 | } |
| @@ -683,12 +685,13 @@ | |
| 685 | ** check-in historically has an empty P-card, so empty P-cards |
| 686 | ** must be accepted. |
| 687 | */ |
| 688 | case 'P': { |
| 689 | while( (zUuid = next_token(&x, &sz))!=0 ){ |
| 690 | if( hname_validate(zUuid, sz)==HNAME_NONE ){ |
| 691 | SYNTAX("invalid hash on P-card"); |
| 692 | } |
| 693 | if( p->nParent>=p->nParentAlloc ){ |
| 694 | p->nParentAlloc = p->nParentAlloc*2 + 5; |
| 695 | p->azParent = fossil_realloc(p->azParent, |
| 696 | p->nParentAlloc*sizeof(char*)); |
| 697 | } |
| @@ -703,29 +706,25 @@ | |
| 706 | ** |
| 707 | ** Specify one or a range of check-ins that are cherrypicked into |
| 708 | ** this check-in ("+") or backed out of this check-in ("-"). |
| 709 | */ |
| 710 | case 'Q': { |
| 711 | if( (zUuid=next_token(&x, &sz))==0 ) SYNTAX("missing hash on Q-card"); |
| 712 | if( zUuid[0]!='+' && zUuid[0]!='-' ){ |
| 713 | SYNTAX("Q-card does not begin with '+' or '-'"); |
| 714 | } |
| 715 | if( hname_validate(&zUuid[1], sz-1)==HNAME_NONE ){ |
| 716 | SYNTAX("invalid hash on Q-card"); |
| 717 | } |
| 718 | n = p->nCherrypick; |
| 719 | p->nCherrypick++; |
| 720 | p->aCherrypick = fossil_realloc(p->aCherrypick, |
| 721 | p->nCherrypick*sizeof(p->aCherrypick[0])); |
| 722 | p->aCherrypick[n].zCPTarget = zUuid; |
| 723 | p->aCherrypick[n].zCPBase = zUuid = next_token(&x, &sz); |
| 724 | if( zUuid && hname_validate(zUuid,sz)==HNAME_NONE ){ |
| 725 | SYNTAX("invalid second hash on Q-card"); |
| 726 | } |
| 727 | break; |
| 728 | } |
| 729 | |
| 730 | /* |
| @@ -760,32 +759,32 @@ | |
| 759 | case 'T': { |
| 760 | char *zName, *zValue; |
| 761 | zName = next_token(&x, 0); |
| 762 | if( zName==0 ) SYNTAX("missing name on T-card"); |
| 763 | zUuid = next_token(&x, &sz); |
| 764 | if( zUuid==0 ) SYNTAX("missing artifact hash on T-card"); |
| 765 | zValue = next_token(&x, 0); |
| 766 | if( zValue ) defossilize(zValue); |
| 767 | if( hname_validate(zUuid, sz)!=HNAME_NONE ){ |
| 768 | /* A valid artifact hash */ |
| 769 | if( p->zEventId ) SYNTAX("non-self-referential T-card in event"); |
| 770 | }else if( sz==1 && zUuid[0]=='*' ){ |
| 771 | zUuid = 0; |
| 772 | hasSelfRefTag = 1; |
| 773 | if( p->zEventId && zName[0]!='+' ){ |
| 774 | SYNTAX("propagating T-card in event"); |
| 775 | } |
| 776 | }else{ |
| 777 | SYNTAX("malformed artifact hash on T-card"); |
| 778 | } |
| 779 | defossilize(zName); |
| 780 | if( zName[0]!='-' && zName[0]!='+' && zName[0]!='*' ){ |
| 781 | SYNTAX("T-card name does not begin with '-', '+', or '*'"); |
| 782 | } |
| 783 | if( validate16(&zName[1], strlen(&zName[1])) ){ |
| 784 | /* Do not allow tags whose names look like a hash */ |
| 785 | SYNTAX("T-card name looks like a hexadecimal hash"); |
| 786 | } |
| 787 | if( p->nTag>=p->nTagAlloc ){ |
| 788 | p->nTagAlloc = p->nTagAlloc*2 + 10; |
| 789 | p->aTag = fossil_realloc(p->aTag, p->nTagAlloc*sizeof(p->aTag[0]) ); |
| 790 | } |
| @@ -951,17 +950,17 @@ | |
| 950 | if( !seenZ ) SYNTAX("missing Z-card on control"); |
| 951 | p->type = CFTYPE_CONTROL; |
| 952 | } |
| 953 | md5sum_init(); |
| 954 | if( !isRepeat ) g.parseCnt[p->type]++; |
| 955 | blob_reset(&bHname); |
| 956 | return p; |
| 957 | |
| 958 | manifest_syntax_error: |
| 959 | if(bHname.nUsed){ |
| 960 | blob_appendf(pErr, "manifest [%s] ", blob_str(&bHname)); |
| 961 | blob_reset(&bHname); |
| 962 | } |
| 963 | if( zErr ){ |
| 964 | blob_appendf(pErr, "line %d: %s", lineNo, zErr); |
| 965 | }else{ |
| 966 | blob_appendf(pErr, "unknown error on line %d", lineNo); |
| @@ -1193,13 +1192,13 @@ | |
| 1192 | ** then the mlink entry is only created if there is already an mlink |
| 1193 | ** from primary parent for the same file. |
| 1194 | */ |
| 1195 | static void add_one_mlink( |
| 1196 | int pmid, /* The parent manifest */ |
| 1197 | const char *zFromUuid, /* Artifact hash for content in parent */ |
| 1198 | int mid, /* The record ID of the manifest */ |
| 1199 | const char *zToUuid, /* artifact hash for content in child */ |
| 1200 | const char *zFilename, /* Filename */ |
| 1201 | const char *zPrior, /* Previous filename. NULL if unchanged */ |
| 1202 | int isPublic, /* True if mid is not a private manifest */ |
| 1203 | int isPrimary, /* pmid is the primary parent of mid */ |
| 1204 | int mperm /* 1: exec, 2: symlink */ |
| @@ -1545,22 +1544,22 @@ | |
| 1544 | } |
| 1545 | } |
| 1546 | |
| 1547 | /* |
| 1548 | ** For a check-in with RID "rid" that has nParent parent check-ins given |
| 1549 | ** by the hashes in azParent[], create all appropriate plink and mlink table |
| 1550 | ** entries. |
| 1551 | ** |
| 1552 | ** The primary parent is the first hash on the azParent[] list. |
| 1553 | ** |
| 1554 | ** Return the RID of the primary parent. |
| 1555 | */ |
| 1556 | static int manifest_add_checkin_linkages( |
| 1557 | int rid, /* The RID of the check-in */ |
| 1558 | Manifest *p, /* Manifest for this check-in */ |
| 1559 | int nParent, /* Number of parents for this check-in */ |
| 1560 | char **azParent /* hashes for each parent */ |
| 1561 | ){ |
| 1562 | int i; |
| 1563 | int parentid = 0; |
| 1564 | char zBaseId[30]; /* Baseline manifest RID for deltas. "NULL" otherwise */ |
| 1565 | Stmt q; |
| @@ -1611,33 +1610,36 @@ | |
| 1610 | return parentid; |
| 1611 | } |
| 1612 | |
| 1613 | /* |
| 1614 | ** There exists a "parent" tag against checkin rid that has value zValue. |
| 1615 | ** If value is well-formed (meaning that it is a list of hashes), then use |
| 1616 | ** zValue to reparent check-in rid. |
| 1617 | */ |
| 1618 | void manifest_reparent_checkin(int rid, const char *zValue){ |
| 1619 | int nParent = 0; |
| 1620 | char *zCopy = 0; |
| 1621 | char **azParent = 0; |
| 1622 | Manifest *p = 0; |
| 1623 | int i, j; |
| 1624 | int n = (int)strlen(zValue); |
| 1625 | int mxParent = (n+1)/(HNAME_LEN_MIN+1); |
| 1626 | |
| 1627 | if( mxParent<1 ) return; |
| 1628 | zCopy = fossil_strdup(zValue); |
| 1629 | azParent = fossil_malloc( sizeof(azParent[0])*mxParent ); |
| 1630 | for(nParent=0, i=0; zCopy[i]; i++){ |
| 1631 | char *z = &zCopy[i]; |
| 1632 | azParent[nParent++] = z; |
| 1633 | if( nParent>mxParent ) goto reparent_abort; |
| 1634 | for(j=HNAME_LEN_MIN; z[j]>' '; j++){} |
| 1635 | if( hname_validate(z, j)==HNAME_NONE ) goto reparent_abort; |
| 1636 | if( z[j]==0 ) break; |
| 1637 | z[j] = 0; |
| 1638 | i += j; |
| 1639 | } |
| 1640 | if( !db_exists("SELECT 1 FROM plink WHERE cid=%d AND pid=%d", |
| 1641 | rid, uuid_to_rid(azParent[0],0)) |
| 1642 | ){ |
| 1643 | p = manifest_get(rid, CFTYPE_MANIFEST, 0); |
| 1644 | } |
| 1645 | if( p!=0 ){ |
| @@ -1647,10 +1649,11 @@ | |
| 1649 | rid, rid |
| 1650 | ); |
| 1651 | manifest_add_checkin_linkages(rid,p,nParent,azParent); |
| 1652 | } |
| 1653 | manifest_destroy(p); |
| 1654 | reparent_abort: |
| 1655 | fossil_free(azParent); |
| 1656 | fossil_free(zCopy); |
| 1657 | } |
| 1658 | |
| 1659 | /* |
| @@ -2280,11 +2283,11 @@ | |
| 2283 | int branchMove = 0; |
| 2284 | blob_zero(&comment); |
| 2285 | if( p->zComment ){ |
| 2286 | blob_appendf(&comment, " %s.", p->zComment); |
| 2287 | } |
| 2288 | /* Next loop expects tags to be sorted on hash, so sort it. */ |
| 2289 | qsort(p->aTag, p->nTag, sizeof(p->aTag[0]), tag_compare); |
| 2290 | for(i=0; i<p->nTag; i++){ |
| 2291 | zTagUuid = p->aTag[i].zUuid; |
| 2292 | if( !zTagUuid ) continue; |
| 2293 | if( i==0 || fossil_strcmp(zTagUuid, p->aTag[i-1].zUuid)!=0 ){ |
| 2294 |
+17
-21
| --- src/name.c | ||
| +++ src/name.c | ||
| @@ -2,11 +2,11 @@ | ||
| 2 | 2 | ** Copyright (c) 2006 D. Richard Hipp |
| 3 | 3 | ** |
| 4 | 4 | ** This program is free software; you can redistribute it and/or |
| 5 | 5 | ** modify it under the terms of the Simplified BSD License (also |
| 6 | 6 | ** known as the "2-Clause License" or "FreeBSD License".) |
| 7 | - | |
| 7 | +** | |
| 8 | 8 | ** This program is distributed in the hope that it will be useful, |
| 9 | 9 | ** but without any warranty; without even the implied warranty of |
| 10 | 10 | ** merchantability or fitness for a particular purpose. |
| 11 | 11 | ** |
| 12 | 12 | ** Author contact information: |
| @@ -13,15 +13,11 @@ | ||
| 13 | 13 | ** [email protected] |
| 14 | 14 | ** http://www.hwaci.com/drh/ |
| 15 | 15 | ** |
| 16 | 16 | ******************************************************************************* |
| 17 | 17 | ** |
| 18 | -** This file contains code used to convert user-supplied object names into | |
| 19 | -** canonical UUIDs. | |
| 20 | -** | |
| 21 | -** A user-supplied object name is any unique prefix of a valid UUID but | |
| 22 | -** not necessarily in canonical form. | |
| 18 | +** This file contains code used to resolved user-supplied object names. | |
| 23 | 19 | */ |
| 24 | 20 | #include "config.h" |
| 25 | 21 | #include "name.h" |
| 26 | 22 | #include <assert.h> |
| 27 | 23 | |
| @@ -80,12 +76,12 @@ | ||
| 80 | 76 | } |
| 81 | 77 | |
| 82 | 78 | /* |
| 83 | 79 | ** Convert a symbolic name into a RID. Acceptable forms: |
| 84 | 80 | ** |
| 85 | -** * SHA1 hash | |
| 86 | -** * SHA1 hash prefix of at least 4 characters | |
| 81 | +** * artifact hash | |
| 82 | +** * 4-character or larger prefix of a artifact | |
| 87 | 83 | ** * Symbolic Name |
| 88 | 84 | ** * "tag:" + symbolic name |
| 89 | 85 | ** * Date or date-time |
| 90 | 86 | ** * "date:" + Date or date-time |
| 91 | 87 | ** * symbolic-name ":" date-time |
| @@ -232,14 +228,14 @@ | ||
| 232 | 228 | zTagBase, zDate, zType |
| 233 | 229 | ); |
| 234 | 230 | return rid; |
| 235 | 231 | } |
| 236 | 232 | |
| 237 | - /* SHA1 hash or prefix */ | |
| 238 | - if( nTag>=4 && nTag<=UUID_SIZE && validate16(zTag, nTag) ){ | |
| 233 | + /* artifact hash or prefix */ | |
| 234 | + if( nTag>=4 && nTag<=HNAME_LEN_MAX && validate16(zTag, nTag) ){ | |
| 239 | 235 | Stmt q; |
| 240 | - char zUuid[UUID_SIZE+1]; | |
| 236 | + char zUuid[HNAME_LEN_MAX+1]; | |
| 241 | 237 | memcpy(zUuid, zTag, nTag+1); |
| 242 | 238 | canonical16(zUuid, nTag); |
| 243 | 239 | rid = 0; |
| 244 | 240 | if( zType[0]=='*' ){ |
| 245 | 241 | db_prepare(&q, "SELECT rid FROM blob WHERE uuid GLOB '%q*'", zUuid); |
| @@ -354,11 +350,11 @@ | ||
| 354 | 350 | */ |
| 355 | 351 | int name_collisions(const char *zName){ |
| 356 | 352 | int c = 0; /* count of collisions for zName */ |
| 357 | 353 | int nLen; /* length of zName */ |
| 358 | 354 | nLen = strlen(zName); |
| 359 | - if( nLen>=4 && nLen<=UUID_SIZE && validate16(zName, nLen) ){ | |
| 355 | + if( nLen>=4 && nLen<=HNAME_LEN_MAX && validate16(zName, nLen) ){ | |
| 360 | 356 | c = db_int(0, |
| 361 | 357 | "SELECT" |
| 362 | 358 | " (SELECT count(*) FROM ticket" |
| 363 | 359 | " WHERE tkt_uuid GLOB '%q*') +" |
| 364 | 360 | " (SELECT count(*) FROM tag" |
| @@ -396,11 +392,11 @@ | ||
| 396 | 392 | |
| 397 | 393 | /* |
| 398 | 394 | ** Convert a name to a rid. If the name can be any of the various forms |
| 399 | 395 | ** accepted: |
| 400 | 396 | ** |
| 401 | -** * SHA1 hash or prefix thereof | |
| 397 | +** * artifact hash or prefix thereof | |
| 402 | 398 | ** * symbolic name |
| 403 | 399 | ** * date |
| 404 | 400 | ** * label:date |
| 405 | 401 | ** * prev, previous |
| 406 | 402 | ** * next |
| @@ -425,13 +421,13 @@ | ||
| 425 | 421 | return name_to_typed_rid(zName, "*"); |
| 426 | 422 | } |
| 427 | 423 | |
| 428 | 424 | /* |
| 429 | 425 | ** WEBPAGE: ambiguous |
| 430 | -** URL: /ambiguous?name=UUID&src=WEBPAGE | |
| 426 | +** URL: /ambiguous?name=NAME&src=WEBPAGE | |
| 431 | 427 | ** |
| 432 | -** The UUID given by the name parameter is ambiguous. Display a page | |
| 428 | +** The NAME given by the name parameter is ambiguous. Display a page | |
| 433 | 429 | ** that shows all possible choices and let the user select between them. |
| 434 | 430 | */ |
| 435 | 431 | void ambiguous_page(void){ |
| 436 | 432 | Stmt q; |
| 437 | 433 | const char *zName = P("name"); |
| @@ -1154,26 +1150,26 @@ | ||
| 1154 | 1150 | */ |
| 1155 | 1151 | static void collision_report(const char *zSql){ |
| 1156 | 1152 | int i, j, kk; |
| 1157 | 1153 | int nHash = 0; |
| 1158 | 1154 | Stmt q; |
| 1159 | - char zPrev[UUID_SIZE+1]; | |
| 1155 | + char zPrev[HNAME_LEN_MAX+1]; | |
| 1160 | 1156 | struct { |
| 1161 | 1157 | int cnt; |
| 1162 | 1158 | char *azHit[MAX_COLLIDE]; |
| 1163 | - char z[UUID_SIZE+1]; | |
| 1164 | - } aCollide[UUID_SIZE+1]; | |
| 1159 | + char z[HNAME_LEN_MAX+1]; | |
| 1160 | + } aCollide[HNAME_LEN_MAX+1]; | |
| 1165 | 1161 | memset(aCollide, 0, sizeof(aCollide)); |
| 1166 | 1162 | memset(zPrev, 0, sizeof(zPrev)); |
| 1167 | 1163 | db_prepare(&q,"%s",zSql/*safe-for-%s*/); |
| 1168 | 1164 | while( db_step(&q)==SQLITE_ROW ){ |
| 1169 | 1165 | const char *zUuid = db_column_text(&q,0); |
| 1170 | 1166 | int n = db_column_bytes(&q,0); |
| 1171 | 1167 | int i; |
| 1172 | 1168 | nHash++; |
| 1173 | 1169 | for(i=0; zPrev[i] && zPrev[i]==zUuid[i]; i++){} |
| 1174 | - if( i>0 && i<=UUID_SIZE ){ | |
| 1170 | + if( i>0 && i<=HNAME_LEN_MAX ){ | |
| 1175 | 1171 | if( i>=4 && aCollide[i].cnt<MAX_COLLIDE ){ |
| 1176 | 1172 | aCollide[i].azHit[aCollide[i].cnt] = mprintf("%.*s", i, zPrev); |
| 1177 | 1173 | } |
| 1178 | 1174 | aCollide[i].cnt++; |
| 1179 | 1175 | if( aCollide[i].z[0]==0 ) memcpy(aCollide[i].z, zPrev, n+1); |
| @@ -1182,18 +1178,18 @@ | ||
| 1182 | 1178 | } |
| 1183 | 1179 | db_finalize(&q); |
| 1184 | 1180 | @ <table border=1><thead> |
| 1185 | 1181 | @ <tr><th>Length<th>Instances<th>First Instance</tr> |
| 1186 | 1182 | @ </thead><tbody> |
| 1187 | - for(i=1; i<=UUID_SIZE; i++){ | |
| 1183 | + for(i=1; i<=HNAME_LEN_MAX; i++){ | |
| 1188 | 1184 | if( aCollide[i].cnt==0 ) continue; |
| 1189 | 1185 | @ <tr><td>%d(i)<td>%d(aCollide[i].cnt)<td>%h(aCollide[i].z)</tr> |
| 1190 | 1186 | } |
| 1191 | 1187 | @ </tbody></table> |
| 1192 | 1188 | @ <p>Total number of hashes: %d(nHash)</p> |
| 1193 | 1189 | kk = 0; |
| 1194 | - for(i=UUID_SIZE; i>=4; i--){ | |
| 1190 | + for(i=HNAME_LEN_MAX; i>=4; i--){ | |
| 1195 | 1191 | if( aCollide[i].cnt==0 ) continue; |
| 1196 | 1192 | if( aCollide[i].cnt>200 ) break; |
| 1197 | 1193 | kk += aCollide[i].cnt; |
| 1198 | 1194 | if( aCollide[i].cnt<25 ){ |
| 1199 | 1195 | @ <p>Collisions of length %d(i): |
| 1200 | 1196 |
| --- src/name.c | |
| +++ src/name.c | |
| @@ -2,11 +2,11 @@ | |
| 2 | ** Copyright (c) 2006 D. Richard Hipp |
| 3 | ** |
| 4 | ** This program is free software; you can redistribute it and/or |
| 5 | ** modify it under the terms of the Simplified BSD License (also |
| 6 | ** known as the "2-Clause License" or "FreeBSD License".) |
| 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. |
| 11 | ** |
| 12 | ** Author contact information: |
| @@ -13,15 +13,11 @@ | |
| 13 | ** [email protected] |
| 14 | ** http://www.hwaci.com/drh/ |
| 15 | ** |
| 16 | ******************************************************************************* |
| 17 | ** |
| 18 | ** This file contains code used to convert user-supplied object names into |
| 19 | ** canonical UUIDs. |
| 20 | ** |
| 21 | ** A user-supplied object name is any unique prefix of a valid UUID but |
| 22 | ** not necessarily in canonical form. |
| 23 | */ |
| 24 | #include "config.h" |
| 25 | #include "name.h" |
| 26 | #include <assert.h> |
| 27 | |
| @@ -80,12 +76,12 @@ | |
| 80 | } |
| 81 | |
| 82 | /* |
| 83 | ** Convert a symbolic name into a RID. Acceptable forms: |
| 84 | ** |
| 85 | ** * SHA1 hash |
| 86 | ** * SHA1 hash prefix of at least 4 characters |
| 87 | ** * Symbolic Name |
| 88 | ** * "tag:" + symbolic name |
| 89 | ** * Date or date-time |
| 90 | ** * "date:" + Date or date-time |
| 91 | ** * symbolic-name ":" date-time |
| @@ -232,14 +228,14 @@ | |
| 232 | zTagBase, zDate, zType |
| 233 | ); |
| 234 | return rid; |
| 235 | } |
| 236 | |
| 237 | /* SHA1 hash or prefix */ |
| 238 | if( nTag>=4 && nTag<=UUID_SIZE && validate16(zTag, nTag) ){ |
| 239 | Stmt q; |
| 240 | char zUuid[UUID_SIZE+1]; |
| 241 | memcpy(zUuid, zTag, nTag+1); |
| 242 | canonical16(zUuid, nTag); |
| 243 | rid = 0; |
| 244 | if( zType[0]=='*' ){ |
| 245 | db_prepare(&q, "SELECT rid FROM blob WHERE uuid GLOB '%q*'", zUuid); |
| @@ -354,11 +350,11 @@ | |
| 354 | */ |
| 355 | int name_collisions(const char *zName){ |
| 356 | int c = 0; /* count of collisions for zName */ |
| 357 | int nLen; /* length of zName */ |
| 358 | nLen = strlen(zName); |
| 359 | if( nLen>=4 && nLen<=UUID_SIZE && validate16(zName, nLen) ){ |
| 360 | c = db_int(0, |
| 361 | "SELECT" |
| 362 | " (SELECT count(*) FROM ticket" |
| 363 | " WHERE tkt_uuid GLOB '%q*') +" |
| 364 | " (SELECT count(*) FROM tag" |
| @@ -396,11 +392,11 @@ | |
| 396 | |
| 397 | /* |
| 398 | ** Convert a name to a rid. If the name can be any of the various forms |
| 399 | ** accepted: |
| 400 | ** |
| 401 | ** * SHA1 hash or prefix thereof |
| 402 | ** * symbolic name |
| 403 | ** * date |
| 404 | ** * label:date |
| 405 | ** * prev, previous |
| 406 | ** * next |
| @@ -425,13 +421,13 @@ | |
| 425 | return name_to_typed_rid(zName, "*"); |
| 426 | } |
| 427 | |
| 428 | /* |
| 429 | ** WEBPAGE: ambiguous |
| 430 | ** URL: /ambiguous?name=UUID&src=WEBPAGE |
| 431 | ** |
| 432 | ** The UUID given by the name parameter is ambiguous. Display a page |
| 433 | ** that shows all possible choices and let the user select between them. |
| 434 | */ |
| 435 | void ambiguous_page(void){ |
| 436 | Stmt q; |
| 437 | const char *zName = P("name"); |
| @@ -1154,26 +1150,26 @@ | |
| 1154 | */ |
| 1155 | static void collision_report(const char *zSql){ |
| 1156 | int i, j, kk; |
| 1157 | int nHash = 0; |
| 1158 | Stmt q; |
| 1159 | char zPrev[UUID_SIZE+1]; |
| 1160 | struct { |
| 1161 | int cnt; |
| 1162 | char *azHit[MAX_COLLIDE]; |
| 1163 | char z[UUID_SIZE+1]; |
| 1164 | } aCollide[UUID_SIZE+1]; |
| 1165 | memset(aCollide, 0, sizeof(aCollide)); |
| 1166 | memset(zPrev, 0, sizeof(zPrev)); |
| 1167 | db_prepare(&q,"%s",zSql/*safe-for-%s*/); |
| 1168 | while( db_step(&q)==SQLITE_ROW ){ |
| 1169 | const char *zUuid = db_column_text(&q,0); |
| 1170 | int n = db_column_bytes(&q,0); |
| 1171 | int i; |
| 1172 | nHash++; |
| 1173 | for(i=0; zPrev[i] && zPrev[i]==zUuid[i]; i++){} |
| 1174 | if( i>0 && i<=UUID_SIZE ){ |
| 1175 | if( i>=4 && aCollide[i].cnt<MAX_COLLIDE ){ |
| 1176 | aCollide[i].azHit[aCollide[i].cnt] = mprintf("%.*s", i, zPrev); |
| 1177 | } |
| 1178 | aCollide[i].cnt++; |
| 1179 | if( aCollide[i].z[0]==0 ) memcpy(aCollide[i].z, zPrev, n+1); |
| @@ -1182,18 +1178,18 @@ | |
| 1182 | } |
| 1183 | db_finalize(&q); |
| 1184 | @ <table border=1><thead> |
| 1185 | @ <tr><th>Length<th>Instances<th>First Instance</tr> |
| 1186 | @ </thead><tbody> |
| 1187 | for(i=1; i<=UUID_SIZE; i++){ |
| 1188 | if( aCollide[i].cnt==0 ) continue; |
| 1189 | @ <tr><td>%d(i)<td>%d(aCollide[i].cnt)<td>%h(aCollide[i].z)</tr> |
| 1190 | } |
| 1191 | @ </tbody></table> |
| 1192 | @ <p>Total number of hashes: %d(nHash)</p> |
| 1193 | kk = 0; |
| 1194 | for(i=UUID_SIZE; i>=4; i--){ |
| 1195 | if( aCollide[i].cnt==0 ) continue; |
| 1196 | if( aCollide[i].cnt>200 ) break; |
| 1197 | kk += aCollide[i].cnt; |
| 1198 | if( aCollide[i].cnt<25 ){ |
| 1199 | @ <p>Collisions of length %d(i): |
| 1200 |
| --- src/name.c | |
| +++ src/name.c | |
| @@ -2,11 +2,11 @@ | |
| 2 | ** Copyright (c) 2006 D. Richard Hipp |
| 3 | ** |
| 4 | ** This program is free software; you can redistribute it and/or |
| 5 | ** modify it under the terms of the Simplified BSD License (also |
| 6 | ** known as the "2-Clause License" or "FreeBSD License".) |
| 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. |
| 11 | ** |
| 12 | ** Author contact information: |
| @@ -13,15 +13,11 @@ | |
| 13 | ** [email protected] |
| 14 | ** http://www.hwaci.com/drh/ |
| 15 | ** |
| 16 | ******************************************************************************* |
| 17 | ** |
| 18 | ** This file contains code used to resolved user-supplied object names. |
| 19 | */ |
| 20 | #include "config.h" |
| 21 | #include "name.h" |
| 22 | #include <assert.h> |
| 23 | |
| @@ -80,12 +76,12 @@ | |
| 76 | } |
| 77 | |
| 78 | /* |
| 79 | ** Convert a symbolic name into a RID. Acceptable forms: |
| 80 | ** |
| 81 | ** * artifact hash |
| 82 | ** * 4-character or larger prefix of a artifact |
| 83 | ** * Symbolic Name |
| 84 | ** * "tag:" + symbolic name |
| 85 | ** * Date or date-time |
| 86 | ** * "date:" + Date or date-time |
| 87 | ** * symbolic-name ":" date-time |
| @@ -232,14 +228,14 @@ | |
| 228 | zTagBase, zDate, zType |
| 229 | ); |
| 230 | return rid; |
| 231 | } |
| 232 | |
| 233 | /* artifact hash or prefix */ |
| 234 | if( nTag>=4 && nTag<=HNAME_LEN_MAX && validate16(zTag, nTag) ){ |
| 235 | Stmt q; |
| 236 | char zUuid[HNAME_LEN_MAX+1]; |
| 237 | memcpy(zUuid, zTag, nTag+1); |
| 238 | canonical16(zUuid, nTag); |
| 239 | rid = 0; |
| 240 | if( zType[0]=='*' ){ |
| 241 | db_prepare(&q, "SELECT rid FROM blob WHERE uuid GLOB '%q*'", zUuid); |
| @@ -354,11 +350,11 @@ | |
| 350 | */ |
| 351 | int name_collisions(const char *zName){ |
| 352 | int c = 0; /* count of collisions for zName */ |
| 353 | int nLen; /* length of zName */ |
| 354 | nLen = strlen(zName); |
| 355 | if( nLen>=4 && nLen<=HNAME_LEN_MAX && validate16(zName, nLen) ){ |
| 356 | c = db_int(0, |
| 357 | "SELECT" |
| 358 | " (SELECT count(*) FROM ticket" |
| 359 | " WHERE tkt_uuid GLOB '%q*') +" |
| 360 | " (SELECT count(*) FROM tag" |
| @@ -396,11 +392,11 @@ | |
| 392 | |
| 393 | /* |
| 394 | ** Convert a name to a rid. If the name can be any of the various forms |
| 395 | ** accepted: |
| 396 | ** |
| 397 | ** * artifact hash or prefix thereof |
| 398 | ** * symbolic name |
| 399 | ** * date |
| 400 | ** * label:date |
| 401 | ** * prev, previous |
| 402 | ** * next |
| @@ -425,13 +421,13 @@ | |
| 421 | return name_to_typed_rid(zName, "*"); |
| 422 | } |
| 423 | |
| 424 | /* |
| 425 | ** WEBPAGE: ambiguous |
| 426 | ** URL: /ambiguous?name=NAME&src=WEBPAGE |
| 427 | ** |
| 428 | ** The NAME given by the name parameter is ambiguous. Display a page |
| 429 | ** that shows all possible choices and let the user select between them. |
| 430 | */ |
| 431 | void ambiguous_page(void){ |
| 432 | Stmt q; |
| 433 | const char *zName = P("name"); |
| @@ -1154,26 +1150,26 @@ | |
| 1150 | */ |
| 1151 | static void collision_report(const char *zSql){ |
| 1152 | int i, j, kk; |
| 1153 | int nHash = 0; |
| 1154 | Stmt q; |
| 1155 | char zPrev[HNAME_LEN_MAX+1]; |
| 1156 | struct { |
| 1157 | int cnt; |
| 1158 | char *azHit[MAX_COLLIDE]; |
| 1159 | char z[HNAME_LEN_MAX+1]; |
| 1160 | } aCollide[HNAME_LEN_MAX+1]; |
| 1161 | memset(aCollide, 0, sizeof(aCollide)); |
| 1162 | memset(zPrev, 0, sizeof(zPrev)); |
| 1163 | db_prepare(&q,"%s",zSql/*safe-for-%s*/); |
| 1164 | while( db_step(&q)==SQLITE_ROW ){ |
| 1165 | const char *zUuid = db_column_text(&q,0); |
| 1166 | int n = db_column_bytes(&q,0); |
| 1167 | int i; |
| 1168 | nHash++; |
| 1169 | for(i=0; zPrev[i] && zPrev[i]==zUuid[i]; i++){} |
| 1170 | if( i>0 && i<=HNAME_LEN_MAX ){ |
| 1171 | if( i>=4 && aCollide[i].cnt<MAX_COLLIDE ){ |
| 1172 | aCollide[i].azHit[aCollide[i].cnt] = mprintf("%.*s", i, zPrev); |
| 1173 | } |
| 1174 | aCollide[i].cnt++; |
| 1175 | if( aCollide[i].z[0]==0 ) memcpy(aCollide[i].z, zPrev, n+1); |
| @@ -1182,18 +1178,18 @@ | |
| 1178 | } |
| 1179 | db_finalize(&q); |
| 1180 | @ <table border=1><thead> |
| 1181 | @ <tr><th>Length<th>Instances<th>First Instance</tr> |
| 1182 | @ </thead><tbody> |
| 1183 | for(i=1; i<=HNAME_LEN_MAX; i++){ |
| 1184 | if( aCollide[i].cnt==0 ) continue; |
| 1185 | @ <tr><td>%d(i)<td>%d(aCollide[i].cnt)<td>%h(aCollide[i].z)</tr> |
| 1186 | } |
| 1187 | @ </tbody></table> |
| 1188 | @ <p>Total number of hashes: %d(nHash)</p> |
| 1189 | kk = 0; |
| 1190 | for(i=HNAME_LEN_MAX; i>=4; i--){ |
| 1191 | if( aCollide[i].cnt==0 ) continue; |
| 1192 | if( aCollide[i].cnt>200 ) break; |
| 1193 | kk += aCollide[i].cnt; |
| 1194 | if( aCollide[i].cnt<25 ){ |
| 1195 | @ <p>Collisions of length %d(i): |
| 1196 |
+16
| --- src/sha1.c | ||
| +++ src/sha1.c | ||
| @@ -1,6 +1,22 @@ | ||
| 1 | 1 | /* |
| 2 | +** Copyright (c) 2006 D. Richard Hipp | |
| 3 | +** | |
| 4 | +** This program is free software; you can redistribute it and/or | |
| 5 | +** modify it under the terms of the Simplified BSD License (also | |
| 6 | +** known as the "2-Clause License" or "FreeBSD License".) | |
| 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. | |
| 11 | +** | |
| 12 | +** Author contact information: | |
| 13 | +** [email protected] | |
| 14 | +** http://www.hwaci.com/drh/ | |
| 15 | +** | |
| 16 | +******************************************************************************* | |
| 17 | +** | |
| 2 | 18 | ** This implementation of SHA1. |
| 3 | 19 | */ |
| 4 | 20 | #include "config.h" |
| 5 | 21 | #include <sys/types.h> |
| 6 | 22 | #include "sha1.h" |
| 7 | 23 |
| --- src/sha1.c | |
| +++ src/sha1.c | |
| @@ -1,6 +1,22 @@ | |
| 1 | /* |
| 2 | ** This implementation of SHA1. |
| 3 | */ |
| 4 | #include "config.h" |
| 5 | #include <sys/types.h> |
| 6 | #include "sha1.h" |
| 7 |
| --- src/sha1.c | |
| +++ src/sha1.c | |
| @@ -1,6 +1,22 @@ | |
| 1 | /* |
| 2 | ** Copyright (c) 2006 D. Richard Hipp |
| 3 | ** |
| 4 | ** This program is free software; you can redistribute it and/or |
| 5 | ** modify it under the terms of the Simplified BSD License (also |
| 6 | ** known as the "2-Clause License" or "FreeBSD License".) |
| 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. |
| 11 | ** |
| 12 | ** Author contact information: |
| 13 | ** [email protected] |
| 14 | ** http://www.hwaci.com/drh/ |
| 15 | ** |
| 16 | ******************************************************************************* |
| 17 | ** |
| 18 | ** This implementation of SHA1. |
| 19 | */ |
| 20 | #include "config.h" |
| 21 | #include <sys/types.h> |
| 22 | #include "sha1.h" |
| 23 |
+16
| --- src/sha3.c | ||
| +++ src/sha3.c | ||
| @@ -1,6 +1,22 @@ | ||
| 1 | 1 | /* |
| 2 | +** Copyright (c) 2017 D. Richard Hipp | |
| 3 | +** | |
| 4 | +** This program is free software; you can redistribute it and/or | |
| 5 | +** modify it under the terms of the Simplified BSD License (also | |
| 6 | +** known as the "2-Clause License" or "FreeBSD License".) | |
| 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. | |
| 11 | +** | |
| 12 | +** Author contact information: | |
| 13 | +** [email protected] | |
| 14 | +** http://www.hwaci.com/drh/ | |
| 15 | +** | |
| 16 | +******************************************************************************* | |
| 17 | +** | |
| 2 | 18 | ** This file contains an implementation of SHA3 (Keccak) hashing. |
| 3 | 19 | */ |
| 4 | 20 | #include "config.h" |
| 5 | 21 | #include "sha3.h" |
| 6 | 22 | |
| 7 | 23 |
| --- src/sha3.c | |
| +++ src/sha3.c | |
| @@ -1,6 +1,22 @@ | |
| 1 | /* |
| 2 | ** This file contains an implementation of SHA3 (Keccak) hashing. |
| 3 | */ |
| 4 | #include "config.h" |
| 5 | #include "sha3.h" |
| 6 | |
| 7 |
| --- src/sha3.c | |
| +++ src/sha3.c | |
| @@ -1,6 +1,22 @@ | |
| 1 | /* |
| 2 | ** Copyright (c) 2017 D. Richard Hipp |
| 3 | ** |
| 4 | ** This program is free software; you can redistribute it and/or |
| 5 | ** modify it under the terms of the Simplified BSD License (also |
| 6 | ** known as the "2-Clause License" or "FreeBSD License".) |
| 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. |
| 11 | ** |
| 12 | ** Author contact information: |
| 13 | ** [email protected] |
| 14 | ** http://www.hwaci.com/drh/ |
| 15 | ** |
| 16 | ******************************************************************************* |
| 17 | ** |
| 18 | ** This file contains an implementation of SHA3 (Keccak) hashing. |
| 19 | */ |
| 20 | #include "config.h" |
| 21 | #include "sha3.h" |
| 22 | |
| 23 |
+14
-14
| --- src/xfer.c | ||
| +++ src/xfer.c | ||
| @@ -129,14 +129,14 @@ | ||
| 129 | 129 | |
| 130 | 130 | isPriv = pXfer->nextIsPrivate; |
| 131 | 131 | pXfer->nextIsPrivate = 0; |
| 132 | 132 | if( pXfer->nToken<3 |
| 133 | 133 | || pXfer->nToken>4 |
| 134 | - || !blob_is_uuid(&pXfer->aToken[1]) | |
| 134 | + || !blob_is_hname(&pXfer->aToken[1]) | |
| 135 | 135 | || !blob_is_int(&pXfer->aToken[pXfer->nToken-1], &n) |
| 136 | 136 | || n<0 |
| 137 | - || (pXfer->nToken==4 && !blob_is_uuid(&pXfer->aToken[2])) | |
| 137 | + || (pXfer->nToken==4 && !blob_is_hname(&pXfer->aToken[2])) | |
| 138 | 138 | ){ |
| 139 | 139 | blob_appendf(&pXfer->err, "malformed file line"); |
| 140 | 140 | return; |
| 141 | 141 | } |
| 142 | 142 | blob_zero(&content); |
| @@ -248,15 +248,15 @@ | ||
| 248 | 248 | |
| 249 | 249 | isPriv = pXfer->nextIsPrivate; |
| 250 | 250 | pXfer->nextIsPrivate = 0; |
| 251 | 251 | if( pXfer->nToken<4 |
| 252 | 252 | || pXfer->nToken>5 |
| 253 | - || !blob_is_uuid(&pXfer->aToken[1]) | |
| 253 | + || !blob_is_hname(&pXfer->aToken[1]) | |
| 254 | 254 | || !blob_is_int(&pXfer->aToken[pXfer->nToken-2], &szU) |
| 255 | 255 | || !blob_is_int(&pXfer->aToken[pXfer->nToken-1], &szC) |
| 256 | 256 | || szC<0 || szU<0 |
| 257 | - || (pXfer->nToken==5 && !blob_is_uuid(&pXfer->aToken[2])) | |
| 257 | + || (pXfer->nToken==5 && !blob_is_hname(&pXfer->aToken[2])) | |
| 258 | 258 | ){ |
| 259 | 259 | blob_appendf(&pXfer->err, "malformed cfile line"); |
| 260 | 260 | return; |
| 261 | 261 | } |
| 262 | 262 | if( isPriv && !g.perm.Private ){ |
| @@ -321,11 +321,11 @@ | ||
| 321 | 321 | |
| 322 | 322 | pHash = &pXfer->aToken[3]; |
| 323 | 323 | if( pXfer->nToken==5 |
| 324 | 324 | || !blob_is_filename(&pXfer->aToken[1]) |
| 325 | 325 | || !blob_is_int64(&pXfer->aToken[2], &mtime) |
| 326 | - || (!blob_eq(pHash,"-") && !blob_is_uuid(pHash)) | |
| 326 | + || (!blob_eq(pHash,"-") && !blob_is_hname(pHash)) | |
| 327 | 327 | || !blob_is_int(&pXfer->aToken[4], &sz) |
| 328 | 328 | || !blob_is_int(&pXfer->aToken[5], &flags) |
| 329 | 329 | ){ |
| 330 | 330 | blob_appendf(&pXfer->err, "malformed uvfile line"); |
| 331 | 331 | return; |
| @@ -1260,11 +1260,11 @@ | ||
| 1260 | 1260 | ** |
| 1261 | 1261 | ** Client is requesting a file. Send it. |
| 1262 | 1262 | */ |
| 1263 | 1263 | if( blob_eq(&xfer.aToken[0], "gimme") |
| 1264 | 1264 | && xfer.nToken==2 |
| 1265 | - && blob_is_uuid(&xfer.aToken[1]) | |
| 1265 | + && blob_is_hname(&xfer.aToken[1]) | |
| 1266 | 1266 | ){ |
| 1267 | 1267 | nGimme++; |
| 1268 | 1268 | if( isPull ){ |
| 1269 | 1269 | int rid = rid_from_uuid(&xfer.aToken[1], 0, 0); |
| 1270 | 1270 | if( rid ){ |
| @@ -1289,11 +1289,11 @@ | ||
| 1289 | 1289 | ** Client announces that it has a particular file. If the ISPRIVATE |
| 1290 | 1290 | ** argument exists and is non-zero, then the file is a private file. |
| 1291 | 1291 | */ |
| 1292 | 1292 | if( xfer.nToken>=2 |
| 1293 | 1293 | && blob_eq(&xfer.aToken[0], "igot") |
| 1294 | - && blob_is_uuid(&xfer.aToken[1]) | |
| 1294 | + && blob_is_hname(&xfer.aToken[1]) | |
| 1295 | 1295 | ){ |
| 1296 | 1296 | if( isPush ){ |
| 1297 | 1297 | if( xfer.nToken==2 || blob_eq(&xfer.aToken[2],"1")==0 ){ |
| 1298 | 1298 | rid_from_uuid(&xfer.aToken[1], 1, 0); |
| 1299 | 1299 | }else if( g.perm.Private ){ |
| @@ -1311,12 +1311,12 @@ | ||
| 1311 | 1311 | ** The client wants either send or receive. The server should |
| 1312 | 1312 | ** verify that the project code matches. |
| 1313 | 1313 | */ |
| 1314 | 1314 | if( xfer.nToken==3 |
| 1315 | 1315 | && (blob_eq(&xfer.aToken[0], "pull") || blob_eq(&xfer.aToken[0], "push")) |
| 1316 | - && blob_is_uuid(&xfer.aToken[1]) | |
| 1317 | - && blob_is_uuid(&xfer.aToken[2]) | |
| 1316 | + && blob_is_hname(&xfer.aToken[1]) | |
| 1317 | + && blob_is_hname(&xfer.aToken[2]) | |
| 1318 | 1318 | ){ |
| 1319 | 1319 | const char *zPCode; |
| 1320 | 1320 | zPCode = db_get("project-code", 0); |
| 1321 | 1321 | if( zPCode==0 ){ |
| 1322 | 1322 | fossil_panic("missing project code"); |
| @@ -1542,11 +1542,11 @@ | ||
| 1542 | 1542 | ** The client wants to make sure that unversioned files are all synced. |
| 1543 | 1543 | ** If the HASH does not match, send a complete catalog of |
| 1544 | 1544 | ** "uvigot" cards. |
| 1545 | 1545 | */ |
| 1546 | 1546 | if( blob_eq(&xfer.aToken[1], "uv-hash") |
| 1547 | - && blob_is_uuid(&xfer.aToken[2]) | |
| 1547 | + && blob_is_hname(&xfer.aToken[2]) | |
| 1548 | 1548 | ){ |
| 1549 | 1549 | if( !uvCatalogSent ){ |
| 1550 | 1550 | if( g.perm.Read && g.perm.WrUnver ){ |
| 1551 | 1551 | @ pragma uv-push-ok |
| 1552 | 1552 | send_unversioned_catalog(&xfer); |
| @@ -2070,11 +2070,11 @@ | ||
| 2070 | 2070 | ** that the server will also want to know all of the content files |
| 2071 | 2071 | ** associated with the manifest and send those too. |
| 2072 | 2072 | */ |
| 2073 | 2073 | if( blob_eq(&xfer.aToken[0], "gimme") |
| 2074 | 2074 | && xfer.nToken==2 |
| 2075 | - && blob_is_uuid(&xfer.aToken[1]) | |
| 2075 | + && blob_is_hname(&xfer.aToken[1]) | |
| 2076 | 2076 | ){ |
| 2077 | 2077 | if( syncFlags & SYNC_PUSH ){ |
| 2078 | 2078 | int rid = rid_from_uuid(&xfer.aToken[1], 0, 0); |
| 2079 | 2079 | if( rid ) send_file(&xfer, rid, &xfer.aToken[1], 0); |
| 2080 | 2080 | } |
| @@ -2092,11 +2092,11 @@ | ||
| 2092 | 2092 | ** private. Pretend it does not exists if we are not pulling |
| 2093 | 2093 | ** private files. |
| 2094 | 2094 | */ |
| 2095 | 2095 | if( xfer.nToken>=2 |
| 2096 | 2096 | && blob_eq(&xfer.aToken[0], "igot") |
| 2097 | - && blob_is_uuid(&xfer.aToken[1]) | |
| 2097 | + && blob_is_hname(&xfer.aToken[1]) | |
| 2098 | 2098 | ){ |
| 2099 | 2099 | int rid; |
| 2100 | 2100 | int isPriv = xfer.nToken>=3 && blob_eq(&xfer.aToken[2],"1"); |
| 2101 | 2101 | rid = rid_from_uuid(&xfer.aToken[1], 0, 0); |
| 2102 | 2102 | if( rid>0 ){ |
| @@ -2126,11 +2126,11 @@ | ||
| 2126 | 2126 | if( xfer.nToken==5 |
| 2127 | 2127 | && blob_eq(&xfer.aToken[0], "uvigot") |
| 2128 | 2128 | && blob_is_filename(&xfer.aToken[1]) |
| 2129 | 2129 | && blob_is_int64(&xfer.aToken[2], &mtime) |
| 2130 | 2130 | && blob_is_int(&xfer.aToken[4], &size) |
| 2131 | - && (blob_eq(&xfer.aToken[3],"-") || blob_is_uuid(&xfer.aToken[3])) | |
| 2131 | + && (blob_eq(&xfer.aToken[3],"-") || blob_is_hname(&xfer.aToken[3])) | |
| 2132 | 2132 | ){ |
| 2133 | 2133 | const char *zName = blob_str(&xfer.aToken[1]); |
| 2134 | 2134 | const char *zHash = blob_str(&xfer.aToken[3]); |
| 2135 | 2135 | int iStatus; |
| 2136 | 2136 | iStatus = unversioned_status(zName, mtime, zHash); |
| @@ -2188,11 +2188,11 @@ | ||
| 2188 | 2188 | ** the client what product to use for the new database. |
| 2189 | 2189 | */ |
| 2190 | 2190 | if( blob_eq(&xfer.aToken[0],"push") |
| 2191 | 2191 | && xfer.nToken==3 |
| 2192 | 2192 | && (syncFlags & SYNC_CLONE)!=0 |
| 2193 | - && blob_is_uuid(&xfer.aToken[2]) | |
| 2193 | + && blob_is_hname(&xfer.aToken[2]) | |
| 2194 | 2194 | ){ |
| 2195 | 2195 | if( zPCode==0 ){ |
| 2196 | 2196 | zPCode = mprintf("%b", &xfer.aToken[2]); |
| 2197 | 2197 | db_set("project-code", zPCode, 0); |
| 2198 | 2198 | } |
| 2199 | 2199 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -129,14 +129,14 @@ | |
| 129 | |
| 130 | isPriv = pXfer->nextIsPrivate; |
| 131 | pXfer->nextIsPrivate = 0; |
| 132 | if( pXfer->nToken<3 |
| 133 | || pXfer->nToken>4 |
| 134 | || !blob_is_uuid(&pXfer->aToken[1]) |
| 135 | || !blob_is_int(&pXfer->aToken[pXfer->nToken-1], &n) |
| 136 | || n<0 |
| 137 | || (pXfer->nToken==4 && !blob_is_uuid(&pXfer->aToken[2])) |
| 138 | ){ |
| 139 | blob_appendf(&pXfer->err, "malformed file line"); |
| 140 | return; |
| 141 | } |
| 142 | blob_zero(&content); |
| @@ -248,15 +248,15 @@ | |
| 248 | |
| 249 | isPriv = pXfer->nextIsPrivate; |
| 250 | pXfer->nextIsPrivate = 0; |
| 251 | if( pXfer->nToken<4 |
| 252 | || pXfer->nToken>5 |
| 253 | || !blob_is_uuid(&pXfer->aToken[1]) |
| 254 | || !blob_is_int(&pXfer->aToken[pXfer->nToken-2], &szU) |
| 255 | || !blob_is_int(&pXfer->aToken[pXfer->nToken-1], &szC) |
| 256 | || szC<0 || szU<0 |
| 257 | || (pXfer->nToken==5 && !blob_is_uuid(&pXfer->aToken[2])) |
| 258 | ){ |
| 259 | blob_appendf(&pXfer->err, "malformed cfile line"); |
| 260 | return; |
| 261 | } |
| 262 | if( isPriv && !g.perm.Private ){ |
| @@ -321,11 +321,11 @@ | |
| 321 | |
| 322 | pHash = &pXfer->aToken[3]; |
| 323 | if( pXfer->nToken==5 |
| 324 | || !blob_is_filename(&pXfer->aToken[1]) |
| 325 | || !blob_is_int64(&pXfer->aToken[2], &mtime) |
| 326 | || (!blob_eq(pHash,"-") && !blob_is_uuid(pHash)) |
| 327 | || !blob_is_int(&pXfer->aToken[4], &sz) |
| 328 | || !blob_is_int(&pXfer->aToken[5], &flags) |
| 329 | ){ |
| 330 | blob_appendf(&pXfer->err, "malformed uvfile line"); |
| 331 | return; |
| @@ -1260,11 +1260,11 @@ | |
| 1260 | ** |
| 1261 | ** Client is requesting a file. Send it. |
| 1262 | */ |
| 1263 | if( blob_eq(&xfer.aToken[0], "gimme") |
| 1264 | && xfer.nToken==2 |
| 1265 | && blob_is_uuid(&xfer.aToken[1]) |
| 1266 | ){ |
| 1267 | nGimme++; |
| 1268 | if( isPull ){ |
| 1269 | int rid = rid_from_uuid(&xfer.aToken[1], 0, 0); |
| 1270 | if( rid ){ |
| @@ -1289,11 +1289,11 @@ | |
| 1289 | ** Client announces that it has a particular file. If the ISPRIVATE |
| 1290 | ** argument exists and is non-zero, then the file is a private file. |
| 1291 | */ |
| 1292 | if( xfer.nToken>=2 |
| 1293 | && blob_eq(&xfer.aToken[0], "igot") |
| 1294 | && blob_is_uuid(&xfer.aToken[1]) |
| 1295 | ){ |
| 1296 | if( isPush ){ |
| 1297 | if( xfer.nToken==2 || blob_eq(&xfer.aToken[2],"1")==0 ){ |
| 1298 | rid_from_uuid(&xfer.aToken[1], 1, 0); |
| 1299 | }else if( g.perm.Private ){ |
| @@ -1311,12 +1311,12 @@ | |
| 1311 | ** The client wants either send or receive. The server should |
| 1312 | ** verify that the project code matches. |
| 1313 | */ |
| 1314 | if( xfer.nToken==3 |
| 1315 | && (blob_eq(&xfer.aToken[0], "pull") || blob_eq(&xfer.aToken[0], "push")) |
| 1316 | && blob_is_uuid(&xfer.aToken[1]) |
| 1317 | && blob_is_uuid(&xfer.aToken[2]) |
| 1318 | ){ |
| 1319 | const char *zPCode; |
| 1320 | zPCode = db_get("project-code", 0); |
| 1321 | if( zPCode==0 ){ |
| 1322 | fossil_panic("missing project code"); |
| @@ -1542,11 +1542,11 @@ | |
| 1542 | ** The client wants to make sure that unversioned files are all synced. |
| 1543 | ** If the HASH does not match, send a complete catalog of |
| 1544 | ** "uvigot" cards. |
| 1545 | */ |
| 1546 | if( blob_eq(&xfer.aToken[1], "uv-hash") |
| 1547 | && blob_is_uuid(&xfer.aToken[2]) |
| 1548 | ){ |
| 1549 | if( !uvCatalogSent ){ |
| 1550 | if( g.perm.Read && g.perm.WrUnver ){ |
| 1551 | @ pragma uv-push-ok |
| 1552 | send_unversioned_catalog(&xfer); |
| @@ -2070,11 +2070,11 @@ | |
| 2070 | ** that the server will also want to know all of the content files |
| 2071 | ** associated with the manifest and send those too. |
| 2072 | */ |
| 2073 | if( blob_eq(&xfer.aToken[0], "gimme") |
| 2074 | && xfer.nToken==2 |
| 2075 | && blob_is_uuid(&xfer.aToken[1]) |
| 2076 | ){ |
| 2077 | if( syncFlags & SYNC_PUSH ){ |
| 2078 | int rid = rid_from_uuid(&xfer.aToken[1], 0, 0); |
| 2079 | if( rid ) send_file(&xfer, rid, &xfer.aToken[1], 0); |
| 2080 | } |
| @@ -2092,11 +2092,11 @@ | |
| 2092 | ** private. Pretend it does not exists if we are not pulling |
| 2093 | ** private files. |
| 2094 | */ |
| 2095 | if( xfer.nToken>=2 |
| 2096 | && blob_eq(&xfer.aToken[0], "igot") |
| 2097 | && blob_is_uuid(&xfer.aToken[1]) |
| 2098 | ){ |
| 2099 | int rid; |
| 2100 | int isPriv = xfer.nToken>=3 && blob_eq(&xfer.aToken[2],"1"); |
| 2101 | rid = rid_from_uuid(&xfer.aToken[1], 0, 0); |
| 2102 | if( rid>0 ){ |
| @@ -2126,11 +2126,11 @@ | |
| 2126 | if( xfer.nToken==5 |
| 2127 | && blob_eq(&xfer.aToken[0], "uvigot") |
| 2128 | && blob_is_filename(&xfer.aToken[1]) |
| 2129 | && blob_is_int64(&xfer.aToken[2], &mtime) |
| 2130 | && blob_is_int(&xfer.aToken[4], &size) |
| 2131 | && (blob_eq(&xfer.aToken[3],"-") || blob_is_uuid(&xfer.aToken[3])) |
| 2132 | ){ |
| 2133 | const char *zName = blob_str(&xfer.aToken[1]); |
| 2134 | const char *zHash = blob_str(&xfer.aToken[3]); |
| 2135 | int iStatus; |
| 2136 | iStatus = unversioned_status(zName, mtime, zHash); |
| @@ -2188,11 +2188,11 @@ | |
| 2188 | ** the client what product to use for the new database. |
| 2189 | */ |
| 2190 | if( blob_eq(&xfer.aToken[0],"push") |
| 2191 | && xfer.nToken==3 |
| 2192 | && (syncFlags & SYNC_CLONE)!=0 |
| 2193 | && blob_is_uuid(&xfer.aToken[2]) |
| 2194 | ){ |
| 2195 | if( zPCode==0 ){ |
| 2196 | zPCode = mprintf("%b", &xfer.aToken[2]); |
| 2197 | db_set("project-code", zPCode, 0); |
| 2198 | } |
| 2199 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -129,14 +129,14 @@ | |
| 129 | |
| 130 | isPriv = pXfer->nextIsPrivate; |
| 131 | pXfer->nextIsPrivate = 0; |
| 132 | if( pXfer->nToken<3 |
| 133 | || pXfer->nToken>4 |
| 134 | || !blob_is_hname(&pXfer->aToken[1]) |
| 135 | || !blob_is_int(&pXfer->aToken[pXfer->nToken-1], &n) |
| 136 | || n<0 |
| 137 | || (pXfer->nToken==4 && !blob_is_hname(&pXfer->aToken[2])) |
| 138 | ){ |
| 139 | blob_appendf(&pXfer->err, "malformed file line"); |
| 140 | return; |
| 141 | } |
| 142 | blob_zero(&content); |
| @@ -248,15 +248,15 @@ | |
| 248 | |
| 249 | isPriv = pXfer->nextIsPrivate; |
| 250 | pXfer->nextIsPrivate = 0; |
| 251 | if( pXfer->nToken<4 |
| 252 | || pXfer->nToken>5 |
| 253 | || !blob_is_hname(&pXfer->aToken[1]) |
| 254 | || !blob_is_int(&pXfer->aToken[pXfer->nToken-2], &szU) |
| 255 | || !blob_is_int(&pXfer->aToken[pXfer->nToken-1], &szC) |
| 256 | || szC<0 || szU<0 |
| 257 | || (pXfer->nToken==5 && !blob_is_hname(&pXfer->aToken[2])) |
| 258 | ){ |
| 259 | blob_appendf(&pXfer->err, "malformed cfile line"); |
| 260 | return; |
| 261 | } |
| 262 | if( isPriv && !g.perm.Private ){ |
| @@ -321,11 +321,11 @@ | |
| 321 | |
| 322 | pHash = &pXfer->aToken[3]; |
| 323 | if( pXfer->nToken==5 |
| 324 | || !blob_is_filename(&pXfer->aToken[1]) |
| 325 | || !blob_is_int64(&pXfer->aToken[2], &mtime) |
| 326 | || (!blob_eq(pHash,"-") && !blob_is_hname(pHash)) |
| 327 | || !blob_is_int(&pXfer->aToken[4], &sz) |
| 328 | || !blob_is_int(&pXfer->aToken[5], &flags) |
| 329 | ){ |
| 330 | blob_appendf(&pXfer->err, "malformed uvfile line"); |
| 331 | return; |
| @@ -1260,11 +1260,11 @@ | |
| 1260 | ** |
| 1261 | ** Client is requesting a file. Send it. |
| 1262 | */ |
| 1263 | if( blob_eq(&xfer.aToken[0], "gimme") |
| 1264 | && xfer.nToken==2 |
| 1265 | && blob_is_hname(&xfer.aToken[1]) |
| 1266 | ){ |
| 1267 | nGimme++; |
| 1268 | if( isPull ){ |
| 1269 | int rid = rid_from_uuid(&xfer.aToken[1], 0, 0); |
| 1270 | if( rid ){ |
| @@ -1289,11 +1289,11 @@ | |
| 1289 | ** Client announces that it has a particular file. If the ISPRIVATE |
| 1290 | ** argument exists and is non-zero, then the file is a private file. |
| 1291 | */ |
| 1292 | if( xfer.nToken>=2 |
| 1293 | && blob_eq(&xfer.aToken[0], "igot") |
| 1294 | && blob_is_hname(&xfer.aToken[1]) |
| 1295 | ){ |
| 1296 | if( isPush ){ |
| 1297 | if( xfer.nToken==2 || blob_eq(&xfer.aToken[2],"1")==0 ){ |
| 1298 | rid_from_uuid(&xfer.aToken[1], 1, 0); |
| 1299 | }else if( g.perm.Private ){ |
| @@ -1311,12 +1311,12 @@ | |
| 1311 | ** The client wants either send or receive. The server should |
| 1312 | ** verify that the project code matches. |
| 1313 | */ |
| 1314 | if( xfer.nToken==3 |
| 1315 | && (blob_eq(&xfer.aToken[0], "pull") || blob_eq(&xfer.aToken[0], "push")) |
| 1316 | && blob_is_hname(&xfer.aToken[1]) |
| 1317 | && blob_is_hname(&xfer.aToken[2]) |
| 1318 | ){ |
| 1319 | const char *zPCode; |
| 1320 | zPCode = db_get("project-code", 0); |
| 1321 | if( zPCode==0 ){ |
| 1322 | fossil_panic("missing project code"); |
| @@ -1542,11 +1542,11 @@ | |
| 1542 | ** The client wants to make sure that unversioned files are all synced. |
| 1543 | ** If the HASH does not match, send a complete catalog of |
| 1544 | ** "uvigot" cards. |
| 1545 | */ |
| 1546 | if( blob_eq(&xfer.aToken[1], "uv-hash") |
| 1547 | && blob_is_hname(&xfer.aToken[2]) |
| 1548 | ){ |
| 1549 | if( !uvCatalogSent ){ |
| 1550 | if( g.perm.Read && g.perm.WrUnver ){ |
| 1551 | @ pragma uv-push-ok |
| 1552 | send_unversioned_catalog(&xfer); |
| @@ -2070,11 +2070,11 @@ | |
| 2070 | ** that the server will also want to know all of the content files |
| 2071 | ** associated with the manifest and send those too. |
| 2072 | */ |
| 2073 | if( blob_eq(&xfer.aToken[0], "gimme") |
| 2074 | && xfer.nToken==2 |
| 2075 | && blob_is_hname(&xfer.aToken[1]) |
| 2076 | ){ |
| 2077 | if( syncFlags & SYNC_PUSH ){ |
| 2078 | int rid = rid_from_uuid(&xfer.aToken[1], 0, 0); |
| 2079 | if( rid ) send_file(&xfer, rid, &xfer.aToken[1], 0); |
| 2080 | } |
| @@ -2092,11 +2092,11 @@ | |
| 2092 | ** private. Pretend it does not exists if we are not pulling |
| 2093 | ** private files. |
| 2094 | */ |
| 2095 | if( xfer.nToken>=2 |
| 2096 | && blob_eq(&xfer.aToken[0], "igot") |
| 2097 | && blob_is_hname(&xfer.aToken[1]) |
| 2098 | ){ |
| 2099 | int rid; |
| 2100 | int isPriv = xfer.nToken>=3 && blob_eq(&xfer.aToken[2],"1"); |
| 2101 | rid = rid_from_uuid(&xfer.aToken[1], 0, 0); |
| 2102 | if( rid>0 ){ |
| @@ -2126,11 +2126,11 @@ | |
| 2126 | if( xfer.nToken==5 |
| 2127 | && blob_eq(&xfer.aToken[0], "uvigot") |
| 2128 | && blob_is_filename(&xfer.aToken[1]) |
| 2129 | && blob_is_int64(&xfer.aToken[2], &mtime) |
| 2130 | && blob_is_int(&xfer.aToken[4], &size) |
| 2131 | && (blob_eq(&xfer.aToken[3],"-") || blob_is_hname(&xfer.aToken[3])) |
| 2132 | ){ |
| 2133 | const char *zName = blob_str(&xfer.aToken[1]); |
| 2134 | const char *zHash = blob_str(&xfer.aToken[3]); |
| 2135 | int iStatus; |
| 2136 | iStatus = unversioned_status(zName, mtime, zHash); |
| @@ -2188,11 +2188,11 @@ | |
| 2188 | ** the client what product to use for the new database. |
| 2189 | */ |
| 2190 | if( blob_eq(&xfer.aToken[0],"push") |
| 2191 | && xfer.nToken==3 |
| 2192 | && (syncFlags & SYNC_CLONE)!=0 |
| 2193 | && blob_is_hname(&xfer.aToken[2]) |
| 2194 | ){ |
| 2195 | if( zPCode==0 ){ |
| 2196 | zPCode = mprintf("%b", &xfer.aToken[2]); |
| 2197 | db_set("project-code", zPCode, 0); |
| 2198 | } |
| 2199 |
+10
-4
| --- win/Makefile.dmc | ||
| +++ win/Makefile.dmc | ||
| @@ -28,13 +28,13 @@ | ||
| 28 | 28 | |
| 29 | 29 | SQLITE_OPTIONS = -DNDEBUG=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_OMIT_DECLTYPE -DSQLITE_OMIT_DEPRECATED -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_MAX_EXPR_DEPTH=0 -DSQLITE_USE_ALLOCA -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS5 |
| 30 | 30 | |
| 31 | 31 | SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_SHELL_IS_UTF8=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=file_access -Dsystem=fossil_system -Dgetenv=fossil_getenv -Dfopen=fossil_fopen |
| 32 | 32 | |
| 33 | -SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c builtin_.c bundle_.c cache_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c dispatch_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c foci_.c fshell_.c fusefs_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c loadctrl_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c piechart_.c pivot_.c popen_.c pqueue_.c printf_.c publish_.c purge_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c sha3_.c shun_.c sitemap_.c skins_.c sqlcmd_.c stash_.c stat_.c statrep_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c unversioned_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c | |
| 33 | +SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c builtin_.c bundle_.c cache_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c dispatch_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c foci_.c fshell_.c fusefs_.c glob_.c graph_.c gzip_.c hname_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c loadctrl_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c piechart_.c pivot_.c popen_.c pqueue_.c printf_.c publish_.c purge_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c sha3_.c shun_.c sitemap_.c skins_.c sqlcmd_.c stash_.c stat_.c statrep_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c unversioned_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c | |
| 34 | 34 | |
| 35 | -OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\builtin$O $(OBJDIR)\bundle$O $(OBJDIR)\cache$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\dispatch$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\foci$O $(OBJDIR)\fshell$O $(OBJDIR)\fusefs$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_finfo$O $(OBJDIR)\json_login$O $(OBJDIR)\json_query$O $(OBJDIR)\json_report$O $(OBJDIR)\json_status$O $(OBJDIR)\json_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\loadctrl$O $(OBJDIR)\login$O $(OBJDIR)\lookslike$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\markdown$O $(OBJDIR)\markdown_html$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\moderate$O $(OBJDIR)\name$O $(OBJDIR)\path$O $(OBJDIR)\piechart$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\publish$O $(OBJDIR)\purge$O $(OBJDIR)\rebuild$O $(OBJDIR)\regexp$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\sha3$O $(OBJDIR)\shun$O $(OBJDIR)\sitemap$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\statrep$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\unicode$O $(OBJDIR)\unversioned$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$O $(OBJDIR)\util$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winfile$O $(OBJDIR)\winhttp$O $(OBJDIR)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O | |
| 35 | +OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\builtin$O $(OBJDIR)\bundle$O $(OBJDIR)\cache$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\dispatch$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\foci$O $(OBJDIR)\fshell$O $(OBJDIR)\fusefs$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\hname$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_finfo$O $(OBJDIR)\json_login$O $(OBJDIR)\json_query$O $(OBJDIR)\json_report$O $(OBJDIR)\json_status$O $(OBJDIR)\json_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\loadctrl$O $(OBJDIR)\login$O $(OBJDIR)\lookslike$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\markdown$O $(OBJDIR)\markdown_html$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\moderate$O $(OBJDIR)\name$O $(OBJDIR)\path$O $(OBJDIR)\piechart$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\publish$O $(OBJDIR)\purge$O $(OBJDIR)\rebuild$O $(OBJDIR)\regexp$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\sha3$O $(OBJDIR)\shun$O $(OBJDIR)\sitemap$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\statrep$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\unicode$O $(OBJDIR)\unversioned$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$O $(OBJDIR)\util$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winfile$O $(OBJDIR)\winhttp$O $(OBJDIR)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O | |
| 36 | 36 | |
| 37 | 37 | |
| 38 | 38 | RC=$(DMDIR)\bin\rcc |
| 39 | 39 | RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__ |
| 40 | 40 | |
| @@ -49,11 +49,11 @@ | ||
| 49 | 49 | |
| 50 | 50 | $(OBJDIR)\fossil.res: $B\win\fossil.rc |
| 51 | 51 | $(RC) $(RCFLAGS) -o$@ $** |
| 52 | 52 | |
| 53 | 53 | $(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res |
| 54 | - +echo add allrepo attach bag bisect blob branch browse builtin bundle cache captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd dispatch doc encode event export file finfo foci fshell fusefs glob graph gzip http http_socket http_ssl http_transport import info json json_artifact json_branch json_config json_diff json_dir json_finfo json_login json_query json_report json_status json_tag json_timeline json_user json_wiki leaf loadctrl login lookslike main manifest markdown markdown_html md5 merge merge3 moderate name path piechart pivot popen pqueue printf publish purge rebuild regexp report rss schema search setup sha1 sha3 shun sitemap skins sqlcmd stash stat statrep style sync tag tar th_main timeline tkt tktsetup undo unicode unversioned update url user utf8 util verify vfile wiki wikiformat winfile winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@ | |
| 54 | + +echo add allrepo attach bag bisect blob branch browse builtin bundle cache captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd dispatch doc encode event export file finfo foci fshell fusefs glob graph gzip hname http http_socket http_ssl http_transport import info json json_artifact json_branch json_config json_diff json_dir json_finfo json_login json_query json_report json_status json_tag json_timeline json_user json_wiki leaf loadctrl login lookslike main manifest markdown markdown_html md5 merge merge3 moderate name path piechart pivot popen pqueue printf publish purge rebuild regexp report rss schema search setup sha1 sha3 shun sitemap skins sqlcmd stash stat statrep style sync tag tar th_main timeline tkt tktsetup undo unicode unversioned update url user utf8 util verify vfile wiki wikiformat winfile winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@ | |
| 55 | 55 | +echo fossil >> $@ |
| 56 | 56 | +echo fossil >> $@ |
| 57 | 57 | +echo $(LIBS) >> $@ |
| 58 | 58 | +echo. >> $@ |
| 59 | 59 | +echo fossil >> $@ |
| @@ -356,10 +356,16 @@ | ||
| 356 | 356 | $(OBJDIR)\gzip$O : gzip_.c gzip.h |
| 357 | 357 | $(TCC) -o$@ -c gzip_.c |
| 358 | 358 | |
| 359 | 359 | gzip_.c : $(SRCDIR)\gzip.c |
| 360 | 360 | +translate$E $** > $@ |
| 361 | + | |
| 362 | +$(OBJDIR)\hname$O : hname_.c hname.h | |
| 363 | + $(TCC) -o$@ -c hname_.c | |
| 364 | + | |
| 365 | +hname_.c : $(SRCDIR)\hname.c | |
| 366 | + +translate$E $** > $@ | |
| 361 | 367 | |
| 362 | 368 | $(OBJDIR)\http$O : http_.c http.h |
| 363 | 369 | $(TCC) -o$@ -c http_.c |
| 364 | 370 | |
| 365 | 371 | http_.c : $(SRCDIR)\http.c |
| @@ -862,7 +868,7 @@ | ||
| 862 | 868 | |
| 863 | 869 | zip_.c : $(SRCDIR)\zip.c |
| 864 | 870 | +translate$E $** > $@ |
| 865 | 871 | |
| 866 | 872 | headers: makeheaders$E page_index.h builtin_data.h VERSION.h |
| 867 | - +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h builtin_.c:builtin.h bundle_.c:bundle.h cache_.c:cache.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 dispatch_.c:dispatch.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h foci_.c:foci.h fshell_.c:fshell.h fusefs_.c:fusefs.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_status_.c:json_status.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h loadctrl_.c:loadctrl.h login_.c:login.h lookslike_.c:lookslike.h main_.c:main.h manifest_.c:manifest.h markdown_.c:markdown.h markdown_html_.c:markdown_html.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h moderate_.c:moderate.h name_.c:name.h path_.c:path.h piechart_.c:piechart.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h publish_.c:publish.h purge_.c:purge.h rebuild_.c:rebuild.h regexp_.c:regexp.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 sha3_.c:sha3.h shun_.c:shun.h sitemap_.c:sitemap.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h statrep_.c:statrep.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h unicode_.c:unicode.h unversioned_.c:unversioned.h update_.c:update.h url_.c:url.h user_.c:user.h utf8_.c:utf8.h util_.c:util.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winfile_.c:winfile.h winhttp_.c:winhttp.h wysiwyg_.c:wysiwyg.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h | |
| 873 | + +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h builtin_.c:builtin.h bundle_.c:bundle.h cache_.c:cache.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 dispatch_.c:dispatch.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h foci_.c:foci.h fshell_.c:fshell.h fusefs_.c:fusefs.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h hname_.c:hname.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_status_.c:json_status.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h loadctrl_.c:loadctrl.h login_.c:login.h lookslike_.c:lookslike.h main_.c:main.h manifest_.c:manifest.h markdown_.c:markdown.h markdown_html_.c:markdown_html.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h moderate_.c:moderate.h name_.c:name.h path_.c:path.h piechart_.c:piechart.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h publish_.c:publish.h purge_.c:purge.h rebuild_.c:rebuild.h regexp_.c:regexp.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 sha3_.c:sha3.h shun_.c:shun.h sitemap_.c:sitemap.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h statrep_.c:statrep.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h unicode_.c:unicode.h unversioned_.c:unversioned.h update_.c:update.h url_.c:url.h user_.c:user.h utf8_.c:utf8.h util_.c:util.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winfile_.c:winfile.h winhttp_.c:winhttp.h wysiwyg_.c:wysiwyg.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h | |
| 868 | 874 | @copy /Y nul: headers |
| 869 | 875 |
| --- win/Makefile.dmc | |
| +++ win/Makefile.dmc | |
| @@ -28,13 +28,13 @@ | |
| 28 | |
| 29 | SQLITE_OPTIONS = -DNDEBUG=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_OMIT_DECLTYPE -DSQLITE_OMIT_DEPRECATED -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_MAX_EXPR_DEPTH=0 -DSQLITE_USE_ALLOCA -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS5 |
| 30 | |
| 31 | SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_SHELL_IS_UTF8=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=file_access -Dsystem=fossil_system -Dgetenv=fossil_getenv -Dfopen=fossil_fopen |
| 32 | |
| 33 | SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c builtin_.c bundle_.c cache_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c dispatch_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c foci_.c fshell_.c fusefs_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c loadctrl_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c piechart_.c pivot_.c popen_.c pqueue_.c printf_.c publish_.c purge_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c sha3_.c shun_.c sitemap_.c skins_.c sqlcmd_.c stash_.c stat_.c statrep_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c unversioned_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c |
| 34 | |
| 35 | OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\builtin$O $(OBJDIR)\bundle$O $(OBJDIR)\cache$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\dispatch$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\foci$O $(OBJDIR)\fshell$O $(OBJDIR)\fusefs$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_finfo$O $(OBJDIR)\json_login$O $(OBJDIR)\json_query$O $(OBJDIR)\json_report$O $(OBJDIR)\json_status$O $(OBJDIR)\json_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\loadctrl$O $(OBJDIR)\login$O $(OBJDIR)\lookslike$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\markdown$O $(OBJDIR)\markdown_html$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\moderate$O $(OBJDIR)\name$O $(OBJDIR)\path$O $(OBJDIR)\piechart$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\publish$O $(OBJDIR)\purge$O $(OBJDIR)\rebuild$O $(OBJDIR)\regexp$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\sha3$O $(OBJDIR)\shun$O $(OBJDIR)\sitemap$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\statrep$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\unicode$O $(OBJDIR)\unversioned$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$O $(OBJDIR)\util$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winfile$O $(OBJDIR)\winhttp$O $(OBJDIR)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O |
| 36 | |
| 37 | |
| 38 | RC=$(DMDIR)\bin\rcc |
| 39 | RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__ |
| 40 | |
| @@ -49,11 +49,11 @@ | |
| 49 | |
| 50 | $(OBJDIR)\fossil.res: $B\win\fossil.rc |
| 51 | $(RC) $(RCFLAGS) -o$@ $** |
| 52 | |
| 53 | $(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res |
| 54 | +echo add allrepo attach bag bisect blob branch browse builtin bundle cache captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd dispatch doc encode event export file finfo foci fshell fusefs glob graph gzip http http_socket http_ssl http_transport import info json json_artifact json_branch json_config json_diff json_dir json_finfo json_login json_query json_report json_status json_tag json_timeline json_user json_wiki leaf loadctrl login lookslike main manifest markdown markdown_html md5 merge merge3 moderate name path piechart pivot popen pqueue printf publish purge rebuild regexp report rss schema search setup sha1 sha3 shun sitemap skins sqlcmd stash stat statrep style sync tag tar th_main timeline tkt tktsetup undo unicode unversioned update url user utf8 util verify vfile wiki wikiformat winfile winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@ |
| 55 | +echo fossil >> $@ |
| 56 | +echo fossil >> $@ |
| 57 | +echo $(LIBS) >> $@ |
| 58 | +echo. >> $@ |
| 59 | +echo fossil >> $@ |
| @@ -356,10 +356,16 @@ | |
| 356 | $(OBJDIR)\gzip$O : gzip_.c gzip.h |
| 357 | $(TCC) -o$@ -c gzip_.c |
| 358 | |
| 359 | gzip_.c : $(SRCDIR)\gzip.c |
| 360 | +translate$E $** > $@ |
| 361 | |
| 362 | $(OBJDIR)\http$O : http_.c http.h |
| 363 | $(TCC) -o$@ -c http_.c |
| 364 | |
| 365 | http_.c : $(SRCDIR)\http.c |
| @@ -862,7 +868,7 @@ | |
| 862 | |
| 863 | zip_.c : $(SRCDIR)\zip.c |
| 864 | +translate$E $** > $@ |
| 865 | |
| 866 | headers: makeheaders$E page_index.h builtin_data.h VERSION.h |
| 867 | +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h builtin_.c:builtin.h bundle_.c:bundle.h cache_.c:cache.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 dispatch_.c:dispatch.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h foci_.c:foci.h fshell_.c:fshell.h fusefs_.c:fusefs.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_status_.c:json_status.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h loadctrl_.c:loadctrl.h login_.c:login.h lookslike_.c:lookslike.h main_.c:main.h manifest_.c:manifest.h markdown_.c:markdown.h markdown_html_.c:markdown_html.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h moderate_.c:moderate.h name_.c:name.h path_.c:path.h piechart_.c:piechart.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h publish_.c:publish.h purge_.c:purge.h rebuild_.c:rebuild.h regexp_.c:regexp.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 sha3_.c:sha3.h shun_.c:shun.h sitemap_.c:sitemap.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h statrep_.c:statrep.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h unicode_.c:unicode.h unversioned_.c:unversioned.h update_.c:update.h url_.c:url.h user_.c:user.h utf8_.c:utf8.h util_.c:util.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winfile_.c:winfile.h winhttp_.c:winhttp.h wysiwyg_.c:wysiwyg.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h |
| 868 | @copy /Y nul: headers |
| 869 |
| --- win/Makefile.dmc | |
| +++ win/Makefile.dmc | |
| @@ -28,13 +28,13 @@ | |
| 28 | |
| 29 | SQLITE_OPTIONS = -DNDEBUG=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_OMIT_DECLTYPE -DSQLITE_OMIT_DEPRECATED -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_MAX_EXPR_DEPTH=0 -DSQLITE_USE_ALLOCA -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS5 |
| 30 | |
| 31 | SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_SHELL_IS_UTF8=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=file_access -Dsystem=fossil_system -Dgetenv=fossil_getenv -Dfopen=fossil_fopen |
| 32 | |
| 33 | SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c builtin_.c bundle_.c cache_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c dispatch_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c foci_.c fshell_.c fusefs_.c glob_.c graph_.c gzip_.c hname_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c loadctrl_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c piechart_.c pivot_.c popen_.c pqueue_.c printf_.c publish_.c purge_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c sha3_.c shun_.c sitemap_.c skins_.c sqlcmd_.c stash_.c stat_.c statrep_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c unversioned_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c |
| 34 | |
| 35 | OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\builtin$O $(OBJDIR)\bundle$O $(OBJDIR)\cache$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\dispatch$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\foci$O $(OBJDIR)\fshell$O $(OBJDIR)\fusefs$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\hname$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_finfo$O $(OBJDIR)\json_login$O $(OBJDIR)\json_query$O $(OBJDIR)\json_report$O $(OBJDIR)\json_status$O $(OBJDIR)\json_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\loadctrl$O $(OBJDIR)\login$O $(OBJDIR)\lookslike$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\markdown$O $(OBJDIR)\markdown_html$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\moderate$O $(OBJDIR)\name$O $(OBJDIR)\path$O $(OBJDIR)\piechart$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\publish$O $(OBJDIR)\purge$O $(OBJDIR)\rebuild$O $(OBJDIR)\regexp$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\sha3$O $(OBJDIR)\shun$O $(OBJDIR)\sitemap$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\statrep$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\unicode$O $(OBJDIR)\unversioned$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$O $(OBJDIR)\util$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winfile$O $(OBJDIR)\winhttp$O $(OBJDIR)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O |
| 36 | |
| 37 | |
| 38 | RC=$(DMDIR)\bin\rcc |
| 39 | RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__ |
| 40 | |
| @@ -49,11 +49,11 @@ | |
| 49 | |
| 50 | $(OBJDIR)\fossil.res: $B\win\fossil.rc |
| 51 | $(RC) $(RCFLAGS) -o$@ $** |
| 52 | |
| 53 | $(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res |
| 54 | +echo add allrepo attach bag bisect blob branch browse builtin bundle cache captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd dispatch doc encode event export file finfo foci fshell fusefs glob graph gzip hname http http_socket http_ssl http_transport import info json json_artifact json_branch json_config json_diff json_dir json_finfo json_login json_query json_report json_status json_tag json_timeline json_user json_wiki leaf loadctrl login lookslike main manifest markdown markdown_html md5 merge merge3 moderate name path piechart pivot popen pqueue printf publish purge rebuild regexp report rss schema search setup sha1 sha3 shun sitemap skins sqlcmd stash stat statrep style sync tag tar th_main timeline tkt tktsetup undo unicode unversioned update url user utf8 util verify vfile wiki wikiformat winfile winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@ |
| 55 | +echo fossil >> $@ |
| 56 | +echo fossil >> $@ |
| 57 | +echo $(LIBS) >> $@ |
| 58 | +echo. >> $@ |
| 59 | +echo fossil >> $@ |
| @@ -356,10 +356,16 @@ | |
| 356 | $(OBJDIR)\gzip$O : gzip_.c gzip.h |
| 357 | $(TCC) -o$@ -c gzip_.c |
| 358 | |
| 359 | gzip_.c : $(SRCDIR)\gzip.c |
| 360 | +translate$E $** > $@ |
| 361 | |
| 362 | $(OBJDIR)\hname$O : hname_.c hname.h |
| 363 | $(TCC) -o$@ -c hname_.c |
| 364 | |
| 365 | hname_.c : $(SRCDIR)\hname.c |
| 366 | +translate$E $** > $@ |
| 367 | |
| 368 | $(OBJDIR)\http$O : http_.c http.h |
| 369 | $(TCC) -o$@ -c http_.c |
| 370 | |
| 371 | http_.c : $(SRCDIR)\http.c |
| @@ -862,7 +868,7 @@ | |
| 868 | |
| 869 | zip_.c : $(SRCDIR)\zip.c |
| 870 | +translate$E $** > $@ |
| 871 | |
| 872 | headers: makeheaders$E page_index.h builtin_data.h VERSION.h |
| 873 | +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h builtin_.c:builtin.h bundle_.c:bundle.h cache_.c:cache.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 dispatch_.c:dispatch.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h foci_.c:foci.h fshell_.c:fshell.h fusefs_.c:fusefs.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h hname_.c:hname.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_status_.c:json_status.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h loadctrl_.c:loadctrl.h login_.c:login.h lookslike_.c:lookslike.h main_.c:main.h manifest_.c:manifest.h markdown_.c:markdown.h markdown_html_.c:markdown_html.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h moderate_.c:moderate.h name_.c:name.h path_.c:path.h piechart_.c:piechart.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h publish_.c:publish.h purge_.c:purge.h rebuild_.c:rebuild.h regexp_.c:regexp.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 sha3_.c:sha3.h shun_.c:shun.h sitemap_.c:sitemap.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h statrep_.c:statrep.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h unicode_.c:unicode.h unversioned_.c:unversioned.h update_.c:update.h url_.c:url.h user_.c:user.h utf8_.c:utf8.h util_.c:util.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winfile_.c:winfile.h winhttp_.c:winhttp.h wysiwyg_.c:wysiwyg.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h |
| 874 | @copy /Y nul: headers |
| 875 |
+12
| --- win/Makefile.mingw | ||
| +++ win/Makefile.mingw | ||
| @@ -461,10 +461,11 @@ | ||
| 461 | 461 | $(SRCDIR)/fshell.c \ |
| 462 | 462 | $(SRCDIR)/fusefs.c \ |
| 463 | 463 | $(SRCDIR)/glob.c \ |
| 464 | 464 | $(SRCDIR)/graph.c \ |
| 465 | 465 | $(SRCDIR)/gzip.c \ |
| 466 | + $(SRCDIR)/hname.c \ | |
| 466 | 467 | $(SRCDIR)/http.c \ |
| 467 | 468 | $(SRCDIR)/http_socket.c \ |
| 468 | 469 | $(SRCDIR)/http_ssl.c \ |
| 469 | 470 | $(SRCDIR)/http_transport.c \ |
| 470 | 471 | $(SRCDIR)/import.c \ |
| @@ -637,10 +638,11 @@ | ||
| 637 | 638 | $(OBJDIR)/fshell_.c \ |
| 638 | 639 | $(OBJDIR)/fusefs_.c \ |
| 639 | 640 | $(OBJDIR)/glob_.c \ |
| 640 | 641 | $(OBJDIR)/graph_.c \ |
| 641 | 642 | $(OBJDIR)/gzip_.c \ |
| 643 | + $(OBJDIR)/hname_.c \ | |
| 642 | 644 | $(OBJDIR)/http_.c \ |
| 643 | 645 | $(OBJDIR)/http_socket_.c \ |
| 644 | 646 | $(OBJDIR)/http_ssl_.c \ |
| 645 | 647 | $(OBJDIR)/http_transport_.c \ |
| 646 | 648 | $(OBJDIR)/import_.c \ |
| @@ -762,10 +764,11 @@ | ||
| 762 | 764 | $(OBJDIR)/fshell.o \ |
| 763 | 765 | $(OBJDIR)/fusefs.o \ |
| 764 | 766 | $(OBJDIR)/glob.o \ |
| 765 | 767 | $(OBJDIR)/graph.o \ |
| 766 | 768 | $(OBJDIR)/gzip.o \ |
| 769 | + $(OBJDIR)/hname.o \ | |
| 767 | 770 | $(OBJDIR)/http.o \ |
| 768 | 771 | $(OBJDIR)/http_socket.o \ |
| 769 | 772 | $(OBJDIR)/http_ssl.o \ |
| 770 | 773 | $(OBJDIR)/http_transport.o \ |
| 771 | 774 | $(OBJDIR)/import.o \ |
| @@ -1098,10 +1101,11 @@ | ||
| 1098 | 1101 | $(OBJDIR)/fshell_.c:$(OBJDIR)/fshell.h \ |
| 1099 | 1102 | $(OBJDIR)/fusefs_.c:$(OBJDIR)/fusefs.h \ |
| 1100 | 1103 | $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h \ |
| 1101 | 1104 | $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h \ |
| 1102 | 1105 | $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h \ |
| 1106 | + $(OBJDIR)/hname_.c:$(OBJDIR)/hname.h \ | |
| 1103 | 1107 | $(OBJDIR)/http_.c:$(OBJDIR)/http.h \ |
| 1104 | 1108 | $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h \ |
| 1105 | 1109 | $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h \ |
| 1106 | 1110 | $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h \ |
| 1107 | 1111 | $(OBJDIR)/import_.c:$(OBJDIR)/import.h \ |
| @@ -1502,10 +1506,18 @@ | ||
| 1502 | 1506 | |
| 1503 | 1507 | $(OBJDIR)/gzip.o: $(OBJDIR)/gzip_.c $(OBJDIR)/gzip.h $(SRCDIR)/config.h |
| 1504 | 1508 | $(XTCC) -o $(OBJDIR)/gzip.o -c $(OBJDIR)/gzip_.c |
| 1505 | 1509 | |
| 1506 | 1510 | $(OBJDIR)/gzip.h: $(OBJDIR)/headers |
| 1511 | + | |
| 1512 | +$(OBJDIR)/hname_.c: $(SRCDIR)/hname.c $(TRANSLATE) | |
| 1513 | + $(TRANSLATE) $(SRCDIR)/hname.c >$@ | |
| 1514 | + | |
| 1515 | +$(OBJDIR)/hname.o: $(OBJDIR)/hname_.c $(OBJDIR)/hname.h $(SRCDIR)/config.h | |
| 1516 | + $(XTCC) -o $(OBJDIR)/hname.o -c $(OBJDIR)/hname_.c | |
| 1517 | + | |
| 1518 | +$(OBJDIR)/hname.h: $(OBJDIR)/headers | |
| 1507 | 1519 | |
| 1508 | 1520 | $(OBJDIR)/http_.c: $(SRCDIR)/http.c $(TRANSLATE) |
| 1509 | 1521 | $(TRANSLATE) $(SRCDIR)/http.c >$@ |
| 1510 | 1522 | |
| 1511 | 1523 | $(OBJDIR)/http.o: $(OBJDIR)/http_.c $(OBJDIR)/http.h $(SRCDIR)/config.h |
| 1512 | 1524 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -461,10 +461,11 @@ | |
| 461 | $(SRCDIR)/fshell.c \ |
| 462 | $(SRCDIR)/fusefs.c \ |
| 463 | $(SRCDIR)/glob.c \ |
| 464 | $(SRCDIR)/graph.c \ |
| 465 | $(SRCDIR)/gzip.c \ |
| 466 | $(SRCDIR)/http.c \ |
| 467 | $(SRCDIR)/http_socket.c \ |
| 468 | $(SRCDIR)/http_ssl.c \ |
| 469 | $(SRCDIR)/http_transport.c \ |
| 470 | $(SRCDIR)/import.c \ |
| @@ -637,10 +638,11 @@ | |
| 637 | $(OBJDIR)/fshell_.c \ |
| 638 | $(OBJDIR)/fusefs_.c \ |
| 639 | $(OBJDIR)/glob_.c \ |
| 640 | $(OBJDIR)/graph_.c \ |
| 641 | $(OBJDIR)/gzip_.c \ |
| 642 | $(OBJDIR)/http_.c \ |
| 643 | $(OBJDIR)/http_socket_.c \ |
| 644 | $(OBJDIR)/http_ssl_.c \ |
| 645 | $(OBJDIR)/http_transport_.c \ |
| 646 | $(OBJDIR)/import_.c \ |
| @@ -762,10 +764,11 @@ | |
| 762 | $(OBJDIR)/fshell.o \ |
| 763 | $(OBJDIR)/fusefs.o \ |
| 764 | $(OBJDIR)/glob.o \ |
| 765 | $(OBJDIR)/graph.o \ |
| 766 | $(OBJDIR)/gzip.o \ |
| 767 | $(OBJDIR)/http.o \ |
| 768 | $(OBJDIR)/http_socket.o \ |
| 769 | $(OBJDIR)/http_ssl.o \ |
| 770 | $(OBJDIR)/http_transport.o \ |
| 771 | $(OBJDIR)/import.o \ |
| @@ -1098,10 +1101,11 @@ | |
| 1098 | $(OBJDIR)/fshell_.c:$(OBJDIR)/fshell.h \ |
| 1099 | $(OBJDIR)/fusefs_.c:$(OBJDIR)/fusefs.h \ |
| 1100 | $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h \ |
| 1101 | $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h \ |
| 1102 | $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h \ |
| 1103 | $(OBJDIR)/http_.c:$(OBJDIR)/http.h \ |
| 1104 | $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h \ |
| 1105 | $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h \ |
| 1106 | $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h \ |
| 1107 | $(OBJDIR)/import_.c:$(OBJDIR)/import.h \ |
| @@ -1502,10 +1506,18 @@ | |
| 1502 | |
| 1503 | $(OBJDIR)/gzip.o: $(OBJDIR)/gzip_.c $(OBJDIR)/gzip.h $(SRCDIR)/config.h |
| 1504 | $(XTCC) -o $(OBJDIR)/gzip.o -c $(OBJDIR)/gzip_.c |
| 1505 | |
| 1506 | $(OBJDIR)/gzip.h: $(OBJDIR)/headers |
| 1507 | |
| 1508 | $(OBJDIR)/http_.c: $(SRCDIR)/http.c $(TRANSLATE) |
| 1509 | $(TRANSLATE) $(SRCDIR)/http.c >$@ |
| 1510 | |
| 1511 | $(OBJDIR)/http.o: $(OBJDIR)/http_.c $(OBJDIR)/http.h $(SRCDIR)/config.h |
| 1512 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -461,10 +461,11 @@ | |
| 461 | $(SRCDIR)/fshell.c \ |
| 462 | $(SRCDIR)/fusefs.c \ |
| 463 | $(SRCDIR)/glob.c \ |
| 464 | $(SRCDIR)/graph.c \ |
| 465 | $(SRCDIR)/gzip.c \ |
| 466 | $(SRCDIR)/hname.c \ |
| 467 | $(SRCDIR)/http.c \ |
| 468 | $(SRCDIR)/http_socket.c \ |
| 469 | $(SRCDIR)/http_ssl.c \ |
| 470 | $(SRCDIR)/http_transport.c \ |
| 471 | $(SRCDIR)/import.c \ |
| @@ -637,10 +638,11 @@ | |
| 638 | $(OBJDIR)/fshell_.c \ |
| 639 | $(OBJDIR)/fusefs_.c \ |
| 640 | $(OBJDIR)/glob_.c \ |
| 641 | $(OBJDIR)/graph_.c \ |
| 642 | $(OBJDIR)/gzip_.c \ |
| 643 | $(OBJDIR)/hname_.c \ |
| 644 | $(OBJDIR)/http_.c \ |
| 645 | $(OBJDIR)/http_socket_.c \ |
| 646 | $(OBJDIR)/http_ssl_.c \ |
| 647 | $(OBJDIR)/http_transport_.c \ |
| 648 | $(OBJDIR)/import_.c \ |
| @@ -762,10 +764,11 @@ | |
| 764 | $(OBJDIR)/fshell.o \ |
| 765 | $(OBJDIR)/fusefs.o \ |
| 766 | $(OBJDIR)/glob.o \ |
| 767 | $(OBJDIR)/graph.o \ |
| 768 | $(OBJDIR)/gzip.o \ |
| 769 | $(OBJDIR)/hname.o \ |
| 770 | $(OBJDIR)/http.o \ |
| 771 | $(OBJDIR)/http_socket.o \ |
| 772 | $(OBJDIR)/http_ssl.o \ |
| 773 | $(OBJDIR)/http_transport.o \ |
| 774 | $(OBJDIR)/import.o \ |
| @@ -1098,10 +1101,11 @@ | |
| 1101 | $(OBJDIR)/fshell_.c:$(OBJDIR)/fshell.h \ |
| 1102 | $(OBJDIR)/fusefs_.c:$(OBJDIR)/fusefs.h \ |
| 1103 | $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h \ |
| 1104 | $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h \ |
| 1105 | $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h \ |
| 1106 | $(OBJDIR)/hname_.c:$(OBJDIR)/hname.h \ |
| 1107 | $(OBJDIR)/http_.c:$(OBJDIR)/http.h \ |
| 1108 | $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h \ |
| 1109 | $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h \ |
| 1110 | $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h \ |
| 1111 | $(OBJDIR)/import_.c:$(OBJDIR)/import.h \ |
| @@ -1502,10 +1506,18 @@ | |
| 1506 | |
| 1507 | $(OBJDIR)/gzip.o: $(OBJDIR)/gzip_.c $(OBJDIR)/gzip.h $(SRCDIR)/config.h |
| 1508 | $(XTCC) -o $(OBJDIR)/gzip.o -c $(OBJDIR)/gzip_.c |
| 1509 | |
| 1510 | $(OBJDIR)/gzip.h: $(OBJDIR)/headers |
| 1511 | |
| 1512 | $(OBJDIR)/hname_.c: $(SRCDIR)/hname.c $(TRANSLATE) |
| 1513 | $(TRANSLATE) $(SRCDIR)/hname.c >$@ |
| 1514 | |
| 1515 | $(OBJDIR)/hname.o: $(OBJDIR)/hname_.c $(OBJDIR)/hname.h $(SRCDIR)/config.h |
| 1516 | $(XTCC) -o $(OBJDIR)/hname.o -c $(OBJDIR)/hname_.c |
| 1517 | |
| 1518 | $(OBJDIR)/hname.h: $(OBJDIR)/headers |
| 1519 | |
| 1520 | $(OBJDIR)/http_.c: $(SRCDIR)/http.c $(TRANSLATE) |
| 1521 | $(TRANSLATE) $(SRCDIR)/http.c >$@ |
| 1522 | |
| 1523 | $(OBJDIR)/http.o: $(OBJDIR)/http_.c $(OBJDIR)/http.h $(SRCDIR)/config.h |
| 1524 |
+10
| --- win/Makefile.msc | ||
| +++ win/Makefile.msc | ||
| @@ -386,10 +386,11 @@ | ||
| 386 | 386 | fshell_.c \ |
| 387 | 387 | fusefs_.c \ |
| 388 | 388 | glob_.c \ |
| 389 | 389 | graph_.c \ |
| 390 | 390 | gzip_.c \ |
| 391 | + hname_.c \ | |
| 391 | 392 | http_.c \ |
| 392 | 393 | http_socket_.c \ |
| 393 | 394 | http_ssl_.c \ |
| 394 | 395 | http_transport_.c \ |
| 395 | 396 | import_.c \ |
| @@ -561,10 +562,11 @@ | ||
| 561 | 562 | $(OX)\fshell$O \ |
| 562 | 563 | $(OX)\fusefs$O \ |
| 563 | 564 | $(OX)\glob$O \ |
| 564 | 565 | $(OX)\graph$O \ |
| 565 | 566 | $(OX)\gzip$O \ |
| 567 | + $(OX)\hname$O \ | |
| 566 | 568 | $(OX)\http$O \ |
| 567 | 569 | $(OX)\http_socket$O \ |
| 568 | 570 | $(OX)\http_ssl$O \ |
| 569 | 571 | $(OX)\http_transport$O \ |
| 570 | 572 | $(OX)\import$O \ |
| @@ -745,10 +747,11 @@ | ||
| 745 | 747 | echo $(OX)\fshell.obj >> $@ |
| 746 | 748 | echo $(OX)\fusefs.obj >> $@ |
| 747 | 749 | echo $(OX)\glob.obj >> $@ |
| 748 | 750 | echo $(OX)\graph.obj >> $@ |
| 749 | 751 | echo $(OX)\gzip.obj >> $@ |
| 752 | + echo $(OX)\hname.obj >> $@ | |
| 750 | 753 | echo $(OX)\http.obj >> $@ |
| 751 | 754 | echo $(OX)\http_socket.obj >> $@ |
| 752 | 755 | echo $(OX)\http_ssl.obj >> $@ |
| 753 | 756 | echo $(OX)\http_transport.obj >> $@ |
| 754 | 757 | echo $(OX)\import.obj >> $@ |
| @@ -1178,10 +1181,16 @@ | ||
| 1178 | 1181 | $(OX)\gzip$O : gzip_.c gzip.h |
| 1179 | 1182 | $(TCC) /Fo$@ -c gzip_.c |
| 1180 | 1183 | |
| 1181 | 1184 | gzip_.c : $(SRCDIR)\gzip.c |
| 1182 | 1185 | translate$E $** > $@ |
| 1186 | + | |
| 1187 | +$(OX)\hname$O : hname_.c hname.h | |
| 1188 | + $(TCC) /Fo$@ -c hname_.c | |
| 1189 | + | |
| 1190 | +hname_.c : $(SRCDIR)\hname.c | |
| 1191 | + translate$E $** > $@ | |
| 1183 | 1192 | |
| 1184 | 1193 | $(OX)\http$O : http_.c http.h |
| 1185 | 1194 | $(TCC) /Fo$@ -c http_.c |
| 1186 | 1195 | |
| 1187 | 1196 | http_.c : $(SRCDIR)\http.c |
| @@ -1726,10 +1735,11 @@ | ||
| 1726 | 1735 | fshell_.c:fshell.h \ |
| 1727 | 1736 | fusefs_.c:fusefs.h \ |
| 1728 | 1737 | glob_.c:glob.h \ |
| 1729 | 1738 | graph_.c:graph.h \ |
| 1730 | 1739 | gzip_.c:gzip.h \ |
| 1740 | + hname_.c:hname.h \ | |
| 1731 | 1741 | http_.c:http.h \ |
| 1732 | 1742 | http_socket_.c:http_socket.h \ |
| 1733 | 1743 | http_ssl_.c:http_ssl.h \ |
| 1734 | 1744 | http_transport_.c:http_transport.h \ |
| 1735 | 1745 | import_.c:import.h \ |
| 1736 | 1746 |
| --- win/Makefile.msc | |
| +++ win/Makefile.msc | |
| @@ -386,10 +386,11 @@ | |
| 386 | fshell_.c \ |
| 387 | fusefs_.c \ |
| 388 | glob_.c \ |
| 389 | graph_.c \ |
| 390 | gzip_.c \ |
| 391 | http_.c \ |
| 392 | http_socket_.c \ |
| 393 | http_ssl_.c \ |
| 394 | http_transport_.c \ |
| 395 | import_.c \ |
| @@ -561,10 +562,11 @@ | |
| 561 | $(OX)\fshell$O \ |
| 562 | $(OX)\fusefs$O \ |
| 563 | $(OX)\glob$O \ |
| 564 | $(OX)\graph$O \ |
| 565 | $(OX)\gzip$O \ |
| 566 | $(OX)\http$O \ |
| 567 | $(OX)\http_socket$O \ |
| 568 | $(OX)\http_ssl$O \ |
| 569 | $(OX)\http_transport$O \ |
| 570 | $(OX)\import$O \ |
| @@ -745,10 +747,11 @@ | |
| 745 | echo $(OX)\fshell.obj >> $@ |
| 746 | echo $(OX)\fusefs.obj >> $@ |
| 747 | echo $(OX)\glob.obj >> $@ |
| 748 | echo $(OX)\graph.obj >> $@ |
| 749 | echo $(OX)\gzip.obj >> $@ |
| 750 | echo $(OX)\http.obj >> $@ |
| 751 | echo $(OX)\http_socket.obj >> $@ |
| 752 | echo $(OX)\http_ssl.obj >> $@ |
| 753 | echo $(OX)\http_transport.obj >> $@ |
| 754 | echo $(OX)\import.obj >> $@ |
| @@ -1178,10 +1181,16 @@ | |
| 1178 | $(OX)\gzip$O : gzip_.c gzip.h |
| 1179 | $(TCC) /Fo$@ -c gzip_.c |
| 1180 | |
| 1181 | gzip_.c : $(SRCDIR)\gzip.c |
| 1182 | translate$E $** > $@ |
| 1183 | |
| 1184 | $(OX)\http$O : http_.c http.h |
| 1185 | $(TCC) /Fo$@ -c http_.c |
| 1186 | |
| 1187 | http_.c : $(SRCDIR)\http.c |
| @@ -1726,10 +1735,11 @@ | |
| 1726 | fshell_.c:fshell.h \ |
| 1727 | fusefs_.c:fusefs.h \ |
| 1728 | glob_.c:glob.h \ |
| 1729 | graph_.c:graph.h \ |
| 1730 | gzip_.c:gzip.h \ |
| 1731 | http_.c:http.h \ |
| 1732 | http_socket_.c:http_socket.h \ |
| 1733 | http_ssl_.c:http_ssl.h \ |
| 1734 | http_transport_.c:http_transport.h \ |
| 1735 | import_.c:import.h \ |
| 1736 |
| --- win/Makefile.msc | |
| +++ win/Makefile.msc | |
| @@ -386,10 +386,11 @@ | |
| 386 | fshell_.c \ |
| 387 | fusefs_.c \ |
| 388 | glob_.c \ |
| 389 | graph_.c \ |
| 390 | gzip_.c \ |
| 391 | hname_.c \ |
| 392 | http_.c \ |
| 393 | http_socket_.c \ |
| 394 | http_ssl_.c \ |
| 395 | http_transport_.c \ |
| 396 | import_.c \ |
| @@ -561,10 +562,11 @@ | |
| 562 | $(OX)\fshell$O \ |
| 563 | $(OX)\fusefs$O \ |
| 564 | $(OX)\glob$O \ |
| 565 | $(OX)\graph$O \ |
| 566 | $(OX)\gzip$O \ |
| 567 | $(OX)\hname$O \ |
| 568 | $(OX)\http$O \ |
| 569 | $(OX)\http_socket$O \ |
| 570 | $(OX)\http_ssl$O \ |
| 571 | $(OX)\http_transport$O \ |
| 572 | $(OX)\import$O \ |
| @@ -745,10 +747,11 @@ | |
| 747 | echo $(OX)\fshell.obj >> $@ |
| 748 | echo $(OX)\fusefs.obj >> $@ |
| 749 | echo $(OX)\glob.obj >> $@ |
| 750 | echo $(OX)\graph.obj >> $@ |
| 751 | echo $(OX)\gzip.obj >> $@ |
| 752 | echo $(OX)\hname.obj >> $@ |
| 753 | echo $(OX)\http.obj >> $@ |
| 754 | echo $(OX)\http_socket.obj >> $@ |
| 755 | echo $(OX)\http_ssl.obj >> $@ |
| 756 | echo $(OX)\http_transport.obj >> $@ |
| 757 | echo $(OX)\import.obj >> $@ |
| @@ -1178,10 +1181,16 @@ | |
| 1181 | $(OX)\gzip$O : gzip_.c gzip.h |
| 1182 | $(TCC) /Fo$@ -c gzip_.c |
| 1183 | |
| 1184 | gzip_.c : $(SRCDIR)\gzip.c |
| 1185 | translate$E $** > $@ |
| 1186 | |
| 1187 | $(OX)\hname$O : hname_.c hname.h |
| 1188 | $(TCC) /Fo$@ -c hname_.c |
| 1189 | |
| 1190 | hname_.c : $(SRCDIR)\hname.c |
| 1191 | translate$E $** > $@ |
| 1192 | |
| 1193 | $(OX)\http$O : http_.c http.h |
| 1194 | $(TCC) /Fo$@ -c http_.c |
| 1195 | |
| 1196 | http_.c : $(SRCDIR)\http.c |
| @@ -1726,10 +1735,11 @@ | |
| 1735 | fshell_.c:fshell.h \ |
| 1736 | fusefs_.c:fusefs.h \ |
| 1737 | glob_.c:glob.h \ |
| 1738 | graph_.c:graph.h \ |
| 1739 | gzip_.c:gzip.h \ |
| 1740 | hname_.c:hname.h \ |
| 1741 | http_.c:http.h \ |
| 1742 | http_socket_.c:http_socket.h \ |
| 1743 | http_ssl_.c:http_ssl.h \ |
| 1744 | http_transport_.c:http_transport.h \ |
| 1745 | import_.c:import.h \ |
| 1746 |