Edgewall Software

Version 3 (modified by Christian Boos, 17 years ago) ( diff )

status update

Trac Diff Module

Note 1: this module is currently being developed in source:branches/cboos-dev/anydiff-branch development branch. It's feature complete as of [1777]. Some refactoring work is still needed, though

Note 2: that page is a prototype for the Diff documentation. It will eventually be merged with the TracChangeset documentation page.

The Different Ways of Preparing a Diff

Examining Differences Between Revisions

A very frequent need is to look at changes made on a file or on a directory spanning multiple revisions. In the TracLog view, one can select the old and the new revision of the path being examined, and then select the Diff operation.

Examining Arbitrary Differences

One of the main feature of source configuration management systems is the possibility to work simultaneously on alternate Lines of Developments, or branches. The evolution of branches are often made in parallel, making it sometimes difficult to understand the exact set of differences between alternative versions.

This is where Trac comes to the rescue: the TracBrowser allows any path in the repository, at any given revision to be selected as the Base for Diff, i.e. the old file (or directory) which can be compared to any other existing new path/revision pair.

The resulting set of differences consist in the changes that would be necessary to make on the Base in order to make it look like the target of the comparison.

For convenience, it is possible to invert the roles for the old and the new path/revision pairs.

Checking the Last Changes

The last possibility for looking at changes is to have a quick look on the Previous Diff while browsing a file or a directory.

This shows the relevant TracChangeset information, but

restricted to the path being browsed, and with a link to the next Previous Diff, making it convenient to look at the history of the changes for a given path.

Of course, if one is doing that on the root of the repository, there's will be no path restrictions and the full changeset will be shown.

Looking at the Differences

See TracChangeset for now, as the display is very similar.


  • the Changeset information is shown only for the last mode (Checking the Last Changes)
  • the revision information for the individual files being examined is the one corresponding to their creation. This helps to discover which side is the real old file while examining parallel lines of development.

In relation to the latest point, I'm thinking about providing a checkbox for each file entry in order to generate a diff containing only the selected changes (cherry-picking support).


Please feel free to test, as the feature set won't change much now, and add your observations here

Note: See TracWiki for help on using the wiki.