Mercurial > hg
comparison tests/test-install.t @ 36236:564dec70b50c
debugcommands: print out the editor that was searched for (post shlexsplit)
A user was in #mercurial and had the following settings in their hgrc:
[ui]
editor = C:\home\npp\notepad++.exe -multiInst -nosession
After shlexsplit, the first argument was mangled into C:homenppnotepad++.exe,
which was quite unlikely to exist. It took many back-and-forths to identify
that adding " characters around the exe would fix the issue; we were thinking
that it's because something was incorrectly *not* splitting and adding/moving
the " characters fixed the split boundaries, but when testing afterward it
appears that it's just mangled.
I considered adding an informational if pycompat.iswindows and \ in the string
about this issue, but was worried that might have too many false positives and
did not do so at this time.
Differential Revision: https://phab.mercurial-scm.org/D1808
author | Kyle Lippincott <spectral@google.com> |
---|---|
date | Thu, 04 Jan 2018 16:29:07 -0800 |
parents | 711149d8e676 |
children | 94a1ff16f362 |
comparison
equal
deleted
inserted
replaced
36235:d879aab17786 | 36236:564dec70b50c |
---|---|
15 checking available compression engines (*zlib*) (glob) | 15 checking available compression engines (*zlib*) (glob) |
16 checking available compression engines for wire protocol (*zlib*) (glob) | 16 checking available compression engines for wire protocol (*zlib*) (glob) |
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... (* -c "import sys; sys.exit(0)") (glob) | 20 checking commit editor... (*) (glob) |
21 checking username (test) | 21 checking username (test) |
22 no problems detected | 22 no problems detected |
23 | 23 |
24 hg debuginstall JSON | 24 hg debuginstall JSON |
25 $ hg debuginstall -Tjson | sed 's|\\\\|\\|g' | 25 $ hg debuginstall -Tjson | sed 's|\\\\|\\|g' |
29 "compenginesavail": ["bz2", "bz2truncated", "none", "zlib"*], (glob) | 29 "compenginesavail": ["bz2", "bz2truncated", "none", "zlib"*], (glob) |
30 "compenginesserver": [*"zlib"*], (glob) | 30 "compenginesserver": [*"zlib"*], (glob) |
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": "* -c \"import sys; sys.exit(0)\"", (glob) | 34 "editor": "*", (glob) |
35 "editornotfound": false, | 35 "editornotfound": false, |
36 "encoding": "ascii", | 36 "encoding": "ascii", |
37 "encodingerror": null, | 37 "encodingerror": null, |
38 "extensionserror": null, (no-pure !) | 38 "extensionserror": null, (no-pure !) |
39 "hgmodulepolicy": "*", (glob) | 39 "hgmodulepolicy": "*", (glob) |
70 checking available compression engines (*zlib*) (glob) | 70 checking available compression engines (*zlib*) (glob) |
71 checking available compression engines for wire protocol (*zlib*) (glob) | 71 checking available compression engines for wire protocol (*zlib*) (glob) |
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... (* -c "import sys; sys.exit(0)") (glob) | 75 checking commit editor... (*) (glob) |
76 checking username... | 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) |
79 1 problems detected, please check your install! | 79 1 problems detected, please check your install! |
80 [1] | 80 [1] |
117 checking templates (*mercurial?templates)... (glob) | 117 checking templates (*mercurial?templates)... (glob) |
118 checking default template (*mercurial?templates?map-cmdline.default) (glob) | 118 checking default template (*mercurial?templates?map-cmdline.default) (glob) |
119 checking commit editor... ($TESTTMP/tools/testeditor.exe) | 119 checking commit editor... ($TESTTMP/tools/testeditor.exe) |
120 checking username (test) | 120 checking username (test) |
121 no problems detected | 121 no problems detected |
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] | |
122 | 149 |
123 #if test-repo | 150 #if test-repo |
124 $ . "$TESTDIR/helpers-testrepo.sh" | 151 $ . "$TESTDIR/helpers-testrepo.sh" |
125 | 152 |
126 $ cat >> wixxml.py << EOF | 153 $ cat >> wixxml.py << EOF |