repository.refresh_data() cannot be called in a write group
Bug #574236 reported by
Robert Collins
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Wishlist
|
Andrew Bennetts |
Bug Description
this blocks fixing 574226 in the most elegant way and thus cleaning up some code in bzr-builddeb. It should be fairly simple, but nothing is guaranteed.
Related branches
lp://qastaging/~spiv/bzr/repo-refresh-data-574236
Merged
into
lp://qastaging/bzr
- Robert Collins (community): Needs Fixing
- Diff: 0 lines
Changed in bzr: | |
milestone: | none → 2.2b3 |
status: | In Progress → Fix Released |
To post a comment you must log in.
At a glance, there's no impediment to allowing this for pack-based repositories. Just delete the "is_in_write_group" check and it should Just Work, it simply does reload_pack_names. I haven't tested this so perhaps I'm missing something. A visual inspection of the relevant code does suggest it should Just Work though.
The difficult bit seems to be that the implementation of refresh_data for knit repositories currently depends on being outside a write group.
Rather than spend effort on making something work on a format that has been deprecated for a long time, perhaps we should just relax refresh_data's implementation to say that it *might* work in a write group, and if it can't it will raise some appropriate error? We'd make knit-format repos raise the error, and let pack-based repos refresh.