Show More
@@ -1240,16 +1240,17 b' def debuginstall(ui, **opts):' | |||||
1240 | # editor |
|
1240 | # editor | |
1241 | editor = ui.geteditor() |
|
1241 | editor = ui.geteditor() | |
1242 | editor = util.expandpath(editor) |
|
1242 | editor = util.expandpath(editor) | |
1243 | fm.write('editor', _("checking commit editor... (%s)\n"), editor) |
|
1243 | editorbin = pycompat.shlexsplit(editor)[0] | |
1244 | cmdpath = util.findexe(pycompat.shlexsplit(editor)[0]) |
|
1244 | fm.write('editor', _("checking commit editor... (%s)\n"), editorbin) | |
|
1245 | cmdpath = util.findexe(editorbin) | |||
1245 | fm.condwrite(not cmdpath and editor == 'vi', 'vinotfound', |
|
1246 | fm.condwrite(not cmdpath and editor == 'vi', 'vinotfound', | |
1246 | _(" No commit editor set and can't find %s in PATH\n" |
|
1247 | _(" No commit editor set and can't find %s in PATH\n" | |
1247 | " (specify a commit editor in your configuration" |
|
1248 | " (specify a commit editor in your configuration" | |
1248 | " file)\n"), not cmdpath and editor == 'vi' and editor) |
|
1249 | " file)\n"), not cmdpath and editor == 'vi' and editorbin) | |
1249 | fm.condwrite(not cmdpath and editor != 'vi', 'editornotfound', |
|
1250 | fm.condwrite(not cmdpath and editor != 'vi', 'editornotfound', | |
1250 | _(" Can't find editor '%s' in PATH\n" |
|
1251 | _(" Can't find editor '%s' in PATH\n" | |
1251 | " (specify a commit editor in your configuration" |
|
1252 | " (specify a commit editor in your configuration" | |
1252 | " file)\n"), not cmdpath and editor) |
|
1253 | " file)\n"), not cmdpath and editorbin) | |
1253 | if not cmdpath and editor != 'vi': |
|
1254 | if not cmdpath and editor != 'vi': | |
1254 | problems += 1 |
|
1255 | problems += 1 | |
1255 |
|
1256 |
@@ -17,7 +17,7 b' hg debuginstall' | |||||
17 | checking "re2" regexp engine \((available|missing)\) (re) |
|
17 | checking "re2" regexp engine \((available|missing)\) (re) | |
18 | checking templates (*mercurial?templates)... (glob) |
|
18 | checking templates (*mercurial?templates)... (glob) | |
19 | checking default template (*mercurial?templates?map-cmdline.default) (glob) |
|
19 | checking default template (*mercurial?templates?map-cmdline.default) (glob) | |
20 |
checking commit editor... (* |
|
20 | checking commit editor... (*) (glob) | |
21 |
|
|
21 | checking username (test) | |
22 | no problems detected |
|
22 | no problems detected | |
23 |
|
23 | |||
@@ -31,7 +31,7 b' hg debuginstall JSON' | |||||
31 | "defaulttemplate": "*mercurial?templates?map-cmdline.default", (glob) |
|
31 | "defaulttemplate": "*mercurial?templates?map-cmdline.default", (glob) | |
32 | "defaulttemplateerror": null, |
|
32 | "defaulttemplateerror": null, | |
33 | "defaulttemplatenotfound": "default", |
|
33 | "defaulttemplatenotfound": "default", | |
34 |
"editor": "* |
|
34 | "editor": "*", (glob) | |
35 | "editornotfound": false, |
|
35 | "editornotfound": false, | |
36 | "encoding": "ascii", |
|
36 | "encoding": "ascii", | |
37 | "encodingerror": null, |
|
37 | "encodingerror": null, | |
@@ -72,7 +72,7 b' hg debuginstall with no username' | |||||
72 | checking "re2" regexp engine \((available|missing)\) (re) |
|
72 | checking "re2" regexp engine \((available|missing)\) (re) | |
73 | checking templates (*mercurial?templates)... (glob) |
|
73 | checking templates (*mercurial?templates)... (glob) | |
74 | checking default template (*mercurial?templates?map-cmdline.default) (glob) |
|
74 | checking default template (*mercurial?templates?map-cmdline.default) (glob) | |
75 |
checking commit editor... (* |
|
75 | checking commit editor... (*) (glob) | |
76 |
|
|
76 | checking username... | |
77 | no username supplied |
|
77 | no username supplied | |
78 | (specify a username in your configuration file) |
|
78 | (specify a username in your configuration file) | |
@@ -120,6 +120,33 b' path variables are expanded (~ is the sa' | |||||
120 | checking username (test) |
|
120 | checking username (test) | |
121 | no problems detected |
|
121 | no problems detected | |
122 |
|
122 | |||
|
123 | print out the binary post-shlexsplit in the error message when commit editor is | |||
|
124 | not found (this is intentionally using backslashes to mimic a windows usecase). | |||
|
125 | $ HGEDITOR="c:\foo\bar\baz.exe -y -z" hg debuginstall | |||
|
126 | checking encoding (ascii)... | |||
|
127 | checking Python executable (*) (glob) | |||
|
128 | checking Python version (*) (glob) | |||
|
129 | checking Python lib (*lib*)... (glob) | |||
|
130 | checking Python security support (*) (glob) | |||
|
131 | TLS 1.2 not supported by Python install; network connections lack modern security (?) | |||
|
132 | SNI not supported by Python install; may have connectivity issues with some servers (?) | |||
|
133 | checking Mercurial version (*) (glob) | |||
|
134 | checking Mercurial custom build (*) (glob) | |||
|
135 | checking module policy (*) (glob) | |||
|
136 | checking installed modules (*mercurial)... (glob) | |||
|
137 | checking registered compression engines (*zlib*) (glob) | |||
|
138 | checking available compression engines (*zlib*) (glob) | |||
|
139 | checking available compression engines for wire protocol (*zlib*) (glob) | |||
|
140 | checking "re2" regexp engine \((available|missing)\) (re) | |||
|
141 | checking templates (*mercurial?templates)... (glob) | |||
|
142 | checking default template (*mercurial?templates?map-cmdline.default) (glob) | |||
|
143 | checking commit editor... (c:foobarbaz.exe) | |||
|
144 | Can't find editor 'c:foobarbaz.exe' in PATH | |||
|
145 | (specify a commit editor in your configuration file) | |||
|
146 | checking username (test) | |||
|
147 | 1 problems detected, please check your install! | |||
|
148 | [1] | |||
|
149 | ||||
123 |
|
|
150 | #if test-repo | |
124 | $ . "$TESTDIR/helpers-testrepo.sh" |
|
151 | $ . "$TESTDIR/helpers-testrepo.sh" | |
125 |
|
152 |
General Comments 0
You need to be logged in to leave comments.
Login now