X-Git-Url: https://deadsoftware.ru/gitweb?p=bbdiff.git;a=blobdiff_plain;f=README;h=a2a699ccbfc132613ea9ca8d25c9ac73858a2442;hp=81432a6d14167c00e71816ca7bfd7d6dc2ddd693;hb=e05e957bb4048a7e40b3095c59fb4e2847bd2dfe;hpb=0ca83c247bc68e4844d5d35e356abbc5cbcd813d diff --git a/README b/README index 81432a6..a2a699c 100644 --- a/README +++ b/README @@ -1,67 +1,74 @@ BlackBox diffutils -------------------- -Clone of diff, patch and diff3 utilites from *nix for BlackBox and its binary Compound Document format. +Clone of diff and diff3 utilites from *nix for BlackBox and its binary Compound Document format. Commands -------------------- -To use tools within Blackbox just compile DevDiff. +To use tools within Blackbox just compile DiffBase and DiffUtils. -DevDiff.Compare (guard TextCmds.FocusGuard) +DiffUtils.Compare (guard TextCmds.FocusGuard) Compare texts from two windows. - Can directly replace DevSearch.Compare in Dev/Rsrc/Menus.odc. + You can directly replace DevSearch.Compare with DiffUtils.Compare in Dev/Rsrc/Menus.odc. -^Q DevDiff.CompareThis [">" ] +^Q DiffUtils.CompareThis [">" ] Compare two files and produce patch in unified diff format. -^Q DevDiff.ApplyPatch +^Q DiffUtils.MergeThis [">" ] - Read unified diff format and apply changes from it. - - -^Q DevDiff.MergeThis [">" ] - - Read three files and do three-way merge like. + Read three files and do three-way merge like diff3. Dedicated tool -------------------- You can read, create diffs and merge documents from command line using odctool. -To build open OdctoolMain and execute commanders at the end of document. -Call `odctoll.exe help` to learn how to use it. +To build it, open DiffMain and execute commanders at the end of document. +Call `odctool help` to learn how to use it. -Warning: It tested only with wine and NOT tested on windows or native linux. - -Integration with GIT +Integration with Git -------------------- -It is possible to integrate three-way merge with git. +1. Compile odctool. + +2. Create script odctool-gitdiff: -1. Open .git/config and add this lines: + #! /bin/sh + odctool diff -p "$1" "$2" "$5" + +3. Add to .git/config: [merge "odctool"] name = BlackBox Compound Document merge driver - driver = /full/path/to/odctool merge -P %P %A %O %B %A + driver = /path/to/odctool merge -p %P -o %A %A %O %B + [diff "odctool"] + name = BlackBox Compound Document diff driver + command = /path/to/odctool-gitdiff + +4. Add to .git/info/attributes: + + *.odc merge=odctool diff=odctool + + +5. Optionally you can ignore some BlackBox related files if add to .git/info/exclude: -2. Open/create .git/info/attributes and add this line: + *.ocf + *.osf + odc[0-9][0-9][0-9][0-9][0-9] - *.odc merge=odctool -Now when conflict occurs, it marked like diff3 directly in odc file. -Checked not only text, but also views and formatting. +Now you can see diffs using `git diff' and resolve conflicts from BlackBox. Current state -------------------- -This is NOT final version of module DevDiff and Odctool. It is NOT well tested, you are warned! -Also, program and user interfaces can be changed later. -Todo list see at the and of sources and build tools. +This is NOT final version of subsustem Diff and odctool. It is NOT well tested, you are warned! +Also, program and user interfaces are not stable yet, so it can be changed in future.