Reputation: 2145
Is it possible to call an svn update command with an additional filter criteria ?
At one point, I want to call a batch file which basically should get the latest version of all the XML files (*.xml) in the repository.
Upvotes: 0
Views: 598
Reputation: 2796
Here it is for DOS shell:
for /f %%a IN ('svn %SVN_CREDS% list -R %CM_REPO%/trunk/TargetRootDir 2^>nul ^| FINDSTR xml') do svn %SVN_CREDS% up %CM_REPO%/trunk/TargetRootDir/%%a
If you want to export the files, like I need to for a deployment script, you would do something similar:
for /f %%a IN ('svn %SVN_CREDS% list -R %CM_REPO%/trunk/PTargetRootDir 2^>nul ^| FINDSTR xml') do svn %SVN_CREDS% export --force %CM_REPO%/trunk/PrTargetRootDir/%%a %STAGING_AREA%\%%~nxa
Upvotes: 1
Reputation: 3010
Maybe this might help you: The following script looks for xml files in the current directory and executes 'svn up' for them.
#!/bin/bash
for i in `find . | grep ".xml$"`; do svn up $i; done
Upvotes: 1