Fossil SCM
In parse_mark(), refuse a commit or blob mark whose record number is not positive, so that --import-marks no longer accepts a hash the repository lacks by matching record number 0.
Commit
45df7bfacffcfa62fb083d23584694a82b8ecbb2d87852c951270fe38c9fdafa
Parent
419f6955b5c5818…
1 file changed
+3
+3
| --- src/export.c | ||
| +++ src/export.c | ||
| @@ -313,10 +313,13 @@ | ||
| 313 | 313 | type_ = cur_tok[0]; |
| 314 | 314 | if( type_!='c' && type_!='b' ){ |
| 315 | 315 | /* This is probably a blob mark */ |
| 316 | 316 | mark->name = NULL; |
| 317 | 317 | return 0; |
| 318 | + } | |
| 319 | + if( mark->rid<=0 ){ | |
| 320 | + return -1; | |
| 318 | 321 | } |
| 319 | 322 | |
| 320 | 323 | cur_tok = strtok(NULL, " \t"); |
| 321 | 324 | if( !cur_tok ){ |
| 322 | 325 | /* This mark was generated by an older version of Fossil and doesn't |
| 323 | 326 |
| --- src/export.c | |
| +++ src/export.c | |
| @@ -313,10 +313,13 @@ | |
| 313 | type_ = cur_tok[0]; |
| 314 | if( type_!='c' && type_!='b' ){ |
| 315 | /* This is probably a blob mark */ |
| 316 | mark->name = NULL; |
| 317 | return 0; |
| 318 | } |
| 319 | |
| 320 | cur_tok = strtok(NULL, " \t"); |
| 321 | if( !cur_tok ){ |
| 322 | /* This mark was generated by an older version of Fossil and doesn't |
| 323 |
| --- src/export.c | |
| +++ src/export.c | |
| @@ -313,10 +313,13 @@ | |
| 313 | type_ = cur_tok[0]; |
| 314 | if( type_!='c' && type_!='b' ){ |
| 315 | /* This is probably a blob mark */ |
| 316 | mark->name = NULL; |
| 317 | return 0; |
| 318 | } |
| 319 | if( mark->rid<=0 ){ |
| 320 | return -1; |
| 321 | } |
| 322 | |
| 323 | cur_tok = strtok(NULL, " \t"); |
| 324 | if( !cur_tok ){ |
| 325 | /* This mark was generated by an older version of Fossil and doesn't |
| 326 |