/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/fastimport/idmapfile.py

  • Committer: Jelmer Vernooij
  • Date: 2017-06-05 23:35:09 UTC
  • mfrom: (6658 work)
  • mto: (6653.3.3 bzrwt)
  • mto: This revision was merged to the branch mainline in revision 6667.
  • Revision ID: jelmer@jelmer.uk-20170605233509-30wo916k6meuggqf
MergeĀ lp:brz

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
    :param filename: name of the file to save the data to
30
30
    :param revision_ids: a dictionary of commit ids to revision ids.
31
31
    """
32
 
    f = open(filename, 'wb')
33
 
    try:
34
 
        for commit_id, rev_id in revision_ids.iteritems():
35
 
            f.write("%s %s\n" % (commit_id, rev_id))
36
 
        f.flush()
37
 
    finally:
38
 
        f.close()
 
32
    with open(filename, 'wb') as f:
 
33
        for commit_id in revision_ids:
 
34
            f.write("%s %s\n" % (commit_id, revision_ids[commit_id]))
39
35
 
40
36
 
41
37
def load_id_map(filename):