download superrepo with subrepos
Supposedly there's a hidden feature
by which you can download subrepos along with superrepos in one fell swoop... but it's been disabled (according to Marcin).
Marcin says it's a difficult problem (atomicity) and recommended I open this issue. For the record here are relevant excerpts from the bash script we use on my server to simulate this:
#!/bin/bash set -e NIGHTLY=0 ROLLBACK=0 if [ x$1 == 'x-n' ]; then NIGHTLY=1 fi REPOS=`cut -d " " -f 2 < .hgsubstate | sort` REPOS=". $REPOS" if [ $NIGHTLY == 1 ]; then echo "Nightly build - moving all to default tip" hg pull hg up -C default for repo in $REPOS; do hg pull -R $repo hg up -C -R $repo default done if hg commit -m "Nightly temp commit"; then echo "Did temporary commit. Will rollback when done." ROLLBACK=1 fi fi if [ $ROLLBACK == 1 ]; then echo "Rolling back temp commit..." hg rollback hg up -C fi