Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 16934:0c9c41e53f1a
debuginstall: lowercase status messages
author | Martin Geisler <mg@aragost.com> |
---|---|
date | Tue, 12 Jun 2012 14:18:18 +0200 |
parents | 2255950e1f76 |
children | f635c476fa3f |
comparison
equal
deleted
inserted
replaced
16933:30143c3dd102 | 16934:0c9c41e53f1a |
---|---|
1971 return name | 1971 return name |
1972 | 1972 |
1973 problems = 0 | 1973 problems = 0 |
1974 | 1974 |
1975 # encoding | 1975 # encoding |
1976 ui.status(_("Checking encoding (%s)...\n") % encoding.encoding) | 1976 ui.status(_("checking encoding (%s)...\n") % encoding.encoding) |
1977 try: | 1977 try: |
1978 encoding.fromlocal("test") | 1978 encoding.fromlocal("test") |
1979 except util.Abort, inst: | 1979 except util.Abort, inst: |
1980 ui.write(" %s\n" % inst) | 1980 ui.write(" %s\n" % inst) |
1981 ui.write(_(" (check that your locale is properly set)\n")) | 1981 ui.write(_(" (check that your locale is properly set)\n")) |
1982 problems += 1 | 1982 problems += 1 |
1983 | 1983 |
1984 # compiled modules | 1984 # compiled modules |
1985 ui.status(_("Checking installed modules (%s)...\n") | 1985 ui.status(_("checking installed modules (%s)...\n") |
1986 % os.path.dirname(__file__)) | 1986 % os.path.dirname(__file__)) |
1987 try: | 1987 try: |
1988 import bdiff, mpatch, base85, osutil | 1988 import bdiff, mpatch, base85, osutil |
1989 dir(bdiff), dir(mpatch), dir(base85), dir(osutil) # quiet pyflakes | 1989 dir(bdiff), dir(mpatch), dir(base85), dir(osutil) # quiet pyflakes |
1990 except Exception, inst: | 1990 except Exception, inst: |
1994 problems += 1 | 1994 problems += 1 |
1995 | 1995 |
1996 # templates | 1996 # templates |
1997 import templater | 1997 import templater |
1998 p = templater.templatepath() | 1998 p = templater.templatepath() |
1999 ui.status(_("Checking templates (%s)...\n") % ' '.join(p)) | 1999 ui.status(_("checking templates (%s)...\n") % ' '.join(p)) |
2000 try: | 2000 try: |
2001 templater.templater(templater.templatepath("map-cmdline.default")) | 2001 templater.templater(templater.templatepath("map-cmdline.default")) |
2002 except Exception, inst: | 2002 except Exception, inst: |
2003 ui.write(" %s\n" % inst) | 2003 ui.write(" %s\n" % inst) |
2004 ui.write(_(" (templates seem to have been installed incorrectly)\n")) | 2004 ui.write(_(" (templates seem to have been installed incorrectly)\n")) |
2005 problems += 1 | 2005 problems += 1 |
2006 | 2006 |
2007 # editor | 2007 # editor |
2008 ui.status(_("Checking commit editor...\n")) | 2008 ui.status(_("checking commit editor...\n")) |
2009 editor = ui.geteditor() | 2009 editor = ui.geteditor() |
2010 cmdpath = util.findexe(editor) or util.findexe(editor.split()[0]) | 2010 cmdpath = util.findexe(editor) or util.findexe(editor.split()[0]) |
2011 if not cmdpath: | 2011 if not cmdpath: |
2012 if editor == 'vi': | 2012 if editor == 'vi': |
2013 ui.write(_(" No commit editor set and can't find vi in PATH\n")) | 2013 ui.write(_(" No commit editor set and can't find vi in PATH\n")) |
2018 ui.write(_(" (specify a commit editor in your configuration" | 2018 ui.write(_(" (specify a commit editor in your configuration" |
2019 " file)\n")) | 2019 " file)\n")) |
2020 problems += 1 | 2020 problems += 1 |
2021 | 2021 |
2022 # check username | 2022 # check username |
2023 ui.status(_("Checking username...\n")) | 2023 ui.status(_("checking username...\n")) |
2024 try: | 2024 try: |
2025 ui.username() | 2025 ui.username() |
2026 except util.Abort, e: | 2026 except util.Abort, e: |
2027 ui.write(" %s\n" % e) | 2027 ui.write(" %s\n" % e) |
2028 ui.write(_(" (specify a username in your configuration file)\n")) | 2028 ui.write(_(" (specify a username in your configuration file)\n")) |
2029 problems += 1 | 2029 problems += 1 |
2030 | 2030 |
2031 if not problems: | 2031 if not problems: |
2032 ui.status(_("No problems detected\n")) | 2032 ui.status(_("no problems detected\n")) |
2033 else: | 2033 else: |
2034 ui.write(_("%s problems detected," | 2034 ui.write(_("%s problems detected," |
2035 " please check your install!\n") % problems) | 2035 " please check your install!\n") % problems) |
2036 | 2036 |
2037 return problems | 2037 return problems |