= Trac Diff Module = ''Note 1: This is implemented in an experimental branch, which is candidate for integration in the trunk, after the 0.9 release (see #2028)'' ''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 '''Diff ...''' button in the TracBrowser leads to a form permitting the selection of arbitrary ''Base'' and ''Target'' path/revision pairs. The resulting set of differences consist in the changes that should be applied on the ''Base'' in order to make it look like the ''Target'' of the Diff. For convenience, it is possible to invert the roles for the '''old''' and the '''new''' path/revision pairs by clicking the ''Reverse Diff'' link on the diff page. === Checking the Last Changes === The last possibility for looking at changes is to have a quick look on the ''Last Changes'' 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 ''Previous Changes'' immediately preceeding the one being viewed, 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 will be no path restriction and the full changeset will be shown. == Looking at the Differences == ''See TracChangeset for now, as the display of the differences is identical to what is described there. Actually, the TracChangeset is now a particular case of TracDiff.'' Note however that the Changeset information is only displayed when it makes sense, i.e. when there's only one changeset involved in the difference being examined. == Feedback == ''Please feel free to test, as the feature set won't change much now, and add your observations here'' === Cherry-picking support === I was thinking about providing a checkbox for each file entry in order to generate a ''diff'' containing only the selected changes. A similar feature has also been requested in #1662. === Diff/Patch === I've noticed that the diffs that are produced using generalized diffs are not really usable for {{{patch}}}. Especially for the added files. ''Fixed in [2095]''