/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to __init__.py

Only update git cache during post-commit if parents are already in the cache.

Show diffs side-by-side

added added

removed removed

Lines of Context:
336
336
    store = BazaarObjectStore(repository)
337
337
    store.lock_write()
338
338
    try:
339
 
        store._update_sha_map_revision(revid)
 
339
        parent_revisions = set(repository.get_parent_map([revid])[revid])
 
340
        missing_revisions = store._missing_revisions(parent_revisions)
 
341
        if not missing_revisions:
 
342
            # Only update if the cache was up to date previously
 
343
            store._update_sha_map_revision(revid)
340
344
    finally:
341
345
        store.unlock()
342
346