I am working at a client who has a project where code is a mixture of different source control systems. So a layout might be like this
project/a/.svn /a/subfolder/.svn /b/.hg /c/subproject/.svn /d/.hg
So I am trying to put together a simple command that when executed from the project folder will run the appropriate hg/svn command in each project i.e:
pushd a/ svn up popd pushd b/ hg pull popd :
Since the client has many such projects, I would appreciate not having to hardcode the folder structure in a script. Instead I am looking for a solution similar to find -exec where the svn/hg commands are automatically executed on each first level of match (i.e. svn up is run in the project/a folder but not in project/a/subfolder). How can such a command be constructed ?.