Question

I am working on a number of projects simultaneously. Each project has a Subversion repository. The repositories are not all hosted on the same server. When I start my day, I find myself having to do an svn update for each of the individual projects.

My local working copies are all stored under one parent directory Projects.

My question: Is there a command that can be issued from the Projects directory that will search for working copies among the descendants in the file system and issue an svn update command for each of them?

I'm on Ubuntu with Subversion version 1.7.5.

Was it helpful?

Solution

cd to Projects and then:

svn up `ls -d ./*`

(note those are backticks, not single quotes.)

svn will happily skip non-svn dirs. You could add an alias in your .bashrc

alias up-svn='svn up `ls -d ./*`'

OTHER TIPS

You could just write

svn update *

That's it... Subversion will automatically recognize the working copies and do the update

One more suggestion similar to @thekbb answer

svn up `find ~/svn -maxdepth 3 -type d`

Explanation: '~/svn' is my directory all checked out repositories are in '-maxdepth 3' some repositories are nested (3 levels deep) e.g. companyname/projectname/branch '-type d' only directories

no, but you can easily write a script/batch file that calls "svn update" on each subdirectory.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top