Mercurial > hg
annotate tests/test-i18n.t @ 23923:ab6fd3205dad stable
largefiles: fix commit of a directory with no largefile changes (issue4330)
When a directory is named in the commit file list, the previous behavior was to
walk the list, and if no normal files in the directory were also named, add the
corresponding standin for each largefile in that directory. The directory is
then dropped from the list, so that committing a directory with no normal file
changes works. It then added the corresponding standin directory for the first
largefile seen, by prefixing it with '.hglf/'.
The latter is unnecessary since each affected largefile is explicitly referenced
by its standin in the list. It also caused an abort if there were no changed
largefiles in the directory, because none of its standins changed:
abort: .hglf/foo/bar: no match under directory!
This list of files is used to tweak a matcher in lfutil.updatestandinsbymatch(),
which is what is passed to commit().
The status() call that is ultimately done in the commit code with this matcher
seems to have some OS specific differences. It is not necessary to append '.'
for Windows to run the largefiles tests cleanly. But if '.' is not added to the
list, the match function isn't called on Linux, so status() would miss any
normal files that were also in a named directory. The commit then proceeds
without those normal files, or says "nothing changed" if there were no changed
largefiles in the directory. This is not filesystem specific, as VFAT on Linux
had the same behavior as when run on ext4. It is also not an issue with
lfilesrepo.status(), since that only calls the overridden implementation when
paths are passed to commit. I dont have access to an OS X machine ATM to test
there.
Maybe there's a better way to do this. But since the standin directory for the
first largefile was previously being added, and that caused the same walk in
status(), there's no preformance change to this. There is no danger of
erroneously committing files in '.', because the original match function is
called, and if it fails, the lfutil.updatestandinsbymatch() tweaked matcher only
indicates a match if the file is in the list of standins- and '.' never is. The
added tests confirm this.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sun, 18 Jan 2015 15:15:40 -0500 |
parents | 7a9cbb315d84 |
children | a3edce86f430 |
rev | line source |
---|---|
22046
7a9cbb315d84
tests: replace exit 80 with #require
Matt Mackall <mpm@selenic.com>
parents:
21024
diff
changeset
|
1 #require gettext |
13442
bb107a31820e
test-i18n: make test conditional on msgfmt availability
Martin Geisler <mg@lazybytes.net>
parents:
13414
diff
changeset
|
2 |
22046
7a9cbb315d84
tests: replace exit 80 with #require
Matt Mackall <mpm@selenic.com>
parents:
21024
diff
changeset
|
3 (Translations are optional) |
13442
bb107a31820e
test-i18n: make test conditional on msgfmt availability
Martin Geisler <mg@lazybytes.net>
parents:
13414
diff
changeset
|
4 |
17015
73d20de5f30b
tests: add missing no-outer-repo requirements
Mads Kiilerich <mads@kiilerich.com>
parents:
16981
diff
changeset
|
5 #if no-outer-repo |
73d20de5f30b
tests: add missing no-outer-repo requirements
Mads Kiilerich <mads@kiilerich.com>
parents:
16981
diff
changeset
|
6 |
13414 | 7 Test that translations are compiled and installed correctly. |
8 | |
9 Default encoding in tests is "ascii" and the translation is encoded | |
10 using the "replace" error handler: | |
11 | |
12 $ 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
|
13 abortado: n?o foi encontrado um reposit?rio em '$TESTTMP' (.hg n?o encontrado)! |
13414 | 14 [255] |
15 | |
21024
7731a2281cf0
spelling: fixes from spell checker
Mads Kiilerich <madski@unity3d.com>
parents:
20338
diff
changeset
|
16 Using a more accommodating encoding: |
13414 | 17 |
18 $ 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
|
19 abortado: n\xc3\xa3o foi encontrado um reposit\xc3\xb3rio em '$TESTTMP' (.hg n\xc3\xa3o encontrado)! (esc) |
13414 | 20 [255] |
21 | |
22 Different encoding: | |
23 | |
24 $ 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
|
25 abortado: n\xe3o foi encontrado um reposit\xf3rio em '$TESTTMP' (.hg n\xe3o encontrado)! (esc) |
13414 | 26 [255] |
16895
430714e2a876
help: test keyword search in translated text.
Olav Reinert <seroton10@gmail.com>
parents:
14920
diff
changeset
|
27 |
17015
73d20de5f30b
tests: add missing no-outer-repo requirements
Mads Kiilerich <mads@kiilerich.com>
parents:
16981
diff
changeset
|
28 #endif |
73d20de5f30b
tests: add missing no-outer-repo requirements
Mads Kiilerich <mads@kiilerich.com>
parents:
16981
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 |
430714e2a876
help: test keyword search in translated text.
Olav Reinert <seroton10@gmail.com>
parents:
14920
diff
changeset
|
32 $ HGENCODING=UTF-8 LANGUAGE=de hg help -k blättern |
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 |
16981
2264e3e39cba
tests: fix test-i18n.t after translation update
Mads Kiilerich <mads@kiilerich.com>
parents:
16895
diff
changeset
|
35 extensions Benutzung erweiterter Funktionen |
16895
430714e2a876
help: test keyword search in translated text.
Olav Reinert <seroton10@gmail.com>
parents:
14920
diff
changeset
|
36 |
430714e2a876
help: test keyword search in translated text.
Olav Reinert <seroton10@gmail.com>
parents:
14920
diff
changeset
|
37 Erweiterungen: |
430714e2a876
help: test keyword search in translated text.
Olav Reinert <seroton10@gmail.com>
parents:
14920
diff
changeset
|
38 |
430714e2a876
help: test keyword search in translated text.
Olav Reinert <seroton10@gmail.com>
parents:
14920
diff
changeset
|
39 pager Verwendet einen externen Pager zum Bl\xc3\xa4ttern in der Ausgabe von Befehlen (esc) |
430714e2a876
help: test keyword search in translated text.
Olav Reinert <seroton10@gmail.com>
parents:
14920
diff
changeset
|
40 |
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
|
41 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
|
42 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
|
43 |
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 $ cd "$TESTDIR"/../i18n |
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 $ python check-translation.py *.po |
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 $ python check-translation.py --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
|
47 $ cd $TESTTMP |