##// END OF EJS Templates
gendoc: dispatch print document content by commandline arguments...
Takumi IINO -
r19425:81fbd4e6 default
parent child Browse files
Show More
@@ -22,7 +22,7 hg.1.txt: hg.1.gendoc.txt
22 touch hg.1.txt
22 touch hg.1.txt
23
23
24 hg.1.gendoc.txt: $(GENDOC)
24 hg.1.gendoc.txt: $(GENDOC)
25 ${PYTHON} gendoc.py > $@.tmp
25 ${PYTHON} gendoc.py hg.1.gendoc > $@.tmp
26 mv $@.tmp $@
26 mv $@.tmp $@
27
27
28 hgrc.5: ../mercurial/help/config.txt
28 hgrc.5: ../mercurial/help/config.txt
@@ -1,3 +1,8
1 """usage: %s DOC ...
2
3 where DOC is the name of a document
4 """
5
1 import os, sys, textwrap
6 import os, sys, textwrap
2 # import from the live mercurial repo
7 # import from the live mercurial repo
3 sys.path.insert(0, "..")
8 sys.path.insert(0, "..")
@@ -168,4 +173,11 def allextensionnames():
168 return extensions.enabled().keys() + extensions.disabled().keys()
173 return extensions.enabled().keys() + extensions.disabled().keys()
169
174
170 if __name__ == "__main__":
175 if __name__ == "__main__":
176 doc = 'hg.1.gendoc'
177 if len(sys.argv) > 1:
178 doc = sys.argv[1]
179
180 if doc == 'hg.1.gendoc':
171 showdoc(sys.stdout)
181 showdoc(sys.stdout)
182 else:
183 showtopic(sys.stdout, sys.argv[1])
General Comments 0
You need to be logged in to leave comments. Login now