<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>waimv.com &#187; svn</title>
	<atom:link href="http://www.waimv.com/tag/svn/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.waimv.com</link>
	<description></description>
	<lastBuildDate>Fri, 09 Nov 2018 10:41:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>svn脚本提交</title>
		<link>http://www.waimv.com/linux/227/</link>
		<comments>http://www.waimv.com/linux/227/#comments</comments>
		<pubDate>Mon, 30 Jul 2012 04:09:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://www.szpian.com/?p=227</guid>
		<description><![CDATA[强制写提交LOG脚本和禁止上传内容的脚本如下 编辑pre-commit 如下： #!/bin/sh REPOS=&#8221;$1&#8243; TXN=&#8221;$2&#8243; SVNLOOK=/usr/bin/svnlook # check that logmessage contains at least 5 alphanumeric characters LOGMSG=`$SVNLOOK log -t &#8220;$TXN&#8221; &#8220;$REPOS&#8221; &#124; grep -E &#8220;[a-zA-Z0-9]&#124;[^\u4E00-\u9FA5]&#8221; &#124; wc -c` if [ "$LOGMSG" -lt 5 ]; then echo -e &#8220;\n OK&#8221; 1&#62;&#38;2 exit 1 fi 以上为必须写LOG在提交日志里面且不少于5个字符 $SVNLOOK changed -t &#8220;$TXN&#8221;"$REPOS&#8221; &#62; /security/svndata/jiujie/hooks/changed.lst LOGOK=`$SVNLOOK changed -t &#8220;$TXN&#8221; [...]]]></description>
			<content:encoded><![CDATA[<div>
<div id="_mcePaste">强制写提交LOG脚本和禁止上传内容的脚本如下</div>
<div id="_mcePaste">编辑pre-commit 如下：</div>
<div id="_mcePaste">#!/bin/sh</div>
<div id="_mcePaste">REPOS=&#8221;$1&#8243;</div>
<div id="_mcePaste">TXN=&#8221;$2&#8243;</div>
<div id="_mcePaste">SVNLOOK=/usr/bin/svnlook</div>
<div id="_mcePaste"># check that logmessage contains at least 5 alphanumeric characters</div>
<div id="_mcePaste">LOGMSG=`$SVNLOOK log -t &#8220;$TXN&#8221; &#8220;$REPOS&#8221; | grep -E &#8220;[a-zA-Z0-9]|[^\u4E00-\u9FA5]&#8221; | wc -c`</div>
<div id="_mcePaste">if [ "$LOGMSG" -lt 5 ];</div>
<div id="_mcePaste">then</div>
<div id="_mcePaste">echo -e &#8220;\n OK&#8221; 1&gt;&amp;2</div>
<div id="_mcePaste">exit 1</div>
<div id="_mcePaste">fi</div>
<div id="_mcePaste">以上为必须写LOG在提交日志里面且不少于5个字符</div>
<div id="_mcePaste">$SVNLOOK changed -t &#8220;$TXN&#8221;"$REPOS&#8221; &gt; /security/svndata/jiujie/hooks/changed.lst</div>
<div id="_mcePaste">LOGOK=`$SVNLOOK changed -t &#8220;$TXN&#8221; &#8220;$REPOS&#8221; | grep -E &#8220;ok|wma|mp3&#8243;`</div>
<div id="_mcePaste">if [ -n "$LOGOK" ];</div>
<div id="_mcePaste">then</div>
<div id="_mcePaste">echo -e &#8220;\n no allow&#8221; 1&gt;&amp;2</div>
<div id="_mcePaste">exit 2</div>
<div id="_mcePaste">fi</div>
<div id="_mcePaste">这里面禁止提交像ok|wma|mp3 这样的文件至SVN</div>
<p>强制写提交LOG脚本和禁止上传内容的脚本如下编辑pre-commit 如下：#!/bin/sh REPOS=&#8221;$1&#8243;TXN=&#8221;$2&#8243;SVNLOOK=/usr/bin/svnlook# check that logmessage contains at least 5 alphanumeric charactersLOGMSG=`$SVNLOOK log -t &#8220;$TXN&#8221; &#8220;$REPOS&#8221; | grep -E &#8220;[a-zA-Z0-9]|[^\u4E00-\u9FA5]&#8221; | wc -c`if [ "$LOGMSG" -lt 5 ];then  echo -e &#8220;\n OK&#8221; 1&gt;&amp;2  exit 1fi 以上为必须写LOG在提交日志里面且不少于5个字符<br />
$SVNLOOK changed -t &#8220;$TXN&#8221;"$REPOS&#8221; &gt; /security/svndata/jiujie/hooks/changed.lstLOGOK=`$SVNLOOK changed -t &#8220;$TXN&#8221; &#8220;$REPOS&#8221; | grep -E &#8220;ok|wma|mp3&#8243;`if [ -n "$LOGOK" ];thenecho -e &#8220;\n no allow&#8221; 1&gt;&amp;2exit 2fi这里面禁止提交像ok|wma|mp3 这样的文件至SVN</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.waimv.com/linux/227/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
