Skip to content
Snippets Groups Projects
Commit 7e8e3c09 authored by Yuya Nishihara's avatar Yuya Nishihara
Browse files

gendoc: use real ui in place of stdout

ui attributes will be required by a help function, so a file object can't be
used as a fake ui.
parent dd62eaa8
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,7 @@
from mercurial.i18n import gettext, _
from mercurial.help import helptable, loaddoc
from mercurial import extensions
from mercurial import ui as uimod
def get_desc(docstr):
if not docstr:
......@@ -198,4 +199,5 @@
if len(sys.argv) > 1:
doc = sys.argv[1]
ui = uimod.ui()
if doc == 'hg.1.gendoc':
......@@ -201,3 +203,3 @@
if doc == 'hg.1.gendoc':
showdoc(sys.stdout)
showdoc(ui)
else:
......@@ -203,2 +205,2 @@
else:
showtopic(sys.stdout, sys.argv[1])
showtopic(ui, sys.argv[1])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment