<?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>SukmoonLee Blog &#187; svn</title>
	<atom:link href="http://blog.sukmoonlee.com/wordpress/archives/tag/svn/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.sukmoonlee.com/wordpress</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Thu, 20 Sep 2012 00:01:14 +0000</lastBuildDate>
	<language>ko-KR</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>svn 패스워드 저장하지 않기</title>
		<link>http://blog.sukmoonlee.com/wordpress/archives/201</link>
		<comments>http://blog.sukmoonlee.com/wordpress/archives/201#comments</comments>
		<pubDate>Tue, 28 Aug 2012 12:10:50 +0000</pubDate>
		<dc:creator>Sukmoon Lee</dc:creator>
				<category><![CDATA[System]]></category>
		<category><![CDATA[store-passwords]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://blog.sukmoonlee.com/wordpress/?p=201</guid>
		<description><![CDATA[동일한 계정으로 여러 명이 svn을 사용하는 경우에는 패스워드를 저장하지 않고, commit 하는 사용자별로 자신의 계정을 사용해서 commit을 하는 것이 효과적입니다. 대개 개발서버를 두고 작업을 하는 경우에 이렇게 하면 누가 commit을 하고, 해당 파일을 마지막에 수정했는지를 쉽게 파악이 가능합니다. svn 을 shell에서 사용할때 패스워드 저장하지 않는 방법입니다. 1. 기존에 저장된 패스워드 삭제 [smlee@localhost .subversion]$ pwd /home/smlee/.subversion <a href='http://blog.sukmoonlee.com/wordpress/archives/201' class='excerpt-more'>[...]</a>]]></description>
				<content:encoded><![CDATA[<p>동일한 계정으로 여러 명이 svn을 사용하는 경우에는 패스워드를 저장하지 않고, commit 하는 사용자별로 자신의 계정을 사용해서 commit을 하는 것이 효과적입니다.</p>
<p>대개 개발서버를 두고 작업을 하는 경우에 이렇게 하면 누가 commit을 하고, 해당 파일을 마지막에 수정했는지를 쉽게 파악이 가능합니다.</p>
<p>svn 을 shell에서 사용할때 패스워드 저장하지 않는 방법입니다.</p>
<p>1. 기존에 저장된 패스워드 삭제</p>
<ul>
    [smlee@localhost .subversion]$ pwd<br />
    /home/smlee/.subversion</p>
<p>    [smlee@localhost .subversion]$ mv auth oldauth
</ul>
<p>2. 패스워드 저장하지 않는 옵션 변경</p>
<ul>
    [smlee@localhost .subversion]$ pwd<br />
    /home/smlee/.subversion</p>
<p>    [smlee@localhost .subversion]$ grep password config<br />
    ### Set password stores used by Subversion. They should be<br />
    ### the order in which password stores are used.<br />
    ### Valid password stores:<br />
    # password-stores = gnome-keyring,kwallet<br />
    ### Both &#8216;store-passwords&#8217; and &#8216;store-auth-creds&#8217; can now be<br />
    ### Set store-passwords to &#8216;no&#8217; to avoid storing passwords in the<br />
    ### but Subversion will never save your password to disk in<br />
    ### Note that this option only prevents saving of *new* passwords;<br />
    ### it doesn&#8217;t invalidate existing passwords.  (To do that, remove<br />
    <strong>store-passwords = no</strong>
</ul>
<p>3. 이후에 svn commit을 하게 되면 마지막 commit 한 사용자의 패스워드를 입력해야만 commit 이 가능해짐<br />
   ==> 만약 자신의 계정이 아닌 경우에는 아래와 같이 패스워드를 입력하지 않고 엔터만 입력해서 사용자 변경 가능</p>
<ul>
    [smlee@localhost public_html]$ svn commit<br />
    인증 영역(realm): <svn://localhost:3690> 0ee1c4cf-d430-49e6-9165-ac7844d2f91e<br />
    &#8216;smlee&#8217;의 암호:<br />
    인증 영역(realm): <svn://localhost:3690> 0ee1c4cf-d430-49e6-9165-ac7844d2f91e<br />
    사용자명:
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.sukmoonlee.com/wordpress/archives/201/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>svn del 명령어</title>
		<link>http://blog.sukmoonlee.com/wordpress/archives/178</link>
		<comments>http://blog.sukmoonlee.com/wordpress/archives/178#comments</comments>
		<pubDate>Tue, 28 Aug 2012 11:22:39 +0000</pubDate>
		<dc:creator>Sukmoon Lee</dc:creator>
				<category><![CDATA[Program]]></category>
		<category><![CDATA[System]]></category>
		<category><![CDATA[del]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://blog.sukmoonlee.com/wordpress/?p=178</guid>
		<description><![CDATA[svn을 사용하면서 파일을 삭제할때 유용한 옵션 2가지를 소개합니다. 1. svn del &#8211;keep-local svn 레파지토리에서만 파일을 제거하고, 해당 파일을 로컬에 남겨두는 기능입니다. 2. svn del &#8211;force rm 명령어를 통해서 파일을 삭제한 경우에 svn 레파지토리에는 삭제가 안되어 있는 경우 위의 명령어를 통해서 로컬 레파지토리에 삭제를 할수 있습니다. 최종 반영은 commit 할때 반영이 됩니다. [smlee@localhost ~]$ svn help <a href='http://blog.sukmoonlee.com/wordpress/archives/178' class='excerpt-more'>[...]</a>]]></description>
				<content:encoded><![CDATA[<p>svn을 사용하면서 파일을 삭제할때 유용한 옵션 2가지를 소개합니다.</p>
<p>1. svn del &#8211;keep-local<br />
 svn 레파지토리에서만 파일을 제거하고, 해당 파일을 로컬에 남겨두는 기능입니다.</p>
<p>2. svn del &#8211;force<br />
 rm 명령어를 통해서 파일을 삭제한 경우에 svn 레파지토리에는 삭제가 안되어 있는 경우 위의 명령어를 통해서 로컬 레파지토리에 삭제를 할수 있습니다. 최종 반영은 commit 할때 반영이 됩니다.</p>
<pre>
[smlee@localhost ~]$ svn help del
delete (del, remove, rm): 파일과 디렉토리를 버전 관리 대상에서 제거합니다.
사용법: 1. delete PATH...
        2. delete URL...

  1. PATH에 있는 모든 파일, 디렉토리들을 다음 커밋에서 제거하도록
     스케쥴합니다. 커밋되지 않은 파일과 디렉토리는 --keep-local 옵션을
     사용하지 않는한 즉시 작업사본에서 제거됩니다.
     PATH가 버전 관리 대상이 아니거나 그러한 파일을 포함하는 디렉토리라면
     --force 옵션을 주어야만 삭제됩니다.

  2. URL로 지정된 아이템들은 저장소에서 즉시 삭제됩니다.


옵션:
  --force                  : 강제로 실행합니다
  -q [--quiet]             : 아무것도 출력하지 않거나, 요약 정보만 출력합니다
  --targets ARG            : ARG로 주어진 파일 내용을 옵션으로 추가합니다
  -m [--message] ARG       : 커밋 로그 메시지를 지정합니다
  -F [--file] ARG          : arg에서 로그 메시지를 읽습니다
  --force-log              : 로그 메시지의 유효성을 확인하지 않습니다
  --editor-cmd ARG         : arg를 외부 편집기로 사용합니다
  --encoding ARG           : 값을 arg에 해당하는 문자코드로 취급합니다
  --with-revprop ARG       : set revision property ARG in new revision
                             using the name[=value] format
  --keep-local             : 작업사본의 경로를 유지합니다

글로벌 옵션:
  --username ARG           : arg를 접속에 필요한 사용자 ID로 사용합니다
  --password ARG           : arg를 접속에 필요한 패스워드로 사용합니다
  --no-auth-cache          : 인증 정보를 캐시에 저장하지 않습니다
  --non-interactive        : 대화식 사용자 입력을 기다리지 않습니다
  --trust-server-cert      : accept unknown SSL server certificates without
                             prompting (but only with '--non-interactive')
  --config-dir ARG         : arg로 지정된 디렉토리에서 사용자 구성화일을 읽습니다
  --config-option ARG      : set user configuration option in the format:
                                 FILE:SECTION:OPTION=[VALUE]
                             For example:
                                 servers:global:http-library=serf
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.sukmoonlee.com/wordpress/archives/178/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>svn add 옵션</title>
		<link>http://blog.sukmoonlee.com/wordpress/archives/143</link>
		<comments>http://blog.sukmoonlee.com/wordpress/archives/143#comments</comments>
		<pubDate>Tue, 17 Apr 2012 12:41:34 +0000</pubDate>
		<dc:creator>Sukmoon Lee</dc:creator>
				<category><![CDATA[System]]></category>
		<category><![CDATA[add]]></category>
		<category><![CDATA[non-recursive]]></category>
		<category><![CDATA[recursive]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://blog.sukmoonlee.com/wordpress/?p=143</guid>
		<description><![CDATA[SVN을 사용하여 기존에 개발된 소스 디렉토리를 추가하는 경우가 많습니다. 하지만 기존의 디렉토리 구조가 SVN에 적합하지 않거나, 일부분만 SVN과 연동을 하고자 하는 경우가 있습니다. 이런 경우에 처리하기가 좀 곤란해서 여러가지 꼼수를 사용했는데요. 아래와 같이 &#8220;svn add -N&#8221; 명령어로 간단하게 해결이 가능합니다. [root@localhost~]# svn help add add: 파일과 디렉토리를 버전관리 대상에 넣습니다. 저장소에 추가하도록 스케쥴링 되며, 다음 <a href='http://blog.sukmoonlee.com/wordpress/archives/143' class='excerpt-more'>[...]</a>]]></description>
				<content:encoded><![CDATA[<p>SVN을 사용하여 기존에 개발된 소스 디렉토리를 추가하는 경우가 많습니다.<br />
하지만 기존의 디렉토리 구조가 SVN에 적합하지 않거나, 일부분만 SVN과 연동을 하고자 하는 경우가 있습니다.</p>
<p>이런 경우에 처리하기가 좀 곤란해서 여러가지 꼼수를 사용했는데요. 아래와 같이 &#8220;<strong>svn add -N</strong>&#8221; 명령어로 간단하게 해결이 가능합니다.</p>
<pre>

[root@localhost~]# svn help add
add: 파일과 디렉토리를 버전관리 대상에 넣습니다. 저장소에
추가하도록 스케쥴링 되며, 다음 커밋할 때, 추가됩니다.
사용법: add PATH...

옵션:
  --targets ARG            : ARG로 주어진 파일 내용을 옵션으로 추가합니다
 <strong> -N [--non-recursive]     : obsolete; try --depth=files or --depth=immediates</strong>
  --depth ARG              : 적용할 단계를 제한합니다. 가능한 인자 ('empty', 'files',
                            'immediates', or 'infinity')
  -q [--quiet]             : 아무것도 출력하지 않거나, 요약 정보만 출력합니다
  --force                  : 강제로 실행합니다
  --no-ignore              : svn:ignore로 지정한 것과 디폴트로 무시하는 파일들을 무시하지 않습니다
  --auto-props             : 자동 속성기능을 활성화합니다
  --no-auto-props          : 자동 속성기능을 비활성화합니다
  --parents                : 임시 상위개체 삽입

글로벌 옵션:
  --username ARG           : arg를 접속에 필요한 사용자 ID로 사용합니다
  --password ARG           : arg를 접속에 필요한 패스워드로 사용합니다
  --no-auth-cache          : 인증 정보를 캐시에 저장하지 않습니다
  --non-interactive        : 대화식 사용자 입력을 기다리지 않습니다
  --trust-server-cert      : accept unknown SSL server certificates without
                             prompting (but only with '--non-interactive')
  --config-dir ARG         : arg로 지정된 디렉토리에서 사용자 구성화일을 읽습니다
  --config-option ARG      : set user configuration option in the format:
                                 FILE:SECTION:OPTION=[VALUE]
                             For example:
                                 servers:global:http-library=serf

</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.sukmoonlee.com/wordpress/archives/143/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SVN Startup Script</title>
		<link>http://blog.sukmoonlee.com/wordpress/archives/118</link>
		<comments>http://blog.sukmoonlee.com/wordpress/archives/118#comments</comments>
		<pubDate>Thu, 12 Apr 2012 13:12:30 +0000</pubDate>
		<dc:creator>Sukmoon Lee</dc:creator>
				<category><![CDATA[System]]></category>
		<category><![CDATA[chkconfig]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://blog.sukmoonlee.com/wordpress/?p=118</guid>
		<description><![CDATA[SVN을 RPM으로 설치하면 시스템 재시작시 실행해주는 스크립트가 들어가 있지 않다. 이런 경우 대부분 /etc/rc.d/rc.local 에 넣어서 처리를 하는 경우가 대부분인데. 이번에 설치한 CentOS 서버에서는 /etc/rc.d/rc.local 이 제대로 작동하지 않아서 스크립트를 찾아보니 없어서 하나 만들었다. #!/bin/bash # # svnserve Startup SVN Server # # chkconfig: - 85 15 # processname: svnserve # config: none # pidfile: <a href='http://blog.sukmoonlee.com/wordpress/archives/118' class='excerpt-more'>[...]</a>]]></description>
				<content:encoded><![CDATA[<p>SVN을 RPM으로 설치하면 시스템 재시작시 실행해주는 스크립트가 들어가 있지 않다.<br />
이런 경우 대부분 /etc/rc.d/rc.local 에 넣어서 처리를 하는 경우가 대부분인데. 이번에 설치한 CentOS 서버에서는 /etc/rc.d/rc.local 이 제대로 작동하지 않아서 스크립트를 찾아보니 없어서 하나 만들었다.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># svnserve        Startup SVN Server</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># chkconfig: - 85 15</span>
<span style="color: #666666; font-style: italic;"># processname: svnserve</span>
<span style="color: #666666; font-style: italic;"># config: none</span>
<span style="color: #666666; font-style: italic;"># pidfile: /var/run/svnserve.pid</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Source function library.</span>
. <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.d<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>functions
&nbsp;
<span style="color: #666666; font-style: italic;"># Path to the apachectl script, server binary, and short-form for messages.</span>
<span style="color: #007800;">svnserve</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">svnserve</span>
<span style="color: #007800;">prog</span>=<span style="color: #c20cb9; font-weight: bold;">svnserve</span>
<span style="color: #007800;">pidfile</span>=<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>run<span style="color: #000000; font-weight: bold;">/</span>svnserve.pid
<span style="color: #007800;">logfile</span>=<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">svnserve</span>
<span style="color: #007800;">repository</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">svn</span>
<span style="color: #007800;">OPTIONS</span>=<span style="color: #ff0000;">&quot;-d -r <span style="color: #007800;">$repository</span> --pid-file <span style="color: #007800;">$pidfile</span> --log-file <span style="color: #007800;">$logfile</span>&quot;</span>
<span style="color: #007800;">RETVAL</span>=<span style="color: #000000;">0</span>
&nbsp;
start<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> $<span style="color: #ff0000;">&quot;Starting <span style="color: #007800;">$prog</span>: &quot;</span>
        daemon <span style="color: #660033;">--pidfile</span>=<span style="color: #800000;">${pidfile}</span> <span style="color: #007800;">$svnserve</span> <span style="color: #007800;">$OPTIONS</span>
        <span style="color: #007800;">RETVAL</span>=<span style="color: #007800;">$?</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span>
        <span style="color: #7a0874; font-weight: bold;">return</span> <span style="color: #007800;">$RETVAL</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
stop<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> $<span style="color: #ff0000;">&quot;Stopping <span style="color: #007800;">$prog</span>: &quot;</span>
        killproc <span style="color: #660033;">-p</span> <span style="color: #800000;">${pidfile}</span>
        <span style="color: #007800;">RETVAL</span>=<span style="color: #007800;">$?</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span>
        <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$RETVAL</span> = <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> <span style="color: #800000;">${pidfile}</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># See how we were called.</span>
<span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #000000; font-weight: bold;">in</span>
  start<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        start
        <span style="color: #000000; font-weight: bold;">;;</span>
  stop<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        stop
        <span style="color: #000000; font-weight: bold;">;;</span>
  restart<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        stop
        start
        <span style="color: #000000; font-weight: bold;">;;</span>
  <span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> $<span style="color: #ff0000;">&quot;Usage: <span style="color: #007800;">$prog</span> {start|stop|restart}&quot;</span>
        <span style="color: #007800;">RETVAL</span>=<span style="color: #000000;">2</span>
<span style="color: #000000; font-weight: bold;">esac</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #007800;">$RETVAL</span></pre></td></tr></table></div>

<p>위와 같은 파일을 /etc/init.d/svnserve 로 생성을 하고, 아래와 같이 서비스 등록을 해주면 된다.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="text" style="font-family:monospace;">[root@localhost ~]# chmod 755 /etc/init.d/svnserve
[root@localhost ~]# chkconfig --add svnserve 
[root@localhost ~]# /sbin/runlevel
N 3
[root@localhost ~]# chkconfig --level 3 svnserve on</pre></td></tr></table></div>

<p>참고로 데스크탑으로 설정한 경우에는 Run Level에 5이므로 level을 5로 설정해야 한다.</p>
<p>아래와 같이 사용을 하면 된다.</p>
<pre>
[root@localhost log]# /etc/init.d/svnserve stop
svnserve 를 정지 중:                                       [  OK  ]
[root@localhost log]# /etc/init.d/svnserve start
svnserve (을)를 시작 중:                                   [  OK  ]
[root@localhost log]# /etc/init.d/svnserve restart
svnserve 를 정지 중:                                       [  OK  ]
svnserve (을)를 시작 중:                                   [  OK  ]
[root@localhost log]#
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.sukmoonlee.com/wordpress/archives/118/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UNIX/LINUX 쉘에서 SVN 사용하기 팁</title>
		<link>http://blog.sukmoonlee.com/wordpress/archives/113</link>
		<comments>http://blog.sukmoonlee.com/wordpress/archives/113#comments</comments>
		<pubDate>Mon, 09 Apr 2012 14:47:52 +0000</pubDate>
		<dc:creator>Sukmoon Lee</dc:creator>
				<category><![CDATA[System]]></category>
		<category><![CDATA[store-plaintext-password]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://blog.sukmoonlee.com/wordpress/?p=113</guid>
		<description><![CDATA[svn을 linux/unix 환경에서 사용하는 경우에 checkout을 처음 할때 서버의 계정과 클라이언트의 접속 계정이 다른 경우가 있습니다. 이런 경우에는 패스워드를 저장해두면 편리합니다. 다만 해당 계정이 다른 사람이 접근을 하게 된다면 문제가 되겠지만요. 일단 svn을 사용하게 되면 ~/.subversion 이라는 디렉토리가 생성이 됩니다. 해당 디렉토리에서 plaintext 형태로 패스워드를 저장할지를 선택해두면 편리하게 이용이 가능하다. &#91;root@localhost public_html&#93;# diff ~/.subversion/servers.org ~/.subversion/servers <a href='http://blog.sukmoonlee.com/wordpress/archives/113' class='excerpt-more'>[...]</a>]]></description>
				<content:encoded><![CDATA[<p>svn을 linux/unix 환경에서 사용하는 경우에 checkout을 처음 할때 서버의 계정과 클라이언트의 접속 계정이 다른 경우가 있습니다. 이런 경우에는 패스워드를 저장해두면 편리합니다. 다만 해당 계정이 다른 사람이 접근을 하게 된다면 문제가 되겠지만요.</p>
<p>일단 svn을 사용하게 되면 ~/.subversion 이라는 디렉토리가 생성이 됩니다.<br />
해당 디렉토리에서 plaintext 형태로 패스워드를 저장할지를 선택해두면 편리하게 이용이 가능하다.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="diff" style="font-family:monospace;"><span style="">&#91;</span>root@localhost public_html<span style="">&#93;</span># diff ~/.subversion/servers.org ~/.subversion/servers
<span style="color: #440088;">156c156</span>
<span style="color: #991111;">&lt; # store-plaintext-passwords = no</span>
<span style="color: #888822;">---
<span style="color: #00b000;">&gt; store-plaintext-passwords = yes</span></span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.sukmoonlee.com/wordpress/archives/113/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>diff 명령어 관련</title>
		<link>http://blog.sukmoonlee.com/wordpress/archives/64</link>
		<comments>http://blog.sukmoonlee.com/wordpress/archives/64#comments</comments>
		<pubDate>Wed, 04 Apr 2012 12:47:57 +0000</pubDate>
		<dc:creator>Sukmoon Lee</dc:creator>
				<category><![CDATA[System]]></category>
		<category><![CDATA[diff]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://blog.sukmoonlee.com/wordpress/?p=64</guid>
		<description><![CDATA[UNIX 개발환경에서 파일 비교를 위해서 많이 사용하는 것 중에 diff 라는 명령어가 있습니다. 특히 해당 프로그램은 patch 명령어와 연동해서 사용하게 되면 버전 관리도 가능합니다. 소스 형상관리 소프트웨어(CVS, SVN)을 사용하지 않는 경우에는 diff가 상당히 유용할것입니다. 아래와 같은 명령어를 이용하면 사람이 가독하기 쉬운 형태의 diff 결과를 확인할 수 있다. diff -Nur A B 최근 들어서는 형상관리 소프트웨어를 <a href='http://blog.sukmoonlee.com/wordpress/archives/64' class='excerpt-more'>[...]</a>]]></description>
				<content:encoded><![CDATA[<p>UNIX 개발환경에서 파일 비교를 위해서 많이 사용하는 것 중에 diff 라는 명령어가 있습니다.</p>
<p>특히 해당 프로그램은 patch 명령어와 연동해서 사용하게 되면 버전 관리도 가능합니다.</p>
<p>소스 형상관리 소프트웨어(CVS, SVN)을 사용하지 않는 경우에는 diff가 상당히 유용할것입니다.</p>
<p>아래와 같은 명령어를 이용하면 사람이 가독하기 쉬운 형태의 diff 결과를 확인할 수 있다.</p>
<blockquote><p> diff -Nur A B</p></blockquote>
<p>최근 들어서는 형상관리 소프트웨어를 많이 사용하기 때문에 특정 디렉토리(.svn, CVS)를 제거하고 diff를 하는 경우가 있습니다.<br />
이런 경우에는 아래와 같이 하면 편리합니다.</p>
<blockquote><p> diff -Nur &#8211;exclude=&#8221;.svn&#8221; &#8211;exclude=&#8221;.gitignore&#8221; A B</p></blockquote>
<hr />
참고로 위의 exclude 기능 관련해서 man 페이지에는 찾아보면 아래와 같다.</p>
<blockquote><p>       &#8211;exclude=pattern<br />
              디렉토리를 비교할 때, 파일과 하위 디렉토리의 basename이 pattern 과 일치하면무시한다.</p>
<p>       &#8211;exclude-from=file<br />
              디 렉토리를 비교할 때, 파일과 하위 디렉토리의 basename이 file 에 있는 어떤 패턴과 일치하<br />
              면 무시한다.
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.sukmoonlee.com/wordpress/archives/64/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SVN Hook (HTML &amp; Syntax Highlight)</title>
		<link>http://blog.sukmoonlee.com/wordpress/archives/7</link>
		<comments>http://blog.sukmoonlee.com/wordpress/archives/7#comments</comments>
		<pubDate>Tue, 03 Apr 2012 11:59:09 +0000</pubDate>
		<dc:creator>Sukmoon Lee</dc:creator>
				<category><![CDATA[Program]]></category>
		<category><![CDATA[hook]]></category>
		<category><![CDATA[post-commit]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://blog.sukmoonlee.com/wordpress/?p=7</guid>
		<description><![CDATA[SVN을 사용하면 hook script를 이용해서 다양한 기능을 할수 있다. 특히 commit을 하고 나면 해당 내용을 같은 팀원들이 공유를 하고, 서로 코드를 리뷰를 해주면 더욱 좋다. SVN에 기본적으로 포함되어 있는 post-commit 스크립트와 mailer.py를 사용하면 보내면 text/plain 형태로 전달이 되기 때문에 가독성이 떨어진다. 이것을 text/html로 보내면서 문법까지 쉽게 확인하면 좋을것 같다는 생각을 가지고 소스를 약간 수정했다. 일단 <a href='http://blog.sukmoonlee.com/wordpress/archives/7' class='excerpt-more'>[...]</a>]]></description>
				<content:encoded><![CDATA[<p>SVN을 사용하면 hook script를 이용해서 다양한 기능을 할수 있다.<br />
특히 commit을 하고 나면 해당 내용을 같은 팀원들이 공유를 하고, 서로 코드를 리뷰를 해주면 더욱 좋다.</p>
<p>SVN에 기본적으로 포함되어 있는 post-commit 스크립트와 mailer.py를 사용하면 보내면 text/plain 형태로 전달이 되기 때문에 가독성이 떨어진다. 이것을 text/html로 보내면서 문법까지 쉽게 확인하면 좋을것 같다는 생각을 가지고 소스를 약간 수정했다.</p>
<p>일단 아래와 같이 post-commit.tmpl 파일을 복사해서 아래와 같이 만든다.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="diff" style="font-family:monospace;">$ diff post-commit.tmpl post-commit
<span style="color: #440088;">50c50</span>
&amp;lt; mailer.py commit &quot;$REPOS&quot; &quot;$REV&quot; /path/to/mailer.conf
<span style="color: #888822;">---
&amp;gt; /home/svn/mailer.py commit &quot;$REPOS&quot; $REV /home/svn/mailer.conf</span></pre></td></tr></table></div>

<p>그리고 svn을 설치된 경로에 가보면 아래와 같이 mailer.py와 mailer.conf 파일이 있다.<br />
(리눅스 CentOS 6의 경우에는 아래의 경로에 있다.)</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>smlee<span style="color: #000000; font-weight: bold;">@</span>nams2 mailer<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ rpm <span style="color: #660033;">-ql</span> subversion <span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">grep</span> mailer
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>doc<span style="color: #000000; font-weight: bold;">/</span>subversion-1.6.11<span style="color: #000000; font-weight: bold;">/</span>tools<span style="color: #000000; font-weight: bold;">/</span>hook-scripts<span style="color: #000000; font-weight: bold;">/</span>mailer
<span style="color: #000000; font-weight: bold;">&lt;</span>strong<span style="color: #000000; font-weight: bold;">&gt;/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>doc<span style="color: #000000; font-weight: bold;">/</span>subversion-1.6.11<span style="color: #000000; font-weight: bold;">/</span>tools<span style="color: #000000; font-weight: bold;">/</span>hook-scripts<span style="color: #000000; font-weight: bold;">/</span>mailer<span style="color: #000000; font-weight: bold;">/</span>mailer.conf.example <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>doc<span style="color: #000000; font-weight: bold;">/</span>subversion-1.6.11<span style="color: #000000; font-weight: bold;">/</span>tools<span style="color: #000000; font-weight: bold;">/</span>hook-scripts<span style="color: #000000; font-weight: bold;">/</span>mailer<span style="color: #000000; font-weight: bold;">/</span>mailer.py<span style="color: #000000; font-weight: bold;">&lt;/</span>strong<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>doc<span style="color: #000000; font-weight: bold;">/</span>subversion-1.6.11<span style="color: #000000; font-weight: bold;">/</span>tools<span style="color: #000000; font-weight: bold;">/</span>hook-scripts<span style="color: #000000; font-weight: bold;">/</span>mailer<span style="color: #000000; font-weight: bold;">/</span>tests
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>doc<span style="color: #000000; font-weight: bold;">/</span>subversion-1.6.11<span style="color: #000000; font-weight: bold;">/</span>tools<span style="color: #000000; font-weight: bold;">/</span>hook-scripts<span style="color: #000000; font-weight: bold;">/</span>mailer<span style="color: #000000; font-weight: bold;">/</span>tests<span style="color: #000000; font-weight: bold;">/</span>mailer-init.sh
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>doc<span style="color: #000000; font-weight: bold;">/</span>subversion-1.6.11<span style="color: #000000; font-weight: bold;">/</span>tools<span style="color: #000000; font-weight: bold;">/</span>hook-scripts<span style="color: #000000; font-weight: bold;">/</span>mailer<span style="color: #000000; font-weight: bold;">/</span>tests<span style="color: #000000; font-weight: bold;">/</span>mailer-t1.output
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>doc<span style="color: #000000; font-weight: bold;">/</span>subversion-1.6.11<span style="color: #000000; font-weight: bold;">/</span>tools<span style="color: #000000; font-weight: bold;">/</span>hook-scripts<span style="color: #000000; font-weight: bold;">/</span>mailer<span style="color: #000000; font-weight: bold;">/</span>tests<span style="color: #000000; font-weight: bold;">/</span>mailer-t1.sh
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>doc<span style="color: #000000; font-weight: bold;">/</span>subversion-1.6.11<span style="color: #000000; font-weight: bold;">/</span>tools<span style="color: #000000; font-weight: bold;">/</span>hook-scripts<span style="color: #000000; font-weight: bold;">/</span>mailer<span style="color: #000000; font-weight: bold;">/</span>tests<span style="color: #000000; font-weight: bold;">/</span>mailer-tweak.py
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>doc<span style="color: #000000; font-weight: bold;">/</span>subversion-1.6.11<span style="color: #000000; font-weight: bold;">/</span>tools<span style="color: #000000; font-weight: bold;">/</span>hook-scripts<span style="color: #000000; font-weight: bold;">/</span>mailer<span style="color: #000000; font-weight: bold;">/</span>tests<span style="color: #000000; font-weight: bold;">/</span>mailer.conf</pre></td></tr></table></div>

<p>해당 파일은 적당한 디렉토리(/home/svn) 에 복사해서 만들면 된다.<br />
대부분 mailer.conf를 자신이 사용하는 메일서버(구글서버로 설정하면 편리합니다.)와 수신자와 발신자를 설정하면 된다.(대부분 commit을 한 author를 중심으로 설정하면 된다.)</p>
<p>여기서 제가 추가적으로 수정한 부분은 다음과 같습니다. 기존에 OS에서 가지고 있는 diff를 사용을 하면 text형태로만 제공이 됩니다.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="diff" style="font-family:monospace;"><span style="color: #440088;">144c144,145</span>
&amp;lt; diff = /usr/bin/diff -u -L %<span style="">&#40;</span>label_from<span style="">&#41;</span>s -L %<span style="">&#40;</span>label_to<span style="">&#41;</span>s %<span style="">&#40;</span>from<span style="">&#41;</span>s %<span style="">&#40;</span>to<span style="">&#41;</span>s --- &amp;gt; #diff = /usr/bin/diff -u -L %<span style="">&#40;</span>label_from<span style="">&#41;</span>s -L %<span style="">&#40;</span>label_to<span style="">&#41;</span>s %<span style="">&#40;</span>from<span style="">&#41;</span>s %<span style="">&#40;</span>to<span style="">&#41;</span>s
&amp;gt; diff = /home/svn/diff.sh %<span style="">&#40;</span>label_from<span style="">&#41;</span>s %<span style="">&#40;</span>label_to<span style="">&#41;</span>s %<span style="">&#40;</span>from<span style="">&#41;</span>s %<span style="">&#40;</span>to<span style="">&#41;</span>s</pre></td></tr></table></div>

<p>syntax highlight를 사용하기 위해서 GeSHi 프로그램을 사용하기 위해서 간단한 shell을 하나 만들어서 php 프로그램을 실행하도록 했습니다.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># cat diff.sh</span>
<span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #007800;">TMP</span>=<span style="color: #ff0000;">&quot;$4.diff&quot;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">diff</span> <span style="color: #660033;">-u</span> <span style="color: #660033;">-L</span> <span style="color: #ff0000;">'$1'</span> <span style="color: #660033;">-L</span> <span style="color: #ff0000;">'$2'</span> <span style="color: #007800;">$3</span> <span style="color: #007800;">$4</span> <span style="color: #000000; font-weight: bold;">&amp;</span>gt; <span style="color: #007800;">$TMP</span>
php <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>svn_geshi.php <span style="color: #007800;">$TMP</span> <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #ff0000;">&quot;$2&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> <span style="color: #007800;">$TMP</span></pre></td></tr></table></div>

<p>보는 것과 같이 기존의 diff 결과를 파일로 저장하고, 저장된 파일을 geshi에 들어있는 샘플 파일을 이용해서 출력을 하면 된다.<br />
이렇게 하면 mailer.py 에서 해당 결과를 읽어서 메일로 전달하게 되는 구조이다.</p>
<p>다만 기존의 mailer.py는 text/plain 형태의 메일을 보내는 것을 text/html로 변경하고, 출력되는 문구에 HTML이 가능하도록 수정하면 된다. 나는 geshi에 있는 샘플 파일의 HTML 형식을 사용했다.</p>
<p>소스는 지금도 수정중이고, mailer.conf 파일의 활용법을 계속 연습중이라서 나중에 공개하도록 하겠다.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sukmoonlee.com/wordpress/archives/7/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RedHat 7.3에 SVN 설치하기</title>
		<link>http://blog.sukmoonlee.com/wordpress/archives/48</link>
		<comments>http://blog.sukmoonlee.com/wordpress/archives/48#comments</comments>
		<pubDate>Tue, 03 Apr 2012 06:14:23 +0000</pubDate>
		<dc:creator>Sukmoon Lee</dc:creator>
				<category><![CDATA[System]]></category>
		<category><![CDATA[redhat 7.3]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://blog.sukmoonlee.com/wordpress/?p=48</guid>
		<description><![CDATA[SVN서버를 사용할때 오래된 OS(redhat 7.3)에는 설치하기가 힘듭니다. OS가 maintaince 기간이 만료되었기 때문에 rpm 구하기가 힘듭니다. yum 도 사용하기 힘들기 때문에 소스를 컴파일해서 설치해서 사용해야 합니다. 설치를 하다 보면 APR(Apache Portable Runtime) 패키지가 없어서 아래와 같이 컴파일 에러가 납니다. [root@guide1 subversion-1.7.4]# ./configure configure: Configuring Subversion 1.7.4 configure: creating config.nice checking for gcc... gcc checking whether the C <a href='http://blog.sukmoonlee.com/wordpress/archives/48' class='excerpt-more'>[...]</a>]]></description>
				<content:encoded><![CDATA[<p>SVN서버를 사용할때 오래된 OS(redhat 7.3)에는 설치하기가 힘듭니다. OS가 maintaince 기간이 만료되었기 때문에 rpm 구하기가 힘듭니다.</p>
<p>yum 도 사용하기 힘들기 때문에 소스를 컴파일해서 설치해서 사용해야 합니다.</p>
<p>설치를 하다 보면 APR(<a href="http://apr.apache.org/" target="_blank">Apache Portable Runtime</a><em>)</em> 패키지가 없어서 아래와 같이 컴파일 에러가 납니다.</p>
<pre>[root@guide1 subversion-1.7.4]# ./configure
configure: Configuring Subversion 1.7.4
configure: creating config.nice
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking for a sed that does not truncate output... /bin/sed
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking whether ln -s works... yes
checking for a BSD-compatible install... /usr/bin/install -c
configure: Apache Portable Runtime (APR) library configuration
checking for APR... no
configure: WARNING: APR not found
The Apache Portable Runtime (APR) library cannot be found.
Please install APR on this system and supply the appropriate
--with-apr option to 'configure'

or

get it with SVN and put it in a subdirectory of this source:

svn co \
http://svn.apache.org/repos/asf/apr/apr/branches/1.3.x \
apr

Run that right here in the top level of the Subversion tree.
Afterwards, run apr/buildconf in that subdirectory and
then run configure again here.

Whichever of the above you do, you probably need to do
something similar for apr-util, either providing both
--with-apr and --with-apr-util to 'configure', or
getting both from SVN with:

svn co \
http://svn.apache.org/repos/asf/apr/apr-util/branches/1.3.x \
apr-util

configure: error: no suitable apr found
[root@guide1 subversion-1.7.4]#</pre>
<p>이런 문제를 해결하기 위해서는 최신 버전이 아닌 1.3.x 버전을 사용하면 해결이 가능합니다.</p>
<p>아래의 경로에서 다운로드 가능합니다.</p>
<blockquote><p><a href="http://archive.apache.org/dist/subversion/subversion-1.3.2.tar.gz">http://archive.apache.org/dist/subversion/subversion-1.3.2.tar.gz</a></p></blockquote>
<pre>[root@guide1 root]# cat /etc/redhat-release
Red Hat Linux release 7.3 (Valhalla)
[root@guide1 root]# svn --version
svn, version 1.3.2 (r19776)
compiled Apr 3 2012, 15:09:18

Copyright (C) 2000-2006 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_dav : Module for accessing a repository via WebDAV (DeltaV) protocol.
- handles 'http' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
- handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
- handles 'file' scheme</pre>
<p>참고사이트 : http://svn.haxx.se/users/archive-2006-06/0713.shtml</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sukmoonlee.com/wordpress/archives/48/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
