Mercurial > hg-stable
annotate tests/test-check-code.t @ 30233:3afde791dce1 stable
largefiles: handle that a found standin file doesn't exist when removing it
I somehow ended up in a situation where hg crashed on an unlink I introduced in
328545c7d8a1.
I don't know how it happened and can't reproduce it. It seems like it only can
happen when the file is removed between the time of check in a working
directory context walk that finds a standin file, and the time of use when we
try to remove it because the corresponding largefile doesn't exist.
But better safe than sorry: replace the plain unlink with unlinkpath with
ignoremissing=True. That will also remove remaining empty directories, which
arguably is more correct.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Thu, 27 Oct 2016 20:06:33 +0200 |
parents | 456609cbd840 |
children | b032a7b676c6 |
rev | line source |
---|---|
27368
409a20314c64
tests: move the '-hg' postfix for all style tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
1 #require test-repo |
409a20314c64
tests: move the '-hg' postfix for all style tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
2 |
29219
3c9066ed557c
tests: silence test-repo obsolete warning
timeless <timeless@mozdev.org>
parents:
28529
diff
changeset
|
3 $ . "$TESTDIR/helpers-testrepo.sh" |
27368
409a20314c64
tests: move the '-hg' postfix for all style tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
4 $ check_code="$TESTDIR"/../contrib/check-code.py |
409a20314c64
tests: move the '-hg' postfix for all style tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
5 $ cd "$TESTDIR"/.. |
409a20314c64
tests: move the '-hg' postfix for all style tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
6 |
409a20314c64
tests: move the '-hg' postfix for all style tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
7 New errors are not allowed. Warnings are strongly discouraged. |
409a20314c64
tests: move the '-hg' postfix for all style tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
8 (The writing "no-che?k-code" is for not skipping this file when checking.) |
409a20314c64
tests: move the '-hg' postfix for all style tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
9 |
409a20314c64
tests: move the '-hg' postfix for all style tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
10 $ hg locate | sed 's-\\-/-g' | |
409a20314c64
tests: move the '-hg' postfix for all style tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
11 > xargs "$check_code" --warnings --per-file=0 || false |
28432
2377c4ac4eec
fsmonitor: dependencies for new experimental extension
Martijn Pieters <mjpieters@fb.com>
parents:
28421
diff
changeset
|
12 Skipping hgext/fsmonitor/pywatchman/__init__.py it has no-che?k-code (glob) |
2377c4ac4eec
fsmonitor: dependencies for new experimental extension
Martijn Pieters <mjpieters@fb.com>
parents:
28421
diff
changeset
|
13 Skipping hgext/fsmonitor/pywatchman/bser.c it has no-che?k-code (glob) |
2377c4ac4eec
fsmonitor: dependencies for new experimental extension
Martijn Pieters <mjpieters@fb.com>
parents:
28421
diff
changeset
|
14 Skipping hgext/fsmonitor/pywatchman/capabilities.py it has no-che?k-code (glob) |
28529
045cdf47851a
fsmonitor: flag msc_stdint as no-check-code
Augie Fackler <augie@google.com>
parents:
28432
diff
changeset
|
15 Skipping hgext/fsmonitor/pywatchman/msc_stdint.h it has no-che?k-code (glob) |
28432
2377c4ac4eec
fsmonitor: dependencies for new experimental extension
Martijn Pieters <mjpieters@fb.com>
parents:
28421
diff
changeset
|
16 Skipping hgext/fsmonitor/pywatchman/pybser.py it has no-che?k-code (glob) |
27368
409a20314c64
tests: move the '-hg' postfix for all style tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
17 Skipping i18n/polib.py it has no-che?k-code (glob) |
409a20314c64
tests: move the '-hg' postfix for all style tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
18 Skipping mercurial/httpclient/__init__.py it has no-che?k-code (glob) |
409a20314c64
tests: move the '-hg' postfix for all style tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
19 Skipping mercurial/httpclient/_readers.py it has no-che?k-code (glob) |