Mercurial > hg-stable
view tests/test-check-pylint.t @ 32323:8a1ff5ed620e
extdiff: copy back execbit-only changes to the working directory
Some tools like BeyondCompare allow the file mode to be changed. The change
was previously applied if the content of the file changed (either according to
size or mtime), but was not being copied back for a mode-only change. That
would seem to indicate handling this in an 'elif' branch, but I opted not to in
order to avoid copying back the mode without the content changes when mtime and
size are unchanged. (Yes, that's a rare corner case, but all the more reason
not to have a subtle difference in behavior.)
The only way I can think to handle this undetected change is to set each file in
the non-wdir() snapshot to readonly, and check for that attribute (as well as
mtime) when deciding to copy back. That would avoid the overhead of copying the
whole file when only the mode changed. But a chmod in a diff tool is likely
rare. See also affd753ddaf1.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Thu, 11 May 2017 22:33:45 -0400 |
parents | 5b048d5f8884 |
children | 778dc37ce683 |
line wrap: on
line source
#require test-repo pylint hg10 Run pylint for known rules we care about. ----------------------------------------- There should be no recorded failures; fix the codebase before introducing a new check. Current checks: - W0102: no mutable default argument $ touch $TESTTMP/fakerc $ pylint --rcfile=$TESTTMP/fakerc --disable=all \ > --enable=W0102 --reports=no \ > mercurial hgext hgext3rd (?) ------------------------------------ (?) Your code has been rated at 10.00/10 (?) (?)