问题
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