When submitting SVN content, you must enter the log (input character)

Source: Internet
Author: User

When submitting SVN content, you must enter the log (input character)

I built a server with visual SVN on Windows. By default, I can submit code without filling in any information. This is not what I expected, so I found the following solution:

You can set these rules in the visual SVN console. These rules are triggered at a specific time. Check whether the log information is filled in before the Commit code, and run the pre-commit command.

Setting method:
1. Open the visual SVN console.
2. Right-click the code repository you want to set
3. All tasks-Manage Hooks ......
4. Edit "Pre-commit hook"

Add the following code:

@ Echo off
::
: Stops commits that have empty log messages.
::

@ Echo off

Set svnlook = "D:/Program Files/VisualSVN Server/bin/svnlook.exe"
Setlocal

Rem Subversion sends through the path to the repository and transaction id
Set REPOS = % 1
Set TXN = % 2

Rem check for an empty log message
% 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 give any 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

Set up SVN server svn in Ubuntu 14.04 ://

CentOS 6.2 SVN setup (YUM installation)

Deploy Apache + SVN in CentOS 6.5

Build an SVN server using Apache + SVN

Set up and use the SVN server in Windows + reset the password on the client

Install SVN in Ubuntu Server 12.04 and migrate Virtual SVN data

Build svn service and migration method on Ubuntu Server

This article permanently updates the link address:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.