Fossil SCM
merged trunk to branch
Commit
ef6979eac9abdedb609154ea48178a0d91a5b571
Parent
a5576e2d51fc5c8…
11 files changed
+2
-1
+2
+2
+1
+1
+1
+1
+1
-3
+1
-3
+1
-3
+1
-1
+2
-1
| --- src/encode.c | ||
| +++ src/encode.c | ||
| @@ -100,11 +100,12 @@ | ||
| 100 | 100 | int i = 0; |
| 101 | 101 | int count = 0; |
| 102 | 102 | char *zOut; |
| 103 | 103 | int other; |
| 104 | 104 | # define IsSafeChar(X) \ |
| 105 | - (isalnum(X) || (X)=='.' || (X)=='$' || (X)=='-' || (X)=='_' || (X)==other) | |
| 105 | + (isalnum(X) || (X)=='.' || (X)=='$' \ | |
| 106 | + || (X)=='~' || (X)=='-' || (X)=='_' || (X)==other) | |
| 106 | 107 | |
| 107 | 108 | if( zIn==0 ) return 0; |
| 108 | 109 | if( n<0 ) n = strlen(zIn); |
| 109 | 110 | other = encodeSlash ? 'a' : '/'; |
| 110 | 111 | while( i<n && (c = zIn[i])!=0 ){ |
| 111 | 112 |
| --- src/encode.c | |
| +++ src/encode.c | |
| @@ -100,11 +100,12 @@ | |
| 100 | int i = 0; |
| 101 | int count = 0; |
| 102 | char *zOut; |
| 103 | int other; |
| 104 | # define IsSafeChar(X) \ |
| 105 | (isalnum(X) || (X)=='.' || (X)=='$' || (X)=='-' || (X)=='_' || (X)==other) |
| 106 | |
| 107 | if( zIn==0 ) return 0; |
| 108 | if( n<0 ) n = strlen(zIn); |
| 109 | other = encodeSlash ? 'a' : '/'; |
| 110 | while( i<n && (c = zIn[i])!=0 ){ |
| 111 |
| --- src/encode.c | |
| +++ src/encode.c | |
| @@ -100,11 +100,12 @@ | |
| 100 | int i = 0; |
| 101 | int count = 0; |
| 102 | char *zOut; |
| 103 | int other; |
| 104 | # define IsSafeChar(X) \ |
| 105 | (isalnum(X) || (X)=='.' || (X)=='$' \ |
| 106 | || (X)=='~' || (X)=='-' || (X)=='_' || (X)==other) |
| 107 | |
| 108 | if( zIn==0 ) return 0; |
| 109 | if( n<0 ) n = strlen(zIn); |
| 110 | other = encodeSlash ? 'a' : '/'; |
| 111 | while( i<n && (c = zIn[i])!=0 ){ |
| 112 |
+2
| --- src/rebuild.c | ||
| +++ src/rebuild.c | ||
| @@ -446,10 +446,12 @@ | ||
| 446 | 446 | blob_appendf(&path, "%s/%s", g.argv[3], pEntry->d_name); |
| 447 | 447 | if( blob_read_from_file(&aContent, blob_str(&path))==-1 ){ |
| 448 | 448 | fossil_panic("Some unknown error occurred while reading \"%s\"", blob_str(&path)); |
| 449 | 449 | } |
| 450 | 450 | content_put(&aContent, 0, 0); |
| 451 | + blob_reset(&path); | |
| 452 | + blob_reset(&aContent); | |
| 451 | 453 | } |
| 452 | 454 | } |
| 453 | 455 | else { |
| 454 | 456 | fossil_panic("Encountered error %d while trying to open \"%s\".", errno, g.argv[3]); |
| 455 | 457 | } |
| 456 | 458 |
| --- src/rebuild.c | |
| +++ src/rebuild.c | |
| @@ -446,10 +446,12 @@ | |
| 446 | blob_appendf(&path, "%s/%s", g.argv[3], pEntry->d_name); |
| 447 | if( blob_read_from_file(&aContent, blob_str(&path))==-1 ){ |
| 448 | fossil_panic("Some unknown error occurred while reading \"%s\"", blob_str(&path)); |
| 449 | } |
| 450 | content_put(&aContent, 0, 0); |
| 451 | } |
| 452 | } |
| 453 | else { |
| 454 | fossil_panic("Encountered error %d while trying to open \"%s\".", errno, g.argv[3]); |
| 455 | } |
| 456 |
| --- src/rebuild.c | |
| +++ src/rebuild.c | |
| @@ -446,10 +446,12 @@ | |
| 446 | blob_appendf(&path, "%s/%s", g.argv[3], pEntry->d_name); |
| 447 | if( blob_read_from_file(&aContent, blob_str(&path))==-1 ){ |
| 448 | fossil_panic("Some unknown error occurred while reading \"%s\"", blob_str(&path)); |
| 449 | } |
| 450 | content_put(&aContent, 0, 0); |
| 451 | blob_reset(&path); |
| 452 | blob_reset(&aContent); |
| 453 | } |
| 454 | } |
| 455 | else { |
| 456 | fossil_panic("Encountered error %d while trying to open \"%s\".", errno, g.argv[3]); |
| 457 | } |
| 458 |
+2
| --- src/rebuild.c | ||
| +++ src/rebuild.c | ||
| @@ -446,10 +446,12 @@ | ||
| 446 | 446 | blob_appendf(&path, "%s/%s", g.argv[3], pEntry->d_name); |
| 447 | 447 | if( blob_read_from_file(&aContent, blob_str(&path))==-1 ){ |
| 448 | 448 | fossil_panic("Some unknown error occurred while reading \"%s\"", blob_str(&path)); |
| 449 | 449 | } |
| 450 | 450 | content_put(&aContent, 0, 0); |
| 451 | + blob_reset(&path); | |
| 452 | + blob_reset(&aContent); | |
| 451 | 453 | } |
| 452 | 454 | } |
| 453 | 455 | else { |
| 454 | 456 | fossil_panic("Encountered error %d while trying to open \"%s\".", errno, g.argv[3]); |
| 455 | 457 | } |
| 456 | 458 |
| --- src/rebuild.c | |
| +++ src/rebuild.c | |
| @@ -446,10 +446,12 @@ | |
| 446 | blob_appendf(&path, "%s/%s", g.argv[3], pEntry->d_name); |
| 447 | if( blob_read_from_file(&aContent, blob_str(&path))==-1 ){ |
| 448 | fossil_panic("Some unknown error occurred while reading \"%s\"", blob_str(&path)); |
| 449 | } |
| 450 | content_put(&aContent, 0, 0); |
| 451 | } |
| 452 | } |
| 453 | else { |
| 454 | fossil_panic("Encountered error %d while trying to open \"%s\".", errno, g.argv[3]); |
| 455 | } |
| 456 |
| --- src/rebuild.c | |
| +++ src/rebuild.c | |
| @@ -446,10 +446,12 @@ | |
| 446 | blob_appendf(&path, "%s/%s", g.argv[3], pEntry->d_name); |
| 447 | if( blob_read_from_file(&aContent, blob_str(&path))==-1 ){ |
| 448 | fossil_panic("Some unknown error occurred while reading \"%s\"", blob_str(&path)); |
| 449 | } |
| 450 | content_put(&aContent, 0, 0); |
| 451 | blob_reset(&path); |
| 452 | blob_reset(&aContent); |
| 453 | } |
| 454 | } |
| 455 | else { |
| 456 | fossil_panic("Encountered error %d while trying to open \"%s\".", errno, g.argv[3]); |
| 457 | } |
| 458 |
+1
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -909,10 +909,11 @@ | ||
| 909 | 909 | @ of CSS files can be seen on the <a href="setup_skin">skins page</a>. |
| 910 | 910 | @ See also the <a href="setup_header">header</a> and |
| 911 | 911 | @ <a href="setup_footer">footer</a> editing screens. |
| 912 | 912 | @ <blockquote><pre> |
| 913 | 913 | cgi_append_default_css(); |
| 914 | + @ </pre></blockquote> | |
| 914 | 915 | style_footer(); |
| 915 | 916 | db_end_transaction(0); |
| 916 | 917 | } |
| 917 | 918 | |
| 918 | 919 | /* |
| 919 | 920 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -909,10 +909,11 @@ | |
| 909 | @ of CSS files can be seen on the <a href="setup_skin">skins page</a>. |
| 910 | @ See also the <a href="setup_header">header</a> and |
| 911 | @ <a href="setup_footer">footer</a> editing screens. |
| 912 | @ <blockquote><pre> |
| 913 | cgi_append_default_css(); |
| 914 | style_footer(); |
| 915 | db_end_transaction(0); |
| 916 | } |
| 917 | |
| 918 | /* |
| 919 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -909,10 +909,11 @@ | |
| 909 | @ of CSS files can be seen on the <a href="setup_skin">skins page</a>. |
| 910 | @ See also the <a href="setup_header">header</a> and |
| 911 | @ <a href="setup_footer">footer</a> editing screens. |
| 912 | @ <blockquote><pre> |
| 913 | cgi_append_default_css(); |
| 914 | @ </pre></blockquote> |
| 915 | style_footer(); |
| 916 | db_end_transaction(0); |
| 917 | } |
| 918 | |
| 919 | /* |
| 920 |
+1
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -909,10 +909,11 @@ | ||
| 909 | 909 | @ of CSS files can be seen on the <a href="setup_skin">skins page</a>. |
| 910 | 910 | @ See also the <a href="setup_header">header</a> and |
| 911 | 911 | @ <a href="setup_footer">footer</a> editing screens. |
| 912 | 912 | @ <blockquote><pre> |
| 913 | 913 | cgi_append_default_css(); |
| 914 | + @ </pre></blockquote> | |
| 914 | 915 | style_footer(); |
| 915 | 916 | db_end_transaction(0); |
| 916 | 917 | } |
| 917 | 918 | |
| 918 | 919 | /* |
| 919 | 920 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -909,10 +909,11 @@ | |
| 909 | @ of CSS files can be seen on the <a href="setup_skin">skins page</a>. |
| 910 | @ See also the <a href="setup_header">header</a> and |
| 911 | @ <a href="setup_footer">footer</a> editing screens. |
| 912 | @ <blockquote><pre> |
| 913 | cgi_append_default_css(); |
| 914 | style_footer(); |
| 915 | db_end_transaction(0); |
| 916 | } |
| 917 | |
| 918 | /* |
| 919 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -909,10 +909,11 @@ | |
| 909 | @ of CSS files can be seen on the <a href="setup_skin">skins page</a>. |
| 910 | @ See also the <a href="setup_header">header</a> and |
| 911 | @ <a href="setup_footer">footer</a> editing screens. |
| 912 | @ <blockquote><pre> |
| 913 | cgi_append_default_css(); |
| 914 | @ </pre></blockquote> |
| 915 | style_footer(); |
| 916 | db_end_transaction(0); |
| 917 | } |
| 918 | |
| 919 | /* |
| 920 |
+1
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -909,10 +909,11 @@ | ||
| 909 | 909 | @ of CSS files can be seen on the <a href="setup_skin">skins page</a>. |
| 910 | 910 | @ See also the <a href="setup_header">header</a> and |
| 911 | 911 | @ <a href="setup_footer">footer</a> editing screens. |
| 912 | 912 | @ <blockquote><pre> |
| 913 | 913 | cgi_append_default_css(); |
| 914 | + @ </pre></blockquote> | |
| 914 | 915 | style_footer(); |
| 915 | 916 | db_end_transaction(0); |
| 916 | 917 | } |
| 917 | 918 | |
| 918 | 919 | /* |
| 919 | 920 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -909,10 +909,11 @@ | |
| 909 | @ of CSS files can be seen on the <a href="setup_skin">skins page</a>. |
| 910 | @ See also the <a href="setup_header">header</a> and |
| 911 | @ <a href="setup_footer">footer</a> editing screens. |
| 912 | @ <blockquote><pre> |
| 913 | cgi_append_default_css(); |
| 914 | style_footer(); |
| 915 | db_end_transaction(0); |
| 916 | } |
| 917 | |
| 918 | /* |
| 919 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -909,10 +909,11 @@ | |
| 909 | @ of CSS files can be seen on the <a href="setup_skin">skins page</a>. |
| 910 | @ See also the <a href="setup_header">header</a> and |
| 911 | @ <a href="setup_footer">footer</a> editing screens. |
| 912 | @ <blockquote><pre> |
| 913 | cgi_append_default_css(); |
| 914 | @ </pre></blockquote> |
| 915 | style_footer(); |
| 916 | db_end_transaction(0); |
| 917 | } |
| 918 | |
| 919 | /* |
| 920 |
+1
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -909,10 +909,11 @@ | ||
| 909 | 909 | @ of CSS files can be seen on the <a href="setup_skin">skins page</a>. |
| 910 | 910 | @ See also the <a href="setup_header">header</a> and |
| 911 | 911 | @ <a href="setup_footer">footer</a> editing screens. |
| 912 | 912 | @ <blockquote><pre> |
| 913 | 913 | cgi_append_default_css(); |
| 914 | + @ </pre></blockquote> | |
| 914 | 915 | style_footer(); |
| 915 | 916 | db_end_transaction(0); |
| 916 | 917 | } |
| 917 | 918 | |
| 918 | 919 | /* |
| 919 | 920 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -909,10 +909,11 @@ | |
| 909 | @ of CSS files can be seen on the <a href="setup_skin">skins page</a>. |
| 910 | @ See also the <a href="setup_header">header</a> and |
| 911 | @ <a href="setup_footer">footer</a> editing screens. |
| 912 | @ <blockquote><pre> |
| 913 | cgi_append_default_css(); |
| 914 | style_footer(); |
| 915 | db_end_transaction(0); |
| 916 | } |
| 917 | |
| 918 | /* |
| 919 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -909,10 +909,11 @@ | |
| 909 | @ of CSS files can be seen on the <a href="setup_skin">skins page</a>. |
| 910 | @ See also the <a href="setup_header">header</a> and |
| 911 | @ <a href="setup_footer">footer</a> editing screens. |
| 912 | @ <blockquote><pre> |
| 913 | cgi_append_default_css(); |
| 914 | @ </pre></blockquote> |
| 915 | style_footer(); |
| 916 | db_end_transaction(0); |
| 917 | } |
| 918 | |
| 919 | /* |
| 920 |
+1
-3
| --- src/update.c | ||
| +++ src/update.c | ||
| @@ -24,13 +24,11 @@ | ||
| 24 | 24 | |
| 25 | 25 | /* |
| 26 | 26 | ** Return true if artifact rid is a version |
| 27 | 27 | */ |
| 28 | 28 | int is_a_version(int rid){ |
| 29 | - return db_exists("SELECT 1 FROM plink WHERE cid=%d " | |
| 30 | - "UNION ALL SELECT 1 FROM plink WHERE pid=%d", | |
| 31 | - rid, rid); | |
| 29 | + return db_exists("SELECT 1 FROM event WHERE objid=%d AND type='ci'", rid); | |
| 32 | 30 | } |
| 33 | 31 | |
| 34 | 32 | /* |
| 35 | 33 | ** COMMAND: update |
| 36 | 34 | ** |
| 37 | 35 |
| --- src/update.c | |
| +++ src/update.c | |
| @@ -24,13 +24,11 @@ | |
| 24 | |
| 25 | /* |
| 26 | ** Return true if artifact rid is a version |
| 27 | */ |
| 28 | int is_a_version(int rid){ |
| 29 | return db_exists("SELECT 1 FROM plink WHERE cid=%d " |
| 30 | "UNION ALL SELECT 1 FROM plink WHERE pid=%d", |
| 31 | rid, rid); |
| 32 | } |
| 33 | |
| 34 | /* |
| 35 | ** COMMAND: update |
| 36 | ** |
| 37 |
| --- src/update.c | |
| +++ src/update.c | |
| @@ -24,13 +24,11 @@ | |
| 24 | |
| 25 | /* |
| 26 | ** Return true if artifact rid is a version |
| 27 | */ |
| 28 | int is_a_version(int rid){ |
| 29 | return db_exists("SELECT 1 FROM event WHERE objid=%d AND type='ci'", rid); |
| 30 | } |
| 31 | |
| 32 | /* |
| 33 | ** COMMAND: update |
| 34 | ** |
| 35 |
+1
-3
| --- src/update.c | ||
| +++ src/update.c | ||
| @@ -24,13 +24,11 @@ | ||
| 24 | 24 | |
| 25 | 25 | /* |
| 26 | 26 | ** Return true if artifact rid is a version |
| 27 | 27 | */ |
| 28 | 28 | int is_a_version(int rid){ |
| 29 | - return db_exists("SELECT 1 FROM plink WHERE cid=%d " | |
| 30 | - "UNION ALL SELECT 1 FROM plink WHERE pid=%d", | |
| 31 | - rid, rid); | |
| 29 | + return db_exists("SELECT 1 FROM event WHERE objid=%d AND type='ci'", rid); | |
| 32 | 30 | } |
| 33 | 31 | |
| 34 | 32 | /* |
| 35 | 33 | ** COMMAND: update |
| 36 | 34 | ** |
| 37 | 35 |
| --- src/update.c | |
| +++ src/update.c | |
| @@ -24,13 +24,11 @@ | |
| 24 | |
| 25 | /* |
| 26 | ** Return true if artifact rid is a version |
| 27 | */ |
| 28 | int is_a_version(int rid){ |
| 29 | return db_exists("SELECT 1 FROM plink WHERE cid=%d " |
| 30 | "UNION ALL SELECT 1 FROM plink WHERE pid=%d", |
| 31 | rid, rid); |
| 32 | } |
| 33 | |
| 34 | /* |
| 35 | ** COMMAND: update |
| 36 | ** |
| 37 |
| --- src/update.c | |
| +++ src/update.c | |
| @@ -24,13 +24,11 @@ | |
| 24 | |
| 25 | /* |
| 26 | ** Return true if artifact rid is a version |
| 27 | */ |
| 28 | int is_a_version(int rid){ |
| 29 | return db_exists("SELECT 1 FROM event WHERE objid=%d AND type='ci'", rid); |
| 30 | } |
| 31 | |
| 32 | /* |
| 33 | ** COMMAND: update |
| 34 | ** |
| 35 |
+1
-3
| --- src/update.c | ||
| +++ src/update.c | ||
| @@ -24,13 +24,11 @@ | ||
| 24 | 24 | |
| 25 | 25 | /* |
| 26 | 26 | ** Return true if artifact rid is a version |
| 27 | 27 | */ |
| 28 | 28 | int is_a_version(int rid){ |
| 29 | - return db_exists("SELECT 1 FROM plink WHERE cid=%d " | |
| 30 | - "UNION ALL SELECT 1 FROM plink WHERE pid=%d", | |
| 31 | - rid, rid); | |
| 29 | + return db_exists("SELECT 1 FROM event WHERE objid=%d AND type='ci'", rid); | |
| 32 | 30 | } |
| 33 | 31 | |
| 34 | 32 | /* |
| 35 | 33 | ** COMMAND: update |
| 36 | 34 | ** |
| 37 | 35 |
| --- src/update.c | |
| +++ src/update.c | |
| @@ -24,13 +24,11 @@ | |
| 24 | |
| 25 | /* |
| 26 | ** Return true if artifact rid is a version |
| 27 | */ |
| 28 | int is_a_version(int rid){ |
| 29 | return db_exists("SELECT 1 FROM plink WHERE cid=%d " |
| 30 | "UNION ALL SELECT 1 FROM plink WHERE pid=%d", |
| 31 | rid, rid); |
| 32 | } |
| 33 | |
| 34 | /* |
| 35 | ** COMMAND: update |
| 36 | ** |
| 37 |
| --- src/update.c | |
| +++ src/update.c | |
| @@ -24,13 +24,11 @@ | |
| 24 | |
| 25 | /* |
| 26 | ** Return true if artifact rid is a version |
| 27 | */ |
| 28 | int is_a_version(int rid){ |
| 29 | return db_exists("SELECT 1 FROM event WHERE objid=%d AND type='ci'", rid); |
| 30 | } |
| 31 | |
| 32 | /* |
| 33 | ** COMMAND: update |
| 34 | ** |
| 35 |
+1
-1
| --- src/url.c | ||
| +++ src/url.c | ||
| @@ -119,11 +119,11 @@ | ||
| 119 | 119 | }else{ |
| 120 | 120 | g.urlPort = g.urlDfltPort; |
| 121 | 121 | g.urlHostname = g.urlName; |
| 122 | 122 | } |
| 123 | 123 | dehttpize(g.urlName); |
| 124 | - g.urlPath = mprintf(&zUrl[i]); | |
| 124 | + g.urlPath = mprintf("%s", &zUrl[i]); | |
| 125 | 125 | for(i=0; g.urlPath[i] && g.urlPath[i]!='?'; i++){} |
| 126 | 126 | if( g.urlPath[i] ){ |
| 127 | 127 | g.urlPath[i] = 0; |
| 128 | 128 | i++; |
| 129 | 129 | } |
| 130 | 130 |
| --- src/url.c | |
| +++ src/url.c | |
| @@ -119,11 +119,11 @@ | |
| 119 | }else{ |
| 120 | g.urlPort = g.urlDfltPort; |
| 121 | g.urlHostname = g.urlName; |
| 122 | } |
| 123 | dehttpize(g.urlName); |
| 124 | g.urlPath = mprintf(&zUrl[i]); |
| 125 | for(i=0; g.urlPath[i] && g.urlPath[i]!='?'; i++){} |
| 126 | if( g.urlPath[i] ){ |
| 127 | g.urlPath[i] = 0; |
| 128 | i++; |
| 129 | } |
| 130 |
| --- src/url.c | |
| +++ src/url.c | |
| @@ -119,11 +119,11 @@ | |
| 119 | }else{ |
| 120 | g.urlPort = g.urlDfltPort; |
| 121 | g.urlHostname = g.urlName; |
| 122 | } |
| 123 | dehttpize(g.urlName); |
| 124 | g.urlPath = mprintf("%s", &zUrl[i]); |
| 125 | for(i=0; g.urlPath[i] && g.urlPath[i]!='?'; i++){} |
| 126 | if( g.urlPath[i] ){ |
| 127 | g.urlPath[i] = 0; |
| 128 | i++; |
| 129 | } |
| 130 |