repository.fetch(same_url_repository, revision_id=revision_added_after_write_lock) fails

Bug #574226 reported by Robert Collins
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Wishlist
Unassigned

Bug Description

While writing import-upstream for bzr builddeb I found a bug in repository.fetch.

If you do this:
init-repo .
init b
init c
then in python
b.lock_write()
b.branch.repository.all_revision_ids()
c.lock_write()
revid = c.commit('')
b.branch.repository.fetch(c.repository, revision_id=revid)

NoSuchRevision will be raised, because b doesn't have the revid in its indices, and hasn't refreshed its data. Calling refresh_data() would fix it, but it can't be called in a write group. I've filed bug 574223 on bzr-builddeb about having ugly code as a result of this.

Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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