Fossil SCM
In git-export, when the versioned manifest setting changes, be sure to delete manifest files that have become obsolete.
Commit
175009a5be9e31a0b5b33bb232c446927a15f91941512a21d1f82dcd08ac6726
Parent
b89520f2276b00d…
1 file changed
+8
+8
| --- src/export.c | ||
| +++ src/export.c | ||
| @@ -1089,10 +1089,11 @@ | ||
| 1089 | 1089 | int nErr = 0; /* Number of errors */ |
| 1090 | 1090 | int bPhantomOk; /* True if phantom files should be ignored */ |
| 1091 | 1091 | char buf[24]; |
| 1092 | 1092 | char *zEmail; /* Contact info for Git committer field */ |
| 1093 | 1093 | int fManifest; /* Should the manifest files be included? */ |
| 1094 | + int fPManifest = 0; /* OR of the manifest files for all parents */ | |
| 1094 | 1095 | |
| 1095 | 1096 | pMan = manifest_get(rid, CFTYPE_MANIFEST, 0); |
| 1096 | 1097 | if( pMan==0 ){ |
| 1097 | 1098 | /* Must be a phantom. Return without doing anything, and in particular |
| 1098 | 1099 | ** without creating a mark for this check-in. */ |
| @@ -1215,10 +1216,11 @@ | ||
| 1215 | 1216 | blob_reset(&comment); |
| 1216 | 1217 | iParent = -1; /* Which ancestor is the primary parent */ |
| 1217 | 1218 | for(i=0; i<pMan->nParent; i++){ |
| 1218 | 1219 | char *zOther = gitmirror_find_mark(pMan->azParent[i],0,0); |
| 1219 | 1220 | if( zOther==0 ) continue; |
| 1221 | + fPManifest |= db_get_manifest_setting(pMan->azParent[i]); | |
| 1220 | 1222 | if( iParent<0 ){ |
| 1221 | 1223 | iParent = i; |
| 1222 | 1224 | fprintf(xCmd, "from %s\n", zOther); |
| 1223 | 1225 | }else{ |
| 1224 | 1226 | fprintf(xCmd, "merge %s\n", zOther); |
| @@ -1279,22 +1281,28 @@ | ||
| 1279 | 1281 | content_get(rid, &manifest); |
| 1280 | 1282 | sterilize_manifest(&manifest, CFTYPE_MANIFEST); |
| 1281 | 1283 | fprintf(xCmd,"M 100644 inline manifest\ndata %d\n%s\n", |
| 1282 | 1284 | blob_strlen(&manifest), blob_str(&manifest)); |
| 1283 | 1285 | blob_reset(&manifest); |
| 1286 | + }else if( fPManifest & MFESTFLG_RAW ){ | |
| 1287 | + fprintf(xCmd, "D manifest\n"); | |
| 1284 | 1288 | } |
| 1285 | 1289 | if( fManifest & MFESTFLG_UUID ){ |
| 1286 | 1290 | int n = (int)strlen(zUuid); |
| 1287 | 1291 | fprintf(xCmd,"M 100644 inline manifest.uuid\ndata %d\n%s\n\n", n+1, zUuid); |
| 1292 | + }else if( fPManifest & MFESTFLG_UUID ){ | |
| 1293 | + fprintf(xCmd, "D manifest.uuid\n"); | |
| 1288 | 1294 | } |
| 1289 | 1295 | if( fManifest & MFESTFLG_TAGS ){ |
| 1290 | 1296 | Blob tagslist; |
| 1291 | 1297 | blob_init(&tagslist, 0, 0); |
| 1292 | 1298 | get_checkin_taglist(rid, &tagslist); |
| 1293 | 1299 | fprintf(xCmd,"M 100644 inline manifest.tags\ndata %d\n%s\n", |
| 1294 | 1300 | blob_strlen(&tagslist), blob_str(&tagslist)); |
| 1295 | 1301 | blob_reset(&tagslist); |
| 1302 | + }else if( fPManifest & MFESTFLG_TAGS ){ | |
| 1303 | + fprintf(xCmd, "D manifest.tags\n"); | |
| 1296 | 1304 | } |
| 1297 | 1305 | |
| 1298 | 1306 | /* The check-in is finished, so decrement the counter */ |
| 1299 | 1307 | (*pnLimit)--; |
| 1300 | 1308 | return 0; |
| 1301 | 1309 |
| --- src/export.c | |
| +++ src/export.c | |
| @@ -1089,10 +1089,11 @@ | |
| 1089 | int nErr = 0; /* Number of errors */ |
| 1090 | int bPhantomOk; /* True if phantom files should be ignored */ |
| 1091 | char buf[24]; |
| 1092 | char *zEmail; /* Contact info for Git committer field */ |
| 1093 | int fManifest; /* Should the manifest files be included? */ |
| 1094 | |
| 1095 | pMan = manifest_get(rid, CFTYPE_MANIFEST, 0); |
| 1096 | if( pMan==0 ){ |
| 1097 | /* Must be a phantom. Return without doing anything, and in particular |
| 1098 | ** without creating a mark for this check-in. */ |
| @@ -1215,10 +1216,11 @@ | |
| 1215 | blob_reset(&comment); |
| 1216 | iParent = -1; /* Which ancestor is the primary parent */ |
| 1217 | for(i=0; i<pMan->nParent; i++){ |
| 1218 | char *zOther = gitmirror_find_mark(pMan->azParent[i],0,0); |
| 1219 | if( zOther==0 ) continue; |
| 1220 | if( iParent<0 ){ |
| 1221 | iParent = i; |
| 1222 | fprintf(xCmd, "from %s\n", zOther); |
| 1223 | }else{ |
| 1224 | fprintf(xCmd, "merge %s\n", zOther); |
| @@ -1279,22 +1281,28 @@ | |
| 1279 | content_get(rid, &manifest); |
| 1280 | sterilize_manifest(&manifest, CFTYPE_MANIFEST); |
| 1281 | fprintf(xCmd,"M 100644 inline manifest\ndata %d\n%s\n", |
| 1282 | blob_strlen(&manifest), blob_str(&manifest)); |
| 1283 | blob_reset(&manifest); |
| 1284 | } |
| 1285 | if( fManifest & MFESTFLG_UUID ){ |
| 1286 | int n = (int)strlen(zUuid); |
| 1287 | fprintf(xCmd,"M 100644 inline manifest.uuid\ndata %d\n%s\n\n", n+1, zUuid); |
| 1288 | } |
| 1289 | if( fManifest & MFESTFLG_TAGS ){ |
| 1290 | Blob tagslist; |
| 1291 | blob_init(&tagslist, 0, 0); |
| 1292 | get_checkin_taglist(rid, &tagslist); |
| 1293 | fprintf(xCmd,"M 100644 inline manifest.tags\ndata %d\n%s\n", |
| 1294 | blob_strlen(&tagslist), blob_str(&tagslist)); |
| 1295 | blob_reset(&tagslist); |
| 1296 | } |
| 1297 | |
| 1298 | /* The check-in is finished, so decrement the counter */ |
| 1299 | (*pnLimit)--; |
| 1300 | return 0; |
| 1301 |
| --- src/export.c | |
| +++ src/export.c | |
| @@ -1089,10 +1089,11 @@ | |
| 1089 | int nErr = 0; /* Number of errors */ |
| 1090 | int bPhantomOk; /* True if phantom files should be ignored */ |
| 1091 | char buf[24]; |
| 1092 | char *zEmail; /* Contact info for Git committer field */ |
| 1093 | int fManifest; /* Should the manifest files be included? */ |
| 1094 | int fPManifest = 0; /* OR of the manifest files for all parents */ |
| 1095 | |
| 1096 | pMan = manifest_get(rid, CFTYPE_MANIFEST, 0); |
| 1097 | if( pMan==0 ){ |
| 1098 | /* Must be a phantom. Return without doing anything, and in particular |
| 1099 | ** without creating a mark for this check-in. */ |
| @@ -1215,10 +1216,11 @@ | |
| 1216 | blob_reset(&comment); |
| 1217 | iParent = -1; /* Which ancestor is the primary parent */ |
| 1218 | for(i=0; i<pMan->nParent; i++){ |
| 1219 | char *zOther = gitmirror_find_mark(pMan->azParent[i],0,0); |
| 1220 | if( zOther==0 ) continue; |
| 1221 | fPManifest |= db_get_manifest_setting(pMan->azParent[i]); |
| 1222 | if( iParent<0 ){ |
| 1223 | iParent = i; |
| 1224 | fprintf(xCmd, "from %s\n", zOther); |
| 1225 | }else{ |
| 1226 | fprintf(xCmd, "merge %s\n", zOther); |
| @@ -1279,22 +1281,28 @@ | |
| 1281 | content_get(rid, &manifest); |
| 1282 | sterilize_manifest(&manifest, CFTYPE_MANIFEST); |
| 1283 | fprintf(xCmd,"M 100644 inline manifest\ndata %d\n%s\n", |
| 1284 | blob_strlen(&manifest), blob_str(&manifest)); |
| 1285 | blob_reset(&manifest); |
| 1286 | }else if( fPManifest & MFESTFLG_RAW ){ |
| 1287 | fprintf(xCmd, "D manifest\n"); |
| 1288 | } |
| 1289 | if( fManifest & MFESTFLG_UUID ){ |
| 1290 | int n = (int)strlen(zUuid); |
| 1291 | fprintf(xCmd,"M 100644 inline manifest.uuid\ndata %d\n%s\n\n", n+1, zUuid); |
| 1292 | }else if( fPManifest & MFESTFLG_UUID ){ |
| 1293 | fprintf(xCmd, "D manifest.uuid\n"); |
| 1294 | } |
| 1295 | if( fManifest & MFESTFLG_TAGS ){ |
| 1296 | Blob tagslist; |
| 1297 | blob_init(&tagslist, 0, 0); |
| 1298 | get_checkin_taglist(rid, &tagslist); |
| 1299 | fprintf(xCmd,"M 100644 inline manifest.tags\ndata %d\n%s\n", |
| 1300 | blob_strlen(&tagslist), blob_str(&tagslist)); |
| 1301 | blob_reset(&tagslist); |
| 1302 | }else if( fPManifest & MFESTFLG_TAGS ){ |
| 1303 | fprintf(xCmd, "D manifest.tags\n"); |
| 1304 | } |
| 1305 | |
| 1306 | /* The check-in is finished, so decrement the counter */ |
| 1307 | (*pnLimit)--; |
| 1308 | return 0; |
| 1309 |