Leaked source code of windows server 2003
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.

90 lines
2.5 KiB

  1. ::
  2. :: Purpose: Get current VSS Config bits and push into IIS bits Source Depot share
  3. ::
  4. @if DEFINED _echo @( echo on ) else @( echo off )
  5. :: User defined variable
  6. :: URTTOOLS used only to path to perl.exe
  7. set URTTOOLS=\\urtdist\urtbuild
  8. set BASE_DEST_DROP=c:\IIS_DUMMY
  9. set TEST_COPY=/L
  10. set SHOW=0
  11. set SUBMIT=0
  12. IF (%1)==() GOTO USAGE
  13. IF (%2)==() GOTO USAGE
  14. IF /I (%3)==(submit) set SUBMIT=1
  15. set _VSS_SHARE=%1
  16. set BUILDNUM=%2
  17. set SD_COMMENT=Checked in automatically for Config Build %BUiLDNUM%
  18. set SSENV=\\urtsrc\%_VSS_SHARE%\win32
  19. IF NOT EXIST %SSENV%\ss.exe (
  20. @echo ERROR: Cannot access %SSENV%\ss.exe. Bad input argument?
  21. GOTO :EOF
  22. )
  23. title %title% - Getting Source from \urtsrc\%SSENV%
  24. :: Check all files out
  25. IF NOT (%SHOW%)==(1) (
  26. cd config
  27. del /f /s /q *
  28. cd ..\
  29. ) else (
  30. @echo SHOW MODE: cd config
  31. @echo SHOW MODE: del /f /s /q *
  32. @echo SHOW MODE: cd ..\
  33. )
  34. :: Get the config bits From Source Safe
  35. set uselabel=bld%BUILDNUM%
  36. :: Command line switches: -r = recurse through entire project, -i-y = dont ask for input, -gf- = Disables the Force_Dir initialization variable for this command.
  37. cd config
  38. %SSENV%\ss.exe get -v%uselabel% $/config -r -i-y -gf-
  39. if ERRORLEVEL 1 (
  40. @echo "ERROR: Config VSS Sync of $/config failed!"
  41. GOTO :EOF
  42. )
  43. :: Have Source Depot get rid of any files in the depot that do not exist locally and then check in
  44. IF NOT (%SHOW%)==(1) (
  45. sd online //depot/private/jasbr/inetsrv/iis/config/...
  46. sd add ...
  47. sd revert -a //depot/private/jasbr/inetsrv/iis/config/...
  48. sd resolve //depot/private/jasbr/inetsrv/iis/config/...
  49. ) else (
  50. @echo SHOW MODE: sd online //depot/private/jasbr/inetsrv/iis/config/...
  51. @echo SHOW MODE: sd add ...
  52. @echo SHOW MODE: sd revert -a //depot/private/jasbr/inetsrv/iis/config/...
  53. @echo SHOW MODE: sd resolve //depot/private/jasbr/inetsrv/iis/config/...
  54. )
  55. IF (%SUBMIT_FLAG%)==(1) (
  56. @echo SHOW MODE: sd change -o
  57. @echo SHOW MODE: perl.exe -p -e "s/<enter description here>/%SD_COMMENT%/i"
  58. @echo SHOW MODE: sd submit -i
  59. ) else (
  60. @echo Warning: Submit was not run
  61. )
  62. :: IF (%SUBMIT_FLAG%)==(1) (
  63. :: sd change -o | perl.exe -p -e "s/<enter description here>/%SD_COMMENT%/i" | sd submit -i
  64. :: ) else (
  65. :: @echo Warning: Submit was not run
  66. :: )
  67. GOTO :EOF
  68. :USAGE
  69. @echo USAGE: %~np0 (VSS share name) (Build Number) (Submit)
  70. @echo USAGE NOTE: Must be run from directory that maps to //depot/private/jasbr/inetsrv/iis
  71. @echo USAGE NOTE: perl.exe must exist on your path
  72. GOTO :EOF