Fossil SCM

Merge updates from trunk.

mistachkin 2014-10-22 19:30 UTC better-error-msgs merge
Commit 047235145cadc3c3c4034513f0f79adc29165b8f
+10 -5
--- src/manifest.c
+++ src/manifest.c
@@ -47,10 +47,11 @@
4747
/*
4848
** Flags for use with manifest_crosslink().
4949
*/
5050
#define MC_NONE 0 /* default handling */
5151
#define MC_PERMIT_HOOKS 1 /* permit hooks to execute */
52
+#define MC_NO_ERRORS 2 /* do not issue errors for a bad parse */
5253
5354
/*
5455
** A single F-card within a manifest
5556
*/
5657
struct ManifestFile {
@@ -1744,25 +1745,29 @@
17441745
17451746
if( (p = manifest_cache_find(rid))!=0 ){
17461747
blob_reset(pContent);
17471748
}else if( (p = manifest_parse(pContent, rid, 0))==0 ){
17481749
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
+ }
17511754
return 0;
17521755
}
17531756
if( g.xlinkClusterOnly && p->type!=CFTYPE_CLUSTER ){
17541757
manifest_destroy(p);
17551758
assert( blob_is_reset(pContent) );
1756
- fossil_error(1, "no manifest");
1759
+ if( (flags & MC_NO_ERRORS)==0 ) fossil_error(1, "no manifest");
17571760
return 0;
17581761
}
17591762
if( p->type==CFTYPE_MANIFEST && fetch_baseline(p, 0) ){
17601763
manifest_destroy(p);
17611764
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
+ }
17641769
return 0;
17651770
}
17661771
db_begin_transaction();
17671772
if( p->type==CFTYPE_MANIFEST ){
17681773
if( permitHooks ){
17691774
--- 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 @@
4747
/*
4848
** Flags for use with manifest_crosslink().
4949
*/
5050
#define MC_NONE 0 /* default handling */
5151
#define MC_PERMIT_HOOKS 1 /* permit hooks to execute */
52
+#define MC_NO_ERRORS 2 /* do not issue errors for a bad parse */
5253
5354
/*
5455
** A single F-card within a manifest
5556
*/
5657
struct ManifestFile {
@@ -1744,25 +1745,29 @@
17441745
17451746
if( (p = manifest_cache_find(rid))!=0 ){
17461747
blob_reset(pContent);
17471748
}else if( (p = manifest_parse(pContent, rid, 0))==0 ){
17481749
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
+ }
17511754
return 0;
17521755
}
17531756
if( g.xlinkClusterOnly && p->type!=CFTYPE_CLUSTER ){
17541757
manifest_destroy(p);
17551758
assert( blob_is_reset(pContent) );
1756
- fossil_error(1, "no manifest");
1759
+ if( (flags & MC_NO_ERRORS)==0 ) fossil_error(1, "no manifest");
17571760
return 0;
17581761
}
17591762
if( p->type==CFTYPE_MANIFEST && fetch_baseline(p, 0) ){
17601763
manifest_destroy(p);
17611764
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
+ }
17641769
return 0;
17651770
}
17661771
db_begin_transaction();
17671772
if( p->type==CFTYPE_MANIFEST ){
17681773
if( permitHooks ){
17691774
--- 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 @@
201201
if( rid==0 ){
202202
blob_appendf(&pXfer->err, "%s", g.zErrMsg);
203203
blob_reset(&content);
204204
}else{
205205
if( !isPriv ) content_make_public(rid);
206
- manifest_crosslink(rid, &content, MC_NONE);
206
+ manifest_crosslink(rid, &content, MC_NO_ERRORS);
207207
}
208208
assert( blob_is_reset(&content) );
209209
remote_has(rid);
210210
}
211211
212212
--- 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 @@
201201
if( rid==0 ){
202202
blob_appendf(&pXfer->err, "%s", g.zErrMsg);
203203
blob_reset(&content);
204204
}else{
205205
if( !isPriv ) content_make_public(rid);
206
- manifest_crosslink(rid, &content, MC_NONE);
206
+ manifest_crosslink(rid, &content, MC_NO_ERRORS);
207207
}
208208
assert( blob_is_reset(&content) );
209209
remote_has(rid);
210210
}
211211
212212
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button