ubuntumercurialmultiple-repositories

Run hg pull over all subdirectories


How can I update multiple mercurial (hg) repositories from their shared parent's directory?

/plugins/search
/plugins/overview
/plugins/chart

I want to change a branch to default one and update them all at once

cd /plugins/search
hg update -C default
hg pull -u

Solution

  • Run the following from the parent directory, plugins in this case:

    find . -type d -maxdepth 1 -exec hg update -C default -R {} \;
    find . -type d -maxdepth 1 -exec hg pull -u -R {} \;
    

    To clarify: