2020-03-09 06:18:30 +00:00
|
|
|
<!--
|
|
|
|
Copyright 2020, Data61, CSIRO (ABN 41 687 119 230)
|
|
|
|
|
|
|
|
SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
-->
|
2014-07-14 19:32:44 +00:00
|
|
|
|
|
|
|
============================
|
|
|
|
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.
|