<?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>Notes of a Developer &#187; SVN</title>
	<atom:link href="http://www.developers-life.com/tag/svn/feed" rel="self" type="application/rss+xml" />
	<link>http://www.developers-life.com</link>
	<description>Develop on Objective-C, UIKit, C, OpenGL for  iPhone, iPad, Mac OS X</description>
	<lastBuildDate>Fri, 03 Feb 2012 11:49:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Adding SVN revision to Xcode project</title>
		<link>http://www.developers-life.com/adding-svn-revision-to-xcode-project.html</link>
		<comments>http://www.developers-life.com/adding-svn-revision-to-xcode-project.html#comments</comments>
		<pubDate>Wed, 23 Feb 2011 12:43:01 +0000</pubDate>
		<dc:creator>Vladimir Boychentsov</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[RegExp]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[Xcode]]></category>
		<category><![CDATA[Кодинг]]></category>

		<guid isPermaLink="false">http://www.developers-life.com/?p=1193</guid>
		<description><![CDATA[Просмотр ревизии в самом приложении предотвращает путаницу и всякие проблемы с отслеживанием текущей версии. Чтоб отслеживать версию репозитория нам нужно добавить слдеющий код bash скрипта. 12345678910REVISION=`svnversion -nc &#124; /usr/bin/sed -e 's/^[^:]*://;s/[A-Za-z]//'` APPVERSION=`/usr/libexec/PlistBuddy -c &#34;Print CFBundleVersion&#34; &#34;${TARGET_BUILD_DIR}&#34;/${INFOPLIST_PATH}` xported=&#34;xported&#34; if &#91; $APPVERSION != $xported &#93;; then &#160; &#160; &#160;/usr/libexec/PlistBuddy -c &#34;Delete :CFBundleDisplayVersion&#34; &#34;${TARGET_BUILD_DIR}&#34;/${INFOPLIST_PATH} &#160; &#160; &#160;/usr/libexec/PlistBuddy -c [...]]]></description>
			<content:encoded><![CDATA[<p>Просмотр ревизии в самом приложении предотвращает путаницу и всякие проблемы с отслеживанием текущей версии.</p>
<p>Чтоб отслеживать версию репозитория нам нужно добавить слдеющий код bash скрипта.</p>
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #007800;">REVISION</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">svnversion</span> <span style="color: #660033;">-nc</span> <span style="color: #000000; font-weight: bold;">|</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;">sed</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/^[^:]*://;s/[A-Za-z]//'</span><span style="color: #000000; font-weight: bold;">`</span><br />
<span style="color: #007800;">APPVERSION</span>=<span style="color: #000000; font-weight: bold;">`/</span>usr<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>PlistBuddy <span style="color: #660033;">-c</span> <span style="color: #ff0000;">&quot;Print CFBundleVersion&quot;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${TARGET_BUILD_DIR}</span>&quot;</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #800000;">${INFOPLIST_PATH}</span><span style="color: #000000; font-weight: bold;">`</span><br />
<br />
<span style="color: #007800;">xported</span>=<span style="color: #ff0000;">&quot;xported&quot;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$APPVERSION</span> <span style="color: #000000; font-weight: bold;">!</span>= <span style="color: #007800;">$xported</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>PlistBuddy <span style="color: #660033;">-c</span> <span style="color: #ff0000;">&quot;Delete :CFBundleDisplayVersion&quot;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${TARGET_BUILD_DIR}</span>&quot;</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #800000;">${INFOPLIST_PATH}</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>PlistBuddy <span style="color: #660033;">-c</span> <span style="color: #ff0000;">&quot;Add :CFBundleDisplayVersion string&quot;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${TARGET_BUILD_DIR}</span>&quot;</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #800000;">${INFOPLIST_PATH}</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>PlistBuddy <span style="color: #660033;">-c</span> <span style="color: #ff0000;">&quot;Set :CFBundleDisplayVersion <span style="color: #007800;">$APPVERSION</span>.<span style="color: #007800;">$REVISION</span>&quot;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${TARGET_BUILD_DIR}</span>&quot;</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #800000;">${INFOPLIST_PATH}</span><br />
<span style="color: #000000; font-weight: bold;">fi</span></div></td></tr></tbody></table></div>
<p>Чтоб добавить скрипт, необходимо выполнить следующие действия:<br />
1. Зажать Ctrl+клик на фаил проекта в дереве проекта<br />
2. Add->New Build Phase -> New Run Script Build Phase<br />
3. Откроется окно в которое нужно вставить скрипт.</p>
<p><span id="more-1193"></span></p>
<p>В самом проекте, пример на сплеш скрине, создаем лейбл и читаем версию программы к примеру как-то так.</p>
<div class="codecolorer-container objc geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span>version <span style="color: #002200;">=</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Version &quot;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSBundle_Class/"><span style="color: #400080;">NSBundle</span></a> mainBundle<span style="color: #002200;">&#93;</span> objectForInfoDictionaryKey<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;CFBundleDisplayVersion&quot;</span><span style="color: #002200;">&#93;</span> <span style="color: #002200;">!=</span> <span style="color: #a61390;">nil</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; version <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>version stringByAppendingString<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSBundle_Class/"><span style="color: #400080;">NSBundle</span></a> mainBundle<span style="color: #002200;">&#93;</span> objectForInfoDictionaryKey<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;CFBundleDisplayVersion&quot;</span><span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#125;</span> <span style="color: #a61390;">else</span> <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; version <span style="color: #002200;">=</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;&quot;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#125;</span></div></td></tr></tbody></table></div>
<p><img src="http://gyazo.com/150e15a5c21dbae21bcb6d5026220da2.png" alt="Adding SVN revision to Xcode project" /></p>
<p>Существует и второй вариант, более простой. (На самом деле можно придумать еще много разных способов.) Добавляем следующий bash скрипт в проект и добавляем фаил revision.h.</p>
<div class="codecolorer-container bash geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #007800;">REV</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">svnversion</span> -n<span style="color: #000000; font-weight: bold;">`</span><br />
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;#define kRevisionNumber @<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #007800;">$REV</span><span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #800000;">${PROJECT_DIR}</span><span style="color: #000000; font-weight: bold;">/</span>revision.h</div></td></tr></tbody></table></div>
<p>Желательно фаил вставить в один какой-то дальний хидер, чтоб при компилировании не пересобирался весь проект. </p>
<p>Для этого варианта можно написать что-то типа этого:</p>
<div class="codecolorer-container objc geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span>version <span style="color: #002200;">=</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Version &quot;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSBundle_Class/"><span style="color: #400080;">NSBundle</span></a> mainBundle<span style="color: #002200;">&#93;</span> objectForInfoDictionaryKey<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;CFBundleVersion&quot;</span><span style="color: #002200;">&#93;</span> <span style="color: #002200;">!=</span> <span style="color: #a61390;">nil</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; version <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>version stringByAppendingString<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSBundle_Class/"><span style="color: #400080;">NSBundle</span></a> mainBundle<span style="color: #002200;">&#93;</span> objectForInfoDictionaryKey<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;CFBundleVersion&quot;</span><span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; version <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>version stringByAppendingString<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;.&quot;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; version <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>version stringByAppendingString<span style="color: #002200;">:</span>kRevisionNumber<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#125;</span> <span style="color: #a61390;">else</span> <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; version <span style="color: #002200;">=</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;&quot;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#125;</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://www.developers-life.com/adding-svn-revision-to-xcode-project.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Setup Python, MySQL, MySQL-python and SVN on MAC OS X 10.6</title>
		<link>http://www.developers-life.com/setup-python-mysql-mysql-python-and-svn-on-mac-os-x-106.html</link>
		<comments>http://www.developers-life.com/setup-python-mysql-mysql-python-and-svn-on-mac-os-x-106.html#comments</comments>
		<pubDate>Sun, 11 Oct 2009 12:58:03 +0000</pubDate>
		<dc:creator>Vladimir Boychentsov</dc:creator>
				<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[others]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Django]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://www.developers-life.com/?p=550</guid>
		<description><![CDATA[Mac Os X + Python 2.6.1+ PIL + apache2.2 +mod_python + MySQL + MySQLdb +php5+ phpMyAdmin + SVN server +WebSVN OS: Mac OS X 10.6.1 Snow Leopard XCode:The latest Xcode Tools Python: Python 2.6.1 64-bit (Snow Leopard default) Projects will be located in ~/Sites, so change permissions: add read permission for everyone on ~/Sites Setup [...]]]></description>
			<content:encoded><![CDATA[<p>Mac Os X + Python 2.6.1+ PIL + apache2.2 +mod_python + MySQL + MySQLdb +php5+ phpMyAdmin + SVN server +WebSVN</p>
<p>OS: Mac OS X 10.6.1 Snow Leopard<br />
XCode:The latest Xcode Tools<br />
Python: Python 2.6.1 64-bit (Snow Leopard default)</p>
<p>Projects will be located in ~/Sites, so change permissions:<br />
     add read permission for everyone on ~/Sites</p>
<p>Setup django</p>
<p>   1.    mkdir  ~/sources<br />
   2.    cd ~/sources<br />
   3.    svn co http://code.djangoproject.com/svn/django/trunk/ django<br />
   4.    cd django<br />
   5.    sudo python setup.py install</p>
<p>Apache:<br />
    We will use default 10.6 apache2.2</p>
<p>Setup mod_python:<br />
   1.  mkdir  ~/sources/mod_python<br />
   2.  cd ~/sources/mod_python<br />
   3.  svn co http://svn.apache.org/repos/asf/quetzalcoatl/mod_python/trunk mod_python-trunk<br />
   4.  cd mod_python-trunk<br />
   5.  ./configure &#8211;with-apxs=/usr/sbin/apxs<br />
   6.  make<br />
   7.  sudo make install</p>
<p><span id="more-550"></span><br />
Setup MySQL &#8212; Download 64bit!!!<br />
  1. nano  ~/.profile<br />
   2. export PATH=&#8221;/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH&#8221;<br />
   3. source ~/.profile<br />
   4. Download MySQL 5.1.39 sourcse and place it into ~/sources<br />
   5. tar xzvf mysql-5.1.39.tar.gz<br />
   6. cd mysql-5.1.39</p>
<p>    7.  ./configure &#8211;prefix=/usr/local/mysql &#8211;with-extra-charsets=complex \<br />
         &#8211;enable-thread-safe-client &#8211;enable-local-infile &#8211;enable-shared \<br />
         &#8211;with-plugins=innobase<br />
    8. make<br />
    9. sudo make install<br />
    10. cd /usr/local/mysql<br />
    11. sudo ./bin/mysql_install_db &#8211;user=mysql<br />
    12. sudo chown -R mysql ./var<br />
    13. cd ..<br />
    14. open TexEdit, switch to plain text<br />
            copy-paste:</p>
<div class="codecolorer-container objc geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;?xml version<span style="color: #002200;">=</span><span style="color: #bf1d1a;">&quot;1.0&quot;</span> encoding<span style="color: #002200;">=</span><span style="color: #bf1d1a;">&quot;UTF-8&quot;</span>?&gt;<br />
&lt;<span style="color: #002200;">!</span>DOCTYPE plist PUBLIC <span style="color: #bf1d1a;">&quot;-//Apple//DTD PLIST 1.0//EN&quot;</span> <span style="color: #bf1d1a;">&quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;</span>&gt;<br />
&lt;plist version<span style="color: #002200;">=</span><span style="color: #bf1d1a;">&quot;1.0&quot;</span>&gt;<br />
&lt;dict&gt;<br />
&nbsp; &nbsp; &lt;key&gt;KeepAlive&lt;<span style="color: #002200;">/</span>key&gt;<br />
&nbsp; &nbsp; &lt;<span style="color: #a61390;">true</span><span style="color: #002200;">/</span>&gt;<br />
&nbsp; &nbsp; &lt;key&gt;Label&lt;<span style="color: #002200;">/</span>key&gt;<br />
&nbsp; &nbsp; &lt;string&gt;com.mysql.mysqld&lt;<span style="color: #002200;">/</span>string&gt;<br />
&nbsp; &nbsp; &lt;key&gt;Program&lt;<span style="color: #002200;">/</span>key&gt;<br />
&nbsp; &nbsp; &lt;string&gt;<span style="color: #002200;">/</span>usr<span style="color: #002200;">/</span>local<span style="color: #002200;">/</span>mysql<span style="color: #002200;">/</span>bin<span style="color: #002200;">/</span>mysqld_safe&lt;<span style="color: #002200;">/</span>string&gt;<br />
&nbsp; &nbsp; &lt;key&gt;RunAtLoad&lt;<span style="color: #002200;">/</span>key&gt;<br />
&nbsp; &nbsp; &lt;<span style="color: #a61390;">true</span><span style="color: #002200;">/</span>&gt;<br />
&nbsp; &nbsp; &lt;key&gt;UserName&lt;<span style="color: #002200;">/</span>key&gt;<br />
&nbsp; &nbsp; &lt;string&gt;mysql&lt;<span style="color: #002200;">/</span>string&gt;<br />
&nbsp; &nbsp; &lt;key&gt;WorkingDirectory&lt;<span style="color: #002200;">/</span>key&gt;<br />
&nbsp; &nbsp; &lt;string&gt;<span style="color: #002200;">/</span>usr<span style="color: #002200;">/</span>local<span style="color: #002200;">/</span>mysql&lt;<span style="color: #002200;">/</span>string&gt;<br />
&lt;<span style="color: #002200;">/</span>dict&gt;<br />
&lt;<span style="color: #002200;">/</span>plist&gt;</div></td></tr></tbody></table></div>
<p>save as ~/sources/com.mysql.mysqld.plist<br />
close TexEdit</p>
<p>    15. sudo mv ~/sources/com.mysql.mysqld.plist /Library/LaunchDaemons<br />
    16. sudo chown root /Library/LaunchDaemons/com.mysql.mysqld.plist<br />
    17. sudo launchctl load -w /Library/LaunchDaemons/com.mysql.mysqld.plist<br />
    18. mysqladmin -u root password NEW_PASSWORD</p>
<p>Setup MySQL for Python adapter</p>
<p>   1. Download the latest MySQL for Python adapter from SourceForge(http://sourceforge.net/project/showfiles.php?group_id=22307) and copy to ~/sources<br />
   2. cd ~/sources<br />
   3. tar xzvf MySQL-python-1.2.2.tar.gz<br />
   4. cd ./MySQL-python-1.2.2<br />
   5. Inside the folder, clean the package by typing<br />
   6. sudo python setup.py clean<br />
   7. In the same folder, edit _mysql.c using your favourite text-editor<br />
   8. Remove the following lines (37-39):</p>
<div class="codecolorer-container python geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br /></div></td><td><div class="python codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">#ifndef uint</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">#define uint unsigned int</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">#endif</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp;Change the following:<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp;uint port <span style="color: #66cc66;">=</span> MYSQL_PORT<span style="color: #66cc66;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;uint client_flag <span style="color: #66cc66;">=</span> <span style="color: #ff4500;">0</span><span style="color: #66cc66;">;</span> <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp;to<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp;unsigned <span style="color: #008000;">int</span> port <span style="color: #66cc66;">=</span> MYSQL_PORT<span style="color: #66cc66;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;unsigned <span style="color: #008000;">int</span> client_flag <span style="color: #66cc66;">=</span> <span style="color: #ff4500;">0</span><span style="color: #66cc66;">;</span></div></td></tr></tbody></table></div>
<p>9. Create a symbolic link under lib to point to a sub-directory called mysql. This is where it    looks for during compilation.<br />
    10.sudo ln -s /usr/local/mysql/lib /usr/local/mysql/lib/mysql<br />
    11. Edit the setup_posix.py and change the following<br />
         mysql_config.path = &#8220;mysql_config&#8221;<br />
          to<br />
     mysql_config.path = &#8220;/usr/local/mysql/bin/mysql_config&#8221;<br />
     12.In the same directory, rebuild your package (ignore the warnings that comes with it)</p>
<p>     13. sudo python setup.py build</p>
<p>       Install the package and you are done.</p>
<p>     14. sudo python setup.py install</p>
<p>      Test if it&#8217;s working. It works if you can import MySQLdb.</p>
<p>      python<br />
    >>> import MySQLdb</p>
<p> SVN<br />
   We will be using build in svn  + WebSvn for repo browsing<br />
   1. mkdir ~/svn<br />
   2 cd ~<br />
   3.chown -R _www svn<br />
   4. svnadmin create &#8211;fs-type fsfs myrepo-1<br />
   5. donwload latest WebSVN<br />
   6. Unpack in into ~/Sites<br />
   7. rename to websvn<br />
   8. chmod 0700 ~/Sites/websvn/cache<br />
   9. rename ~/Sites/websvn/include/distconfig.php to ~/Sites/websvn/include/config.php<br />
   10. edit ~/Sites/websvn/include/config.php:<br />
               find and uncomment<br />
         $config-&gt;useTreeIndex(true);  // Tree index, open by default<br />
         $config-&gt;addInlineMimeType(&#8220;text/plain&#8221;);<br />
         $config-&gt;hideRSS();<br />
         $config-&gt;parentPath(&#8216;path/to/yours/svn&#8217;);</p>
<p> Starting project<br />
   1. cd ~/Sites<br />
   2. mkdir Temp<br />
   3. chmod 0700  ~/Sites/Temp<br />
   4. django-admin.py start project my_project<br />
   5. nano apache_settings.py<br />
   6. add lines:</p>
<div class="codecolorer-container python geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="python codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">os</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #dc143c;">os</span>.<span style="color: black;">environ</span><span style="color: black;">&#91;</span><span style="color: #483d8b;">'PYTHON_EGG_CACHE'</span><span style="color: black;">&#93;</span> <span style="color: #66cc66;">=</span> <span style="color: #483d8b;">'/Users/you_user_name/Sites/Temp'</span><br />
&nbsp; &nbsp;close apache_settings.<span style="color: black;">py</span></div></td></tr></tbody></table></div>
<p>Configure Apache:<br />
      sudo nano /etc/apache2/httpd.conf<br />
      Add lines:<br />
      LoadModule python_module  libexec/apache2/mod_python.so<br />
      LoadModule php5_module libexec/apache2/libphp5.so #for WebSvn and phpMyAdmin<br />
      Uncomment:<br />
      Include /private/etc/apache2/extra/httpd-vhosts.conf<br />
      Add line:<br />
      PythonImport /Users/you_user_name/Sites/my_project/apache_settings.py my_project<br />
save and exit httpd.conf</p>
<p>Configure VirtualHosts:<br />
      sudo nano /etc/apache2/extra/httpd-vhosts.conf<br />
      remove all lines<br />
      add</p>
<div class="codecolorer-container apache geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br /></div></td><td><div class="apache codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp;<span style="color: #00007f;">NameVirtualHost</span> *:<span style="color: #ff0000;">80</span><br />
&nbsp; &nbsp; <br />
&lt;<span style="color: #000000; font-weight:bold;">VirtualHost</span> *:<span style="color: #ff0000;">80</span>&gt;<br />
&nbsp; &nbsp; <span style="color: #00007f;">ServerName</span> <span style="color: #7f007f;">&quot;you_server_name&quot;</span><br />
&nbsp; &nbsp; <span style="color: #00007f;">DocumentRoot</span> <span style="color: #7f007f;">&quot;/Users/pyromann/Sites/my_project&quot;</span><br />
&nbsp; &nbsp; <span style="color: #00007f;">ErrorLog</span> &nbsp; &nbsp; <span style="color: #7f007f;">&quot;/private/var/log/apache2/my_project-error_log&quot;</span><br />
&nbsp; &nbsp; <span style="color: #00007f;">CustomLog</span> &nbsp; <span style="color: #7f007f;">&quot;/private/var/log/apache2/my_project-access_log&quot;</span> common<br />
&nbsp; &nbsp; &lt;<span style="color: #000000; font-weight:bold;">Directory</span> <span style="color: #7f007f;">&quot;/Users/pyromann/Sites/my_project&quot;</span>&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f;">Options</span> <span style="color: #0000ff;">FollowSymLinks</span> MultiViews <span style="color: #0000ff;">Includes</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f;">AllowOverride</span> <span style="color: #0000ff;">All</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f;">Order</span> <span style="color: #00007f;">allow</span>,<span style="color: #00007f;">deny</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f;">Allow</span> from <span style="color: #0000ff;">all</span><br />
&nbsp; &nbsp; &lt;/<span style="color: #000000; font-weight:bold;">Directory</span>&gt;<br />
<br />
&nbsp; &nbsp; &lt;<span style="color: #000000; font-weight:bold;">Location</span> <span style="color: #7f007f;">&quot;/&quot;</span>&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f;">SetHandler</span> python-program<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f;">SetEnv</span> &nbsp;DJANGO_SETTINGS_MODULE my_project.settings<br />
&nbsp; &nbsp; &nbsp; &nbsp; PythonHandler django.core.handlers.modpython<br />
&nbsp; &nbsp; &nbsp; &nbsp; PythonPath <span style="color: #7f007f;">&quot;sys.path + ['/Users/your_user_name/Sites/']&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; PythonOption django.root /my_project<br />
&nbsp; &nbsp; &nbsp; &nbsp; PythonDebug <span style="color: #0000ff;">On</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; PythonInterpreter my_project<br />
&nbsp; &nbsp; &lt;/<span style="color: #000000; font-weight:bold;">Location</span>&gt;<br />
<br />
&nbsp; &nbsp; &lt;<span style="color: #000000; font-weight:bold;">Location</span> <span style="color: #7f007f;">&quot;/media&quot;</span>&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f;">SetHandler</span> <span style="color: #0000ff;">None</span><br />
&nbsp; &nbsp; &lt;/<span style="color: #000000; font-weight:bold;">Location</span>&gt;<br />
<br />
&nbsp; &nbsp; &lt;<span style="color: #000000; font-weight:bold;">LocationMatch</span> <span style="color: #7f007f;">&quot;.(jpg|gif|png)$&quot;</span>&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f;">SetHandler</span> <span style="color: #0000ff;">None</span><br />
&nbsp; &nbsp; &lt;/<span style="color: #000000; font-weight:bold;">LocationMatch</span>&gt;<br />
<br />
&lt;/<span style="color: #000000; font-weight:bold;">VirtualHost</span>&gt;<br />
<br />
&lt;<span style="color: #000000; font-weight:bold;">VirtualHost</span> *:<span style="color: #ff0000;">80</span>&gt;<br />
&nbsp; &nbsp; <span style="color: #00007f;">ServerName</span> <span style="color: #7f007f;">&quot;mysqladmin.loc&quot;</span><br />
&nbsp; &nbsp; <span style="color: #00007f;">ServerAlias</span> <span style="color: #7f007f;">&quot;www.mysqladmin.loc&quot;</span><br />
&nbsp; &nbsp; <span style="color: #00007f;">DocumentRoot</span> <span style="color: #7f007f;">&quot;/Users/your_user_name/Sites/mysqladmin&quot;</span><br />
&lt;/<span style="color: #000000; font-weight:bold;">VirtualHost</span>&gt;<br />
<br />
<br />
&lt;<span style="color: #000000; font-weight:bold;">VirtualHost</span> *:<span style="color: #ff0000;">80</span>&gt;<br />
&nbsp; &nbsp; <span style="color: #00007f;">ServerName</span> <span style="color: #7f007f;">&quot;svn.loc&quot;</span><br />
&nbsp; &nbsp; <span style="color: #00007f;">ServerAlias</span> <span style="color: #7f007f;">&quot;www.svn.loc&quot;</span><br />
&nbsp; &nbsp; <span style="color: #00007f;">DocumentRoot</span> <span style="color: #7f007f;">&quot;/Users/your_user_name/Sites/websvn&quot;</span><br />
&lt;/<span style="color: #000000; font-weight:bold;">VirtualHost</span>&gt;</div></td></tr></tbody></table></div>
<p>Setup hosts<br />
   sudo nano /etc/hosts<br />
   add line:<br />
   127.0.0.1 your_server_name svn.loc mysqladmin.loc</p>
<p>restart apache<br />
    sudo apachectl restart<br />
    http://svn.loc &#8211; yours svn<br />
    http://mysqladmin.loc &#8211; phpMyAdmin<br />
    http://your_server_name  &#8211; yours django project</p>
<p> setup PIL<br />
    Download lates sources<br />
    Place it to ~/sources<br />
    tar xzfv Imaging-1.1.6.tar<br />
    cd Imaging-1.1.6<br />
    python setup.py build<br />
    sudo python setup.py install</p>
<p>Source:<br />
<noindex><br />
<a href="http://pyromann-dude.blogspot.com/2009/09/how-to-setup-django-development.html">How to setup django development environment in Mac OS X 10.6 Snow Leopard</a></noindex></p>
]]></content:encoded>
			<wfw:commentRss>http://www.developers-life.com/setup-python-mysql-mysql-python-and-svn-on-mac-os-x-106.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SVN на *ubuntu mini HOWTO</title>
		<link>http://www.developers-life.com/svn-%d0%bd%d0%b0-ubuntu-mini-howto.html</link>
		<comments>http://www.developers-life.com/svn-%d0%bd%d0%b0-ubuntu-mini-howto.html#comments</comments>
		<pubDate>Wed, 03 Sep 2008 16:58:03 +0000</pubDate>
		<dc:creator>Vladimir Boychentsov</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[SVN]]></category>

		<guid isPermaLink="false">http://developers-life.com/?p=11</guid>
		<description><![CDATA[Subversion 1sudo apt-get install trac libapache2-svn subversion python-subversion libapache2-mod-python — устанавливаем необходимые компоненты 1sudo a2enmod mod_python — включаем модуль для работы с Python’ом 1sudo groupadd svn — создаем группу для работу с SVN 1sudo usermod -a -G svn имя_вашего_пользователя — добавляем вашего пользователя в созданную группу 1sudo usermod -a -G svn www-data — добавляем пользователя [...]]]></description>
			<content:encoded><![CDATA[<h3>Subversion</h3>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">sudo apt-get install trac libapache2-svn subversion python-subversion libapache2-mod-python</div></td></tr></tbody></table></div>
<p>— устанавливаем необходимые компоненты</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">sudo a2enmod mod_python</div></td></tr></tbody></table></div>
<p>— включаем модуль для работы с Python’ом</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">sudo groupadd svn</div></td></tr></tbody></table></div>
<p>— создаем группу для работу с</p>
<p><strong>SVN</strong></p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">sudo usermod -a -G svn имя_вашего_пользователя</div></td></tr></tbody></table></div>
<p>— добавляем вашего пользователя в созданную группу</p>
<p><span id="more-11"></span></p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">sudo usermod -a -G svn www-data</div></td></tr></tbody></table></div>
<p>— добавляем пользователя Apache в группу</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">sudo mkdir /var/svn</div></td></tr></tbody></table></div>
<p>— папка для будущего репозитория</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">sudo svnadmin create /var/svn</div></td></tr></tbody></table></div>
<p>— создаем сам репозиторий</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">sudo chown -R www-data:svn /var/svn</div></td></tr></tbody></table></div>
<p>— меняем права папке для доступа пользователям из группы SVN</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">sudo chmod -R g+ws /var/svn</div></td></tr></tbody></table></div>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">sudo htpasswd -c -m /etc/apache2/svn.htpasswd имя_вашего_пользователя</div></td></tr></tbody></table></div>
<p>— создайте пароль, который будет в последствии использоваться в Apache для доступа к папке</p>
<p>Теперь создадим правило для Apache:<br />
<strong>Alt+F2</strong></p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">gksu gedit /etc/apache2/conf.d/svn</div></td></tr></tbody></table></div>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&amp;lt;Location &quot;/svn&quot;&amp;gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; DAV svn<br />
&nbsp; &nbsp; &nbsp; &nbsp; SVNPath /var/svn<br />
&nbsp; &nbsp; &nbsp; &nbsp; AuthType Basic<br />
&nbsp; &nbsp; &nbsp; &nbsp; AuthName &quot;SVN Repositories&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; AuthUserFile /etc/apache2/svn.htpasswd<br />
&nbsp; &nbsp; &nbsp; &nbsp; Require valid-user<br />
&amp;lt;/Location&amp;gt;</div></td></tr></tbody></table></div>
<p><strong>создание папки <em>проекта</em> (репозитория) на удаленной машине</strong><br />
(remote.computer)<br />
#</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">svnadmin create /path/to/project</div></td></tr></tbody></table></div>
<p><strong>загрузка начальной версии <em>проекта</em> из его директории</strong><br />
- на удаленной машине<br />
#</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">svn import . file:///path/to/project -m &quot;First Import&quot;</div></td></tr></tbody></table></div>
<p>- с вашего локального компьютера<br />
#</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">svn import . svn+ssh://remote.computer/path/to/project -m &quot;First Import&quot;</div></td></tr></tbody></table></div>
<p><strong>получение начальной версии на свой компьютер (создание локальной версии)</strong><br />
в текущую директорию<br />
#</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp;svn checkout svn+ssh://remote.computer/path/to/project</div></td></tr></tbody></table></div>
<p><strong>список команд для работы с локальной версией</strong><br />
- обновить до текущей рабочей версии<br />
#</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">svn update (/path/to/file)</div></td></tr></tbody></table></div>
<p>- добавить новый файл (папку)<br />
#</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">svn add /path/to/file</div></td></tr></tbody></table></div>
<p>- удалить файл<br />
#</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">svn delete /path/to/file<br />
<br />
- сравнить локальную версию с текущей в проекте<br />
# &lt;code&gt;svn diff (/path/to/file)</div></td></tr></tbody></table></div>
<p>- сравнить внесенные вами изменения<br />
#</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">svn status (/path/to/file)</div></td></tr></tbody></table></div>
<p>- загрузить вашу версию в репозиторий<br />
#</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp;svn commit (/path/to/file)</div></td></tr></tbody></table></div>
<p>- Убрать все Ваши локальные изменения</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:810px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># svn revert (/path/to/file)</div></td></tr></tbody></table></div>
<p>Для комманд, в описании которых имя файла написано в скобках, по умолчанию<br />
действие делается для всех файлов, если никакой конкретный файл не указан.<br />
Вы можете также указать список файлов через пробел. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.developers-life.com/svn-%d0%bd%d0%b0-ubuntu-mini-howto.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

