repository.refresh_data() cannot be called in a write group

Bug #574236 reported by Robert Collins
12
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.

Tags: udd

Related branches

Revision history for this message
Andrew Bennetts (spiv) wrote :

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.

Revision history for this message
Andrew Bennetts (spiv) wrote :

I've made a patch based on my earlier comment: it allows refresh_data on pack repositories without worrying about how to support it for other formats.

Changed in bzr:
assignee: nobody → Andrew Bennetts (spiv)
status: Confirmed → In Progress
Andrew Bennetts (spiv)
Changed in bzr:
milestone: none → 2.2b3
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.