/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/git/unpeel_map.py

  • Committer: Jelmer Vernooij
  • Date: 2019-03-05 07:32:38 UTC
  • mto: (7290.1.21 work)
  • mto: This revision was merged to the branch mainline in revision 7311.
  • Revision ID: jelmer@jelmer.uk-20190305073238-zlqn981opwnqsmzi
Add appveyor configuration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""Unpeel map storage."""
18
18
 
 
19
from __future__ import absolute_import
19
20
 
20
21
from collections import defaultdict
21
22
from io import BytesIO
61
62
                f.write(b"%s: %s\n" % (k, v))
62
63
 
63
64
    def save_in_repository(self, repository):
64
 
        with BytesIO() as f:
 
65
        f = BytesIO()
 
66
        try:
65
67
            self.save(f)
66
68
            f.seek(0)
67
69
            repository.control_transport.put_file("git-unpeel-map", f)
 
70
        finally:
 
71
            f.close()
68
72
 
69
73
    def peel_tag(self, git_sha, default=None):
70
74
        """Peel a tag."""