websvn 設置手順
===============
* 下記URLより最新版ソースを取得
+ http://www.websvn.info/download/
* 解凍
* web公開領域に設置
* config ファイルコピー
~~~
cp include/distconfig.php include/config.php
~~~
* リポジトリURLの設定
~~~
vim include/config.php
$config->addRepository('repoA', 'https://example.com/svn/SVN_ADMIN/repoA', null, 'username', 'password');
$config->addRepository('repoB', 'https://example.com/svn/SVN_ADMIN/repoB', null, 'username', 'password');
~~~
## 文字化け対策
下記差分を参照
~~~~
[admin@cntsv004 public]$ diff -u include/command.php.ori include/command.php
--- include/command.php.ori 2016-08-29 10:04:53.585314871 +0900
+++ include/command.php 2016-08-29 09:50:17.894206651 +0900
@@ -23,7 +23,8 @@
// External command handling
function detectCharacterEncoding($str) {
- $list = array(/*'ASCII',*/ 'UTF-8', 'ISO-8859-1');
+ $list = array('UTF-8', 'SJIS', 'JIS', 'EUC-JP', 'ISO-8859-1');
if (function_exists('mb_detect_encoding')) {
// @see http://de3.php.net/manual/en/function.mb-detect-encoding.php#81936
// why appending an 'a' and specifying an encoding list is necessary
~~~~
引用元
Subversionで変更のあったファイルの一覧を取得する
Subversion
はじめに
Subversionで変更のあったファイルの一覧を取得したいときは、 svn diffコマンドが使えます。
リビジョン番号を指定する場合
以下のコマンドはカレントディレクトリを作業コピーのディレクトリに移動して実行します。リビジョン番号3から最新までの間に変更されたファイルを出力します。
svn diff -r 3:head --summarize
日付を指定する場合
2011/11/24から最新までの間に変更されたファイルを出力します。
svn diff -r{2011...
引用元
変更のあったファイルを確認
svn diff -r 100:head --summarize
◆svn管理下に無いファイルの一括削除:
svn st | grep "^?" | awk '{ print $2 }' | xargs rm
◆svn管理下に無いファイルの一括追加:
svn st | grep "^?" | awk '{ print $2 }' | xargs svn add
◆「!」の一括削除:
svn st | grep '^!' | awk '{ print $2 }' | xargs svn delete
◆「C」の確認:
svn st | grep "^C" | awk '{ print $2 }'
【応用編】
特定の不要ファイルを削除
svn st | grep "Thumbs\.db$" | awk '{ print $2 }' | xargs rm
svn info ほげ接続設定.xls|nkf --url-input
-bash-3.2$ svn di > /tmp/patch
-bash-3.2$ cd ~/OpenPNE213
-bash-3.2$ patch -p0 -E < /tmp/patch
※「-p0」・・・パスを難文字無視するか?(gitはp1を指定)
(補足)
212ホームで svn di をし、その内容のパッチファイルを作成
213ホームに移動
パッチを当てる(オプション:パッチの0番目から行い、ファイルが空になった場合削除する)
OK表示例:
Hunk #1 succeeded at 286 (offset 1 line).
patching file webapp/lib/OpenPNE/Auth.php
patching file webapp/lib/OpenPNE/Config.php
【SVN使わないバージョン】
diff -crN 前dir 後dir > パッチファイル
patch -p1 -E -d 対象dir < ファイル名
引用元
例)213にのみ行う修正を212でやっちまった;;・・・時など