Address issue #4331, "working copy permissions change on commit for files with keywords" by preventing the accidental removal of existing pe…
Address issue #4331, "working copy permissions change on commit for fileswith keywords" by preventing the accidental removal of existing permissionbits set on files which undergo translation.This is not a perfect answer to the proposition given in the issue that"Committing a file should not change its permissions in the WC."Committed files may still get a new owner/group/other write bit set ifthe umask allows this and the file's properties indicate that the file mustbe set read-write (see svn_wc__sync_flags_with_props() which might tweakpermission bits of the translated file). But I think this is acceptable.I'm not sure if never changing the permission bits of committed files isa realistic requirement. Changing this would require additional effortand might break other scenarios.* subversion/libsvn_subr/subst.c (svn_subst_copy_and_translate4): Copy file permissions from the source file to the temporary file which stores the translated result. The temporary file might have stricter permissions than the source, due to the way our APIs for creating temporary files work. Removing permission bits from files during translation is an unwanted side effect and should be avoided.