Guest User

Adam Rofer

a guest
Nov 17th, 2010
328
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. REM Batch File to obtain the UNIQUE commit list in DOS (Windows CMD) for all SVN repositories
  2.  
  3. REM THIS USES SUPER-SED, LOCATED AT: http://www.pement.org/sed/
  4. REM   (DIRECT LINK USED FOR SED.EXE: http://sed.sourceforge.net/grabbag/ssed/sed-3.59.zip )
  5. REM Made by Adam Rofer, distribute freely, etc
  6. REM This was developed to work in Windows Server 2007 SP2, so if you're using
  7. REM     XP or Win2K then the "FOR" and "SORT" commands may not be present or use different syntax
  8.  
  9. SET REPOSITORY_DIR=C:\svn\data\repositories
  10. SET FULL_LIST=COMPLETE.txt
  11.  
  12. del /q %FULL_LIST%
  13. for /f %%g in ('dir /b /a:d %REPOSITORY_DIR%') DO call :getlog %%g
  14. type %FULL_LIST% | sort | sed "$!N; /^\(.*\)\n\1$/!P; D" > %FULL_LIST%xx
  15. del /q %FULL_LIST%
  16. ren %FULL_LIST%xx %FULL_LIST%
  17. goto :DONE
  18.  
  19. rem SUB -------------------------
  20. :getlog
  21. svn log http://localhost/svn/%1 --quiet --xml | sed -n -e "s/<\/\?author>//g" -e "/[<>]/!p" | sort | sed "$!N; /^\(.*\)\n\1$/!P; D" > %1.txt
  22. type %1.txt >> %FULL_LIST%
  23. goto :eof
  24. rem END SUB ---------------------
  25.  
  26. :DONE
RAW Paste Data