We could go much further I think in terms of reusing code. I've taken a nibble at that in this branch but there's room to do much, much better. We now have three code paths in groupcompress_repo.py that are doing the essentially the same logic of finding text references from a set of revisions:
- GroupCHKStreamSource,
- fileids_altered_by_revision_ids, and
- _check_new_inventories (the new checks in this patch).
However I think the incremental improvement in this patch is landable without tackling all the duplication at once. (But I'm happy to do any more low-hanging fruit that a reviewer considers appropriate.)
This completes the fix for bug 406687.
We could go much further I think in terms of reusing code. I've taken a nibble at that in this branch but there's room to do much, much better. We now have three code paths in groupcompress_ repo.py that are doing the essentially the same logic of finding text references from a set of revisions:
- GroupCHKStreamS ource, altered_ by_revision_ ids, and new_inventories (the new checks in this patch).
- fileids_
- _check_
However I think the incremental improvement in this patch is landable without tackling all the duplication at once. (But I'm happy to do any more low-hanging fruit that a reviewer considers appropriate.)