anchor.diff:  IF %errorlevel% NEQ 0 GOTO ERROR
   
   :UPDATE
  -IF DEFINED skipupdate GOTO BRANCH
  -echo.
  -echo Updating to last changeset 
  -hg update -C
  -
  -IF %errorlevel% NEQ 0 GOTO ERROR
  -
  -:BRANCH
  +IF DEFINED skipupdate GOTO BUILD
   echo.
   echo Changing to branch %branchname%
  -hg update %branchname%
  +hg update %revision% -C %branchname% 
   
   IF %errorlevel% NEQ 0 GOTO ERROR
   
  
positive.code: GOTO :EOF
  
  :INVALIDPARAMS
  echo BuildScript Help v0.3b
  echo.
  echo %0 staging OR prod rev [-branch name] [-skippublish] [-skipupdate] [-skippull]
  echo.
  echo Default branch is MeTLOverLib.
  echo.
  echo The following example will build a staging version with the revision 
  echo number 289 using the default branch: 
  echo.
  echo %0 staging 289
  echo.
  echo -branch			Update to the specified branch name.
  echo.
  echo -skippublish		Clean and build the target only.
  echo.
  echo -skipupdate		Build using the working directory.
  echo.
  echo -skippull		Do not update from source control.
  echo.
  echo.
  GOTO :EOF
  
negative.code: 
  :LOOP
  IF NOT "%1"=="" (
  	IF "%1"=="-nopublish" (
  		SET buildtargets=Clean;Build
  		REM SHIFT
  	)
  	IF "%1"=="-workingdir" (
  		SET skipupdate=1
  		REM SHIFT
  	)
  	IF "%1"=="-noremote" (
  		SET skippull=1
  		REM SHIFT
  	)
  	IF "%1"=="-branch" (
  		SET branchname=%2
  		SHIFT
  	)
  	IF "%1"=="-rev" (
  		SET revision=-r %2
  		SHIFT
  	)
  	SHIFT
  