masalibの日記

システム開発、運用と猫の写真ブログです

SVNとWinMergeの無視リストの設定方法

世間ではgitなのですが
今更ながらSVNWinMergeの無視リスト
の設定方法を記載します



SVNの無視リスト設定

ローカル環境において、無視したいファイルの拡張子をconfigファイルに設定します

設定手順

以下のディレクトリ配下に格納されている、configファイルをテキストエディタで開き、
[miscellany]のコメントアウトを外してglobal-ignoresにパターンを追加します。

C:\Users\[ユーザ名]\AppData\Roaming\Subversion\

◇変更前
### Section for configuring miscelleneous Subversion options.
[miscellany]
### Set global-ignores to a set of whitespace-delimited globs
### which Subversion will ignore in its 'status' output, and
### while importing or adding files and directories.
### '*' matches leading dots, e.g. '*.rej' matches '.foo.rej'.
# global-ignores = *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo

◇変更後

### Section for configuring miscelleneous Subversion options.
[miscellany]
### Set global-ignores to a set of whitespace-delimited globs
### which Subversion will ignore in its 'status' output, and
### while importing or adding files and directories.
### '*' matches leading dots, e.g. '*.rej' matches '.foo.rej'.
# global-ignores = *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo

global-ignores = *.bmp *.jpg *.jpeg *.jpz *.pnz *.png *.gif *.bak *.bk *.BAK *.log *.mp3 *.3gp *.mmf *.aac *.sgt *.3g2 *.asf *.mid



WinMerge

WinMergeのファイル、フォルダ選択画面で

f:id:masalib:20141112222808j:plain

フィルタの選択をクリックします

f:id:masalib:20141112222857j:plain

ここで新規を選択して下記の設定を
入力する

## This is a directory/file filter template for WinMerge
name: svn
desc: Longer description

## Select if filter is inclusive or exclusive
## Inclusive (loose) filter lets through all items not matching rules
## Exclusive filter lets through only items that match to rule
## include or exclude
def: include

## Filters for filenames begin with f:
## Filters for directories begin with d:
## (Inline comments begin with " ##" and extend to the end of the line)

f: \.gif$ ## Filter for filename
f: \.jpg$ ## Filter for filename
f: \.xml$ ## Filter for filename
f: \.db$ ## Filter for filename
f: \backup$ ## Filter for filename
f: \test$ ## Filter for filename
f: \.svn$ ## Filter for filename
f: \.svn-base$ ## Filter for filename

d: \\cvs$ ## CVS control directory
d: \\.svn$ ## Subversion control directory


これでいらないフォルダとか無視してくれます