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.

1 comentario:

  1. Did you know about the Octave Forge "super" repository? Maybe a similar approach would be useful for you too. http://hg.code.sf.net/p/octave/octave-forge

    ResponderEliminar

Se ha producido un error en este gadget.