Show More
@@ -1029,15 +1029,12 b' def debuginstall(ui):' | |||||
1029 |
|
1029 | |||
1030 | # check username |
|
1030 | # check username | |
1031 | ui.status(_("Checking username...\n")) |
|
1031 | ui.status(_("Checking username...\n")) | |
1032 | user = os.environ.get("HGUSER") |
|
1032 | try: | |
1033 | if user is None: |
|
1033 | user = ui.username() | |
1034 | user = ui.config("ui", "username") |
|
1034 | except util.Abort, e: | |
1035 | if user is None: |
|
1035 | ui.write(" %s\n" % e) | |
1036 | user = os.environ.get("EMAIL") |
|
|||
1037 | if not user: |
|
|||
1038 | ui.warn(" ") |
|
|||
1039 | ui.username() |
|
|||
1040 | ui.write(_(" (specify a username in your .hgrc file)\n")) |
|
1036 | ui.write(_(" (specify a username in your .hgrc file)\n")) | |
|
1037 | problems += 1 | |||
1041 |
|
1038 | |||
1042 | if not problems: |
|
1039 | if not problems: | |
1043 | ui.status(_("No problems detected\n")) |
|
1040 | ui.status(_("No problems detected\n")) |
@@ -1,3 +1,10 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
|
3 | echo '% hg debuginstall' | |||
3 | hg debuginstall |
|
4 | hg debuginstall | |
|
5 | ||||
|
6 | echo '% hg debuginstall with no username' | |||
|
7 | HGUSER= hg debuginstall | |||
|
8 | ||||
|
9 | # Happy End | |||
|
10 | true |
@@ -1,3 +1,4 b'' | |||||
|
1 | % hg debuginstall | |||
1 | Checking encoding (ascii)... |
|
2 | Checking encoding (ascii)... | |
2 | Checking extensions... |
|
3 | Checking extensions... | |
3 | Checking templates... |
|
4 | Checking templates... | |
@@ -5,3 +6,13 b' Checking patch...' | |||||
5 | Checking commit editor... |
|
6 | Checking commit editor... | |
6 | Checking username... |
|
7 | Checking username... | |
7 | No problems detected |
|
8 | No problems detected | |
|
9 | % hg debuginstall with no username | |||
|
10 | Checking encoding (ascii)... | |||
|
11 | Checking extensions... | |||
|
12 | Checking templates... | |||
|
13 | Checking patch... | |||
|
14 | Checking commit editor... | |||
|
15 | Checking username... | |||
|
16 | Please specify a username. | |||
|
17 | (specify a username in your .hgrc file) | |||
|
18 | 1 problems detected, please check your install! |
General Comments 0
You need to be logged in to leave comments.
Login now