lh-l4v/misc/filemerge
Matthew Brecknell 184d6b70b7 remove most tab characters 2017-10-20 14:22:36 +11:00
..
faster misc/filemerge: Add an optimised version of this translator. 2015-10-14 11:02:02 +11:00
README Import release snapshot. 2014-07-14 21:32:44 +02:00
fmdiff remove most tab characters 2017-10-20 14:22:36 +11:00
unicode.py various scripts: use print_function uniformly for python3 compat 2016-01-28 16:11:07 +11:00
xsymbol.py various scripts: use print_function uniformly for python3 compat 2016-01-28 16:11:07 +11:00

README

#
# Copyright 2014, NICTA
#
# This software may be distributed and modified according to the terms of
# the BSD 2-Clause license. Note that NO WARRANTY is provided.
# See "LICENSE_BSD2.txt" for details.
#
# @TAG(NICTA_BSD)
#

============================
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.