| 1 | = Trac Diff Module = |
| 2 | |
| 3 | ''Note 1: this is an new feature, quickly maturing in the source:branches/cboos-dev/anydiff-branch development branch.'' |
| 4 | |
| 5 | ''Note 2: this is a prototype for the feature documentation. It will eventually be merged with the TracChangeset documentation page''. |
| 6 | |
| 7 | == The Different Ways of to Prepare a Diff == |
| 8 | |
| 9 | === Examining Differences Between Revisions === |
| 10 | |
| 11 | A very frequent need is to look at changes made on a file |
| 12 | or on a directory spanning multiple revisions. |
| 13 | In the TracLog view, one can select the '''old''' and the '''new''' |
| 14 | revision of the path being examined, and then select the '''Diff''' |
| 15 | operation. |
| 16 | |
| 17 | === Examining Arbitrary Differences === |
| 18 | |
| 19 | One of the main feature of source configuration management |
| 20 | systems is the possibility to work simultaneously on alternate |
| 21 | ''Lines of Developments'', or ''branches''. |
| 22 | The evolution of branches are often made in parallel, making it |
| 23 | sometimes difficult to understand the exact set of differences |
| 24 | between alternative versions. |
| 25 | |
| 26 | This is where Trac comes to the rescue: the TracBrowser |
| 27 | allows any path in the repository, at any given revision |
| 28 | to be selected as the ''Base for Diff'', |
| 29 | i.e. the '''old''' file (or directory) which |
| 30 | can be compared to any other existing '''new''' |
| 31 | path/revision pair. |
| 32 | |
| 33 | The resulting set of differences consist in the changes |
| 34 | that would be necessary to make on the ''Base'' in order |
| 35 | to make it look like the target of the comparison. |
| 36 | |
| 37 | For convenience, it is possible to invert the roles |
| 38 | for the '''old''' and the '''new''' path/revision pairs. |
| 39 | |
| 40 | === Checking the Last Changes === |
| 41 | |
| 42 | The last possibility for looking at changes is |
| 43 | to have a quick look on the ''Previous Diff'' while |
| 44 | browsing a file or a directory. |
| 45 | |
| 46 | This shows the relevant TracChangeset information, but |
| 47 | restricted to the path being browsed, and with a link |
| 48 | to the next ''Previous Diff'', making it convenient to |
| 49 | look at the history of the changes for a given path. |
| 50 | |
| 51 | ''TO BE DONE'' |
| 52 | |
| 53 | == Looking at the Differences == |
| 54 | |
| 55 | See TracChangeset for now, as the display is very similar. |
| 56 | |
| 57 | Except: |
| 58 | * the Changeset information is shown only for the last mode |
| 59 | (''Checking the Last Changes'') |
| 60 | * the path and revision information for the individual files |
| 61 | being examined are those corresponding to their creation |
| 62 | (''created path/created rev''). This helps to discover which |
| 63 | side is the ''real'' old file while examining parallel |
| 64 | lines of development. |
| 65 | |
| 66 | In relation to the latest point, I'm thinking about providing |
| 67 | a checkbox for each file entry in order to generate a ''diff'' |
| 68 | containing only the selected changes (''cherry-picking support''). |
| 69 | |
| 70 | |
| 71 | == Feedback == |
| 72 | |
| 73 | ''Please feel free to add your observations'' |
| 74 | |