English | 日本語
ホーム > Merge > Merge for Windows > ドキュメントの目次 > UNIX diff コンテキスト形式レポートの例

UNIX diff コンテキスト形式レポートの例

比較したのは、以下の 2 つのファイルです。

1 番目のファイル 2 番目のファイル
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Eustace, a pointy-eared hippopotamus, was
scampering across a summer meadow one day
when he suddenly came across a stream.

Sitting on a rock in the middle of the
stream was a small green frog, basking in the
afternoon sunshine.

"Hello small green frog!", said Eustace."What
are you doing there?"

Froggy didn't answer, so Eustace trod on him
and wandered off into the nearby forest to look
for wild onions.
1
2
3
4
5
6
7
8
9
10
11
12
13
Eustace, a pointy-eared hippopotamus, was
scampering across a summer meadow one day
when he suddenly came across a stream.

Eustace almost fell into the stream, but
skidded to a halt just in time.

Sitting on a rock in the middle of the
stream was a small blue frog, basking in the
afternoon sunshine.

"Hello small blue frog!", said Eustace."What
are you doing there?"

Merge が作成したコンテキスト形式レポートは、次に示すようになります。この例では、変更されていない 2 行の内容が、相当するレポート オプションを使用して指定されています。

コンテキスト形式レポート 説明
*** E:¥temp¥Eustace1.txt	Sat Apr 28 00:51:11 2001 
--- E:¥temp¥Eustace2.txt	Sat Apr 28 00:51:18 2001
最初の 2 行は比較した 2 ファイルのリストです。レポート全体を通じ、アスタリスクは最初のファイルを示し、ハイフンは 2 番目のファイルを示します。ファイル名の次にはタイムスタンプ(その地域の時刻)があり、そのファイルが最後に変更された日付と時刻を示します。
*************** 
*** 3,14 ****
 when he suddenly came across a stream.
 
Sitting on a rock in the middle of the 
! stream was a small green frog, basking in the
 afternoon sunshine.
 
! "Hello small green frog!", said Eustace."What
 are you doing there?"
- 
- Froggy didn't answer, so Eustace trod on him
- and wandered off into the nearby forest to look
- for wild onions.
このブロックは、最初のファイルから変更および削除された行を示します。変更は、変更されていないコンテキスト行で囲まれています。ブロックの先頭の数字は、最初のファイルの 3 行メッセージから始まり、14 行の長さであることを示しています。
変更とそれを囲むコンテキスト行が、その他の変更およびそれを囲むコンテキスト行と重なっている場合、変更は 1 つのブロックにまとめられます(この例のように)。
変更された行は感嘆符のプレフィックスが付けられます。削除された行はハイフンのプレフィックスが付けられます。変更されていない行にはプレフィックスは付きません。
--- 3,13 ----
 when he suddenly came across a stream.
 
+ Eustace almost fell into the stream, but 
+ skidded to a halt just in time.
+ 
 Sitting on a rock in the middle of the
! stream was a small blue frog, basking in the
 afternoon sunshine.
 
! "Hello small blue frog!", said Eustace."What
 are you doing there?"
このブロックは、最初のファイルで変更および挿入された行を示します。変更された行は感嘆符のプレフィックスが付けられます。挿入された行はプラス(+)のプレフィックスが付けられます。変更されていない行にはプレフィックスは付きません。