惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Simon Willison's Weblog
Simon Willison's Weblog
G
Google Developers Blog
Spread Privacy
Spread Privacy
I
InfoQ
V
V2EX
S
Schneier on Security
小众软件
小众软件
C
CERT Recently Published Vulnerability Notes
博客园 - 聂微东
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Stack Overflow Blog
Stack Overflow Blog
T
Threat Research - Cisco Blogs
L
Lohrmann on Cybersecurity
Recent Announcements
Recent Announcements
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Attack and Defense Labs
Attack and Defense Labs
云风的 BLOG
云风的 BLOG
The Hacker News
The Hacker News
S
SegmentFault 最新的问题
C
Cybersecurity and Infrastructure Security Agency CISA
NISL@THU
NISL@THU
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
GbyAI
GbyAI
Latest news
Latest news
S
Secure Thoughts
Project Zero
Project Zero
MongoDB | Blog
MongoDB | Blog
I
Intezer
Security Latest
Security Latest
Apple Machine Learning Research
Apple Machine Learning Research
Vercel News
Vercel News
N
Netflix TechBlog - Medium
V2EX - 技术
V2EX - 技术
量子位
T
Threatpost
T
The Blog of Author Tim Ferriss
Y
Y Combinator Blog
T
Tor Project blog
A
Arctic Wolf
Microsoft Security Blog
Microsoft Security Blog
T
The Exploit Database - CXSecurity.com
大猫的无限游戏
大猫的无限游戏
T
Tailwind CSS Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
C
Check Point Blog
博客园 - Franky
Google DeepMind News
Google DeepMind News
The Register - Security
The Register - Security
The GitHub Blog
The GitHub Blog
L
LINUX DO - 热门话题

博客园 - 大洋

在asp.net 项目的bin目录中使用子目录 MVC项目引用备注 OAuth相关备注 手动安装windows的磁盘清理工具 在CentOS上安装 MongoDB CentOS 笔记 MongoDb 判断字段长度比较好的方法 MongoDb 出现配置服务不同步的处理 Exiting an iOS App with Xamarin Silverlight 离线安装包 批量修改WORD表格属性 搭建高可用mongodb集群(四)—— 分片 如何稳定地使用 Google 搜索https://encrypted.google.com/ widows 2008 同步时间命令 MySql 初始化权限脚本 给编译好的DLL增加签名 Anychart 破解备注 Javascript 日期时间格式正则 MongoDB C# 操作备忘
[转] windows下Svn服务器之必须提交修改注释篇
大洋 · 2013-08-07 · via 博客园 - 大洋

1. 强制添加注释信息

找到Respositories目录下对应项目里的hooks目录下建立pre-commit.bat文件,复制如下内容: 

@echo off
set SVNLOOK="C:\Program Files\VisualSVN\bin\svnlook.exe"
setlocal
set REPOS=%1
set TXN=%2
rem check that logmessage contains at least 10 characters
%SVNLOOK% log "%REPOS%" -t "%TXN%" | findstr ".........." > nul
if %errorlevel% gtr 0 goto err
exit 0
:err
echo Empty log message not allowed. Commit aborted! 1>&2
exit 1

2. 允许用户修改注释信息

找到Respositories目录下对应项目里的hooks目录下建立pre-revpos-change.bat,复制如下内容:

@ECHO OFF 
set repos=%1 
set rev=%2 
set user=%3 
set propname=%4 
set action=%5 
  
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 
:: Only allow changes to svn:log. The author, date and other revision 
:: properties cannot be changed 
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 
if /I not '%propname%'=='svn:log' goto ERROR_PROPNAME 
  
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 
:: Only allow modifications to svn:log (no addition/overwrite or deletion) 
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 
if /I not '%action%'=='M' goto ERROR_ACTION 
  
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 
:: Make sure that the new svn:log message contains some text. 
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 
set bIsEmpty=true 
for /f "tokens=*" %%g in ('find /V ""') do ( 
 set bIsEmpty=false 
) 
if '%bIsEmpty%'=='true' goto ERROR_EMPTY 
  
goto :eof 
  
  
  
:ERROR_EMPTY 
echo Empty svn:log properties are not allowed. >&2 
goto ERROR_EXIT 
  
:ERROR_PROPNAME 
echo Only changes to svn:log revision properties are allowed. >&2 
goto ERROR_EXIT 
  
:ERROR_ACTION 
echo Only modifications to svn:log revision properties are allowed. >&2 
goto ERROR_EXIT 
  
:ERROR_EXIT 
exit /b 1