Mercurial > public > mercurial-scm > hg
comparison doc/gendoc.py @ 26413:e0c572d4d112
help: pass around ui to doc loader (API)
This is necessary to hide DEPRECATED items conditionally.
Flagged as API change because it will break "hg help git|subversion".
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 26 Sep 2015 12:06:30 +0900 |
parents | 7e8e3c0920a6 |
children | 6fbf1159a85a |
comparison
equal
deleted
inserted
replaced
26412:7e8e3c0920a6 | 26413:e0c572d4d112 |
---|---|
136 ui.write(".. _%s:\n" % name) | 136 ui.write(".. _%s:\n" % name) |
137 ui.write("\n") | 137 ui.write("\n") |
138 if sectionfunc: | 138 if sectionfunc: |
139 ui.write(sectionfunc(sec)) | 139 ui.write(sectionfunc(sec)) |
140 if callable(doc): | 140 if callable(doc): |
141 doc = doc() | 141 doc = doc(ui) |
142 ui.write(doc) | 142 ui.write(doc) |
143 ui.write("\n") | 143 ui.write("\n") |
144 | 144 |
145 def commandprinter(ui, cmdtable, sectionfunc): | 145 def commandprinter(ui, cmdtable, sectionfunc): |
146 h = {} | 146 h = {} |