So I used the svn CLI client for the first time today, after having exclusively used TortoiseSVN so far (i.e. for a few years).

The one thing that bugs me is having to provide the repo URL for every checkout. Is there any way to have SVN look it up itself and only checkout the current directory/sub-branch of the tree (i.e. similar to how TortoiseSVN does it)?

Is there any point to having to provide the repository URL every time upon checkout? It's not necessary to provide it for commits and svn info will print it out anyways .. so why does checkout demand it to be provided every time?


You don't have to checkout every time. Checkout command is aimed to be used the first time you retrieve the project.

Then the only thing you have to do is go inside your project root folder and type svn update.


Back when we were using SVN here, I had a fairly complex svn() function. You could start with:

svn() {
    local subcommand=$1
    case $subcommand in
            local module=$1
            local url="http://example.com/svn/$module/trunk"
            command svn checkout "$url" ./"$module" "$@"
        *)  command svn "$subcommand" "$@" ;;

Add that to your ~/.bashrc, and source ~/.bashrc. Then you'd just do

svn co mymodule

instead of

svn co http://example.com/svn/mymodule/trunk

Any other SVN command is run without modification.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.