##// END OF EJS Templates
help.merge-tools: do not double document merge tools...
help.merge-tools: do not double document merge tools Merge tools were being double documented in help system output due to functions being defined under multiple names in the merge tools dictionary. Establish a new dictionary for just the tools to document and use it from the help system so we don't get double output. Double documentation likely plagues other auto-documented items as well. It might be a good idea to eventually compare function instances to filter out duplicate entries from dictionaries passed to ``makeitemsdoc``. However, without an easy way to break ties, this may result in some functions being advertised over their modern equivalents. This would be a noble patch series. But it isn't one this author is willing to tackle at this time.

File last commit:

r22583:23c995ed default
r24099:be83fd9d default
Show More
scmposix.py
33 lines | 902 B | text/x-python | PythonLexer
import sys, os
import osutil
def _rcfiles(path):
rcs = [os.path.join(path, 'hgrc')]
rcdir = os.path.join(path, 'hgrc.d')
try:
rcs.extend([os.path.join(rcdir, f)
for f, kind in osutil.listdir(rcdir)
if f.endswith(".rc")])
except OSError:
pass
return rcs
def systemrcpath():
path = []
if sys.platform == 'plan9':
root = 'lib/mercurial'
else:
root = 'etc/mercurial'
# old mod_python does not set sys.argv
if len(getattr(sys, 'argv', [])) > 0:
p = os.path.dirname(os.path.dirname(sys.argv[0]))
if p != '/':
path.extend(_rcfiles(os.path.join(p, root)))
path.extend(_rcfiles('/' + root))
return path
def userrcpath():
if sys.platform == 'plan9':
return [os.environ['home'] + '/lib/hgrc']
else:
return [os.path.expanduser('~/.hgrc')]