Fossil SCM
As a safety precaution against changes made in [ecb705359a] and [b8c1d429cb], content_deltify() now explicitly checks whether its main input RID refers to a phantom and skips further work if it is.
Commit
188ffef23db280478f6f2420531bd8c1c4fe9e71ff4f7310dec7621d89715002
Parent
b8c1d429cbc2209…
1 file changed
+5
+5
| --- src/content.c | ||
| +++ src/content.c | ||
| @@ -798,10 +798,12 @@ | ||
| 798 | 798 | ** gives the smallest delta is choosen. |
| 799 | 799 | ** |
| 800 | 800 | ** If rid is already a delta from some other place then no |
| 801 | 801 | ** conversion occurs and this is a no-op unless force==1. If force==1, |
| 802 | 802 | ** then nSrc must also be 1. |
| 803 | +** | |
| 804 | +** If rid refers to a phantom, no delta is created. | |
| 803 | 805 | ** |
| 804 | 806 | ** Never generate a delta that carries a private artifact into a public |
| 805 | 807 | ** artifact. Otherwise, when we go to send the public artifact on a |
| 806 | 808 | ** sync operation, the other end of the sync will never be able to receive |
| 807 | 809 | ** the source of the delta. It is OK to delta private->private and |
| @@ -829,10 +831,13 @@ | ||
| 829 | 831 | |
| 830 | 832 | /* If rid is already a child (a delta) of some other artifact, return |
| 831 | 833 | ** immediately if the force flags is false |
| 832 | 834 | */ |
| 833 | 835 | if( !force && delta_source_rid(rid)>0 ) return 0; |
| 836 | + | |
| 837 | + /* If rid refers to a phantom, skip deltification. */ | |
| 838 | + if( 0==content_is_available(rid) ) return 0; | |
| 834 | 839 | |
| 835 | 840 | /* Get the complete content of the object to be delta-ed. If the size |
| 836 | 841 | ** is less than 50 bytes, then there really is no point in trying to do |
| 837 | 842 | ** a delta, so return immediately |
| 838 | 843 | */ |
| 839 | 844 |
| --- src/content.c | |
| +++ src/content.c | |
| @@ -798,10 +798,12 @@ | |
| 798 | ** gives the smallest delta is choosen. |
| 799 | ** |
| 800 | ** If rid is already a delta from some other place then no |
| 801 | ** conversion occurs and this is a no-op unless force==1. If force==1, |
| 802 | ** then nSrc must also be 1. |
| 803 | ** |
| 804 | ** Never generate a delta that carries a private artifact into a public |
| 805 | ** artifact. Otherwise, when we go to send the public artifact on a |
| 806 | ** sync operation, the other end of the sync will never be able to receive |
| 807 | ** the source of the delta. It is OK to delta private->private and |
| @@ -829,10 +831,13 @@ | |
| 829 | |
| 830 | /* If rid is already a child (a delta) of some other artifact, return |
| 831 | ** immediately if the force flags is false |
| 832 | */ |
| 833 | if( !force && delta_source_rid(rid)>0 ) return 0; |
| 834 | |
| 835 | /* Get the complete content of the object to be delta-ed. If the size |
| 836 | ** is less than 50 bytes, then there really is no point in trying to do |
| 837 | ** a delta, so return immediately |
| 838 | */ |
| 839 |
| --- src/content.c | |
| +++ src/content.c | |
| @@ -798,10 +798,12 @@ | |
| 798 | ** gives the smallest delta is choosen. |
| 799 | ** |
| 800 | ** If rid is already a delta from some other place then no |
| 801 | ** conversion occurs and this is a no-op unless force==1. If force==1, |
| 802 | ** then nSrc must also be 1. |
| 803 | ** |
| 804 | ** If rid refers to a phantom, no delta is created. |
| 805 | ** |
| 806 | ** Never generate a delta that carries a private artifact into a public |
| 807 | ** artifact. Otherwise, when we go to send the public artifact on a |
| 808 | ** sync operation, the other end of the sync will never be able to receive |
| 809 | ** the source of the delta. It is OK to delta private->private and |
| @@ -829,10 +831,13 @@ | |
| 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 | /* If rid refers to a phantom, skip deltification. */ |
| 838 | if( 0==content_is_available(rid) ) return 0; |
| 839 | |
| 840 | /* Get the complete content of the object to be delta-ed. If the size |
| 841 | ** is less than 50 bytes, then there really is no point in trying to do |
| 842 | ** a delta, so return immediately |
| 843 | */ |
| 844 |