I would be willing to contribute to fixing this bug, but as this is the first time I looked under the hood of bazaar, I'd need some guidance.
The Problem seems to be fairly easy:
- A commit builder is created for the top working tree
- some time later, another commit builder is created for the subtree.
- both call start_write_group on the same repository
- the second time start_write_group is called: raise errors.BzrError('already in a write group')
My Personal solution would be:
- add a variable _write_group_nesting_level to repository and initialize it with 0
- every time start_write_group is called, increment it by 1
- every time commit_write_group is called on the repository decrement it by one
- when it reaches 0 in commit_write_group only then call _commit_write_group
- for abort_write_group just abort, and reset the counter to 0.
I would be willing to contribute to fixing this bug, but as this is the first time I looked under the hood of bazaar, I'd need some guidance.
The Problem seems to be fairly easy: BzrError( 'already in a write group')
- A commit builder is created for the top working tree
- some time later, another commit builder is created for the subtree.
- both call start_write_group on the same repository
- the second time start_write_group is called: raise errors.
My Personal solution would be: group_nesting_ level to repository and initialize it with 0
- add a variable _write_
- every time start_write_group is called, increment it by 1
- every time commit_write_group is called on the repository decrement it by one
- when it reaches 0 in commit_write_group only then call _commit_write_group
- for abort_write_group just abort, and reset the counter to 0.
What do you think?
regards,
Martin