How to list a specific directories in the SVN pre-commit Hook

六月ゝ 毕业季﹏ 提交于 2019-12-12 17:33:09

问题


I want to list specific directories in the SVN pre-commit Hook

when I use svn list [repor_path] command I got this result :

svn list  http://SB-LAP163W/svn/TEST/RC | findstr  13.10
13.10.1/
13.10.2/
13.10.3/

that's what I'm looking but when I use the same command doesn't work in the pre-commit hook how can I deal with it using svnlook command?

I tried SVNLOOK dirs-changed -t TXN-NAME REPOS-PATH it will give me the changed path PC/13.10/main/dto/ and in my case, I want to list the folders under RC repo not PC

PS: RC and PC two directories has the same root

  • svn/ILS/RC/
  • svn/ILS/PC/

回答1:


If your path you want to list does not correspond with the changed directory but is fixed then just try

svnlook tree svn/ILS/PC | grep -E '13\.10.*/'

You will get all folders fulfilling the regexp.

If there are some dependencies to changed files/folders or the commit message use a script as in SVN (server - pre-commit hook): Know the list of files that are being committed



来源:https://stackoverflow.com/questions/54396777/how-to-list-a-specific-directories-in-the-svn-pre-commit-hook

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