Show More
@@ -12,7 +12,6 b' import base64' | |||
|
12 | 12 | import errno |
|
13 | 13 | import mimetypes |
|
14 | 14 | import os |
|
15 | import uuid | |
|
16 | 15 | |
|
17 | 16 | from .. import ( |
|
18 | 17 | encoding, |
@@ -221,6 +220,23 b' def cspvalues(ui):' | |||
|
221 | 220 | First value is ``None`` if CSP isn't enabled. Second value is ``None`` |
|
222 | 221 | if CSP isn't enabled or if the CSP header doesn't need a nonce. |
|
223 | 222 | """ |
|
223 | # Without demandimport, "import uuid" could have an immediate side-effect | |
|
224 | # running "ldconfig" on Linux trying to find libuuid. | |
|
225 | # With Python <= 2.7.12, that "ldconfig" is run via a shell and the shell | |
|
226 | # may pollute the terminal with: | |
|
227 | # | |
|
228 | # shell-init: error retrieving current directory: getcwd: cannot access | |
|
229 | # parent directories: No such file or directory | |
|
230 | # | |
|
231 | # Python >= 2.7.13 has fixed it by running "ldconfig" directly without a | |
|
232 | # shell (hg changeset a09ae70f3489). | |
|
233 | # | |
|
234 | # Moved "import uuid" from here so it's executed after we know we have | |
|
235 | # a sane cwd (i.e. after dispatch.py cwd check). | |
|
236 | # | |
|
237 | # We can move it back once we no longer need Python <= 2.7.12 support. | |
|
238 | import uuid | |
|
239 | ||
|
224 | 240 | # Don't allow untrusted CSP setting since it be disable protections |
|
225 | 241 | # from a trusted/global source. |
|
226 | 242 | csp = ui.config('web', 'csp', untrusted=False) |
@@ -60,3 +60,16 b' No repo:' | |||
|
60 | 60 | [255] |
|
61 | 61 | |
|
62 | 62 | #endif |
|
63 | ||
|
64 | #if rmcwd | |
|
65 | ||
|
66 | Current directory removed: | |
|
67 | ||
|
68 | $ mkdir $TESTTMP/repo1 | |
|
69 | $ cd $TESTTMP/repo1 | |
|
70 | $ rm -rf $TESTTMP/repo1 | |
|
71 | $ HGDEMANDIMPORT=disable hg version -q | |
|
72 | abort: error getting current working directory: * (glob) | |
|
73 | [255] | |
|
74 | ||
|
75 | #endif |
General Comments 0
You need to be logged in to leave comments.
Login now