You can use pre-commit hook to reject the commit if foo.c is changed as part of commit, but foo_A.c is not. Depending on how many files are in your project, it can be difficult to get around by specifying the files explicitly in the hook script.
If you have consistent file naming conventions, you can put some smart pattern matching logic in the script. (for example, if you know that optimized file names always end with "_A", you can automate checking a little easier.)
Alternatively, you can try to solve the problem in your build process. The script line can execute "svn info" in two files, and then throw a warning / error if the SVNs of the two files do not match. It would be difficult to determine if the RPMs are different for legitimate reasons (for example, you only edited one of the files intentionally).
However, as commentators note, I honestly think that you are trying to solve the problem incorrectly. I would try to structure the code to prevent this class of errors in the first place. If both functions must change at the same time, this is a sign of unnecessary duplication in the code base. Look at combining common elements of two files in one place.
myron-semack
source share