anchor.diff:      eval $_cmd
       res=$?
       if [ "$res" != 0 ]; then
  -        sleep 2
  +        sleep 1
           echo "retrying $_cmd"
           eval $_cmd
           res=$?
  
positive.code:             ;;
          -d|--delete)
              DELETE=true ; shift 1
              ;;
          -h|--help)
              usage
  
negative.code:     return $res
  }
  
  if [ "$HGRC" = "true" ]; then
      if [ ! -d $repo/.hg ]; then
          echo "No repo found at $repo"
          exit 1
      fi
      echo "Updating hgrc for $repo"
      TEMPFILE=$(/bin/mktemp)
      retry "ssh -i <%= @mirror_priv_key_path %> -l <%= @mirror_user_name %> <%= @mirror_source %> repo-config $name > $TEMPFILE" && /bin/mv $TEMPFILE $repo/.hg/hgrc
      exit 0
  fi
  
  exit_code=0
  if [ -d "$name" ]; then
      echo "$name already exists, pulling"
      retry hg -R $name pull $GLOBAL_HG_OPTS $CHANGESET
      exit_code=$?
  elif [ \! -e $name ]; then
      mkdir -p `dirname $name` 
      echo "$name does not yet exist, cloning"
      lockfile -r $LOCK_RETRIES ${PWD}/syncing.lck || die "Could not lock destination"
      retry hg clone $GLOBAL_HG_OPTS -U -v "$src" $name
      exit_code=$?
      rm ${PWD}/syncing.lck
  else
  