Mercurial > hg-stable
diff tests/test-gendoc-da.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 | 7a1ad08b9ff5 |
children |