anchor.diff:  
   SETLOCAL EnableDelayedExpansion
   
  -SET tfs="%VS110COMNTOOLS%\..\IDE\tf.exe"
  +SET git="%PROGRAMFILES(X86)%\Git\cmd\git.exe"
   SET db[1]="GSFSchema.db"
   SET db[2]="GSFSchema-InitialDataSet.db"
   SET db[3]="GSFSchema-SampleDataSet.db"
  
positive.code: FOR %%i IN (1 2 3) DO (
      IF NOT "!update!" == "true" (
          ECHO Checking for pending edits on !script[%%i]!...
          FOR /f "delims=" %%s IN ('CALL %tfs% status !script[%%i]!') DO SET status=%%s
          IF NOT "!status!" == "There are no pending changes." SET update=true
      )
      
      IF NOT "!update!" == "true" (
          ECHO Checking for changes to !script[%%i]! since last update...
          FOR /f "tokens=2 delims=;" %%c IN ('CALL %tfs% localversions !db[%%i]!') DO SET changeset=%%c
          
          FOR /f %%c IN ('CALL %tfs% history !script[%%i]! /version:!changeset!~T /noprompt') DO (
              SET numeric=true
              FOR /f "delims=0123456789" %%a IN ("%%c") DO SET numeric=false
              
              IF "!numeric!" == "true" (
                  IF %%c GTR !changeset:~1! SET update=true
              )
          )
      )
      
      IF "!update!" == "true" (
          ECHO Updating !db[%%i]!...
          %tfs% checkout !db[%%i]! /noprompt
          
          IF "!prevdb!" == "" (
              DEL !db[%%i]!
  
negative.code:             COPY /Y !prevdb! !db[%%i]!
          )
          
          sqlite3 !db[%%i]! < !script[%%i]!
          sqlite3 !db[%%i]! "PRAGMA user_version = !version!"
      )
      
      SET prevdb=!db[%%i]!
  