-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathchecklog.bat
47 lines (39 loc) · 1.01 KB
/
checklog.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
@echo off
cls
set t=%date%_%time%
set d=%t:~10,4%%t:~7,2%%t:~4,2%_%t:~15,2%%t:~18,2%%t:~21,2%
if "%1" == "" GOTO usage
if "%2" == "" GOTO specific
GOTO getcomment
:getcomment
pause
echo Fetching comments..
svn log -v %1 -r %2 > %d%-comments.txt
echo %ERRORLEVEL% > nul
IF %ERRORLEVEL% EQU 1 (Echo Invalid Url,PLease check the URL:%1 & goto err)
goto finish
:specific
echo example:
echo(
echo checklog.bat https://scm.com/branches/RELEASE2/ {2016-11-01}:{2016-12-04}
echo( or
echo checklog.bat https://scm.com/branches/RELEASE2/ 11724:11750
echo(
goto err
:usage
echo(
echo(
echo usage: checklog.bat url fromdate:todate
echo or
echo usage: checklog.bat url fromrevision:torevision
echo(
echo(
goto end
:err
svn info %1 | findstr . > NUL
IF %ERRORLEVEL% EQU 1 Echo Invalid Url,PLease check the URL:%1
echo Error!,please run the script again
goto end
:finish
echo Script completed,please check comments.txt
:end