annotate tests/test-check-code-hg.t @ 18316:f36375576ed5

filecache: create an entry in _filecache when __set__ is called for a missing one Preserve the invariant that if P is a filecached property on X then P in X.__dict__ => P in X._filecache. Previously, it was possible for a filecached property to become out of sync with the filesystem if it was set before getting it first, since the initial filecacheentry was created in __get__. Old behaviour: repo.prop = x repo.invalidate() # prop has no entry in _filecache, it's not removed # from __dict__ repo.prop # returns x like before without checking with the # filesystem New: repo.prop = x # an empty entry is created in _filecache repo.invalidate() # prop is removed from __dict__ repo.prop # recreates prop
author Idan Kamara <idankk86@gmail.com>
date Mon, 17 Dec 2012 15:25:45 +0200
parents a6180647ead4
children 667063b22a69
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15557
7bb5ed61b74c tests: convert test-check-code-hg.py to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 11771
diff changeset
1 $ check_code="$TESTDIR"/../contrib/check-code.py
7bb5ed61b74c tests: convert test-check-code-hg.py to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 11771
diff changeset
2 $ cd "$TESTDIR"/..
16485
f48b075ff088 tests: solaris sh can not negate exit status with '!'
Mads Kiilerich <mads@kiilerich.com>
parents: 16306
diff changeset
3 $ if hg identify -q > /dev/null; then :
f48b075ff088 tests: solaris sh can not negate exit status with '!'
Mads Kiilerich <mads@kiilerich.com>
parents: 16306
diff changeset
4 > else
16179
be6ac2ecc7f8 test-check-code-hg: skip test if not in a working dir (issue3248).
Greg Ward <greg@gerg.ca>
parents: 16156
diff changeset
5 > echo "skipped: not a Mercurial working dir" >&2
be6ac2ecc7f8 test-check-code-hg: skip test if not in a working dir (issue3248).
Greg Ward <greg@gerg.ca>
parents: 16156
diff changeset
6 > exit 80
be6ac2ecc7f8 test-check-code-hg: skip test if not in a working dir (issue3248).
Greg Ward <greg@gerg.ca>
parents: 16156
diff changeset
7 > fi
15558
c6b600d2348c tests: run check-code with warnings and maintain a whitelist
Mads Kiilerich <mads@kiilerich.com>
parents: 15557
diff changeset
8
17977
a6180647ead4 tests: only call check-code once
Matt Mackall <mpm@selenic.com>
parents: 17956
diff changeset
9 New errors are not allowed. Warnings are strongly discouraged.
a6180647ead4 tests: only call check-code once
Matt Mackall <mpm@selenic.com>
parents: 17956
diff changeset
10
a6180647ead4 tests: only call check-code once
Matt Mackall <mpm@selenic.com>
parents: 17956
diff changeset
11 $ hg manifest | xargs "$check_code" --warnings --nolineno --per-file=0