Fossil SCM
Merge updates from trunk.
Commit
047235145cadc3c3c4034513f0f79adc29165b8f
Parent
29c2f70bfb53f52…
4 files changed
+10
-5
+10
-5
+1
-1
+1
-1
+10
-5
| --- src/manifest.c | ||
| +++ src/manifest.c | ||
| @@ -47,10 +47,11 @@ | ||
| 47 | 47 | /* |
| 48 | 48 | ** Flags for use with manifest_crosslink(). |
| 49 | 49 | */ |
| 50 | 50 | #define MC_NONE 0 /* default handling */ |
| 51 | 51 | #define MC_PERMIT_HOOKS 1 /* permit hooks to execute */ |
| 52 | +#define MC_NO_ERRORS 2 /* do not issue errors for a bad parse */ | |
| 52 | 53 | |
| 53 | 54 | /* |
| 54 | 55 | ** A single F-card within a manifest |
| 55 | 56 | */ |
| 56 | 57 | struct ManifestFile { |
| @@ -1744,25 +1745,29 @@ | ||
| 1744 | 1745 | |
| 1745 | 1746 | if( (p = manifest_cache_find(rid))!=0 ){ |
| 1746 | 1747 | blob_reset(pContent); |
| 1747 | 1748 | }else if( (p = manifest_parse(pContent, rid, 0))==0 ){ |
| 1748 | 1749 | assert( blob_is_reset(pContent) || pContent==0 ); |
| 1749 | - fossil_error(1, "syntax error in manifest [%s]", | |
| 1750 | - db_text(0, "SELECT uuid FROM blob WHERE rid=%d",rid)); | |
| 1750 | + if( (flags & MC_NO_ERRORS)==0 ){ | |
| 1751 | + fossil_error(1, "syntax error in manifest [%s]", | |
| 1752 | + db_text(0, "SELECT uuid FROM blob WHERE rid=%d",rid)); | |
| 1753 | + } | |
| 1751 | 1754 | return 0; |
| 1752 | 1755 | } |
| 1753 | 1756 | if( g.xlinkClusterOnly && p->type!=CFTYPE_CLUSTER ){ |
| 1754 | 1757 | manifest_destroy(p); |
| 1755 | 1758 | assert( blob_is_reset(pContent) ); |
| 1756 | - fossil_error(1, "no manifest"); | |
| 1759 | + if( (flags & MC_NO_ERRORS)==0 ) fossil_error(1, "no manifest"); | |
| 1757 | 1760 | return 0; |
| 1758 | 1761 | } |
| 1759 | 1762 | if( p->type==CFTYPE_MANIFEST && fetch_baseline(p, 0) ){ |
| 1760 | 1763 | manifest_destroy(p); |
| 1761 | 1764 | assert( blob_is_reset(pContent) ); |
| 1762 | - fossil_error(1, "cannot fetch baseline for manifest [%s]", | |
| 1763 | - db_text(0, "SELECT uuid FROM blob WHERE rid=%d",rid)); | |
| 1765 | + if( (flags & MC_NO_ERRORS)==0 ){ | |
| 1766 | + fossil_error(1, "cannot fetch baseline for manifest [%s]", | |
| 1767 | + db_text(0, "SELECT uuid FROM blob WHERE rid=%d",rid)); | |
| 1768 | + } | |
| 1764 | 1769 | return 0; |
| 1765 | 1770 | } |
| 1766 | 1771 | db_begin_transaction(); |
| 1767 | 1772 | if( p->type==CFTYPE_MANIFEST ){ |
| 1768 | 1773 | if( permitHooks ){ |
| 1769 | 1774 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -47,10 +47,11 @@ | |
| 47 | /* |
| 48 | ** Flags for use with manifest_crosslink(). |
| 49 | */ |
| 50 | #define MC_NONE 0 /* default handling */ |
| 51 | #define MC_PERMIT_HOOKS 1 /* permit hooks to execute */ |
| 52 | |
| 53 | /* |
| 54 | ** A single F-card within a manifest |
| 55 | */ |
| 56 | struct ManifestFile { |
| @@ -1744,25 +1745,29 @@ | |
| 1744 | |
| 1745 | if( (p = manifest_cache_find(rid))!=0 ){ |
| 1746 | blob_reset(pContent); |
| 1747 | }else if( (p = manifest_parse(pContent, rid, 0))==0 ){ |
| 1748 | assert( blob_is_reset(pContent) || pContent==0 ); |
| 1749 | fossil_error(1, "syntax error in manifest [%s]", |
| 1750 | db_text(0, "SELECT uuid FROM blob WHERE rid=%d",rid)); |
| 1751 | return 0; |
| 1752 | } |
| 1753 | if( g.xlinkClusterOnly && p->type!=CFTYPE_CLUSTER ){ |
| 1754 | manifest_destroy(p); |
| 1755 | assert( blob_is_reset(pContent) ); |
| 1756 | fossil_error(1, "no manifest"); |
| 1757 | return 0; |
| 1758 | } |
| 1759 | if( p->type==CFTYPE_MANIFEST && fetch_baseline(p, 0) ){ |
| 1760 | manifest_destroy(p); |
| 1761 | assert( blob_is_reset(pContent) ); |
| 1762 | fossil_error(1, "cannot fetch baseline for manifest [%s]", |
| 1763 | db_text(0, "SELECT uuid FROM blob WHERE rid=%d",rid)); |
| 1764 | return 0; |
| 1765 | } |
| 1766 | db_begin_transaction(); |
| 1767 | if( p->type==CFTYPE_MANIFEST ){ |
| 1768 | if( permitHooks ){ |
| 1769 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -47,10 +47,11 @@ | |
| 47 | /* |
| 48 | ** Flags for use with manifest_crosslink(). |
| 49 | */ |
| 50 | #define MC_NONE 0 /* default handling */ |
| 51 | #define MC_PERMIT_HOOKS 1 /* permit hooks to execute */ |
| 52 | #define MC_NO_ERRORS 2 /* do not issue errors for a bad parse */ |
| 53 | |
| 54 | /* |
| 55 | ** A single F-card within a manifest |
| 56 | */ |
| 57 | struct ManifestFile { |
| @@ -1744,25 +1745,29 @@ | |
| 1745 | |
| 1746 | if( (p = manifest_cache_find(rid))!=0 ){ |
| 1747 | blob_reset(pContent); |
| 1748 | }else if( (p = manifest_parse(pContent, rid, 0))==0 ){ |
| 1749 | assert( blob_is_reset(pContent) || pContent==0 ); |
| 1750 | if( (flags & MC_NO_ERRORS)==0 ){ |
| 1751 | fossil_error(1, "syntax error in manifest [%s]", |
| 1752 | db_text(0, "SELECT uuid FROM blob WHERE rid=%d",rid)); |
| 1753 | } |
| 1754 | return 0; |
| 1755 | } |
| 1756 | if( g.xlinkClusterOnly && p->type!=CFTYPE_CLUSTER ){ |
| 1757 | manifest_destroy(p); |
| 1758 | assert( blob_is_reset(pContent) ); |
| 1759 | if( (flags & MC_NO_ERRORS)==0 ) fossil_error(1, "no manifest"); |
| 1760 | return 0; |
| 1761 | } |
| 1762 | if( p->type==CFTYPE_MANIFEST && fetch_baseline(p, 0) ){ |
| 1763 | manifest_destroy(p); |
| 1764 | assert( blob_is_reset(pContent) ); |
| 1765 | if( (flags & MC_NO_ERRORS)==0 ){ |
| 1766 | fossil_error(1, "cannot fetch baseline for manifest [%s]", |
| 1767 | db_text(0, "SELECT uuid FROM blob WHERE rid=%d",rid)); |
| 1768 | } |
| 1769 | return 0; |
| 1770 | } |
| 1771 | db_begin_transaction(); |
| 1772 | if( p->type==CFTYPE_MANIFEST ){ |
| 1773 | if( permitHooks ){ |
| 1774 |
+10
-5
| --- src/manifest.c | ||
| +++ src/manifest.c | ||
| @@ -47,10 +47,11 @@ | ||
| 47 | 47 | /* |
| 48 | 48 | ** Flags for use with manifest_crosslink(). |
| 49 | 49 | */ |
| 50 | 50 | #define MC_NONE 0 /* default handling */ |
| 51 | 51 | #define MC_PERMIT_HOOKS 1 /* permit hooks to execute */ |
| 52 | +#define MC_NO_ERRORS 2 /* do not issue errors for a bad parse */ | |
| 52 | 53 | |
| 53 | 54 | /* |
| 54 | 55 | ** A single F-card within a manifest |
| 55 | 56 | */ |
| 56 | 57 | struct ManifestFile { |
| @@ -1744,25 +1745,29 @@ | ||
| 1744 | 1745 | |
| 1745 | 1746 | if( (p = manifest_cache_find(rid))!=0 ){ |
| 1746 | 1747 | blob_reset(pContent); |
| 1747 | 1748 | }else if( (p = manifest_parse(pContent, rid, 0))==0 ){ |
| 1748 | 1749 | assert( blob_is_reset(pContent) || pContent==0 ); |
| 1749 | - fossil_error(1, "syntax error in manifest [%s]", | |
| 1750 | - db_text(0, "SELECT uuid FROM blob WHERE rid=%d",rid)); | |
| 1750 | + if( (flags & MC_NO_ERRORS)==0 ){ | |
| 1751 | + fossil_error(1, "syntax error in manifest [%s]", | |
| 1752 | + db_text(0, "SELECT uuid FROM blob WHERE rid=%d",rid)); | |
| 1753 | + } | |
| 1751 | 1754 | return 0; |
| 1752 | 1755 | } |
| 1753 | 1756 | if( g.xlinkClusterOnly && p->type!=CFTYPE_CLUSTER ){ |
| 1754 | 1757 | manifest_destroy(p); |
| 1755 | 1758 | assert( blob_is_reset(pContent) ); |
| 1756 | - fossil_error(1, "no manifest"); | |
| 1759 | + if( (flags & MC_NO_ERRORS)==0 ) fossil_error(1, "no manifest"); | |
| 1757 | 1760 | return 0; |
| 1758 | 1761 | } |
| 1759 | 1762 | if( p->type==CFTYPE_MANIFEST && fetch_baseline(p, 0) ){ |
| 1760 | 1763 | manifest_destroy(p); |
| 1761 | 1764 | assert( blob_is_reset(pContent) ); |
| 1762 | - fossil_error(1, "cannot fetch baseline for manifest [%s]", | |
| 1763 | - db_text(0, "SELECT uuid FROM blob WHERE rid=%d",rid)); | |
| 1765 | + if( (flags & MC_NO_ERRORS)==0 ){ | |
| 1766 | + fossil_error(1, "cannot fetch baseline for manifest [%s]", | |
| 1767 | + db_text(0, "SELECT uuid FROM blob WHERE rid=%d",rid)); | |
| 1768 | + } | |
| 1764 | 1769 | return 0; |
| 1765 | 1770 | } |
| 1766 | 1771 | db_begin_transaction(); |
| 1767 | 1772 | if( p->type==CFTYPE_MANIFEST ){ |
| 1768 | 1773 | if( permitHooks ){ |
| 1769 | 1774 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -47,10 +47,11 @@ | |
| 47 | /* |
| 48 | ** Flags for use with manifest_crosslink(). |
| 49 | */ |
| 50 | #define MC_NONE 0 /* default handling */ |
| 51 | #define MC_PERMIT_HOOKS 1 /* permit hooks to execute */ |
| 52 | |
| 53 | /* |
| 54 | ** A single F-card within a manifest |
| 55 | */ |
| 56 | struct ManifestFile { |
| @@ -1744,25 +1745,29 @@ | |
| 1744 | |
| 1745 | if( (p = manifest_cache_find(rid))!=0 ){ |
| 1746 | blob_reset(pContent); |
| 1747 | }else if( (p = manifest_parse(pContent, rid, 0))==0 ){ |
| 1748 | assert( blob_is_reset(pContent) || pContent==0 ); |
| 1749 | fossil_error(1, "syntax error in manifest [%s]", |
| 1750 | db_text(0, "SELECT uuid FROM blob WHERE rid=%d",rid)); |
| 1751 | return 0; |
| 1752 | } |
| 1753 | if( g.xlinkClusterOnly && p->type!=CFTYPE_CLUSTER ){ |
| 1754 | manifest_destroy(p); |
| 1755 | assert( blob_is_reset(pContent) ); |
| 1756 | fossil_error(1, "no manifest"); |
| 1757 | return 0; |
| 1758 | } |
| 1759 | if( p->type==CFTYPE_MANIFEST && fetch_baseline(p, 0) ){ |
| 1760 | manifest_destroy(p); |
| 1761 | assert( blob_is_reset(pContent) ); |
| 1762 | fossil_error(1, "cannot fetch baseline for manifest [%s]", |
| 1763 | db_text(0, "SELECT uuid FROM blob WHERE rid=%d",rid)); |
| 1764 | return 0; |
| 1765 | } |
| 1766 | db_begin_transaction(); |
| 1767 | if( p->type==CFTYPE_MANIFEST ){ |
| 1768 | if( permitHooks ){ |
| 1769 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -47,10 +47,11 @@ | |
| 47 | /* |
| 48 | ** Flags for use with manifest_crosslink(). |
| 49 | */ |
| 50 | #define MC_NONE 0 /* default handling */ |
| 51 | #define MC_PERMIT_HOOKS 1 /* permit hooks to execute */ |
| 52 | #define MC_NO_ERRORS 2 /* do not issue errors for a bad parse */ |
| 53 | |
| 54 | /* |
| 55 | ** A single F-card within a manifest |
| 56 | */ |
| 57 | struct ManifestFile { |
| @@ -1744,25 +1745,29 @@ | |
| 1745 | |
| 1746 | if( (p = manifest_cache_find(rid))!=0 ){ |
| 1747 | blob_reset(pContent); |
| 1748 | }else if( (p = manifest_parse(pContent, rid, 0))==0 ){ |
| 1749 | assert( blob_is_reset(pContent) || pContent==0 ); |
| 1750 | if( (flags & MC_NO_ERRORS)==0 ){ |
| 1751 | fossil_error(1, "syntax error in manifest [%s]", |
| 1752 | db_text(0, "SELECT uuid FROM blob WHERE rid=%d",rid)); |
| 1753 | } |
| 1754 | return 0; |
| 1755 | } |
| 1756 | if( g.xlinkClusterOnly && p->type!=CFTYPE_CLUSTER ){ |
| 1757 | manifest_destroy(p); |
| 1758 | assert( blob_is_reset(pContent) ); |
| 1759 | if( (flags & MC_NO_ERRORS)==0 ) fossil_error(1, "no manifest"); |
| 1760 | return 0; |
| 1761 | } |
| 1762 | if( p->type==CFTYPE_MANIFEST && fetch_baseline(p, 0) ){ |
| 1763 | manifest_destroy(p); |
| 1764 | assert( blob_is_reset(pContent) ); |
| 1765 | if( (flags & MC_NO_ERRORS)==0 ){ |
| 1766 | fossil_error(1, "cannot fetch baseline for manifest [%s]", |
| 1767 | db_text(0, "SELECT uuid FROM blob WHERE rid=%d",rid)); |
| 1768 | } |
| 1769 | return 0; |
| 1770 | } |
| 1771 | db_begin_transaction(); |
| 1772 | if( p->type==CFTYPE_MANIFEST ){ |
| 1773 | if( permitHooks ){ |
| 1774 |
+1
-1
| --- src/xfer.c | ||
| +++ src/xfer.c | ||
| @@ -201,11 +201,11 @@ | ||
| 201 | 201 | if( rid==0 ){ |
| 202 | 202 | blob_appendf(&pXfer->err, "%s", g.zErrMsg); |
| 203 | 203 | blob_reset(&content); |
| 204 | 204 | }else{ |
| 205 | 205 | if( !isPriv ) content_make_public(rid); |
| 206 | - manifest_crosslink(rid, &content, MC_NONE); | |
| 206 | + manifest_crosslink(rid, &content, MC_NO_ERRORS); | |
| 207 | 207 | } |
| 208 | 208 | assert( blob_is_reset(&content) ); |
| 209 | 209 | remote_has(rid); |
| 210 | 210 | } |
| 211 | 211 | |
| 212 | 212 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -201,11 +201,11 @@ | |
| 201 | if( rid==0 ){ |
| 202 | blob_appendf(&pXfer->err, "%s", g.zErrMsg); |
| 203 | blob_reset(&content); |
| 204 | }else{ |
| 205 | if( !isPriv ) content_make_public(rid); |
| 206 | manifest_crosslink(rid, &content, MC_NONE); |
| 207 | } |
| 208 | assert( blob_is_reset(&content) ); |
| 209 | remote_has(rid); |
| 210 | } |
| 211 | |
| 212 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -201,11 +201,11 @@ | |
| 201 | if( rid==0 ){ |
| 202 | blob_appendf(&pXfer->err, "%s", g.zErrMsg); |
| 203 | blob_reset(&content); |
| 204 | }else{ |
| 205 | if( !isPriv ) content_make_public(rid); |
| 206 | manifest_crosslink(rid, &content, MC_NO_ERRORS); |
| 207 | } |
| 208 | assert( blob_is_reset(&content) ); |
| 209 | remote_has(rid); |
| 210 | } |
| 211 | |
| 212 |
+1
-1
| --- src/xfer.c | ||
| +++ src/xfer.c | ||
| @@ -201,11 +201,11 @@ | ||
| 201 | 201 | if( rid==0 ){ |
| 202 | 202 | blob_appendf(&pXfer->err, "%s", g.zErrMsg); |
| 203 | 203 | blob_reset(&content); |
| 204 | 204 | }else{ |
| 205 | 205 | if( !isPriv ) content_make_public(rid); |
| 206 | - manifest_crosslink(rid, &content, MC_NONE); | |
| 206 | + manifest_crosslink(rid, &content, MC_NO_ERRORS); | |
| 207 | 207 | } |
| 208 | 208 | assert( blob_is_reset(&content) ); |
| 209 | 209 | remote_has(rid); |
| 210 | 210 | } |
| 211 | 211 | |
| 212 | 212 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -201,11 +201,11 @@ | |
| 201 | if( rid==0 ){ |
| 202 | blob_appendf(&pXfer->err, "%s", g.zErrMsg); |
| 203 | blob_reset(&content); |
| 204 | }else{ |
| 205 | if( !isPriv ) content_make_public(rid); |
| 206 | manifest_crosslink(rid, &content, MC_NONE); |
| 207 | } |
| 208 | assert( blob_is_reset(&content) ); |
| 209 | remote_has(rid); |
| 210 | } |
| 211 | |
| 212 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -201,11 +201,11 @@ | |
| 201 | if( rid==0 ){ |
| 202 | blob_appendf(&pXfer->err, "%s", g.zErrMsg); |
| 203 | blob_reset(&content); |
| 204 | }else{ |
| 205 | if( !isPriv ) content_make_public(rid); |
| 206 | manifest_crosslink(rid, &content, MC_NO_ERRORS); |
| 207 | } |
| 208 | assert( blob_is_reset(&content) ); |
| 209 | remote_has(rid); |
| 210 | } |
| 211 | |
| 212 |