/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 breezy/plugins/git/__init__.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-05-12 12:50:11 UTC
  • mfrom: (6962.1.1 git-cache-fixes)
  • Revision ID: breezy.the.bot@gmail.com-20180512125011-dp00bsv4rheyfgnb
Fix an AttributeError when writing to Git cache files.

Merged from https://code.launchpad.net/~jelmer/brz/git-cache-fixes/+merge/345459

Show diffs side-by-side

added added

removed removed

Lines of Context:
392
392
            return
393
393
        missing_revisions = store._missing_revisions(parent_revisions)
394
394
        if not missing_revisions:
395
 
            # Only update if the cache was up to date previously
396
 
            store._update_sha_map_revision(revid)
 
395
            store._cache.idmap.start_write_group()
 
396
            try:
 
397
                # Only update if the cache was up to date previously
 
398
                store._update_sha_map_revision(revid)
 
399
            except BaseException:
 
400
                store._cache.idmap.abort_write_group()
 
401
                raise
 
402
            else:
 
403
                store._cache.idmap.commit_write_group()
397
404
 
398
405
 
399
406
def post_commit_update_cache(local_branch, master_branch, old_revno, old_revid,