~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/doc_generate/autodoc_rstx.py

  • Committer: Tarmac
  • Author(s): Vincent Ladeuil
  • Date: 2017-01-30 14:42:05 UTC
  • mfrom: (6620.1.1 trunk)
  • Revision ID: tarmac-20170130144205-r8fh2xpmiuxyozpv
Merge  2.7 into trunk including fix for bug #1657238 [r=vila]

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
Written by the Bazaar community.
21
21
"""
22
22
 
23
 
import os
24
 
import sys
 
23
from __future__ import absolute_import
 
24
 
25
25
import time
26
26
 
27
27
import bzrlib
131
131
    topic_id = "%s-%s" % (topic, "help")
132
132
    filename = bzrlib.osutils.pathjoin(output_dir, topic_id + ".txt")
133
133
    f =  open(filename, "w")
134
 
    f.writelines(text)
 
134
    f.write(text.encode('utf-8'))
135
135
    f.close()
136
136
    return topic_id
137
137
 
144
144
..     %(bzrcmd)s help commands
145
145
..     %(bzrcmd)s help <cmd>
146
146
..
147
 
.. Generation time: %(timestamp)s
148
147
 
149
148
"""
150
149