Fossil SCM
Checkin [188ffef2] inadvertently caused one particular graceful failure to degrade to a non-graceful failure (a failed assert()). This checkin resolves that.
Commit
7a985a3d2c570b1e34b55be3e123faa8564f1ba23059b3a929d81ac4bcf85cf8
Parent
213160c70c40124…
1 file changed
+9
+9
| --- src/content.c | ||
| +++ src/content.c | ||
| @@ -827,10 +827,19 @@ | ||
| 827 | 827 | Blob bestDelta; /* Best delta seen so far */ |
| 828 | 828 | int bestSrc = 0; /* Which aSrc is the source of the best delta */ |
| 829 | 829 | int rc = 0; /* Value to return */ |
| 830 | 830 | int i; /* Loop variable for aSrc[] */ |
| 831 | 831 | |
| 832 | + /* | |
| 833 | + ** Historically this routine gracefully ignored the rid 0, but the | |
| 834 | + ** addition of a call to content_is_available() in [188ffef2] caused | |
| 835 | + ** rid 0 to trigger an assert via bag_find(). Rather than track down | |
| 836 | + ** all such calls (e.g. the one via /technoteedit), we'll continue | |
| 837 | + ** to gracefully ignore rid 0 here. | |
| 838 | + */ | |
| 839 | + if( 0==rid ) return 0; | |
| 840 | + | |
| 832 | 841 | /* If rid is already a child (a delta) of some other artifact, return |
| 833 | 842 | ** immediately if the force flags is false |
| 834 | 843 | */ |
| 835 | 844 | if( !force && delta_source_rid(rid)>0 ) return 0; |
| 836 | 845 | |
| 837 | 846 |
| --- src/content.c | |
| +++ src/content.c | |
| @@ -827,10 +827,19 @@ | |
| 827 | Blob bestDelta; /* Best delta seen so far */ |
| 828 | int bestSrc = 0; /* Which aSrc is the source of the best delta */ |
| 829 | int rc = 0; /* Value to return */ |
| 830 | int i; /* Loop variable for aSrc[] */ |
| 831 | |
| 832 | /* If rid is already a child (a delta) of some other artifact, return |
| 833 | ** immediately if the force flags is false |
| 834 | */ |
| 835 | if( !force && delta_source_rid(rid)>0 ) return 0; |
| 836 | |
| 837 |
| --- src/content.c | |
| +++ src/content.c | |
| @@ -827,10 +827,19 @@ | |
| 827 | Blob bestDelta; /* Best delta seen so far */ |
| 828 | int bestSrc = 0; /* Which aSrc is the source of the best delta */ |
| 829 | int rc = 0; /* Value to return */ |
| 830 | int i; /* Loop variable for aSrc[] */ |
| 831 | |
| 832 | /* |
| 833 | ** Historically this routine gracefully ignored the rid 0, but the |
| 834 | ** addition of a call to content_is_available() in [188ffef2] caused |
| 835 | ** rid 0 to trigger an assert via bag_find(). Rather than track down |
| 836 | ** all such calls (e.g. the one via /technoteedit), we'll continue |
| 837 | ** to gracefully ignore rid 0 here. |
| 838 | */ |
| 839 | if( 0==rid ) return 0; |
| 840 | |
| 841 | /* If rid is already a child (a delta) of some other artifact, return |
| 842 | ** immediately if the force flags is false |
| 843 | */ |
| 844 | if( !force && delta_source_rid(rid)>0 ) return 0; |
| 845 | |
| 846 |