<?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>Windchest &#187; NetBeans</title>
	<atom:link href="http://blog.windchest.jp/tag/netbeans/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.windchest.jp</link>
	<description>らいどんによるプログラミングメモ</description>
	<lastBuildDate>Thu, 12 Jan 2012 07:34:23 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Snow Leopardに最新版Subversionを入れる</title>
		<link>http://blog.windchest.jp/setting/231.html</link>
		<comments>http://blog.windchest.jp/setting/231.html#comments</comments>
		<pubDate>Sat, 26 Jun 2010 08:37:39 +0000</pubDate>
		<dc:creator>ryde</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[設定]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[NetBeans]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[開発ツール]]></category>

		<guid isPermaLink="false">http://blog.windchest.jp/?p=231</guid>
		<description><![CDATA[仕事でsubversionを使うことになりました。 Mercurialとgitは触りましたが（gitについてはこちら参照）、Subversionは久々です。 Snow Leopardには最初からインストールされているらし [...]]]></description>
			<content:encoded><![CDATA[<p>仕事でsubversionを使うことになりました。<br />
Mercurialとgitは触りましたが（<a title="Mac+NetBeansでGitライフを" href="http://blog.windchest.jp/setting/162.html" target="_self">gitについてはこちら参照</a>）、Subversionは久々です。<br />
Snow Leopardには最初からインストールされているらしいのですが・・・<br />
<span id="more-231"></span></p>
<h5>謎？のエラー</h5>
<p>とりあえずバージョンを確認してみます。<br />
<code><br />
$ svn --version<br />
svn: Mismatched RA version for 'neon': found 1.6.2, expected 1.6.5<br />
</code><br />
・・・？<br />
想定されたバージョンが違う？？？<br />
ぐぐってみると以下のサイトを見つけました。</p>
<ul>
<li><a title="COLLABNET" href="http://subversion.open.collab.net/ds/viewMessage.do?dsForumId=4&amp;viewType=browseAll&amp;dsMessageId=355372" target="_blank">COLLAVNET-ディスカッション-</a></li>
</ul>
<p>どうやら最新版を入れることで回避できる模様。</p>
<p>根本的な解決には至ってないですがとりあえずこの方法で行きます。</p>
<h5>ダウンロードとインストール</h5>
<p><a title="collabnet" href="http://www.open.collab.net/jp/downloads/community/" target="_blank">CollabNet</a>からOS Xのインストーラ付最新版subversionがDL出来ます。(ユーザ登録する必要あり)</p>
<p>画面にしたがってインストール。</p>
<p>最後に、<br />
<code><br />
Post-Installation Notes<br />
You have successfully installed the Subversion 1.6.12 universal binary for OS X Snow Leopard (10.6). Please remember to prepend /opt/subversion/bin to your PATH environment variable. This can be done a multitude of ways but an easy one is to add the following to the end of ~/.profile:<br />
</code></p>
<p><code><br />
export PATH=/opt/subversion/bin:$PATH<br />
</code></p>
<p><code><br />
If you plan on running an Apache-based Subversion server, you will also need to prepend the DYLD_LIBRARY_PATH variable in /usr/sbin/envvars with /opt/subversion/lib so that the Subversion libraries shipped with this binary are used instead of those supplied by the operating system. Here is an example snippet of what /usr/sbin/envvars might look like after making these changes:<br />
...<br />
DYLD_LIBRARY_PATH="/opt/subversion/lib:/usr/lib:$DYLD_LIBRARY_PATH"<br />
...<br />
</code><br />
と表示されるので、bash_profileなどに下記のパスを追加<br />
<code><br />
/opt/subversion/bin<br />
</code></p>
<p>インストールされたか確認。<br />
<code><br />
$ svn --version<br />
svn, version 1.6.12 (r955767)<br />
compiled Jun 23 2010, 12:01:54<br />
</code><br />
<code><br />
Copyright (C) 2000-2009 CollabNet.<br />
Subversion is open source software, see http://subversion.tigris.org/<br />
This product includes software developed by CollabNet (http://www.Collab.Net/).<br />
</code><br />
<code><br />
The following repository access (RA) modules are available:<br />
</code><br />
<code><br />
* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.<br />
- handles 'http' scheme<br />
- handles 'https' scheme<br />
* ra_svn : Module for accessing a repository using the svn network protocol.<br />
- with Cyrus SASL authentication<br />
- handles 'svn' scheme<br />
* ra_local : Module for accessing a repository on local disk.<br />
- handles 'file' scheme<br />
* ra_serf : Module for accessing a repository via WebDAV protocol using serf.<br />
- handles 'http' scheme<br />
- handles 'https' scheme<br />
</code><br />
無事インストールに成功しました。</p>
<p>Subversionのディレクトリを作成します。（この例ではホームフォルダにsvnを作成）<br />
<code><br />
$ svnadmin create svn<br />
</code></p>
<p>これでローカルから使う場合のSubversionの設定はひとまず終了。</p>
<h5>NetBeansから使ってみる</h5>
<p>Mac版NetBeans6.9での利用方法です。</p>
<p>環境設定＞その他＞バージョン管理＞Subversion<br />
で、<br />
「SVN実行可能ファイルのパス」に先程のディレクトリを指定します。<br />
<code><br />
/opt/subversion/bin<br />
</code></p>
<p>メニューの<br />
チーム&gt;subversion&gt;リポジトリにインポート<br />
を選択して先ほど作成したディレクトリを指定します。</p>
<p>次にプロジェクト名と同じリポジトリが表示されるので、適当なメッセージを入れて完了すればOK。<br />
<a href="http://blog.windchest.jp/wp-content/uploads/2010/06/623ae1280f4d100ba4f318c695c71009.png"><img class="alignnone size-medium wp-image-245" title="スクリーンショット" src="http://blog.windchest.jp/wp-content/uploads/2010/06/623ae1280f4d100ba4f318c695c71009-300x207.png" alt="スクリーンショット" width="300" height="207" /></a><br />
リポジトリの作成や初期コミットなども一括で行ってくれます。<br />
ひとまずこれでコミットが出来るようになりました。</p>
<p>しかし、このままではコミットメッセージに日本語を使用することが出来ませんので、下記のサイトを参考にして設定しました。(NetBeans6.9でも問題ありません)</p>
<p><a title="maedalog" href="http://maeda.farend.ne.jp/blog/2010/02/28/netbeans-mac-config/" target="_blank">maeda.log-MacのNetBeansで最初にする設定-</a></p>
<ul>
<li>~/.subversion/configの設定</li>
<li>/Applications/NetBeans/NetBeans 6.9.app/Contents/Resources/NetBeans/etc/netbeans.confの設定</li>
</ul>
<p>この二つのファイルに日本語を利用出来るように設定します。</p>
<p>ここまでやればこのように日本語でメッセージを入出力することが出来ます。<br />
<a href="http://blog.windchest.jp/wp-content/uploads/2010/06/773dfc293a5ede2176fe30ea2e9fdd59.png"><img class="alignnone size-medium wp-image-246" title="スクリーンショット" src="http://blog.windchest.jp/wp-content/uploads/2010/06/773dfc293a5ede2176fe30ea2e9fdd59-300x143.png" alt="スクリーンショット" width="300" height="143" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.windchest.jp/setting/231.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mac+NetBeansでGitライフを</title>
		<link>http://blog.windchest.jp/setting/162.html</link>
		<comments>http://blog.windchest.jp/setting/162.html#comments</comments>
		<pubDate>Thu, 25 Mar 2010 13:41:09 +0000</pubDate>
		<dc:creator>ryde</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[設定]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[NetBeans]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[開発ツール]]></category>

		<guid isPermaLink="false">http://blog.windchest.jp/?p=162</guid>
		<description><![CDATA[Git 「ぎっと」と読む。最近よく使われるバージョン管理ツール。 以前（と言っても最近）とある会社に伺った時、私がMercurial使ってるのに驚いてた。 実は俺、Git使った事ないんだよね・・・。 Mercurialと [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Git</strong><br />
「ぎっと」と読む。最近よく使われるバージョン管理ツール。<br />
以前（と言っても最近）とある会社に伺った時、私がMercurial使ってるのに驚いてた。<br />
実は俺、Git使った事ないんだよね・・・。</p>
<p>Mercurialと同じく分散管理ができるらしい。<br />
<span id="more-162"></span></p>
<h5>Gitのインストール</h5>
<p>現在は下記のインストーラが公開されています。</p>
<p>git-osx-installer<br />
<a title="git-osx-installer" href="http://code.google.com/p/git-osx-installer/" target="_blank">http://code.google.com/p/git-osx-installer/</a></p>
<p>そのままインストールするだけ。<br />
ダウンロード時のファイル名はgit-1.7.0.2-intel-leopard.dmgですが、Snow Leopardでもインストール可能。</p>
<p>ターミナルでインストール出来たか確認。<br />
<code>$ git --version<br />
git version 1.7.0.2</code><br />
これで完了。<br />
インストーラ開発者の皆さんありがとう！</p>
<p><strong>[2010/06/16追記]</strong><br />
アップデートする場合、新しいバージョンをDLしてきてそのままインストールするだけで、新バージョンに入れ替わります。<br />
1.7.1でテストして無事アップデートされました。</p>
<p><strong>[2011/05/13追記]</strong><br />
現在のバージョン(git-1.7.5-x86_64-leopard.dmgなど)を落としてくるとインストールされるパスが/usr/local/gitになるのでパスの変更が必要かもしれません。</p>
<h5>NetBeansプラグインのインストール</h5>
<p>NetBeansで使うためにはプラグインが必要。<br />
（6.8のデフォルトではSubversion、CVS、Mercurialのみ。シェアを考えると次期バージョンに組み込まれていてもおかしくはない・・・と思う）<a href="http://blog.windchest.jp/setting/162.html#cm1">※</a><br />
下記のプラグインをダウンロードしてインストール。</p>
<p>nbgit<br />
<a title="nbgit" href="http://code.google.com/p/nbgit/" target="_blank">http://code.google.com/p/nbgit/</a></p>
<p>インストールは.nbmファイルを落とすのが簡単です。<br />
NetBeansの</p>
<p>ツール＞プラグイン＞ダウンロード済みで「プラグインの追加」を選び、落としてきたnbgit-0.3.nbm(2010/03/25現在)を選んでインストール出来ます。<br />
2010/03/25現在ではNetBeansが6.8でプラグインが6.7対応ですが、無事インストールできました。</p>
<p><strong>[2010/06/16追記]</strong><br />
NetBeans6.9に0.3をインストールしようとすると、下記の画面のようにプラグインエディタライブラリのバージョンが違う旨が表示されインストール出来ませんでした。</p>
<p><a href="http://blog.windchest.jp/wp-content/uploads/2010/06/aac6945b5d50b997198207c89fe10de9.png"><img class="alignnone size-medium wp-image-215" title="スクリーンショット（2010-06-16 4.56.04）" src="http://blog.windchest.jp/wp-content/uploads/2010/06/aac6945b5d50b997198207c89fe10de9-300x259.png" alt="スクリーンショット（2010-06-16 4.56.04）" width="300" height="259" /></a></p>
<p>また、6.9でもgitはデフォルトのバージョン管理には採用されていません。</p>
<h5>テストしてみる</h5>
<p>Mercurialなどと同じように<br />
メニュー&gt;バージョン管理&gt;Initialize Git Projectで初期化。</p>
<p>プロジェクト名:git_testでテスト。<br />
メッセージ出力:<br />
<code><br />
Git Initialize<br />
--------------<br />
Initializing repository for git_test<br />
Creating Git /Applications/MAMP/htdocs/git_test/.git directory<br />
/Applications/MAMP/htdocs/git_test/index.php<br />
/Applications/MAMP/htdocs/git_test/nbproject/project.properties<br />
/Applications/MAMP/htdocs/git_test/nbproject/project.xml<br />
The 3 project files will be added to the repository for /Applications/MAMP/htdocs/git_test on the next commit:<br />
INFO: Repository initialized, make sure to commit the new project files<br />
INFO: End of Initialize</code></p>
<p>その後、初期コミットをする。</p>
<p>メッセージ出力:<br />
<code><br />
Git Commit<br />
----------<br />
Committing 3 files to repository for git_test:<br />
/Applications/MAMP/htdocs/git_test/nbproject/project.properties<br />
/Applications/MAMP/htdocs/git_test/index.php<br />
/Applications/MAMP/htdocs/git_test/nbproject/project.xml<br />
INFO: End of Commit<br />
</code><br />
無事コミット出来たようです。<br />
根っからヒネくれているので、スタンダードなものを使いたがらない傾向にあるワタクシですが、慣れのためにしばらくはMercurialではなくGit使ってみることにします。</p>
<p><strong><span id="cm1">[2011/05/13追記]</span></strong><br />
NetBeans7.0からは標準プラグインにGitが含まれていますので、メニューから選んでインストールするだけで使用できるようになります。</p>
<p><script type="text/javascript"><!--
google_ad_client = "ca-pub-6190376244558257";
/* windchest_page */
google_ad_slot = "5817002634";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.windchest.jp/setting/162.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: blog.windchest.jp @ 2012-02-06 23:30:37 -->
