50 lines
1.4 KiB

  1. @echo off
  2. hg incoming "https://bitbucket.org/sas_team/sas.maps/"
  3. ::echo %ERRORLEVEL%
  4. IF ERRORLEVEL 9009 goto NoHg
  5. IF ERRORLEVEL 255 goto CloneRepo
  6. IF ERRORLEVEL 2 goto err
  7. IF ERRORLEVEL 1 goto noupdates
  8. IF ERRORLEVEL 0 goto ok
  9. IF ERRORLEVEL -1 goto CloneRepo
  10. goto err
  11. :ok
  12. echo ‡ ¡¨à ¥¬ ¨§¬¥­¥­¨ï ¨§ ९®§¨â®à¨ï
  13. hg pull "https://bitbucket.org/sas_team/sas.maps/" -u -f
  14. IF ERRORLEVEL 1 goto err
  15. IF NOT ERRORLEVEL 0 goto err
  16. for /R /D %%d in (*.zmp) do rd /q %%d 2> nul
  17. goto end
  18. :CloneRepo
  19. rd /s /q sas.maps
  20. echo „¥« ¥¬ ª«®­ ९®§¨â®à¨ï á á¥à¢¥à 
  21. hg clone "https://bitbucket.org/sas_team/sas.maps/" sas.maps
  22. IF NOT ERRORLEVEL 0 goto err
  23. echo Š®¯¨à㥬 ¯ ¯ªã á ९®§¨â®à¨¥¬ ¨§ ¯®¤¯ ¯ª¨ ¢ ⥪ãéãî ¯ ¯ªã
  24. move /Y sas.maps\.hg .\.hg
  25. IF NOT ERRORLEVEL 0 goto errMoveHg
  26. echo “¤ «ï¥¬ ¢à¥¬¥­­® ᮧ¤ ­­ãî ¯®¤¯ ¯ªã
  27. rd /s /q sas.maps
  28. IF NOT ERRORLEVEL 0 goto errRemoveTemp
  29. echo Ž¡­®¢«ï¥¬ ä ©«ë ¤® ¯®á«¥¤­¥© ¢¥àᨨ
  30. hg update -c
  31. goto end
  32. :noupdates
  33. echo �¥â ­®¢ëå ¨§¬¥­¥­¨©
  34. goto end
  35. :err
  36. echo Žè¨¡ª  á¢ï§¨ á á¥à¢¥à®¬
  37. goto end
  38. :errMoveHg
  39. echo Žè¨¡ª  ¯¥à¥¬¥é¥­¨ï ¯ ¯ª¨ .hg
  40. goto end
  41. :errRemoveTemp
  42. echo Žè¨¡ª  㤠«¥­¨ï ¢à¥¬¥­­®© ¯ ¯ª¨ sas.maps
  43. goto end
  44. :NoHg
  45. echo �¥ ãáâ ­®¢«¥­ Mercurial
  46. goto end
  47. :end
  48. pause