Subversion: Add revision data to code file on commit

后端 未结 7 821
挽巷
挽巷 2020-12-05 18:21

Is there an easy way to, on commit of a file, automatically insert information into the code file itself (like author, commit comment, commit date, etc)? I would want this i

7条回答
  •  生来不讨喜
    2020-12-05 18:55

    Apart from it, as you say yourself, being a stupid idea, I can't think of a simple way to do this using SVN on-board methods. You would have to go through each file after checkout (or update) by script, identify a "change log" block within that file, and update that block with the output of svn log. Can be done but is going to be a lot of work, you would have to monitor every working copy for changes, and it is very resource intensive.

    Other than that, a post-commit hook may be the best thing to work with, but manipulating files inside the repository outside a revision context sounds horrible, if possible at all.

提交回复
热议问题