Mercurial > hg
annotate tests/test-merge-revert.t @ 44261:04a3ae7aba14
chg: force-set LC_CTYPE on server start to actual value from the environment
Python 3.7+ will "coerce" the LC_CTYPE variable in many instances, and this can
cause issues with chg being able to start up. D7550 attempted to fix this, but a
combination of a misreading of the way that python3.7 does the coercion and an
untested state (LC_CTYPE being set to an invalid value) meant that this was
still not quite working.
This change will cause differences between chg and hg: hg will have the LC_CTYPE
environment variable coerced, while chg will not. This is unlikely to cause any
detectable behavior differences in what Mercurial itself outputs, but it does
have two known effects:
- When using hg, the coerced LC_CTYPE will be passed to subprocesses, even
non-python ones. Using chg will remove the coercion, and this will not
happen. This is arguably more correct behavior on chg's part.
- On macOS, if you set your region to Brazil but your language to English,
this isn't representable in locale strings, so macOS sets LC_CTYPE=UTF-8. If
this value is passed along when ssh'ing to a non-macOS machine, some
functions (such as locale.setlocale()) may raise an exception due to an
unsupported locale setting. This is most easily encountered when doing an
interactive commit/split/etc. when using ui.interface=curses.
Differential Revision: https://phab.mercurial-scm.org/D8039
author | Kyle Lippincott <spectral@google.com> |
---|---|
date | Wed, 29 Jan 2020 13:39:50 -0800 |
parents | 28e2e3804f2e |
children | 55c6ebd11cb9 |
rev | line source |
---|---|
12279 | 1 $ hg init |
2 | |
3 $ echo "added file1" > file1 | |
4 $ echo "added file2" > file2 | |
5 $ hg add file1 file2 | |
6 $ hg commit -m "added file1 and file2" | |
7 | |
8 $ echo "changed file1" >> file1 | |
9 $ hg commit -m "changed file1" | |
10 | |
11 $ hg -q log | |
12 1:08a16e8e4408 | |
13 0:d29c767a4b52 | |
14 $ hg id | |
15 08a16e8e4408 tip | |
16 | |
17 $ hg update -C 0 | |
18 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
19 $ hg id | |
20 d29c767a4b52 | |
21 $ echo "changed file1" >> file1 | |
22 $ hg id | |
23 d29c767a4b52+ | |
24 | |
25 $ hg revert --all | |
26 reverting file1 | |
27 $ hg diff | |
28 $ hg status | |
29 ? file1.orig | |
30 $ hg id | |
31 d29c767a4b52 | |
792
49ec802b4a16
Added tests for bug with three-way-merging of old tip, tip and cwd.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
32 |
12279 | 33 $ hg update |
34 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
35 $ hg diff | |
36 $ hg status | |
37 ? file1.orig | |
38 $ hg id | |
39 08a16e8e4408 tip | |
40 | |
41 $ hg update -C 0 | |
42 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
43 $ echo "changed file1" >> file1 | |
44 | |
45 $ hg update | |
46 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
47 $ hg diff | |
48 $ hg status | |
49 ? file1.orig | |
50 $ hg id | |
51 08a16e8e4408 tip | |
792
49ec802b4a16
Added tests for bug with three-way-merging of old tip, tip and cwd.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
52 |
12279 | 53 $ hg revert --all |
54 $ hg diff | |
55 $ hg status | |
56 ? file1.orig | |
57 $ hg id | |
58 08a16e8e4408 tip | |
59 | |
60 $ hg revert -r tip --all | |
61 $ hg diff | |
62 $ hg status | |
63 ? file1.orig | |
64 $ hg id | |
65 08a16e8e4408 tip | |
66 | |
67 $ hg update -C | |
68 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
69 $ hg diff | |
70 $ hg status | |
71 ? file1.orig | |
72 $ hg id | |
73 08a16e8e4408 tip | |
74 |