annotate tests/test-diff-copy-depth.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 bca69641de61
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12150
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
1 $ for i in aaa zzz; do
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
2 > hg init t
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
3 > cd t
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
4 >
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
5 > echo
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
6 > echo "-- With $i"
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
7 >
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
8 > touch file
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
9 > hg add file
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
10 > hg ci -m "Add"
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
11 >
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
12 > hg cp file $i
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
13 > hg ci -m "a -> $i"
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
14 >
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
15 > hg cp $i other-file
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
16 > echo "different" >> $i
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
17 > hg ci -m "$i -> other-file"
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
18 >
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
19 > hg cp other-file somename
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
20 >
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
21 > echo "Status":
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
22 > hg st -C
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
23 > echo
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
24 > echo "Diff:"
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
25 > hg diff -g
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
26 >
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
27 > cd ..
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
28 > rm -rf t
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
29 > done
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
30
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
31 -- With aaa
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
32 Status:
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
33 A somename
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
34 other-file
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
35
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
36 Diff:
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
37 diff --git a/other-file b/somename
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
38 copy from other-file
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
39 copy to somename
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
40
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
41 -- With zzz
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
42 Status:
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
43 A somename
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
44 other-file
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
45
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
46 Diff:
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
47 diff --git a/other-file b/somename
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
48 copy from other-file
bca69641de61 tests: unify test-diff-copy-depth
Adrian Buehlmann <adrian@cadifra.com>
parents: 6489
diff changeset
49 copy to somename
6424
d8f44384c3ee copies: sort old names by depth
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
50
d8f44384c3ee copies: sort old names by depth
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
51