Difference between revisions of "IDE Window: Diff"

From Free Pascal wiki
Jump to navigationJump to search
 
(13 intermediate revisions by 8 users not shown)
Line 1: Line 1:
The diff tool alows to compare two files or selections of two files. It can create a '''diff''' or '''patch'''.
+
{{IDE Window: Diff}}
The comparison is line based (not words or paragraphs). So it only works for text files (sources).
 
  
= Text1 =
+
== Purpose ==
 +
The diff tool lets you compare two files (or selected parts from two files). It can create a '''diff''' in Context format. See:
 +
http://en.wikipedia.org/wiki/Diff#Context_format.
  
Select the first file to compare.
+
== Limitations ==
If there is a selction available you can compare only this part of the text.
+
It is not suitable for creating patches for systems like Subversion and Git that need the Unified format. See:
 +
http://en.wikipedia.org/wiki/Diff#Unified_format
  
= Text2 =
+
It performs a line-based comparison (not a word- or paragraph-based) comparison, so it only works for text files (including source code), not binary files.
  
Select the second file to compare.
+
== Text1 ==
If there is a selction available you can compare only this part of the text.
 
  
= Options =
+
Select the first file in the comparison.
 +
If any portion of text is selected within the file, then only this selected part of the text will be compared.
  
* '''Case sensitive''': Distinguish small an big letters
+
== Text2 ==
* '''Ignore spaces at start of line''': Ignore the indenting space when comparing two lines. This includes tab characters.
+
 
* '''Ignore differences in line ends''': A unix line ending #10 is the same as a windows line ending #13#10.
+
Select the second file in the comparison.
 +
If any portion of text is selected within the file, then only this selected part of the text will be compared.
 +
 
 +
== Options ==
 +
 
 +
* '''Case sensitive''': Distinguishes between lowercase and upper-case (capital letter) characters.
 +
* '''Ignore spaces at start of line''': Ignore any indent when comparing two lines (whether space ' ' or tab characters).
 +
* '''Ignore differences in line ends''': A unix line ending #10 is treated as identical to a Windows line ending #13#10.
 
* '''Ignore spaces (newline chars not included)''': Ignore all spaces. 'A B' is the same as 'AB'.
 
* '''Ignore spaces (newline chars not included)''': Ignore all spaces. 'A B' is the same as 'AB'.
 
* '''Ignore if empty lines were added or removed''': Skip empty lines.
 
* '''Ignore if empty lines were added or removed''': Skip empty lines.
 
* '''Ignore spaces at end of line''': Ignore trailing spaces when comparing two lines.
 
* '''Ignore spaces at end of line''': Ignore trailing spaces when comparing two lines.
* '''Ignore amount of space characters''': Any amount of spaces is treated as one space.
+
* '''Ignore amount of space characters''': Any number of consecutive spaces is treated as one space.
  
= Close =
+
== Close ==
  
 
Close this dialog.
 
Close this dialog.
  
= Open Diff in Editor =
+
== Open Diff in Editor ==
  
 
Close the dialog and open a new page in the source editor with the diff.
 
Close the dialog and open a new page in the source editor with the diff.
  
= Save diff =
+
== Save diff ==
  
 
Opens a file dialog to save the diff to a file.
 
Opens a file dialog to save the diff to a file.

Latest revision as of 06:29, 2 July 2015

Deutsch (de) English (en) español (es) suomi (fi) français (fr)

Purpose

The diff tool lets you compare two files (or selected parts from two files). It can create a diff in Context format. See:

http://en.wikipedia.org/wiki/Diff#Context_format.

Limitations

It is not suitable for creating patches for systems like Subversion and Git that need the Unified format. See:

http://en.wikipedia.org/wiki/Diff#Unified_format

It performs a line-based comparison (not a word- or paragraph-based) comparison, so it only works for text files (including source code), not binary files.

Text1

Select the first file in the comparison. If any portion of text is selected within the file, then only this selected part of the text will be compared.

Text2

Select the second file in the comparison. If any portion of text is selected within the file, then only this selected part of the text will be compared.

Options

  • Case sensitive: Distinguishes between lowercase and upper-case (capital letter) characters.
  • Ignore spaces at start of line: Ignore any indent when comparing two lines (whether space ' ' or tab characters).
  • Ignore differences in line ends: A unix line ending #10 is treated as identical to a Windows line ending #13#10.
  • Ignore spaces (newline chars not included): Ignore all spaces. 'A B' is the same as 'AB'.
  • Ignore if empty lines were added or removed: Skip empty lines.
  • Ignore spaces at end of line: Ignore trailing spaces when comparing two lines.
  • Ignore amount of space characters: Any number of consecutive spaces is treated as one space.

Close

Close this dialog.

Open Diff in Editor

Close the dialog and open a new page in the source editor with the diff.

Save diff

Opens a file dialog to save the diff to a file.