Mercurial > hg
annotate tests/test-i18n.t @ 33289:abd7dedbaa36
sparse: vendor Facebook-developed extension
Facebook has developed an extension to enable "sparse" checkouts -
a working directory with a subset of files. This feature is a critical
component in enabling repositories to scale to infinite number of
files while retaining reasonable performance. It's worth noting
that sparse checkout is only one possible solution to this problem:
another is virtual filesystems that realize files on first access.
But given that virtual filesystems may not be accessible to all
users, sparse checkout is necessary as a fallback.
Per mailing list discussion at
https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-March/095868.html
we want to add sparse checkout to the Mercurial distribution via
roughly the following mechanism:
1. Vendor extension as-is with minimal modifications (this patch)
2. Refactor extension so it is more clearly experimental and inline
with Mercurial practices
3. Move code from extension into core where possible
4. Drop experimental labeling and/or move feature into core
after sign-off from narrow clone feature owners
This commit essentially copies the sparse extension and tests
from revision 71e0a2aeca92a4078fe1b8c76e32c88ff1929737 of the
https://bitbucket.org/facebook/hg-experimental repository.
A list of modifications made as part of vendoring is as follows:
* "EXPERIMENTAL" added to module docstring
* Imports were changed to match Mercurial style conventions
* "testedwith" value was updated to core Mercurial special value and
comment boilerplate was inserted
* A "clone_sparse" function was renamed to "clonesparse" to appease
the style checker
* Paths to the sparse extension in tests reflect built-in location
* test-sparse-extensions.t was renamed to test-sparse-fsmonitor.t
and references to "simplecache" were removed. The test always skips
because it isn't trivial to run it given the way we currently run
fsmonitor tests
* A double empty line was removed from test-sparse-profiles.t
There are aspects of the added code that are obviously not ideal.
The goal is to make a minimal number of modifications as part of
the vendoring to make it easier to track changes from the original
implementation. Refactoring will occur in subsequent patches.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 01 Jul 2017 10:43:29 -0700 |
parents | 75be14993fda |
children | d00ec62d156f |
rev | line source |
---|---|
22046
7a9cbb315d84
tests: replace exit 80 with #require
Matt Mackall <mpm@selenic.com>
parents:
21024
diff
changeset
|
1 (Translations are optional) |
13442
bb107a31820e
test-i18n: make test conditional on msgfmt availability
Martin Geisler <mg@lazybytes.net>
parents:
13414
diff
changeset
|
2 |
26252
a3edce86f430
test-i18n: always run non gettext tests
timeless@mozdev.org
parents:
22046
diff
changeset
|
3 #if gettext no-outer-repo |
17015
73d20de5f30b
tests: add missing no-outer-repo requirements
Mads Kiilerich <mads@kiilerich.com>
parents:
16981
diff
changeset
|
4 |
13414 | 5 Test that translations are compiled and installed correctly. |
6 | |
7 Default encoding in tests is "ascii" and the translation is encoded | |
8 using the "replace" error handler: | |
9 | |
10 $ LANGUAGE=pt_BR hg tip | |
14920
56848e2bb0c5
test-i18n, i18n-pt_BR: updated test message changed in 41c3a71c318d
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
14914
diff
changeset
|
11 abortado: n?o foi encontrado um reposit?rio em '$TESTTMP' (.hg n?o encontrado)! |
13414 | 12 [255] |
13 | |
21024
7731a2281cf0
spelling: fixes from spell checker
Mads Kiilerich <madski@unity3d.com>
parents:
20338
diff
changeset
|
14 Using a more accommodating encoding: |
13414 | 15 |
16 $ HGENCODING=UTF-8 LANGUAGE=pt_BR hg tip | |
14920
56848e2bb0c5
test-i18n, i18n-pt_BR: updated test message changed in 41c3a71c318d
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
14914
diff
changeset
|
17 abortado: n\xc3\xa3o foi encontrado um reposit\xc3\xb3rio em '$TESTTMP' (.hg n\xc3\xa3o encontrado)! (esc) |
13414 | 18 [255] |
19 | |
20 Different encoding: | |
21 | |
22 $ HGENCODING=Latin-1 LANGUAGE=pt_BR hg tip | |
14920
56848e2bb0c5
test-i18n, i18n-pt_BR: updated test message changed in 41c3a71c318d
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
14914
diff
changeset
|
23 abortado: n\xe3o foi encontrado um reposit\xf3rio em '$TESTTMP' (.hg n\xe3o encontrado)! (esc) |
13414 | 24 [255] |
16895
430714e2a876
help: test keyword search in translated text.
Olav Reinert <seroton10@gmail.com>
parents:
14920
diff
changeset
|
25 |
17015
73d20de5f30b
tests: add missing no-outer-repo requirements
Mads Kiilerich <mads@kiilerich.com>
parents:
16981
diff
changeset
|
26 #endif |
73d20de5f30b
tests: add missing no-outer-repo requirements
Mads Kiilerich <mads@kiilerich.com>
parents:
16981
diff
changeset
|
27 |
26252
a3edce86f430
test-i18n: always run non gettext tests
timeless@mozdev.org
parents:
22046
diff
changeset
|
28 #if gettext |
a3edce86f430
test-i18n: always run non gettext tests
timeless@mozdev.org
parents:
22046
diff
changeset
|
29 |
16895
430714e2a876
help: test keyword search in translated text.
Olav Reinert <seroton10@gmail.com>
parents:
14920
diff
changeset
|
30 Test keyword search in translated help text: |
430714e2a876
help: test keyword search in translated text.
Olav Reinert <seroton10@gmail.com>
parents:
14920
diff
changeset
|
31 |
30943
a0e4df5a4d5d
tests: update test-i18n.t to not depend on the pager extension
Augie Fackler <augie@google.com>
parents:
26252
diff
changeset
|
32 $ HGENCODING=UTF-8 LANGUAGE=de hg help -k Aktualisiert |
20338
b9e7af5bd5e5
i18n-de: update many fuzzy entries and translate some simple ones
Simon Heimberg <simohe@besonet.ch>
parents:
20152
diff
changeset
|
33 Themen: |
16895
430714e2a876
help: test keyword search in translated text.
Olav Reinert <seroton10@gmail.com>
parents:
14920
diff
changeset
|
34 |
30943
a0e4df5a4d5d
tests: update test-i18n.t to not depend on the pager extension
Augie Fackler <augie@google.com>
parents:
26252
diff
changeset
|
35 subrepos Unterarchive |
16895
430714e2a876
help: test keyword search in translated text.
Olav Reinert <seroton10@gmail.com>
parents:
14920
diff
changeset
|
36 |
30943
a0e4df5a4d5d
tests: update test-i18n.t to not depend on the pager extension
Augie Fackler <augie@google.com>
parents:
26252
diff
changeset
|
37 Befehle: |
16895
430714e2a876
help: test keyword search in translated text.
Olav Reinert <seroton10@gmail.com>
parents:
14920
diff
changeset
|
38 |
30943
a0e4df5a4d5d
tests: update test-i18n.t to not depend on the pager extension
Augie Fackler <augie@google.com>
parents:
26252
diff
changeset
|
39 pull Ruft \xc3\x84nderungen von der angegebenen Quelle ab (esc) |
a0e4df5a4d5d
tests: update test-i18n.t to not depend on the pager extension
Augie Fackler <augie@google.com>
parents:
26252
diff
changeset
|
40 update Aktualisiert das Arbeitsverzeichnis (oder wechselt die Version) |
16895
430714e2a876
help: test keyword search in translated text.
Olav Reinert <seroton10@gmail.com>
parents:
14920
diff
changeset
|
41 |
26252
a3edce86f430
test-i18n: always run non gettext tests
timeless@mozdev.org
parents:
22046
diff
changeset
|
42 #endif |
a3edce86f430
test-i18n: always run non gettext tests
timeless@mozdev.org
parents:
22046
diff
changeset
|
43 |
20152
84939b728749
i18n: add the tool to check Mercurial specific translation problems in *.po
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17015
diff
changeset
|
44 Check Mercurial specific translation problems in each *.po files, and |
84939b728749
i18n: add the tool to check Mercurial specific translation problems in *.po
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17015
diff
changeset
|
45 tool itself by doctest |
84939b728749
i18n: add the tool to check Mercurial specific translation problems in *.po
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17015
diff
changeset
|
46 |
84939b728749
i18n: add the tool to check Mercurial specific translation problems in *.po
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17015
diff
changeset
|
47 $ cd "$TESTDIR"/../i18n |
32940
75be14993fda
cleanup: use $PYTHON to run python in many more tests
Augie Fackler <augie@google.com>
parents:
30943
diff
changeset
|
48 $ $PYTHON check-translation.py *.po |
75be14993fda
cleanup: use $PYTHON to run python in many more tests
Augie Fackler <augie@google.com>
parents:
30943
diff
changeset
|
49 $ $PYTHON check-translation.py --doctest |
20152
84939b728749
i18n: add the tool to check Mercurial specific translation problems in *.po
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
17015
diff
changeset
|
50 $ cd $TESTTMP |