lh-l4v/misc/filemerge
Gerwin Klein 092b1207f7 run astyle on all C files in the repository
Leaves parse tests and generated files unchanged, and provides a style
filter for these.

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-04-19 13:50:17 +08:00
..
faster run astyle on all C files in the repository 2020-04-19 13:50:17 +08:00
README licenses: convert license tags to SPDX 2020-03-13 14:38:24 +08:00
fmdiff spdx: review missing copyright & license info 2020-03-16 14:19:15 +08:00
unicode.py style: pep8 style for python files 2020-03-25 22:42:27 +11:00
xsymbol.py style: pep8 style for python files 2020-03-25 22:42:27 +11:00

README

<!--
     Copyright 2020, Data61, CSIRO (ABN 41 687 119 230)

     SPDX-License-Identifier: BSD-2-Clause
-->

============================
Graphical Diff for Mercurial
============================

This code lets you do a graphical diff in mercurial of Isabelle files
using FileMerge, a OS X merge program.

There are two parts:
1. Setting up mercurial to use FileMerge
2. Running a preprocessor script over the Isabelle files to produce Unicode.

======
Usage
======

hg opendiff

=====================================
Setting up mercurial to use FileMerge
=====================================

As documented at
http://mercurial.selenic.com/wiki/TipsAndTricks#Using_FileMerge.app.2BAC8-opendiff_as_the_diff_program_.28OS_X.29

1. Add the below to your .hgrc file

[extensions]
hgext.extdiff =

[extdiff]
cmd.opendiff =  fmdiff

2. Add fmdiff to a folder somewhere in your path.
http://soft.vub.ac.be/svn-gen/bdefrain/fmscripts/

=======================================
Setting up a predecessor for  FileMerge
=======================================

FileMerge doesn't understand x-symbols, but can run a preprocessor over
files first before it does a diff. (It appears as though you can't use
FileMerge to merge files when you do this.)

Thus, symbols.py does a find/replace on various x-symbols and replaces
them with their Unicode equivalents.

In FileMerge, go to FileMerge->Preferences…->Filters
Below the current filters, double-click and add:
thy	~/xsymbol.py $(FILE)	Filtered	No

Change the location to where the xsymbol script is located.