Translate

lunes, 10 de octubre de 2016

Update all your mercurial repos at once

The following is a bash command to update repositories located in subdirectories from the current directory.

for i in $(find -maxdepth 1 -type d); do cd $i ; hg pull && hg up ; cd -; done

The use of ; assures that the change directory commands will be executed even if some subdirectories are not repositories. The && makes sure that updates will be run only if necessary.
Se ha producido un error en este gadget.