You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.3 KiB

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