/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/marks_file.py

  • Committer: Jelmer Vernooij
  • Date: 2020-07-01 23:30:22 UTC
  • mto: (7490.40.41 work)
  • mto: This revision was merged to the branch mainline in revision 7519.
  • Revision ID: jelmer@jelmer.uk-20200701233022-ybof0ftyem2q5kyc
Make output consistent.

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
    :param revision_ids: dictionary mapping marks -> bzr revision-ids
70
70
    """
71
71
    try:
72
 
        f = open(filename, 'w')
 
72
        f = open(filename, 'wb')
73
73
    except IOError:
74
74
        warning("Could not open export-marks file %s - not exporting marks",
75
75
                filename)
77
77
 
78
78
    try:
79
79
        # Write the revision info
80
 
        for mark in revision_ids:
81
 
            f.write(':%s %s\n' % (mark.lstrip(b':').decode('utf-8'),
82
 
                                  revision_ids[mark].decode('utf-8')))
 
80
        for mark, revid in sorted(revision_ids.items()):
 
81
            f.write(b':%s %s\n' % (mark.lstrip(b':'), revid))
83
82
    finally:
84
83
        f.close()