Automating SVN pre-commit to Review Board and then Commit to SVN after approval [closed]

此生再无相见时 提交于 2019-12-04 17:10:39
  1. You can block commits and transfer to RB with pre-commit hook (block is obvious, transfer - "if you can do it by hand - it can be automated", but more details about operation is needed for definitive answer)
  2. Commit of approved changes isn't task of hook, it will be additional independent automatic commit and this process may contains some pitfalls: you must preserve original order of commits in queue (if more than one may exist at the same time), on condition that more recent change can be approved before the previous

From my POV, commit into special branch instead of blocking commit and merge <this REV> to trunk on approval may be more robust and easy way

@abhishek :

  • In our case, We have added a pre-commit hook script in our svn that needs the review board URL while committing. If not there, it will block you from committing.

  • Regarding the review request, i think you can do that from the pre-commit script itself. But this will definitely slow down the committing process. You can get the svn commit message and create a review request based on that. But i wont recommend this because this wont be accurate and you wont be able to elaborate your changes.

  • we have integrated Eclipse with e-reviewboard plugin which is available in git. This will allow you to create the review request just performing a right click. it will automatically upload the diff of the selected files. After this step, you can commit to svn using that review request.This way you can elaborate your changes. I think this is the best way!

Why not we directly connect the Reviewboard Db and check for the appropriate state of a review in pre-commit hook. Thus solving the issue more clearly.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!