内容へ移動
八寿のナレッジベース
ユーザ用ツール
ログイン
サイト用ツール
検索
ツール
文書の表示
以前のリビジョン
バックリンク
最近の変更
メディアマネージャー
サイトマップ
ログイン
>
最近の変更
メディアマネージャー
サイトマップ
トレース:
it技術:winmerge
この文書は読取専用です。文書のソースを閲覧することは可能ですが、変更はできません。もし変更したい場合は管理者に連絡してください。
====== WinMerge ====== WinMerge は、オープンソースの Windows 用比較・マージツールです。WinMerge は、フォルダとファイル両方が比較でき、理解しやすく扱いやすいテキスト形式で差異をビジュアルに表現します。 ===== Tips ===== ==== 空白とタブを無視する ==== メニューの編集の設定にて、下図の赤枠の設定にする。\\ 空白を「すべて無視する」にすると、タブとスペースが同一視される。\\ {{:it技術:winmerge設定.png}} ==== バイナリファイルを比較対象から除外 ==== Javaなどバイナリファイル(classやjar)などを比較対象から除外したい場合、フィルターを作成する。 [[http://seesaawiki.jp/aki/d/WinMerge%20%A4%CE%A5%D5%A5%A1%A5%A4%A5%EB%A5%D5%A5%A3%A5%EB%A5%BF|WinMerge のファイルフィルタ]] f: はファイルのパターンを正規表現で指定する。\\ d: はディレクトリのパターンを正規表現で指定する。 def: のところで選択するinclude と exclude の意味が、普通の感覚と逆になっている。\\ def: include と指定すると、設定ファイルで指定されたパターンのファイルが比較対象とならない。\\ def: exclude と指定すると、設定ファイルで指定されたパターンのファイルだけが比較対象となる。 <code bat Java.flt> ## This is a directory/file filter for WinMerge ## This filter suppresses various binaries found in ADAMulti source trees name: Java desc: Suppresses various binaries found in Java source trees ## This is an inclusive (loose) filter ## (it lets through everything not specified) 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: \.class$ ## class file f: \.jar$ ## jar file d: \\classes$ ## class files d: \\log$ ## log files </code> ==== ログファイルを比較対象から除外 ==== <code bat log.flt> ## This is a directory/file filter template for WinMerge name: Log 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: \.log$ ## Filter for filename d: \\log$ ## Filter for directory </code> ==== 行フィルタで比較対象から除外 ==== ツール->フィルタ->行フィルタに正規表現を追加して、行フィルタを有効にすると対象行が違っていても比較対象から除外してくれる。 [[https://necoyama3.hatenablog.com/entry/20090227/1235754021|WinMergeでバージョン管理されたファイルのCVSやSVNのキーワードを除外して比較する]] ==== 先頭日時を除外して比較する ==== [[https://qiita.com/zaki-lknr/items/e46a0395fac05799847c|WinMergeの比較処理前に正規表現フィルタのプラグインで差分を無視したいテキストを定義する]] PrediffLineFilterフィルタの設定にて、正規表現を使用して先頭日時を除外して比較する。\\ 似た機能に行フィルタがあるが、それだと行全体が除外されてしまう。 ^設定^入力^ ^大文字小文字の違い| | ^正規表現を使用|✓| ^検索文字列|%%^%%\d{2}/\d{2}/\d{4} \d{2}:\d{2}:\d{2}.\d{3}| ^置換後の文字列| | メイン画面の[プラグイン]->[比較前処理プラグイン]->[PrediffLineFilter.sct]にチェックが入った状態にします。
it技術/winmerge.txt
· 最終更新: 2021/01/08 11:21 by
yajuadmin
ページ用ツール
文書の表示
以前のリビジョン
バックリンク
文書の先頭へ