Добавьте эти флаги прокрутки к дочернему элементу макета панели приложения
app:layout_scrollFlags="scroll|enterAlways|snap"
Это файл .bat, для которого требуется комментарий. Он проверяет наличие хотя бы одного символа в комментарии.
@echo off
:: Stops commits that have empty log messages.
@echo off
setlocal
rem Subversion sends through the path to the repository and transaction id
set REPOS=%1
set TXN=%2
svnlook log %REPOS% -t %TXN% | findstr . > nul
if %errorlevel% gtr 0 (goto err) else exit 0
:err
echo. 1>&2
echo Your commit has been blocked because you didn't enter a comment. 1>&2
echo Write a log message describing the changes made and try again. 1>&2
echo Thanks 1>&2
exit 1
Этот файл находится в папке / hooks репозитория с именем pre-commit.bat. Если вам нужно минимальное количество символов, измените строку
svnlook log %REPOS% -t %TXN% | findstr . > nul
. Так что, если вам нужно минимум 10 символов, вам нужно иметь 10., А не только один
svnlook log %REPOS% -t %TXN% | findstr .......... > nul
Дополнительные дополнительные параметры для Команда findstr позволит вам выполнять более сложные проверки (определенные наборы символов и т. д.)
Я использую SubversionNotify , он, вероятно, делает больше, чем вам нужно, но его довольно просто настроить.
Попробуйте следующее:
rem Make sure that the log message contains some text.
set REPOS=%1
set TXN=%2
"C:\Program Files\Subversion\bin\SVNlook.exe" log -t %TXN% %REPOS% | FindStr [a-zA-Z0-9]
IF %ERRORLEVEL% EQU 0 GOTO OK
echo Your commit has been blocked because you didn't provide a log message 1>&2
echo Please write a log message describing the purpose of your changes and 1>&2
echo then try committing again. -- Thank you 1>&2
exit 1
:OK
rem -------------------------------------------------------------
rem Check if comment is in list of reserved words to not be used..
rem -------------------------------------------------------------
"C:\Program Files\Subversion\bin\SVNlook.exe" log -t %TXN% %REPOS% >comment
setlocal enabledelayedexpansion
Set SEPARATOR=
set COMMENT=
for /f "delims=" %%a in (comment) do (
set currentline=%%a
set COMMENT=!COMMENT!%SEPARATOR%!currentline!
)
FIND "%COMMENT%" "C:\Program Files\Subversion\excludedwords.txt">Null
If %ERRORLEVEL% EQU 1 goto OK2
:Fail
echo Your commit has been blocked because the single word comment you provided is not allowed 1>&2
echo Line is -%COMMENT%- 1>&2
echo Please write a proper log message describing the purpose of your changes and 1>&2
echo then try committing again. -- Thank you 1>&2
exit 1
:OK2
rem -------------------------------------------------------------
rem Check number of words on the line if = 2 then reject comment
rem -------------------------------------------------------------
Set VAR1=%COMMENT%
Set count=0
For %%j in (%VAR1%) Do Set /A count+=1
IF %count% EQU 2 goto Fail2
goto OK3
:Fail2
echo Your commit has been blocked because not enough detail supplied 1>&2
echo Please write a longer log message describing the purpose of your changes and 1>&2
echo then try committing again. -- Thank you 1>&2
exit 1
:OK3
rem -------------------------------------------------------------
rem Check that the author of this commit has the rights to perform
rem -------------------------------------------------------------
rem the commit on the files and directories being modified.
rem commit-access-control.pl "$REPOS" "$TXN" commit-access-control.cfg || exit 1
rem All checks passed, so allow the commit.
exit 0