简体   繁体   English

如何在SVN pre-commit Hook中列出特定目录

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

I want to list specific directories in the SVN pre-commit Hook我想在 SVN pre-commit Hook 中列出特定目录

when I use svn list [repor_path] command I got this result :当我使用svn list [repor_path]命令时,我得到了这个结果:

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?这就是我正在寻找的,但是当我使用相同的命令在 pre-commit 钩子中不起作用时,我该如何使用svnlook命令处理它?

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我试过SVNLOOK dirs-changed -t TXN-NAME REPOS-PATH它会给我改变的路径PC/13.10/main/dto/就我而言,我想列出RC repo 下的文件夹而不是PC

PS: RC and PC two directories has the same root PS:RC和PC两个目录同根

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

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如果对更改的文件/文件夹或提交消息有一些依赖关系,请使用SVN 中的脚本(服务器 - 预提交钩子):了解正在提交的文件列表

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM