diff --git a/reference/xdiff/book.xml b/reference/xdiff/book.xml index 36702399bc..0b0d665646 100644 --- a/reference/xdiff/book.xml +++ b/reference/xdiff/book.xml @@ -1,5 +1,5 @@ - + @@ -10,7 +10,19 @@ &reftitle.intro; - xdiff extension creates and applies patches to both text and binary files. + xdiff extension enables you to create and apply patch files containing + differences between different revisions of files. + + + This extension supports two modes of operation - on strings and on files, as well + as two different patch formats - unified and binary. Unified patches are excellent + for text files as they are human-readable and easy to review. For binary files like + archives or images, binary patches will be adequate choice as they are binary safe and + handle non-printable characters well. + + + This extension uses libxdiff to implement these functions. Please see + &url.xdiff; for more informations. diff --git a/reference/xdiff/constants.xml b/reference/xdiff/constants.xml index 63016dc725..3bc7d6c38e 100644 --- a/reference/xdiff/constants.xml +++ b/reference/xdiff/constants.xml @@ -1,5 +1,5 @@ - + &reftitle.constants; &extension.constants; @@ -11,7 +11,9 @@ - + This flag indicates that xdiff_[string|file]_patch functions should create result by + applying patch to original content thus creating newer version of file. This is the default + mode of operation. @@ -22,7 +24,8 @@ - + This flag indicated that xdiff_[string|file]_patch functions should create result by + reversing patch changed from newer content thus creating original version. diff --git a/reference/xdiff/functions/xdiff-file-diff-binary.xml b/reference/xdiff/functions/xdiff-file-diff-binary.xml index ef834c0476..676e78433f 100644 --- a/reference/xdiff/functions/xdiff-file-diff-binary.xml +++ b/reference/xdiff/functions/xdiff-file-diff-binary.xml @@ -1,5 +1,5 @@ - + @@ -29,6 +29,7 @@ file1 + Path to the first file. @@ -36,6 +37,7 @@ file2 + Path to the second file. @@ -43,7 +45,7 @@ dest - Path of the resulting file. Resulting file is in binary format. + Path of the resulting file. Resulting file is in binary format and is human-unreadable. diff --git a/reference/xdiff/functions/xdiff-file-diff.xml b/reference/xdiff/functions/xdiff-file-diff.xml index 93b2efb25f..e7f94831d5 100644 --- a/reference/xdiff/functions/xdiff-file-diff.xml +++ b/reference/xdiff/functions/xdiff-file-diff.xml @@ -1,5 +1,5 @@ - + @@ -18,7 +18,7 @@ boolminimal - Makes a diff of two files and stores the result in a file. + Makes a diff of two files and stores the result in a file. Resulting file is human-readable. @@ -30,6 +30,7 @@ file1 + Path to the first file. @@ -37,6 +38,7 @@ file2 + Path to the second file. @@ -61,8 +63,8 @@ minimal - Set this parameter to &true; if you want to minimalize size of diff - (can take a long time). Resulting file is human-readable. + Set this parameter to &true; if you want to minimalize size of the result + (can take a long time). @@ -104,7 +106,7 @@ xdiff_file_diff($old_version, $new_version, 'my_script.diff', 2); This function doesn't work well with binary files. To make diff of binary - files use xdiff_file_diff_binary. + files use xdiff_file_diff_binary function. diff --git a/reference/xdiff/functions/xdiff-file-merge3.xml b/reference/xdiff/functions/xdiff-file-merge3.xml index 798680bddf..7967e3abd9 100644 --- a/reference/xdiff/functions/xdiff-file-merge3.xml +++ b/reference/xdiff/functions/xdiff-file-merge3.xml @@ -1,5 +1,5 @@ - + @@ -29,6 +29,7 @@ file1 + Path to the first file. @@ -36,6 +37,7 @@ file2 + Path to the second file. @@ -43,6 +45,7 @@ file3 + Path to the third file. diff --git a/reference/xdiff/functions/xdiff-file-patch-binary.xml b/reference/xdiff/functions/xdiff-file-patch-binary.xml index 0c7b39faf6..aa00a735d7 100644 --- a/reference/xdiff/functions/xdiff-file-patch-binary.xml +++ b/reference/xdiff/functions/xdiff-file-patch-binary.xml @@ -1,5 +1,5 @@ - + @@ -37,7 +37,8 @@ patch - The binary patch file. + The binary patch file. It has to be created using xdiff_file_diff_binary or + xdiff_string_diff_binary function. diff --git a/reference/xdiff/functions/xdiff-file-patch.xml b/reference/xdiff/functions/xdiff-file-patch.xml index ba7807e5e3..eb869602b6 100644 --- a/reference/xdiff/functions/xdiff-file-patch.xml +++ b/reference/xdiff/functions/xdiff-file-patch.xml @@ -1,5 +1,5 @@ - + @@ -38,7 +38,8 @@ patch - The patch file. + The patch file. It has to be created using xdiff_string_diff, + xdiff_file_diff functions or compatible tools. @@ -68,7 +69,7 @@ &reftitle.returnvalues; Returns &false; if an internal error happened, string with rejected - chunks of patch or &true; if patch has been successfully applied. + chunks if patch couldn't be applied or &true; if patch has been successfully applied. diff --git a/reference/xdiff/functions/xdiff-string-diff-binary.xml b/reference/xdiff/functions/xdiff-string-diff-binary.xml index 2bae9dc0a0..6cad47f717 100644 --- a/reference/xdiff/functions/xdiff-string-diff-binary.xml +++ b/reference/xdiff/functions/xdiff-string-diff-binary.xml @@ -1,5 +1,5 @@ - + @@ -27,6 +27,7 @@ str1 + First string with binary data. @@ -34,6 +35,7 @@ str2 + Second string with binary data. diff --git a/reference/xdiff/functions/xdiff-string-diff.xml b/reference/xdiff/functions/xdiff-string-diff.xml index 15314475eb..4ebbfe7e9f 100644 --- a/reference/xdiff/functions/xdiff-string-diff.xml +++ b/reference/xdiff/functions/xdiff-string-diff.xml @@ -1,5 +1,5 @@ - + @@ -29,6 +29,7 @@ str1 + First string with data. @@ -36,6 +37,7 @@ str2 + Second string with data. @@ -53,7 +55,7 @@ Set this parameter to &true; if you want to minimalize the size of the - diff (can take a long time). + result (can take a long time). @@ -64,7 +66,7 @@ &reftitle.returnvalues; - Returns string with result or &false; if an internal error happened. + Returns string with resulting diff or &false; if an internal error happened. diff --git a/reference/xdiff/functions/xdiff-string-merge3.xml b/reference/xdiff/functions/xdiff-string-merge3.xml index 3103a17059..234c5b940e 100644 --- a/reference/xdiff/functions/xdiff-string-merge3.xml +++ b/reference/xdiff/functions/xdiff-string-merge3.xml @@ -1,5 +1,5 @@ - + @@ -29,6 +29,7 @@ str1 + First string with data. @@ -36,6 +37,7 @@ str2 + Second string with data. @@ -43,6 +45,7 @@ str3 + Third string with data. diff --git a/reference/xdiff/functions/xdiff-string-patch.xml b/reference/xdiff/functions/xdiff-string-patch.xml index 1433775a30..c62239258f 100644 --- a/reference/xdiff/functions/xdiff-string-patch.xml +++ b/reference/xdiff/functions/xdiff-string-patch.xml @@ -1,5 +1,5 @@ - + @@ -17,7 +17,7 @@ stringerror - Patches a string with a unified patch string. + Patches a string with a unified patch from patch parameter. @@ -37,7 +37,8 @@ patch - The unified patch string. + The unified patch string. It has to be created using xdiff_string_diff, + xdiff_file_diff functions or compatible tools.