I'm wondering if it is possible to read the two merging files and modify the result in a svn hook in order to prevent a conflict I know how to fix automatically?

Before a delivery, modified files are audited, if the audit is OK, the header of the file is updated. 85% of the conflicts are due to those updates.

Is it possible de develop a script reading the files in the pre-commit, sort in the right way the headers and commit a correct header without conflict?


  1. Pre-commit hook is not best place (you must commit something in order to fire hook, your hook have to block this commit and perform prepared "nested")
  2. I suppose, somehow better choice may be special merge-tool (in which you'll have script, performing merge under hood)
  • Thank you for your answer! I will wheck for good merge-tool. – bierfout Jan 29 '13 at 15:00

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.