The Log Dialog

The Log Dialog is important for a couple of different tasks. It is not only used to view the history of commits but also to view differences between committed revisions and for merging commits from a repository to a working copy.

Figure 2.17. subcommander Log Dialog

subcommander Log Dialog

View the History on a Working Copy

To view the history of your current working copy you need to open the Log Dialog. Select the working copy in the Project Folder View and choose log.. from the WcFolder menu.

In the Log Dialog you can control the range of revisions you like to see with the Start/Stop Revision controls. If you are only interested in the last 25 commits you can set the Limit to 25. Subcommander will display at most 25 commits in the given revision range. You can also disable the limit to get all revision in the given range. Press the Run button to retrieve the commit messages.

The default settings will show you the latest 50 commits on the selected working copy path: the start revision is head (the newest availabe revision) and the stop revision is 0 (the oldest possible commit). By having a limit of 50, subcommander will retrieve the latest 50 commits on the give path.

The commits are displayed in the Revision List. By selecting a revision its commit message is displayed in the Log Message editor and the files and folder modified in this revision are listed in the Changed Paths area. You can modifiy a commit message to fix some errors by editing the message. To overwrite the commit message in the repository press the Set Log Message button.

Note that the repository needs a pre-revprop-change hook that allows changing the commit messages.

Using the Find controls you can search through the retrieved log messages for the entered text. A found match gets highlighted in the Log Message editor. The Prev and Next buttons jump to the previous or next occurence.

View the History on a Repository

Viewing the history on a repository item works in the same way as for a working copy. Just open the log dialog on a repository item (ReposFolder menu) instead of a working copy item.

View Differences between Revisions

Repository Differences

After selecting two entries in the Revision List you can view the difference between them by running diff from the context menu. The diff menu item is only enabled if you select exactly two items.

Subcommander will show the differences of a single file by running submerge. If you did open the Log Dialog on a folder and not just on a single file subcommander will show each file with differences one by one.

Working Copy Differences

Generally viewing the differences from a working copy Log Dialog works the same way as viewing them from a repository Log Dialog. The only difference is that you can also run diff on a single selected item from the Revision List. In this case subcommander will show the differences between the selected revision and your current working copy.

Merge into the Working Copy

A common merge scenario is that you need to merge a single or muliple changes or bug fixes from your development branch into your current release branch.

Subcommander makes this an easy task. Make the merge target working copy your current working copy and open the Log Dialog on the source repository url with the changes you want to merge.

Now simply select the revision from the Revision List and select merge from the menu or the context menu to merge the selected revision into your current working copy. Subcommander will open the Merge Dialog with source of merge, source revisions and target working copy filled up. Hit ok in the Merge Dialog and your done.

In the same way you can easily merge a range of revisions. Select the first and the last revision of the range you like to merge in the Revision List and run merge again. Subcommander will fill the Merge Dialog with the given revision range.

Undo-ing a Commit from the Working Copy

From time to time it happens that one commits something wrong or broken to the repository. You can't revert the commit to the repository but you can do another commit that undos the comitted changes.

This works by reverse merging the wrong commit into your working copy and comitting the working copy again. Reverse merging means to switch the revisions used to merge. If your wrong commit was revision 10 (with 9 being the previous head revision) you tell subcommander to reverse merge the commit by specifying revision 10 as the from revision and revision 9 as the to revision.

To make this taks easier subcommander prefills the revisions in the correct reverse merge order if you choose undo instead of merge from the menu.

All other steps are the same as with merging.