Subversion has a feature to set the svn:executable property
on newly added files that have exec-permission.
Is there some configuration that controls this behavior?
I know how to set a property on certain files using config [autoprop], but I see no way to unset it.
It is particularly irritating when the svn client on Cygwin believes that all windows files are executable, and populates the repository with executable texts and C files.
Is there any trick to inhibit this, apart from being careful and chmod the files before adding them to svn?
Basically to chmod -x run: svn propdel svn:executable file
svn propset svn:executable src/*.C
svn propset svn:executable src/*.txt
Based on Victor Parmar's idea, I have written the following wrapper script svn-add, which tries to detect actual executables and removes the svn:executable property for the rest when adding files.
#!/bin/bash
svn add "$@" || exit $?
if [ "$(uname -o 2>/dev/null)" = "Cygwin" ]; then
for filespec
do
if [ -f "$filespec" ]; then
extension=${filespec##*.}
if [[ ";${PATHEXT^^};" = *";.${extension^^};"* ]]; then
echo "$filespec is executable"
else
# According to Windows, the file is not executable, but Cygwin
# treats all files on the Windows file systems as executable
# (unless explicitly modified via chmod), and Subversion's
# Automatic Property Setting feature adds svn:executable
# properties. Strip them off for this file.
svn propdel svn:executable "$filespec"
fi
fi
done
fi
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With