I broke remote repo clone, 'cause I contrived all-local test cases. Here's the intended followup putback comment:
6731044 wx2hg should deal better with nested repositories (fix remote clones) ...and here's the unified diff for the fix, as validated by pwernau, who discovered the breakage: ------- usr/src/tools/scripts/wx2hg.sh ------- Index: usr/src/tools/scripts/wx2hg.sh --- /ws/onnv-gate/usr/src/tools/scripts/wx2hg.sh Wed Jul 30 09:40:28 2008 +++ /net/mrliberal.central/export/ws/mjnelson/onnv-fixes-teamware/usr/src/tools/scripts/wx2hg.sh Wed Jul 30 16:32:00 2008 @@ -24,7 +24,7 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "@(#)wx2hg.sh 1.3 08/07/29 SMI" +# ident "@(#)wx2hg.sh 1.4 08/07/30 SMI" # # @@ -74,24 +74,21 @@ rev_warning=n for dir in $nested_twins; do - (cd "$primary_twin"/$dir ; \ - hg log -l 1 -r $hg_rev > /dev/null 2>1) - if (( $? != 0 )); then - warn "Unable to clone $primary_twin/$dir" - rev_warning=y - continue - fi echo "Cloning from $primary_twin/$dir" echo "to $ws/$dir" mkdir -p $ws/$dir set -x hg init $ws/$dir - ( cd $ws/$dir; hg pull -u "$primary_twin"/$dir ) + ( cd $ws/$dir; hg pull -u -r $rev "$primary_twin"/$dir ) + if (( $? != 0 )); then + warn "Unable to clone $primary_twin/$dir" + rev_warning=y + fi set +x done [[ $rev_warning = "n" ]] || fail \ -"revision $hgrev was not present in all workspaces.\n" \ +"revision $rev was not present in all workspaces.\n" \ "When using -r with nested repositories, you should specify a tag\n" \ "name that is valid in each workspace." }