Revision graphs provide an easy way for you to tell at-a-glance what is going on with your project. They provide a map, in easy-to-understand tree form, of the revision history of your project, including copies, branches, and tags.
One useful feature of revision graphs is that you can export them into a vector graphics format (WMF is a good option because they scale well and produce fairly small file size images. If you need a more widely supported format, then PNG is a good option) for inclusion with your source code, or on your project’s website, giving everyone an easy overview of the status of your project.
You can view revision graphs for files, directories, or the whole project.
You have just used the revision graph to get an overview of the revisions, branches, and tags in your project. The last revision graph that we saw is a simple one, taken from our example project. In a real-world scenario, it is likely that the revision graph would be much more complex, and it is in these complex projects that having a revision graph becomes so useful.
When there are dozens of branches which are being created and merged, it can become difficult to keep track of what happened when, and why. A revision graph gives you a clear high-level view of everything that is happening in your software project.
To fully understand the revision graph, it helps to understand what each node means. The following table will help with this:
ItemShapeDefault ColorItems which have been added or copied
Rounded rectangle
GreenItems which have been deleted
RedItems which have been renamed
BlueBranch HEAD revisions (if you have elected to show these)
PlainWorking copy revisions
Oval
Plain with bold outline (a red outline indicates modifications)Modified working copies
Oval
Plain with bold red outlineMoved items
Edged Rectangle
BlueAll other items
Rectangle
Plain
You can use the graph to get more detailed information about the differences between revisions. Just Ctrl-click on the two revisions you are interested in, right-click to bring up the context-sensitive menu, and then select Compare Revisions. You will be able to see a list of the revisions made to each file. Compare them using TortoiseDiff, as shown in the following screenshot:
You can also compare HEAD revisions, and view the unified differences using this method.
If your software project is quite large and complex, then you may find it useful to change the view used in the revision graph. There are several options that you can use to change the view you are using, and they can all be found under the view menu.
Rather than replicating the TortoiseSVN documentation by describing every single option, only the more interesting options will be described here. The other options are mostly clearly labelled, and otherwise are explained in the online help for TortoiseSVN:
Turning on Group by Branch will change this so that revisions on a branch will be shown on consecutive lines, and branches will be grouped into columns, keeping the graph slim. The previous screenshot shows the default appearance of the revision graph (a shorter revision graph has been used here, for ease of viewing), the next screenshot shows the same revision graph with Group by Branch:
With this fairly simple tree layout, the difference isn’t immediately clear, but if you have a lot of branches, you’ll find that the group by branch feature keeps the layout much neater, and avoids needless scrolling.
Keeping your view up-to-date
If you are viewing a revision graph of an active project, you may want to check for updates. Just as you would in your web browser, you can refresh the revision graph by pressing F5. This will connect you to the server (if you have been working offline) and check to see if there have been any new commits. Pressing F5 to refresh works for most screens in TortoiseSVN. You can update your log dialog, for example, by pressing F5 too.
Large software projects can end up with lots of trees. This can make the revision graph look excessively complex, and can make it harder for you to find the information that you need. The good news is that you can tame the trees in your graph, shrinking and expanding them as you need them.
To shrink a tree or a branch, simply hover your mouse over the point where the branch begins (where the node link enters the node), and you will be given the option to collapse the related tree (–), or expand it (+). If applicable, you will also be presented with the option to split a sub-tree into a separate graph (x), or re-attach a tree that had been split (o):
In this article you learned how to view revision graphs, and how to manipulate your view of the graph to give a clearer view of the things that you are interested in.
Revision graphs are useful for even small development teams. The good thing about the way TortoiseSVN displays them is that they are highly customizable, and scale well for larger projects. So, if you need to keep up with the lifecycle of branches and tags in a big project, then you can do so easily—thanks to the highly customizable views offered by TortoiseSVN!
Further resources on this subject:
I remember deciding to pursue my first IT certification, the CompTIA A+. I had signed…
Key takeaways The transformer architecture has proved to be revolutionary in outperforming the classical RNN…
Once we learn how to deploy an Ubuntu server, how to manage users, and how…
Key-takeaways: Clean code isn’t just a nice thing to have or a luxury in software projects; it's a necessity. If we…
While developing a web application, or setting dynamic pages and meta tags we need to deal with…
Software architecture is one of the most discussed topics in the software industry today, and…