equal
deleted
inserted
replaced
|
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, "..") |
4 # fall back to pure modules if required C extensions are not available |
9 # fall back to pure modules if required C extensions are not available |
5 sys.path.append(os.path.join('..', 'mercurial', 'pure')) |
10 sys.path.append(os.path.join('..', 'mercurial', 'pure')) |
166 |
171 |
167 def allextensionnames(): |
172 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__": |
171 showdoc(sys.stdout) |
176 doc = 'hg.1.gendoc' |
|
177 if len(sys.argv) > 1: |
|
178 doc = sys.argv[1] |
|
179 |
|
180 if doc == 'hg.1.gendoc': |
|
181 showdoc(sys.stdout) |
|
182 else: |
|
183 showtopic(sys.stdout, sys.argv[1]) |