Skip to content

Instantly share code, notes, and snippets.

@ericfialkowski
Last active May 19, 2017 20:14
Show Gist options
  • Save ericfialkowski/547d17abde61e0de800f2e085ad29268 to your computer and use it in GitHub Desktop.
Save ericfialkowski/547d17abde61e0de800f2e085ad29268 to your computer and use it in GitHub Desktop.
Batch file to checkout svn repo in "standard" format (trunk fully checkedout, branches and tags immediates only)
@echo off
if "%1"=="" GOTO USAGE
set url=%1
for %%x in (%url:/= %) do set directory=%%x
svn co --depth immediates %1
if exist %directory%/trunk (
svn update --non-interactive --set-depth infinity %directory%/trunk
)
if exist %directory%/branches (
svn update --non-interactive --set-depth immediates %directory%/branches
)
if exist %directory%/tags (
svn update --non-interactive --set-depth immediates %directory%/tags
)
GOTO END
:USAGE
echo Usage: %0 [url to checkout]
:END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment